2 Commity 210e612bbe ... 01f622a76f

Autor SHA1 Wiadomość Data
  houzekong 01f622a76f [Mod 0000] 过渡页按整改意见修改 3 tygodni temu
  houzekong cea4067c0a [Mod 0000] 预警研判页面导出功能整改 3 tygodni temu

+ 1 - 1
src/views/analysis/warningAnalysis/reportAnalysis/index.vue

@@ -95,7 +95,7 @@
     },
     exportConfig: {
       url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
-      name: '自燃发火隐患分级',
+      name: '数据中断分析',
       params: {
         alarmType: 'lateReport',
       },

+ 42 - 29
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue

@@ -15,7 +15,7 @@
         />
       </div>
       <!-- 实时数据表格 -->
-      <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+      <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <!-- 核心:判断record是否有有效数据,无则显示- -->
         <template #action="{ record }">
           <div class="action-buttons">
@@ -27,6 +27,9 @@
             </button>
           </div>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
         <template #empty>
           <!-- 无数据时显示-,样式居中对齐 -->
           <span class="empty-placeholder">-</span>
@@ -59,7 +62,7 @@
 
 <script setup lang="ts">
   import { ref } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
+  import { BasicTable } from '/@/components/Table';
   import { Tabs, TabPane } from 'ant-design-vue';
   import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
   import { SvgIcon } from '/@/components/Icon';
@@ -108,36 +111,46 @@
   };
 
   // 注册实时数据表格
