From d5dfbd12f9d9a3728ccefe1983427f3b8b2fa381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=86=E4=B9=90?= <342503599@qq.com> Date: Thu, 18 Aug 2022 18:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=B1=E5=9F=BA=E5=9D=91=E7=B3=BB=E7=BB=9F(?= =?UTF-8?q?=E5=9F=BA=E5=9D=91=E9=85=8D=E7=BD=AE):=E6=B5=8B=E7=82=B9?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/http.js | 4 +- src/store/index.js | 8 +- .../deepFoundationPitManage/dataConfig.vue | 207 +++++++++--------- 3 files changed, 110 insertions(+), 109 deletions(-) diff --git a/src/assets/js/http.js b/src/assets/js/http.js index c659fa9c..fd863c2f 100644 --- a/src/assets/js/http.js +++ b/src/assets/js/http.js @@ -40,8 +40,8 @@ if (process.env.NODE_ENV == 'development') { // axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南 // tag: 本地 // axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地 - axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1 - // axios.defaults.baseURL = 'http://192.168.34.216:6023/' // 邱平毅本地 +// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1 + axios.defaults.baseURL = 'http://192.168.34.216:6023/' // 邱平毅本地 // axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地 // axios.defaults.baseURL = 'http://47.97.202.104:6023/'; // axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇 diff --git a/src/store/index.js b/src/store/index.js index 0f8baa6f..0df9a857 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -45,16 +45,16 @@ export default new Vuex.Store({ // UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试 // FILEURL:'http://10.0.1.43:6023/image/',//测试 BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', // - UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', // - FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口 + // UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', // + // FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口 /* 2022-05-16 */ // tag: 部署河南项目时,需要打开这两行代码 // UPLOADURL: 'http://124.71.178.44:100/upload/image', // FILEURL: 'http://124.71.178.44:100/image/', /* 2022-06-06 杨意本地的*/ // BASEURL:'http://192.168.34.174:6023/', - // UPLOADURL: 'http://192.168.34.125:6023/upload/image', - // FILEURL: 'http://192.168.34.125:6023/image/', + UPLOADURL: 'http://192.168.34.125:6023/upload/image', + FILEURL: 'http://192.168.34.125:6023/image/', // 邱平毅的 // UPLOADURL: 'http://192.168.34.216:6023/upload/image', // FILEURL: 'http://192.168.34.216:6023/image/', diff --git a/src/views/projectFront/deepFoundationPitManage/dataConfig.vue b/src/views/projectFront/deepFoundationPitManage/dataConfig.vue index f1339838..45e3995d 100644 --- a/src/views/projectFront/deepFoundationPitManage/dataConfig.vue +++ b/src/views/projectFront/deepFoundationPitManage/dataConfig.vue @@ -343,8 +343,8 @@ - - + + - - @@ -517,13 +517,14 @@ --> -
- - +
+
+ + - - - + + + + + + + + + + + + + + + + + +
添加 - 删除 - - - - - - - - - - - - - - - - - - - - - - - - + + + +
@@ -841,11 +814,20 @@ export default { total: 1 }, testPointForm:{ - measurePointNumber: '', - measurePointName: '', - measurePointAddr: '', - acquisitionInstrumentNumber: '', - sensorTypeId: '' + measurePointNumber: '',// 测点编号 + measurePointName: '',// 测点名称 + measurePointAddr: '', // 测点位置 + // sensorSn: '', + // sensorTypeId: '', + sensorList:[ + { + sensorSn:'', // 传感器编号 + sensorTypeId:'', // 传感器类型 + earlyWarningValue:'', // 预警 + alarmValue:'', //报警 + controlValue:'',//控制 + } + ], // 传感器编号类型数组 }, dialogVisible: false, dialogVisible2: false, @@ -895,19 +877,13 @@ export default { measurePointAddr: [ { required: true, message: '请输入测点位置', trigger: 'blur' } ], - acquisitionInstrumentNumber: [ + sensorSn: [ { required: true, message: '请输入采集仪编号', trigger: 'blur' } ], sensorTypeId: [ { required: true, message: '请选择传感器类型', trigger: 'change' } ], }, - sensorList:[ - { - acquisitionInstrumentNumber:'', - sensorTypeId:'', - } - ], // 传感器编号类型数组 dialogdata:{ engineeringName: "", // projectAddress: "", @@ -976,13 +952,17 @@ export default { methods:{ addRow(){ let obj = { - acquisitionInstrumentNumber:'', + sensorSn:'', sensorTypeId:'', + earlyWarningValue:'', // 预警 + alarmValue:'', //报警 + controlValue:'',//控制 } - this.sensorList.push(obj) + // console.log('--------------',this.testPointForm.sensorList) + this.testPointForm.sensorList.push(obj) }, - deleteRow(){ - this.sensorList.pop(); + deleteRow(index){ + this.testPointForm.sensorList.splice(index, 1); }, checkMsg(){ // 1、布置图 2、测点 @@ -1253,25 +1233,27 @@ export default { this.$refs['testPointForm'].validate((valid) => { if (valid) { let data = this.testPointForm - this.testPointData.forEach(item=>{ - if(item.alarmValue == " "){ + this.testPointForm.sensorList.forEach(item=>{ + if(item.alarmValue == ""){ item.alarmValue = 0 } - if(item.warningValue == " "){ - item.warningValue = 0 + if(item.earlyWarningValue == ""){ + item.earlyWarningValue = 0 } - if(item.controlValue == " "){ + if(item.controlValue == ""){ item.controlValue = 0 } }) - data.thresholdList = this.testPointData - data.deepExcavationId = this.deepExcavationList[this.activeDeep].id + // data.thresholdList = this.testPointData + // data.deepExcavationId = this.deepExcavationList[this.activeDeep].id data.monitorTypeId = this.monitorTypeId - console.log(data) + // console.log(data) + // data.sensorList = this.testPointForm + console.log('新增参数',data) addDeepExcavationMeasurePointApi(data).then(res=>{ - console.log(res) + console.log('新增成功没',res) if(res.code == 200 && res.success){ // 新增成功! this.$message.success(this.$t('message.deepFoundConfig.addSuccess2')) @@ -1307,16 +1289,22 @@ export default { measurePointNumber: '', measurePointName: '', measurePointAddr: '', - acquisitionInstrumentNumber: '', - sensorTypeId: '' - } + sensorList:[ + { + sensorSn:'', // 传感器编号 + sensorTypeId:'', // 传感器类型 + earlyWarningValue:'', // 预警 + alarmValue:'', //报警 + controlValue:"",//控制 + } + ], + }, this.isPreview = false this.$refs['testPointForm'].resetFields() - this.testPointData.forEach(item=>{ - item.alarmValue = 0 - item.warningValue = 0 - item.controlValue = 0 - item.openType = 2 + this.testPointForm.sensorList.forEach(item=>{ + item.alarmValue = '' + item.earlyWarningValue = '' + item.controlValue = '' }) this.selectMeasurePointList() // this.testPointData = this.testPointData @@ -1695,13 +1683,16 @@ export default { let data = { alarmState: this.alarmStatus ? this.alarmStatus:"", measurePointNumber: this.devNum, - monitorTypeId: this.monitorTypeId + monitorTypeId: this.monitorTypeId, + pageNo: this.pagInfo.pageNo, + pageSize: this.pagInfo.pageSize, } + selectMeasurePointListApi(data).then(res=>{ console.log(res) if(res.code == 200){ - // surveyPointDetail - this.surveyPointDetail = res.result + console.log('====查询测点管理的列表',res) + this.surveyPointDetail = res.result.records } }) }, @@ -1848,6 +1839,16 @@ export default {