Преглед на файлове

[Pref 0000] 预警分析优化

houzekong преди 1 месец
родител
ревизия
a4e465e17d
променени са 22 файла, в които са добавени 797 реда и са изтрити 1221 реда
  1. 0 22
      src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts
  2. 178 178
      src/views/analysis/warningAnalysis/airLeakStatus/index.vue
  3. 0 19
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts
  4. 0 68
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts
  5. 171 171
      src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue
  6. 0 17
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts
  7. 0 68
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts
  8. 2 2
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue
  9. 171 171
      src/views/analysis/warningAnalysis/overlimitAlarm/index.vue
  10. 0 19
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts
  11. 0 68
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts
  12. 171 171
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue
  13. 0 19
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts
  14. 0 68
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts
  15. 0 19
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts
  16. 0 67
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts
  17. 2 2
      src/views/monitor/sealedMonitor/index.vue
  18. 14 14
      src/views/monitor/sealedMonitor/monitor.data.ts
  19. 14 16
      src/views/system/depart/components/DepartLeftTree.vue
  20. 63 37
      src/views/system/depart/components/DepartRuleTab.vue
  21. 10 3
      src/views/system/depart/index.vue
  22. 1 2
      types/global.d.ts

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

@@ -2,8 +2,6 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
-  getMineData = '/province/mineData/getMineData',
-  getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   resolveAlarm = '/province/alarm/solveProvinceAlarm',
@@ -17,26 +15,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getMineData,
-      params,
-    },
-    { joinParamsToUrl: true }
-  );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    {
-      joinParamsToUrl: true,
-    }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 178 - 178
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -52,196 +52,196 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted } from 'vue';
-import { BasicTable, useTable } from '/@/components/Table';
-import { Tabs, TabPane, message } from 'ant-design-vue';
-import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-import { SvgIcon } from '/@/components/Icon';
-// 引入模拟数据
-import { columns } from './airLeakStatus.data';
-import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum, exportMineData } from './airLeak.api';
-import { useInitForm } from '../../common/analysis';
-import { BasicModal } from '/@/components/Modal/index';
-import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-import { useIntervalFn } from '@vueuse/core';
-import { useListPage } from '/@/hooks/system/useListPage';
+  import { ref, onMounted } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { Tabs, TabPane, message } from 'ant-design-vue';
+  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  // 引入模拟数据
+  import { columns } from './airLeakStatus.data';
+  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './airLeak.api';
+  import { useInitForm } from '../../common/analysis';
+  import { BasicModal } from '/@/components/Modal/index';
+  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+  // import { useIntervalFn } from '@vueuse/core';
+  import { useListPage } from '/@/hooks/system/useListPage';
 
-// 激活的Tab页签
-const activeTab = ref('realtime');
+  // 激活的Tab页签
+  const activeTab = ref('realtime');
 
-const boardData = ref([
-  { label: '存在风险情况数量', value: '-' },
-  { label: '闭内气体涌出', value: '-' },
-  { label: '闭外气体涌出', value: '-' },
-]);
-const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
-const wrappedGetMineData = async (params) => {
-  // 缓存参数(这就是getMineData实际请求的参数)
-  tableQueryParams.value = { ...params };
-  // 调用原接口
-  return await getProvinceAlarm(params);
-};
-// 注册实时数据表格
-const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
-  tableProps: {
-    api: wrappedGetMineData,
-    columns,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 80,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-    },
-  },
-  exportConfig: {
-    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
-    name: '密闭漏风状态判定',
-    params: {
-      alarmType: 'leakageAlarm',
+  const boardData = ref([
+    { label: '存在风险情况数量', value: '-' },
+    { label: '闭内气体涌出', value: '-' },
+    { label: '闭外气体涌出', value: '-' },
+  ]);
+  const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
+  const wrappedGetMineData = async (params) => {
+    // 缓存参数(这就是getMineData实际请求的参数)
+    tableQueryParams.value = { ...params };
+    // 调用原接口
+    return await getProvinceAlarm(params);
+  };
+  // 注册实时数据表格
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      api: wrappedGetMineData,
+      columns,
+      formConfig: {
+        labelWidth: 120,
+        schemas: [
+          {
+            label: '煤矿名称',
+            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            colProps: { span: 6 },
+          },
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+      },
     },
-  },
-});
-const [registerRealtimeTable] = ctxRealtime;
-const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
-// 注册历史数据表格
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    columns,
-    // columns: historyColumns,
-    api: (params) => {
-      if (!goafId.value) {
-        message.info('请先选择煤矿及老空区');
-        return Promise.reject();
-      }
-      params.goafId = goafId.value;
-      return getProvinceAlarmHistory(params);
+    exportConfig: {
+      url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+      name: '密闭漏风状态判定',
+      params: {
+        alarmType: 'leakageAlarm',
+      },
     },
-    formConfig: {
-      model: { mineCode: hiscode },
-      labelWidth: 120,
-      schemas: [
-        // {
-        //   label: '开始时间',
-        //   field: 'startTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择开始时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择开始时间' }],
-        // },
-        // {
-        //   label: '结束时间',
-        //   field: 'endTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs(),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择结束时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择结束时间' }],
-        // },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            changeOnSelect: false,
-            onChange: (e) => {
-              historyTable.setLoading(true);
-              initGoafOptions(e).finally(() => {
-                historyTable.setLoading(false);
-              });
+  });
+  const [registerRealtimeTable] = ctxRealtime;
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+  // 注册历史数据表格
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      columns,
+      // columns: historyColumns,
+      api: (params) => {
+        if (!goafId.value) {
+          message.info('请先选择煤矿及老空区');
+          return Promise.reject();
+        }
+        params.goafId = goafId.value;
+        return getProvinceAlarmHistory(params);
+      },
+      formConfig: {
+        model: { mineCode: hiscode },
+        labelWidth: 120,
+        schemas: [
+          // {
+          //   label: '开始时间',
+          //   field: 'startTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择开始时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择开始时间' }],
+          // },
+          // {
+          //   label: '结束时间',
+          //   field: 'endTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs(),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择结束时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择结束时间' }],
+          // },
+          {
+            label: '煤矿名称',
+            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              changeOnSelect: false,
+              onChange: (e) => {
+                historyTable.setLoading(true);
+                initGoafOptions(e).finally(() => {
+                  historyTable.setLoading(false);
+                });
+              },
             },
+            colProps: { span: 6 },
+            rules: [],
           },
-          colProps: { span: 6 },
-          rules: [],
-        },
-        ...historicalFormSchema,
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+          ...historicalFormSchema,
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: true,
+      showActionColumn: false,
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: true,
-    showActionColumn: false,
-  },
-  exportConfig: {
-    url: '/province/alarm/exportProvinceAlarmHistory',
-    name: '历史数据',
-    params: {
-      alarmType: 'leakageAlarm',
-      goafId,
+    exportConfig: {
+      url: '/province/alarm/exportProvinceAlarmHistory',
+      name: '历史数据',
+      params: {
+        alarmType: 'leakageAlarm',
+        goafId,
+      },
     },
-  },
-});
+  });
 
