Kaynağa Gözat

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

lxh 3 ay önce
ebeveyn
işleme
ae208dc4e0
44 değiştirilmiş dosya ile 1894 ekleme ve 1187 silme
  1. 4 27
      src/App.vue
  2. 7 7
      src/components/Configurable/detail/MiniBoard.vue
  3. 0 175
      src/components/Container/src/Adaptive.vue
  4. 205 0
      src/components/Container/src/AdaptiveContainer.vue
  5. 1 1
      src/components/Form/src/TableForm.vue
  6. 3 1
      src/components/Form/src/components/FormGroup.vue
  7. 4 7
      src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue
  8. 1 2
      src/components/Table/src/BasicTable.vue
  9. 2 1
      src/components/Table/src/hooks/useColumns.ts
  10. 12 6
      src/components/Table/src/hooks/useTableScroll.ts
  11. 4 0
      src/main.ts
  12. 0 40
      src/qiankun/apps.ts
  13. 0 51
      src/qiankun/index.ts
  14. 0 58
      src/qiankun/state.ts
  15. 13 10
      src/store/modules/mine.ts
  16. 16 40
      src/utils/index.ts
  17. 42 14
      src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts
  18. 2 2
      src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts
  19. 256 235
      src/views/analysis/warningAnalysis/airLeakStatus/index.vue
  20. 35 0
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts
  21. 2 2
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts
  22. 128 3
      src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue
  23. 35 0
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts
  24. 2 2
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts
  25. 118 3
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue
  26. 128 3
      src/views/analysis/warningAnalysis/overlimitAlarm/index.vue
  27. 32 0
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts
  28. 2 2
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts
  29. 140 15
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue
  30. 36 0
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts
  31. 2 2
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts
  32. 128 3
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue
  33. 36 0
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts
  34. 2 2
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts
  35. 13 13
      src/views/dashboard/SealedGoaf/configurable.data.sealedGoaf.ts
  36. 0 8
      src/views/dashboard/basicInfo/accessStatistics/access.data.ts
  37. 1 3
      src/views/dashboard/basicInfo/accessStatistics/index.vue
  38. 93 108
      src/views/dashboard/basicInfo/closedStatistics/closed.data.ts
  39. 57 31
      src/views/dashboard/basicInfo/closedStatistics/index.vue
  40. 105 57
      src/views/dashboard/basicInfo/dataQuality/components/DataQualityModal.vue
  41. 60 127
      src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts
  42. 129 40
      src/views/dashboard/basicInfo/dataQuality/index.vue
  43. 3 4
      src/views/dashboard/basicInfo/minesInfo/index.vue
  44. 35 82
      src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts

+ 4 - 27
src/App.vue

@@ -1,5 +1,5 @@
 <template>
-  <AdaptiveContainer :options="{ width: width, height: height }" style="overflow-y: hidden">
+  <AdaptiveContainer :options="adaptiveOptions">
     <ConfigProvider :theme="appTheme" :locale="getAntdLocale">
       <AppProvider>
         <RouterView />
@@ -9,7 +9,7 @@
 </template>
 
 <script lang="ts" setup>
-  import { watch, ref, nextTick, provide, onUnmounted} from 'vue';
+  import { watch, ref } from 'vue';
   import { theme } from 'ant-design-vue';
   import { ConfigProvider } from 'ant-design-vue';
   import { AppProvider } from '/@/components/Application';
@@ -19,38 +19,15 @@
   import { useRootSetting } from '/@/hooks/setting/useRootSetting';
   import { ThemeEnum } from '/@/enums/appEnum';
   import { changeTheme } from '/@/logics/theme/index';
-  import AdaptiveContainer from '/@/components/Container/src/Adaptive.vue';
+  import AdaptiveContainer from '/@/components/Container/src/AdaptiveContainer.vue';
 
   const appStore = useAppStore();
   // 解决日期时间国际化问题
   import 'dayjs/locale/zh-cn';
   // support Multi-language
   const { getAntdLocale } = useLocale();
-  const isReload = ref(false);
-  const width = ref(1920);
-  const height = ref(928);
 
-  const body = document.body.getBoundingClientRect();
-  if (screen.height === body.height && screen.width === body.width) {
-    height.value = 1080;
-  }
-
-  const reloadRouter = () => {
-    isReload.value = true;
-    nextTick(() => {
-      isReload.value = false;
-    });
-  };
-  provide('reloadRouter', reloadRouter);
-  onUnmounted(() => {
-    window['renderer']?.dispose();
-    window['renderer']?.forceContextLoss();
-    if (window['renderer']) {
-      window['renderer'].content = null;
-    }
-    const gl = window['renderer']?.domElement.getContext('webgl');
-    gl && gl.getExtension('WEBGL_lose_context').loseContext();
-  });
+  const adaptiveOptions = ref({});
 
   useTitle();
   /**

+ 7 - 7
src/components/Configurable/detail/MiniBoard.vue

@@ -131,7 +131,7 @@
   }
   .mini-board_A {
     width: 220px;
-    height: 44px;
+    height: 52px;
     display: flex;
     justify-content: space-between;
     align-items: center;
@@ -171,10 +171,10 @@
   }
   .mini-board_B {
     width: 98px;
-    height: 98px;
+    height: 110px;
     background-image: var(--image-board-bg-B);
     background-size: 100% 100%;
-    padding-top: 30px;
+    padding-top: 38px;
   }
 
   .mini-board__label_B {
@@ -187,7 +187,7 @@
     font-size: 26px;
     font-weight: bold;
     font-family: 'Microsoft YaHei';
-    padding-bottom: 15px;
+    padding-bottom: 17px;
   }
   /* 1. 第一个容器:label和value为蓝色 */
   .mini-board_B:nth-child(1) .mini-board__label_B,
@@ -214,10 +214,10 @@
   }
   .mini-board_C {
     width: 98px;
-    height: 98px;
+    height: 110px;
     background-image: var(--image-board-bg-B);
     background-size: 100% 100%;
-    padding-top: 30px;
+    padding-top: 38px;
   }
 
   .mini-board__label_C {
@@ -230,7 +230,7 @@
     font-size: 26px;
     font-weight: bold;
     font-family: 'Microsoft YaHei';
-    padding-bottom: 15px;
+    padding-bottom: 17px;
   }
   /* 1. 第一个容器:label和value为蓝色 */
   .mini-board_C:nth-child(1) .mini-board__label_C,

+ 0 - 175
src/components/Container/src/Adaptive.vue

@@ -1,175 +0,0 @@
-<template>
-  <div id="adaptive-container" :ref="refName">
-    <template v-if="ready">
-      <slot></slot>
-    </template>
-  </div>
-</template>
-
-<script>
-  import { ref, onMounted, onUnmounted, nextTick, defineComponent } from 'vue';
-  import { debounce, setRem } from '/@/utils/index';
-  import { useAppStore } from '/@/store/modules/app';
-  import { getActions } from '/@/qiankun/state';
-
-  export default defineComponent({
-    name: 'AdaptiveContainer',
-    props: {
-      options: Object,
-    },
-    setup(ctx) {
-      const appStore = useAppStore();
-
-      const refName = 'AdaptiveContainer'; //AdaptiveContainer
-      // 屏幕宽度
-      const width = ref(0);
-      // 屏幕高度
-      const height = ref(0);
-      // 原始屏幕宽度
-      const originalWidth = ref(0);
-      // 原始屏幕高度
-      const originalHeight = ref(0);
-      // 控制显示
-      const ready = ref(false);
-      /*
-       * dom:well-container的dom
-       * observer: window.MutationObserver(Bom实例)监听dom改变
-       */
-      let dom, observer;
-      const actions = getActions();
-
-      //设置初始值
-      const initSize = () => {
-        return new Promise((resolve) => {
-          nextTick(() => {
-            dom = document.getElementById('adaptive-container');
-            // 获取大屏的传入尺寸
-            if (ctx.options && ctx.options.width && ctx.options.height) {
-              //传入宽高
-              width.value = ctx.options.width;
-              height.value = ctx.options.height;
-            } else {
-              //可见宽高
-              width.value = dom.clientWidth;
-              height.value = dom.clientHeight;
-            }
-            // 获取画布尺寸
-            if (!originalWidth.value || !originalHeight.value) {
-              //屏幕分辨率宽高
-              originalWidth.value = window.screen.width;
-              originalHeight.value = window.screen.height;
-            }
-            resolve();
-          });
-        });
-      };
-
-      const updateSize = () => {
-        if (width.value && height.value) {
-          dom.style.width = `${width.value}px`;
-          dom.style.height = `${height.value}px`;
-        } else {
-          dom.style.width = `${originalWidth.value}px`;
-          dom.style.height = `${originalHeight.value}px`;
-        }
-      };
-
-      const updateScale = () => {
-        // debugger
-        // 获取真实的视口尺寸
-        const currentWidth = document.body.clientWidth;
-        const currentHeight = document.body.clientHeight;
-        // 获取大屏最终的宽高
-        const realWidth = width.value || originalWidth.value;
-        const realHeight = height.value || originalHeight.value;
-        // console.log(currentWidth, currentHeight)
-        // 缩放比例  = 分辨率宽高 / 传入宽高(可视宽高)
-        const widthScale = currentWidth / realWidth;
-        const heightScale = currentHeight / realHeight;
-        appStore.setWidthScale(widthScale);
-        appStore.setHeightScale(heightScale);
-        actions.setGlobalState({ widthScale, heightScale });
-
-        //如果dom存在,就按照比例缩放
-        dom && (dom.style.transform = `scale(${widthScale}, ${heightScale})`);
-      };
-      const cssSize = () => {
-        const currentWidth = document.body.clientWidth;
-        const realWidth = width.value || originalWidth.value;
-        const whdef = 100 / currentWidth; // 表示1920的设计图,使用100PX的默认值
-        const wW = currentWidth / realWidth; // 当前窗口的宽度
-        const rem = wW * whdef; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
-        // document.documentElement.style.fontSize = rem + 'px';
-        document.documentElement.style.fontSize = rem + 'px';
-        window.addEventListener('resize', function () {
-          const whdef = 100 / currentWidth; // 表示1920的设计图,使用100PX的默认值
-          const wW = window.innerWidth; // 当前窗口的宽度
-          const rem = wW * whdef; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
-          document.documentElement.style.fontSize = rem + 'px';
-        });
-      };
-
-      //重置缩放比例
-      const onResize = async () => {
-        // debugger;
-        await initSize();
-        updateScale();
-        setRem();
-        cssSize();
-      };
-
-      const initMutationObserver = () => {
-        //监听元素属性变化
-        const MutationObserver = window.MutationObserver;
-        //如果变化,就用onResize重置屏幕所缩放比例
-        observer = new MutationObserver(onResize);
-        observer.observe(dom, {
-          attributes: true,
-          // attributeFilter: ['style'],
-          attributeOldValue: true,
-        });
-      };
-      //移除监听属性
-      const removeMutationObserver = () => {
-        if (observer) {
-          observer.disconnect();
-          observer.takeRecords();
-          observer = null;
-        }
-      };
-      //
-      onMounted(async () => {
-        ready.value = false;
-        await initSize();
-        updateSize();
-        updateScale();
-        setRem();
-        cssSize();
-        window.addEventListener('resize', debounce(100, onResize));
-        // initMutationObserver();
-        ready.value = true;
-      });
-
-      onUnmounted(() => {
-        window.removeEventListener('resize', onResize);
-        // removeMutationObserver();
-      });
-
-      return {
-        refName,
-        ready,
-      };
-    },
-  });
-</script>
-
-<style lang="less" scoped>
-  #adaptive-container {
-    position: relative;
-    top: 0;
-    left: 0;
-    overflow: hidden;
-    transform-origin: left top;
-    z-index: 0;
-  }
-</style>

+ 205 - 0
src/components/Container/src/AdaptiveContainer.vue