-  const [registerTable] = useTable({
-    columns,
-    api: wrappedGetMineData,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'deptId',
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      columns,
+      api: wrappedGetMineData,
+      formConfig: {
+        labelWidth: 120,
+        schemas: [
+          {
+            label: '煤矿名称',
+            field: 'deptId',
+            component: 'MineCascader', // 自定义组件名
+            colProps: { span: 6 },
+            rules: [],
+          },
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      actionColumn: {
+        width: 80,
+        title: '详情',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: undefined,
+      },
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 80,
-      title: '详情',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
+    exportConfig: {
+      url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+      name: '密闭爆炸危险性判定',
+      params: {
+        alarmType: 'explosionAlarm',
+      },
     },
   });
+  const [registerRealtimeTable] = ctxRealtime;
 
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({

+ 11 - 6
src/views/dashboard/Overhaul/components/LeafPage.vue

@@ -171,7 +171,7 @@
                   </div>
                 </div>
               </div>
-              <div class="indicator-group">
+              <!-- <div class="indicator-group">
                 <div class="group-title">
                   <div class="title-icon-top icon-result"></div>
                   <div class="title-icon-bottom"></div>
@@ -183,10 +183,9 @@
                     <div v-if="res.key == 'alarmLevel'" :title="getRiskText(item.alarmLevel)" class="value">{{ getRiskText(item.alarmLevel) }}</div>
                     <div v-else class="value" :title="getDataValue(item, res.key)">{{ getDataValue(item, res.key) }}</div>
                   </div>
-                  <!-- 需要占位符以保持网格对齐,保留一个空的 placeholder -->
                   <div class="indicator-item placeholder-item"></div>
                 </div>
-              </div>
+              </div> -->
             </div>
           </div>
         </div>
@@ -203,7 +202,7 @@
         <div class="alarm-content">
           <div v-for="(alarm, index) in alarmColumns" :key="index" class="alarm-item">
             <div class="alarm-name">{{ alarm.label }}</div>
-            <div class="alarm-count">{{ mineAlarmData?.[alarm.key] || '-' }}</div>
+            <div class="alarm-count">{{ get(mineAlarmData, alarm.key, '-') }}</div>
             <div class="alarm-border">
               <div class="alarm-border-icon"></div>
               <div class="alarm-border-line"></div>
@@ -239,6 +238,8 @@
   import { getGoafAlarmNum, getGoafData, getMineData, getProvinceAlarm } from '../overhaul.api';
   import { StatusColorEnum } from '/@/enums/jeecgEnum';
   import ConnectAnalysis from '/@/views/analysis/warningAnalysis/connectAnalysis/index.vue';
+  import { getOverLimitNum } from '../../SealedGoaf/sealedGoaf.api';
+  import { get } from 'lodash-es';
 
   const appStore = useAppStore();
   const mineStore = useMineDepartmentStore();
@@ -559,12 +560,16 @@
         getGoafAlarmNum(appStore.simpleMapParams), // 预警统计
         getGoafData(appStore.simpleMapParams), // 密闭监测数据
         getMineData(appStore.simpleMapParams), // 煤矿基础信息数据
-        getProvinceAlarm(appStore.simpleMapParams), // 预警信息列表
+        // getProvinceAlarm(appStore.simpleMapParams), // 预警信息列表
+        getOverLimitNum(appStore.simpleMapParams),
       ]);
       alarmStatistics.value = goafAlarmNum[0];
       goafMonitorData.value = goafData.records;
       // basicInfo.value = mineData.records[0];
-      mineAlarmData.value = alarmData.records[0];
+      mineAlarmData.value = alarmData.reduce((obj, e) => {
+        obj[e.alarmFiled] = e.num;
+        return obj;
+      }, {});
 
       // 处理煤矿基础信息并计算持续时间
       const mineRecord = mineData.records[0];

+ 13 - 22
src/views/dashboard/Overhaul/components/RootPage.vue

@@ -107,16 +107,7 @@
             </div>
             <div class="item-body">
               <div class="data-row">
-                <div
-                  v-for="(col, colIndex) in dataColumns"
-                  :key="colIndex"
-                  class="data-col"
-                  :class="{
-                    'col-first-row': colIndex < 5,
-                    'col-second-row': colIndex >= 5,
-                    'col-span-3': colIndex === 5,
-                  }"
-                >
+                <div v-for="(col, colIndex) in dataColumns" :key="colIndex" class="data-col" :style="{ gridColumn: `span ${col.span}` }">
                   <div class="col-icon">
                     <div class="icon-item" :class="`alarm-icon-${(colIndex % 8) + 1}`"></div>
                   </div>
@@ -264,14 +255,14 @@
   const isChartVisible = ref(true);
 
   const dataColumns = [
-    { label: '瓦斯等级', key: 'gasLevelName', type: 'alarm', showPoint: true },
-    { label: '煤层自燃倾向性', key: 'coalSeamLevel', type: 'text' },
-    { label: '联网', key: 'status', colorKey: 'status', type: 'status', showPoint: true },
-    { label: '永久密闭数量', key: 'goafDataCount', type: 'custom' },
-    { label: '报警数量', key: 'alarmCount', type: 'custom' },
-    { label: '报警原因', key: 'alarmReasons', type: 'custom' },
-    { label: '开始时间', key: 'earliestTime', type: 'text' },
-    { label: '最新监测时间', key: 'latestReadTime', type: 'text' },
+    { label: '瓦斯等级', key: 'gasLevelName', type: 'alarm', showPoint: true, span: 1 },
+    { label: '煤层自燃倾向性', key: 'coalSeamLevel', 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 },
+    // { label: '报警原因', key: 'alarmReasons', type: 'custom', span: 1 },
+    { label: '开始预警时间', key: 'earliestTime', type: 'text', span: 1 },
+    { label: '最新监测时间', key: 'latestReadTime', type: 'text', span: 1 },
   ];
   // const alartTypeColumns = [
   //   'fireAlarm',
@@ -437,12 +428,12 @@
     if (col.type === 'status') {
       return getlinkStatusInfo(rawValue).text;
     }
-    
+
     // 处理永久密闭数量:取 goafDataList 的长度
     if (col.key === 'goafDataCount') {
       return item.goafDataList && Array.isArray(item.goafDataList) ? item.goafDataList.length : 0;
     }
-    
+
     if (col.key === 'alarmCount') {
       // 取 alarmRecordList 的长度
       return item.alarmRecordList ? item.alarmRecordList.length : 0;
@@ -1068,7 +1059,7 @@
 
   .data-row {
     display: grid;
-    grid-template-columns: repeat(5, 1fr);
+    grid-template-columns: repeat(4, 1fr);
     gap: 12px;
     margin-bottom: 8px;
   }
@@ -1163,7 +1154,7 @@
         white-space: nowrap;
         overflow: hidden;
         text-overflow: ellipsis;
-        min-width: 0; 
+        min-width: 0;
       }
     }