-const [registerHistoryTable, historyTable] = tableContext;
+  const [registerHistoryTable, historyTable] = tableContext;
 
-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 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;
+  }
 
-onMounted(() => {
-  // 页面挂载时的逻辑
-  getAlarmTotalData();
-});
+  onMounted(() => {
+    // 页面挂载时的逻辑
+    getAlarmTotalData();
+  });
 </script>
 
 <style lang="less" scoped>
-.board-info {
-  display: flex;
-  flex-wrap: nowrap;
-  padding: 10px;
-  justify-content: space-evenly;
-  background-color: @white;
-  // margin: 0 10px;
-  margin-bottom: 5px;
-  gap: 10px;
-  box-sizing: border-box;
-}
-.board-item {
-  // flex: 1;
-  box-sizing: border-box;
-}
-: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;
-}
+  .board-info {
+    display: flex;
+    flex-wrap: nowrap;
+    padding: 10px;
+    justify-content: space-evenly;
+    background-color: @white;
+    // margin: 0 10px;
+    margin-bottom: 5px;
+    gap: 10px;
+    box-sizing: border-box;
+  }
+  .board-item {
+    // flex: 1;
+    box-sizing: border-box;
+  }
+  :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>

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

@@ -2,9 +2,7 @@ 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',
 }
 //根据预警类型查询不同等级数量
@@ -16,12 +14,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
   defHttp.post(
@@ -36,17 +28,6 @@ export const getProvinceAlarm = (params) =>
       joinParamsToUrl: true,
     }
   );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    {
-      joinParamsToUrl: true,
-    }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 0 - 68
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts

@@ -1,5 +1,4 @@
 import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
 import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
 
 export const boardData = [
@@ -115,70 +114,3 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
 ];
-
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'mineName',
-    label: '所属执法处',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '所属区域',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '煤矿名称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineNameAbbr',
-    label: '煤矿简称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'productStatus',
-    label: '生产状态',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '拟建矿井', value: '0' },
-        { label: '正常生产矿井', value: '1' },
-        { label: '长期停产矿井', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'riskLevel',
-    label: '自燃倾向性',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];

+ 171 - 171
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -58,191 +58,191 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted } from 'vue';
-import { BasicTable, useTable } from '/@/components/Table';
-import { Tabs, TabPane, message } from 'ant-design-vue';
-import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-import { SvgIcon } from '/@/components/Icon';
-// 引入模拟数据
-import { columns } from './autoFireAnalysis.data';
-import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
-import { useInitForm } from '../../common/analysis';
-import { BasicModal } from '/@/components/Modal/index';
-import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-import { useIntervalFn } from '@vueuse/core';
-import { useListPage } from '/@/hooks/system/useListPage';
+  import { ref, onMounted } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { Tabs, TabPane, message } from 'ant-design-vue';
+  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  // 引入模拟数据
+  import { columns } from './autoFireAnalysis.data';
+  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
+  import { useInitForm } from '../../common/analysis';
+  import { BasicModal } from '/@/components/Modal/index';
+  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+  // import { useIntervalFn } from '@vueuse/core';
+  import { useListPage } from '/@/hooks/system/useListPage';
 
-// 激活的Tab页签
-const activeTab = ref('realtime');
+  // 激活的Tab页签
+  const activeTab = ref('realtime');
 
