Browse Source

[Mod 0000] 瓦斯管网表格定位传参修改以及表头修改

houzekong 4 days ago
parent
commit
cda55e4d20

+ 1 - 0
src/views/vent/gas/gasPipeNet/index.vue

@@ -115,6 +115,7 @@
   }
 
   const actions = getActions();
+
   function goLocation(record) {
     // debugger;
     actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });

+ 14 - 8
src/views/vent/monitorManager/comment/GasPipeTable.vue

@@ -41,6 +41,9 @@
       <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">
         {{ record.netStatus == '0' ? '断开' : '连接' }}
       </a-tag>
+      <span v-if="column.dataIndex === 'isLeakage'" :color="record.isLeakage == '0' ? 'green' : '#f00'">
+        {{ record.isLeakage == '0' ? '未泄露' : `${record.ld_x}m处泄露` }}
+      </span>
     </template>
   </MonitorTable>
   <!-- <DeviceBaseInfo @register="registerModal" device-type="gaspipe" /> -->
@@ -84,25 +87,28 @@
   function getDataSource() {
     getGasDeviceInfo({ devicetype: 'gasmonitor', pagetype: 'normal' }).then((res) => {
       dataSource.value = get(res, 'msgTxt[0].datalist', []).map((e) => {
-        const item = {};
         const start = {
           ...e.start.readData,
-          strinstallpos: e.start.strinstallpos,
+          ...e.start,
           readData: null,
         };
         const end = {
           ...e.end.readData,
-          strinstallpos: e.end.strinstallpos,
+          ...e.end,
           readData: null,
         };
-        forEach(start, (val, key) => {
-          item[`${key}_start`] = val;
-        });
+        const gasGlFaultDia = JSON.parse(e.gasGlFaultDia);
+
         forEach(end, (val, key) => {
-          item[`${key}_end`] = val;
+          end[`${key}_end`] = val;
+          delete end[key];
         });
 
-        return item;
+        return {
+          ...start,
+          ...end,
+          ...gasGlFaultDia,
+        };
       });
     });
   }

+ 25 - 30
src/views/vent/monitorManager/comment/comment.data.ts

@@ -1071,59 +1071,54 @@ export const gasPipeColumns: BasicColumn[] = [
     children: [
       {
         title: '管道位置',
-        dataIndex: 'strinstallpos_start',
-        key: 'strinstallpos_start',
+        dataIndex: 'strinstallpos',
+        key: 'strinstallpos',
       },
       {
         title: '二氧化碳(%)',
-        dataIndex: 'co2val_start',
-        key: 'co2val_start',
+        dataIndex: 'co2val',
+        key: 'co2val',
       },
       {
         title: '一氧化碳(%)',
-        dataIndex: 'coval_start',
-        key: 'coval_start',
+        dataIndex: 'coval',
+        key: 'coval',
       },
       // {
       //   title: '负压(Pa)',
-      //   dataIndex: 'fyVal_start',
-      //   key: 'fyVal_start',
+      //   dataIndex: 'fyVal',
+      //   key: 'fyVal',
       // },
       // {
       //   title: '瓦斯抽采浓度(%)',
-      //   dataIndex: 'gasC_start',
-      //   key: 'gasC_start',
+      //   dataIndex: 'gasC',
+      //   key: 'gasC',
       // },
       // {
       //   title: '瓦斯抽采混量',
-      //   dataIndex: 'gasMixMass_start',
-      //   key: 'gasMixMass_start',
+      //   dataIndex: 'gasMixMass',
+      //   key: 'gasMixMass',
       // },
       // {
       //   title: '瓦斯抽采纯量',
-      //   dataIndex: 'gasMass_start',
-      //   key: 'gasMass_start',
+      //   dataIndex: 'gasMass',
+      //   key: 'gasMass',
       // },
       {
         title: '累计抽采量',
-        dataIndex: 'gasTotalMass_start',
-        key: 'gasTotalMass_start',
+        dataIndex: 'gasTotalMass',
+        key: 'gasTotalMass',
       },
       {
         title: '管道流量',
-        dataIndex: 'gdlyVal_start',
-        key: 'gdlyVal_start',
+        dataIndex: 'gdlyVal',
+        key: 'gdlyVal',
       },
       {
         title: '管道绝对温度',
-        dataIndex: 'gdjdwdVal_start',
-        key: 'gdjdwdVal_start',
+        dataIndex: 'gdjdwdVal',
+        key: 'gdjdwdVal',
       },
-      // {
-      //   title: '是否泄露',
-      //   dataIndex: 'isLeakage_start',
-      //   key: 'isLeakage_start',
-      // },
     ],
   },
   {
@@ -1179,11 +1174,11 @@ export const gasPipeColumns: BasicColumn[] = [
         dataIndex: 'gdjdwdVal_end',
         key: 'gdjdwdVal_end',
       },
-      // {
-      //   title: '是否泄露',
-      //   dataIndex: 'isLeakage_end',
-      //   key: 'isLeakage_end',
-      // },
     ],
   },
+  {
+    title: '是否泄露',
+    dataIndex: 'isLeakage',
+    key: 'isLeakage',
+  },
 ];