解决冲突
This commit is contained in:
commit
2caa526404
@ -68,16 +68,16 @@ export default {
|
||||
hint: '提示',
|
||||
hintContent: '此操作将永久删除该文件, 是否继续?',
|
||||
safeLvList: [{
|
||||
label: '一级',
|
||||
label: '正常',
|
||||
value: 1
|
||||
},{
|
||||
label: '二级',
|
||||
label: '超报警',
|
||||
value: 2
|
||||
},{
|
||||
label: '三级',
|
||||
label: '超控制',
|
||||
value: 3
|
||||
},{
|
||||
label: '四级',
|
||||
label: '变化速率报警',
|
||||
value: 4
|
||||
}],
|
||||
allCheck: '全选',
|
||||
|
||||
BIN
src/assets/images/projectImg/intell.png
Normal file
BIN
src/assets/images/projectImg/intell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
@ -14,6 +14,7 @@ export const selectMeasurePointListApi = data => post('xmgl/deepExcavationMeasur
|
||||
export const addDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/add', data); //添加深基坑-测点信息
|
||||
export const deleteDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/delete', data); //删除深基坑-测点信息
|
||||
export const getDetailDeepExcavationApi = data => get('/xmgl/deepExcavationMeasurePoint/getDetailsByMeasurePointNumber', data); //测点信息-测点管理-详情
|
||||
export const getSensorListApi = data => post('/xmgl/deepExcavationSensor/getSensorListByMeasurePointNumber', data); //通过测点编号查询传感器列表
|
||||
|
||||
|
||||
export const selectDeepExcavationSensorTypeListApi = data => post('xmgl/deepExcavationSensorType/selectDeepExcavationSensorTypeList', data); //列表查询深基坑-传感器类型信息
|
||||
|
||||
13
src/assets/js/api/insect.js
Normal file
13
src/assets/js/api/insect.js
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* api接口统一管理 巡查点
|
||||
*/
|
||||
|
||||
import { get,post } from '../http'
|
||||
|
||||
|
||||
// 删除巡检点
|
||||
export const deletePointApi = data => get('/xmgl/checkingPoint/delete', data);
|
||||
// 新建巡检点
|
||||
export const addPointApi = data => post('/xmgl/checkingPoint/add', data);
|
||||
// 查询巡检点列表
|
||||
export const getPointListApi = data => post('/xmgl/checkingPoint/selectPage', data);
|
||||
@ -1172,7 +1172,19 @@ const routes2 = [
|
||||
path: '/project/betonManage/devManage', //
|
||||
name: '混凝土施工管控_设备管理',
|
||||
component: resolve => require(['@/views/projectFront/betonManage/devManage.vue'], resolve)
|
||||
}
|
||||
},
|
||||
// 巡检点
|
||||
{
|
||||
path: '/project/inspecPoint/selfInspect', //
|
||||
name: '巡检点_项目自检',
|
||||
component: resolve => require(['@/views/projectFront/inspecPoint/selfInspect.vue'], resolve)
|
||||
},
|
||||
{
|
||||
path: '/project/inspecPoint/inspection', //
|
||||
name: '巡检点_巡检点',
|
||||
component: resolve => require(['@/views/projectFront/inspecPoint/inspection.vue'], resolve)
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
//企业后台
|
||||
|
||||
@ -96,17 +96,24 @@ export default {
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.charts {
|
||||
width: 23%;
|
||||
height: calc(100% - 8px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.chart {
|
||||
height: 32%;
|
||||
}
|
||||
background-color: #07162b;
|
||||
background-image: url('~@/assets/images/projectImg/Bimbgc.png');
|
||||
}
|
||||
.topBox {
|
||||
height: 20%;
|
||||
}
|
||||
.leftBox {
|
||||
position: relative;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
margin-right: 15px;
|
||||
.leftTop {
|
||||
height: 33%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.leftCenter {
|
||||
height: 33%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.bim {
|
||||
padding: 8px;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 10px 0px 25px 0px">
|
||||
<span style="color: #fff; margin-left: 130px; font-size: 14px"
|
||||
<span style="color: #fff; margin-left: 150px; font-size: 14px"
|
||||
><i class="el-icon-cloudy-and-sunny"></i> 多云 32℃</span
|
||||
>
|
||||
<span style="color: #229d65; font-size: 14px; display: inline"
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
font-size: 12px;
|
||||
|
||||
.tip {
|
||||
color: #fff;
|
||||
color: #6fe6f2;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
<!-- 智能设备管理 -->
|
||||
<div class="intelligentManage">
|
||||
<div class="titleTxt">{{ title }}</div>
|
||||
<div class="myChart" ref="myChart" />
|
||||
|
||||
<div class="img">
|
||||
<img src="../../../../assets/images/projectImg/intell.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts4";
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
@ -21,58 +21,6 @@ export default {
|
||||
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.initMyChart();
|
||||
},
|
||||
methods:{
|
||||
initMyChart(){
|
||||
const myChart = echarts.init(this.$refs.myChart);
|
||||
const option = {
|
||||
tooltip: { trigger: 'item' },
|
||||
grid: {
|
||||
left: '42px',
|
||||
right: '0',
|
||||
bottom: '40px',
|
||||
top: '45px'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['1月', '2月', '3月', '4月', '5月', '6月'],
|
||||
axisLabel: {
|
||||
//y轴文字的配置
|
||||
textStyle: {
|
||||
color: '#92a1bc',
|
||||
margin: 15
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
fontSize: 14,
|
||||
axisLabel: {
|
||||
// y轴文字的配置
|
||||
textStyle: {
|
||||
color: '#92a1bc',
|
||||
margin: 10
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'dashed',
|
||||
color: '#48618f'
|
||||
}
|
||||
}
|
||||
},
|
||||
color: ['#33b9f2', '#ed9745'],
|
||||
series: [
|
||||
{ type: 'bar', barWidth: '18px', data: [80, 182, 201, 125, 150, 180, 130]},
|
||||
{ type: 'bar', barWidth: '18px', data: [120, 132, 151, 163, 180, 120, 140]}
|
||||
]
|
||||
}
|
||||
myChart.setOption(option)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -88,9 +36,11 @@ export default {
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.myChart {
|
||||
width: 95%;
|
||||
height: 90%;
|
||||
img{
|
||||
margin-left: 30px;
|
||||
margin-top: 10px;
|
||||
width: 370px;
|
||||
height: 220px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -145,6 +145,7 @@ components:{Card},
|
||||
z-index: 2;
|
||||
.listItem {
|
||||
margin-bottom:2px ;
|
||||
height: 8%;
|
||||
.value {
|
||||
color: #bec2c6;
|
||||
}
|
||||
|
||||
@ -1,15 +1,34 @@
|
||||
<template>
|
||||
<!-- 质量问题 -->
|
||||
<Card :title="title">
|
||||
<JNestedRingChart :title="{ y:'30%' , subTitle: '隐患类别' }" :series="series" />
|
||||
<div class="content">
|
||||
<div class="chart">
|
||||
<JRingChart
|
||||
:title="{ text: total.totalNum, subTitle: '质量问题数' }"
|
||||
:color="['#3cabfd', '#ff6c7f']"
|
||||
:data="[{ value: total.jyUrgentLevelNum }, { value: total.ybUrgentLevelNum }]"
|
||||
:radius="['55%', '80%']"
|
||||
/>
|
||||
</div>
|
||||
<div class="count">
|
||||
<div class="count-item">
|
||||
<div class="label">已整改质量问题</div>
|
||||
<div class="num">{{25}}</div>
|
||||
</div>
|
||||
<div class="count-item">
|
||||
<div class="label">未整改质量问题</div>
|
||||
<div class="num">{{10}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../components/Card.vue'
|
||||
import JNestedRingChart from '../jChart/pie/JNestedRingChart.vue'
|
||||
import JRingChart from '../jChart/pie/JRingChart.vue'
|
||||
export default {
|
||||
components: { Card, JNestedRingChart },
|
||||
components: { Card, JRingChart },
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
@ -18,27 +37,59 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
color: ['#3cabfd', '#58ec72', '#f43a8d', '#f294c6', '#6ee4f0',],
|
||||
data: [
|
||||
{ value: 45, name: '文明施工' },
|
||||
{ value: 5, name: '未分类' },
|
||||
{ value: 15, name: '安全管理' },
|
||||
{ value: 10, name: '施工安全' },
|
||||
{ value: 45, name: '基础工程' },
|
||||
]
|
||||
},
|
||||
{
|
||||
roseType: 'area',
|
||||
radius: ['58%', '54%'],
|
||||
color: ['#0B1B35', '#244D8F'],
|
||||
data: [30, 40, 30, 40]
|
||||
}
|
||||
]
|
||||
total:{
|
||||
totalNum:43,
|
||||
jyUrgentLevelNum:25,
|
||||
ybUrgentLevelNum:10,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
<style lang="less" scoped>
|
||||
.content {
|
||||
height: calc(100% - 30px);
|
||||
display: flex;
|
||||
.chart {
|
||||
width: 55%;
|
||||
height: 100%;
|
||||
}
|
||||
.count {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.count-item {
|
||||
position: relative;
|
||||
&::before {
|
||||
position: absolute;
|
||||
left: -16px;
|
||||
top: 10px;
|
||||
content: '';
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
&:first-child {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
&:first-child::before {
|
||||
background-color: #3cabfd;
|
||||
}
|
||||
&:last-child::before {
|
||||
background-color: #ff768b;
|
||||
}
|
||||
.label {
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
.num {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -337,6 +337,15 @@
|
||||
:value="item.measurePointNumber">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>传感器编号:</span>
|
||||
<!-- <el-select v-model="checkList" size="small" @change="checkNum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in getSensorList"
|
||||
:key="item.id"
|
||||
:label="item.sensorTypeName"
|
||||
:value="item.measurePointNumber">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<!-- 选择日期 -->
|
||||
@ -419,7 +428,8 @@ import {
|
||||
selectDeepExcavationPlaneFigureCoordinateApi,
|
||||
selectDeepExcavationAllMeasurePointListApi,
|
||||
queryByIdDeepExcavationMonitorTypeApi,
|
||||
selectMonitorTypeListApi
|
||||
selectMonitorTypeListApi,
|
||||
getSensorListApi
|
||||
} from "@/assets/js/api/deepFoundationPitManage.js"
|
||||
export default {
|
||||
data(){
|
||||
@ -493,6 +503,7 @@ export default {
|
||||
id: 5,
|
||||
}],
|
||||
options:[],
|
||||
getSensorList:[], // 传感器列表
|
||||
checkList:"",
|
||||
dateTime: [],
|
||||
searchDate: 1,
|
||||
@ -537,8 +548,8 @@ export default {
|
||||
measurePointNumber: this.checkList,
|
||||
relaId: this.relaId,
|
||||
projectSn: this.projectSn,
|
||||
// startTime: this.dateTime[0],
|
||||
// endTime: this.dateTime[1]
|
||||
startTime: this.dateTime[0],
|
||||
endTime: this.dateTime[1]
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
if(res.code == 200 && res.result){
|
||||
@ -553,8 +564,9 @@ export default {
|
||||
this.echartData7.unit = '('+item.keyName.split('(')[1]
|
||||
}
|
||||
})
|
||||
res.result.records.forEach(item=>{
|
||||
this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
|
||||
res.result.data.records.forEach(item=>{
|
||||
// this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
|
||||
this.echartData7.xAxis.push(item.receiveTime.split(' ')[0])
|
||||
this.echartData7.data.push(item.data)
|
||||
})
|
||||
// console.log('图标的值',this.echartData7)
|
||||
@ -568,7 +580,7 @@ export default {
|
||||
deepExcavationId: this.deepExcavation,
|
||||
relaId: this.relaId
|
||||
}).then(res=>{
|
||||
// console.log('列表查询测点',res)
|
||||
console.log('列表查询测点',res)
|
||||
if(res.code == 200 && res.result){
|
||||
this.options = res.result
|
||||
let arr = []
|
||||
@ -584,6 +596,14 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询传感器编号列表
|
||||
selectDeepExcavationAllgetSensorList(){
|
||||
let data = {}
|
||||
getSensorListApi(data).then((res)=>{
|
||||
console.log('0000000',res)
|
||||
})
|
||||
},
|
||||
|
||||
// 根据id查询基坑内容详情
|
||||
queryByIdDeepExcavationMonitorType(val){
|
||||
console.log(val)
|
||||
@ -1453,8 +1473,9 @@ export default {
|
||||
// status: val.alarmType == 1 ? this.$t('message.deepFoundConfig.no'):this.$t('message.deepFoundConfig.yes'),
|
||||
// tableHeader: arr
|
||||
// }
|
||||
let nowTime = this.selectNowDate()
|
||||
this.dateTime = [nowTime.split(' ')[0] + ' ' + '00:00:00',nowTime]
|
||||
// 默认时间
|
||||
// let nowTime = this.selectNowDate()
|
||||
// this.dateTime = [nowTime.split(' ')[0] + ' ' + '00:00:00',nowTime]
|
||||
// this.queryByIdDeepExcavationMonitorType(val.id)
|
||||
this.selectDeepExcavationAllMeasurePointList()
|
||||
this.$nextTick(()=>{
|
||||
@ -1530,8 +1551,22 @@ export default {
|
||||
// this.createdEchart7()
|
||||
},
|
||||
checkNum(val){
|
||||
console.log(val)
|
||||
console.log('当前选择',val)
|
||||
this.selectDeepExcavationCurrentDataList()
|
||||
// measurePointNumber = val
|
||||
// 查询传感器编号列表
|
||||
|
||||
getSensorListApi({measurePointNumber:val}).then((res)=>{
|
||||
console.log('0000000',res)
|
||||
if(res.code == 200 && res.result){
|
||||
this.getSensorList = res.result.data.records
|
||||
console.log('------------',this.getSensorList)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
checkDateTime(val){
|
||||
console.log(val)
|
||||
|
||||
286
src/views/projectFront/inspecPoint/inspection.vue
Normal file
286
src/views/projectFront/inspecPoint/inspection.vue
Normal file
@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain @click="toAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="tableData">
|
||||
<el-table-column prop="checkingPointName" label="名称" align="center"></el-table-column>
|
||||
<el-table-column prop="position" label="位置" align="center"></el-table-column>
|
||||
<el-table-column prop="createUserName" label="创建人" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="createDate" label="创建时间" align="center"></el-table-column>
|
||||
<el-table-column prop="qrCode" label="二维码" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<!-- {{$store.state.FILEURL + row.qrCode}} -->
|
||||
<el-image style="margin-right: 8px;width: 80px; height: 80px;cursor: pointer;border-radius: 4px"
|
||||
fit="cover"
|
||||
:src="$store.state.FILEURL + row.qrCode"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="$t('message.personnelPosition.beaconManage.table.operation')"
|
||||
align="center"
|
||||
width="250"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<a class="download" target="_blank" :href="$store.state.FILEURL + scope.row.qrCode">下载</a>
|
||||
</div>
|
||||
<div @click="toDelete(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="total"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
<!-- 新增巡检点弹框 -->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:title="cardDialogTitle"
|
||||
:visible.sync="cardDialog"
|
||||
width="667px"
|
||||
>
|
||||
<div class="dialog_content">
|
||||
<el-form
|
||||
size="medium"
|
||||
:model="cardForm"
|
||||
ref="cardForm"
|
||||
:rules="cardFormRules"
|
||||
label-width="120px"
|
||||
class="dialogFormBox"
|
||||
>
|
||||
<el-form-item label="巡检点名称:" prop="checkingPointName">
|
||||
<el-input
|
||||
v-model="cardForm.checkingPointName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="巡检点位置:" prop="position">
|
||||
<el-input
|
||||
v-model="cardForm.position"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<div id="qrCode" ref="qrCodeDiv"></div>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="cardDialog = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{$t('message.personnelPosition.cancel')}}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click.once="addCardFn"
|
||||
size="medium"
|
||||
>生成二维码</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPointListApi,
|
||||
addPointApi,
|
||||
deletePointApi
|
||||
} from "@/assets/js/api/insect.js";
|
||||
import QRCode from "qrcodejs2";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
workerName: ""
|
||||
},
|
||||
cardDialogTitle: "新建巡检点",
|
||||
tableData: [],
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
cardForm: {
|
||||
checkingPointName: "",
|
||||
position: ""
|
||||
},
|
||||
qrCode: "",
|
||||
cardDialog: false,
|
||||
projectSn: "",
|
||||
cardFormRules: {
|
||||
checkingPointName: [
|
||||
{ required: true, message: "请输入巡检点名称", trigger: "blur" }
|
||||
],
|
||||
position: [
|
||||
{ required: true, message: "请输入巡检位置", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.projectSn = this.$store.state.projectSn;
|
||||
this.getPointList();
|
||||
},
|
||||
methods: {
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
this.getPointList();
|
||||
},
|
||||
//查看页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNo = val;
|
||||
this.getPointList();
|
||||
},
|
||||
// 查询
|
||||
getPointList() {
|
||||
let data = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
projectSn: this.projectSn
|
||||
};
|
||||
getPointListApi(data).then(res => {
|
||||
console.log("----巡检点列表", res);
|
||||
this.tableData = res.result.records
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
toRefresh() {
|
||||
this.getPointList();
|
||||
},
|
||||
// 新增
|
||||
toAdd() {
|
||||
this.cardDialog = true;
|
||||
},
|
||||
// 删除
|
||||
toDelete(val) {
|
||||
console.log("删除", val);
|
||||
this.$confirm("此操作将永久删除该巡检点, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: val.id
|
||||
};
|
||||
deletePointApi(data).then(res => {
|
||||
if (res.success) {
|
||||
this.getPointList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!"
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.message
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消删除"
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取当前时间 返回YYYY-MM-DD HH:mm:ss
|
||||
selectNowDate() {
|
||||
var date = new Date(),
|
||||
year = date.getFullYear(),
|
||||
month = date.getMonth() + 1,
|
||||
day = date.getDate(),
|
||||
hours = date.getHours(), //获取当前小时数(0-23)
|
||||
minutes = date.getMinutes(), //获取当前分钟数(0-59)
|
||||
seconds = date.getSeconds();
|
||||
month >= 1 && month <= 9 ? (month = "0" + month) : "";
|
||||
day >= 0 && day <= 9 ? (day = "0" + day) : "";
|
||||
hours >= 0 && hours <= 9 ? (hours = "0" + hours) : "";
|
||||
minutes >= 0 && minutes <= 9 ? (minutes = "0" + minutes) : "";
|
||||
seconds >= 0 && seconds <= 9 ? (seconds = "0" + seconds) : "";
|
||||
var timer =
|
||||
year +
|
||||
"-" +
|
||||
month +
|
||||
"-" +
|
||||
day +
|
||||
" " +
|
||||
hours +
|
||||
":" +
|
||||
minutes +
|
||||
":" +
|
||||
seconds;
|
||||
return timer;
|
||||
},
|
||||
// 生成二维码
|
||||
addCardFn() {
|
||||
// 新增
|
||||
let data = this.cardForm;
|
||||
data.projectSn = this.$store.state.projectSn;
|
||||
data.createUserId = this.$store.state.userInfo.userId;
|
||||
data.createUserName = this.$store.state.userInfo.account;
|
||||
|
||||
this.$refs["cardForm"].validate(valid => {
|
||||
if (valid) {
|
||||
document.getElementById("qrCode").innerHTML = "";
|
||||
console.log("QRCode", QRCode);
|
||||
let QRCodeData = new QRCode(this.$refs.qrCodeDiv, {
|
||||
text: JSON.stringify(data),
|
||||
width: 150,
|
||||
height: 150,
|
||||
colorDark: "#333333", //二维码颜色
|
||||
colorLight: "#ffffff", //二维码背景色
|
||||
correctLevel: QRCode.CorrectLevel.L //容错率,L/M/H
|
||||
});
|
||||
console.log("QRCodeData", QRCodeData);
|
||||
setTimeout(() => {
|
||||
let img = QRCodeData._el.innerHTML;
|
||||
let baseurl = img
|
||||
.split("=")[5].split('"')[1]
|
||||
console.log("baseurl", baseurl);
|
||||
data.qrCode = baseurl;
|
||||
data.createDate = this.selectNowDate();
|
||||
addPointApi(data).then(res => {
|
||||
console.log("新增", res);
|
||||
if (res.code == 200) {
|
||||
this.cardDialog = false;
|
||||
this.getPointList()
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.download{
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
84
src/views/projectFront/inspecPoint/selfInspect.vue
Normal file
84
src/views/projectFront/inspecPoint/selfInspect.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
|
||||
<el-form-item
|
||||
label="巡检点"
|
||||
prop="beaconMinor"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.workerName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="getPointList"
|
||||
>{{$t('message.personnelPosition.beaconManage.query')}}</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@click="toRefresh"
|
||||
>{{$t('message.personnelPosition.beaconManage.refresh')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="tableData">
|
||||
<el-table-column prop="beaconMinor" label="巡检点" align="center"></el-table-column>
|
||||
<el-table-column prop="position" label="巡检位置" align="center"></el-table-column>
|
||||
<el-table-column prop="beaconMinor" label="巡检人" align="center"></el-table-column>
|
||||
<el-table-column prop="beaconMinor" label="巡检时间" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="total"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
workerName: ""
|
||||
},
|
||||
tableData: [{ beaconMinor: "111" }],
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
this.getPointList();
|
||||
},
|
||||
//查看页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNo = val;
|
||||
this.getPointList();
|
||||
},
|
||||
// 查询
|
||||
getPointList() {},
|
||||
// 刷新
|
||||
toRefresh() {}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user