-const boardData = ref([
-  {
-    label: '存在风险情况数量',
-    value: '-',
-  },
-  {
-    label: '低风险',
-    value: '-',
-  },
-  {
-    label: '一般风险',
-    value: '-',
-  },
-  {
-    label: '较高风险',
-    value: '-',
-  },
-  {
-    label: '高风险',
-    value: '-',
-  },
-]);
-
-// 注册实时数据表格
-const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
-  tableProps: {
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+  const boardData = ref([
+    {
+      label: '存在风险情况数量',
+      value: '-',
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 80,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
+    {
+      label: '低风险',
+      value: '-',
     },
-  },
-  exportConfig: {
-    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
-    name: '自燃发火隐患分级',
-    params: {
-      alarmType: 'fireAlarm',
+    {
+      label: '一般风险',
+      value: '-',
+    },
+    {
+      label: '较高风险',
+      value: '-',
     },
-  },
-});
-const [registerRealtimeTable] = ctxRealtime;
-const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
-// 注册历史数据表格
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    columns,
-    // columns: historyColumns,
-    api: (params) => {
-      if (!goafId.value) {
-        message.info('请先选择煤矿及老空区');
-        return Promise.reject();
-      }
-      params.goafId = goafId.value;
-      return getProvinceAlarmHistory(params);
+    {
+      label: '高风险',
+      value: '-',
     },
-    formConfig: {
-      model: { mineCode: hiscode },
-      labelWidth: 120,
-      schemas: [
-        // {
-        //   label: '开始时间',
-        //   field: 'startTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择开始时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择开始时间' }],
-        // },
-        // {
-        //   label: '结束时间',
-        //   field: 'endTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs(),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择结束时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择结束时间' }],
-        // },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            changeOnSelect: false,
-            onChange: (e) => {
-              historyTable.setLoading(true);
-              initGoafOptions(e).finally(() => {
-                historyTable.setLoading(false);
-              });
+  ]);
+
+  // 注册实时数据表格
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      columns,
+      api: getProvinceAlarm,
+      formConfig: {
+        labelWidth: 120,
+        schemas: [
+          {
+            label: '煤矿名称',
+            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            colProps: { span: 6 },
+            rules: [],
+          },
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: undefined,
+      },
+    },
+    exportConfig: {
+      url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+      name: '自燃发火隐患分级',
+      params: {
+        alarmType: 'fireAlarm',
+      },
+    },
+  });
+  const [registerRealtimeTable] = ctxRealtime;
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+  // 注册历史数据表格
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      columns,
+      // columns: historyColumns,
+      api: (params) => {
+        if (!goafId.value) {
+          message.info('请先选择煤矿及老空区');
+          return Promise.reject();
+        }
+        params.goafId = goafId.value;
+        return getProvinceAlarmHistory(params);
+      },
+      formConfig: {
+        model: { mineCode: hiscode },
+        labelWidth: 120,
+        schemas: [
+          // {
+          //   label: '开始时间',
+          //   field: 'startTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择开始时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择开始时间' }],
+          // },
+          // {
+          //   label: '结束时间',
+          //   field: 'endTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs(),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择结束时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择结束时间' }],
+          // },
+          {
+            label: '煤矿名称',
+            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              changeOnSelect: false,
+              onChange: (e) => {
+                historyTable.setLoading(true);
+                initGoafOptions(e).finally(() => {
+                  historyTable.setLoading(false);
+                });
+              },
             },
+            colProps: { span: 6 },
+            rules: [],
           },
-          colProps: { span: 6 },
-          rules: [],
-        },
-        ...historicalFormSchema,
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+          ...historicalFormSchema,
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: true,
+      showActionColumn: false,
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: true,
-    showActionColumn: false,
-  },
-  exportConfig: {
-    url: '/province/alarm/exportProvinceAlarmHistory',
-    name: '历史数据',
-    params: {
-      alarmType: 'fireAlarm',
-      goafId,
+    exportConfig: {
+      url: '/province/alarm/exportProvinceAlarmHistory',
+      name: '历史数据',
+      params: {
+        alarmType: 'fireAlarm',
+        goafId,
+      },
     },
-  },
-});
+  });
 
-const [registerHistoryTable, historyTable] = tableContext;
+  const [registerHistoryTable, historyTable] = tableContext;
 
-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;
-}
+  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(() => {
-  // 页面挂载时的逻辑
-  getAlarmTotalData();
-});
+  onMounted(() => {
+    // 页面挂载时的逻辑
+    getAlarmTotalData();
+  });
 </script>
 
 <style lang="less" scoped>
-@import url(../../common/board.less);
+  @import url(../../common/board.less);
 </style>

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

@@ -2,9 +2,7 @@ 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',
 }
 //根据预警类型查询不同等级数量
@@ -16,12 +14,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
   defHttp.post(
@@ -34,15 +26,6 @@ export const getProvinceAlarm = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    { joinParamsToUrl: true }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 0 - 68
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts

@@ -1,5 +1,4 @@
 import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
 import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
 
 export const boardData = [
@@ -105,70 +104,3 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
 ];
-
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'mineName',
-    label: '所属执法处',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '所属区域',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '煤矿名称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineNameAbbr',
-    label: '煤矿简称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'productStatus',
-    label: '生产状态',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '拟建矿井', value: '0' },
-        { label: '正常生产矿井', value: '1' },
-        { label: '长期停产矿井', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'riskLevel',
-    label: '自燃倾向性',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];

+ 2 - 2
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -57,7 +57,7 @@
 
 <script setup lang="ts">
   import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
+  import { BasicTable } from '/@/components/Table';
   import { Tabs, TabPane, message } from 'ant-design-vue';
   import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
   import { SvgIcon } from '/@/components/Icon';
@@ -67,7 +67,7 @@
   import { useInitForm } from '../../common/analysis';
   import { BasicModal } from '/@/components/Modal/index';
   import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
+  // import { useIntervalFn } from '@vueuse/core';
   import { useListPage } from '/@/hooks/system/useListPage';
 
   // 激活的Tab页签

