Ver Fonte

[Feat 0000] 除尘风机状态字段修改

houzekong há 3 meses atrás
pai
commit
c4b138579c

+ 7 - 0
src/views/vent/monitorManager/dedustMonitor/components/DedustHome.vue

@@ -70,6 +70,13 @@
   // 将列表配置项转换为列表可用的prop
   function transConfigToProp(config, source) {
     return config.map((c) => {
+      if (c.type === 'default' && c.status) {
+        return {
+          ...c,
+          value: c.status.find((e) => _.get(source, c.prop) === e.value)?.label,
+          label: c.label,
+        };
+      }
       return {
         ...c,
         value: _.get(source, c.prop),

+ 35 - 9
src/views/vent/monitorManager/dedustMonitor/dedust.data.ts

@@ -70,6 +70,10 @@ export const dedustStatusConfigA = [
   {
     prop: 'CBStatus',
     label: '运行状态',
+    status: [
+      { value: '1', label: '' },
+      { value: '0', label: '' },
+    ],
   },
   // {
   //   prop: 'EquipmentFault',
@@ -86,6 +90,10 @@ export const dedustStatusConfigA = [
   {
     prop: 'ContorlPSError',
     label: '控制电源故障',
+    status: [
+      { value: '1', label: '' },
+      { value: '0', label: '' },
+    ],
   },
   {
     prop: 'VFDFault',
@@ -124,26 +132,43 @@ export const dedustStatusConfigB = [
 /** 激活与否相关配置 */
 export const dedustStatusConfigC = [
   {
-    prop: 'WindPowerLock',
-    label: '风电闭锁',
-  },
-  {
-    prop: 'GasLock',
-    label: '瓦斯闭锁',
-  },
-  {
     prop: 'Contactorstatus',
     label: '进线接触器KM1',
+    status: [
+      // 0 闭合 1 断开
+      { value: '1', label: '断开' },
+      { value: '0', label: '闭合' },
+    ],
   },
   {
     prop: 'GasLock3_0',
     status: [
-      { value: '1', label: '闭锁' },
+      // 0 正常 1 闭锁
       { value: '0', label: '正常' },
+      { value: '1', label: '闭锁' },
     ],
     label: '瓦斯3.0',
   },
   {
+    type: 'default',
+    prop: 'WindPowerLock',
+    label: '风电闭锁',
+    status: [
+      { value: '1', label: '闭合' },
+      { value: '0', label: '断开' },
+    ],
+  },
+  {
+    type: 'default',
+    prop: 'GasLock',
+    label: '瓦斯闭锁',
+    status: [
+      { value: '1', label: '闭合' },
+      { value: '0', label: '断开' },
+    ],
+  },
+  {
+    type: 'default',
     prop: 'ManualAutoSelect',
     status: [
       { value: '1', label: '自动' },
@@ -152,6 +177,7 @@ export const dedustStatusConfigC = [
     label: '手动自动',
   },
   {
+    type: 'default',
     prop: 'RemLocselectstate',
     status: [
       { value: '1', label: '远控' },