Jelajahi Sumber

[Feat 0000]密闭漏风历史数据

bobo04052021@163.com 4 bulan lalu
induk
melakukan
43b5724c84

+ 28 - 0
pnpm-lock.yaml

@@ -86,6 +86,9 @@ importers:
       leaflet:
       leaflet:
         specifier: ^1.9.4
         specifier: ^1.9.4
         version: 1.9.4
         version: 1.9.4
+      lodash:
+        specifier: ^4.17.21
+        version: 4.17.21
       lodash-es:
       lodash-es:
         specifier: ^4.17.21
         specifier: ^4.17.21
         version: 4.17.22
         version: 4.17.22
@@ -110,6 +113,9 @@ importers:
       print-js:
       print-js:
         specifier: ^1.6.0
         specifier: ^1.6.0
         version: 1.6.0
         version: 1.6.0
+      qiankun:
+        specifier: ^2.10.16
+        version: 2.10.16
       qrcode:
       qrcode:
         specifier: ^1.5.4
         specifier: ^1.5.4
         version: 1.5.4
         version: 1.5.4
@@ -4273,6 +4279,9 @@ packages:
     resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
     resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
     engines: {node: '>=6'}
     engines: {node: '>=6'}
 
 
+  import-html-entry@1.17.0:
+    resolution: {integrity: sha512-2SDsRlGlE8bqdnGqsOyiDPEWlzJR0jNW4LWopnZl5QE1Yd0nJ7fykWo2GaKUF7Jq7pR0g3dElhuJHyamTt1gPQ==}
+
   import-local@3.2.0:
   import-local@3.2.0:
     resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==}
     resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==}
     engines: {node: '>=8'}
     engines: {node: '>=8'}
@@ -5723,6 +5732,9 @@ packages:
   pure-rand@6.1.0:
   pure-rand@6.1.0:
     resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==}
     resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==}
 
 
+  qiankun@2.10.16:
+    resolution: {integrity: sha512-Q3tSVUrPnzx8ckEOKIoPnhb5LE28FPKyan/r6jEuGJGqTbIy+3rp6E2/KfU82ZI4yZpef9LFTrnxdj49jAEsmw==}
+
   qified@0.5.3:
   qified@0.5.3:
     resolution: {integrity: sha512-kXuQdQTB6oN3KhI6V4acnBSZx8D2I4xzZvn9+wFLLFCoBNQY/sFnCW6c43OL7pOQ2HvGV4lnWIXNmgfp7cTWhQ==}
     resolution: {integrity: sha512-kXuQdQTB6oN3KhI6V4acnBSZx8D2I4xzZvn9+wFLLFCoBNQY/sFnCW6c43OL7pOQ2HvGV4lnWIXNmgfp7cTWhQ==}
     engines: {node: '>=20'}
     engines: {node: '>=20'}
@@ -6084,6 +6096,9 @@ packages:
     resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
     resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
     engines: {node: '>=14'}
     engines: {node: '>=14'}
 
 
+  single-spa@5.9.5:
+    resolution: {integrity: sha512-9SQdmsyz4HSP+3gs6PJzhkaMEg+6zTlu9oxIghnwUX3eq+ajq4ft5egl0iyR55LAmO/UwvU8NgIWs/ZyQMa6dw==}
+
   sirv@2.0.4:
   sirv@2.0.4:
     resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
     resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
     engines: {node: '>= 10'}
     engines: {node: '>= 10'}
@@ -11554,6 +11569,10 @@ snapshots:
       parent-module: 1.0.1
       parent-module: 1.0.1
       resolve-from: 4.0.0
       resolve-from: 4.0.0
 
 
+  import-html-entry@1.17.0:
+    dependencies:
+      '@babel/runtime': 7.28.4
+
   import-local@3.2.0:
   import-local@3.2.0:
     dependencies:
     dependencies:
       pkg-dir: 4.2.0
       pkg-dir: 4.2.0
@@ -13150,6 +13169,13 @@ snapshots:
 
 
   pure-rand@6.1.0: {}
   pure-rand@6.1.0: {}
 
 
+  qiankun@2.10.16:
+    dependencies:
+      '@babel/runtime': 7.28.4
+      import-html-entry: 1.17.0
+      lodash: 4.17.21
+      single-spa: 5.9.5
+
   qified@0.5.3:
   qified@0.5.3:
     dependencies:
     dependencies:
       hookified: 1.14.0
       hookified: 1.14.0