+ 171 - 171
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -56,192 +56,192 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted } from 'vue';
-import { BasicTable, useTable } from '/@/components/Table';
-import { Tabs, TabPane, message } from 'ant-design-vue';
-import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-import { SvgIcon } from '/@/components/Icon';
-// 引入模拟数据
-import { columns } from './overlimitAlarm.data';
-import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
-import { useInitForm } from '../../common/analysis';
-import { BasicModal } from '/@/components/Modal/index';
-import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-import { useIntervalFn } from '@vueuse/core';
-import { useListPage } from '/@/hooks/system/useListPage';
+  import { ref, onMounted } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { Tabs, TabPane, message } from 'ant-design-vue';
+  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  // 引入模拟数据
+  import { columns } from './overlimitAlarm.data';
+  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
+  import { useInitForm } from '../../common/analysis';
+  import { BasicModal } from '/@/components/Modal/index';
+  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+  // import { useIntervalFn } from '@vueuse/core';
+  import { useListPage } from '/@/hooks/system/useListPage';
 
-// 激活的Tab页签
-const activeTab = ref('realtime');
+  // 激活的Tab页签
+  const activeTab = ref('realtime');
 
-const boardData = ref([
-  {
-    label: '存在风险情况数量',
-    value: '-',
-  },
-  {
-    label: '低风险',
-    value: '-',
-  },
-  {
-    label: '一般风险',
-    value: '-',
-  },
-  {
-    label: '较高风险',
-    value: '-',
-  },
-  {
-    label: '高风险',
-    value: '-',
-  },
-]);
-
-// 注册实时数据表格
-const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
-  tableProps: {
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+  const boardData = ref([
+    {
+      label: '存在风险情况数量',
+      value: '-',
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 80,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
+    {
+      label: '低风险',
+      value: '-',
     },
-  },
-  exportConfig: {
-    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
-    name: '超限报警',
-    params: {
-      alarmType: 'overLimitAlarm',
+    {
+      label: '一般风险',
+      value: '-',
+    },
+    {
+      label: '较高风险',
+      value: '-',
     },
-  },
-});
-const [registerRealtimeTable] = ctxRealtime;
-const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+    {
+      label: '高风险',
+      value: '-',
+    },
+  ]);
 
-// 注册历史数据表格
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    columns,
-    // columns: historyColumns,
-    api: (params) => {
-      if (!goafId.value) {
-        message.info('请先选择煤矿及老空区');
-        return Promise.reject();
-      }
-      params.goafId = goafId.value;
-      return getProvinceAlarmHistory(params);
+  // 注册实时数据表格
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      columns,
+      api: getProvinceAlarm,
+      formConfig: {
+        labelWidth: 120,
+        schemas: [
+          {
+            label: '煤矿名称',
+            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            colProps: { span: 6 },
+            rules: [],
+          },
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: undefined,
+      },
     },
-    formConfig: {
-      model: { mineCode: hiscode },
-      labelWidth: 120,
-      schemas: [
-        // {
-        //   label: '开始时间',
-        //   field: 'startTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择开始时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择开始时间' }],
-        // },
-        // {
-        //   label: '结束时间',
-        //   field: 'endTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs(),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择结束时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择结束时间' }],
-        // },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            changeOnSelect: false,
-            onChange: (e) => {
-              historyTable.setLoading(true);
-              initGoafOptions(e).finally(() => {
-                historyTable.setLoading(false);
-              });
+    exportConfig: {
+      url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+      name: '超限报警',
+      params: {
+        alarmType: 'overLimitAlarm',
+      },
+    },
+  });
+  const [registerRealtimeTable] = ctxRealtime;
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+
+  // 注册历史数据表格
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      columns,
+      // columns: historyColumns,
+      api: (params) => {
+        if (!goafId.value) {
+          message.info('请先选择煤矿及老空区');
+          return Promise.reject();
+        }
+        params.goafId = goafId.value;
+        return getProvinceAlarmHistory(params);
+      },
+      formConfig: {
+        model: { mineCode: hiscode },
+        labelWidth: 120,
+        schemas: [
+          // {
+          //   label: '开始时间',
+          //   field: 'startTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择开始时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择开始时间' }],
+          // },
+          // {
+          //   label: '结束时间',
+          //   field: 'endTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs(),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择结束时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择结束时间' }],
+          // },
+          {
+            label: '煤矿名称',
+            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              changeOnSelect: false,
+              onChange: (e) => {
+                historyTable.setLoading(true);
+                initGoafOptions(e).finally(() => {
+                  historyTable.setLoading(false);
+                });
+              },
             },
+            colProps: { span: 6 },
+            rules: [],
           },
-          colProps: { span: 6 },
-          rules: [],
-        },
-        ...historicalFormSchema,
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+          ...historicalFormSchema,
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: true,
+      showActionColumn: false,
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: true,
-    showActionColumn: false,
-  },
-  exportConfig: {
-    url: '/province/alarm/exportProvinceAlarmHistory',
-    name: '历史数据',
-    params: {
-      alarmType: 'overLimitAlarm',
-      goafId,
+    exportConfig: {
+      url: '/province/alarm/exportProvinceAlarmHistory',
+      name: '历史数据',
+      params: {
+        alarmType: 'overLimitAlarm',
+        goafId,
+      },
     },
-  },
-});
+  });
 
-const [registerHistoryTable, historyTable] = tableContext;
+  const [registerHistoryTable, historyTable] = tableContext;
 
-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;
-}
+  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(() => {
-  // 页面挂载时的逻辑
-  getAlarmTotalData();
-});
+  onMounted(() => {
+    // 页面挂载时的逻辑
+    getAlarmTotalData();
+  });
 </script>
 
 <style lang="less" scoped>
-@import url(../../common/board.less);
+  @import url(../../common/board.less);
 </style>

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

