深基坑(项目监测列表):空传感器修复

This commit is contained in:
骆乐 2022-10-13 20:04:10 +08:00
parent 712e63ed25
commit bc49ff3df2
2 changed files with 37 additions and 33 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -498,7 +498,7 @@
<template slot-scope="scope">{{scope.row.dataTotal + scope.row.unit}}</template>
</el-table-column>
<el-table-column prop="alarmValue" label="累计预警值" align="center">
<template slot-scope="scope">{{scope.row.alarmValue + scope.row.unit}}</template>
<template slot-scope="scope">{{'±' + scope.row.alarmValue + scope.row.unit}}</template>
</el-table-column>
<el-table-column prop="dataRate" label="变化速率" align="center">
<template slot-scope="scope">{{scope.row.dataRate + scope.row.unit +'/d'}}</template>
@ -589,6 +589,7 @@ import {
export default {
data() {
return {
unit:"mm",
detailData: {
name: "",
point: "",
@ -702,7 +703,6 @@ export default {
xAxis: [],
data: [],
},
unit:'mm',//
max:'',
min:'',
};
@ -737,7 +737,6 @@ export default {
}).then(res => {
this.max = res.result.alarmValue;
this.min = res.result.alarmValue * ('-1');
console.log('默认第一次进来的报警值',this.max,this.min)
this.unit = res.result.unit;
console.log("默认第一次进来的时候单位", this.unit)
if (res.code == 200 && res.result) {
@ -757,13 +756,13 @@ export default {
}
});
},
//
//
selectDeepExcavationAllMeasurePointList() {
selectDeepExcavationAllMeasurePointListApi({
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 = [];
@ -772,9 +771,10 @@ export default {
});
this.detailData.point = arr.join("");
console.log("this.detailData.point", this.detailData.point);
//
if (res.result.length > 0) {
//
this.checkList = res.result[0].measurePointNumber;
// console.log('',this.checkList)
this.checkNum(this.checkList);
}
}
@ -1401,6 +1401,21 @@ export default {
// this.selectDeepExcavationMonitorTypeList()
// console.log(val);
// },
//
showDetail(val) {
console.log('点击获取详情',this.unit)
this.dateTime = []
this.pageSize1= 10,
this.pageNo= 1,
this.visibleDialog = true;
this.relaId = val.id;
this.selectDeepExcavationAllMeasurePointList(); //
// this.$nextTick(() => {
// // this.createdEchart5()
// // this.createdEchart6()
// this.createdEchart7();
// });
},
handleSizeChange1(val) {
this.pageSize1 = val;
console.log('分页',val);
@ -1620,6 +1635,7 @@ export default {
},
yAxis: {
type: "value",
// scale:true,
// max:this.max + 1,
min:this.min -1,
// max:function(obj){//线
@ -1726,7 +1742,7 @@ export default {
},
label:{
position:'end',
formatter:`报警值(${this.max})`
formatter:'警戒线'
},
yAxis:this.max
},
@ -1739,7 +1755,7 @@ export default {
},
label:{
position:'end',
formatter:`报警值(${this.min})`
formatter:'警戒线'
},
yAxis:this.min
}]
@ -1799,21 +1815,6 @@ export default {
console.log(timer);
return timer;
},
showDetail(val) {
console.log('unit',this.unit)
// console.log('',val)
this.dateTime = []
this.pageSize1= 10,
this.pageNo= 1,
this.visibleDialog = true;
this.relaId = val.id;
this.selectDeepExcavationAllMeasurePointList(); //
this.$nextTick(() => {
// this.createdEchart5()
// this.createdEchart6()
this.createdEchart7();
});
},
checkDate(val) {
this.searchDate = val;
this.selectMonitorTypeAlarmCountList();
@ -1880,20 +1881,19 @@ export default {
},
//
checkNum(val) {
this.checkList2 = ''
this.firstSelect = val;
// console.log("", val);
getSensorListApi({ measurePointNumber: this.firstSelect }).then(res => {
if (res.code == 200 && res.result) {
// console.log('',res.result)
this.getSensorList = res.result;
if (this.getSensorList.length != 0) {
this.checkList2 = this.getSensorList[0].sensorSn;
// console.log('',this.checkList2)
this.selectDeepExcavationCurrentDataList(this.checkList2) //
console.log('默认的传感器编号',this.checkList2)
// this.selectDeepExcavationCurrentDataList(this.checkList2)
this.getEchartsData()
this.$nextTick(()=>{
this.createdEchart7()
})
// this.$nextTick(()=>{
// this.createdEchart7()
// })
}
}
});
@ -1910,10 +1910,11 @@ export default {
pageNo:this.pageNo1,
pageSize:this.pageSize1,
}).then(res => {
console.log('单位',res.result.unit)
this.unit = res.result.unit
// console.log('',this.unit )
this.max = res.result.alarmValue;
this.min = res.result.alarmValue * ('-1');
console.log('第二个选择时的单位',this.unit)
if (res.code == 200 && res.result) {
this.total1 = res.result.data.total
this.tableData2 = res.result.data.records;
@ -1925,13 +1926,14 @@ export default {
this.echartData7.xAxis.unshift(item.receiveTime);
this.echartData7.data.unshift(item.data);
});
console.log('===========', this.echartData7.xAxis[0].split(' ')[0])
// console.log('===========', this.echartData7.xAxis[0].split(' ')[0])
this.$nextTick(() => {
this.createdEchart7();
});
}
});
},
//
checkDateTime() {
if (this.checkList == "" || this.checkList2 == "") {
this.$message({
@ -1943,10 +1945,12 @@ export default {
}
},
watch: {
firstSelect: {
checkList: {
handler(newval, oldval) {
if (newval != oldval) {
console.log('新旧',newval, oldval)
this.getEchartsData();
this.checkList2=""
}
},
immediate: true