diff --git a/src/components/configure/RtuConfig.vue b/src/components/configure/RtuConfig.vue index 075a232..b45e434 100644 --- a/src/components/configure/RtuConfig.vue +++ b/src/components/configure/RtuConfig.vue @@ -401,27 +401,12 @@ export default { data() { return { - querySite: "2020081800", - rtuCode: "", - querySiteList: [], - siteNameList: [ - "遥测站设置", - "中心站设置", - "传感器型号选择", - "气象传感通信设置", - "工业相机设置", - "水文传感通信", - "从机设置", - "数据滤波", - "水位计", - "雨量计", - "流量计", - "蒸发皿", - "土壤沉降仪", - "4-20mA设置", - "其他设置" - ], - formAll: [], + querySite:'', + rtuCode:'', + querySiteList:[], + siteNameList:['遥测站设置','中心站设置','传感器型号选择','气象传感通信设置','工业相机设置','水文传感通信','从机设置', + '数据滤波','水位计','雨量计','流量计','蒸发皿','土壤沉降仪','4-20mA设置','其他设置'], + formAll:[], // siteNameList:[], formAllBody: [], activeIndex: "0", @@ -863,31 +848,27 @@ }); } }, - created() { - this.getSiteList().then(res => { - this.initPage(this.querySiteList[1]); + created(){ + this.getSiteList().then(res=>{ + this.initPage(this.querySiteList[0]); }); this.formControl(); }, - beforeRouteLeave(to, from, next) { - // 导航离开该组件的对应路由时调用 - // 可以访问组件实例 `this` - this.$confirm("请检查是否需要暂存!", "提示", { - confirmButtonText: "已暂存", - cancelButtonText: "取消", - type: "warning" - }) - .then(res => { - next(); - }) - .catch(() => {}); - } + // beforeRouteLeave (to, from, next) { + // // 导航离开该组件的对应路由时调用 + // // 可以访问组件实例 `this` + // this.$confirm("请检查是否需要暂存!", "提示", { + // confirmButtonText: "已暂存", + // cancelButtonText: "取消", + // type: "warning" + // }).then(res=>{ next() }).catch(() => {}); + // } };