浏览代码

保德束管日报分析修改

bobo04052021@163.com 2 月之前
父节点
当前提交
6487468abf

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

@@ -368,3 +368,265 @@ export const Hjtcolumns: BasicColumn[] = [
     align: 'center',
   },
 ];
+export const Bdcolumns: BasicColumn[] = [
+  {
+    title: '束管编号',
+    width: 80,
+    align: 'center',
+    dataIndex: 'xh',
+    key: 'xh',
+  },
+  {
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 130,
+    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: '氮气(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: '一氧化碳(CO%)',
+    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: '甲烷(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: '乙烯(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: '乙炔(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: '氢气(H₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'h2_max',
+        key: 'h2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'h2_min',
+        key: 'h2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'h2_ave',
+        key: 'h2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '二氧化氮(NO₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'no2_max',
+        key: 'no22_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'no22_max',
+        key: 'no2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'no2_ave',
+        key: 'no2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '煤自燃阶段',
+    dataIndex: 'internalFireWarnLevel',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 100,
+    align: 'center',
+  },
+];

+ 155 - 11
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 } from './bundle-table.data';
+import { columns, Hjtcolumns, Bdcolumns } 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';
@@ -86,8 +86,10 @@ const computedColumns = computed(() => {
   switch (sysOrgCode) {
     case 'sdmtjtdltmkhjtj':
       return Hjtcolumns; // 活鸡兔对应的列配置
+    case 'sdmtjtBdmk':
+      return Bdcolumns; // 保德对应的列配置
     default:
-      return columns; // 默认情况下返回的列配置
+      return Bdcolumns; // 默认情况下返回的列配置
   }
 });
 function updateChart(data: any) {
@@ -95,21 +97,32 @@ function updateChart(data: any) {
   const myChart = echarts.init(chartDom);
   const categories = data.map((item: any) => item.jcdd);
   const c2h2MaxValues = data.map((item: any) => parseFloat(item.c2h2_max));
+  const c2h2MinValues = data.map((item: any) => parseFloat(item.c2h2_min));
   const c2h2AveValues = data.map((item: any) => parseFloat(item.c2h2_ave));
   const c2h4MaxValues = data.map((item: any) => parseFloat(item.c2h4_max));
+  const c2h4MinValues = data.map((item: any) => parseFloat(item.c2h4_min));
   const c2h4AveValues = data.map((item: any) => parseFloat(item.c2h4_ave));
   const ch4MaxValues = data.map((item: any) => parseFloat(item.ch4_max));
+  const ch4MinValues = data.map((item: any) => parseFloat(item.ch4_min));
   const ch4AveValues = data.map((item: any) => parseFloat(item.ch4_ave));
   const co2MaxValues = data.map((item: any) => parseFloat(item.co2_max));
+  const co2MinValues = data.map((item: any) => parseFloat(item.co2_min));
   const co2AveValues = data.map((item: any) => parseFloat(item.co2_ave));
   const coMaxValues = data.map((item: any) => parseFloat(item.co_max));
+  const coMinValues = data.map((item: any) => parseFloat(item.co_min));
   const coAveValues = data.map((item: any) => parseFloat(item.co_ave));
+  const o2MaxValues = data.map((item: any) => parseFloat(item.o2_max));
   const o2MinValues = data.map((item: any) => parseFloat(item.o2_min));
   const o2AveValues = data.map((item: any) => parseFloat(item.o2_ave));
   const n2MaxValues = data.map((item: any) => parseFloat(item.n2_max));
+  const n2MinValues = data.map((item: any) => parseFloat(item.n2_min));
   const n2AveValues = data.map((item: any) => parseFloat(item.n2_ave));
   const no2MaxValues = data.map((item: any) => parseFloat(item.no2_max));
+  const no2MinValues = data.map((item: any) => parseFloat(item.no2_min));
   const no2AveValues = data.map((item: any) => parseFloat(item.no2_ave));
+  const h2MaxValues = data.map((item: any) => parseFloat(item.h2_max));
+  const h2MinValues = data.map((item: any) => parseFloat(item.h2_min));
+  const h2AveValues = data.map((item: any) => parseFloat(item.h2_ave));
 
   const getSeriesConfig = (sysOrgCode) => {
     switch (sysOrgCode) {
@@ -269,6 +282,145 @@ function updateChart(data: any) {
             type: 'bar',
           },
         ];
+      case 'sdmtjtBdmk':
+        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',
+          },
+          {
+            name: 'H₂最大值',
+            data: h2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'H₂最小值',
+            data: h2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'H₂平均值',
+            data: h2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂最大值',
+            data: no2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂最小值',
+            data: no2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂平均值',
+            data: no2AveValues,
+            type: 'bar',
+          },
+        ];
       default:
         return [
           {
@@ -358,14 +510,6 @@ function updateChart(data: any) {
   const seriesConfig = getSeriesConfig(sysOrgCode);
 
   const option = {
-    title: {
-      text: '束管日报分析',
-      textStyle: {
-        color: '#ffffff', // 设置标题颜色
-      },
-      left: 'center', // 水平居中
-      top: '0', // 设置标题距离顶部的距离
-    },
     tooltip: {
       trigger: 'axis',
       backgroundColor: 'rgba(28, 72, 105, 0.5)', // 设置 tooltip 背景为透明
@@ -381,7 +525,7 @@ function updateChart(data: any) {
       },
     },
     legend: {
-      top: '8%',
+      top: '2%',
       textStyle: {
         color: '#ffffffff',
       },