Parcourir la source

[Mod 0000]矿山信息和数据质量页面跳转监测页面时时传入煤矿编号

wangkeyi il y a 3 mois
Parent
commit
4d731b16db

+ 1 - 0
src/views/dashboard/SealedGoaf/sealedGoaf.api.ts

@@ -42,6 +42,7 @@ export const getGoafAlarmNum = (params) =>
 // 根据矿编码查询矿下采空区风险等级
 // 根据矿编码查询矿下采空区风险等级
 export const getGoafAlarmLevel = (params) =>
 export const getGoafAlarmLevel = (params) =>
   defHttp.post({
   defHttp.post({
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
     url: Api.getGoafAlarmLevel,
     url: Api.getGoafAlarmLevel,
     params
     params
   });
   });

+ 25 - 25
src/views/dashboard/basicInfo/dataQuality/index.vue

@@ -88,7 +88,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
   import { ref, nextTick, computed, onMounted } from 'vue';
   import { ref, nextTick, computed, onMounted } from 'vue';
   import { useRouter } from 'vue-router';
   import { useRouter } from 'vue-router';
-  import { BasicTable, useTable, BasicColumn, FormSchema } from '/@/components/Table';
+  import { BasicTable, useTable } from '/@/components/Table';
   import { useModal } from '/@/components/Modal';
   import { useModal } from '/@/components/Modal';
   import { Tabs, TabPane, Popconfirm, message } from 'ant-design-vue';
   import { Tabs, TabPane, Popconfirm, message } from 'ant-design-vue';
   import DataQualityModal from './components/DataQualityModal.vue';
   import DataQualityModal from './components/DataQualityModal.vue';
@@ -253,22 +253,22 @@
       }
       }
     }
     }
   }
   }
-  // 按需重载双表格(仅在「标记已解决」等跨Tab操作时用
-  async function reloadBothTableSafely() {
-    await nextTick();
-    // 未解决表格:await + try/catch 捕获异步错误
-    try {
-      await reloadUnresolved();
-    } catch (e) {
-      console.warn('未解决表格暂未就绪,跳过重载:', e);
-    }
-    // 已解决表格:同理,一个报错不影响另一个
-    try {
-      await reloadResolved();
-    } catch (e) {
-      console.warn('已解决表格暂未就绪,跳过重载:', e);
-    }
-  }
+  // 按需重载双表格(先注释掉
+  // async function reloadBothTableSafely() {
+  //   await nextTick();
+  //   // 未解决表格:await + try/catch 捕获异步错误
+  //   try {
+  //     await reloadUnresolved();
+  //   } catch (e) {
+  //     console.warn('未解决表格暂未就绪,跳过重载:', e);
+  //   }
+  //   // 已解决表格:同理,一个报错不影响另一个
+  //   try {
+  //     await reloadResolved();
+  //   } catch (e) {
+  //     console.warn('已解决表格暂未就绪,跳过重载:', e);
+  //   }
+  // }
 
 
   // tabs切换事件
   // tabs切换事件
   async function handleTabChange(key: string) {
   async function handleTabChange(key: string) {
@@ -280,12 +280,12 @@
    * 根据标签获取表格数据(已解决/未解决)
    * 根据标签获取表格数据(已解决/未解决)
    * @param result 弹框数据
    * @param result 弹框数据
    */
    */
-  function getQuaQueListByTab() {
-    return async (params: any) => {
-      const isOk = activeKey.value === 'resolved' ? true : false;
-      return await getDataQuaQueList({ ...params, isOk: isOk });
-    };
-  }
+  // function getQuaQueListByTab() {
+  //   return async (params: any) => {
+  //     const isOk = activeKey.value === 'resolved' ? true : false;
+  //     return await getDataQuaQueList({ ...params, isOk: isOk });
+  //   };
+  // }
 
 
   /**
   /**
    * 打开弹框函数
    * 打开弹框函数
@@ -309,7 +309,7 @@
       }
       }
       await safeReloadActiveTable();
       await safeReloadActiveTable();
     } catch (error) {
     } catch (error) {
-      console.log('操作失败:', error);
+      console.error('操作失败:', error);
     }
     }
   }
   }
   /**
   /**
@@ -331,7 +331,7 @@
       }
       }
 
 
       // 跳转页面(可携带拼接后的矿名/路径等参数)
       // 跳转页面(可携带拼接后的矿名/路径等参数)
-      router.push({ path: `/sealed/${minePath}`, query: {} });
+      router.push({ path: `/sealed/${minePath}`, query: { mineCode } });
     } catch (error) {
     } catch (error) {
       console.error('矿节点定位失败:', error);
       console.error('矿节点定位失败:', error);
       message.error('矿节点定位失败,请稍后重试');
       message.error('矿节点定位失败,请稍后重试');

+ 2 - 2
src/views/dashboard/basicInfo/minesInfo/index.vue

@@ -2,7 +2,7 @@
 <template>
 <template>
   <BasicTable @register="registerTable">
   <BasicTable @register="registerTable">
     <template #action="{ record }">
     <template #action="{ record }">
-      <button @click="handleGoToPage(record, `/sealed/${record.areaId}`)" class="action-btn">
+      <button @click="handleGoToPageQuery(record, `/sealed/${record.areaId}`)" class="action-btn">
         <SvgIcon name="data" />
         <SvgIcon name="data" />
       </button>
       </button>
       <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
       <button @click="handleGoToPage(record, '/basicInfo/accessStatistics')" class="action-btn">
@@ -128,7 +128,7 @@
     const mineCode = record.mineCode
     const mineCode = record.mineCode
     router.push({
     router.push({
       path,
       path,
-      query: { mineCode : mineCode},
+      query: { mineCode },
     });
     });
   }
   }