@@ -13545,6 +13571,8 @@ snapshots:
 
 
   signal-exit@4.1.0: {}
   signal-exit@4.1.0: {}
 
 
+  single-spa@5.9.5: {}
+
   sirv@2.0.4:
   sirv@2.0.4:
     dependencies:
     dependencies:
       '@polka/url': 1.0.0-next.29
       '@polka/url': 1.0.0-next.29

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

@@ -7,6 +7,7 @@ enum Api {
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
   getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
   getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
+  resolveAlarm = '/province/alarm/solveProvinceAlarm',
 }
 }
 //根据预警类型查询不同等级数量
 //根据预警类型查询不同等级数量
 export const getProvinceAlarmNum = (params) =>
 export const getProvinceAlarmNum = (params) =>
@@ -64,3 +65,9 @@ export const getEnfMineTreeData = () =>
   defHttp.get({
   defHttp.get({
     url: Api.getEnfMineTreeData,
     url: Api.getEnfMineTreeData,
   });
   });
+// 解决预警
+export const resolveAlarm = (params) =>
+  defHttp.post({
+    url: Api.resolveAlarm,
+    params,
+  });

+ 49 - 1
src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts

@@ -60,7 +60,7 @@ export const columns: BasicColumn[] = [
   },
   },
   {
   {
     title: '预警时间',
     title: '预警时间',
-    dataIndex: 'alertTime',
+    dataIndex: 'createTime',
   },
   },
   {
   {
     title: '是否解决',
     title: '是否解决',
@@ -68,6 +68,54 @@ export const columns: BasicColumn[] = [
   },
   },
 ];
 ];
 
 
