diff --git a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue index 98b8ca9..7653d56 100644 --- a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue +++ b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue @@ -379,13 +379,13 @@ export default { onLoad(o) { - if(o.length) { + if(o.id) { this.form.id = o?.id this.getInfo(o.id) - this.form.gatewayId = decodeURIComponent(o.scene) || '' } + this.form.gatewayId = decodeURIComponent(o.scene) || '' this.$areaId = this.user.$areaId - this.travelTypeDict = this.$dict.getDict('EP_travelType') + this.travelTypeDict = this.$dict.getDict('epidemicRecentTravel') this.getewayList() }, @@ -464,8 +464,8 @@ export default { } }).then(res => { if(res?.data) { - this.form.name = res.data.records?.[0].name - this.form.phone = res.data.records?.[0].phone + this.form.name = res.data.records?.[0]?.name || '' + this.form.phone = res.data.records?.[0]?.phone || '' } }) },