深基坑(项目监测列表):空传感器修复
This commit is contained in:
parent
712e63ed25
commit
bc49ff3df2
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user