浏览代码

[Feat 0000] 除尘风机智能监测页面数据对接

houzekong 3 月之前
父节点
当前提交
afaa3b22e5

+ 8 - 4
src/views/vent/monitorManager/dedustMonitor/components/DedustHome.vue

@@ -69,7 +69,7 @@
     return config.map((c) => {
       return {
         ...c,
-        value: _.get(c.prop, source),
+        value: _.get(source, c.prop),
         label: c.label,
       };
     });
@@ -126,9 +126,13 @@
 
   async function getDataSource(systemID) {
     const res = await list({ devicetype: 'sys', systemID, type: 'all' });
-    deviceInfo.value = res.deviceInfo;
-    workFaceHistorySource.value = res['sysInfo']['history'];
-    workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
+    res.deviceInfo.dedustefan.datalist.forEach((e: any) => {
+      Object.assign(e, e.readData);
+      e.readData = null;
+    });
+    deviceInfo.value = _.get(res, 'deviceInfo.dedustefan.datalist[0]', {});
+    workFaceHistorySource.value = res.sysInfo.history;
+    workFaceSource.value = Object.assign(res.sysInfo, res.sysInfo.readData);
     loading.value = false;
   }
 

+ 4 - 0
src/views/vent/monitorManager/dedustMonitor/dedust.data.ts

@@ -6,6 +6,10 @@ export const statusConfigB = [{ value: 1, label: '报警' }, { label: '正常' }
 export const statusConfigC = [{ value: 1, label: '激活' }, { label: '接触' }];
 
 export const dedustMonitorConfig = [
+  {
+    prop: 'warnDes',
+    label: '报警描述',
+  },
   // {
   //   prop: 'FrequencySetPointZD',
   //   label: '最低频率设置',