houzekong 3 месяцев назад
Родитель
Сommit
ae7a185041

+ 1 - 1
src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue

@@ -41,7 +41,7 @@
     props: {
       value: propTypes.string.def(''),
       placeholder: propTypes.string.def('全部'),
-      /** 根节点ID,如果传入,组件将过滤该节点下的节点 */
+      /** 根节点ID,如果传入,组件将过滤该节点下的节点,需注意传入rawid也就是接口返回的id */
       rootId: propTypes.string,
       /** 是否从已存储的信息中初始化组件值 */
       initFromStore: propTypes.bool.def(true),

+ 0 - 121
src/components/Form/src/jeecg/components/formCard/formConfig.vue

@@ -1,121 +0,0 @@
-<template>
-  <a-form>
-    <a-row class="form-row">
-      <div class="custom-cascader">
-        <!-- 执法处 -->
-        <a-select v-model:value="pca.lawDept" placeholder="请选择执法处" style="width: 180px; margin-right: 8px" @change="handleLawDeptChange">
-          <a-select-option v-for="item in props.lawDeptOptions" :key="item.value" :value="item.value">
-            {{ item.label }}
-          </a-select-option>
-        </a-select>
-        <a-select
-          v-model:value="pca.area"
-          placeholder="请选择区域"
-          style="width: 180px; margin-right: 8px"
-          @change="handleAreaChange"
-          :disabled="!pca.lawDept"
-        >
-          <a-select-option v-for="item in areaOptions" :key="item.value" :value="item.value">
-            {{ item.label }}
-          </a-select-option>
-        </a-select>
-        <!-- 选择煤矿 -->
-        <a-select v-model:value="pca.position" placeholder="请选择煤矿" style="width: 180px" :disabled="!pca.area">
-          <a-select-option v-for="item in positionOptions" :key="item.value" :value="item.value">
-            {{ item.label }}
-          </a-select-option>
-        </a-select>
-      </div>
-    </a-row>
-  </a-form>
-</template>
-
-<script lang="ts" setup>
-  import { ref, reactive, onMounted, nextTick, watch } from 'vue';
-  // 替换为你的实际接口请求函数
-  import { getEnfMineTreeData } from './mineData.api';
-  const props = defineProps({
-    lawDeptOptions: {
-      type: Array,
-      default: <Array<{ label: string; value: string | number }>>[],
-    },
-  });
-  const emit = defineEmits(['change', 'update:value', 'update:lawDept', 'update:area', 'update:position']);
-  const pca = reactive({
-    lawDept: '', // 执法处
-    area: '', // 区域
-    position: '', // 具体位置
-  });
-
-  // 下拉选项列表
-  // const lawDeptOptions = ref<Array<{ label: string; value: string | number }>>([]);
-  const areaOptions = ref<Array<{ label: string; value: string | number }>>([]);
-  const positionOptions = ref<Array<{ label: string; value: string | number }>>([]);
-  const rawLawDeptData = ref<any[]>([]); // 保存原始执法处数据以备后续查找
-  // // 初始化加载执法处列表
-  // const initLawDeptList = async () => {
-  //   // 调用获取执法处列表的接口
-  //   try {
-  //     const res = await getEnfMineTreeData();
-  //     rawLawDeptData.value = res; // 保存原始数据以备后续查找
-  //     lawDeptOptions.value = res.map((item) => ({
-  //       label: item.departName, // 显示执法处名称
-  //       value: item.id, // 绑定执法处ID
-  //     }));
-  //   } catch (error) {
-  //     console.error('加载执法处列表失败:', error);
-  //   }
-  // };
-  const handleLawDeptChange = async (depId: string | number) => {
-    pca.area = '';
-    pca.position = '';
-    areaOptions.value = [];
-    positionOptions.value = [];
-    rawLawDeptData.value = props.lawDeptOptions;
-    console.log(rawLawDeptData.value, '222222');
-    const currentDept = rawLawDeptData.value.find((item) => item.id === depId);
-    if (!currentDept) {
-      console.warn('未找到该执法处数据');
-      return;
-    }
-    console.log(currentDept, '1111111');
-    areaOptions.value = currentDept.childDepart.map((child) => ({
-      label: child.departName, // 显示区域名称
-      value: child.id, // 绑定区域ID
-    }));
-  };
-  // const handleAreaChange = async (areaId: string | number) => {
-  //   pca.position = '';
-  //   positionOptions.value = [];
-  //   // 1. 找到选中的执法处原始数据
-  //   const currentDept = rawLawDeptData.value.find((item) => item.id === pca.lawDept);
-  //   if (!currentDept) {
-  //     console.warn('未找到该执法处数据');
-  //     return;
-  //   }
-  //   // 2. 在执法处的childDepart中找到选中的区域数据
-  //   const currentArea = currentDept.childDepart.find((area) => area.id === areaId);
-  //   if (!currentArea) {
-  //     console.warn('未找到该区域数据');
-  //     return;
-  //   }
-  // };
-
-  // 页面初始化时加载执法处列表
-  onMounted(() => {
-    console.log('接收的执法部门选项:', props.lawDeptOptions);
-  });
-</script>
-
-<style scoped>
-  .custom-cascader {
-    display: flex;
-    align-items: center;
-    gap: 8px;
-  }
-
-  /* 可选:调整选择框样式,和原JAreaSelect保持一致 */
-  .custom-cascader :deep(.ant-select) {
-    border-radius: 4px;
-  }
-</style>

+ 0 - 15
src/components/Form/src/jeecg/components/formCard/mineData.api.ts

@@ -1,15 +0,0 @@
-import { defHttp } from '/@/utils/http/axios';
-enum Api {
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
-}
-//获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });
-//根据区域ID获取煤矿列表
-// export const getProvinceAlarmHistory = (params) =>
-//   defHttp.post({
-//     url: Api.getProvinceAlarmHistory,
-//     params,
-//   });

+ 0 - 6
src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts

@@ -5,7 +5,6 @@ enum Api {
   getMineData = '/province/mineData/getMineData',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   resolveAlarm = '/province/alarm/solveProvinceAlarm',
 }
@@ -66,11 +65,6 @@ export const getProvinceAlarm = (params) =>
       joinParamsToUrl: true,
     }
   );