@@ -2,9 +2,7 @@ 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',
 }
 //根据预警类型查询不同等级数量
@@ -16,12 +14,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
   defHttp.post(
@@ -34,17 +26,6 @@ export const getProvinceAlarm = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    {
-      joinParamsToUrl: true,
-    }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 0 - 68
src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts

@@ -1,5 +1,4 @@
 import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
 import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
 
 export const boardData = [
@@ -95,70 +94,3 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
 ];
-
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'mineName',
-    label: '所属执法处',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '所属区域',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '煤矿名称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineNameAbbr',
-    label: '煤矿简称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'productStatus',
-    label: '生产状态',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '拟建矿井', value: '0' },
-        { label: '正常生产矿井', value: '1' },
-        { label: '长期停产矿井', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'riskLevel',
-    label: '自燃倾向性',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];

+ 171 - 171
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -71,192 +71,192 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted } from 'vue';
-import { BasicTable, useTable } from '/@/components/Table';
-import { Tabs, TabPane, message } from 'ant-design-vue';
-import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-import { SvgIcon } from '/@/components/Icon';
-// 引入模拟数据
-import { columns } from './pressureDiffAnalysis.data';
-import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
-import { useInitForm } from '../../common/analysis';
-import { BasicModal } from '/@/components/Modal/index';
-import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-import { useIntervalFn } from '@vueuse/core';
-import { useListPage } from '/@/hooks/system/useListPage';
+  import { ref, onMounted } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { Tabs, TabPane, message } from 'ant-design-vue';
+  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  // 引入模拟数据
+  import { columns } from './pressureDiffAnalysis.data';
+  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
+  import { useInitForm } from '../../common/analysis';
+  import { BasicModal } from '/@/components/Modal/index';
+  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+  // import { useIntervalFn } from '@vueuse/core';
+  import { useListPage } from '/@/hooks/system/useListPage';
 
-// 激活的Tab页签
-const activeTab = ref('realtime');
+  // 激活的Tab页签
+  const activeTab = ref('realtime');
 
-const boardData = ref([
-  {
-    label: '存在风险情况数量',
-    value: '-',
-  },
-  {
-    label: '低风险',
-    value: '-',
-  },
-  {
-    label: '一般风险',
-    value: '-',
-  },
-  {
-    label: '较高风险',
-    value: '-',
-  },
-  {
-    label: '高风险',
-    value: '-',
-  },
-]);
-
-// 注册实时数据表格
-const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
-  tableProps: {
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+  const boardData = ref([
+    {
+      label: '存在风险情况数量',
+      value: '-',
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 80,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
+    {
+      label: '低风险',
+      value: '-',
     },
-  },
-  exportConfig: {
-    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
-    name: '内外压差变化风险分析',
-    params: {
-      alarmType: 'sourcePressureAlarm',
+    {
+      label: '一般风险',
+      value: '-',
+    },
+    {
+      label: '较高风险',
+      value: '-',
     },
-  },
-});
-const [registerRealtimeTable] = ctxRealtime;
-const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+    {
+      label: '高风险',
+      value: '-',
+    },
+  ]);
 
-// 注册历史数据表格
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    columns,
-    // columns: historyColumns,
-    api: (params) => {
-      if (!goafId.value) {
-        message.info('请先选择煤矿及老空区');
-        return Promise.reject();
-      }
-      params.goafId = goafId.value;
-      return getProvinceAlarmHistory(params);
+  // 注册实时数据表格
+  const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+    tableProps: {
+      columns,
+      api: getProvinceAlarm,
+      formConfig: {
+        labelWidth: 120,
+        schemas: [
+          {
+            label: '煤矿名称',
+            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            colProps: { span: 6 },
+            rules: [],
+          },
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: false,
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: undefined,
+      },
     },
-    formConfig: {
-      model: { mineCode: hiscode },
-      labelWidth: 120,
-      schemas: [
-        // {
-        //   label: '开始时间',
-        //   field: 'startTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择开始时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择开始时间' }],
-        // },
-        // {
-        //   label: '结束时间',
-        //   field: 'endTime',
-        //   component: 'DatePicker',
-        //   defaultValue: dayjs(),
-        //   componentProps: {
-        //     showTime: true,
-        //     placeholder: '请选择结束时间',
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //   },
-        //   colProps: { span: 6 },
-        //   rules: [{ required: true, message: '请选择结束时间' }],
-        // },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            initFromStore: false,
-            syncToStore: false,
-            changeOnSelect: false,
-            onChange: (e) => {
-              historyTable.setLoading(true);
-              initGoafOptions(e).finally(() => {
-                historyTable.setLoading(false);
-              });
+    exportConfig: {
+      url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+      name: '内外压差变化风险分析',
+      params: {
+        alarmType: 'sourcePressureAlarm',
+      },
+    },
+  });
+  const [registerRealtimeTable] = ctxRealtime;
+  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+
+  // 注册历史数据表格
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      columns,
+      // columns: historyColumns,
+      api: (params) => {
+        if (!goafId.value) {
+          message.info('请先选择煤矿及老空区');
+          return Promise.reject();
+        }
+        params.goafId = goafId.value;
+        return getProvinceAlarmHistory(params);
+      },
+      formConfig: {
+        model: { mineCode: hiscode },
+        labelWidth: 120,
+        schemas: [
+          // {
+          //   label: '开始时间',
+          //   field: 'startTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择开始时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择开始时间' }],
+          // },
+          // {
+          //   label: '结束时间',
+          //   field: 'endTime',
+          //   component: 'DatePicker',
+          //   defaultValue: dayjs(),
+          //   componentProps: {
+          //     showTime: true,
+          //     placeholder: '请选择结束时间',
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //   },
+          //   colProps: { span: 6 },
+          //   rules: [{ required: true, message: '请选择结束时间' }],
+          // },
+          {
+            label: '煤矿名称',
+            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            component: 'MineCascader', // 自定义组件名
+            componentProps: {
+              initFromStore: false,
+              syncToStore: false,
+              changeOnSelect: false,
+              onChange: (e) => {
+                historyTable.setLoading(true);
+                initGoafOptions(e).finally(() => {
+                  historyTable.setLoading(false);
+                });
+              },
             },
+            colProps: { span: 6 },
+            rules: [],
           },
-          colProps: { span: 6 },
-          rules: [],
-        },
-        ...historicalFormSchema,
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
+          ...historicalFormSchema,
+        ],
+        showAdvancedButton: false,
+        schemaGroupNames: ['常规查询'],
+      },
+      pagination: true,
+      striped: true,
+      useSearchForm: true,
+      bordered: true,
+      showIndexColumn: true,
+      showActionColumn: false,
     },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: true,
-    showActionColumn: false,
-  },
-  exportConfig: {
-    url: '/province/alarm/exportProvinceAlarmHistory',
-    name: '历史数据',
-    params: {
-      alarmType: 'sourcePressureAlarm',
-      goafId,
+    exportConfig: {
+      url: '/province/alarm/exportProvinceAlarmHistory',
+      name: '历史数据',
+      params: {
+        alarmType: 'sourcePressureAlarm',
+        goafId,
+      },
     },
-  },
-});
+  });
 
