Просмотр исходного кода

[Fix 0000]数据中心设备监测页面bug修复

bobo04052021@163.com 4 месяцев назад
Родитель
Сommit
76c1d2c77e

+ 3 - 1
src/views/vent/dataCenter/deviceCenter/index.vue

@@ -145,7 +145,8 @@ const monitorTable = ref();
 const isRefresh = ref(true);
 const treeNodeTitle = ref(''); // 选中的树形标题
 const deviceList = ref<any[]>([]); // 设备列表
-const monitorList = ref({}); // 监测数据列表
+const monitorList = ref<Record<string, any[]>>({}); // 监测数据列表
+
 // 当前展开的行key数组
 const expandedRowKeys = ref([]);
 const scroll = reactive({
@@ -351,6 +352,7 @@ async function refreshData(deviceId: string) {
   const device = deviceList.value.find((d) => d.id === deviceId);
   const result = await getDevMonitorListById({ devId: deviceId.toString() });
   monitorList.value[deviceId] = Object.values(result.readData);
+  console.log(monitorList.value[deviceId], '123123');
 }
 
 onMounted(() => {

+ 1 - 1
src/views/vent/dataCenter/stationCenter/index.vue

@@ -106,7 +106,7 @@ const cardList = ref<any[]>(); //分站列表
 const deviceList = ref<any[]>([]);
 const openNum = ref(0);
 const clsoeNum = ref(0);
-const monitorList = ref({}); // 监测数据列表
+const monitorList = ref<Record<string, any[]>>({}); // 监测数据列表
 const expandedRowKeys = ref([]);
 const selectedIndex = ref(0);
 // // 分页参数