-//获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });
 // 解决预警
 export const resolveAlarm = (params) =>
   defHttp.post({

+ 1 - 6
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts

@@ -6,7 +6,6 @@ enum Api {
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
@@ -59,8 +58,4 @@ export const getProvinceAlarmHistory = (params) =>
       },
     },
     { joinParamsToUrl: true }
-  ); //获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });
+  );

+ 1 - 6
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts

@@ -6,7 +6,6 @@ enum Api {
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
@@ -55,8 +54,4 @@ export const getProvinceAlarmHistory = (params) =>
       },
     },
     { joinParamsToUrl: true }
-  ); //获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });
+  );

+ 1 - 6
src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts

@@ -6,7 +6,6 @@ enum Api {
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
@@ -57,8 +56,4 @@ export const getProvinceAlarmHistory = (params) =>
       },
     },
     { joinParamsToUrl: true }
-  ); //获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });
+  );

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

@@ -6,7 +6,6 @@ enum Api {
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
@@ -58,8 +57,3 @@ export const getProvinceAlarmHistory = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });

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

@@ -6,7 +6,6 @@ enum Api {
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
-  getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
@@ -58,8 +57,3 @@ export const getProvinceAlarmHistory = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//获取执法处以及区域数据
-export const getEnfMineTreeData = () =>
-  defHttp.get({
-    url: Api.getEnfMineTreeData,
-  });

+ 1 - 0
src/views/dashboard/basicInfo/closedStatistics/index.vue

@@ -1,3 +1,4 @@
+<!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <div class="p-4">
     <BasicTable @register="registerTable" :scroll="{ x: 'fit-content' }">

+ 124 - 124
src/views/monitor/sealedMonitor/index.vue

@@ -41,144 +41,144 @@
 </template>
 
 <script setup lang="ts">
-import { ref } from 'vue';
-import { BasicTable } from '/@/components/Table';
-import { Tabs, TabPane, message } from 'ant-design-vue';
-// 引入模拟数据
-import { columns, historicalColumns, historicalFormSchema, searchFormSchema } from './monitor.data';
-import RealtimeDetailsModal from './components/RealtimeDetailsModal.vue';
-// import HistoricalDetailsModal from './components/HistoricalDetailsModal.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { getGoafData, getGoafHistory, exportMineData } from './monitor.api';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { useModal } from '/@/components/Modal';
-import { useIntervalFn } from '@vueuse/core';
-import { useInitForm } from './hooks/form';
-// import { getGoafList } from '../../system/algorithm/algorithm.api';
+  import { ref } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { Tabs, TabPane, message } from 'ant-design-vue';
+  // 引入模拟数据
+  import { columns, historicalColumns, historicalFormSchema, searchFormSchema } from './monitor.data';
+  import RealtimeDetailsModal from './components/RealtimeDetailsModal.vue';
+  // import HistoricalDetailsModal from './components/HistoricalDetailsModal.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { getGoafData, getGoafHistory } from './monitor.api';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { useModal } from '/@/components/Modal';
+  import { useIntervalFn } from '@vueuse/core';
+  import { useInitForm } from './hooks/form';
+  // import { getGoafList } from '../../system/algorithm/algorithm.api';
 
-// 激活的Tab页签
+  // 激活的Tab页签
 
-// 处理矿名选择器相关的逻辑
-const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
-const activeTab = ref('realtime');
-const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
-const wrappedGetMineData = async (params) => {
-  // 缓存参数(这就是getMineData实际请求的参数)
-  tableQueryParams.value = { ...params };
-  // 调用原接口
-  return await getGoafData(params);
-};
-// 注册实时数据表格
-const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
-  tableProps: {
-    api: wrappedGetMineData,
-    columns,
-    formConfig: {
-      model: { mineCodeList: rawcode },
-      schemas: [
-        {
-          field: 'mineCodeList',
-          label: '煤矿名称',
-          component: 'MineCascader',
-          colProps: { span: 6 },
-          required: true,
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            rootId: departId,
+  // 处理矿名选择器相关的逻辑
+  const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
+  const activeTab = ref('realtime');
+  const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
+  const wrappedGetMineData = async (params) => {
+    // 缓存参数(这就是getMineData实际请求的参数)
+    tableQueryParams.value = { ...params };
+    // 调用原接口
+    return await getGoafData(params);
+  };
+  // 注册实时数据表格
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      api: wrappedGetMineData,
+      columns,
+      formConfig: {
+        model: { mineCodeList: rawcode },
+        schemas: [
+          {
+            field: 'mineCodeList',
+            label: '煤矿名称',
+            component: 'MineCascader',
+            colProps: { span: 6 },
+            required: true,
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              rootId: departId,
+            },
           },
-        },
-        ...searchFormSchema,
-      ],
-      schemaGroupNames: ['常规查询'],
+          ...searchFormSchema,
+        ],
+        schemaGroupNames: ['常规查询'],
+      },
+      showIndexColumn: false,
+      scroll: { x: 'max-content' },
     },
-    showIndexColumn: false,
-    scroll: { x: 'max-content' },
-  },
-  pagination: false,
-  exportConfig: {
-    url: '/ventanaly-province/province/device/exportGoafReal',
-    name: '密闭监测数据',
-    params: {
-      goafId,
+    pagination: false,
+    exportConfig: {
+      url: '/ventanaly-province/province/device/exportGoafReal',
+      name: '密闭监测数据',
+      params: {
+        goafId,
+      },
     },
-  },
-});
-const [registerRealtimeTable, realtimeTable] = ctxRealtime;
+  });
+  const [registerRealtimeTable, realtimeTable] = ctxRealtime;
 
