名称
- {{ deviceInfo.name }}
+ {{ deviceInfo && deviceInfo.name }}
类型
- {{ deviceInfo.type }}
+ {{ deviceInfo && deviceInfo.type }}
状态
- {{ deviceInfo.status }}
+ {{ deviceInfo && deviceInfo.status }}
@@ -21,14 +21,11 @@
import TopDiv from "./TopDiv.vue";
import bimStore from '@/store/modules/bim';
const data = reactive({
- deviceInfo: {
- name: '立仓',
- type: '生产设备',
- status:'启用',
-}
+ deviceInfo: {}
});
const { deviceInfo } = toRefs(data);
+watch(() => bimStore().activateDevice.info, value => deviceInfo.value = value);
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/views/bim/bimHome/components/DeviceInfoDialog.vue b/src/views/bim/bimHome/components/DeviceInfoDialog.vue
index 8934329..e8c190d 100644
--- a/src/views/bim/bimHome/components/DeviceInfoDialog.vue
+++ b/src/views/bim/bimHome/components/DeviceInfoDialog.vue
@@ -1,8 +1,11 @@