Преглед изворни кода

Merge branch 'master' of http://39.97.59.228:8013/hrx/goaf-monitoring-system

lxh пре 3 месеци
родитељ
комит
4aa52b84c8

+ 1 - 1
src/design/var/index.less

@@ -6,7 +6,7 @@
 
 // tabs
 // updateBy:sunjianlei---updateDate:2021-09-03---修改tab切换栏样式:更改高度
-@multiple-height: 40px;
+@multiple-height: 34px;
 @multiple-card-height: 50px;
 // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】标签页圆滑高度
 @multiple-smooth-height: 48px;

+ 96 - 97
src/layouts/default/feature/SimpleMap.vue

@@ -3,118 +3,117 @@
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from 'vue';
-// 引入 Leaflet
-import L from 'leaflet';
-import 'leaflet/dist/leaflet.css';
-// Ant Design Vue 图标
-
-// --- 1. 组件引用和状态定义 ---
-const mapContainer = ref(null);
-let map = null; // Leaflet 地图实例
-
-// --- 2. 瓦片图层配置 ---
-const tileLayers = {
-  custom: {
-    name: '基准瓦片',
-    layer: null,
-    // url: 'https://shaanxizhxx.chinamine-safety.gov.cn/zh1/8/33/17.png',
-    url: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png',
-    options: {
-      maxZoom: 18,
-      // attribution: '',
-      attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
-      // crossOrigin: true,
+  import { ref, onMounted, onUnmounted } from 'vue';
+  // 引入 Leaflet
+  import L from 'leaflet';
+  import 'leaflet/dist/leaflet.css';
+  // Ant Design Vue 图标
+
+  // --- 1. 组件引用和状态定义 ---
+  const mapContainer = ref(null);
+  let map = null; // Leaflet 地图实例
+
+  // --- 2. 瓦片图层配置 ---
+  const tileLayers = {
+    custom: {
+      name: '基准瓦片',
+      layer: null,
+      url: 'https://shaanxizhxx.chinamine-safety.gov.cn/zh1/8/33/17.png',
+      // url: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png',
+      options: {
+        maxZoom: 18,
+        // attribution: '',
+        attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
+        // crossOrigin: true,
+      },
     },
-  },
-  satellite: {
-    name: '卫星图',
-    layer: null,
-    url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
-    options: {
-      maxZoom: 18,
-      attribution: '© Esri',
+    satellite: {
+      name: '卫星图',
+      layer: null,
+      url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
+      options: {
+        maxZoom: 18,
+        attribution: '© Esri',
+      },
     },
-  },
-};
-
-
-
-
-// 添加一个风险点示例(类似第一张图的红色气泡)
-
+    gaode: {
+      name: '高德地图',
+      layer: null,
+      url: 'https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
+      options: {
+        maxZoom: 18,
+        subdomains: ['1', '2', '3', '4'], // 高德底图服务器集群
+        attribution: '© 高德地图', // 版权声明(必填,遵守使用规范)
+      },
+    },
+  };
 
-// --- 3. 地图初始化 ---
-onMounted(() => {
-  initMap();
-});
+  // 添加一个风险点示例(类似第一张图的红色气泡)
 
-onUnmounted(() => {
-  if (map) {
-    map.remove();
-  }
-});
-
-// 初始化地图
-function initMap() {
-  if (!mapContainer.value) return;
+  // --- 3. 地图初始化 ---
+  onMounted(() => {
+    initMap();
+  });
 
-  // 创建地图实例,设置太原市中心和初始缩放级别
-  map = L.map(mapContainer.value, {
-    center: [35.841, 108.94], // 西安市中心坐标 [纬度, 经度]
-    zoom: 7, // 初始缩放级别,适合城市级别查看
-    zoomControl: false, // 显示缩放控件
-    attributionControl: false, // 显示属性控件
+  onUnmounted(() => {
+    if (map) {
+      map.remove();
+    }
   });
 
-  // 初始化所有瓦片图层
-  initTileLayers();
+  // 初始化地图
+  function initMap() {
+    if (!mapContainer.value) return;
 
-  // 默认显示自定义底图
-  // tileLayers.custom.layer.addTo(map);
-  // tileLayers.satellite.layer.addTo(map);
+    // 创建地图实例,设置太原市中心和初始缩放级别
+    map = L.map(mapContainer.value, {
+      center: [35.841, 108.94], // 西安市中心坐标 [纬度, 经度]
+      zoom: 7, // 初始缩放级别,适合城市级别查看
+      zoomControl: false, // 显示缩放控件
+      attributionControl: false, // 显示属性控件
+    });
 
+    // 初始化所有瓦片图层
+    initTileLayers();
 
-  L.tileLayer('https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', {
-    subdomains: ['1', '2', '3', '4'], // 高德底图服务器集群
-    attribution: '© 高德地图' // 版权声明(必填,遵守使用规范)
-  }).addTo(map);
+    // 默认显示自定义底图
+    tileLayers.gaode.layer.addTo(map);
+    // tileLayers.custom.layer.addTo(map);
+    // tileLayers.satellite.layer.addTo(map);
 
-  // 保留之前的风险点示例
-  L.circleMarker([39.9, 116.4], { radius: 20, color: 'red', fillColor: '#f03', fillOpacity: 0.5 })
-    .addTo(map)
-    .bindPopup("风险值: 35");
+    // 保留之前的风险点示例
+    // L.circleMarker([39.9, 116.4], { radius: 20, color: 'red', fillColor: '#f03', fillOpacity: 0.5 }).addTo(map).bindPopup('风险值: 35');
 
-  initGeoJSON();
-}
+    initGeoJSON();
+  }
 
-// 初始化瓦片图层
-function initTileLayers() {
-  Object.keys(tileLayers).forEach((key) => {
-    const config = tileLayers[key];
-    config.layer = L.tileLayer(config.url, config.options);
-  });
-}
+  // 初始化瓦片图层
+  function initTileLayers() {
+    Object.keys(tileLayers).forEach((key) => {
+      const config = tileLayers[key];
+      config.layer = L.tileLayer(config.url, config.options);
+    });
+  }
 
-async function initGeoJSON() {
-  const response = await fetch('/js/shanxi.geo.json');
-  const ShanXiGeoJSON = await response.json();
-  L.geoJSON(ShanXiGeoJSON, {
-    style: function () {
-      return { color: '#ff9100' };
-    },
-  }).addTo(map);
-}
+  async function initGeoJSON() {
+    const response = await fetch('/js/shanxi.geo.json');
+    const ShanXiGeoJSON = await response.json();
+    L.geoJSON(ShanXiGeoJSON, {
+      style: function () {
+        return { color: '#ff9100' };
+      },
+    }).addTo(map);
+  }
 </script>
 
 <style lang="less" scoped>
-.map-container {
-  flex: 1;
-  height: 100%;
-  width: 100%;
-  position: fixed;
-  top: 0;
-  left: 0;
-  z-index: @simple-map-z-index;
-}
+  .map-container {
+    flex: 1;
+    height: 100%;
+    width: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: @simple-map-z-index;
+  }
 </style>

+ 49 - 52
src/layouts/default/feature/SystemSelect.vue

@@ -3,69 +3,66 @@
 </template>
 
 <script lang="ts" setup>
-// import { Button, Dropdown, Menu, MenuItem } from 'ant-design-vue';
-// import { DownOutlined } from '@ant-design/icons-vue';
-import { useDesign } from '/@/hooks/web/useDesign';
-import { onMounted, ref } from 'vue';
-import { PageEnum } from '/@/enums/pageEnum';
-import { useRouter } from 'vue-router';
-import { useI18n } from '/@/hooks/web/useI18n';
+  // import { Button, Dropdown, Menu, MenuItem } from 'ant-design-vue';
+  // import { DownOutlined } from '@ant-design/icons-vue';
+  import { useDesign } from '/@/hooks/web/useDesign';
+  import { ref } from 'vue';
+  import { PageEnum } from '/@/enums/pageEnum';
+  import { useRouter } from 'vue-router';
+  import { useI18n } from '/@/hooks/web/useI18n';
 
-const { prefixCls } = useDesign('system-select');
-const router = useRouter();
-const { t } = useI18n();
-const text = ref('');
+  const { prefixCls } = useDesign('system-select');
+  const router = useRouter();
+  const { t } = useI18n();
 
-function handleMenuClick(value) {
-  router.push({ path: value });
-}
-
-// const OPTIONS = ref({
-//   [PageEnum.BASE_HOME]: t('routes.basic.baseHome'),
-//   [PageEnum.SECONDARY_HOME]: t('routes.basic.secondaryHome'),
-// });
-const OPTIONS = ref([
-  {
-    value: PageEnum.BASE_HOME,
-    label: t('routes.basic.baseHome'),
-  },
-  {
-    value: PageEnum.SECONDARY_HOME,
-    label: t('routes.basic.secondaryHome'),
-  },
-]);
-
-onMounted(() => {
   // 由于BASE_HOME仅代表了一个页面,其他页面都隶属于SECONDARY_HOME,所以简单处理
   const isBaseHome = router.currentRoute.value.path === PageEnum.BASE_HOME;
-  text.value = isBaseHome ? t('routes.basic.baseHome') : t('routes.basic.secondaryHome');
-});
+  const text = ref(isBaseHome ? PageEnum.BASE_HOME : PageEnum.SECONDARY_HOME);
+
+  function handleMenuClick(value) {
+    router.push({ path: value });
+  }
+
+  // const OPTIONS = ref({
+  //   [PageEnum.BASE_HOME]: t('routes.basic.baseHome'),
+  //   [PageEnum.SECONDARY_HOME]: t('routes.basic.secondaryHome'),
+  // });
+  const OPTIONS = ref([
+    {
+      value: PageEnum.BASE_HOME,
+      label: t('routes.basic.baseHome'),
+    },
+    {
+      value: PageEnum.SECONDARY_HOME,
+      label: t('routes.basic.secondaryHome'),
+    },
+  ]);
 
-defineExpose({ OPTIONS, prefixCls, handleMenuClick });
+  defineExpose({ OPTIONS, prefixCls, handleMenuClick });
 </script>
 <style lang="less" scoped>
-@prefix-cls: ~'@{namespace}-system-select';
+  @prefix-cls: ~'@{namespace}-system-select';
 
-.@{prefix-cls} {
-  max-width: 210px;
-  width: 100%;
-  min-width: 10px;
-  margin-bottom: 10px;
-  position: relative;
-  z-index: @layout-basic-z-index;
-}
+  .@{prefix-cls} {
+    max-width: 210px;
+    width: 100%;
+    min-width: 10px;
+    margin-bottom: 10px;
+    position: relative;
+    z-index: @layout-basic-z-index;
+  }
 
-.@{prefix-cls}.ant-select {
-  :deep(.ant-select-selector) {
-    background-color: @primary-color;
+  .@{prefix-cls}.ant-select {
+    :deep(.ant-select-selector) {
+      background-color: @primary-color;
 
-    .ant-select-selection-item {
-      color: @white;
+      .ant-select-selection-item {
+        color: @white;
+      }
     }
-  }
 
-  :deep(.ant-select-arrow) {
-    color: @white;
+    :deep(.ant-select-arrow) {
+      color: @white;
+    }
   }
-}
 </style>

+ 37 - 1
src/views/analysis/common/analysis.ts

@@ -2,8 +2,12 @@ import { ref } from 'vue';
 import { first } from 'lodash';
 import { getGoafSelectOption } from '../../monitor/sealedMonitor/monitor.api';
 import { useMineDepartmentStore } from '/@/store/modules/mine';
+import { resolveAlarm } from '../warningAnalysis/airLeakStatus/airLeak.api';
+import { message } from 'ant-design-vue';
+import { useModal } from '/@/components/Modal';
+import { TableActionType } from '/@/components/Table';
 
-export function useInitForm() {
+export function useInitForm(ctx?: TableActionType) {
   const mineStore = useMineDepartmentStore();
   // 给历史数据默认填充的矿码
   const hiscode = first(mineStore.getMineCode.split(','));
@@ -24,10 +28,42 @@ export function useInitForm() {
     });
   }
 
+  const [registerModal, modalCtx] = useModal();
+
+  function openModal(record) {
+    resolveId.value = record.id;
+    modalCtx.openModal(true);
+  }
+
+  const resolveId = ref('');
+  const resolveValue = ref('');
+
+  function handleResolve() {
+    const params = {
+      id: resolveId.value,
+      content: resolveValue.value,
+    };
+
+    resolveAlarm(params)
+      .then(() => {
+        message.success('操作成功');
+        modalCtx.closeModal();
+        if (ctx) ctx.reload();
+      })
+      .catch(() => {
+        message.error('操作失败');
+      });
+  }
+
   return {
     goafOptions,
     goafId,
     hiscode,
+    resolveId,
+    resolveValue,
+    registerModal,
+    openModal,
     initGoafOptions,
+    handleResolve,
   };
 }

+ 7 - 11
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -16,7 +16,7 @@
             <span class="action-text">详情</span>
           </button> -->
           <!-- 已解决按钮 -->
-          <button @click="openModal(record, 'resolved')" class="resolved-btn" title="解决">
+          <button @click="openModal(record)" class="resolved-btn" title="解决">
             <SvgIcon name="details" />
           </button>
         </template>
@@ -40,7 +40,7 @@
     </TabPane>
   </Tabs>
   <!-- 弹窗组件 -->
-  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况">
+  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况" @ok="handleResolve">
     <a-textarea class="ml-10px" :style="{ width: `calc(100% - 20px)` }" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
   </BasicModal>
 </template>
@@ -55,15 +55,12 @@
   import { columns } from './airLeakStatus.data';
   import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './airLeak.api';
   import { useInitForm } from '../../common/analysis';
-  import { BasicModal, useModal } from '/@/components/Modal/index';
+  import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
   import { useIntervalFn } from '@vueuse/core';
 
   // 激活的Tab页签
   const activeTab = ref('realtime');
-  const resolveValue = ref('');
-
-  const { goafOptions, goafId, hiscode, initGoafOptions } = useInitForm();
 
   const boardData = ref([
     { label: '存在风险情况数量', value: '-' },
@@ -72,7 +69,7 @@
   ]);
 
   // 注册实时数据表格
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, tableCtx] = useTable({
     title: '密闭漏风状态判定',
     api: getProvinceAlarm,
     columns,
@@ -102,6 +99,8 @@
     },
   });
 
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+
   // 注册历史数据表格
   const [registerHistoryTable, historyTable] = useTable({
     columns,
@@ -174,9 +173,6 @@
     // },
   });
 
-  // 弹窗引用
-  const [registerModal, { openModal }] = useModal();
-
   async function getAlarmTotalData() {
     const params = {
       alarmType: 'leakageAlarm',
@@ -187,7 +183,7 @@
     boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2;
   }
 
-  useIntervalFn(() => reload({ silence: true }), 10000);
+  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
 
   onMounted(() => {
     // 页面挂载时的逻辑

+ 1 - 1
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts

@@ -68,7 +68,7 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: 'O2浓度(ppm)',
+    title: 'O2浓度(%)',
     dataIndex: 'o2Val',
     width: 100,
   },

+ 7 - 11
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -20,7 +20,7 @@
           <template #action="{ record }">
             <div class="action-buttons">
               <!-- 操作按钮 -->
-              <button @click="openModal(record, 'resolved')" class="resolved-btn" title="解决">
+              <button @click="openModal(record)" class="resolved-btn" title="解决">
                 <SvgIcon name="details" />
               </button>
             </div>
@@ -45,7 +45,7 @@
       </TabPane>
     </Tabs>
     <!-- 弹窗组件 -->
-    <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况">
+    <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况" @ok="handleResolve">
       <a-textarea class="ml-10px" :style="{ width: `calc(100% - 20px)` }" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
     </BasicModal>
   </div>
@@ -61,15 +61,12 @@
   import { columns } from './autoFireAnalysis.data';
   import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
   import { useInitForm } from '../../common/analysis';
-  import { BasicModal, useModal } from '/@/components/Modal/index';
+  import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
   import { useIntervalFn } from '@vueuse/core';
 
   // 激活的Tab页签
   const activeTab = ref('realtime');
-  const resolveValue = ref('');
-
-  const { goafOptions, goafId, hiscode, initGoafOptions } = useInitForm();
 
   const boardData = ref([
     {
@@ -95,7 +92,7 @@
   ]);
 
   // 注册实时数据表格
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, tableCtx] = useTable({
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -126,6 +123,8 @@
     },
   });
 
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+
   // 注册历史数据表格
   const [registerHistoryTable, historyTable] = useTable({
     columns,
@@ -197,9 +196,6 @@
     // },
   });
 
-  // 弹窗引用
-  const [registerModal, { openModal }] = useModal();
-
   async function getAlarmTotalData() {
     const params = {
       alarmType: 'fireAlarm',
@@ -212,7 +208,7 @@
     boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
   }
 
-  useIntervalFn(() => reload({ silence: true }), 10000);
+  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
 
   onMounted(() => {
     // 页面挂载时的逻辑

+ 1 - 1
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts

@@ -63,7 +63,7 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: 'O2浓度(ppm)',
+    title: 'O2浓度(%)',
     dataIndex: 'o2Val',
     width: 100,
   },

+ 7 - 11
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -19,7 +19,7 @@
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 已解决按钮 -->
-            <button @click="openModal(record, 'resolved')" class="resolved-btn" title="解决">
+            <button @click="openModal(record)" class="resolved-btn" title="解决">
               <SvgIcon name="details" />
             </button>
           </div>
@@ -44,7 +44,7 @@
     </TabPane>
   </Tabs>
   <!-- 弹窗组件 -->
-  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况">
+  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况" @ok="handleResolve">
     <a-textarea class="ml-10px" :style="{ width: `calc(100% - 20px)` }" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
   </BasicModal>
 </template>
@@ -59,15 +59,12 @@
   import { columns } from './fireAreaJudgeAnalysis.data';
   import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
   import { useInitForm } from '../../common/analysis';
-  import { BasicModal, useModal } from '/@/components/Modal/index';
+  import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
   import { useIntervalFn } from '@vueuse/core';
 
   // 激活的Tab页签
   const activeTab = ref('realtime');
-  const resolveValue = ref('');
-
-  const { goafOptions, goafId, hiscode, initGoafOptions } = useInitForm();
 
   const boardData = ref([
     {
@@ -85,7 +82,7 @@
   ]);
 
   // 注册实时数据表格
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, tableCtx] = useTable({
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -116,6 +113,8 @@
     },
   });
 
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+
   // 注册历史数据表格
   const [registerHistoryTable, historyTable] = useTable({
     columns,
@@ -187,9 +186,6 @@
     // },
   });
 
-  // 弹窗引用
-  const [registerModal, { openModal }] = useModal();
-
   async function getAlarmTotalData() {
     const params = {
       alarmType: 'unsealAlarm',
@@ -200,7 +196,7 @@
     boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
   }
 
-  useIntervalFn(() => reload({ silence: true }), 10000);
+  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
 
   onMounted(() => {
     // 页面挂载时的逻辑

+ 7 - 11
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -19,7 +19,7 @@
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 操作按钮 -->
-            <button @click="openModal(record, 'resolved')" class="resolved-btn" title="解决">
+            <button @click="openModal(record)" class="resolved-btn" title="解决">
               <SvgIcon name="details" />
             </button>
           </div>
@@ -44,7 +44,7 @@
     </TabPane>
   </Tabs>
   <!-- 弹窗组件 -->
-  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况">
+  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况" @ok="handleResolve">
     <a-textarea class="ml-10px" :style="{ width: `calc(100% - 20px)` }" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
   </BasicModal>
 </template>
@@ -59,15 +59,12 @@
   import { columns } from './overlimitAlarm.data';
   import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
   import { useInitForm } from '../../common/analysis';
-  import { BasicModal, useModal } from '/@/components/Modal/index';
+  import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
   import { useIntervalFn } from '@vueuse/core';
 
   // 激活的Tab页签
   const activeTab = ref('realtime');
-  const resolveValue = ref('');
-
-  const { goafOptions, goafId, hiscode, initGoafOptions } = useInitForm();
 
   const boardData = ref([
     {
@@ -93,7 +90,7 @@
   ]);
 
   // 注册实时数据表格
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, tableCtx] = useTable({
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -124,6 +121,8 @@
     },
   });
 
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+
   // 注册历史数据表格
   const [registerHistoryTable, historyTable] = useTable({
     columns,
@@ -195,9 +194,6 @@
     // },
   });
 
-  // 弹窗引用
-  const [registerModal, { openModal }] = useModal();
-
   async function getAlarmTotalData() {
     const params = {
       alarmType: 'overLimitAlarm',
@@ -210,7 +206,7 @@
     boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
   }
 
-  useIntervalFn(() => reload({ silence: true }), 10000);
+  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
 
   onMounted(() => {
     // 页面挂载时的逻辑

+ 1 - 1
src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts

@@ -68,7 +68,7 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: 'O2浓度(ppm)',
+    title: 'O2浓度(%)',
     dataIndex: 'o2Val',
     width: 100,
   },

+ 7 - 11
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -23,7 +23,7 @@
               <span class="action-text">详情</span>
             </button> -->
             <!-- 已解决按钮 -->
-            <button @click="openModal(record, 'resolved')" class="resolved-btn" title="解决">
+            <button @click="openModal(record)" class="resolved-btn" title="解决">
               <SvgIcon name="details" />
             </button>
           </div>
@@ -59,7 +59,7 @@
     <a-table></a-table>
   </a-modal> -->
   <!-- 弹窗组件 -->
-  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况">
+  <BasicModal @register="registerModal" :width="600" :minHeight="100" centered title="处理情况" @ok="handleResolve">
     <a-textarea class="ml-10px" :style="{ width: `calc(100% - 20px)` }" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
   </BasicModal>
 </template>
@@ -74,15 +74,12 @@
   import { columns } from './pressureDiffAnalysis.data';
   import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
   import { useInitForm } from '../../common/analysis';
-  import { BasicModal, useModal } from '/@/components/Modal/index';
+  import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
   import { useIntervalFn } from '@vueuse/core';
 
   // 激活的Tab页签
   const activeTab = ref('realtime');
-  const resolveValue = ref('');
-
-  const { goafOptions, goafId, hiscode, initGoafOptions } = useInitForm();
 
   const boardData = ref([
     {
@@ -108,7 +105,7 @@
   ]);
 
   // 注册实时数据表格
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, tableCtx] = useTable({
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -139,6 +136,8 @@
     },
   });
 
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+
   // 注册历史数据表格
   const [registerHistoryTable, historyTable] = useTable({
     columns,
@@ -210,9 +209,6 @@
     // },
   });
 
-  // 弹窗引用
-  const [registerModal, { openModal }] = useModal();
-
   async function getAlarmTotalData() {
     const params = {
       alarmType: 'sourcePressureAlarm',
@@ -225,7 +221,7 @@
     boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
   }
 
-  useIntervalFn(() => reload({ silence: true }), 10000);
+  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
 
   onMounted(() => {
     // 页面挂载时的逻辑

+ 1 - 1
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts

@@ -63,7 +63,7 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: '日压差均值(Pa)',
+    title: '日压差均值(Pa)',
     dataIndex: 'dailyYaCha',
     width: 100,
   },

+ 5 - 5
src/views/dashboard/basicInfo/dataQuality/components/DataQualityModal.vue

@@ -38,10 +38,6 @@
             <div class="que-field">
               <span class="que-value que-goafName">{{ item.goafName || '-' }}</span>
             </div>
-            <div class="que-field">
-              <span class="que-label">问题描述:</span>
-              <span class="que-value">{{ item.queCon || '-' }}</span>
-            </div>
             <div class="que-field time-field">
               <span class="que-label">时间:</span>
               <span class="que-value">{{ formatDate(item.startTime) || '-' }}</span>
@@ -49,9 +45,13 @@
               <span class="que-value">{{ formatDate(item.endTime) || '-' }}</span>
             </div>
             <div class="que-field">
+              <span class="que-label">问题描述:</span>
+              <span class="que-value">{{ item.queCon || '-' }}</span>
+            </div>
+            <!-- <div class="que-field">
               <span class="que-label">参数:</span>
               <span class="que-value">{{ (item.param || '-').replace(/,/g, ' ') }}</span>
-            </div>
+            </div> -->
           </div>
         </div>
       </div>

+ 1 - 1
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -56,7 +56,7 @@ export function getColumns(dynamicStatusMap: Ref<ProductionStatusMap>) {
       customRender: ({ record }) => {
         const status = record.mineLinkStatus;
         if (status === undefined || status === null) {
-          return h('span', { style: { color: colorHexMap.black } }, '/');
+          return h('span', { style: { color: colorHexMap.black } }, '-');
         }
         const text = status === 1 ? '在线' : '离线';
         const textColor = status === 1 ? colorHexMap.green : colorHexMap.red;

+ 3 - 3
src/views/dashboard/basicInfo/dataQuality/index.vue

@@ -59,10 +59,10 @@
       </BasicTable>
     </TabPane>
     <TabPane key="resolved" tab="已解决">
-      <div class="add-button">
-        <a-button type="default" preIcon="mdi:download" @click="handleExportExcel" style="margin-right: 8px"> 导出 </a-button>
-      </div>
       <BasicTable style="padding: 0" @register="registerResolvedTable">
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="handleExportExcel"> 导出 </a-button>
+        </template>
         <template #queJson="{ record }">
           <div style="display: flex; align-items: center; gap: 8px; width: 100%">
             <span style="flex: 1; text-align: center">

+ 1 - 1
src/views/monitor/sealedMonitor/monitor.data.ts

@@ -218,7 +218,7 @@ export const modalDetailsData: {
       value: 'coVal',
     },
     {
-      label: 'CO2(PPM)',
+      label: 'CO2(%)',
       value: 'co2Val',
     },
     {

+ 16 - 10
src/views/system/algorithm/algorithm.data.ts

@@ -28,10 +28,10 @@ export const columnsCoalAlarm: BasicColumn[] = [
   },*/
 ];
 
-/** 空区超限 表格配置 */
+/** 空区超限 表格配置 */
 export const columnsGoafLimit: BasicColumn[] = [
   {
-    title: '空区名称',
+    title: '空区名称',
     dataIndex: 'devicePos',
     width: 400,
   },
@@ -508,8 +508,9 @@ export const goafAlarmModel = {
 
 export const schemasGoafLimit: FormSchema[] = [
   {
+    // 甲烷
     field: 'ch4Val',
-    label: '甲烷',
+    label: 'CH4(%)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -519,8 +520,9 @@ export const schemasGoafLimit: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
+    // 氧气
     field: 'o2Val',
-    label: '氧气',
+    label: 'O2(%)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -530,8 +532,9 @@ export const schemasGoafLimit: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
+    // 一氧化碳
     field: 'coVal',
-    label: '一氧化碳',
+    label: 'CO(ppm)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -541,8 +544,9 @@ export const schemasGoafLimit: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
+    // 二氧化碳
     field: 'co2Val',
-    label: '二氧化碳',
+    label: 'CO2(%)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -552,8 +556,9 @@ export const schemasGoafLimit: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
+    // 乙烯
     field: 'c2h4Val',
-    label: '乙烯',
+    label: 'C2H4(ppm)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -563,8 +568,9 @@ export const schemasGoafLimit: FormSchema[] = [
     colProps: { span: 12 },
   },
   {
+    // 乙炔
     field: 'c2h2Val',
-    label: '乙炔',
+    label: 'C2H2(ppm)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -575,7 +581,7 @@ export const schemasGoafLimit: FormSchema[] = [
   },
   {
     field: 'sourcePressure',
-    label: '压差',
+    label: '压差(Pa)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',
@@ -586,7 +592,7 @@ export const schemasGoafLimit: FormSchema[] = [
   },
   {
     field: 'temperature',
-    label: '温度',
+    label: '温度(℃)',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',