diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue index 29feb81b..411f9696 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue @@ -122,12 +122,15 @@ export default { }, async created() { // if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883'; - + if(this.dialogData){ + this.data = { + ...this.dialogData, + } + } let deviceInfo = await this.getDeviceInfo(); this.data = { - ...this.dialogData, roadName: null, - deviceStateLiteral: deviceInfo.data.formatValue.deviceState, + deviceStateLiteral: deviceInfo?.data.formatValue.deviceState, }; // console.log(