Browse Source

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

lxh 2 months ago
parent
commit
1505e2db59

+ 217 - 0
src/views/vent/bundle/bundleMonitorTable/bundle-table.data.ts

@@ -630,3 +630,220 @@ export const Bdcolumns: BasicColumn[] = [
     align: 'center',
   },
 ];
+export const Bltcolumns: BasicColumn[] = [
+  {
+    title: '序号',
+    width: 80,
+    align: 'center',
+    dataIndex: 'xh',
+    key: 'xh',
+  },
+  {
+    title: '管号',
+    width: 80,
+    align: 'center',
+    dataIndex: 'gh',
+    key: 'gh',
+  },
+  {
+    title: '管路名称',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 130,
+    align: 'center',
+  },
+  {
+    title: 'COppm',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'co_max',
+        key: 'co_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'co_min',
+        key: 'co_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'co_ave',
+        key: 'co_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'CO₂%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'co2_max',
+        key: 'co2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'co2_min',
+        key: 'co2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'co2_ave',
+        key: 'co2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'O₂%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'o2_max',
+        key: 'o2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'o2_min',
+        key: 'o2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'o2_ave',
+        key: 'o2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'CH₄%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'ch4_max',
+        key: 'ch4_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'ch4_min',
+        key: 'ch4_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'ch4_ave',
+        key: 'ch4_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'N₂%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'n2_max',
+        key: 'n2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'n2_ave',
+        key: 'n2_ave',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'n2_ave',
+        key: 'n2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'C₂H₂%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'c2h2_max',
+        key: 'c2h2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'c2h2_min',
+        key: 'c2h2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'c2h2_ave',
+        key: 'c2h2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: 'C₂H₄%',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'c2h4_max',
+        key: 'c2h4_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'c2h4_min',
+        key: 'c2h4_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'c2h4_ave',
+        key: 'c2h4_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '煤自燃阶段',
+    dataIndex: 'internalFireWarnLevel',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 100,
+    align: 'center',
+  },
+];

+ 112 - 1
src/views/vent/bundle/bundleMonitorTable/index.vue

@@ -50,7 +50,7 @@
 
 <script setup lang="ts">
 import { ref, onMounted, computed, shallowRef, reactive, nextTick } from 'vue';
-import { columns, Hjtcolumns, Bdcolumns } from './bundle-table.data';
+import { columns, Hjtcolumns, Bdcolumns, Bltcolumns } from './bundle-table.data';
 import { getBundleInfoList, getAllFileList, getAllFileListById } from './bundle-table.api';
 import customHeader from '/@/components/vent/customHeader.vue';
 // import { blastDelta } from './modal/blastDelta.vue';
@@ -88,6 +88,8 @@ const computedColumns = computed(() => {
       return Hjtcolumns; // 活鸡兔对应的列配置
     case 'sdmtjtBdmk':
       return Bdcolumns; // 保德对应的列配置
+    case 'sdmtjtbltmk':
+      return Bltcolumns; // 补连塔对应的列配置
     default:
       return columns; // 默认情况下返回的列配置
   }
@@ -421,6 +423,115 @@ function updateChart(data: any) {
             type: 'bar',
           },
         ];
