diff --git a/src/views/edgeServer/edgeServerConfigure/device.vue b/src/views/edgeServer/edgeServerConfigure/device.vue index 5988e98..d5e8519 100644 --- a/src/views/edgeServer/edgeServerConfigure/device.vue +++ b/src/views/edgeServer/edgeServerConfigure/device.vue @@ -354,8 +354,11 @@ export default { server: { handler (val) { this.serverData = val - this.getDevice() - this.getDeviceStatus() + if(val.id){ + this.getDevice() + this.getDeviceStatus() + } + }, immediate: true } @@ -494,6 +497,7 @@ export default { } else { this.devicePointData = [] // 如果没有设备,防止显示上一次打开的设备数据先清空数据 this.defaultDeviceName = '' + this.nameSearchValue = '' } } catch (e) { console.log(e) @@ -503,6 +507,7 @@ export default { this.deviceActiveStatus = e this.devicePointData = [] // 当切换设备时把保存configure、point的数据清空 this.defaultDeviceName = '' + this.nameSearchValue = '' const deviceData = await this.$api.GET_DEVICE_CONFIGURE( this.deviceData[e].id )