-const [registerHistoryTable, historyTable] = tableContext;
+  const [registerHistoryTable, historyTable] = tableContext;
 
-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;
-}
+  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(() => {
-  // 页面挂载时的逻辑
-  getAlarmTotalData();
-});
+  onMounted(() => {
+    // 页面挂载时的逻辑
+    getAlarmTotalData();
+  });
 </script>
 
 <style lang="less" scoped>
-@import url(../../common/board.less);
+  @import url(../../common/board.less);
 </style>

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

@@ -2,9 +2,7 @@ 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',
 }
 //根据预警类型查询不同等级数量
@@ -16,12 +14,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
   defHttp.post(
@@ -34,17 +26,6 @@ export const getProvinceAlarm = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    {
-      joinParamsToUrl: true,
-    }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 0 - 68
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts

@@ -1,5 +1,4 @@
 import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
 import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
 
 export const boardData = [
@@ -96,70 +95,3 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
 ];
-
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'mineName',
-    label: '所属执法处',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '所属区域',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '煤矿名称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineNameAbbr',
-    label: '煤矿简称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'productStatus',
-    label: '生产状态',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '拟建矿井', value: '0' },
-        { label: '正常生产矿井', value: '1' },
-        { label: '长期停产矿井', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'riskLevel',
-    label: '自燃倾向性',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];

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

@@ -2,9 +2,7 @@ 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',
 }
 //根据预警类型查询不同等级数量
@@ -16,12 +14,6 @@ export const getProvinceAlarmNum = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询煤矿列表
-export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
   defHttp.post(
@@ -34,17 +26,6 @@ export const getProvinceAlarm = (params) =>
     },
     { joinParamsToUrl: true }
   );