-const { pause, resume } = useIntervalFn(() => realtimeTable.reload({ silence: true }), 10000);
+  const { pause, resume } = useIntervalFn(() => realtimeTable.reload({ silence: true }), 10000);
 
-// 注册历史数据表格
-const { tableContext: ctxHistory, onExportXls } = useListPage({
-  tableProps: {
-    api: (params) => {
-      if (!goafId.value) {
-        message.info('请先选择煤矿及老空区');
-        return Promise.reject();
-      }
-      params.goafId = goafId.value;
-      return getGoafHistory(params);
-    },
-    columns: historicalColumns,
-    formConfig: {
-      model: {
-        mineCodeList: hiscode,
+  // 注册历史数据表格
+  const { tableContext: ctxHistory, onExportXls } = useListPage({
+    tableProps: {
+      api: (params) => {
+        if (!goafId.value) {
+          message.info('请先选择煤矿及老空区');
+          return Promise.reject();
+        }
+        params.goafId = goafId.value;
+        return getGoafHistory(params);
       },
-      schemas: [
-        {
-          field: 'mineCodeList',
-          label: '煤矿名称',
-          component: 'MineCascader',
-          colProps: { span: 6 },
-          required: true,
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            rootId: departId,
-            onChange(v) {
-              historyTable.setLoading(true);
-              initGoafOptions(v).finally(() => {
-                historyTable.setLoading(false);
-              });
+      columns: historicalColumns,
+      formConfig: {
+        model: {
+          mineCodeList: hiscode,
+        },
+        schemas: [
+          {
+            field: 'mineCodeList',
+            label: '煤矿名称',
+            component: 'MineCascader',
+            colProps: { span: 6 },
+            required: true,
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              rootId: departId,
+              onChange(v) {
+                historyTable.setLoading(true);
+                initGoafOptions(v).finally(() => {
+                  historyTable.setLoading(false);
+                });
+              },
             },
           },
-        },
-        ...historicalFormSchema,
-      ], // 使用历史数据的搜索配置
-      schemaGroupNames: ['常规查询'],
+          ...historicalFormSchema,
+        ], // 使用历史数据的搜索配置
+        schemaGroupNames: ['常规查询'],
+      },
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      scroll: { x: 'max-content' },
+      showActionColumn: false,
     },
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    scroll: { x: 'max-content' },
-    showActionColumn: false,
-  },
-  exportConfig: {
-    url: '/province/device/exportGoafHistory',
-    name: '历史数据',
-    params: {
-      goafId,
+    exportConfig: {
+      url: '/province/device/exportGoafHistory',
+      name: '历史数据',
+      params: {
+        goafId,
+      },
     },
-  },
-  pagination: true,
-});
-const [registerHistoryTable, historyTable] = ctxHistory;
+    pagination: true,
+  });
+  const [registerHistoryTable, historyTable] = ctxHistory;
 
-// 弹窗引用
-const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
-// const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
+  // 弹窗引用
+  const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
+  // const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
 
-// 打开弹窗方法(区分实时/历史)
-const openModal = (record) => {
-  openRealtimeModal(true, record);
-  // if (type === 'realtime') {
-  //   // 可向实时弹窗传递当前记录数据
-  // } else {
-  //   // 可向历史弹窗传递当前记录数据
-  //   openHistoryModal(true, record);
-  // }
-  pause();
-};
+  // 打开弹窗方法(区分实时/历史)
+  const openModal = (record) => {
+    openRealtimeModal(true, record);
+    // if (type === 'realtime') {
+    //   // 可向实时弹窗传递当前记录数据
+    // } else {
+    //   // 可向历史弹窗传递当前记录数据
+    //   openHistoryModal(true, record);
+    // }
+    pause();
+  };
 </script>
 
 <style lang="less" scoped></style>

+ 1 - 0
src/views/system/depart/index.vue

@@ -1,3 +1,4 @@
+<!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <a-row :class="['p-4', `${prefixCls}--box`]" type="flex">
     <a-col :span="12">