Przeglądaj źródła

[Mod 0000] 煤层自燃倾向性相关内容对接

houzekong 1 dzień temu
rodzic
commit
89dc150a56

+ 1 - 1
src/views/dashboard/Overhaul/components/LeafPage.vue

@@ -271,7 +271,7 @@
   const basicInfoColumns = [
     { label: '组织机构', key: 'parentArea' },
     { label: '瓦斯等级', key: 'gasLevelName' },
-    { label: '煤层自燃倾向性', key: 'coalSeamLevel' },
+    { label: '煤层自燃倾向性', key: 'fire' },
     { label: '生产状态', key: 'gjMineStatus' },
     { label: '预警结果', key: 'alarmLevel' },
     { label: '预警时间', key: 'earliestTime' },

+ 1 - 1
src/views/dashboard/Overhaul/components/RootPage.vue

@@ -281,7 +281,7 @@
 
   const dataColumns = [
     { label: '瓦斯等级', key: 'gasLevelName', type: 'alarm', showPoint: true, span: 1 },
-    { label: '煤层自燃倾向性', key: 'coalSeamLevel', type: 'text', span: 1 },
+    { label: '煤层自燃倾向性', key: 'fire', type: 'text', span: 1 },
     { label: '联网', key: 'status', colorKey: 'status', type: 'status', showPoint: true, span: 1 },
     { label: '永久密闭数量', key: 'goafDataCount', type: 'custom', span: 1 },
     { label: '报警数量', key: 'alarmGoafNum', type: 'custom', span: 1 },

+ 10 - 11
src/views/dashboard/SealedGoaf/index.vue

@@ -53,6 +53,7 @@
   import { useMineDepartmentStore } from '/@/store/modules/mine';
   import SystemSelect from '/@/layouts/default/feature/SystemSelect.vue';
   import { DEFAULT_DISPLAY_MAP, DEFAULT_OPERAND_SET, evaluateExpressionLite } from '../../system/algorithm/utils';
+  import { map } from 'lodash-es';
 
   const { title = '老空区永久密闭监测与分析系统' } = useGlobSetting();
   const { data, updateData } = useInitPage(title);
@@ -102,7 +103,14 @@
     try {
       // 2. 异步获取所有接口数据(并行请求提升性能)
       const [coalSeamFireData, productionStatusData, overLimitData, goafAlarmData, accessDetails] = await Promise.all([
-        getCoalSeamFireNum(appStore.simpleMapParams), // 煤层自燃倾向数据
+        getCoalSeamFireNum(appStore.simpleMapParams).then((r) => {
+          return map(r, (val, key) => {
+            return {
+              coalSeamLevel: `${key}:${val}`,
+              num: val,
+            };
+          }) as any;
+        }), // 煤层自燃倾向数据
         getMineProductionStatusNum(appStore.simpleMapParams), // 当日生产状态数据
         getOverLimitNum(appStore.simpleMapParams), // 超限数据(可按需处理)
         getGoafAlarmNum(appStore.simpleMapParams), // 执法处风险统计
@@ -174,20 +182,11 @@
       //   },
       //   { coalSeamLevel: [], num: [], desc: [] }
       // );
-
-      const coalSeamFireChartData = ['Ⅰ类容易自燃', 'Ⅱ类自燃', 'Ⅲ类不易自燃'].map((key) => {
-        const arr = coalSeamFireData[key];
-        const obj = { name1: key, name2: arr.map((e) => `${e.mineName}-${e.coalSeamName}`).join('<br>') };
-        return {
-          coalSeamLevel: `${obj.name1}:${arr.length}`,
-          num: arr?.length,
-        };
-      });
       // console.log('debug coal', coalSeamFireChartData);
 
       // 3. 把接口数据赋值给响应式变量(备用)
       mineData.value = {
-        coalSeamFireData: coalSeamFireChartData as any,
+        coalSeamFireData,
         productionStatusData,
         overLimitData,
         goafAlarmData,

+ 15 - 1
src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts

@@ -70,7 +70,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '煤层自燃倾向性',
-    dataIndex: 'coalSeamLevel',
+    dataIndex: 'fire',
     width: 100,
   },
   {
@@ -204,6 +204,20 @@ export const searchFormSchema: FormSchema[] = [
     colProps: { span: 6 },
     show: false,
   },
+  {
+    field: 'fire',
+    label: '煤层自燃倾向性',
+    component: 'Select',
+    componentProps: {
+      options: [
+        { label: '不易自燃', value: '不易自燃' },
+        { label: '容易自燃', value: '容易自燃' },
+        { label: '未检测', value: '未检测' },
+        { label: '自燃', value: '自燃' },
+      ],
+    },
+    colProps: { span: 6 },
+  },
 ];
 
 // 3. 生成动态表格列(接收动态状态映射)