diff --git a/config/index.js b/config/index.js index fbac51d..cd4a791 100644 --- a/config/index.js +++ b/config/index.js @@ -70,7 +70,7 @@ "/IotPc": { // 物联网平台端信息汇总 // 'target': 'http://192.168.16.115:8288', // 接口域名 - target: "http://192.168.16.100:8289", // 接口域名 + target: "http://132.232.115.20:8289", // 接口域名 changeOrigin: true, //是否跨域 pathRewrite: { "^/IotPc": "" //需要rewrite重写的, diff --git a/config/index.js b/config/index.js index fbac51d..cd4a791 100644 --- a/config/index.js +++ b/config/index.js @@ -70,7 +70,7 @@ "/IotPc": { // 物联网平台端信息汇总 // 'target': 'http://192.168.16.115:8288', // 接口域名 - target: "http://192.168.16.100:8289", // 接口域名 + target: "http://132.232.115.20:8289", // 接口域名 changeOrigin: true, //是否跨域 pathRewrite: { "^/IotPc": "" //需要rewrite重写的, diff --git a/src/components/configure/RtuConfig.vue b/src/components/configure/RtuConfig.vue index 13e6ecc..1f7b5f9 100644 --- a/src/components/configure/RtuConfig.vue +++ b/src/components/configure/RtuConfig.vue @@ -401,27 +401,12 @@ export default { data() { return { - querySite: "", - rtuCode: "", - querySiteList: [], - siteNameList: [ - "遥测站设置", - "中心站设置", - "传感器型号选择", - "气象传感通信设置", - "工业相机设置", - "水文传感通信", - "从机设置", - "数据滤波", - "水位计", - "雨量计", - "流量计", - "蒸发皿", - "土壤沉降仪", - "4-20mA设置", - "其他设置" - ], - formAll: [], + querySite:'', + rtuCode:'', + querySiteList:[], + siteNameList:['遥测站设置','中心站设置','传感器型号选择','气象传感通信设置','工业相机设置','水文传感通信','从机设置', + '数据滤波','水位计','雨量计','流量计','蒸发皿','土壤沉降仪','4-20mA设置','其他设置'], + formAll:[], // siteNameList:[], formAllBody: [], activeIndex: "0", @@ -439,13 +424,17 @@ }, temStorageEcho() { // this.activeIndex = '0' - + if(localStorage.getItem(name)){ + this.formAll = JSON.parse(localStorage.getItem(name)); + this.$message({ message: '暂存回显成功', type: "success" }); + } else{ + this.$message({ message: '无暂存内容', type: "warning" }); + } // console.log(JSON.parse(sessionStorage.getItem(name)),111) - this.formAll = JSON.parse(sessionStorage.getItem(name)); }, temStorage() { try { - sessionStorage.setItem(name, JSON.stringify(this.formAll)); + localStorage.setItem(name, JSON.stringify(this.formAll)); this.$message({ message: `保存成功`, type: "success" }); } catch (err) { this.$message({ message: err, type: "warning" }); @@ -863,12 +852,12 @@ }); } }, - created() { - this.getSiteList().then(res => { + created(){ + this.getSiteList().then(res=>{ this.initPage(this.querySiteList[0]); }); this.formControl(); - } + }, // beforeRouteLeave (to, from, next) { // // 导航离开该组件的对应路由时调用 // // 可以访问组件实例 `this` @@ -881,104 +870,127 @@ };