Răsfoiți Sursa

[Feat 0000]预警分析模块下实时监测、历史数据表单调整

bobo04052021@163.com 3 luni în urmă
părinte
comite
7620c72d02
18 a modificat fișierele cu 1126 adăugiri și 288 ștergeri
  1. 42 14
      src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts
  2. 2 2
      src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts
  3. 256 235
      src/views/analysis/warningAnalysis/airLeakStatus/index.vue
  4. 35 0
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts
  5. 2 2
      src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts
  6. 128 3
      src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue
  7. 35 0
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts
  8. 2 2
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts
  9. 118 3
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue
  10. 128 3
      src/views/analysis/warningAnalysis/overlimitAlarm/index.vue
  11. 32 0
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts
  12. 2 2
      src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts
  13. 140 15
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue
  14. 36 0
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts
  15. 2 2
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts
  16. 128 3
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue
  17. 36 0
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts
  18. 2 2
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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