修复切换设备时节点筛选框有值会显示出来

This commit is contained in:
wu
2022-08-25 10:50:05 +08:00
parent 2a8f4377ff
commit 7c022ac307

View File

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