Merge branch 'dev-xiaole' into shenzhen-dev

This commit is contained in:
骆乐 2022-08-22 15:51:10 +08:00
commit 6912abfe88
2 changed files with 51 additions and 38 deletions

View File

@ -418,6 +418,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
:picker-options="pickerOptions"> :picker-options="pickerOptions">
</el-date-picker> --> </el-date-picker> -->
<!-- :default-time="['00:00:00', '23:59:59']" -->
<el-date-picker <el-date-picker
v-model="acquisitionTime" v-model="acquisitionTime"
type="datetimerange" type="datetimerange"
@ -425,8 +426,6 @@
:range-separator="$t('message.deepFoundConfig.to')" :range-separator="$t('message.deepFoundConfig.to')"
:start-placeholder="$t('message.deepFoundConfig.startTime')" :start-placeholder="$t('message.deepFoundConfig.startTime')"
:end-placeholder="$t('message.deepFoundConfig.endTime')" :end-placeholder="$t('message.deepFoundConfig.endTime')"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
align="right"> align="right">
</el-date-picker> </el-date-picker>
</div> </div>
@ -435,7 +434,12 @@
</div> </div>
<el-table :data="currentPointDetail" class="tables" height="560"> <el-table :data="currentPointDetail" class="tables" height="560">
<!-- 测点编号 --> <!-- 测点编号 -->
<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="measurePointName" label="测点名称"></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 v-for="(item,index) in currentTableData" :key="index" :prop="item.targetField" :label="item.targetName"></el-table-column> <el-table-column v-for="(item,index) in currentTableData" :key="index" :prop="item.targetField" :label="item.targetName"></el-table-column>
<!-- 采集时间 --> <!-- 采集时间 -->
<el-table-column prop="receiveTime" :label="$t('message.deepFoundConfig.gatherTime')"></el-table-column> <el-table-column prop="receiveTime" :label="$t('message.deepFoundConfig.gatherTime')"></el-table-column>
@ -935,6 +939,7 @@ export default {
formType: '', // 1. 2. formType: '', // 1. 2.
editId: "", editId: "",
monitorTypeId: "", monitorTypeId: "",
relaId:'',
deepExcavationId: "", deepExcavationId: "",
activeImgUrl: "", activeImgUrl: "",
showAddImg: false, showAddImg: false,
@ -1189,17 +1194,17 @@ export default {
}, },
selectDeepExcavationCurrentData(){ selectDeepExcavationCurrentData(){
let data = { let data = {
// acquisitionTime
alarmState: this.alarmStatus2 ? this.alarmStatus2 : "", alarmState: this.alarmStatus2 ? this.alarmStatus2 : "",
measurePointNumber: this.devNum2, measurePointNumber: this.devNum2,
monitorTypeId: this.monitorTypeId, relaId: this.relaId,
projectSn: this.projectSn, projectSn: this.projectSn,
startTime: this.acquisitionTime.length>0 ? this.acquisitionTime[0]:'', startTime: this.acquisitionTime != null ? this.acquisitionTime[0]:'',
endTime: this.acquisitionTime.length>0 ? this.acquisitionTime[1]:'', endTime: this.acquisitionTime != null ? this.acquisitionTime[1]:'',
pageNo: this.pagInfo2.pageNo, pageNo: this.pagInfo2.pageNo,
pageSize: this.pagInfo2.pageSize pageSize: this.pagInfo2.pageSize
} }
selectDeepExcavationCurrentDataApi(data).then(res=>{ // selectDeepExcavationCurrentDataApi
selectDeepExcavationCurrentDataListApi(data).then(res=>{
console.log(res) console.log(res)
if(res.code == 200){ if(res.code == 200){
this.currentPointDetail = res.result.records this.currentPointDetail = res.result.records
@ -1249,7 +1254,7 @@ export default {
}) })
// data.thresholdList = this.testPointData // data.thresholdList = this.testPointData
// data.deepExcavationId = this.deepExcavationList[this.activeDeep].id // data.deepExcavationId = this.deepExcavationList[this.activeDeep].id
data.monitorTypeId = this.monitorTypeId data.relaId = this.relaId
// console.log(data) // console.log(data)
// data.sensorList = this.testPointForm // data.sensorList = this.testPointForm
console.log('新增参数',data) console.log('新增参数',data)
@ -1351,6 +1356,7 @@ export default {
selectDeepExcavationMonitorTypeListApi(data).then(res=>{ selectDeepExcavationMonitorTypeListApi(data).then(res=>{
if(res.code == 200){ if(res.code == 200){
console.log(res.result.records) console.log(res.result.records)
console.log('监测信息',res)
this.tableData = res.result.records this.tableData = res.result.records
this.pagInfo.total = res.result.total this.pagInfo.total = res.result.total
} }
@ -1656,7 +1662,7 @@ export default {
this.resetForm() this.resetForm()
}, },
previewDetail(val, type){ previewDetail(val, type){
this.monitorTypeId = val.id this.relaId = val.id
console.log(val) console.log(val)
if(type == 1){ if(type == 1){
this.selectMeasurePointList() this.selectMeasurePointList()
@ -1704,7 +1710,7 @@ export default {
let data = { let data = {
alarmState: this.alarmStatus ? this.alarmStatus:"", alarmState: this.alarmStatus ? this.alarmStatus:"",
measurePointNumber: this.devNum, measurePointNumber: this.devNum,
monitorTypeId: this.monitorTypeId, relaId: this.relaId,
pageNo: this.pagInfo.pageNo, pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize, pageSize: this.pagInfo.pageSize,
} }

View File

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