深基坑系统(基坑配置):基坑监测 项目监测列表的渲染

This commit is contained in:
骆乐 2022-08-22 15:50:03 +08:00
parent 5c1f3e3c32
commit d62d8fff28

View File

@ -368,9 +368,12 @@
</div>
<el-table class="tables" height="264" :data="tableData2">
<!-- 测点编号 -->
<el-table-column prop="measuringPointSn" :label="$t('message.deepFoundConfig.pointNo')"></el-table-column>
<el-table-column prop="measurePointNumber" :label="$t('message.deepFoundConfig.pointNo')"></el-table-column>
<el-table-column prop="sensorSn" label="传感器编号"></el-table-column>
<el-table-column prop="sensorTypeName" label="传感器类型"></el-table-column>
<el-table-column prop="data" label="值"></el-table-column>
<!-- 测点名称 -->
<el-table-column prop="measuringPointName" :label="$t('message.deepFoundConfig.pointName')"></el-table-column>
<el-table-column prop="measurePointName" :label="$t('message.deepFoundConfig.pointName')"></el-table-column>
<el-table-column v-for="(item,index) in detailData.tableHeader" :key="index" :prop="item.key" :label="item.keyName"></el-table-column>
<!-- 采集时间 -->
<el-table-column prop="receiveTime" :label="$t('message.deepFoundConfig.gatherTime')"></el-table-column>
@ -433,6 +436,7 @@ export default {
safeList:["一级","二级","三级","四级","五级","六级"],
deepExcavation: "", //id
monitorTypeId: "", //id
relaId:'',
colorList: ['#44D7B6', '#44D7B6','#F67F52', '#FF0000'],
colorList2:['#7953F6','#F67F52'],
colorList3:['#44D7B6','#5484F6'],
@ -531,27 +535,30 @@ export default {
selectDeepExcavationCurrentDataList(){
selectDeepExcavationCurrentDataListApi({
measurePointNumber: this.checkList,
monitorTypeId: this.monitorTypeId,
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){
this.tableData2 = res.result
console.log('下面的数据',res)
this.tableData2 = res.result.records
this.echartData7={
xAxis: [],
data: []
}
this.detailData.tableHeader.forEach(item=>{
if(item.key == 'data1'){
console.log('----item---',item)
if(item.key == 'data'){
this.echartData7.unit = '('+item.keyName.split('(')[1]
}
})
res.result.forEach(item=>{
res.result.records.forEach(item=>{
this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
this.echartData7.data.push(item.data1)
this.echartData7.data.push(item.data)
})
// console.log('',this.echartData7)
this.createdEchart7()
}
})
@ -560,9 +567,9 @@ export default {
selectDeepExcavationAllMeasurePointList(){
selectDeepExcavationAllMeasurePointListApi({
deepExcavationId: this.deepExcavation,
monitorTypeId: this.monitorTypeId
relaId: this.relaId
}).then(res=>{
// console.log(res)
console.log('列表查询测点',res)
if(res.code == 200 && res.result){
this.options = res.result
let arr = []
@ -570,7 +577,7 @@ export default {
arr.push(item.measurePointName)
})
this.detailData.point = arr.join('')
console.log(res.result)
console.log('this.detailData.point',this.detailData.point)
if(res.result.length>0){
this.checkList = res.result[0].measurePointNumber
}
@ -1431,22 +1438,22 @@ export default {
},
showDetail(val){
this.visibleDialog = true
console.log(val)
this.monitorTypeId = val.id
console.log('当前点击行的值',val)
this.relaId = val.id
this.checkList = ""
let arr = []
for(let key in JSON.parse(val.dataField)){
arr.push({
key,
keyName: JSON.parse(val.dataField)[key]
})
}
this.detailData = {
name: val.monitorTypeName,
// '':''
status: val.alarmType == 1 ? this.$t('message.deepFoundConfig.no'):this.$t('message.deepFoundConfig.yes'),
tableHeader: arr
}
// let arr = []
// for(let key in JSON.parse(val.dataField)){
// arr.push({
// key,
// keyName: JSON.parse(val.dataField)[key]
// })
// }
// this.detailData = {
// name: val.monitorTypeName,
// // '':''
// 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]
// this.queryByIdDeepExcavationMonitorType(val.id)