+      case 'sdmtjtBltmk':
+        return [
+          {
+            name: 'O₂最大值',
+            data: o2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'O₂最小值',
+            data: o2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'O₂平均值',
+            data: o2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂最大值',
+            data: n2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂最小值',
+            data: n2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂平均值',
+            data: n2AveValues,
+            type: 'bar',
+          },
+
+          {
+            name: 'CO最大值',
+            data: coMaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO最小值',
+            data: coMinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO平均值',
+            data: coAveValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂最大值',
+            data: co2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂最小值',
+            data: co2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂平均值',
+            data: co2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄最大值',
+            data: ch4MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄最小值',
+            data: ch4MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄平均值',
+            data: ch4AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄最大值',
+            data: c2h4MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄最小值',
+            data: c2h4MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄平均值',
+            data: c2h4AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂最大值',
+            data: c2h2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂最小值',
+            data: c2h2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂平均值',
+            data: c2h2AveValues,
+            type: 'bar',
+          },
+        ];
       default:
         return [
           {

+ 151 - 0
src/views/vent/dust/dustMonitorTable/dust-table.data.ts

@@ -426,6 +426,91 @@ export const Bdcolumns = [
     align: 'center',
   },
 ];
+export const Bltcolumns = [
+  {
+    title: '序号',
+    width: 60,
+    align: 'center',
+    dataIndex: 'xh',
+  },
+  {
+    title: '工作面',
+    dataIndex: 'gzm',
+    key: 'gzm',
+    width: 150,
+    align: 'center',
+  },
+  {
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 150,
+    align: 'center',
+  },
+  {
+    title: '生产工艺',
+    dataIndex: 'scgy',
+    key: 'scgy',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '粉尘浓度(mg/m³)',
+    width: 100,
+    align: 'center',
+    children: [
+      {
+        title: '总粉尘',
+        dataIndex: 'sc_zcds',
+        key: 'sc_zcds',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '呼吸性粉尘',
+        dataIndex: 'sc_hcds',
+        key: 'sc_hcds',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '防尘措施',
+    dataIndex: 'fccs',
+    key: 'fccs',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '测尘日期',
+    dataIndex: 'ccrq',
+    key: 'ccrq',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '测尘人',
+    dataIndex: 'ccr',
+    key: 'ccr',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '测尘仪编号',
+    dataIndex: 'ccybh',
+    key: 'ccybh',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '备注',
+    dataIndex: 'smark',
+    key: 'smark',
+    width: 80,
+    align: 'center',
+  },
+];
 //监测字段
 export const fieldMapping = {
   sc_zcds: '总尘-作业工序-生产(短时间监测浓度,mg/m³)',
@@ -463,6 +548,10 @@ export const fieldBdMapping = {
   qc: '总尘(粉尘浓度,mg/m³)',
   hc: '呼尘(粉尘浓度,mg/m³)',
 };
+export const fieldBltMapping = {
+  sc_zcds: '总尘(粉尘浓度,mg/m³)',
+  sc_hcds: '呼尘(粉尘浓度,mg/m³)',
+};
 // 检测地点
 export const dataColumns = [
   {
@@ -626,6 +715,37 @@ export const dataBdColumns = [
     key: 'zyhj',
   },
 ];
+export const dataBltColumns = [
+  {
+    title: '监测字段',
+    align: 'center',
+    dataIndex: 'key',
+    key: 'key',
+    width: 100,
+    customRender: ({ text }) => fieldBltMapping[text] || text,
+  },
+  {
+    title: '最大值',
+    dataIndex: 'value',
+    align: 'center',
+    width: 100,
+    key: 'value',
+  },
+  {
+    width: 100,
+    align: 'center',
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+  },
+  {
+    width: 100,
+    align: 'center',
+    title: '作业环境(工序)',
+    dataIndex: 'scgy',
+    key: 'scgy',
+  },
+];
 // 当日情况粉尘情况分析
 export const AllDataColumns = [
   {
@@ -803,3 +923,34 @@ export const AllDataBdColumns = [
     key: 'zyhj',
   },
 ];
+export const AllDataBltColumns = [
+  {
+    title: '监测字段',
+    align: 'center',
+    dataIndex: 'key',
+    key: 'key',
+    width: 100,
+    customRender: ({ text }) => fieldBltMapping[text] || text,
+  },
+  {
+    title: '最大值',
+    dataIndex: 'value',
+    align: 'center',
+    width: 100,
+    key: 'value',
+  },
+  {
+    width: 100,
+    align: 'center',
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+  },
+  {
+    width: 100,
+    align: 'center',
+    title: '作业环境(工序)',
+    dataIndex: 'scgy',
+    key: 'scgy',
+  },
+];

+ 42 - 0
src/views/vent/dust/dustMonitorTable/index.vue

@@ -68,16 +68,19 @@ import {
   Swcolumns,
   Hjtcolumns,
   Bdcolumns,
+  Bltcolumns,
   dataColumns,
   dataDltColumns,
   dataSwColumns,
   dataHjtColumns,
   dataBdColumns,
+  dataBltColumns,
   AllDataColumns,
   AllDataDltColumns,
   AllDataSwColumns,
   AllDataHjtColumns,
   AllDataBdColumns,
+  AllDataBltColumns,
 } from './dust-table.data';
 import { getDustInfoList, getAllFileList, getAllFileListById } from './dsut-table.api';
 import customHeader from '/@/components/vent/customHeader.vue';
@@ -120,6 +123,8 @@ const computedColumns = computed(() => {
       return Hjtcolumns; // 活鸡兔对应的列配置
     case 'sdmtjtBdmk':
       return Bdcolumns; // 保德对应的列配置
+    case 'sdmtjtbltmk':
+      return Bltcolumns; // 补连塔对应的列配置
     default:
       return columns; // 默认情况下返回的列配置
   }
@@ -136,6 +141,8 @@ const AllDataComputedColumns = computed(() => {
       return AllDataHjtColumns; // 活鸡兔对应的列配置
     case 'sdmtjtBdmk':
       return AllDataBdColumns; // 保德对应的列配置
+    case 'sdmtjtbltmk':
+      return AllDataBltColumns; // 补连塔对应的列配置
     default:
       return AllDataColumns; // 默认情况下返回的列配置
   }
@@ -152,6 +159,8 @@ const DataComputedColumns = computed(() => {
       return dataHjtColumns; // 活鸡兔对应的列配置
     case 'sdmtjtBdmk':
       return dataBdColumns; // 保德对应的列配置
+    case 'sdmtjtbltmk':
+      return dataBltColumns; // 补连塔对应的列配置
     default:
       return dataColumns; // 默认情况下返回的列配置
   }
@@ -185,6 +194,9 @@ async function getTableListById(params: any) {
 function processTableData(data: any) {
   // 根据 gzcs 字段进行分组
   const groupedData = data.reduce((acc: any, item: any) => {
+    if (sysOrgCode === 'sdmtjtbltmk') {
+      item.gzcs = item.gzm;
+    }
     const workplace = item.gzcs;
     if (!acc[workplace]) {
       acc[workplace] = [];
@@ -232,6 +244,10 @@ function processTableData(data: any) {
       { key: 'qc', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
       { key: 'hc', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
     ];
+    const BltMaxValues = [
+      { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: workplace },
+      { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: workplace },
+    ];
     items.forEach((item: any) => {
       maxValues.forEach((maxValue) => {
         if (item[maxValue.key] > maxValue.value) {
@@ -277,6 +293,15 @@ function processTableData(data: any) {
           maxValue.gzcs = item.gzcs;
         }
       });
+      BltMaxValues.forEach((maxValue) => {
+        if (item[maxValue.key] > maxValue.value) {
+          maxValue.value = item[maxValue.key];
+          maxValue.gz = item.gz;
+          maxValue.jcdd = item.jcdd;
+          maxValue.scgy = item.scgy;
+          maxValue.gzcs = item.gzcs;
+        }
+      });
     });
     switch (sysOrgCode) {
       case 'sdmtjtbetmk':
@@ -289,6 +314,8 @@ function processTableData(data: any) {
         return HjtMaxValues; // 活鸡兔对应的列配置
       case 'sdmtjtBdmk':
         return BdMaxValues; // 保德对应的列配置
+      case 'sdmtjtbltmk':
+        return BltMaxValues; // 补连塔对应的列配置
       default:
         return maxValues; // 默认情况下返回的列配置
     }
@@ -336,6 +363,10 @@ function processTableData(data: any) {
     { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
     { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
   ];
+  const overallBltMaxValues = [
+    { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: '' },
+    { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: '' },
+  ];
   data.forEach((item: any) => {
     overallMaxValues.forEach((maxValue) => {
       if (item[maxValue.key] > maxValue.value) {
@@ -382,6 +413,15 @@ function processTableData(data: any) {
         maxValue.gzcs = item.gzcs;
       }
     });
+    overallBltMaxValues.forEach((maxValue) => {
+      if (item[maxValue.key] > maxValue.value) {
+        maxValue.value = item[maxValue.key];
+        maxValue.gz = item.gz;
+        maxValue.jcdd = item.jcdd;
+        maxValue.scgy = item.scgy;
+        maxValue.gzcs = item.gzcs;
+      }
+    });
   });
   AllMaxValues = computed(() => {
     switch (sysOrgCode) {
@@ -395,6 +435,8 @@ function processTableData(data: any) {
         return overallHjtMaxValues; // 活鸡兔对应的列配置
       case 'sdmtjtBdmk':
         return overallBdMaxValues; // 保德对应的列配置
+      case 'sdmtjtbltmk':
+        return overallBltMaxValues; // 补连塔对应的列配置
       default:
         return overallMaxValues; // 默认情况下返回的列配置
     }

+ 11 - 3
src/views/vent/home/clique/index.vue

@@ -23,7 +23,13 @@
               <iconLight @show-detail="showDetail" :warningList="warningList" />
             </div>
           </div>
-          <div :class="{ 'realtime-mode': isDataRealTime }" alt="切换数据模式" class="switch-button report-mode" @click="switchDataMode"></div>
+          <div
+            v-if="sysDataType === 'all'"
+            :class="{ 'realtime-mode': isDataRealTime }"
+            alt="切换数据模式"
+            class="switch-button report-mode"
+            @click="switchDataMode"
+          ></div>
           <!-- 榆家梁矿 -->
           <!-- <div class="area-card2">
             
@@ -63,7 +69,9 @@
   import iconLight from './components/icon-light.vue';
   import dialogModal from './components/dialog-modal.vue';
   import { getHomeData, getList } from './clique.api';
-  import { EllipsisOutlined } from '@ant-design/icons-vue';
+  import { useGlobSetting } from '/@/hooks/setting';
+
+  const { sysDataType = 'monitor' } = useGlobSetting();
 
   const dialogModalRef = ref();
   let mainTitle = ref('国能神东一通三防管控平台');
@@ -99,7 +107,7 @@
   let orgcode = ref('');
 
   /** 数据是否使用实时数据,使用实时数据/报表数据对应某些数据的不同字段 */
-  const isDataRealTime = ref(false);
+  const isDataRealTime = ref(sysDataType === 'monitor');
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;

+ 1 - 1
src/views/vent/home/configurable/vent_v5.vue

@@ -95,7 +95,7 @@
   import { useGlobSetting } from '/@/hooks/setting';
   // import { testConfigVent, testConfigVentRealtime } from './configurable.data';
 
-  const { sysDataType } = useGlobSetting();
+  const { sysDataType = 'monitor' } = useGlobSetting();
   const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
   const { mainTitle, enhancedConfigs, hiddenList, data, updateData, updateEnhancedConfigs } = useInitPage('智能通风管控系统');
   const route = useRoute();