Browse Source

[Mod 0000] 过渡页按整改意见修改

houzekong 13 hours ago
parent
commit
01f622a76f

+ 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;
       }
     }