From 841034a7adf2cbe85bfabbae3adfeb3a5612ef0a Mon Sep 17 00:00:00 2001
From: shijingjing <1789544664@qq.com>
Date: Thu, 29 Sep 2022 17:58:50 +0800
Subject: [PATCH] bug
---
.../AppGetewayRegister/getewayAdd.vue | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue
index fffb3bc..baa7af2 100644
--- a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue
+++ b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue
@@ -12,7 +12,7 @@
卡口选择
@@ -368,6 +368,7 @@ export default {
startAreaName: '',
pageShow: false,
scene: '',
+ gatewayName: '',
}
},
@@ -384,24 +385,25 @@ export default {
this.form.id = o?.id
this.getInfo(o.id)
}
- this.scene = decodeURIComponent(o.scene) || ''
+ this.scene = decodeURIComponent(o.scene).toString() || ''
},
onShow() {
this.$dict.load(['EP_travelType']).then(()=> {
this.travelTypeDict = this.$dict.getDict('EP_travelType')
this.$areaId = this.user.$areaId
this.getewayList()
- // setTimeout(()=>{
- // const demo = this.getewayData.filter(item => item.value == '3abdd8ed4db74239a97af2fd7b1c16ae')
- // console.log(demo,'111');
- // },400)
+ setTimeout(()=>{
+ if(this.scene.length) {
+ this.form.gatewayId = this.scene
+ this.form.gatewayName = this.getewayData.filter(item=> item.value == this.scene)?.[0].label || ''
+ }
+ }, 400)
if(!this.token) {
this.$refs.login.show()
} else {
this.pageShow = true
}
})
-
},
watch: {
@@ -420,7 +422,7 @@ export default {
this.$nextTick(() => {
this.token && this.getUserInfo()
this.form.gatewayId = this.scene
- this.form.gatewayName = this.getewayData.filter(v=> v.value== this.scene)?.[0].label
+ this.form.gatewayName = this.getewayData.filter(item=> item.value == this.scene)?.[0].label || ''
this.pageShow = true
})
},