-//查询密闭列表
-export const getGoafData = (params) =>
-  defHttp.post(
-    {
-      url: Api.getGoafData,
-      params,
-    },
-    {
-      joinParamsToUrl: true,
-    }
-  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 0 - 67
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts

@@ -1,5 +1,4 @@
 import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
 import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
 
 export const boardData = [
@@ -100,69 +99,3 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
 ];
-export const searchFormSchema: FormSchema[] = [
-  {
-    field: 'mineName',
-    label: '所属执法处',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '所属区域',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '执法一处', value: '0' },
-        { label: '执法二处', value: '1' },
-        { label: '执法三处', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineName',
-    label: '煤矿名称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'mineNameAbbr',
-    label: '煤矿简称',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    field: 'productStatus',
-    label: '生产状态',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: '拟建矿井', value: '0' },
-        { label: '正常生产矿井', value: '1' },
-        { label: '长期停产矿井', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-  {
-    field: 'riskLevel',
-    label: '自燃倾向性',
-    component: 'Select',
-    componentProps: {
-      options: [
-        { label: 'Ⅰ类容易自燃', value: '0' },
-        { label: 'Ⅱ类自燃', value: '1' },
-        { label: 'Ⅲ类不易自燃', value: '2' },
-      ],
-    },
-    colProps: { span: 6 },
-  },
-];

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

@@ -62,11 +62,11 @@
   const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
   const activeTab = ref('realtime');
   const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
-  const wrappedGetMineData = async (params) => {
+  const wrappedGetMineData = (params) => {
     // 缓存参数(这就是getMineData实际请求的参数)
     tableQueryParams.value = { ...params };
     // 调用原接口
-    return await getGoafData(params);
+    return getGoafData(params);
   };
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({

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

@@ -56,20 +56,20 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '生产状态',
-    dataIndex: 'productionStatus',
+    dataIndex: 'gjMineStatus',
     width: 100,
-    customRender({ text }) {
-      // 从动态映射取值,兜底未知状态
-      const label = dictMap.find((item) => item.value == text)?.label || '-';
-      // 渲染带颜色的文字
-      return h(
-        'span',
-        {
-          color: get({ '0': StatusColorEnum.green, '1': StatusColorEnum.blue }, text),
-        },
-        label
-      );
-    },
+    // customRender({ text }) {
+    //   // 从动态映射取值,兜底未知状态
+    //   const label = dictMap.find((item) => item.value == text)?.label || '-';
+    //   // 渲染带颜色的文字
+    //   return h(
+    //     'span',
+    //     {
+    //       color: get({ '0': StatusColorEnum.green, '1': StatusColorEnum.blue }, text),
+    //     },
+    //     label
+    //   );
+    // },
   },
   {
     title: 'CO(ppm)',
@@ -176,7 +176,7 @@ export const searchFormSchema: FormSchema[] = [
   //   colProps: { span: 6 },
   // },
   {
-    field: 'productionStatus',
+    field: 'gjMineStatus',
     label: '生产状态',
     component: 'JDictSelectTag',
     componentProps: {

+ 14 - 16
src/views/system/depart/components/DepartLeftTree.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card style="height: 100%">
+  <a-card :bordered="false" style="height: 100%">
     <div class="j-table-operator" style="width: 100%">
       <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增</a-button>
       <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">添加下级</a-button>
@@ -58,24 +58,23 @@
         >
           <template #title="{ key: treeKey, title, dataRef }">
             <a-dropdown :trigger="['contextmenu']">
-              <Popconfirm
-                :visible="visibleTreeKey === treeKey"
-                title="确定要删除吗?"
-                ok-text="确定"
-                cancel-text="取消"
-                placement="rightTop"
-                @confirm="onDelete(dataRef)"
-                @visibleChange="onVisibleChange"
-              >
-                <span>{{ title }}</span>
-              </Popconfirm>
+              <span>{{ title }}</span>
 
               <template #overlay>
                 <a-menu>
                   <a-menu-item key="1" @click="onAddChildDepart(dataRef)">添加子级</a-menu-item>
-                  <a-menu-item key="2" @click="visibleTreeKey = treeKey">
-                    <span style="color: red">删除</span>
-                  </a-menu-item>
+                  <Popconfirm
+                    title="确定要删除吗?"
+                    ok-text="确定"
+                    cancel-text="取消"
+                    placement="rightTop"
+                    @confirm="onDelete(dataRef)"
+                    @visibleChange="onVisibleChange"
+                  >
+                    <a-menu-item key="2" @click="visibleTreeKey = treeKey">
+                      <span style="color: red">删除</span>
+                    </a-menu-item>
+                  </Popconfirm>
                 </a-menu>
               </template>
             </a-dropdown>
@@ -267,7 +266,6 @@
 
   // 树选择事件
   function onSelect(selKeys, event) {
-    console.log('select: ', selKeys, event);
     if (selKeys.length > 0 && selectedKeys.value[0] !== selKeys[0]) {
       setSelectedKey(selKeys[0], event.selectedNodes[0]);
     } else {

+ 63 - 37
src/views/system/depart/components/DepartRuleTab.vue

@@ -7,17 +7,16 @@
         checkable
         :treeData="treeData"
         :checkedKeys="checkedKeys"
-        :selectedKeys="selectedKeys"
         :expandedKeys="expandedKeys"
         :checkStrictly="checkStrictly"
+        :selectable="false"
         style="height: 500px; overflow: auto"
         @check="onCheck"
         @expand="onExpand"
-        @select="onSelect"
       >
-        <template #title="{ slotTitle, ruleFlag }">
-          <span>{{ slotTitle }}</span>
-          <Icon v-if="ruleFlag" icon="ant-design:align-left-outlined" style="margin-left: 5px; color: red" />
+        <template #title="{ title }">
+          <span>{{ title }}</span>
+          <!-- <Icon v-if="ruleFlag" icon="ant-design:align-left-outlined" style="margin-left: 5px; color: red" />? -->
         </template>
       </BasicTree>
     </template>
@@ -43,21 +42,24 @@
       </div>
     </div>
   </a-spin>
-  <DepartDataRuleDrawer @register="registerDataRuleDrawer" />
+  <!-- <DepartDataRuleDrawer @register="registerDataRuleDrawer" /> -->
 </template>
 
 <script lang="ts" setup>
-  import { watch, computed, inject, ref, nextTick } from 'vue';
-  import { useDrawer } from '/@/components/Drawer';
+  import { watch, computed, ref, nextTick } from 'vue';
+  // import { useDrawer } from '/@/components/Drawer';
   import { BasicTree } from '/@/components/Tree/index';
-  import DepartDataRuleDrawer from './DepartDataRuleDrawer.vue';
-  import { queryRoleTreeList, queryDepartPermission, saveDepartPermission } from '../depart.api';
+  // import DepartDataRuleDrawer from './DepartDataRuleDrawer.vue';
+  import { saveOrUpdateDepart } from '../depart.api';
   import { useDesign } from '/@/hooks/web/useDesign';
+  import { treeMap } from '/@/utils/helper/treeHelper';
+  import { difference } from 'lodash-es';
 
   const { prefixCls } = useDesign('j-depart-form-content');
   const props = defineProps({
     data: { type: Object, default: () => ({}) },
   });
+  const emit = defineEmits(['success']);
   // 当前选中的部门ID,可能会为空,代表未选择部门
   const departId = computed(() => props.data?.id);
 
@@ -67,11 +69,11 @@
   const expandedKeys = ref<Array<any>>([]);
   const selectedKeys = ref<Array<any>>([]);
   const checkedKeys = ref<Array<any>>([]);
-  const lastCheckedKeys = ref<Array<any>>([]);
-  const checkStrictly = ref(true);
+  // const lastCheckedKeys = ref<Array<any>>([]);
+  const checkStrictly = ref(false);
 
   // 注册数据规则授权弹窗抽屉
-  const [registerDataRuleDrawer, dataRuleDrawer] = useDrawer();
+  // const [registerDataRuleDrawer, dataRuleDrawer] = useDrawer();
 
   // onCreated
   loadData();
@@ -80,8 +82,18 @@
   async function loadData() {
     try {
       loading.value = true;
-      let { treeList } = await queryRoleTreeList();
-      treeData.value = treeList;
+      // let { treeList } = await queryRoleTreeList();
+      // treeData.value = treeList;
+      treeData.value = treeMap(__STATIC_ROUTES__, {
+        conversion: (e) => {
+          selectedKeys.value.push(e.name);
+
+          return {
+            title: e.meta.title,
+            key: e.name,
+          };
+        },
+      });
       await nextTick();
       toggleExpandAll(true);
     } finally {
@@ -93,9 +105,15 @@
     if (departId.value) {
       try {
         loading.value = true;
-        let keys = await queryDepartPermission({ departId: departId.value });
-        checkedKeys.value = keys;
-        lastCheckedKeys.value = [...keys];
+        // let keys = await queryDepartPermission({ departId: departId.value });
+
+        // 借用该字段
+        if (props.data.description) {
+          const ignores = props.data.description.split(',');
+          checkedKeys.value = difference(selectedKeys.value, ignores);
+        } else {
+          checkedKeys.value = selectedKeys.value;
+        }
       } finally {
         loading.value = false;
       }
@@ -105,13 +123,21 @@
   async function onSubmit() {
     try {
       loading.value = true;
-      await saveDepartPermission({
-        departId: departId.value,
-        permissionIds: checkedKeys.value.join(','),
-        lastpermissionIds: lastCheckedKeys.value.join(','),
-      });
-      await loadData();
-      await loadDepartPermission();
+      // await saveDepartPermission({
+      //   departId: departId.value,
+      //   permissionIds: checkedKeys.value.join(','),
+      //   lastpermissionIds: lastCheckedKeys.value.join(','),
+      // });
+      await saveOrUpdateDepart(
+        {
+          ...props.data,
+          description: difference(selectedKeys.value, checkedKeys.value).join(','),
+        },
+        true
+      );
+      // await loadData();
+      // await loadDepartPermission();
+      emit('success');
     } finally {
       loading.value = false;
     }
@@ -132,20 +158,20 @@
   }
 
   // tree选中事件
-  function onSelect($selectedKeys, { selectedNodes }) {
-    if (selectedNodes[0]?.ruleFlag) {
-      let functionId = $selectedKeys[0];
-      dataRuleDrawer.openDrawer(true, { departId, functionId });
-    }
-    selectedKeys.value = [];
-  }
+  // function onSelect($selectedKeys, { selectedNodes }) {
+  //   if (selectedNodes[0]?.ruleFlag) {
+  //     let functionId = $selectedKeys[0];
+  //     dataRuleDrawer.openDrawer(true, { departId, functionId });
+  //   }
+  //   selectedKeys.value = [];
+  // }
 
   // 切换父子关联
-  async function toggleCheckStrictly(flag) {
-    checkStrictly.value = flag;
-    await nextTick();
-    checkedKeys.value = basicTree.value.getCheckedKeys();
-  }
+  // async function toggleCheckStrictly(flag) {
+  //   checkStrictly.value = flag;
+  //   await nextTick();
+  //   checkedKeys.value = basicTree.value.getCheckedKeys();
+  // }
 
   // 切换展开收起
   async function toggleExpandAll(flag) {

+ 10 - 3
src/views/system/depart/index.vue

@@ -1,17 +1,17 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <a-row :class="['p-4', `${prefixCls}--box`]" type="flex">
-    <a-col :span="12">
+    <a-col :span="12" :class="`${prefixCls}--box-left`">
       <DepartLeftTree ref="leftTree" @select="onTreeSelect" @rootTreeData="onRootTreeData" />
     </a-col>
     <a-col :span="12" :class="`${prefixCls}--box-right`">
-      <a-card :bodyStyle="{ padding: '20px 24px 24px 24px' }">
+      <a-card :bordered="false" :bodyStyle="{ padding: '20px 24px 24px 24px', height: '100%' }">
         <a-tabs v-show="departData != null" defaultActiveKey="base-info" type="card">
           <a-tab-pane tab="基本信息" key="base-info" forceRender style="position: relative">
             <DepartFormTab :data="departData" :rootTreeData="rootTreeData" @success="onSuccess" />
           </a-tab-pane>
           <a-tab-pane tab="部门权限" key="role-info">
-            <DepartRuleTab :data="departData" />
+            <DepartRuleTab :data="departData" @success="onSuccess" />
           </a-tab-pane>
         </a-tabs>
         <div v-show="departData == null" style="padding-top: 40px">
@@ -66,5 +66,12 @@
     // box-shadow: 0 0 20px #44b4ff33 inset;
     // background-color: @white;
     box-sizing: border-box;
+
+    &-left {
+      background-color: @white;
+    }
+    &-right {
+      background-color: @white;
+    }
   }
 </style>

+ 1 - 2
types/global.d.ts

@@ -1,8 +1,7 @@
 import type { ComponentRenderProxy, VNode, VNodeChild, ComponentPublicInstance, FunctionalComponent, PropType as VuePropType } from 'vue';
-import { RouteItem } from '/@/api/sys/model/menuModel';
 
 declare global {
-  const __STATIC_ROUTES__: RouteItem[];
+  const __STATIC_ROUTES__: AppRouteRecordRaw[];
 
   const __APP_INFO__: {
     pkg: {