+// 历史数据相关
+export const historyColumns: BasicColumn[] = [
+  {
+    title: '序号',
+    align: 'center',
+    customRender: ({ index }: { index: number }) => `${index + 1}`,
+  },
+  {
+    title: '区域',
+    dataIndex: 'areaName',
+  },
+  {
+    title: '煤矿名称',
+    dataIndex: 'mineName',
+  },
+  {
+    title: '密闭名称',
+    dataIndex: 'devicePos',
+  },
+  {
+    title: '所属煤层',
+    dataIndex: 'coalSeamName',
+  },
+  {
+    title: '自燃倾向性',
+    dataIndex: 'riskLevel',
+  },
+  {
+    title: '密闭内压力',
+    dataIndex: 'interPressure',
+  },
+  {
+    title: '密闭外压力',
+    dataIndex: 'outerPressure',
+  },
+  {
+    title: '是否漏风',
+    dataIndex: 'leakage',
+  },
+  {
+    title: '预警时间',
+    dataIndex: 'createTime',
+  },
+  {
+    title: '解决时间',
+    dataIndex: 'endTime',
+  },
+];
 export const searchFormSchema: FormSchema[] = [
 export const searchFormSchema: FormSchema[] = [
   {
   {
     field: 'mineName',
     field: 'mineName',

+ 75 - 6
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -12,8 +12,13 @@
         <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }">
         <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }">
           <template #action="{ record }">
           <template #action="{ record }">
             <div class="action-buttons">
             <div class="action-buttons">
-              <button @click="openModal(record, 'realtime')" class="action-btn">
-                <SvgIcon name="details" />
+              <!-- 操作按钮 -->
+              <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
+                <span class="action-text">详情</span>
+              </button>
+              <!-- 已解决按钮 -->
+              <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
+                <span class="action-text">已解决</span>
               </button>
               </button>
             </div>
             </div>
           </template>
           </template>
@@ -33,6 +38,22 @@
         </BasicTable>
         </BasicTable>
       </TabPane>
       </TabPane>
     </Tabs>
     </Tabs>
+    <!-- 弹窗组件 -->
+    <a-modal style="top: 30%; left: 170px" v-model:visible="visibleModal" :width="450" title="实时监测数据">
+      <a-table></a-table>
+    </a-modal>
+    <!-- 弹窗组件 -->
+    <a-modal
+      style="height: 400px"
+      v-model:visible="visibleresolveModal"
+      :width="600"
+      centered
+      title="密闭漏风处理情况"
+      @ok="handleOkEdit"
+      @cancel="handleCancelEdit"
+    >
+      <a-textarea style="width: 90%; margin-left: 20px; margin-right: 20px" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
+    </a-modal>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -42,14 +63,26 @@ import { BasicTable, useTable } from '/@/components/Table';
 import { Tabs, TabPane } from 'ant-design-vue';
 import { Tabs, TabPane } from 'ant-design-vue';
 import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
 import { SvgIcon } from '/@/components/Icon';
 import { SvgIcon } from '/@/components/Icon';
-import { getMineData, getProvinceAlarm, getProvinceAlarmNum, getGoafData, getProvinceAlarmHistory, getEnfMineTreeData } from './airLeak.api';
+import {
+  getMineData,
+  getProvinceAlarm,
+  getProvinceAlarmNum,
+  getGoafData,
+  getProvinceAlarmHistory,
+  getEnfMineTreeData,
+  resolveAlarm,
+} from './airLeak.api';
 import formConfig from '/@/components/Form/src/jeecg/components/formCard/formConfig.vue';
 import formConfig from '/@/components/Form/src/jeecg/components/formCard/formConfig.vue';
 import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
 import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
 // 引入模拟数据
 // 引入模拟数据
-import { columns, searchFormSchema, historicalMinesData } from './airLeakStatus.data';
+import { columns, historyColumns, searchFormSchema, historicalMinesData } from './airLeakStatus.data';
 
 
 // 激活的Tab页签
 // 激活的Tab页签
 const activeTab = ref('realtime');
 const activeTab = ref('realtime');
+const visibleModal = ref(false);
+const visibleresolveModal = ref(false);
+const resolveValue = ref('');
+const resolveId = ref('');
 //煤矿列表数据
 //煤矿列表数据
 const deviceOptions = ref([]);
 const deviceOptions = ref([]);
 const goafOptions = ref([]);
 const goafOptions = ref([]);
@@ -91,7 +124,7 @@ const [registerTable] = useTable({
   showIndexColumn: false,
   showIndexColumn: false,
   canResize: false,
   canResize: false,
   actionColumn: {
   actionColumn: {
-    width: 60,
+    width: 120,
     title: '操作',
     title: '操作',
     dataIndex: 'action',
     dataIndex: 'action',
     slots: { customRender: 'action' },
     slots: { customRender: 'action' },
@@ -101,7 +134,7 @@ const [registerTable] = useTable({
 // 注册历史数据表格
 // 注册历史数据表格
 const [registerHistoryTable] = useTable({
 const [registerHistoryTable] = useTable({
   dataSource: historyData,
   dataSource: historyData,
-  columns,
+  columns: historyColumns,
   api: getProvinceAlarmHistory,
   api: getProvinceAlarmHistory,
   formConfig: {
   formConfig: {
     labelWidth: 120,
     labelWidth: 120,
@@ -208,6 +241,13 @@ const openModal = (record, type) => {
   if (type === 'realtime') {
   if (type === 'realtime') {
     // 可向实时弹窗传递当前记录数据
     // 可向实时弹窗传递当前记录数据
     realtimeModalRef.value?.showModal(record);
     realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    resolveValue.value = '';
+    // record.isResolved = resolveValue.value || '';
+    resolveId.value = record.id;
+  } else if (type === 'detail') {
+    visibleModal.value = true;
   } else {
   } else {
     // 可向历史弹窗传递当前记录数据
     // 可向历史弹窗传递当前记录数据
     historyModalRef.value?.showModal(record);
     historyModalRef.value?.showModal(record);
@@ -272,6 +312,18 @@ async function getEnfMineData() {
   console.log(lawDeptOptions.value, '11111111');
   console.log(lawDeptOptions.value, '11111111');
   // deviceOptions.value = res;
   // deviceOptions.value = res;
 }
 }
+// 解决预警
+async function handleOkEdit() {
+  const params = {
+    id: resolveId.value,
+    content: resolveValue.value,
+  };
+  await resolveAlarm(params);
+  visibleresolveModal.value = false;
+}
+const handleCancelEdit = () => {
+  visibleresolveModal.value = false;
+};
 onMounted(() => {
 onMounted(() => {
   // 页面挂载时的逻辑
   // 页面挂载时的逻辑
   getMineDataList();
   getMineDataList();
@@ -311,4 +363,21 @@ onMounted(() => {
 :where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
 :where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
   margin-top: 10px !important;
   margin-top: 10px !important;
 }
 }
+.action-buttons {
+  display: flex;
+  gap: 8px;
+}
+.action-btn {
+  cursor: pointer;
+  border: none;
+  padding: 4px;
+}
+.action-icon {
+  width: 16px;
+  height: 16px;
+}
+.action-text {
+  font-size: 12px;
+  color: #6398fc;
+}
 </style>
 </style>