浏览代码

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 3 月之前
父节点
当前提交
cb5bd7d6f2

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

@@ -42,6 +42,7 @@
     statusConfigC,
   } from '../dedust.data';
   import List from '/@/views/vent/gas/components/list/index.vue';
+  import _ from 'lodash';
 
   const props = defineProps({
     deviceId: {
@@ -68,7 +69,7 @@
     return config.map((c) => {
       return {
         ...c,
-        value: _.get(c.prop, source),
+        value: _.get(source, c.prop),
         label: c.label,
       };
     });
@@ -125,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: '最低频率设置',

+ 1 - 1
src/views/vent/monitorManager/dedustMonitor/index.vue

@@ -147,7 +147,7 @@
   }
 
   async function getSysDataSource() {
-    const res = await getTableList({ strtype: 'dedustfan_normal', pagetype: 'normal' });
+    const res = await getTableList({ strtype: 'sys_surface_juejin', pagetype: 'normal' });
     if (!options.value && res) {
       // 初始时选择第一条数据
       options.value = res.records || [];