@@ -0,0 +1,205 @@
+<!-- AdaptiveContainer.vue -->
+<template>
+  <div ref="containerRef" class="adaptive-container">
+    <slot />
+  </div>
+</template>
+
+<script lang="ts">
+  import { defineComponent, ref, onMounted, onUnmounted } from 'vue';
+  import { debounce } from 'lodash-es';
+  import { useAppStore } from '/@/store/modules/app';
+  import { computed } from 'vue';
+
+  // 类型定义
+  interface AdaptiveOptions {
+    width?: number;
+    height?: number;
+    baseWidth?: number; // 设计稿基准宽度,用于REM计算
+    minScale?: number; // 最小缩放比例
+    maxScale?: number; // 最大缩放比例
+    debounceTime?: number; // 防抖时间(ms)
+    ratio?: number; // 宽高比
+    tolerance?: number; // 宽高比容忍度
+  }
+
+  interface ScaleInfo {
+    widthScale: number;
+    heightScale: number;
+    scale: number;
+  }
+
+  export default defineComponent({
+    name: 'AdaptiveContainer',
+    props: {
+      options: {
+        type: Object as () => AdaptiveOptions,
+        default: () => ({}),
+      },
+    },
+    setup(props) {
+      const appStore = useAppStore();
+      const containerRef = ref<HTMLElement | null>(null);
+      // const isReady = ref(false);
+
+      // 默认配置
+      const defaultOptions = ref<Required<AdaptiveOptions>>({
+        width: 1912,
+        height: 948,
+        baseWidth: 1920,
+        minScale: 0.5,
+        maxScale: 2,
+        debounceTime: 100,
+        ratio: 16 / 9,
+        tolerance: 0.1,
+      });
+
+      // 合并配置
+      const config = computed(() => {
+        return {
+          ...defaultOptions.value,
+          ...props.options,
+        };
+      });
+
+      // 设计稿尺寸
+      const designSize = computed(() => {
+        return {
+          width: config.value.width,
+          height: config.value.height,
+        };
+      });
+
+      /**
+       * 设置REM基准值
+       * @param baseSize 基准大小,默认16px
+       */
+      const setRem = (baseSize: number = 16): void => {
+        try {
+          const baseVal = baseSize / config.value.baseWidth;
+          const vW = window.innerWidth;
+          const rem = vW * baseVal;
+
+          // 设置全局缩放比例(如果有需要)
+          if (typeof window['$size'] !== 'number') {
+            Object.defineProperty(window, '$size', {
+              value: rem / 100,
+              writable: true,
+            });
+          } else {
+            window['$size'] = rem / 100;
+          }
+
+          // document.documentElement.style.fontSize = `${rem}px`;
+        } catch (error) {
+          console.error('设置REM失败:', error);
+          // 回退方案:使用固定REM
+          document.documentElement.style.fontSize = `${baseSize}px`;
+        }
+      };
+
+      /**
+       * 计算缩放比例
+       */
+      const calculateScale = (): ScaleInfo => {
+        const { width: designWidth, height: designHeight } = designSize.value;
+        const { innerWidth: currentWidth, innerHeight: currentHeight } = window;
+        const { minScale, maxScale } = config.value;
+
+        // 计算原始比例
+        const rawWidthScale = currentWidth / designWidth;
+        const rawHeightScale = currentHeight / designHeight;
+
+        // 应用比例限制
+        const widthScale = Math.max(minScale, Math.min(maxScale, rawWidthScale));
+        const heightScale = Math.max(minScale, Math.min(maxScale, rawHeightScale));
+
+        // 选择最小比例保持内容完整显示
+        const scale = Math.min(widthScale, heightScale);
+
+        return { widthScale, heightScale, scale };
+      };
+
+      /**
+       * 应用缩放变换
+       */
+      const applyScale = (): void => {
+        if (!containerRef.value) return;
+
+        const container = containerRef.value;
+        const { widthScale, heightScale } = calculateScale();
+
+        // 应用缩放
+        container.style.transform = `scale(${widthScale}, ${heightScale})`;
+        // container.style.transformOrigin = 'top left';
+
+        // 更新store中的比例信息(如果需要)
+        appStore.setWidthScale(widthScale);
+        appStore.setHeightScale(heightScale);
+      };
+
+      /**
+       * 处理窗口大小变化
+       */
+      const handleResize = debounce((): void => {
+        // 更新缩放和REM
+        applyScale();
+        setRem();
+      }, config.value.debounceTime);
+
+      onMounted(async () => {
+        // 生命周期
+        try {
+          if (!containerRef.value) {
+            // if (!document.getElementById('app')) {
+            throw new Error('容器元素未找到');
+          }
+          const container = containerRef.value;
+          const { ratio, tolerance } = config.value;
+          const normalRatio = Math.abs(ratio - container.clientWidth / container.clientHeight) < ratio * tolerance;
+          // const container = document.getElementById('app')!;
+          if (normalRatio) {
+            defaultOptions.value.width = container.clientWidth;
+            defaultOptions.value.height = container.clientHeight;
+          }
+
+          const { width, height } = designSize.value;
+          container.style.width = `${width}px`;
+          container.style.height = `${height}px`;
+
+          applyScale();
+          setRem();
+        } catch (error) {
+          console.error('初始化自适应容器失败:', error);
+        }
+
+        window.addEventListener('resize', handleResize);
+      });
+
+      onUnmounted(() => {
+        window.removeEventListener('resize', handleResize);
+      });
+
+      return {
+        containerRef,
+        // isReady,
+      };
+    },
+  });
+</script>
+
+<style lang="less" scoped>
+  .adaptive-container {
+    // position: relative;
+    // top: 0;
+    // left: 0;
+    overflow: hidden;
+    height: 100%;
+    width: 100%;
+    transform-origin: left top;
+    // z-index: 0;
+    // 防止缩放导致的模糊(开启GPU加速)
+    backface-visibility: hidden;
+    // -webkit-font-smoothing: antialiased;
+  }
+</style>

+ 1 - 1
src/components/Form/src/TableForm.vue

@@ -1,7 +1,7 @@
 <template>
   <Flex class="mb-6px" align="center" justify="space-between">
     <slot name="formTitle">
-      <FormGroup v-model:value="currentGroup" :groups="getBindValue.schemaGroupNames"></FormGroup>
+      <FormGroup v-model:value="currentGroup" :groups="getBindValue.schemaGroupNames" @change="$emit('advanced-change')" />
     </slot>
 
     <FormAction v-bind="getFormActionBindProps" :form-item-props="{ noStyle: true }" @toggle-advanced="handleToggleAdvanced">

+ 3 - 1
src/components/Form/src/components/FormGroup.vue

@@ -32,15 +32,17 @@
         default: () => [],
       },
     },
-    emits: ['update:value'],
+    emits: ['update:value', 'change'],
     setup(props, { emit }) {
       const attrs = useAttrs();
 
       function handleClick(value?: string) {
         if (props.value === value) {
           emit('update:value', undefined);
+          emit('change', undefined);
         } else {
           emit('update:value', value);
+          emit('change', value);
         }
       }
 

+ 4 - 7
src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue

@@ -20,7 +20,7 @@
 
 <script lang="ts">
   import { get, last } from 'lodash';
-  import { defineComponent, onMounted, computed } from 'vue';
+  import { defineComponent, computed } from 'vue';
   // import { useMessage } from '/@/hooks/web/useMessage';
   import { propTypes } from '/@/utils/propTypes';
   import { useMineStore } from '/@/store/modules/mine';
@@ -40,7 +40,7 @@
     setup(props, { emit }) {
       // const { createMessage } = useMessage();
       const mineStore = useMineStore();
-      const { getMine, getMineCode, getMinePath, getMineTree } = storeToRefs(mineStore);
+      const { getMine, getMinePath, getMineTree, getMineId } = storeToRefs(mineStore);
 
       // const shownText = computed(() => getMine.value.departName || '-');
       const innerValue = computed(() => getMinePath.value.map((e) => e.id));
@@ -57,16 +57,13 @@
         if (props.valueField) {
           val = get(getMine.value, props.valueField);
         } else {
-          val = getMineCode.value;
+          val = getMineId.value;
         }
         emit('update:value', val);
         emit('change', val);
       }
 
-      onMounted(() => {
-        mineStore.fetchMineTree();
-        // mineStore.fetchMineTree(props.level);
-      });
+      handleChange([mineStore.mineId]);
 
       return {
         innerValue,

+ 1 - 2
src/components/Table/src/BasicTable.vue

@@ -31,7 +31,7 @@
           :rowClassName="getRowClassName"
           @resize-column="handleResizeColumn"
           @change="handleTableChange"
-          style="width: 100%; height: 80% !important; overflow: auto;"
+          style="width: 100%; height: 80% !important; overflow: auto"
         >
           <!-- antd的原生插槽直接传递 -->
           <template #[item]="data" v-for="item in slotNamesGroup.native" :key="item">
@@ -441,7 +441,6 @@
             findItem.width = w;
             setColumns(columns);
           }
-          console.log('col', col);
           col.width = w;
         },
         getFormProps: getFormProps as any,

+ 2 - 1
src/components/Table/src/hooks/useColumns.ts

@@ -7,7 +7,8 @@ import { renderEditCell } from '../components/editable';
 import { usePermission } from '/@/hooks/web/usePermission';
 import { useI18n } from '/@/hooks/web/useI18n';
 import { isArray, isBoolean, isFunction, isMap, isString } from '/@/utils/is';
-import { cloneDeep, isEmpty, isEqual, isNil } from 'lodash-es';
+import { cloneDeep, isEqual, isNil } from 'lodash-es';
+import { isEmpty } from '/@/utils/is';
 import { formatToDate } from '/@/utils/dateUtil';
 import { ACTION_COLUMN_FLAG, DEFAULT_ALIGN, INDEX_COLUMN_FLAG, PAGE_SIZE, COLUMN_DEFAULT_TEXT } from '../const';
 import { CUS_SEL_COLUMN_KEY } from './useCustomSelection';

+ 12 - 6
src/components/Table/src/hooks/useTableScroll.ts

@@ -8,6 +8,7 @@ import { useModalContext } from '/@/components/Modal';
 import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated';
 import { useDebounceFn } from '@vueuse/core';
 import componentSetting from '/@/settings/componentSetting';
