3
0
Эх сурвалжийг харах

[Feat 0000]预警分析模块下查询表单问题修改

bobo04052021@163.com 3 сар өмнө
parent
commit
dd5fa5c5d6
18 өөрчлөгдсөн 1018 нэмэгдсэн , 1010 устгасан
  1. 4 1
      src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts
  2. 3 3
      src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts
  3. 0 5
      src/views/analysis/warningAnalysis/airLeakStatus/index.vue
  4. 12 4
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts
  5. 3 3
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts
  6. 241 246
      src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue
  7. 10 4
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts
  8. 2 2
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts
  9. 230 235
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue
  10. 240 245
      src/views/analysis/warningAnalysis/overlimitAlarm/index.vue
  11. 14 5
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts
  12. 2 2
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts
  13. 231 236
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue
  14. 10 4
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts
  15. 3 3
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts
  16. 0 5
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue
  17. 11 5
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts
  18. 2 2
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts

+ 4 - 1
src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts

@@ -54,7 +54,10 @@ export const getProvinceAlarm = (params) =>
   defHttp.post(
     {
       url: Api.getProvinceAlarm,
-      params,
+      params: {
+        alarmType: 'leakageAlarm',
+        ...params,
+      },
     },
     {
       joinParamsToUrl: true,

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

@@ -45,7 +45,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {
@@ -65,7 +65,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '风险分析',
-    dataIndex: 'explosionHazard',
+    dataIndex: 'alarmName',
     width: 100,
   },
   {
@@ -109,7 +109,7 @@ export const historyColumns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {

+ 0 - 5
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -175,12 +175,7 @@ const [registerHistoryTable] = useTable({
         label: '采空区查询',
         field: 'goafId',
         component: 'Select',
-        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
         componentProps: {
-          showSearch: true,
-          filterOption: (input: string, option: any) => {
-            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-          },
           options: goafOptions,
           onChange: async (e, option) => {
             goafId.value = e;

+ 12 - 4
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts

@@ -25,10 +25,18 @@ export const getMineData = (params) =>
   });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params: {
+        alarmType: 'fireAlarm',
+        ...params,
+      },
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(

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

@@ -53,7 +53,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {
@@ -83,12 +83,12 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '风险分析',
-    dataIndex: 'riskAnalysis',
+    dataIndex: 'alarmName',
     width: 100,
   },
   {
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
     width: 100,
   },
   {

+ 241 - 246
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -55,269 +55,264 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  // 引入模拟数据
-  import { boardData, columns, searchFormSchema, historicalMinesData } from './autoFireAnalysis.data';
-  import { SvgIcon } from '/@/components/Icon';
-  import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
-  const visibleModal = ref(false);
-  //煤矿列表数据
-  const deviceOptions = ref([]);
-  const goafOptions = ref([]);
-  const mineCode = 100003;
-  const goafId = ref('');
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '',
-    },
-    {
-      label: '低风险',
-      value: '',
-    },
-    {
-      label: '一般风险',
-      value: '',
-    },
-    {
-      label: '较高风险',
-      value: '',
-    },
-    {
-      label: '高风险',
-      value: '',
-    },
-  ]);
-  const minesData = ref([]);
-  // 注册实时数据表格
-  const [registerTable] = useTable({
-    dataSource: minesData,
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+// 引入模拟数据
+import { boardData, columns, searchFormSchema, historicalMinesData } from './autoFireAnalysis.data';
+import { SvgIcon } from '/@/components/Icon';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
+// 激活的Tab页签
+const activeTab = ref('realtime');
+const visibleModal = ref(false);
+//煤矿列表数据
+const deviceOptions = ref([]);
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
+const minesData = ref([]);
+// 注册实时数据表格
+const [registerTable] = useTable({
+  dataSource: minesData,
+  columns,
+  api: getProvinceAlarm,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        colProps: { span: 6 },
+        rules: [],
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 注册历史数据表格
-  const [registerHistoryTable] = useTable({
-    dataSource: historicalMinesData,
-    columns,
-    api: getProvinceAlarmHistory,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '开始时间',
-          field: 'startTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择开始时间',
-          },
-          colProps: { span: 6 }, // 占比可根据布局调整
-          rules: [{ required: true, message: '请选择开始时间' }],
+// 注册历史数据表格
+const [registerHistoryTable] = useTable({
+  dataSource: historicalMinesData,
+  columns,
+  api: getProvinceAlarmHistory,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
         },
-        {
-          label: '结束时间',
-          field: 'endTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择结束时间',
-          },
-          colProps: { span: 6 },
-          rules: [{ required: true, message: '请选择结束时间' }],
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
         },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            onChange: async (e, option) => {
-              mineCode.value = e;
-              await getGoafDataList(e);
-            },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
           },
-          colProps: { span: 6 },
-          rules: [],
         },
-        {
-          label: '采空区查询',
-          field: 'goafId',
-          component: 'Select',
-          defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: goafOptions,
-            onChange: async (e, option) => {
-              goafId.value = e;
-            },
-          },
-          colProps: {
-            span: 6,
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        componentProps: {
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
           },
         },
-        {
-          field: 'alarmFiled',
-          label: '预警字段',
-          component: 'Select',
-          componentProps: {
-            options: [
-              { label: '甲烷', value: 'ch4Val' },
-              { label: '氧气', value: 'o2Val' },
-              { label: '一氧化碳', value: 'coVal' },
-              { label: '二氧化碳', value: 'co2Val' },
-              { label: '乙烯', value: 'c2h4Val' },
-              { label: '乙炔', value: 'c2h2Val' },
-              { label: '压差', value: 'sourcePressure' },
-              { label: '温度', value: 'temperature' },
-            ],
-          },
-          colProps: { span: 6 },
+        colProps: {
+          span: 6,
         },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 弹窗引用
-  const realtimeModalRef = ref(null);
-  const historyModalRef = ref(null);
+// 弹窗引用
+const realtimeModalRef = ref(null);
+const historyModalRef = ref(null);
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record, type) => {
-    if (type === 'realtime') {
-      // 可向实时弹窗传递当前记录数据
-      realtimeModalRef.value?.showModal(record);
-    } else if (type === 'detail') {
-      visibleModal.value = true;
-    } else {
-      // 可向历史弹窗传递当前记录数据
-      historyModalRef.value?.showModal(record);
-    }
-  };
-  const handleOkEdit = () => {
-    visibleModal.value = false;
-  };
-  const handleCancelEdit = () => {
-    visibleModal.value = false;
-  };
-  async function fetchAlarmData(id) {
-    const params = {
-      // 填写所需参数
-      alarmType: 'fireAlarm',
-      mineId: id,
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const result = await getProvinceAlarm(params);
-    minesData.value = result.records;
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record, type) => {
+  if (type === 'realtime') {
+    // 可向实时弹窗传递当前记录数据
+    realtimeModalRef.value?.showModal(record);
+  } else if (type === 'detail') {
+    visibleModal.value = true;
+  } else {
+    // 可向历史弹窗传递当前记录数据
+    historyModalRef.value?.showModal(record);
   }
-  const getMineDataList = async () => {
-    const params = {
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const response = await getMineData(params);
-    deviceOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['mineName'],
-        value: item['mineCode'],
-      };
-    });
+};
+const handleOkEdit = () => {
+  visibleModal.value = false;
+};
+const handleCancelEdit = () => {
+  visibleModal.value = false;
+};
+async function fetchAlarmData(id) {
+  const params = {
+    // 填写所需参数
+    alarmType: 'fireAlarm',
+    mineId: id,
+    pageNo: 1,
+    pageSize: 50,
   };
-  const getGoafDataList = async (mineId) => {
-    const params = {
-      mineCode: mineId,
+  const result = await getProvinceAlarm(params);
+  minesData.value = result.records;
+}
+const getMineDataList = async () => {
+  const params = {
+    pageNo: 1,
+    pageSize: 50,
+  };
+  const response = await getMineData(params);
+  deviceOptions.value = response.records.map((item, index) => {
+    return {
+      label: item['mineName'],
+      value: item['mineCode'],
     };
-    const response = await getGoafData(params);
-    goafOptions.value = response.map((item, index) => {
-      return {
-        label: item['devicePos'],
-        value: item['deviceCode'],
-      };
-    });
+  });
+};
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
   };
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'fireAlarm',
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
     };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getMineDataList();
-    getAlarmTotalData();
   });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'fireAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getMineDataList();
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  .board-info {
-    display: grid;
-    grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
-    gap: auto;
-    justify-content: start;
-    flex-wrap: wrap;
-    box-sizing: border-box;
-    background-color: @white;
-    padding: 10px;
-    gap: 100px;
-    // margin: 0 10px;
-    margin-bottom: 5px;
-  }
-  .board-item {
-    box-sizing: border-box;
-  }
+.board-info {
+  display: grid;
+  grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
+  gap: auto;
+  justify-content: start;
+  flex-wrap: wrap;
+  box-sizing: border-box;
+  background-color: @white;
+  padding: 10px;
+  gap: 100px;
+  // margin: 0 10px;
+  margin-bottom: 5px;
+}
+.board-item {
+  box-sizing: border-box;
+}
 </style>

+ 10 - 4
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts

@@ -25,10 +25,16 @@ export const getMineData = (params) =>
   });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params: {
+        alarmType: 'unsealAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(

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

@@ -93,12 +93,12 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '风险分析',
-    dataIndex: 'riskAnalysis',
+    dataIndex: 'alarmName',
     width: 100,
   },
   {
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
     width: 100,
   },
   {

+ 230 - 235
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -54,258 +54,253 @@
 </template>
 
 <script setup lang="ts">
-  import { onMounted, ref } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { boardData, columns, searchFormSchema, historicalMinesData } from './fireAreaJudgeAnalysis.data';
-  import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
-  const visibleModal = ref(false);
-  //煤矿列表数据
-  const deviceOptions = ref([]);
-  const goafOptions = ref([]);
-  const mineCode = ref('');
-  const goafId = ref('');
-  const boardData = ref([
-    {
-      label: '采空区数量',
-      value: '',
-    },
-    {
-      label: '可以启封',
-      value: '',
-    },
-    {
-      label: '不可启封',
-      value: '',
-    },
-  ]);
-  const minesData = ref([]);
-  // 注册实时数据表格
-  const [registerTable] = useTable({
-    dataSource: minesData,
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 120,
-      title: '详情',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+import { onMounted, ref } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { boardData, columns, searchFormSchema, historicalMinesData } from './fireAreaJudgeAnalysis.data';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
+// 激活的Tab页签
+const activeTab = ref('realtime');
+const visibleModal = ref(false);
+//煤矿列表数据
+const deviceOptions = ref([]);
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '采空区数量',
+    value: '',
+  },
+  {
+    label: '可以启封',
+    value: '',
+  },
+  {
+    label: '不可启封',
+    value: '',
+  },
+]);
+const minesData = ref([]);
+// 注册实时数据表格
+const [registerTable] = useTable({
+  dataSource: minesData,
+  columns,
+  api: getProvinceAlarm,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        colProps: { span: 6 },
+        rules: [],
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 120,
+    title: '详情',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 注册历史数据表格
-  const [registerHistoryTable] = useTable({
-    dataSource: historicalMinesData,
-    columns,
-    api: getProvinceAlarmHistory,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '开始时间',
-          field: 'startTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择开始时间',
-          },
-          colProps: { span: 6 }, // 占比可根据布局调整
-          rules: [{ required: true, message: '请选择开始时间' }],
+// 注册历史数据表格
+const [registerHistoryTable] = useTable({
+  dataSource: historicalMinesData,
+  columns,
+  api: getProvinceAlarmHistory,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
         },
-        {
-          label: '结束时间',
-          field: 'endTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择结束时间',
-          },
-          colProps: { span: 6 },
-          rules: [{ required: true, message: '请选择结束时间' }],
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
         },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            onChange: async (e, option) => {
-              mineCode.value = e;
-              await getGoafDataList(e);
-            },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
           },
-          colProps: { span: 6 },
-          rules: [],
         },
-        {
-          label: '采空区查询',
-          field: 'goafId',
-          component: 'Select',
-          defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: goafOptions,
-            onChange: async (e, option) => {
-              goafId.value = e;
-            },
-          },
-          colProps: {
-            span: 6,
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        componentProps: {
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
           },
         },
-        {
-          field: 'alarmFiled',
-          label: '预警字段',
-          component: 'Select',
-          componentProps: {
-            options: [
-              { label: '甲烷', value: 'ch4Val' },
-              { label: '氧气', value: 'o2Val' },
-              { label: '一氧化碳', value: 'coVal' },
-              { label: '二氧化碳', value: 'co2Val' },
-              { label: '乙烯', value: 'c2h4Val' },
-              { label: '乙炔', value: 'c2h2Val' },
-              { label: '压差', value: 'sourcePressure' },
-              { label: '温度', value: 'temperature' },
-            ],
-          },
-          colProps: { span: 6 },
+        colProps: {
+          span: 6,
         },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 弹窗引用
-  const realtimeModalRef = ref(null);
-  const historyModalRef = ref(null);
+// 弹窗引用
+const realtimeModalRef = ref(null);
+const historyModalRef = ref(null);
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record, type) => {
-    if (type === 'realtime') {
-      // 可向实时弹窗传递当前记录数据
-      realtimeModalRef.value?.showModal(record);
-    } else if (type === 'detail') {
-      visibleModal.value = true;
-    } else {
-      // 可向历史弹窗传递当前记录数据
-      historyModalRef.value?.showModal(record);
-    }
-  };
-  const handleOkEdit = () => {
-    visibleModal.value = false;
-  };
-  const handleCancelEdit = () => {
-    visibleModal.value = false;
-  };
-  async function fetchAlarmData(id) {
-    const params = {
-      alarmType: 'unsealAlarm',
-      mineId: id,
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const result = await getProvinceAlarm(params);
-    minesData.value = result.records;
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record, type) => {
+  if (type === 'realtime') {
+    // 可向实时弹窗传递当前记录数据
+    realtimeModalRef.value?.showModal(record);
+  } else if (type === 'detail') {
+    visibleModal.value = true;
+  } else {
+    // 可向历史弹窗传递当前记录数据
+    historyModalRef.value?.showModal(record);
   }
-  const getMineDataList = async () => {
-    const params = {
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const response = await getMineData(params);
-    deviceOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['mineName'],
-        value: item['mineCode'],
-      };
-    });
+};
+const handleOkEdit = () => {
+  visibleModal.value = false;
+};
+const handleCancelEdit = () => {
+  visibleModal.value = false;
+};
+async function fetchAlarmData(id) {
+  const params = {
+    alarmType: 'unsealAlarm',
+    mineId: id,
+    pageNo: 1,
+    pageSize: 50,
   };
-  const getGoafDataList = async (mineId) => {
-    const params = {
-      mineCode: mineId,
+  const result = await getProvinceAlarm(params);
+  minesData.value = result.records;
+}
+const getMineDataList = async () => {
+  const params = {
+    pageNo: 1,
+    pageSize: 50,
+  };
+  const response = await getMineData(params);
+  deviceOptions.value = response.records.map((item, index) => {
+    return {
+      label: item['mineName'],
+      value: item['mineCode'],
     };
-    const response = await getGoafData(params);
-    goafOptions.value = response.map((item, index) => {
-      return {
-        label: item['devicePos'],
-        value: item['deviceCode'],
-      };
-    });
+  });
+};
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
   };
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'unsealAlarm',
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
     };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel5;
-    boardData.value[2].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
-  }
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getMineDataList();
-    getAlarmTotalData();
   });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'unsealAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel5;
+  boardData.value[2].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
+}
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getMineDataList();
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  .board-info {
-    display: grid;
-    grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
-    gap: auto;
-    justify-content: start;
-    flex-wrap: wrap;
-    box-sizing: border-box;
-    background-color: @white;
-    padding: 10px;
-    gap: 100px;
-    // margin: 0 10px;
-    margin-bottom: 5px;
-  }
-  .board-item {
-    box-sizing: border-box;
-  }
+.board-info {
+  display: grid;
+  grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
+  gap: auto;
+  justify-content: start;
+  flex-wrap: wrap;
+  box-sizing: border-box;
+  background-color: @white;
+  padding: 10px;
+  gap: 100px;
+  // margin: 0 10px;
+  margin-bottom: 5px;
+}
+.board-item {
+  box-sizing: border-box;
+}
 </style>

+ 240 - 245
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -54,269 +54,264 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { boardData, columns, searchFormSchema, minesData, historicalMinesData } from './overlimitAlarm.data';
-  import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { boardData, columns, searchFormSchema, minesData, historicalMinesData } from './overlimitAlarm.data';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
-  const visibleModal = ref(false);
-  //煤矿列表数据
-  const deviceOptions = ref([]);
-  const goafOptions = ref([]);
-  const mineCode = ref('');
-  const goafId = ref('');
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '',
-    },
-    {
-      label: '低风险',
-      value: '',
-    },
-    {
-      label: '一般风险',
-      value: '',
-    },
-    {
-      label: '较高风险',
-      value: '',
-    },
-    {
-      label: '高风险',
-      value: '',
-    },
-  ]);
-  const minesData = ref([]);
-  // 注册实时数据表格
-  const [registerTable] = useTable({
-    dataSource: minesData,
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 120,
-      title: '详情',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+// 激活的Tab页签
+const activeTab = ref('realtime');
+const visibleModal = ref(false);
+//煤矿列表数据
+const deviceOptions = ref([]);
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
+const minesData = ref([]);
+// 注册实时数据表格
+const [registerTable] = useTable({
+  dataSource: minesData,
+  columns,
+  api: getProvinceAlarm,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        colProps: { span: 6 },
+        rules: [],
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 120,
+    title: '详情',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 注册历史数据表格
-  const [registerHistoryTable] = useTable({
-    dataSource: historicalMinesData,
-    columns,
-    api: getProvinceAlarmHistory,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '开始时间',
-          field: 'startTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择开始时间',
-          },
-          colProps: { span: 6 }, // 占比可根据布局调整
-          rules: [{ required: true, message: '请选择开始时间' }],
+// 注册历史数据表格
+const [registerHistoryTable] = useTable({
+  dataSource: historicalMinesData,
+  columns,
+  api: getProvinceAlarmHistory,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
         },
-        {
-          label: '结束时间',
-          field: 'endTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择结束时间',
-          },
-          colProps: { span: 6 },
-          rules: [{ required: true, message: '请选择结束时间' }],
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
         },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            onChange: async (e, option) => {
-              mineCode.value = e;
-              await getGoafDataList(e);
-            },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
           },
-          colProps: { span: 6 },
-          rules: [],
         },
-        {
-          label: '采空区查询',
-          field: 'goafId',
-          component: 'Select',
-          defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: goafOptions,
-            onChange: async (e, option) => {
-              goafId.value = e;
-            },
-          },
-          colProps: {
-            span: 6,
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        componentProps: {
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
           },
         },
-        {
-          field: 'alarmFiled',
-          label: '预警字段',
-          component: 'Select',
-          componentProps: {
-            options: [
-              { label: '甲烷', value: 'ch4Val' },
-              { label: '氧气', value: 'o2Val' },
-              { label: '一氧化碳', value: 'coVal' },
-              { label: '二氧化碳', value: 'co2Val' },
-              { label: '乙烯', value: 'c2h4Val' },
-              { label: '乙炔', value: 'c2h2Val' },
-              { label: '压差', value: 'sourcePressure' },
-              { label: '温度', value: 'temperature' },
-            ],
-          },
-          colProps: { span: 6 },
+        colProps: {
+          span: 6,
         },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 60,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 60,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 弹窗引用
-  const realtimeModalRef = ref(null);
-  const historyModalRef = ref(null);
+// 弹窗引用
+const realtimeModalRef = ref(null);
+const historyModalRef = ref(null);
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record, type) => {
-    if (type === 'realtime') {
-      // 可向实时弹窗传递当前记录数据
-      realtimeModalRef.value?.showModal(record);
-    } else if (type === 'detail') {
-      visibleModal.value = true;
-    } else {
-      // 可向历史弹窗传递当前记录数据
-      historyModalRef.value?.showModal(record);
-    }
-  };
-  const handleOkEdit = () => {
-    visibleModal.value = false;
-  };
-  const handleCancelEdit = () => {
-    visibleModal.value = false;
-  };
-  async function fetchAlarmData(id) {
-    const params = {
-      alarmType: 'unsealAlarm',
-      mineId: id,
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const result = await getProvinceAlarm(params);
-    minesData.value = result.records;
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record, type) => {
+  if (type === 'realtime') {
+    // 可向实时弹窗传递当前记录数据
+    realtimeModalRef.value?.showModal(record);
+  } else if (type === 'detail') {
+    visibleModal.value = true;
+  } else {
+    // 可向历史弹窗传递当前记录数据
+    historyModalRef.value?.showModal(record);
   }
-  const getMineDataList = async () => {
-    const params = {
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const response = await getMineData(params);
-    deviceOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['mineName'],
-        value: item['mineCode'],
-      };
-    });
+};
+const handleOkEdit = () => {
+  visibleModal.value = false;
+};
+const handleCancelEdit = () => {
+  visibleModal.value = false;
+};
+async function fetchAlarmData(id) {
+  const params = {
+    alarmType: 'unsealAlarm',
+    mineId: id,
+    pageNo: 1,
+    pageSize: 50,
   };
-  const getGoafDataList = async (mineId) => {
-    const params = {
-      mineCode: mineId,
+  const result = await getProvinceAlarm(params);
+  minesData.value = result.records;
+}
+const getMineDataList = async () => {
+  const params = {
+    pageNo: 1,
+    pageSize: 50,
+  };
+  const response = await getMineData(params);
+  deviceOptions.value = response.records.map((item, index) => {
+    return {
+      label: item['mineName'],
+      value: item['mineCode'],
     };
-    const response = await getGoafData(params);
-    goafOptions.value = response.map((item, index) => {
-      return {
-        label: item['devicePos'],
-        value: item['deviceCode'],
-      };
-    });
+  });
+};
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
   };
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'overLimitAlarm',
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
     };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getMineDataList();
-    getAlarmTotalData();
   });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'overLimitAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getMineDataList();
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  .board-info {
-    display: grid;
-    grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
-    gap: auto;
-    justify-content: start;
-    flex-wrap: wrap;
-    box-sizing: border-box;
-    background-color: @white;
-    padding: 10px;
-    gap: 100px;
-    // margin: 0 10px;
-    margin-bottom: 5px;
-  }
-  .board-item {
-    box-sizing: border-box;
-  }
+.board-info {
+  display: grid;
+  grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
+  gap: auto;
+  justify-content: start;
+  flex-wrap: wrap;
+  box-sizing: border-box;
+  background-color: @white;
+  padding: 10px;
+  gap: 100px;
+  // margin: 0 10px;
+  margin-bottom: 5px;
+}
+.board-item {
+  box-sizing: border-box;
+}
 </style>

+ 14 - 5
src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts

@@ -25,10 +25,16 @@ export const getMineData = (params) =>
   });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params: {
+        alarmType: 'overLimitAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(
@@ -45,7 +51,10 @@ export const getProvinceAlarmHistory = (params) =>
   defHttp.post(
     {
       url: Api.getProvinceAlarmHistory,
-      params,
+      params: {
+        alarmType: 'overLimitAlarm',
+        ...params,
+      },
     },
     { joinParamsToUrl: true }
   ); //获取执法处以及区域数据

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

@@ -53,7 +53,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {
@@ -88,7 +88,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
     width: 100,
   },
   {

+ 231 - 236
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -70,258 +70,253 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns, searchFormSchema, historicalMinesData } from './pressureDiffAnalysis.data';
-  import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns, searchFormSchema, historicalMinesData } from './pressureDiffAnalysis.data';
+import { getMineData, getProvinceAlarm, getGoafData, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
-  const visibleModal = ref(false);
-  const visibleresolveModal = ref(false);
-  const resolveValue = ref('');
-  //煤矿列表数据
-  const deviceOptions = ref([]);
-  const goafOptions = ref([]);
-  const mineCode = ref('');
-  const goafId = ref('');
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '',
-    },
-    {
-      label: '低风险',
-      value: '',
-    },
-    {
-      label: '一般风险',
-      value: '',
-    },
-    {
-      label: '较高风险',
-      value: '',
-    },
-    {
-      label: '高风险',
-      value: '',
-    },
-  ]);
-  const minesData = ref([]);
-  // 注册实时数据表格
-  const [registerTable] = useTable({
-    dataSource: minesData,
-    columns,
-    api: getProvinceAlarm,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          colProps: { span: 6 },
-          rules: [],
-        },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 120,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+// 激活的Tab页签
+const activeTab = ref('realtime');
+const visibleModal = ref(false);
+const visibleresolveModal = ref(false);
+const resolveValue = ref('');
+//煤矿列表数据
+const deviceOptions = ref([]);
+const goafOptions = ref([]);
+const mineCode = ref('');
+const goafId = ref('');
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '',
+  },
+  {
+    label: '低风险',
+    value: '',
+  },
+  {
+    label: '一般风险',
+    value: '',
+  },
+  {
+    label: '较高风险',
+    value: '',
+  },
+  {
+    label: '高风险',
+    value: '',
+  },
+]);
+const minesData = ref([]);
+// 注册实时数据表格
+const [registerTable] = useTable({
+  dataSource: minesData,
+  columns,
+  api: getProvinceAlarm,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        colProps: { span: 6 },
+        rules: [],
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 120,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 注册历史数据表格
-  const [registerHistoryTable] = useTable({
-    dataSource: historicalMinesData,
-    columns,
-    api: getProvinceAlarmHistory,
-    formConfig: {
-      labelWidth: 120,
-      schemas: [
-        {
-          label: '开始时间',
-          field: 'startTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择开始时间',
-          },
-          colProps: { span: 6 }, // 占比可根据布局调整
-          rules: [{ required: true, message: '请选择开始时间' }],
+// 注册历史数据表格
+const [registerHistoryTable] = useTable({
+  dataSource: historicalMinesData,
+  columns,
+  api: getProvinceAlarmHistory,
+  formConfig: {
+    labelWidth: 120,
+    schemas: [
+      {
+        label: '开始时间',
+        field: 'startTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择开始时间',
         },
-        {
-          label: '结束时间',
-          field: 'endTime',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            // valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            placeholder: '请选择结束时间',
-          },
-          colProps: { span: 6 },
-          rules: [{ required: true, message: '请选择结束时间' }],
+        colProps: { span: 6 }, // 占比可根据布局调整
+        rules: [{ required: true, message: '请选择开始时间' }],
+      },
+      {
+        label: '结束时间',
+        field: 'endTime',
+        component: 'DatePicker',
+        componentProps: {
+          showTime: true,
+          // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          placeholder: '请选择结束时间',
         },
-        {
-          label: '煤矿名称',
-          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-          component: 'MineCascader', // 自定义组件名
-          componentProps: {
-            onChange: async (e, option) => {
-              mineCode.value = e;
-              await getGoafDataList(e);
-            },
+        colProps: { span: 6 },
+        rules: [{ required: true, message: '请选择结束时间' }],
+      },
+      {
+        label: '煤矿名称',
+        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        component: 'MineCascader', // 自定义组件名
+        componentProps: {
+          onChange: async (e, option) => {
+            mineCode.value = e;
+            await getGoafDataList(e);
           },
-          colProps: { span: 6 },
-          rules: [],
         },
-        {
-          label: '采空区查询',
-          field: 'goafId',
-          component: 'Select',
-          defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
-          componentProps: {
-            showSearch: true,
-            filterOption: (input: string, option: any) => {
-              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-            },
-            options: goafOptions,
-            onChange: async (e, option) => {
-              goafId.value = e;
-            },
-          },
-          colProps: {
-            span: 6,
+        colProps: { span: 6 },
+        rules: [],
+      },
+      {
+        label: '采空区查询',
+        field: 'goafId',
+        component: 'Select',
+        componentProps: {
+          options: goafOptions,
+          onChange: async (e, option) => {
+            goafId.value = e;
           },
         },
-        {
-          field: 'alarmFiled',
-          label: '预警字段',
-          component: 'Select',
-          componentProps: {
-            options: [
-              { label: '甲烷', value: 'ch4Val' },
-              { label: '氧气', value: 'o2Val' },
-              { label: '一氧化碳', value: 'coVal' },
-              { label: '二氧化碳', value: 'co2Val' },
-              { label: '乙烯', value: 'c2h4Val' },
-              { label: '乙炔', value: 'c2h2Val' },
-              { label: '压差', value: 'sourcePressure' },
-              { label: '温度', value: 'temperature' },
-            ],
-          },
-          colProps: { span: 6 },
+        colProps: {
+          span: 6,
         },
-      ],
-      showAdvancedButton: false,
-      schemaGroupNames: ['常规查询'],
-    },
-    pagination: true,
-    striped: true,
-    useSearchForm: true,
-    bordered: true,
-    showIndexColumn: false,
-    actionColumn: {
-      width: 120,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: undefined,
-    },
-  });
+      },
+      {
+        field: 'alarmFiled',
+        label: '预警字段',
+        component: 'Select',
+        componentProps: {
+          options: [
+            { label: '甲烷', value: 'ch4Val' },
+            { label: '氧气', value: 'o2Val' },
+            { label: '一氧化碳', value: 'coVal' },
+            { label: '二氧化碳', value: 'co2Val' },
+            { label: '乙烯', value: 'c2h4Val' },
+            { label: '乙炔', value: 'c2h2Val' },
+            { label: '压差', value: 'sourcePressure' },
+            { label: '温度', value: 'temperature' },
+          ],
+        },
+        colProps: { span: 6 },
+      },
+    ],
+    showAdvancedButton: false,
+    schemaGroupNames: ['常规查询'],
+  },
+  pagination: true,
+  striped: true,
+  useSearchForm: true,
+  bordered: true,
+  showIndexColumn: false,
+  actionColumn: {
+    width: 120,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
+});
 
-  // 弹窗引用
-  const realtimeModalRef = ref(null);
-  const historyModalRef = ref(null);
+// 弹窗引用
+const realtimeModalRef = ref(null);
+const historyModalRef = ref(null);
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record, type) => {
-    if (type === 'realtime') {
-      // 可向实时弹窗传递当前记录数据
-      realtimeModalRef.value?.showModal(record);
-    } else if (type === 'resolved') {
-      visibleresolveModal.value = true;
-      record.isResolved = resolveValue.value || '';
-    } else if (type === 'detail') {
-      visibleModal.value = true;
-    } else {
-      // 可向历史弹窗传递当前记录数据
-      historyModalRef.value?.showModal(record);
-    }
-  };
-  const handleOkEdit = () => {
-    visibleresolveModal.value = false;
-  };
-  const handleCancelEdit = () => {
-    visibleresolveModal.value = false;
-  };
-  // async function fetchAlarmData(id) {
-  //   const params = {
-  //     // 填写所需参数
-  //     alarmType: 'sourcePressureAlarm',
-  //     mineId: id,
-  //     pageNo: 1,
-  //     pageSize: 50,
-  //   };
-  //   const result = await getProvinceAlarm(params);
-  //   minesData.value = result.records;
-  // }
-  const getMineDataList = async () => {
-    const params = {
-      pageNo: 1,
-      pageSize: 50,
-    };
-    const response = await getMineData(params);
-    deviceOptions.value = response.records.map((item, index) => {
-      return {
-        label: item['mineName'],
-        value: item['mineCode'],
-      };
-    });
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record, type) => {
+  if (type === 'realtime') {
+    // 可向实时弹窗传递当前记录数据
+    realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    record.isResolved = resolveValue.value || '';
+  } else if (type === 'detail') {
+    visibleModal.value = true;
+  } else {
+    // 可向历史弹窗传递当前记录数据
+    historyModalRef.value?.showModal(record);
+  }
+};
+const handleOkEdit = () => {
+  visibleresolveModal.value = false;
+};
+const handleCancelEdit = () => {
+  visibleresolveModal.value = false;
+};
+// async function fetchAlarmData(id) {
+//   const params = {
+//     // 填写所需参数
+//     alarmType: 'sourcePressureAlarm',
+//     mineId: id,
+//     pageNo: 1,
+//     pageSize: 50,
+//   };
+//   const result = await getProvinceAlarm(params);
+//   minesData.value = result.records;
+// }
+const getMineDataList = async () => {
+  const params = {
+    pageNo: 1,
+    pageSize: 50,
   };
-  const getGoafDataList = async (mineId) => {
-    const params = {
-      mineCode: mineId,
+  const response = await getMineData(params);
+  deviceOptions.value = response.records.map((item, index) => {
+    return {
+      label: item['mineName'],
+      value: item['mineCode'],
     };
-    const response = await getGoafData(params);
-    goafOptions.value = response.map((item, index) => {
-      return {
-        label: item['devicePos'],
-        value: item['deviceCode'],
-      };
-    });
+  });
+};
+const getGoafDataList = async (mineId) => {
+  const params = {
+    mineCode: mineId,
   };
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'sourcePressureAlarm',
+  const response = await getGoafData(params);
+  goafOptions.value = response.map((item, index) => {
+    return {
+      label: item['devicePos'],
+      value: item['deviceCode'],
     };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getMineDataList();
-    getAlarmTotalData();
   });
+};
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'sourcePressureAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getMineDataList();
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>

+ 10 - 4
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts

@@ -25,10 +25,16 @@ export const getMineData = (params) =>
   });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params: {
+        alarmType: 'sourcePressureAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(

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

@@ -53,7 +53,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {
@@ -73,12 +73,12 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '风险分析',
-    dataIndex: 'explosionHazard',
+    dataIndex: 'alarmName',
     width: 100,
   },
   {
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
     width: 100,
   },
   {

+ 0 - 5
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue

@@ -177,12 +177,7 @@ const [registerHistoryTable] = useTable({
         label: '采空区查询',
         field: 'goafId',
         component: 'Select',
-        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
         componentProps: {
-          showSearch: true,
-          filterOption: (input: string, option: any) => {
-            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-          },
           options: goafOptions,
           onChange: async (e, option) => {
             goafId.value = e;

+ 11 - 5
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts

@@ -25,10 +25,16 @@ export const getMineData = (params) =>
   });
 //查询预警数据
 export const getProvinceAlarm = (params) =>
-  defHttp.post({
-    url: Api.getProvinceAlarm,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getProvinceAlarm,
+      params: {
+        alarmType: 'explosionAlarm',
+        ...params,
+      },
+    },
+    { joinParamsToUrl: true }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(
@@ -46,7 +52,7 @@ export const getProvinceAlarmHistory = (params) =>
     {
       url: Api.getProvinceAlarmHistory,
       params: {
-        alarmType: 'overLimitAlarm',
+        alarmType: 'explosionAlarm',
         ...params,
       },
     },

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

@@ -53,7 +53,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'riskLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {
@@ -93,7 +93,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
     width: 100,
   },
   {