Browse Source

色谱仪 束管 粉尘报表分析修改

bobo04052021@163.com 2 tháng trước cách đây
mục cha
commit
7963ff00fd

+ 347 - 274
src/views/vent/monitorManager/comment/comment.data.ts

@@ -300,6 +300,96 @@ export const dsutColumns: BasicColumn[] = [
     ],
   },
 ];
+export const dsutDltColumns: BasicColumn[] = [
+  {
+    title: '序号',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }: { index: number }) => `${index + 1}`,
+  },
+  {
+    title: '工作场所',
+    dataIndex: 'gzcs',
+    key: 'gzcs',
+    width: 130,
+    align: 'center',
+  },
+  {
+    title: '工种',
+    dataIndex: 'gz',
+    key: 'gz',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '粉尘种类',
+    dataIndex: 'fczl',
+    key: 'fczl',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '总尘(短时间监测浓度,单位:mg/m³)',
+    align: 'center',
+    children: [
+      {
+        title: '作业工序-生产',
+        dataIndex: 'sc_zcds',
+        key: 'sc_zcds',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '作业工序-检修',
+        dataIndex: 'jx_zcds',
+        key: 'jx_zcds',
+        width: 100,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '呼尘(短时间监测浓度,单位:mg/m³)',
+    align: 'center',
+    children: [
+      {
+        title: '作业工序-生产',
+        dataIndex: 'sc_hcds',
+        key: 'sc_hcds',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '作业工序-检修',
+        dataIndex: 'jx_hcds',
+        key: 'jx_hcds',
+        width: 100,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '总尘(时间加权平均浓度,单位:mg/m³)',
+    dataIndex: 'zcjqpj',
+    key: 'zcjqpj',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '呼尘(时间加权平均浓度,单位:mg/m³)',
+    dataIndex: 'hcjqpj',
+    key: 'hcjqpj',
+    width: 100,
+    align: 'center',
+  },
+];
 export const bundleColumns: BasicColumn[] = [
   {
     title: '序号',
@@ -452,13 +542,6 @@ export const bundleSpycolumns: BasicColumn[] = [
     key: 'xh',
   },
   {
-    title: '化验编号',
-    dataIndex: 'hybh',
-    key: 'hybh',
-    width: 100,
-    align: 'center',
-  },
-  {
     title: '采样地点',
     dataIndex: 'jcdd',
     key: 'jcdd',
@@ -548,7 +631,7 @@ export const ColumnsReport: BasicColumn[] = [
     title: '序号',
     width: 60,
     align: 'center',
-    customRender: ({ index }: { index: number }) => `${index + 1}`
+    customRender: ({ index }: { index: number }) => `${index + 1}`,
   },
   {
     title: '监测地点',
@@ -597,12 +680,6 @@ export const ColumnsReport: BasicColumn[] = [
     align: 'center',
   },
   {
-    title: '检查时间',
-    dataIndex: 'checkTime',
-    key: 'checkTime',
-    align: 'center',
-  },
-  {
     title: '操作',
     dataIndex: 'action',
     width: 120,
@@ -612,124 +689,122 @@ export const ColumnsReport: BasicColumn[] = [
 ];
 export const columnsGas1: BasicColumn[] = [
   {
-      title: '序号',
-      width: 60,
-      align: 'center',
-      customRender: ({ index }: { index: number }) => `${index + 1}`
-  },
-  {
-      title: '监测地点',
-      dataIndex: 'jcdd',
-      key: 'jcdd',
-      width:180,
-      align: 'center',
-  },
-  {
-      title: '夜班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Night',
-              key: 'ch4Night',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Night',
-              key: 'co2Night',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coNight',
-              key: 'coNight',
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Night',
-              key: 'o2Night',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tNight',
-              key: 'tNight',
-              align: 'center',
-          },
-      ]
-  },
-  {
-      title: '早班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Early',
-              key: 'ch4Early',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Early',
-              key: 'co2Early',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coEarly',
-              key: 'coEarly',
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Early',
-              key: 'o2Early',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tEarly',
-              key: 'tEarly',
-              align: 'center',
-          },
-      ]
-
+    title: '序号',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }: { index: number }) => `${index + 1}`,
   },
   {
-      title: '中班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Noon',
-              key: 'ch4Noon',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Noon',
-              key: 'co2Noon',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coNoon',
-              key: 'coNoon',
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Noon',
-              key: 'o2Noon',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tNoon',
-              key: 'tNoon',
-              align: 'center',
-          },
-      ]
-
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 180,
+    align: 'center',
+  },
+  {
+    title: '夜班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Night',
+        key: 'ch4Night',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Night',
+        key: 'co2Night',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coNight',
+        key: 'coNight',
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Night',
+        key: 'o2Night',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tNight',
+        key: 'tNight',
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '早班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Early',
+        key: 'ch4Early',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Early',
+        key: 'co2Early',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coEarly',
+        key: 'coEarly',
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Early',
+        key: 'o2Early',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tEarly',
+        key: 'tEarly',
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '中班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Noon',
+        key: 'ch4Noon',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Noon',
+        key: 'co2Noon',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coNoon',
+        key: 'coNoon',
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Noon',
+        key: 'o2Noon',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tNoon',
+        key: 'tNoon',
+        align: 'center',
+      },
+    ],
   },
   {
     title: '操作',
@@ -742,152 +817,150 @@ export const columnsGas1: BasicColumn[] = [
 
 export const columnsGas2: BasicColumn[] = [
   {
-      title: '序号',
-      width: 60,
-      align: 'center',
-      customRender: ({ index }: { index: number }) => `${index + 1}`
-  },
-  {
-      title: '监测地点',
-      dataIndex: 'jcdd',
-      key: 'jcdd',
-      width:130,
-      align: 'center',
-  },
-  {
-      title: '煤层',
-      dataIndex: 'mc',
-      width:80,
-      key: 'mc',
-      align: 'center',
-  },
-  {
-      title: '夜班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Night',
-              key: 'ch4Night',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Night',
-              key: 'co2Night',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coNight',
-              key: 'coNight',
-              width:80,
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Night',
-              key: 'o2Night',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tNight',
-              key: 'tNight',
-              align: 'center',
-          },
-          {
-              title: '巡检员',
-              dataIndex: 'checkPersonNight',
-              key: 'checkPersonNight',
-              align: 'center',
-          },
-      ]
-  },
-  {
-      title: '早班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Early',
-              key: 'ch4Early',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Early',
-              key: 'co2Early',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coEarly',
-              key: 'coEarly',
-              width:80,
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Early',
-              key: 'o2Early',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tEarly',
-              key: 'tEarly',
-              align: 'center',
-          },
-          {
-              title: '巡检员',
-              dataIndex: 'checkPersonEarly',
-              key: 'checkPersonEarly',
-              align: 'center',
-          },
-      ]
-
+    title: '序号',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }: { index: number }) => `${index + 1}`,
   },
   {
-      title: '中班',
-      children: [
-          {
-              title: 'CH₄‌(%)',
-              dataIndex: 'ch4Noon',
-              key: 'ch4Noon',
-              align: 'center',
-          },
-          {
-              title: 'CO₂‌(%)',
-              dataIndex: 'co2Noon',
-              key: 'co2Noon',
-              align: 'center',
-          },
-          {
-              title: 'CO(ppm)',
-              dataIndex: 'coNoon',
-              key: 'coNoon',
-              width:80,
-              align: 'center',
-          },
-          {
-              title: 'O₂‌(%)',
-              dataIndex: 'o2Noon',
-              key: 'o2Noon',
-              align: 'center',
-          },
-          {
-              title: 'T(°C)',
-              dataIndex: 'tNoon',
-              key: 'tNoon',
-              align: 'center',
-          },
-          {
-              title: '巡检员',
-              dataIndex: 'checkPersonNoon',
-              key: 'checkPersonNoon',
-              align: 'center',
-          },
-      ]
-
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 130,
+    align: 'center',
+  },
+  {
+    title: '煤层',
+    dataIndex: 'mc',
+    width: 80,
+    key: 'mc',
+    align: 'center',
+  },
+  {
+    title: '夜班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Night',
+        key: 'ch4Night',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Night',
+        key: 'co2Night',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coNight',
+        key: 'coNight',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Night',
+        key: 'o2Night',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tNight',
+        key: 'tNight',
+        align: 'center',
+      },
+      {
+        title: '巡检员',
+        dataIndex: 'checkPersonNight',
+        key: 'checkPersonNight',
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '早班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Early',
+        key: 'ch4Early',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Early',
+        key: 'co2Early',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coEarly',
+        key: 'coEarly',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Early',
+        key: 'o2Early',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tEarly',
+        key: 'tEarly',
+        align: 'center',
+      },
+      {
+        title: '巡检员',
+        dataIndex: 'checkPersonEarly',
+        key: 'checkPersonEarly',
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '中班',
+    children: [
+      {
+        title: 'CH₄‌(%)',
+        dataIndex: 'ch4Noon',
+        key: 'ch4Noon',
+        align: 'center',
+      },
+      {
+        title: 'CO₂‌(%)',
+        dataIndex: 'co2Noon',
+        key: 'co2Noon',
+        align: 'center',
+      },
+      {
+        title: 'CO(ppm)',
+        dataIndex: 'coNoon',
+        key: 'coNoon',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: 'O₂‌(%)',
+        dataIndex: 'o2Noon',
+        key: 'o2Noon',
+        align: 'center',
+      },
+      {
+        title: 'T(°C)',
+        dataIndex: 'tNoon',
+        key: 'tNoon',
+        align: 'center',
+      },
+      {
+        title: '巡检员',
+        dataIndex: 'checkPersonNoon',
+        key: 'checkPersonNoon',
+        align: 'center',
+      },
+    ],
   },
   {
     title: '操作',

+ 189 - 189
src/views/vent/monitorManager/comment/dustMonitorTable.vue

@@ -27,229 +27,229 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
-  import { dsutColumns } from './comment.data';
-  import { getInfoList, getAllFileList } from './comment.api';
-  const emit = defineEmits(['locate']);
-  const props = defineProps({
-    isShowAction: {
-      type: Boolean,
-      default: false,
-    },
-  });
-  let tableData = ref<any[]>([]);
-  let selectList = ref<any[]>([]);
-  let resultByWorkplace = ref<any[]>([]);
-  let AllMaxValues = ref<any[]>([]);
-  let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
-  let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
-  let selectedFileId = ref<string | null>(null);
-  let selectedWorkplace = ref<string | null>(null);
-  let DefaultValue = ref<string | null>(null);
-  let createBy = ref<any[]>([]);
-  let createTime = ref<any[]>([]);
-  let formSearch = reactive({
-    pageNum: 1,
-    pageSize: 1000,
-    fileId: '',
-    fileName: '',
-  });
-  const columns = ref([]);
-  watch(
-    () => props.isShowAction,
-    (value) => {
-      if (value) {
-        dsutColumns.push({
-          title: '操作',
-          dataIndex: 'operation',
-          width: 100,
-          align: 'center',
-        });
-        if (columns.value.length == 0) columns.value = dsutColumns;
-      } else {
-        if (columns.value.length == 0) columns.value = dsutColumns;
-      }
-    },
-    { immediate: true }
-  );
-  function handlerLocation(record) {
-    emit('locate', record);
-  }
-  //获取粉尘监测结果数据
-  async function getTableList(params: any) {
-    let res = await getInfoList({ type: 'smoke', ...params });
-    const content = res.content;
-    let contentArr = JSON.parse(content);
-    tableData.value = contentArr;
-    createBy.value = res.createBy;
-    createTime.value = res.createTime;
-    processTableData(contentArr);
-    if (workplaceList.value.length > 0) {
-      console.log(workplaceList.value, 'workplaceList');
-      DefaultValue.value = workplaceList.value[0];
-      workPlaceChange(selectedWorkplace.value);
+import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
+import { dsutColumns, dsutDltColumns } from './comment.data';
+import { getInfoList, getAllFileList } from './comment.api';
+const emit = defineEmits(['locate']);
+const props = defineProps({
+  isShowAction: {
+    type: Boolean,
+    default: false,
+  },
+});
+let tableData = ref<any[]>([]);
+let selectList = ref<any[]>([]);
+let resultByWorkplace = ref<any[]>([]);
+let AllMaxValues = ref<any[]>([]);
+let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
+let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
+let selectedFileId = ref<string | null>(null);
+let selectedWorkplace = ref<string | null>(null);
+let DefaultValue = ref<string | null>(null);
+let createBy = ref<any[]>([]);
+let createTime = ref<any[]>([]);
+let formSearch = reactive({
+  pageNum: 1,
+  pageSize: 1000,
+  fileId: '',
+  fileName: '',
+});
+const columns = ref([]);
+watch(
+  () => props.isShowAction,
+  (value) => {
+    if (value) {
+      dsutDltColumns.push({
+        title: '操作',
+        dataIndex: 'operation',
+        width: 100,
+        align: 'center',
+      });
+      if (columns.value.length == 0) columns.value = dsutDltColumns;
+    } else {
+      if (columns.value.length == 0) columns.value = dsutDltColumns;
     }
+  },
+  { immediate: true }
+);
+function handlerLocation(record) {
+  emit('locate', record);
+}
+//获取粉尘监测结果数据
+async function getTableList(params: any) {
+  let res = await getInfoList({ type: 'smoke', ...params });
+  const content = res.content;
+  let contentArr = JSON.parse(content);
+  tableData.value = contentArr;
+  createBy.value = res.createBy;
+  createTime.value = res.createTime;
+  processTableData(contentArr);
+  if (workplaceList.value.length > 0) {
+    console.log(workplaceList.value, 'workplaceList');
+    DefaultValue.value = workplaceList.value[0];
+    workPlaceChange(selectedWorkplace.value);
   }
-  // 处理 tableData 数据
-  function processTableData(data: any) {
-    // 根据 gzcs 字段进行分组
-    const groupedData = data.reduce((acc: any, item: any) => {
-      const workplace = item.gzcs;
-      if (!acc[workplace]) {
-        acc[workplace] = [];
-      }
-      acc[workplace].push(item);
-      return acc;
-    }, {});
-
-    // 筛选每个工作场所下的最大值
-    const result = Object.keys(groupedData).flatMap((workplace) => {
-      const items = groupedData[workplace];
-      const maxValues = [
-        { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-        { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      ];
-
-      items.forEach((item: any) => {
-        maxValues.forEach((maxValue) => {
-          if (item[maxValue.key] > maxValue.value) {
-            maxValue.value = item[maxValue.key];
-            maxValue.gz = item.gz;
-            maxValue.jcdd = item.jcdd;
-            maxValue.fczl = item.fczl;
-          }
-        });
-      });
-
-      return maxValues;
-    });
-
-    resultByWorkplace.value = result;
-    workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
-    if (workplaceList.value.length > 0) {
-      selectedWorkplace.value = workplaceList.value[0];
-      workPlaceChange(selectedWorkplace.value);
+}
+// 处理 tableData 数据
+function processTableData(data: any) {
+  // 根据 gzcs 字段进行分组
+  const groupedData = data.reduce((acc: any, item: any) => {
+    const workplace = item.gzcs;
+    if (!acc[workplace]) {
+      acc[workplace] = [];
     }
-    // 筛选整个 tableData 下的最大值
-    const overallMaxValues = [
-      { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-      { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    acc[workplace].push(item);
+    return acc;
+  }, {});
+
+  // 筛选每个工作场所下的最大值
+  const result = Object.keys(groupedData).flatMap((workplace) => {
+    const items = groupedData[workplace];
+    const maxValues = [
+      { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      // { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      // { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      // { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      // { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
     ];
-    data.forEach((item: any) => {
-      overallMaxValues.forEach((maxValue) => {
+
+    items.forEach((item: any) => {
+      maxValues.forEach((maxValue) => {
         if (item[maxValue.key] > maxValue.value) {
           maxValue.value = item[maxValue.key];
           maxValue.gz = item.gz;
           maxValue.jcdd = item.jcdd;
           maxValue.fczl = item.fczl;
-          maxValue.gzcs = item.gzcs;
         }
       });
     });
 
-    AllMaxValues.value = overallMaxValues;
+    return maxValues;
+  });
+
+  resultByWorkplace.value = result;
+  workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
+  if (workplaceList.value.length > 0) {
+    selectedWorkplace.value = workplaceList.value[0];
+    workPlaceChange(selectedWorkplace.value);
   }
-  //获取所有文件列表
-  async function getAllFile() {
-    let res = await getAllFileList({ type: 'smoke' });
-    selectList.value = res.records.map((item: any) => ({
-      fileId: item.fileId,
-      fileName: item.fileName,
-    }));
+  // 筛选整个 tableData 下的最大值
+  const overallMaxValues = [
+    { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    // { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    // { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    // { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    // { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+  ];
+  data.forEach((item: any) => {
+    overallMaxValues.forEach((maxValue) => {
+      if (item[maxValue.key] > maxValue.value) {
+        maxValue.value = item[maxValue.key];
+        maxValue.gz = item.gz;
+        maxValue.jcdd = item.jcdd;
+        maxValue.fczl = item.fczl;
+        maxValue.gzcs = item.gzcs;
+      }
+    });
+  });
+
+  AllMaxValues.value = overallMaxValues;
+}
+//获取所有文件列表
+async function getAllFile() {
+  let res = await getAllFileList({ type: 'smoke' });
+  selectList.value = res.records.map((item: any) => ({
+    fileId: item.fileId,
+    fileName: item.fileName,
+  }));
+  if (selectList.value.length > 0) {
+    formSearch.fileId = selectList.value[0].fileId;
+    getSearch();
+  }
+}
+//查询
+function getSearch() {
+  const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+  const params = {
+    fileId: formSearch.fileId,
+    fileName: selectedFile ? selectedFile.fileName : '',
+  };
+  getTableList(params);
+}
+function workPlaceChange(value: any) {
+  selectedWorkplace.value = value;
+  filteredResultByWorkplace.value = resultByWorkplace.value.filter((item) => item.gzcs === value);
+}
+
+onMounted(() => {
+  getTableList({ type: 'smoke' });
+  getAllFile().then(() => {
     if (selectList.value.length > 0) {
       formSearch.fileId = selectList.value[0].fileId;
+      selectedFileId.value = selectList.value[0].fileId;
       getSearch();
     }
-  }
-  //查询
-  function getSearch() {
-    const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
-    const params = {
-      fileId: formSearch.fileId,
-      fileName: selectedFile ? selectedFile.fileName : '',
-    };
-    getTableList(params);
-  }
-  function workPlaceChange(value: any) {
-    selectedWorkplace.value = value;
-    filteredResultByWorkplace.value = resultByWorkplace.value.filter((item) => item.gzcs === value);
-  }
-
-  onMounted(() => {
-    getTableList({ type: 'smoke' });
-    getAllFile().then(() => {
-      if (selectList.value.length > 0) {
-        formSearch.fileId = selectList.value[0].fileId;
-        selectedFileId.value = selectList.value[0].fileId;
-        getSearch();
-      }
-    });
   });
+});
 </script>
 
 <style lang="less" scoped>
-  @ventSpace: zxm;
-  .dustMonitor {
-    .search-area {
-      margin: 15px;
+@ventSpace: zxm;
+.dustMonitor {
+  .search-area {
+    margin: 15px;
 
-      .area-item {
-        display: flex;
-        align-items: center;
+    .area-item {
+      display: flex;
+      align-items: center;
 
-        .item-text {
-          color: #fff;
-        }
+      .item-text {
+        color: #fff;
       }
     }
+  }
 
-    .zxm-picker,
-    .zxm-input {
-      border: 1px solid #3ad8ff77;
-      background-color: #ffffff00;
-      color: #fff;
-    }
+  .zxm-picker,
+  .zxm-input {
+    border: 1px solid #3ad8ff77;
+    background-color: #ffffff00;
+    color: #fff;
   }
+}
 
-  :deep(.@{ventSpace}-table-body) {
-    height: auto !important;
+:deep(.@{ventSpace}-table-body) {
+  height: auto !important;
 
-    tr > td {
-      background: #ffffff00 !important;
-    }
+  tr > td {
+    background: #ffffff00 !important;
+  }
 
-    tr.@{ventSpace}-table-row-selected {
-      td {
-        background: #007cc415 !important;
-      }
+  tr.@{ventSpace}-table-row-selected {
+    td {
+      background: #007cc415 !important;
     }
   }
+}
 
-  :deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
-    min-height: 0;
-  }
+:deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
+  min-height: 0;
+}
 
-  :deep(.@{ventSpace}-pagination) {
-    margin-right: 20px !important;
-  }
+:deep(.@{ventSpace}-pagination) {
+  margin-right: 20px !important;
+}
 
-  :deep(.zxm-table-thead > tr > th:last-child) {
-    border-right: 1px solid #91e9fe55 !important;
-  }
+:deep(.zxm-table-thead > tr > th:last-child) {
+  border-right: 1px solid #91e9fe55 !important;
+}
 </style>