+import { useAppStore } from '/@/store/modules/app';
 
 export function useTableScroll(
   propsRef: ComputedRef<BasicTableProps>,
@@ -21,6 +22,7 @@ export function useTableScroll(
   const tableHeightRef: Ref<Nullable<number>> = ref(null);
 
   const modalFn = useModalContext();
+  const appStore = useAppStore();
 
   // Greater than animation time 280
   const debounceRedoHeight = useDebounceFn(redoHeight, 100);
@@ -58,7 +60,7 @@ export function useTableScroll(
   let bodyEl: HTMLElement | null;
 
   async function calcTableHeight() {
-    const { resizeHeightOffset, pagination, maxHeight, minHeight } = unref(propsRef);
+    const { resizeHeightOffset = 2, pagination, maxHeight, minHeight } = unref(propsRef);
     const tableData = unref(getDataSourceRef);
 
     const table = unref(tableElRef);
@@ -100,13 +102,18 @@ export function useTableScroll(
     if (!headEl) return;
 
     // Table height from bottom
-    const { bottomIncludeBody } = getViewportOffset(headEl);
+    const vpoffset = getViewportOffset(headEl);
+    // Table height after calculating the scale on html tag
+    const bottomIncludeBody = vpoffset.bottomIncludeBody / appStore.heightScale;
     // Table height from bottom height-custom offset
 
     const paddingHeight = 32;
     // Pager height
     let paginationHeight = 2;
-    if (!isBoolean(pagination)) {
+    // 经实践发现只有指定pagination为false才不会显示分页器
+    if (pagination === false) {
+      paginationHeight = -8;
+    } else {
       paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement;
       if (paginationEl) {
         const offsetHeight = paginationEl.offsetHeight;
@@ -115,8 +122,6 @@ export function useTableScroll(
         // TODO First fix 24
         paginationHeight += 24;
       }
-    } else {
-      paginationHeight = -8;
     }
 
     let footerHeight = 0;
@@ -132,7 +137,8 @@ export function useTableScroll(
       headerHeight = (headEl as HTMLElement).offsetHeight;
     }
 
-    let height = bottomIncludeBody - (resizeHeightOffset || 0) - paddingHeight - paginationHeight - footerHeight - headerHeight;
+    // 高度为表格高度减去底部各个元素高度-内外边距-布局下边距
+    let height = bottomIncludeBody - resizeHeightOffset - paddingHeight - paginationHeight - footerHeight - headerHeight;
     // update-begin--author:liaozhiyang---date:20240603---for【TV360X-861】列表查询区域不可往上滚动
     // 10+6(外层边距padding:10 + 内层padding-bottom:6)
     height -= 16;

+ 4 - 0
src/main.ts

@@ -18,6 +18,7 @@ import { registerGlobComp } from '/@/components/registerGlobComp';
 import { registerThirdComp } from '/@/settings/registerThirdComp';
 import { useSso } from '/@/hooks/web/useSso';
 import { useAppStoreWithOut } from '@/store/modules/app';
+import { useMineStore } from './store/modules/mine';
 
 // 程序入口
 async function main() {
@@ -116,4 +117,7 @@ function setupProps(props?: MainAppProps) {
   }
   const appStore = useAppStoreWithOut();
   appStore.setMainAppProps(props);
+
+  const mineStore = useMineStore();
+  mineStore.fetchMineTree();
 }

+ 0 - 40
src/qiankun/apps.ts

@@ -1,40 +0,0 @@
-import { prefetchApps, AppMetadata } from 'qiankun';
-/**
- *微应用apps
- * @name: 微应用名称 - 具有唯一性
- * @entry: 微应用入口.必选 - 通过该地址加载微应用,
- * @container: 微应用挂载节点 - 微应用加载完成后将挂载在该节点上
- * @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用
- */
-//子应用列表
-const _apps: AppMetadata[] = [];
-for (const key in import.meta.env) {
-  if (key === 'VITE_APP_SUB_APP') {
-    const appList = JSON.parse(import.meta.env[key].replace(/'/g, '"'));
-
-    appList.forEach((app) => {
-      let utlStr;
-      if (import.meta.env.PROD) {
-        // 多端口请求
-        if (VUE_APP_URL.baseUrl.split(':').length > 1) {
-          utlStr = VUE_APP_URL.baseUrl.split(':')[1] + app[1];
-        } else {
-          utlStr = app[1];
-        }
-      } else {
-        utlStr = app[1];
-      }
-      const obj = {
-        name: app[0],
-        entry: utlStr,
-        container: `#${app[0]}`,
-        activeRule: app[0],
-      };
-      // debugger;
-
-      _apps.push(obj);
-    });
-  }
-  prefetchApps([..._apps]);
-}
-export const apps = _apps;

+ 0 - 51
src/qiankun/index.ts

@@ -1,51 +0,0 @@
-/**
- * qiankun配置
- */
-import { loadMicroApp, start } from 'qiankun';
-import { apps } from './apps';
-import { getProps } from './state';
-
-const activeApps = {};
-/**
- * 重构apps
- */
-function filterApps() {
-  apps.forEach((item) => {
-    //主应用需要传递给微应用的数据。
-    item['props'] = getProps();
-
-    //微应用触发的路由规则
-    // @ts-ignore
-    item.activeRule = item.activeRule.startsWith('/') ? item.activeRule : `/${item.activeRule}`;
-  });
-  return apps;
-}
-
-const mountMicroApp = (name, isReFresh = false) => {
-  const microApps = filterApps();
-  const app = microApps.find((item) => item.name === name);
-  if (app) {
-    const instance = activeApps[app.name];
-    if (instance && instance.getStatus() === 'NOT_MOUNTED' && !isReFresh) {
-      instance.mount(app);
-    } else {
-      delete activeApps[app.name];
-      activeApps[app.name] = loadMicroApp(app, { autoStart: false, sandbox: { strictStyleIsolation: false } }); // 手动加载子应用'
-    }
-  }
-};
-
-// 卸载app的方法
-const unmountMicroApps = async (multipleApp) => {
-  if (JSON.stringify(activeApps) !== '{}' && multipleApp.some) {
-    for (const key in activeApps) {
-      multipleApp.filter(async (name) => {
-        if (name.includes(key)) {
-          await activeApps[key].unmount();
-        }
-      });
-    }
-  }
-};
-
-export { mountMicroApp, unmountMicroApps, activeApps };

+ 0 - 58
src/qiankun/state.ts

@@ -1,58 +0,0 @@
-/**
- *公共数据
- */
-import { initGlobalState } from 'qiankun';
-import { store } from '/@/store';
-import { router } from '/@/router';
-import { getToken } from '/@/utils/auth';
-
-let actions;
-
-//定义传入子应用的数据
-export function getProps() {
-  return {
-    data: {
-      publicPath: '/',
-      token: getToken(),
-      store: store,
-      router,
-      isMounted: false,
-    },
-    actions: getActions(),
-  };
-}
-
-/**
- * 定义全局状态,并返回通信方法,在主应用使用,微应用通过 props 获取通信方法。
- * @param state 主应用穿的公共数据
- */
-export function initGlState(
-  info: any = { token: '', userInfo: {}, isMounted: false, locationObj: null, locationId: '', pageObj: null, widthScale: 1, heightScale: 1 }
-) {
-  if (actions) return;
-  // 初始化state
-  actions = initGlobalState(info);
-  // 设置新的值
-  actions.setGlobalState({
-    token: getToken(),
-    isMounted: false,
-    pageObj: {},
-    widthScale: 1,
-    heightScale: 1,
-    url: {},
-  });
-  // 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。
-  actions.onGlobalStateChange((newState, prev) => {
-    // state: 变更后的状态; prev 变更前的状态
-    console.info('newState', newState);
-    console.info('prev', prev);
-    for (const key in newState) {
-      console.info('onGlobalStateChange', key);
-    }
-  });
-}
-
-export function getActions() {
-  if (!actions) initGlState();
-  return actions;
-}

+ 13 - 10
src/store/modules/mine.ts

@@ -25,7 +25,7 @@ export interface MineState {
   /** 当前选中的矿井ID,可能为空 */
   mineId?: MineDepartment['id'];
   /** 当前选中的矿井编号,可能为空 */
-  mineCode?: MineDepartment['fax'];
+  // mineCode?: MineDepartment['fax'];
   /** 当前选中的矿井在组织树中的访问路径 */
   minePath: MineDepartment[];
   /** 矿井组织树 */
@@ -43,7 +43,7 @@ export const useMineStore = defineStore({
   state: (): MineState => ({
     mine: undefined,
     mineId: undefined,
-    mineCode: undefined,
+    // mineCode: undefined,
     minePath: [],
     mineTree: [],
   }),
@@ -54,9 +54,9 @@ export const useMineStore = defineStore({
     getMineId(): MineState['mineId'] {
       return this.getMine?.id;
     },
-    getMineCode(): MineState['mineCode'] {
-      return this.getMine?.fax;
-    },
+    // getMineCode(): MineState['mineCode'] {
+    //   return this.getMine?.fax;
+    // },
     getMineTree(): MineState['mineTree'] {
       return this.mineTree;
     },
@@ -78,10 +78,10 @@ export const useMineStore = defineStore({
       this.setMine(node);
     },
     /** 根据传入的code设置当前选中的矿井,更新id、code、path三项 */
-    setMineByCode(code: string = '') {
-      const node = findNode(this.getMineTree, (item) => item.fax === code, DEFAULT_CONFIG);
-      this.setMine(node);
-    },
+    // setMineByCode(code: string = '') {
+    //   const node = findNode(this.getMineTree, (item) => item.fax === code, DEFAULT_CONFIG);
+    //   this.setMine(node);
+    // },
     setMinePath(path: any[] = []) {
       this.minePath = path;
     },
@@ -92,7 +92,10 @@ export const useMineStore = defineStore({
       const r1 = await getEnfMineTree();
       const r2 = await getUserMinePermissionData({});
       r1.forEach((e) => (e.isLeaf = false));
-      r2.forEach((e) => (e.isLeaf = true));
+      r2.forEach((e) => {
+        e.isLeaf = true;
+        e.id = e.fax;
+      });
       const tree = listToTree([...r1, ...r2], DEFAULT_CONFIG);
       // 使用查找方法而不是选中r2中第一个“叶节点”是因为:
       // r2返回的矿名不具备权限控制,r1返回的父节点才有权限控制

+ 16 - 40
src/utils/index.ts

@@ -1,11 +1,11 @@
 import type { RouteLocationNormalized, RouteRecordNormalized } from 'vue-router';
 import type { App, Plugin } from 'vue';
-import type { FormSchema, FormActionType } from "@/components/Form";
+import type { FormSchema, FormActionType } from '@/components/Form';
 
 import { unref } from 'vue';
 import { isObject, isFunction, isString } from '/@/utils/is';
 import Big from 'big.js';
-import dayjs from "dayjs";
+import dayjs from 'dayjs';
 // 代码逻辑说明: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
 export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`;
 
@@ -95,7 +95,7 @@ export function getDynamicProps<T, U>(props: T): Partial<U> {
  * @updateBy:zyf
  */
 export function getValueType(props, field) {
-  const formSchema = unref(unref(props)?.schemas)
+  const formSchema = unref(unref(props)?.schemas);
   let valueType = 'string';
   if (formSchema) {
     const schema = formSchema.filter((item) => item.field === field)[0];
@@ -265,7 +265,7 @@ export function getQueryVariable(url) {
     r,
     i = url.split('?')[1],
     s = {};
-  (t = i.split('&')), (r = null), (n = null);
+  ((t = i.split('&')), (r = null), (n = null));
   for (const o in t) {
     const u = t[o].indexOf('=');
     u !== -1 && ((r = t[o].substr(0, u)), (n = t[o].substr(u + 1)), (s[r] = n));
@@ -376,7 +376,6 @@ export function importViewsFile(path): Promise<any> {
   });
 }
 
-
 /**
  * 跳转至积木报表的 预览页面
  * @param url
@@ -385,22 +384,21 @@ export function importViewsFile(path): Promise<any> {
  */
 export function goJmReportViewPage(url, id, token) {
   // URL支持{{ window.xxx }}占位符变量
-  url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => _eval(s2))
+  url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => _eval(s2));
   if (url.includes('?')) {
-    url += '&'
+    url += '&';
   } else {
-    url += '?'
+    url += '?';
   }
-  url += `id=${id}`
-  url += `&token=${token}`
-  window.open(url)
+  url += `id=${id}`;
+  url += `&token=${token}`;
+  window.open(url);
 }
 
 /**
  * 获取随机颜色
  */
 export function getRandomColor(index?) {
-
   const colors = [
     'rgb(100, 181, 246)',
     'rgb(77, 182, 172)',
@@ -423,7 +421,7 @@ export function getRandomColor(index?) {
     'rgb(254, 161, 172)',
     'rgb(194, 163, 205)',
   ];
-  return index && index < 19 ? colors[index] : colors[Math.floor((Math.random()*(colors.length-1)))];
+  return index && index < 19 ? colors[index] : colors[Math.floor(Math.random() * (colors.length - 1))];
 }
 
 export function getRefPromise(componentRef) {
@@ -447,7 +445,7 @@ export function getRefPromise(componentRef) {
  * 用new Function替换eval
  */
 export function _eval(str: string) {
- return new Function(`return ${str}`)();
+  return new Function(`return ${str}`)();
 }
 
 /**
@@ -492,7 +490,7 @@ export const setPopContainer = (node, selector) => {
       const retrospect = (node, elems) => {
         let ele = node.parentNode;
         while (ele) {
-          const findParentNode = elems.find(item => item === ele);
+          const findParentNode = elems.find((item) => item === ele);
           if (findParentNode) {
             ele = null;
             return findParentNode;
@@ -523,12 +521,11 @@ export const setPopContainer = (node, selector) => {
  * label、value通用,title、val给权限管理用的
  */
 export function useConditionFilter() {
-
   // 通用条件
   const commonConditionOptions = [
-    {label: '为空', value: 'empty', val: 'EMPTY'},
-    {label: '不为空', value: 'not_empty', val: 'NOT_EMPTY'},
-  ]
+    { label: '为空', value: 'empty', val: 'EMPTY' },
+    { label: '不为空', value: 'not_empty', val: 'NOT_EMPTY' },
+  ];
 
   // 数值、日期
   const numberConditionOptions = [
@@ -669,24 +666,3 @@ export const split = (str) => {
   }
   return str;
 };
-
-// 防抖截流
-export function debounce(delay, callback) {
-  let task;
-  return function () {
-    clearTimeout(task);
-    task = setTimeout(() => {
-      callback.apply(this, arguments);
-    }, delay);
-  };
-}
-
-export function setRem() {
-  // 默认使用100px作为基准大小
-  const baseSize = 100;
-  const baseVal = baseSize / 1920;
-  const vW = window.innerWidth; // 当前窗口的宽度
-  const rem = vW * baseVal; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应font-size值
-  window.$size = rem / 100;
-  document.documentElement.style.fontSize = rem + 'px';
-}

+ 42 - 14
src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts

@@ -3,10 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
-  getGoafData = '/province/device/getGoafData',
-  getProvinceAlarmHistory = '/province/device/getProvinceAlarmHistory',
+  getGoafData = '/province/device/getGoafList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
   getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -15,22 +25,40 @@ export const getMineData = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarmHistory,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params: {
+        alarmType: 'leakageAlarm',
+        ...params,
+      },
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //获取执法处以及区域数据
 export const getEnfMineTreeData = () =>
   defHttp.get({

+ 2 - 2
src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts

@@ -24,7 +24,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -36,7 +36,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 256 - 235
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -37,257 +37,278 @@
 </template>
 
 <script setup lang="ts">
-  import { onMounted, ref } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getEnfMineTreeData } from './airLeak.api';
-  import formConfig from '/@/components/Form/src/jeecg/components/formCard/formConfig.vue';
-  import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
-  // 引入模拟数据
-  import { columns, boardData, searchFormSchema, historicalMinesData } from './airLeakStatus.data';
+import { onMounted, ref } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+import { getMineData, getProvinceAlarm, getProvinceAlarmNum, getGoafData, getProvinceAlarmHistory, getEnfMineTreeData } from './airLeak.api';
+import formConfig from '/@/components/Form/src/jeecg/components/formCard/formConfig.vue';
+import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
+// 引入模拟数据
+import { columns, searchFormSchema, historicalMinesData } from './airLeakStatus.data';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
-  //煤矿列表数据
-  const deviceOptions = ref([]);
-  const goafOptions = ref([]);
-  const mineID = ref('');
-  const minesData = ref([]);
-  const mineCode = ref('');
-  const goafId = ref('');
-  const alarmFiled = ref('');
-  const historyData = ref([]);
-  const lawDeptOptions = ref([]);
-  // 注册实时数据表格
-  const [registerTable] = useTable({
-    dataSource: minesData,
-    title: '密闭漏风状态判定',
-    api: getProvinceAlarm,
-    columns,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: false,
-    striped: false,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    canResize: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-    },
-  });
+// 激活的Tab页签
+const activeTab = ref('realtime');
+//煤矿列表数据
+const deviceOptions = ref([]);
+const goafOptions = ref([]);
+const boardData = ref([
+  { label: '存在风险情况数量', value: 0 },
+  { label: '闭内气体涌出', value: 0 },
+  { label: '闭外气体涌出', value: 0 },
+]);
+const minesData = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const alarmFiled = ref('');
+const historyData = ref([]);
+const lawDeptOptions = ref([]);
+// 注册实时数据表格
+const [registerTable] = useTable({
+  dataSource: minesData,
+  title: '密闭漏风状态判定',
+  api: getProvinceAlarm,
+  columns,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        colProps: { span: 6 },
+        rules: [],
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: false,
+  striped: false,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  canResize: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+  },
+});
 
-  // 注册历史数据表格
-  const [registerHistoryTable] = useTable({
-    dataSource: historyData,
-    columns,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '查询煤矿',
-          field: 'mineCode',
-          component: 'Select',
-          defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: deviceOptions,
-            onChange: async (e, option) => {
-              mineCode.value = e;
-              await getGoafDataList(e);
-            },
-          },
-          colProps: {
-            span: 6,
+// 注册历史数据表格
+const [registerHistoryTable] = useTable({
+  dataSource: historyData,
+  columns,
+  api: getProvinceAlarmHistory,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
           },
         },
-        {
-          label: '采空区查询',
-          field: 'goafId',
-          component: 'Select',
-          defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: goafOptions,
-            onChange: async (e, option) => {
-              goafId.value = e;
-              await fetchAlarmData(e);
-            },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
           },
-          colProps: {
-            span: 6,
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
           },
         },
-        {
-          field: 'alarmFiled',
-          label: '预警字段',
-          component: 'Select',
-          componentProps: {
-            options: [
-              { label: '甲烷', value: 'ch4Val' },
-              { label: '氧气', value: 'o2Val' },
-              { label: '一氧化碳', value: 'coVal' },
-              { label: '二氧化碳', value: 'co2Val' },
-              { label: '乙烯', value: 'c2h4Val' },
-              { label: '乙炔', value: 'c2h2Val' },
-              { label: '压差', value: 'sourcePressure' },
-              { label: '温度', value: 'temperature' },
-            ],
-            onChange: async (e, option) => {
-              alarmFiled.value = e;
-              await getAlarmHistory(e);
-            },
-          },
-          colProps: { span: 6 },
+        colProps: {
+          span: 6,
         },
-      ],
-      showAdvancedButton: false,
-    },
-    pagination: false,
-    striped: false,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    canResize: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: false,
+  striped: false,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  canResize: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 弹窗引用
-  const realtimeModalRef = ref(null);
-  const historyModalRef = ref(null);
+// 弹窗引用
+const realtimeModalRef = ref(null);
+const historyModalRef = ref(null);
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record, type) => {
-    if (type === 'realtime') {
-      // 可向实时弹窗传递当前记录数据
-      realtimeModalRef.value?.showModal(record);
-    } else {
-      // 可向历史弹窗传递当前记录数据
-      historyModalRef.value?.showModal(record);
-    }
-  };
-  async function fetchAlarmData(id) {
-    const params = {
-      // 填写所需参数
-      alarmType: 'leakageAlarm',
-      mineId: id,
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const result = await getProvinceAlarm(params);
-    minesData.value = result.records;
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record, type) => {
+  if (type === 'realtime') {
+    // 可向实时弹窗传递当前记录数据
+    realtimeModalRef.value?.showModal(record);
+  } else {
+    // 可向历史弹窗传递当前记录数据
+    historyModalRef.value?.showModal(record);
   }
-  async function getAlarmHistory(id) {
-    const params = {
-      // 填写所需参数
-      alarmType: 'leakageAlarm',
-      mineCode: mineCode.value,
-      goafId: goafId.value,
-      alarmFiled: id,
-    };
-    const result = await getProvinceAlarmHistory(params);
-    historyData.value = result.records;
-  }
-  const getMineDataList = async () => {
-    const params = {
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const response = await getMineData(params);
-    deviceOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['mineName'],
-        value: item['mineCode'],
-      };
-    });
+};
+async function fetchAlarmData(id) {
+  const params = {
+    // 填写所需参数
+    alarmType: 'leakageAlarm',
+    mineId: id,
+    pageNo: 1,
+    pageSize: 50,
   };
-  const getGoafDataList = async (mineId) => {
-    const params = {
-      mineCode: mineId,
+  const result = await getProvinceAlarm(params);
+  minesData.value = result.records;
+}
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'leakageAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2;
+}
+// async function getAlarmHistory() {
+//   const result = await getProvinceAlarmHistory();
+//   historyData.value = result.records;
+// }
+const getMineDataList = async () => {
+  const params = {
+    pageNo: 1,
+    pageSize: 50,
+  };
+  const response = await getMineData(params);
+  deviceOptions.value = response.records.map((item, index) => {
+    return {
+      label: item['mineName'],
+      value: item['mineCode'],
     };
-    const response = await getGoafData(params);
-    goafOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['devicePos'],
-        value: item['goafId'],
-      };
-    });
+  });
+};
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
   };
-  async function getEnfMineData() {
-    const res = await getEnfMineTreeData();
-    lawDeptOptions.value = res.map((item) => ({
-      label: item.departName,
-      value: item.id,
-      rawdata: item,
-    }));
-    console.log(lawDeptOptions.value, '11111111');
-    // deviceOptions.value = res;
-  }
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getMineDataList();
-    getEnfMineData();
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
   });
+};
+async function getEnfMineData() {
+  const res = await getEnfMineTreeData();
+  lawDeptOptions.value = res.map((item) => ({
+    label: item.departName,
+    value: item.id,
+    rawdata: item,
+  }));
+  console.log(lawDeptOptions.value, '11111111');
+  // deviceOptions.value = res;
+}
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getMineDataList();
+  getEnfMineData();
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  .monitoring-page {
-    padding: 16px;
-  }
-  .board-info {
-    display: flex;
-    padding: 10px;
-    background-color: #fff;
-    margin: 0 10px;
-    gap: 10px;
-    box-sizing: border-box;
-  }
-  .board-item {
-    flex: 1;
-    box-sizing: border-box;
-  }
-  .action-btn {
-    cursor: pointer;
-    border: none;
-    padding: 4px;
-  }
-  .action-icon {
-    width: 16px;
-    height: 16px;
-  }
-  :deep(.jeecg-basic-table-form-container .ant-form) {
-    border: none !important;
-  }
-  :where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
-    margin-top: 10px !important;
-  }
+.monitoring-page {
+  padding: 16px;
+}
+.board-info {
+  display: flex;
+  padding: 10px;
+  background-color: #fff;
+  margin: 0 10px;
+  gap: 10px;
+  box-sizing: border-box;
+}
+.board-item {
+  flex: 1;
+  box-sizing: border-box;
+}
+.action-btn {
+  cursor: pointer;
+  border: none;
+  padding: 4px;
+}
+.action-icon {
+  width: 16px;
+  height: 16px;
+}
+:deep(.jeecg-basic-table-form-container .ant-form) {
+  border: none !important;
+}
+:where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
+  margin-top: 10px !important;
+}
 </style>

+ 35 - 0
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts

@@ -3,7 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  getGoafData = '/province/device/getGoafList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
+  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -16,3 +29,25 @@ export const getProvinceAlarm = (params) =>
     url: Api.getProvinceAlarm,
     params,
   });
+//查询密闭列表
+export const getGoafData = (params) =>
+  defHttp.post({
+    url: Api.getGoafData,
+    params,
+  });
+//查询预警历史数据
+export const getProvinceAlarmHistory = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params: {
+        alarmType: 'fireAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  ); //获取执法处以及区域数据
+export const getEnfMineTreeData = () =>
+  defHttp.get({
+    url: Api.getEnfMineTreeData,
+  });

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

@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 128 - 3
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -62,13 +62,37 @@ import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 // 引入模拟数据
 import { boardData, columns, searchFormSchema, historicalMinesData } from './autoFireAnalysis.data';
 import { SvgIcon } from '/@/components/Icon';
-import { getMineData, getProvinceAlarm } from './autoFire.api';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
 // 激活的Tab页签
 const activeTab = ref('realtime');
 const visibleModal = ref(false);
 //煤矿列表数据
 const deviceOptions = ref([]);
-const mineID = ref('');
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
 const minesData = ref([]);
 // 注册实时数据表格
 const [registerTable] = useTable({
@@ -108,10 +132,87 @@ const [registerTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historicalMinesData,
   columns,
+  api: getProvinceAlarmHistory,
   formConfig: {
     labelWidth: 120,
-    schemas: searchFormSchema,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
+          },
+        },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+          },
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
+          },
+        },
+        colProps: {
+          span: 6,
+        },
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
     showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
   },
   pagination: false,
   striped: false,
@@ -174,9 +275,33 @@ const getMineDataList = async () => {
     };
   });
 };
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
+  };
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
+  });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'fireAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 onMounted(() => {
   // 页面挂载时的逻辑
   getMineDataList();
+  getAlarmTotalData();
 });
 </script>
 

+ 35 - 0
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts

@@ -3,7 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  getGoafData = '/province/device/getGoafDList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
+  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -16,3 +29,25 @@ export const getProvinceAlarm = (params) =>
     url: Api.getProvinceAlarm,
     params,
   });
+//查询密闭列表
+export const getGoafData = (params) =>
+  defHttp.post({
+    url: Api.getGoafData,
+    params,
+  });
+//查询预警历史数据
+export const getProvinceAlarmHistory = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params: {
+        alarmType: 'unsealAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  ); //获取执法处以及区域数据
+export const getEnfMineTreeData = () =>
+  defHttp.get({
+    url: Api.getEnfMineTreeData,
+  });

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

@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 118 - 3
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -62,13 +62,29 @@ import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import { SvgIcon } from '/@/components/Icon';
 // 引入模拟数据
 import { boardData, columns, searchFormSchema, historicalMinesData } from './fireAreaJudgeAnalysis.data';
-import { getMineData, getProvinceAlarm } from './fireAreaJudge.api';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
 // 激活的Tab页签
 const activeTab = ref('realtime');
 const visibleModal = ref(false);
 //煤矿列表数据
 const deviceOptions = ref([]);
-const mineID = ref('');
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '采空区数量',
+    value: '',
+  },
+  {
+    label: '可以启封',
+    value: '',
+  },
+  {
+    label: '不可启封',
+    value: '',
+  },
+]);
 const minesData = ref([]);
 // 注册实时数据表格
 const [registerTable] = useTable({
@@ -108,10 +124,87 @@ const [registerTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historicalMinesData,
   columns,
+  api: getProvinceAlarmHistory,
   formConfig: {
     labelWidth: 120,
-    schemas: searchFormSchema,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
+          },
+        },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+          },
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
+          },
+        },
+        colProps: {
+          span: 6,
+        },
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
     showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
   },
   pagination: false,
   striped: false,
@@ -173,9 +266,31 @@ const getMineDataList = async () => {
     };
   });
 };
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
+  };
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
+  });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'unsealAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel5;
+  boardData.value[2].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
+}
 onMounted(() => {
   // 页面挂载时的逻辑
   getMineDataList();
+  getAlarmTotalData();
 });
 </script>
 

+ 128 - 3
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -62,14 +62,38 @@ import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import { SvgIcon } from '/@/components/Icon';
 // 引入模拟数据
 import { boardData, columns, searchFormSchema, minesData, historicalMinesData } from './overlimitAlarm.data';
-import { getMineData, getProvinceAlarm } from './overlimit.api';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
 
 // 激活的Tab页签
 const activeTab = ref('realtime');
 const visibleModal = ref(false);
 //煤矿列表数据
 const deviceOptions = ref([]);
-const mineID = ref('');
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
 const minesData = ref([]);
 // 注册实时数据表格
 const [registerTable] = useTable({
@@ -109,10 +133,87 @@ const [registerTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historicalMinesData,
   columns,
+  api: getProvinceAlarmHistory,
   formConfig: {
     labelWidth: 120,
-    schemas: searchFormSchema,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
+          },
+        },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+          },
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
+          },
+        },
+        colProps: {
+          span: 6,
+        },
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
     showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
   },
   pagination: false,
   striped: false,
@@ -174,9 +275,33 @@ const getMineDataList = async () => {
     };
   });
 };
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
+  };
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
+  });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'overLimitAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 onMounted(() => {
   // 页面挂载时的逻辑
   getMineDataList();
+  getAlarmTotalData();
 });
 </script>
 

+ 32 - 0
src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts

@@ -3,7 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  getGoafData = '/province/device/getGoafList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
+  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -16,3 +29,22 @@ export const getProvinceAlarm = (params) =>
     url: Api.getProvinceAlarm,
     params,
   });
+//查询密闭列表
+export const getGoafData = (params) =>
+  defHttp.post({
+    url: Api.getGoafData,
+    params,
+  });
+//查询预警历史数据
+export const getProvinceAlarmHistory = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params,
+    },
+    { joinParamsToUrl: true }
+  ); //获取执法处以及区域数据
+export const getEnfMineTreeData = () =>
+  defHttp.get({
+    url: Api.getEnfMineTreeData,
+  });

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

@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 140 - 15
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -77,8 +77,8 @@ import { Tabs, TabPane } from 'ant-design-vue';
 import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import { SvgIcon } from '/@/components/Icon';
 // 引入模拟数据
-import { boardData, columns, searchFormSchema, historicalMinesData } from './pressureDiffAnalysis.data';
-import { getMineData, getProvinceAlarm } from './pressureDiff.api';
+import { columns, searchFormSchema, historicalMinesData } from './pressureDiffAnalysis.data';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
 
 // 激活的Tab页签
 const activeTab = ref('realtime');
@@ -87,7 +87,31 @@ const visibleresolveModal = ref(false);
 const resolveValue = ref('');
 //煤矿列表数据
 const deviceOptions = ref([]);
-const mineID = ref('');
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
 const minesData = ref([]);
 // 注册实时数据表格
 const [registerTable] = useTable({
@@ -127,10 +151,87 @@ const [registerTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historicalMinesData,
   columns,
+  api: getProvinceAlarmHistory,
   formConfig: {
     labelWidth: 120,
-    schemas: searchFormSchema,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
+          },
+        },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+          },
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
+          },
+        },
+        colProps: {
+          span: 6,
+        },
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
     showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
   },
   pagination: false,
   striped: false,
@@ -172,17 +273,17 @@ const handleOkEdit = () => {
 const handleCancelEdit = () => {
   visibleresolveModal.value = false;
 };
-async function fetchAlarmData(id) {
-  const params = {
-    // 填写所需参数
-    alarmType: 'leakageAlarm',
-    mineId: id,
-    pageNo: 1,
-    pageSize: 50,
-  };
-  const result = await getProvinceAlarm(params);
-  minesData.value = result.records;
-}
+// async function fetchAlarmData(id) {
+//   const params = {
+//     // 填写所需参数
+//     alarmType: 'sourcePressureAlarm',
+//     mineId: id,
+//     pageNo: 1,
+//     pageSize: 50,
+//   };
+//   const result = await getProvinceAlarm(params);
+//   minesData.value = result.records;
+// }
 const getMineDataList = async () => {
   const params = {
     pageNo: 1,
@@ -196,9 +297,33 @@ const getMineDataList = async () => {
     };
   });
 };
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
+  };
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
+  });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'sourcePressureAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 onMounted(() => {
   // 页面挂载时的逻辑
   getMineDataList();
+  getAlarmTotalData();
 });
 </script>
 

+ 36 - 0
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts

@@ -3,7 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  getGoafData = '/province/device/getGoafList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
+  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -16,3 +29,26 @@ export const getProvinceAlarm = (params) =>
     url: Api.getProvinceAlarm,
     params,
   });
+//查询密闭列表
+export const getGoafData = (params) =>
+  defHttp.post({
+    url: Api.getGoafData,
+    params,
+  });
+//查询预警历史数据
+export const getProvinceAlarmHistory = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params: {
+        alarmType: 'sourcePressureAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
+//获取执法处以及区域数据
+export const getEnfMineTreeData = () =>
+  defHttp.get({
+    url: Api.getEnfMineTreeData,
+  });

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

@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 128 - 3
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue

@@ -64,14 +64,38 @@ import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import { SvgIcon } from '/@/components/Icon';
 // 引入模拟数据
 import { boardData, columns, searchFormSchema, historicalMinesData } from './sealRiskJudgeAnalysis.data';
-import { getMineData, getProvinceAlarm } from './sealRiskJudge.api';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './sealRiskJudge.api';
 
 // 激活的Tab页签
 const activeTab = ref('realtime');
 const visibleModal = ref(false);
 //煤矿列表数据
 const deviceOptions = ref([]);
-const mineID = ref('');
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '采空区数量',
+    value: '',
+  },
+  {
+    label: '增减风安全区',
+    value: '',
+  },
+  {
+    label: '减风危险区',
+    value: '',
+  },
+  {
+    label: '增风危险区',
+    value: '',
+  },
+  {
+    label: '爆炸危险区',
+    value: '',
+  },
+]);
 const minesData = ref([]);
 // 注册实时数据表格
 const [registerTable] = useTable({
@@ -110,10 +134,87 @@ const [registerTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historicalMinesData,
   columns,
+  api: getProvinceAlarmHistory,
   formConfig: {
     labelWidth: 120,
-    schemas: searchFormSchema,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
+        },
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
+        },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
+          },
+        },
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
+        componentProps: {
+          showSearch: true,
+          filterOption: (input: string, option: any) => {
+            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+          },
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
+          },
+        },
+        colProps: {
+          span: 6,
+        },
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
     showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
   },
   pagination: false,
   striped: false,
@@ -176,9 +277,33 @@ const getMineDataList = async () => {
     };
   });
 };
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
+  };
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
+    };
+  });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'explosionAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 onMounted(() => {
   // 页面挂载时的逻辑
   getMineDataList();
+  getAlarmTotalData();
 });
 </script>
 

+ 36 - 0
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts

@@ -3,7 +3,20 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
+  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  getGoafData = '/province/device/getGoafList',
+  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
+  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
+//根据预警类型查询不同等级数量
+export const getProvinceAlarmNum = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmNum,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询煤矿列表
 export const getMineData = (params) =>
   defHttp.post({
@@ -16,3 +29,26 @@ export const getProvinceAlarm = (params) =>
     url: Api.getProvinceAlarm,
     params,
   });
+//查询密闭列表
+export const getGoafData = (params) =>
+  defHttp.post({
+    url: Api.getGoafData,
+    params,
+  });
+//查询预警历史数据
+export const getProvinceAlarmHistory = (params) =>
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarmHistory,
+      params: {
+        alarmType: 'overLimitAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
+//获取执法处以及区域数据
+export const getEnfMineTreeData = () =>
+  defHttp.get({
+    url: Api.getEnfMineTreeData,
+  });

+ 2 - 2
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts

@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '区域',
-    dataIndex: 'enforcement',
+    dataIndex: 'areaName',
   },
   {
     title: '煤矿名称',
@@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '所属煤层',
-    dataIndex: 'coalSeam',
+    dataIndex: 'coalSeamName',
   },
   {
     title: '自燃倾向性',

+ 13 - 13
src/views/dashboard/SealedGoaf/configurable.data.sealedGoaf.ts

@@ -60,7 +60,7 @@ export const testConfigSealedGoaf: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:440px;height:185px;',
+      size: 'width:440px;height:220px;',
       version: '原版',
       position: 'top:20px;left:10px;',
     },
@@ -116,9 +116,9 @@ export const testConfigSealedGoaf: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:440px;height:140px;',
+      size: 'width:440px;height:160px;',
       version: '原版',
-      position: 'top:210px;left:10px;',
+      position: 'top:250px;left:10px;',
     },
   },
   // 3. 煤层自燃倾向性
@@ -171,9 +171,9 @@ export const testConfigSealedGoaf: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:440px;height:180px;',
+      size: 'width:440px;height:230px;',
       version: '原版',
-      position: 'top:340px;left:10px;',
+      position: 'bottom:440px;left:10px;',
     },
   },
   // 4. 联网状态
@@ -345,9 +345,9 @@ export const testConfigSealedGoaf: Config[] = [
       },
     },
     showStyle: {
-      size: 'width:440px;height:300px;',
+      size: 'width:440px;height:400px;',
       version: '原版',
-      position: 'top:520px;left:10px;',
+      position: 'bottom:20px;left:10px;',
     },
   },
   // 5. 密闭情况总览
@@ -378,12 +378,12 @@ export const testConfigSealedGoaf: Config[] = [
         items: [
           {
             name: 'board',
-            basis: '40%',
+            basis: '35%',
             overflow: true,
           },
           {
             name: 'table',
-            basis: '60%',
+            basis: '65%',
             overflow: true,
           },
         ],
@@ -514,7 +514,7 @@ export const testConfigSealedGoaf: Config[] = [
       },
     },
     showStyle: {
-      size: 'width:440px;height:330px;',
+      size: 'width:440px;height:450px;',
       version: '原版',
       position: 'top:-20px;right:10px;',
     },
@@ -681,9 +681,9 @@ export const testConfigSealedGoaf: Config[] = [
       // },
     },
     showStyle: {
-      size: 'width:440px;height:300px;',
+      size: 'width:440px;height:400px;',
       version: '原版',
-      position: 'top:310px;right:10px;',
+      position: 'top:440px;right:10px;',
     },
   },
   // 7. 当日报警情况统计
@@ -770,7 +770,7 @@ export const testConfigSealedGoaf: Config[] = [
     showStyle: {
       size: 'width:440px;height:210px;',
       version: '原版',
-      position: 'top:620px;right:10px;',
+      position: 'bottom:20px;right:10px;',
     },
   },
 ];

+ 0 - 8
src/views/dashboard/basicInfo/accessStatistics/access.data.ts

@@ -8,14 +8,6 @@ import { BasicColumn } from '/@/components/Table/src/types/table';
  */
 export function getAccessStatisticsColumns(): BasicColumn[] {
   return [
-    {
-      title: '序号',
-      dataIndex: 'id',
-      width: 80,
-      fixed: 'left',
-      align: 'center',
-      customRender: ({ index }: { index: number }) => `${index + 1}`,
-    },
     {
       title: '区域',
       dataIndex: 'name',

+ 1 - 3
src/views/dashboard/basicInfo/accessStatistics/index.vue

@@ -16,9 +16,7 @@
         api: getGoafAccessCount,
         columns: getAccessStatisticsColumns(),
         pagination: true,
-        showIndexColumn: false,
-        // 合计行样式高亮(区分普通数据行)
-        rowClassName: (record) => (record.region === '合计' ? 'bg-gray-50 font-medium' : ''),
+        showIndexColumn: true,
       });
 
       return {

+ 93 - 108
src/views/dashboard/basicInfo/closedStatistics/closed.data.ts

@@ -5,111 +5,96 @@ import { h } from 'vue';
 /**
  * 密闭统计表格列配置
  */
-export function getClosedStatisticsColumns(): BasicColumn[] {
-  return [
-    {
-      title: '序号',
-      // dataIndex: 'code',
-      align: 'center',
-      customRender: ({ index }: { index: number }) => `${index + 1}`,
-    },
-    {
-      title: '区域',
-      dataIndex: 'name',
-      align: 'center',
-    //   width: 80,
-    },
-    {
-      title: '密闭总数',
-      dataIndex: 'mbStatusNum',
-      align: 'center',
-    },
-    {
-      title: '正常生产',
-      dataIndex: 'mbStatusNum0',
-      align: 'center',
-    },
-    {
-      title: '拟建矿井',
-      dataIndex: 'mbStatusNum1',
-      align: 'center',
-    },
-    {
-      title: '正常建设',
-      dataIndex: 'mbStatusNum2',
-      align: 'center',
-    },
-    {
-      title: '自行停产',
-      dataIndex: 'mbStatusNum3',
-      align: 'center',
-    },
-    {
-      title: '正在关闭',
-      dataIndex: 'mbStatusNum4',
-      align: 'center',
-    },
-    {
-      title: '责令停产',
-      dataIndex: 'mbStatusNum5',
-      align: 'center',
-    },
-    {
-      title: '责令停止',
-      dataIndex: 'mbStatusNum6',
-      align: 'center',
-    },
-    {
-      title: '已关闭',
-      dataIndex: 'mbStatusNum7',
-      align: 'center',
-    },
-    {
-      title: '长期停产',
-      dataIndex: 'mbStatusNum8',
-      align: 'center',
-    },
-    {
-      title: '长期停建',
-      dataIndex: 'mbStatusNum9',
-      align: 'center',
-    },
-    {
-      title: '停产整改',
-      dataIndex: 'mbStatusNum10',
-      align: 'center',
-    },
-    {
-      title: '长期停建(失联)',
-      dataIndex: 'mbStatusNum11',
-      align: 'center',
-    },
-    {
-      title: '停建整改',
-      dataIndex: 'mbStatusNum12',
-      align: 'center',
-    },
-    {
-      title: '自行停建',
-      dataIndex: 'mbStatusNum13',
-      align: 'center',
-    },
-    {
-      title: '正在关闭',
-      dataIndex: 'mbStatusNum14',
-      align: 'center',
-    },
-    {
-      title: '其他',
-      dataIndex: 'mbStatusNumQt',
-      align: 'center',
-    },
-    {
-      title: '操作',
-      dataIndex: 'operation',
-      align: 'center',
-      // 渲染“查看”图标(匹配图片中的眼睛按钮)
-      customRender: () => h(EyeOutlined, { style: { cursor: 'pointer' }, onClick: () => alert('查看详情') }),
-    },
-  ];
-}
+export const dataColumns: BasicColumn[] = [
+  {
+    title: '区域',
+    dataIndex: 'name',
+    align: 'center',
+  //   width: 80,
+  },
+  {
+    title: '密闭总数',
+    dataIndex: 'mbStatusNum',
+    align: 'center',
+  },
+  {
+    title: '正常生产',
+    dataIndex: 'mbStatusNum0',
+    align: 'center',
+  },
+  {
+    title: '拟建矿井',
+    dataIndex: 'mbStatusNum1',
+    align: 'center',
+  },
+  {
+    title: '正常建设',
+    dataIndex: 'mbStatusNum2',
+    align: 'center',
+  },
+  {
+    title: '自行停产',
+    dataIndex: 'mbStatusNum3',
+    align: 'center',
+  },
+  {
+    title: '正在关闭',
+    dataIndex: 'mbStatusNum4',
+    align: 'center',
+  },
+  {
+    title: '责令停产',
+    dataIndex: 'mbStatusNum5',
+    align: 'center',
+  },
+  {
+    title: '责令停止',
+    dataIndex: 'mbStatusNum6',
+    align: 'center',
+  },
+  {
+    title: '已关闭',
+    dataIndex: 'mbStatusNum7',
+    align: 'center',
+  },
+  {
+    title: '长期停产',
+    dataIndex: 'mbStatusNum8',
+    align: 'center',
+  },
+  {
+    title: '长期停建',
+    dataIndex: 'mbStatusNum9',
+    align: 'center',
+  },
+  {
+    title: '停产整改',
+    dataIndex: 'mbStatusNum10',
+    align: 'center',
+  },
+  {
+    title: '长期停建(失联)',
+    dataIndex: 'mbStatusNum11',
+    align: 'center',
+  },
+  {
+    title: '停建整改',
+    dataIndex: 'mbStatusNum12',
+    align: 'center',
+  },
+  {
+    title: '自行停建',
+    dataIndex: 'mbStatusNum13',
+    align: 'center',
+  },
+  {
+    title: '正在关闭',
+    dataIndex: 'mbStatusNum14',
+    align: 'center',
+  },
+  {
+    title: '其他',
+    dataIndex: 'mbStatusNumQt',
+    align: 'center',
+  },
+];

+ 57 - 31
src/views/dashboard/basicInfo/closedStatistics/index.vue

@@ -1,40 +1,66 @@
 <template>
-  <div class="p-4">
     <!-- 表格:适配多列,设置横向滚动 & 边框 -->
-    <BasicTable 
-      @register="registerTable" 
-      bordered 
-      :scroll="{ x: 'max-content' }" 
-      class="closed-statistics-table"
-    />
-  </div>
+    <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }">
+      <template #action="{ record }">
+        <button @click="handleGoToPage(record, `/sealed/${record.code}`)" class="action-btn">
+          <SvgIcon name="view" />
+        </button>
+      </template>
+  </BasicTable>
 </template>
 
-<script lang="ts">
-import { defineComponent } from 'vue';
-import { BasicTable, useTable } from '/@/components/Table';
-import { getClosedStatisticsColumns } from './closed.data';
-// 引入接口(后续替换为真实接口)
-import { getClosedAccessCount } from '../basicInfo.api';
+<script setup lang="ts">
+  import { useRouter } from 'vue-router';
+  import { BasicTable, useTable } from '/@/components/Table';
+  import { dataColumns } from './closed.data';
+  import { getClosedAccessCount } from '../basicInfo.api';
+  import { SvgIcon } from '/@/components/Icon';
 
-export default defineComponent({
-  components: { BasicTable },
-  setup() {
-    // 注册表格
-    const [registerTable] = useTable({
-      api: getClosedAccessCount, // 密闭统计接口
-      columns: getClosedStatisticsColumns(),
-      pagination: true, // 无分页
-      showIndexColumn: false, // 关闭默认序号列,使用自定义序号列
-    });
+  // 路由实例
+  const router = useRouter();
+  // 注册表格并获取相关方法
+  const [registerTable] = useTable({
+    title: '密闭统计表格',
+    api: getClosedAccessCount, // 密闭统计接口
+    columns: dataColumns,
+    pagination: true,
+    useSearchForm: false,
+    // showTableSetting: true,
+    bordered: true,
+    showIndexColumn: false,
+    // canResize: false,
+    actionColumn: {
+      width: 80,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+    },
+  });
 
-    return {
-      registerTable,
-    };
-  },
-});
-</script>
+  /**
+   * 通用页面跳转方法
+   * @param record 当前行数据
+   * @param path 目标路径
+   */
+  function handleGoToPage(record: any, path: string) {
+    // 跳转时携带当前煤矿的编号作为参数(根据实际需求调整携带的参数)
+    router.push({
+      path,
+      // query: {
+      //   orderNo: record.orderNo, // 煤矿编号
+      //   mineName: record.mineName // 煤矿名称
+      // }
+    });
+  }
+</script>>
 
-<style scoped>
+<style lang="less" scoped>
+  .action-btn {
+    cursor: pointer;
+    margin-right: 10px;
 
+    &:last-child {
+      margin-right: 0;
+    }
+  }
 </style>

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

@@ -57,7 +57,7 @@
           <component 
             :is="getComponent(schema.component)"
             v-model:value="currentRecord[schema.field]" 
-            :disabled="mode === 'edit' && schema.field === 'mineName'" 
+            :disabled="mode === 'edit' && schema.field === 'mineCode'" 
             v-bind="schema.componentProps"
             :placeholder="`请输入${schema.label}`"
             style="width: 100%"
@@ -110,109 +110,127 @@
 </template>
 
 <script setup lang="ts">
-import { ref, computed, unref } from 'vue';
+import { ref, computed } from 'vue';
 import { BasicModal, useModalInner } from '/@/components/Modal';
 import { formSchema, topFormSchema } from '../dataQuality.data';
-import { Button as AButton, Select } from 'ant-design-vue';
-import { Input } from 'ant-design-vue';
-import { DatePicker } from 'ant-design-vue';
+import { Button as AButton, Select, Input, DatePicker } from 'ant-design-vue';
 import { PlusOutlined } from '@ant-design/icons-vue';
-import dayjs, { Dayjs } from 'dayjs'; // 引入dayjs处理日期
+import dayjs, { Dayjs } from 'dayjs';
+// 请根据实际项目路径调整 MineCascader 引入路径
+import MineCascader from '/@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
 
-// 组件映射 - 增加Select组件支持
+// 组件映射
 const componentMap = {
   Input,
   DatePicker,
-  Select
+  Select,
+  MineCascader
 };
 
-const emit = defineEmits(['success', 'register']);
+// 定义事件发射
+const emit = defineEmits(['success']);
 
-// 模式区分:view/edit/add
+// 模态框模式:查看/编辑/新增
 const mode = ref<'view' | 'edit' | 'add'>('view');
+// 当前记录数据
 const currentRecord = ref<any>({
-  mineLinkStatus: '',
+  mineCode: '',
+  mineLinkStatus: '0',
   queJson: [],
+  isOk: false,
+  updateTime: '',
+  createTime: ''
 });
+// 问题列表
 const queList = ref<any[]>([]);
 
-// 获取组件
+// 根据组件名获取对应组件
 const getComponent = (componentName: string) => {
   return componentMap[componentName as keyof typeof componentMap];
 };
 
-// 格式化日期为字符串(用于查看模式)
+// 日期格式化方法
 const formatDate = (date: string | Dayjs | null) => {
   if (!date) return '';
   return dayjs(date).format('YYYY-MM-DD HH:mm:ss');
 };
 
-/**
- * 根据状态值获取显示文本
- * @param status 状态值(1/0,支持字符串或数字类型)
- */
+// 根据状态值获取显示文本(在线/离线)
 const getStatusText = (status: string | number) => {
   return status === '1' || status === 1 ? '在线' : '离线';
 };
 
-/**
- * 根据状态值获取样式类
- * @param status 状态值(1/0,支持字符串或数字类型)
- */
+// 根据状态值获取样式类
 const getStatusClass = (status: string | number) => {
   return status === '1' || status === 1 ? 'status-online' : 'status-offline';
 };
 
-// 初始化弹框数据
+// 注册模态框并初始化数据
 const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
   setModalProps({ confirmLoading: false });
   
-  // 接收模式参数(view/edit/add)
+  // 接收模式参数
   mode.value = data?.mode || 'view';
+  // 初始化当前记录
   currentRecord.value = data?.record ? { ...data.record } : {
-    mineName: '',
+    mineCode: '',
     mineLinkStatus: '0',
     queJson: [],
+    isOk: false,
+    updateTime: '',
+    createTime: ''
   };
   
   // 初始化问题列表
   if (mode.value === 'add') {
-    // 新增模式:空表单
+    // 新增模式:初始化一条空数据
     queList.value = [{
       orderNum: '1',
       goafName: '',
       queCon: '',
       startTime: null,
       endTime: null,
-      param: '',
+      param: ''
     }];
   } else {
-    // 编辑/查看模式:使用传入数据或默认数据
-    const rawData = currentRecord.value?.queJson 
-      ? JSON.parse(currentRecord.value.queJson)
-      : [];
-    console.log(rawData);
-    
-    // 转换日期格式:字符串 -> dayjs对象(供DatePicker使用)
-    queList.value = rawData.map((item: any) => ({
-      ...item,
-      startTime: item.startTime ? dayjs(item.startTime) : null,
-      endTime: item.endTime ? dayjs(item.endTime) : null,
-    }));
+    // 编辑/查看模式:解析已有问题数据
+    try {
+      const rawData = currentRecord.value?.queJson 
+        ? (typeof currentRecord.value.queJson === 'string' 
+          ? JSON.parse(currentRecord.value.queJson) 
+          : currentRecord.value.queJson)
+        : [];
+      // 转换日期格式为dayjs对象(适配DatePicker)
+      queList.value = rawData.map((item: any) => ({
+        ...item,
+        startTime: item.startTime ? dayjs(item.startTime) : null,
+        endTime: item.endTime ? dayjs(item.endTime) : null
+      }));
+    } catch (error) {
+      console.error('解析问题数据失败:', error);
+      queList.value = [{
+        orderNum: '1',
+        goafName: '',
+        queCon: '',
+        startTime: null,
+        endTime: null,
+        param: ''
+      }];
+    }
   }
 });
 
-// 弹框标题
+// 模态框标题计算属性
 const getTitle = computed(() => {
-  const titles = {
+  const titleMap = {
     view: '质量问题详情',
     edit: '编辑质量问题',
-    add: '新增质量问题',
+    add: '新增质量问题'
   };
-  return titles[mode.value];
+  return titleMap[mode.value];
 });
 
-// 新增问题
+// 新增问题
 const addNewItem = () => {
   const newItem = {
     orderNum: (queList.value.length + 1).toString(),
@@ -220,12 +238,12 @@ const addNewItem = () => {
     queCon: '',
     startTime: null,
     endTime: null,
-    param: '',
+    param: ''
   };
   queList.value.push(newItem);
 };
 
-// 删除问题
+// 删除问题
 const removeItem = (index: number) => {
   queList.value.splice(index, 1);
   queList.value.forEach((item, i) => {
@@ -233,28 +251,33 @@ const removeItem = (index: number) => {
   });
 };
 
-// 提交处理
+// 提交表单处理
 async function handleSubmit() {
   try {
     setModalProps({ confirmLoading: true });
-    // 转换日期为字符串
-    const submitData = queList.value.map((item) => ({
+    // 1. 处理问题列表数据(空日期字段置空,避免空字符串)
+    const submitQueList = queList.value.map((item) => ({
       ...item,
-      startTime: item.startTime ? item.startTime.format('YYYY-MM-DD HH:mm:ss') : '',
-      endTime: item.endTime ? item.endTime.format('YYYY-MM-DD HH:mm:ss') : '',
+      startTime: item.startTime ? item.startTime.format('YYYY-MM-DD HH:mm:ss') : null,
+      endTime: item.endTime ? item.endTime.format('YYYY-MM-DD HH:mm:ss') : null,
     }));
-    // 构造完整提交数据
+    // 2. 构造完整提交数据(修正 createTime/updateTime 逻辑)
+    const now = dayjs().format('YYYY-MM-DD HH:mm:ss');
     const result = {
       ...currentRecord.value,
-      queJson: JSON.stringify(submitData),
-      // 新增模式自动设置为未解决
+      queJson: JSON.stringify(submitQueList),
+      // 新增模式:创建时间=当前时间,状态=未解决;编辑模式:保留原有创建时间
+      createTime: mode.value === 'add' ? now : (currentRecord.value.createTime || now),
+      // 无论新增/编辑,更新时间都为当前时间
+      updateTime: now,
+      // 新增模式默认未解决,编辑模式保留原有状态
       isOk: mode.value === 'add' ? false : currentRecord.value.isOk,
-      createTime: mode.value === 'add' ? dayjs().format('YYYY-MM-DD HH:mm:ss') : '',
-      // 当前时间作为更新时间
-      updateTime: mode.value === 'add' ? dayjs().format('YYYY-MM-DD HH:mm:ss') : currentRecord.value.handleTime,
     };
+    console.log('最终提交数据:', result);
     emit('success', result);
     closeModal();
+  } catch (error) {
+    console.error('提交失败:', error);
   } finally {
     setModalProps({ confirmLoading: false });
   }
@@ -262,12 +285,12 @@ async function handleSubmit() {
 </script>
 
 <style scoped>
-/* 样式部分保持不变 */
 .que-container {
   display: flex;
   flex-direction: column;
   gap: 16px;
 }
+
 .que-status {
   display: flex;
   width: 100%;
@@ -277,23 +300,27 @@ async function handleSubmit() {
   border: 1px solid #cad2e0;
   border-radius: 5px;
 }
+
 .mine-info {
   padding: 12px 16px;
   border: 1px solid #cad2e0;
   border-radius: 5px;
   background-color: #f8f9fc;
 }
+
 .mine-field {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-bottom: 8px;
 }
+
 .status-dot {
   position: relative;
   padding-left: 12px;
   font-weight: 500;
 }
+
 .status-dot::before {
   content: '';
   position: absolute;
@@ -305,26 +332,32 @@ async function handleSubmit() {
   border-radius: 50%;
   background-color: inherit;
 }
+
 .status-online {
   color: #10952c;
   font-weight: 500;
 }
+
 .status-offline {
   color: #f5222d;
   font-weight: 500;
 }
+
 .status-online.status-dot::before {
   background-color: #10952c;
 }
+
 .status-offline.status-dot::before {
   background-color: #f5222d;
 }
+
 .que-item {
   padding: 8px 16px;
   border: 1px solid #cad2e0;
   border-radius: 8px;
   background-color: #f8f9fc;
 }
+
 .que-index {
   font-size: 16px;
   font-weight: 600;
@@ -333,8 +366,11 @@ async function handleSubmit() {
   padding-bottom: 8px;
   border-bottom: 1px dashed #e8e8e8;
 }
+
 .que-details {
+  width: 100%;
 }
+
 .que-field {
   display: flex;
   align-items: center;
@@ -342,24 +378,29 @@ async function handleSubmit() {
   min-width: 200px;
   margin-bottom: 10px;
 }
+
 .que-label {
   font-size: 16px;
   color: #868789;
   white-space: nowrap;
 }
+
 .que-value {
   font-size: 16px;
   color: #838486;
   word-break: break-all;
 }
+
 .que-goafName {
   color: #4c4c4e;
   font-size: 20px;
 }
+
 .time-field {
   flex: 1;
   min-width: 420px;
 }
+
 .time-separator {
   color: #999;
   margin: 0 8px;
@@ -370,28 +411,35 @@ async function handleSubmit() {
   flex-direction: column;
   gap: 16px;
 }
+
 .mine-base-info {
   padding: 12px 16px;
   border: 1px solid #cad2e0;
   border-radius: 5px;
   background-color: #f8f9fc;
 }
+
 .edit-fields {
+  width: 100%;
 }
+
 .form-item {
   display: flex;
   margin-bottom: 10px;
   align-items: center;
 }
+
 .form-label {
   width: 20%;
   color: #666;
   font-size: 14px;
 }
+
 .add-btn {
   margin-top: 8px;
   width: 100%;
 }
+
 .form-actions {
   display: flex;
   justify-content: end;

+ 60 - 127
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -1,25 +1,34 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
 import { h } from 'vue';
-import { Tag } from 'ant-design-vue';
 
 // 生产状态映射表(扩展所有状态)
-const productionStatusMap: Record<string | number, { text: string; color: string }> = {
-  0: { text: '拟建矿井', color: 'blue' },
-  1: { text: '正常生产矿井', color: 'green' },
-  2: { text: '正常建设煤矿', color: 'green' },
-  3: { text: '自行停产矿井', color: 'green' },
-  4: { text: '正在关闭', color: 'green' },
-  5: { text: '责令停产整顿', color: 'green' },
-  6: { text: '责令停止建设', color: 'green' },
-  7: { text: '已关闭矿井', color: 'green' },
-  8: { text: '长期停产矿井', color: 'green' },
-  9: { text: '长期停建矿井', color: 'green' },
-  10: { text: '停产整改矿井', color: 'green' },
-  11: { text: '长期停建无法联系', color: 'green' },
-  12: { text: '停建整改', color: 'green' },
-  13: { text: '自行停建', color: 'green' },
-  14: { text: '正在实施关闭', color: 'green' },
-  15: { text: '已关闭矿井', color: 'green' },
+const productionStatusMap: Record<string | number, { label: string; value: number; color: string }> = {
+  0: { label: '正常生产矿井', value: 0, color: 'green' },
+  1: { label: '拟建矿井', value: 1, color: 'blue' },
+  2: { label: '正常建设煤矿', value: 2, color: 'green' },
+  3: { label: '自行停产矿井', value: 3, color: 'green' },
+  4: { label: '正在关闭', value: 4, color: 'green' },
+  5: { label: '责令停产整顿', value: 5, color: 'green' },
+  6: { label: '责令停止建设', value: 6, color: 'green' },
+  7: { label: '已关闭矿井', value: 7, color: 'green' },
+  8: { label: '长期停产矿井', value: 8, color: 'green' },
+  9: { label: '长期停建矿井', value: 9, color: 'green' },
+  10: { label: '停产整改矿井', value: 10, color: 'green' },
+  11: { label: '长期停建无法联系', value: 11, color: 'green' },
+  12: { label: '停建整改', value: 12, color: 'green' },
+  13: { label: '自行停建', value: 13, color: 'green' },
+  14: { label: '正在实施关闭', value: 14, color: 'green' },
+  // 15: { label: '已关闭矿井', value: 15, color: 'green' },
+};
+
+// 颜色映射
+const colorHexMap: Record<string, string> = {
+  blue: '#1890ff',
+  green: '#208840',
+  gold: '#faad14',
+  red: '#f5222d',
+  gray: '#8c8c8c',
+  black: '#000000',
 };
 // 解析queJson并拼接orderNum+queCon的辅助函数
 const formatQueJson = (queJsonStr: string) => {
@@ -37,11 +46,6 @@ const formatQueJson = (queJsonStr: string) => {
   }
 };
 
-// 通用空值处理函数(非在线状态的空值统一显示「—」)
-const formatEmptyValue = (value: any) => {
-  return value === null || value === undefined || value === '' || /^\s*$/.test(String(value));
-};
-
 /** 表格列配置 */
 export const columns: BasicColumn[] = [
   {
@@ -59,11 +63,10 @@ export const columns: BasicColumn[] = [
     dataIndex: 'mineProStatus',
     width: 120,
     customRender: ({ record }) => {
-      // 空值处理
-      // 状态映射 + 标签渲染
-      const status = String(record.mineProStatus);
-      const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
-      return h(Tag, { color }, () => text);
+      // 空值/异常值处理
+      const status = record.mineProStatus;
+      const { label, color } = productionStatusMap[status] || { label: '未知状态', color: 'balck' };
+      return h('span', { style: { color: colorHexMap[color] || colorHexMap.gray } }, label);
     },
   },
   {
@@ -71,12 +74,14 @@ export const columns: BasicColumn[] = [
     dataIndex: 'mineLinkStatus',
     width: 100,
     customRender: ({ record }) => {
-      // 未连接/空值 显示「/」
-      // 状态映射 + 标签渲染
-      const status = String(record.mineLinkStatus);
-      const text = status === '1' ? '在线' : '离线';
-      const color = status === '1' ? 'green' : 'red';
-      return h(Tag, { color }, () => text);
+      console.log(record.mineLinkStatus);
+      const status = record.mineLinkStatus;
+      if (status === undefined || status === null) {
+        return h('span', { style: { color: colorHexMap.black } }, '/');
+      }
+      const text = status === 1 ? '在线' : '离线';
+      const textColor = status === 1 ? colorHexMap.green : colorHexMap.red;
+      return h('span', { style: { color: textColor } }, text);
     },
   },
   {
@@ -89,38 +94,22 @@ export const columns: BasicColumn[] = [
       const displayText = formatQueJson(text);
       return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } }, [
         h('span', { style: { flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, displayText),
-        h(
-          'button',
-          {
-            onClick: () => {
-              record.onViewDetail?.(record);
-            },
-            title: '查看详情',
-            style: {
-              padding: '5px',
-            },
-          },
-          [
-            h('div', {
-              style: {
-                background: `url('/@/assets/images/basicInfo/dataQuality/icon-view.svg')`,
-                width: '16px',
-                height: '16px',
-                backgroundSize: 'contain',
-                backgroundRepeat: 'no-repeat',
-              },
-              class: 'action-icon',
-              alt: '查看详情',
-            }),
-          ]
-        ),
       ]);
     },
+    slots: {
+      customRender : 'queJson'
+    }
   },
   {
     title: '当前状态',
     dataIndex: 'isOk',
     width: 100,
+    customRender: ({ record }) => {
+      const status = record.isOk;
+      const text = status ? '已解决' : '未解决';
+      const textColor = status ? colorHexMap.green : colorHexMap.red;
+      return h('span', { style: { color: textColor } }, text);
+    },
   },
   {
     title: '处理时间',
@@ -132,11 +121,11 @@ export const columns: BasicColumn[] = [
 /** 查询表单配置 */
 export const searchFormSchema: FormSchema[] = [
   {
-    field: 'mineName',
+    field: 'mineCode',
     label: '煤矿名称',
-    component: 'Input',
+    component: 'MineCascader',
     colProps: { span: 6 },
-    // groupName: '常规查询',
+    groupName: '常规查询',
   },
   {
     field: 'mineNameAbbr',
@@ -157,91 +146,35 @@ export const searchFormSchema: FormSchema[] = [
       ],
     },
     colProps: { span: 6 },
-    groupName: '高级查询',
-  },
-  {
-    field: 'isConnected',
-    label: '是否需要接入',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '否', value: '0' },
-        { label: '是', value: '1' },
-      ],
-    },
-    colProps: { span: 6 },
-    groupName: '高级查询',
+    groupName: '常规查询',
   },
 
   {
-    field: 'status',
+    field: 'mineLinkStatus',
     label: '在线状态',
     component: 'Select',
     componentProps: {
       options: [
         { label: '离线', value: '0' },
         { label: '在线', value: '1' },
+        { label: '未连接', value: '2' },
       ],
     },
     colProps: { span: 6 },
-    groupName: '高级查询',
-  },
-  {
-    field: 'riskLevel',
-    label: '风险等级',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-    groupName: '高级查询',
-  },
-  {
-    field: 'statusChange',
-    label: '状态变化',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '否', value: '0' },
-        { label: '是', value: '1' },
-      ],
-    },
-    colProps: { span: 6 },
-    groupName: '高级查询',
+    groupName: '常规查询',
   },
 ];
 
-// 模拟煤矿选项数据
-export const mineOptions = [
-  { label: '神东集团布尔台煤矿', value: '神东集团布尔台煤矿' },
-  { label: '府谷县后安能源有限公司古城一号煤矿', value: '府谷县后安能源有限公司古城一号煤矿' },
-];
 // 模拟煤矿在线状态选项数据
 export const mineLinkStatusOptions = [
-  { label: '在线', value: '1' },
-  { label: '离线', value: '0' },
+  { label: '在线', value: 1 },
+  { label: '离线', value: 0 },
 ];
-export const topFormSchema = [
+export const topFormSchema: FormSchema[]= [
   {
-    field: 'mineName',
+    field: 'mineCode',
     label: '煤矿名称',
-    component: 'Select',
-    componentProps: {
-      options: mineOptions,
-    },
-    required: true,
-  },
-  {
-    field: 'mineLinkStatus',
-    label: '当前状态',
-    component: 'Select',
-    componentProps: {
-      options: mineLinkStatusOptions,
-    },
+    component: 'MineCascader',
     required: true,
   },
 ];

+ 129 - 40
src/views/dashboard/basicInfo/dataQuality/index.vue

@@ -6,16 +6,50 @@
         <a-button type="primary" preIcon="mdi:page-next-outline" @click="handleOpenModal({}, 'add')"> 新增问题 </a-button>
       </div>
       <BasicTable style="padding: 0" @register="registerUnresolvedTable">
+        <template #queJson="{ record }">
+          <div style="display: flex; align-items: center; gap: 8px; width: 100%;">
+            <!-- 文字span:添加 flex: 1 占据剩余空间,text-align: center 实现文字居中 -->
+            <span style="flex: 1; text-align: center;">
+              {{ record?.queJson ? formatQueJson(record.queJson) : '' }}
+            </span>
+            <!-- 按钮:无需额外样式,自然靠最右侧 -->
+            <button @click="record && handleOpenModal(record, 'view')" class="action-btn">
+              <SvgIcon name="view" />
+            </button>
+          </div>
+
+        </template>
         <template #action="{ record }">
           <button @click="handleOpenModal(record, 'edit')" class="action-btn">
             <SvgIcon name="edit" />
           </button>
-          <button @click="handleDeleteRecord(record)" class="action-btn">
-            <SvgIcon name="delete" />
-          </button>
-          <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
-            <SvgIcon name="resolved" />
-          </button>
+          <!-- 删除按钮 -->
+          <Popconfirm
+            title="删除确认"
+            description="是否确认删除?"
+            okText="确认"
+            cancelText="取消"
+            @confirm="handleDeleteRecord(record)"
+            @cancel="handleCancel"
+            placement="top"
+          >
+            <button class="action-btn">
+              <SvgIcon name="delete" />
+            </button>
+          </Popconfirm>
+          <Popconfirm
+            title="标记已解决确认"
+            :description="getResolveDesc(record)"
+            okText="确认"
+            cancelText="取消"
+            @confirm="handleOKRecord(record)"
+            @cancel="handleCancel"
+            placement="top"
+          >
+            <button class="action-btn">
+              <SvgIcon name="resolved" />
+            </button>
+          </Popconfirm>
           <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
             <SvgIcon name="details" />
           </button>
@@ -23,7 +57,7 @@
       </BasicTable>
     </TabPane>
     <TabPane key="resolved" tab="已解决">
-      <BasicTable @register="registerResolvedTable">
+      <BasicTable style="padding: 0" @register="registerResolvedTable">
         <template #action="{ record }">
           <button @click="handleOpenModal(record, 'view')" class="action-btn">
             <SvgIcon name="details" />
@@ -38,35 +72,34 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, reactive, watch } from 'vue';
+  import { ref, nextTick, computed } from 'vue';
   import { useRouter } from 'vue-router';
   import { BasicTable, useTable } from '/@/components/Table';
   import { useModal } from '/@/components/Modal';
-  import { Tabs, TabPane } from 'ant-design-vue';
+  import { Tabs, TabPane, Popconfirm } from 'ant-design-vue';
   import DataQualityModal from './components/DataQualityModal.vue';
   import { SvgIcon } from '/@/components/Icon';
   import { columns, searchFormSchema } from './dataQuality.data';
   import { getDataQuaQueList, addDataQuaQue, deleteDataQuaQue, editDataQuaQue } from '../basicInfo.api';
+  import dayjs from 'dayjs'; 
   // 路由实例
   const router = useRouter();
   // 响应式数据
   const activeKey = ref('unresolved'); // 激活的Tab键
   const pageMode = ref('add');
   // 未解决表格注册
-  const [registerUnresolvedTable, { reload: reloadUnresolved }] = useTable({
+  const [registerUnresolvedTable, { reload: reloadUnresolved}] = useTable({
     api: getQuaQueListByTab(),
-    // dataSource: filteredUnresolved.value,
     columns,
     formConfig: {
       labelWidth: 120,
       schemas: searchFormSchema,
       showAdvancedButton: false,
-      schemaGroupNames: ['常规查询', '高级查询'],
+      schemaGroupNames: ['常规查询'],
     },
     useSearchForm: true,
     pagination: true,
     striped: true,
-    // bordered: true,
     showIndexColumn: false,
     indexColumnProps: {
       title: '序号',
@@ -78,12 +111,20 @@
       dataIndex: 'action',
       slots: { customRender: 'action' },
     },
+    immediate: true,
   });
 
   // 已解决表格注册
   const [registerResolvedTable, { reload: reloadResolved }] = useTable({
     api: getQuaQueListByTab(),
     columns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询', '高级查询'],
+    },
+    useSearchForm: true,
     pagination: true,
     striped: true,
     bordered: true,
@@ -97,17 +138,28 @@
       dataIndex: 'action',
       slots: { customRender: 'action' },
     },
-    rowKey: 'id',
-    formConfig: {
-      labelWidth: 120,
-      schemas: searchFormSchema,
-      showAdvancedButton: false,
-    },
+    immediate: true,
   });
 
   // 弹框注册
   const [registerModal, { openModal }] = useModal();
 
+  // 解析queJson并拼接orderNum+queCon的辅助函数
+  function formatQueJson (queJsonStr: string) {
+    // 空值处理
+    if (!queJsonStr) return '无质量问题';
+    try {
+      const queList = JSON.parse(queJsonStr);
+      // 非数组格式处理
+      if (!Array.isArray(queList)) return '问题格式异常';
+      // 拼接orderNum + queCon,多个问题用分号分隔
+      return queList.map((item) => `问题${item.orderNum || ''}:${item.queCon || ''}`).join('; ');
+    } catch (error) {
+      console.error('解析质量问题JSON失败:', error);
+      return '问题数据解析失败';
+    }
+  };
+
   /**
    * 根据标签获取表格数据(已解决/未解决)
    * @param result 弹框数据
@@ -118,15 +170,6 @@
       return await getDataQuaQueList({ ...params, isOk: isOk });
     };
   }
-  /**
-   * 表单搜索函数
-   * @param values 表单数据
-   */
-  function handleSearch(values: any) {
-    // 刷新表格
-    reloadUnresolved();
-    reloadResolved();
-  }
 
   /**
    * 打开弹框函数
@@ -144,16 +187,21 @@
    * 弹框结果处理函数
    * @param result 弹框数据
    */
-  function handleModalSuccess(result: any) {
-    if (pageMode.value === 'add') {
-      console.log(result);
-      addDataQuaQue(result);
-    } else if (pageMode.value === 'edit') {
-      editDataQuaQue(result);
+  async function handleModalSuccess(result: any) {
+    try{
+      if (pageMode.value === 'add') {
+        console.log(result);
+        await addDataQuaQue(result);
+      } else if (pageMode.value === 'edit') {
+        await editDataQuaQue(result);
+      }
+      // 刷新表格
+      await nextTick();
+      reloadUnresolved();
+      reloadResolved();
+    } catch(error) {
+      console.log('操作失败:', error);
     }
-    // 刷新表格
-    reloadUnresolved();
-    reloadResolved();
   }
   /**
    * 通用页面跳转方法
@@ -171,13 +219,54 @@
     });
   }
 
+  /**
+   * 气泡取消按钮通用回调
+   */
+  function handleCancel() {
+    // 取消操作,无逻辑(仅关闭气泡)
+  }
+
+  /**
+   * 生成已解决气泡提示文案:XX矿井XX问题是否解决了吗?
+   */
+  const getResolveDesc = computed(() => (record: any) => {
+    const mineName = record.mineName || '该'; // 矿井名称兜底
+    return `是否确认${mineName}矿井问题已解决?`;
+  });
+
   /**
    * 删除记录方法
    * @param record 当前行数据
    */
-  function handleDeleteRecord(record: any) {
-    deleteDataQuaQue({ id: record.id });
-    reloadUnresolved();
+  async function handleDeleteRecord(record: any) {
+    try {
+      await deleteDataQuaQue({ id: record.id });
+      await nextTick();
+      reloadUnresolved();
+    } catch (error) {
+      console.error('删除失败:', error);
+    }
+  }
+
+  /**
+   * 将记录改为已处理
+   * @param record 当前行数据
+   */
+  async function handleOKRecord(record: any) {
+    const copyRecord = {
+      ...record,
+      isOk : true,
+      updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
+    };
+    copyRecord.isOk = true
+    try {
+      await editDataQuaQue(copyRecord);
+      await nextTick();
+      reloadUnresolved();
+      reloadResolved();
+    }catch (error) {
+      console.error('操作失败:', error);
+    }
   }
 </script>
 

+ 3 - 4
src/views/dashboard/basicInfo/minesInfo/index.vue

@@ -1,6 +1,6 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
-  <BasicTable @register="registerTable">
+  <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }">
     <template #action="{ record }">
       <button @click="handleGoToPage(record, `/sealed/${record.areaId}`)" class="action-btn">
         <SvgIcon name="data" />
@@ -8,7 +8,7 @@
       <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
         <SvgIcon name="info" />
       </button>
-      <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
+      <button @click="handleGoToPage(record, '/warningAnalysis/connectAnalysis')" class="action-btn">
         <SvgIcon name="chart" />
       </button>
     </template>
@@ -27,8 +27,7 @@
   // 注册表格并获取相关方法
   const [registerTable] = useTable({
     title: '矿山信息表格',
-    api: getMineData, // 密闭统计接口
-    // dataSource: minesData,
+    api: getMineData, // 数据统计接口
     columns,
     formConfig: {
       labelWidth: 120,

+ 35 - 82
src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts

@@ -1,12 +1,11 @@
 import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
 import { h } from 'vue';
-import { Tag } from 'ant-design-vue';
 
 // 生产状态映射表(扩展所有状态)
 const productionStatusMap: Record<string | number, { text: string; color: string }> = {
-  0: { text: '拟建矿井', color: 'blue' },
-  1: { text: '正常生产矿井', color: 'green' },
+  0: { text: '正常生产矿井', color: 'green' },
+  1: { text: '拟建矿井', color: 'blue' },
   2: { text: '正常建设煤矿', color: 'green' },
   3: { text: '自行停产矿井', color: 'green' },
   4: { text: '正在关闭', color: 'green' },
@@ -20,12 +19,17 @@ const productionStatusMap: Record<string | number, { text: string; color: string
   12: { text: '停建整改', color: 'green' },
   13: { text: '自行停建', color: 'green' },
   14: { text: '正在实施关闭', color: 'green' },
-  15: { text: '已关闭矿井', color: 'green' },
+  // 15: { text: '已关闭矿井', color: 'green' },
 };
 
-// 通用空值处理函数(非在线状态的空值统一显示「—」)
-const formatEmptyValue = (value: any) => {
-  return value === null || value === undefined || value === '' || /^\s*$/.test(String(value));
+// 颜色映射
+const colorHexMap: Record<string, string> = {
+  blue: '#1890ff',
+  green: '#208840',
+  gold: '#faad14',
+  red: '#f5222d',
+  gray: '#8c8c8c',
+  black: '#000000',
 };
 
 export const columns: BasicColumn[] = [
@@ -49,39 +53,42 @@ export const columns: BasicColumn[] = [
     title: '生产状态',
     dataIndex: 'productionStatus',
     customRender: ({ record }) => {
-      // 空值处理
-      // 状态映射 + 标签渲染
-      const status = String(record.productionStatus);
-      const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
-      return h(Tag, { color }, () => text);
+      // 空值/异常值处理
+      const status = String(record.productionStatus || '');
+      const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'balck' };
+      // 渲染普通span,仅设置文字颜色
+      return h('span', { style: { color: colorHexMap[color] || colorHexMap.gray } }, text);
     },
   },
   {
     title: '自燃情况',
-    dataIndex: 'riskLevel',
+    dataIndex: 'alarmLevel',
   },
   {
     title: '接入状态',
     dataIndex: 'accessStatus',
     customRender: ({ record }) => {
-      // 空值处理
-      // 状态映射 + 标签渲染
-      const status = String(record.accessStatus);
-      const text = status === '1' ? '已接入' : '未接入';
-      const color = status === '1' ? 'green' : 'gold'; // gold=黄色
-      return h(Tag, { color }, () => text);
+      // 空值/异常值处理
+      const status = String(record.accessStatus || '');
+      if (!status || status === 'undefined' || status === 'null') {
+        return h('span', { style: { color: colorHexMap.black } }, '/');
+      }
+      const text = status === '1' ? '接入' : '未接入';
+      const textColor = status === '1' ? colorHexMap.green : colorHexMap.gold;
+      return h('span', { style: { color: textColor } }, text);
     },
   },
   {
     title: '在线状态',
     dataIndex: 'status',
     customRender: ({ record }) => {
-      // 未连接/空值 显示「/」
-      // 状态映射 + 标签渲染
-      const status = String(record.status);
+      const status = String(record.status || '');
+      if (!status || status === 'undefined' || status === 'null') {
+        return h('span', { style: { color: colorHexMap.black } }, '/');
+      }
       const text = status === '1' ? '在线' : '离线';
-      const color = status === '1' ? 'green' : 'red';
-      return h(Tag, { color }, () => text);
+      const textColor = status === '1' ? colorHexMap.green : colorHexMap.red;
+      return h('span', { style: { color: textColor } }, text);
     },
   },
   {
@@ -125,13 +132,13 @@ export const searchFormSchema: FormSchema[] = [
     colProps: { span: 6 },
   },
   {
-    field: 'isConnected',
-    label: '是否需要接入',
+    field: 'accessStatus',
+    label: '接入状态',
     component: 'Select',
     componentProps: {
       options: [
-        { label: '否', value: '0' },
-        { label: '是', value: '1' },
+        { label: '接入', value: 1 },
+        { label: '未接入', value: 0 },
       ],
     },
     colProps: { span: 6 },
@@ -161,58 +168,4 @@ export const searchFormSchema: FormSchema[] = [
     },
     colProps: { span: 6 },
   },
-  {
-    field: 'statusChange',
-    label: '状态变化',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '否', value: '0' },
-        { label: '是', value: '1' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];
-
-export const minesData = [
-  {
-    mineCode: '61082400879',
-    managementName: '执法二处',
-    mineName: '府谷县能源有限公司古城一号煤矿',
-    mineNameAbbr: '府谷县一号煤矿',
-    productionStatus: '0', // 拟建矿井(蓝色)
-    riskLevel: '0',
-    accessStatus: '0', // 未接入(黄色)
-    status: '0', // 离线(红色)
-    yingjieNum: '0',
-    accessGoafNum: '0',
-    notAccessGoafNum: '0',
-  },
-  {
-    mineCode: '61082400878',
-    managementName: '执法二处',
-    mineName: '府谷县能源有限公司古城二号煤矿',
-    mineNameAbbr: '府谷县二号煤矿',
-    productionStatus: '1', // 正常生产矿井(绿色)
-    riskLevel: '0',
-    accessStatus: '1', // 已接入(绿色)
-    status: '1', // 在线(绿色)
-    yingjieNum: '0',
-    accessGoafNum: '0',
-    notAccessGoafNum: '0',
-  },
-  {
-    mineCode: '',
-    managementName: null,
-    mineName: undefined,
-    mineNameAbbr: '   ',
-    productionStatus: '', // 空值显示「—」
-    riskLevel: null,
-    accessStatus: undefined, // 空值显示「—」
-    status: '', // 未连接显示「/」
-    yingjieNum: null,
-    accessGoafNum: '   ',
-    notAccessGoafNum: undefined,
-  },
 ];