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

[Wip 0000] 项目接口重对接

houzekong 2 сар өмнө
parent
commit
fed06a71e9
28 өөрчлөгдсөн 426 нэмэгдсэн , 475 устгасан
  1. 2 2
      public/js/global.js
  2. 2 2
      src/api/sys/menu.ts
  3. 2 0
      src/api/sys/model/menuModel.ts
  4. 2 2
      src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue
  5. 34 80
      src/store/modules/mine.ts
  6. 4 4
      src/views/analysis/common/analysis.ts
  7. 3 3
      src/views/analysis/warningAnalysis/airLeakStatus/index.vue
  8. 3 3
      src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue
  9. 3 3
      src/views/analysis/warningAnalysis/autoFireOutAnalysis/index.vue
  10. 10 4
      src/views/analysis/warningAnalysis/connectAnalysis/hooks/form.ts
  11. 3 3
      src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue
  12. 3 3
      src/views/analysis/warningAnalysis/overlimitAlarm/index.vue
  13. 3 3
      src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue
  14. 3 3
      src/views/analysis/warningAnalysis/reportAnalysis/index.vue
  15. 3 3
      src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue
  16. 24 23
      src/views/dashboard/basicInfo/basicInfo.api.ts
  17. 3 1
      src/views/dashboard/basicInfo/closedStatistics/index.vue
  18. 2 2
      src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts
  19. 2 2
      src/views/dashboard/basicInfo/minesInfo/index.vue
  20. 1 1
      src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts
  21. 2 2
      src/views/dashboard/basicInfo/problemReport/problemReport.data.ts
  22. 2 2
      src/views/monitor/sealedMonitor/components/RealtimeDetailsModal.vue
  23. 14 5
      src/views/monitor/sealedMonitor/hooks/form.ts
  24. 5 4
      src/views/monitor/sealedMonitor/index.vue
  25. 1 1
      src/views/system/algorithm/algorithm.data.ts
  26. 3 4
      src/views/system/cadFile/cad.data.ts
  27. 276 294
      src/views/system/cadFile/components/SideDrawer.vue
  28. 11 16
      src/views/system/cadFile/index.vue

+ 2 - 2
public/js/global.js

@@ -173,7 +173,7 @@ const __STATIC_ROUTES__ = [
     component: '/monitor/sealedMonitor/index',
     children: [
       {
-        path: '/sealed/${rawid}',
+        path: '/sealed/${id}',
         component: '/monitor/sealedMonitor/index',
         meta: {
           keepAlive: true,
@@ -185,7 +185,7 @@ const __STATIC_ROUTES__ = [
           generation: false,
           // orderNo: '${departOrder}',
         },
-        name: 'sealed-${rawid}',
+        name: 'sealed-${id}',
       }
     ],
     meta: {

+ 2 - 2
src/api/sys/menu.ts

@@ -14,7 +14,7 @@ import { cloneDeep } from 'lodash';
 enum Api {
   GetMenuList = '/sys/permission/getUserPermissionByToken',
   // 获取执法处及其下辖地区树状数据
-  getEnfMineTreeData = '/sys/user/getEnfMineTreeData',
+  getEnfMineTreeDataNew = '/sys/user/getEnfMineTreeDataNew',
 
   // 【QQYUN-8487】
   // SwitchVue3Menu = '/sys/switchVue3Menu',
@@ -119,5 +119,5 @@ export function getBackMenuAndPerms() {
 // };
 
 export function getEnfMineTree() {
-  return defHttp.get<EnfMineTreeItem[]>({ url: Api.getEnfMineTreeData });
+  return defHttp.get<EnfMineTreeItem>({ url: Api.getEnfMineTreeDataNew });
 }

+ 2 - 0
src/api/sys/model/menuModel.ts

@@ -30,4 +30,6 @@ export interface EnfMineTreeItem {
   memoDesc: string[];
   /** 备注3 */
   description: string;
+
+  childDepart: EnfMineTreeItem[];
 }

+ 2 - 2
src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue

@@ -41,7 +41,7 @@
     props: {
       value: propTypes.string.def(''),
       placeholder: propTypes.string.def('全部'),
-      /** 根节点ID,如果传入,组件将过滤该节点下的节点,需注意传入rawid也就是接口返回的id */
+      /** 根节点ID,如果传入,组件将过滤该节点下的节点 */
       rootId: propTypes.string,
       /** 是否从已存储的信息中初始化组件值 */
       initFromStore: propTypes.bool.def(true),
@@ -88,7 +88,7 @@
       function handleChange(value: any[] = []) {
         if (!mineStore.findDepartById(last(value), options.value)) {
           console.warn('[Change] The value provided is not included in MineOptions');
-          const val = mineStore.calcMineCodeByDepart(options.value);
+          const val = props.rootId || mineStore.getRootId;
           emit('update:value', val);
           emit('change', val);
         } else {

+ 34 - 80
src/store/modules/mine.ts

@@ -3,8 +3,8 @@ import { ref, computed } from 'vue';
 
 // import { getEnfMineTree } from '/@/api/sys/menu';
 // import { getUserMinePermissionData } from '/@/components/Form/src/jeecg/components/MineCascader/mineData.api';
-import { findNode, findNodeAll, findPath, listToTree, treeToList, forEach } from '/@/utils/helper/treeHelper';
-import { isArray, isFunction, isNil, minBy, get } from 'lodash-es';
+import { findNode, findNodeAll, findPath, forEach } from '/@/utils/helper/treeHelper';
+import { isArray, isFunction, isNil, get } from 'lodash-es';
 import { getEnfMineTree } from '/@/api/sys/menu';
 import { EnfMineTreeItem } from '/@/api/sys/model/menuModel';
 
@@ -35,7 +35,8 @@ const DEFAULT_CONFIG = {
 
 export const useMineDepartmentStore = defineStore('mine-department-store', () => {
   // ==================== State 定义 ====================
-  const root = ref<EnfMineTreeItem>();
+  /** 当前用户的根部门 */
+  const root = ref<MineDepartment>();
 
   /** 当前选中的部门,可能是执法处、区或者具体到矿井 */
   const depart = ref<MineDepartment>();
@@ -47,8 +48,12 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
   // const rawTree = ref<MineDepartment[]>([]);
 
   // ==================== Getter 计算属性 ====================
+  /** 获取当前用户的根部门 */
   const getRoot = computed(() => root.value);
 
+  /** 获取当前用户的根部门ID */
+  const getRootId = computed(() => root.value?.id);
+
   /** 获取当前选中的部门 */
   const getDepart = computed(() => depart.value);
 
@@ -63,17 +68,6 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
     return calcDepartPathById(getDepartId.value, getDepartTree.value);
   });
 
-  /**
-   * 获取当前选中的矿井编号集合
-   * - 如果选择了具体的矿井节点,返回该矿井的编码
-   * - 如果选择了上级部门(如执法处),返回该部门下所有矿井的编码集合,用逗号分隔
-   * - 如果未选择任何节点,返回空字符串
-   */
-  const getMineCode = computed(() => {
-    const target = getDepartId.value ? [depart.value] : departTree.value;
-    return calcMineCodeByDepart(target);
-  });
-
   // ==================== Action 方法 ====================
 
   /**
@@ -101,51 +95,22 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
   async function fetchDepartTree() {
     try {
       // 并行请求两个接口
-      const r2 = await getEnfMineTree();
-      if (!r2.length) return;
-      const TOP_LEVEL_ORG = minBy(r2, (e) => parseInt(e.orgType))?.orgType;
-      const LEAF_LEVEL_ORG = get(r2, '[0].memoDesc[2]', '4');
-
-      const r1 = r2.reduce((arr: MineDepartment[], node) => {
-        const isRoot = node.orgType === TOP_LEVEL_ORG;
-        // 根节点不处理,放在这里return是因为有时请求返回的是单矿,也需要走数据处理流程
-        if (isRoot) {
-          root.value = node;
-        }
-        if (isRoot && node.orgType !== LEAF_LEVEL_ORG) return arr;
-
-        const ele: MineDepartment = {
-          ...node,
-          isLeaf: false,
-          rawid: node.id,
-          childDepart: [],
-        };
-
-        if (node.orgType === LEAF_LEVEL_ORG) {
-          ele.isLeaf = true;
-          ele.id = node.fax; // 使用矿井编码作为ID
-        }
-
-        arr.push(ele);
-        return arr;
-      }, []);
-
-      // 合并数据并转换为树形结构
-      // const tree: any[] = [];
-      const tree = listToTree(r1, DEFAULT_CONFIG);
+      const res = await getEnfMineTree();
+      if (!res) return;
+      const LEAF_LEVEL_ORG = get(res, 'memoDesc[2]', '4');
 
       forEach(
-        tree,
-        (node) => {
-          // 跳过叶节点
-          if (node.isLeaf) return;
-          node.id = calcMineCodeByDepart(node);
-          node.disabled = !Boolean(node.childDepart.length);
+        [res],
+        (node: MineDepartment) => {
+          node.isLeaf = node.orgType === LEAF_LEVEL_ORG;
+          node.disabled = node.isLeaf ? false : !Boolean(node.childDepart.length);
+          node.rawid = node.id;
         },
         DEFAULT_CONFIG
       );
 
-      departTree.value = tree;
+      root.value = res as MineDepartment;
+      departTree.value = res.childDepart as MineDepartment[];
       // 深拷贝保存原始数据,用于过滤后恢复
       // rawTree.value = JSON.parse(JSON.stringify(tree));
 
@@ -187,27 +152,6 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
     return [];
   }
 
-  /**
-   * 工具函数,获取给出的部门下矿井编号的集合
-   */
-  function calcMineCodeByDepart(depart?: MineDepartment): string;
-  function calcMineCodeByDepart(depart?: (MineDepartment | undefined)[]): string;
-  function calcMineCodeByDepart(depart?: MineDepartment | (MineDepartment | undefined)[]): string {
-    if (!depart) return '';
-    if (!isArray(depart)) {
-      depart = [depart];
-    }
-    const target = depart.filter((e) => !isNil(e));
-    const list = treeToList(target, DEFAULT_CONFIG);
-    if (isArray(list)) {
-      return list
-        .filter((item) => item.isLeaf) // 只取叶子节点(矿井)且fax不为空
-        .map((item) => item.fax!) // 提取矿井编码
-        .join(','); // 用逗号分隔多个矿井编码
-    }
-    return '';
-  }
-
   /**
    * 工具函数,获取走到所选部门必要路径
    */
@@ -219,8 +163,7 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
     if (!isArray(depart)) {
       depart = [depart];
     }
-    const target = depart.filter((e) => !isNil(e));
-    const path = findPath(target, (e) => e.id === id || e.rawid === id, DEFAULT_CONFIG);
+    const path = findPath(depart, (e) => e.id === id, DEFAULT_CONFIG);
 
     if (!isArray(path)) {
       return [];
@@ -240,8 +183,19 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
       depart = [depart];
     }
 
-    const target = depart.filter((e) => !isNil(e));
-    const node = findNode(target, (e) => e.id === id || e.rawid === id, DEFAULT_CONFIG);
+    return findDepart((e) => e.id === id, depart);
+  }
+
+  function findDepart(fn: (node: MineDepartment) => boolean, depart?: MineDepartment): MineDepartment | undefined;
+  function findDepart(fn: (node: MineDepartment) => boolean, depart?: (MineDepartment | undefined)[]): MineDepartment | undefined;
+  function findDepart(fn: (node: MineDepartment) => boolean, depart?: MineDepartment | (MineDepartment | undefined)[]): MineDepartment | undefined {
+    if (!fn || typeof fn !== 'function') return;
+    if (!depart) return;
+    if (!isArray(depart)) {
+      depart = [depart];
+    }
+
+    const node = findNode(depart, fn, DEFAULT_CONFIG);
     if (isNil(node)) return;
     return node;
   }
@@ -255,11 +209,11 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
 
     // --- Getter(只读计算属性)---
     getRoot,
+    getRootId,
     getDepart,
     getDepartId,
     getDepartTree,
     getDepartPath,
-    getMineCode,
 
     // --- Action(操作方法)---
     setDepart,
@@ -268,8 +222,8 @@ export const useMineDepartmentStore = defineStore('mine-department-store', () =>
     fetchDepartTree,
     filterDepartTree,
     clearDepart,
-    calcMineCodeByDepart,
     calcDepartPathById,
     findDepartById,
+    findDepart,
   };
 });

+ 4 - 4
src/views/analysis/common/analysis.ts

@@ -1,5 +1,4 @@
 import { ref } from 'vue';
-import { first } from 'lodash-es';
 import { getGoafSelectOption } from '../../monitor/sealedMonitor/monitor.api';
 import { useMineDepartmentStore } from '/@/store/modules/mine';
 import { resolveAlarm } from '../warningAnalysis/airLeakStatus/airLeak.api';
@@ -10,7 +9,8 @@ import { TableActionType } from '/@/components/Table';
 export function useInitForm(ctx?: TableActionType) {
   const mineStore = useMineDepartmentStore();
   // 给历史数据默认填充的矿码
-  const hiscode = first(mineStore.getMineCode.split(','));
+  const leaf = mineStore.findDepart((e) => e.isLeaf, mineStore.getDepart || mineStore.getRoot);
+  const hiscode = leaf?.id;
 
   if (hiscode) {
     // mineStore.setDepartById(code as string);
@@ -21,8 +21,8 @@ export function useInitForm(ctx?: TableActionType) {
   const goafId = ref('');
   const goafOptions = ref<any[]>([]);
 
-  function initGoafOptions(mineCode) {
-    return getGoafSelectOption({ mineCode }).then(({ options, defaultValue }) => {
+  function initGoafOptions(deptId) {
+    return getGoafSelectOption({ deptId }).then(({ options, defaultValue }) => {
       goafOptions.value = options;
       goafId.value = defaultValue;
     });

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

@@ -91,7 +91,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
           },
@@ -134,7 +134,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -165,7 +165,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

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

@@ -108,7 +108,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -154,7 +154,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -185,7 +185,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

+ 3 - 3
src/views/analysis/warningAnalysis/autoFireOutAnalysis/index.vue

@@ -108,7 +108,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -154,7 +154,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -185,7 +185,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

+ 10 - 4
src/views/analysis/warningAnalysis/connectAnalysis/hooks/form.ts

@@ -1,7 +1,6 @@
 import { ref } from 'vue';
 import { useRoute } from 'vue-router';
 import { getGoafSelectOption } from '/@/views/monitor/sealedMonitor/monitor.api';
-import { first } from 'lodash-es';
 import { useMineDepartmentStore } from '/@/store/modules/mine';
 
 export function useInitForm() {
@@ -9,7 +8,14 @@ export function useInitForm() {
   const route = useRoute();
   const loading = ref(false);
   // 默认填充的矿码
-  const innerValue = ref<string>((route.query.mineCode as string) || (first(mineStore.getMineCode.split(',')) as string));
+  const innerValue = ref<string>('');
+
+  if (route.query.id) {
+    innerValue.value = route.query.id as string;
+  } else {
+    const leaf = mineStore.findDepart((e) => e.isLeaf, mineStore.getRoot);
+    innerValue.value = leaf?.id as string;
+  }
 
   // if (innerValue.value) {
   //   // mineStore.setDepartById(code as string);
@@ -20,9 +26,9 @@ export function useInitForm() {
   const goafId = ref('');
   const goafOptions = ref<any[]>([]);
 
-  function initGoafOptions(mineCode) {
+  function initGoafOptions(deptId) {
     loading.value = true;
-    return getGoafSelectOption({ mineCode })
+    return getGoafSelectOption({ deptId })
       .then(({ options, defaultValue }) => {
         goafOptions.value = options;
         goafId.value = defaultValue;

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

@@ -98,7 +98,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -145,7 +145,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -176,7 +176,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

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

@@ -106,7 +106,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -153,7 +153,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -184,7 +184,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

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

@@ -121,7 +121,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -168,7 +168,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -199,7 +199,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

+ 3 - 3
src/views/analysis/warningAnalysis/reportAnalysis/index.vue

@@ -73,7 +73,7 @@
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'deptId',
             component: 'MineCascader', // 自定义组件名
             colProps: { span: 6 },
             rules: [],
@@ -119,12 +119,12 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

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

@@ -105,7 +105,7 @@
       schemas: [
         {
           label: '煤矿名称',
-          field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          field: 'deptId',
           component: 'MineCascader', // 自定义组件名
           colProps: { span: 6 },
           rules: [],
@@ -142,7 +142,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
-        model: { mineCode: hiscode },
+        model: { customField: hiscode },
         labelWidth: 120,
         schemas: [
           // {
@@ -173,7 +173,7 @@
           // },
           {
             label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+            field: 'customField',
             component: 'MineCascader', // 自定义组件名
             componentProps: {
               initFromStore: false,

+ 24 - 23
src/views/dashboard/basicInfo/basicInfo.api.ts

@@ -6,26 +6,27 @@ enum Api {
   // 接入统计
   getGoafAccessCount = '/ventanaly-province/province/mineData/getGoafAccessCount',
   // 数据质量
-  getDataQuaQueList  = '/ventanaly-province/province/dataQuaQue/list',
+  getDataQuaQueList = '/ventanaly-province/province/dataQuaQue/list',
   addDataQuaQue = '/ventanaly-province/province/dataQuaQue/add',
   deleteDataQuaQue = '/ventanaly-province/province/dataQuaQue/delete',
   editDataQuaQue = '/ventanaly-province/province/dataQuaQue/edit',
   // 密闭统计
-  getClosedAccessCount = '/ventanaly-province/province/mineData/getZFCGoafAccessCount'
+  getClosedAccessCount = '/ventanaly-province/province/mineData/getZFCGoafAccessCount',
 }
 // 矿山信息
 
-export const getMineData = (params) => 
-  defHttp.post({ 
+export const getMineData = (params) =>
+  defHttp.post({
     headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-    url: Api.getMineData, 
-    params
+    url: Api.getMineData,
+    params,
   });
 
 // 接入统计
 export const getGoafAccessCount = (params) =>
   defHttp.get({
     url: Api.getGoafAccessCount,
+    params,
   });
 
 // 数据质量相关接口
@@ -38,43 +39,43 @@ export const getDataQuaQueList = (params) =>
   defHttp.get({
     headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
     url: Api.getDataQuaQueList,
-    params
+    params,
   });
 
-
 /**
  * 新增质量问题
  * @param params
  */
-export const addDataQuaQue = (params) => 
-  defHttp.post({ 
-    url: Api.addDataQuaQue, 
-    params 
+export const addDataQuaQue = (params) =>
+  defHttp.post({
+    url: Api.addDataQuaQue,
+    params,
   });
 
 /**
  * 通过id删除质量问题
  * @param params
  */
-export const deleteDataQuaQue = (params) => 
-  defHttp.delete({ 
+export const deleteDataQuaQue = (params) =>
+  defHttp.delete({
     headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-    url: Api.deleteDataQuaQue, 
-    params 
+    url: Api.deleteDataQuaQue,
+    params,
   });
 
 /**
  * 编辑质量问题
  * @param params
  */
-export const editDataQuaQue = (params) => 
-  defHttp.post({ 
-    url: Api.editDataQuaQue, 
-    params 
+export const editDataQuaQue = (params) =>
+  defHttp.post({
+    url: Api.editDataQuaQue,
+    params,
   });
 
-  // 密闭统计
-export const getClosedAccessCount = () =>
+// 密闭统计
+export const getClosedAccessCount = (params) =>
   defHttp.get({
     url: Api.getClosedAccessCount,
-  });
+    params,
+  });

+ 3 - 1
src/views/dashboard/basicInfo/closedStatistics/index.vue

@@ -17,13 +17,15 @@
   import { dataColumns } from './closed.data';
   import { getClosedAccessCount } from '../basicInfo.api';
   import { SvgIcon } from '/@/components/Icon';
+  import { useMineDepartmentStore } from '/@/store/modules/mine';
 
   // 路由实例
   const router = useRouter();
+  const mineStore = useMineDepartmentStore();
   // 注册表格并获取相关方法
   const [registerTable] = useTable({
     title: '密闭统计',
-    api: getClosedAccessCount, // 数据统计接口
+    api: () => getClosedAccessCount({ deptId: mineStore.getRootId }), // 数据统计接口
     columns: dataColumns,
     pagination: false,
     useSearchForm: false,

+ 2 - 2
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -98,7 +98,7 @@ export const columns: BasicColumn[] = [
 // 4. 查询表单配置(下拉框改为动态options)
 export const searchFormSchema: FormSchema[] = [
   {
-    field: 'mineCodeList',
+    field: 'deptId',
     label: '煤矿名称',
     component: 'MineCascader',
     colProps: { span: 6 },
@@ -133,7 +133,7 @@ export const searchFormSchema: FormSchema[] = [
 
 export const topFormSchema: FormSchema[] = [
   {
-    field: 'mineCode',
+    field: 'deptId',
     label: '煤矿名称',
     component: 'MineCascader',
     componentProps: {

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

@@ -125,10 +125,10 @@
   }
 
   function handleGoToPageQuery(record: any, path: string) {
-    const mineCode = record.mineCode;
+    const id = record.deptId;
     router.push({
       path,
-      query: { mineCode },
+      query: { id },
     });
   }
   // const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();

+ 1 - 1
src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts

@@ -127,7 +127,7 @@ export const columns: BasicColumn[] = [
 // 4. 生成动态搜索表单配置(接收动态下拉选项)
 export const searchFormSchema: FormSchema[] = [
   {
-    field: 'mineCode',
+    field: 'deptId',
     label: '煤矿名称',
     component: 'MineCascader',
     colProps: { span: 6 },

+ 2 - 2
src/views/dashboard/basicInfo/problemReport/problemReport.data.ts

@@ -98,7 +98,7 @@ export const columns: BasicColumn[] = [
 // 4. 查询表单配置(下拉框改为动态options)
 export const searchFormSchema: FormSchema[] = [
   {
-    field: 'mineCodeList',
+    field: 'deptId',
     label: '煤矿名称',
     component: 'MineCascader',
     colProps: { span: 6 },
@@ -133,7 +133,7 @@ export const searchFormSchema: FormSchema[] = [
 
 export const topFormSchema: FormSchema[] = [
   {
-    field: 'mineCode',
+    field: 'deptId',
     label: '密闭名称',
     component: 'MineCascader',
     componentProps: {

+ 2 - 2
src/views/monitor/sealedMonitor/components/RealtimeDetailsModal.vue

@@ -122,8 +122,8 @@
       }
 
       function fetchDetailData() {
-        const { mineCode, goafId } = dataRef.value;
-        getGoafData({ mineCodeList: mineCode, goafId }).then((r) => {
+        const { deptId, goafId } = dataRef.value;
+        getGoafData({ deptId, goafId }).then((r) => {
           dataRef.value = last(r);
           push(dataRef.value);
         });

+ 14 - 5
src/views/monitor/sealedMonitor/hooks/form.ts

@@ -1,4 +1,4 @@
-import { first, get, last } from 'lodash-es';
+import { get, last } from 'lodash-es';
 import { ref } from 'vue';
 import { useRoute } from 'vue-router';
 import { getGoafSelectOption } from '../monitor.api';
@@ -7,11 +7,20 @@ import { useMineDepartmentStore } from '/@/store/modules/mine';
 export function useInitForm() {
   const mineStore = useMineDepartmentStore();
   const route = useRoute();
+
+  // 如果generation为true,表示是模板路由直接当作密闭监测页面使用,就不会有/:id后缀
   const departId = route.meta.generation ? undefined : (last(route.path.split('/')) as string);
+  // 获取到路由携带的id后进行过滤
   const dep = mineStore.findDepartById(departId, mineStore.departTree);
-  const rawcode = route.query.mineCode as string;
+  // 获取到query携带的矿id,如有就默认选中该矿
+  const rawcode = route.query.id as string;
   // 给历史数据默认填充的矿码
-  const hiscode = !rawcode ? first(get(dep, 'id', '').split(',')) : rawcode;
+  const hiscode = rawcode
+    ? rawcode
+    : get(
+        mineStore.findDepart((e) => e.isLeaf, dep || mineStore.getRoot),
+        'id'
+      );
 
   if (hiscode) {
     // mineStore.setDepartById(code as string);
@@ -22,8 +31,8 @@ export function useInitForm() {
   const goafId = ref('');
   const goafOptions = ref<any[]>([]);
 
-  function initGoafOptions(mineCode) {
-    return getGoafSelectOption({ mineCode }).then(({ options, defaultValue }) => {
+  function initGoafOptions(deptId) {
+    return getGoafSelectOption({ deptId }).then(({ options, defaultValue }) => {
       goafOptions.value = options;
       goafId.value = defaultValue;
     });

+ 5 - 4
src/views/monitor/sealedMonitor/index.vue

@@ -62,6 +62,7 @@
   const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
   const activeTab = ref('realtime');
   const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
+
   const wrappedGetMineData = (params) => {
     // 缓存参数(这就是getMineData实际请求的参数)
     tableQueryParams.value = { ...params };
@@ -74,10 +75,10 @@
       api: wrappedGetMineData,
       columns,
       formConfig: {
-        model: { mineCodeList: rawcode },
+        model: { deptId: rawcode },
         schemas: [
           {
-            field: 'mineCodeList',
+            field: 'deptId',
             label: '煤矿名称',
             component: 'MineCascader',
             colProps: { span: 6 },
@@ -122,11 +123,11 @@
       columns: historicalColumns,
       formConfig: {
         model: {
-          mineCodeList: hiscode,
+          deptId: hiscode,
         },
         schemas: [
           {
-            field: 'mineCodeList',
+            field: 'deptId',
             label: '煤矿名称',
             component: 'MineCascader',
             colProps: { span: 6 },

+ 1 - 1
src/views/system/algorithm/algorithm.data.ts

@@ -69,7 +69,7 @@ export const columnsGoafLimit: BasicColumn[] = [
 export const searchFormSchema: FormSchema[] = [
   {
     label: '煤矿名称',
-    field: 'mineCode',
+    field: 'deptId',
     component: 'MineCascader',
     colProps: { span: 6 },
   },

+ 3 - 4
src/views/system/cadFile/cad.data.ts

@@ -4,7 +4,6 @@ import { h } from 'vue';
 import { Ref } from 'vue';
 import { isEmpty } from 'lodash-es';
 
-
 // 3. 生成动态表格列(接收动态状态映射)
 export function getColumns(): BasicColumn[] {
   return [
@@ -59,7 +58,7 @@ export function getColumns(): BasicColumn[] {
 export function getSearchFormSchema(): FormSchema[] {
   return [
     {
-      field: 'mineCode',
+      field: 'deptId',
       label: '煤矿名称',
       component: 'MineCascader',
       colProps: { span: 6 },
@@ -120,7 +119,7 @@ export const mockData = [
 // 地图编辑弹框表单
 export const mapEditForm: FormSchema[] = [
   {
-    field: 'mineCodeList',
+    field: 'deptId',
     label: '煤矿名称',
     component: 'MineCascader',
     colProps: { span: 6 },
@@ -178,4 +177,4 @@ export const mapEditForm: FormSchema[] = [
     colProps: { span: 6 },
     groupName: '常规查询',
   },
-];
+];

+ 276 - 294
src/views/system/cadFile/components/SideDrawer.vue

@@ -4,9 +4,7 @@
     <!-- 抽屉头部:标题 + 关闭按钮 -->
     <div class="custom-drawer-header">
       <span class="custom-drawer-title">密闭管理</span>
-      <div @click="handleClose" class="close-btn">
-        X
-      </div>
+      <div @click="handleClose" class="close-btn"> X </div>
     </div>
 
     <!-- 抽屉内容区 -->
@@ -32,11 +30,7 @@
           </a-button>
         </div> -->
         <div class="search-section">
-          <a-input
-            v-model:value="searchValue"
-            placeholder="密闭位置"
-            style="width: 60%; margin-right: 8px"
-          />
+          <a-input v-model:value="searchValue" placeholder="密闭位置" style="width: 60%; margin-right: 8px" />
         </div>
 
         <!-- 传感器数据表格 -->
@@ -53,21 +47,8 @@
             <!-- 操作列自定义渲染 -->
             <template #operation="{ record }">
               <a-space>
-                <a-button 
-                  v-if="!record.isPlaced" 
-                  size="small" 
-                  @click="handleDeploy(record)"
-                >
-                  布点
-                </a-button>
-                <a-button 
-                  v-else 
-                  size="small" 
-                  danger 
-                  @click="handleRemove(record)"
-                >
-                  移除
-                </a-button>
+                <a-button v-if="!record.isPlaced" size="small" @click="handleDeploy(record)"> 布点 </a-button>
+                <a-button v-else size="small" danger @click="handleRemove(record)"> 移除 </a-button>
               </a-space>
             </template>
           </a-table>
@@ -78,304 +59,305 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, computed, onMounted, watch } from "vue";
-import { message } from "ant-design-vue";
-import { bindPosition, removePosition, getMarkerStatusList, renderGoafMarkers } from "../app";
-import MineCascader from '@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
-import { getGoafList } from '../cad.api';
-
-interface Props {
-  visible: boolean;
-  mineCode: string;
-}
-const props = defineProps<Props>();
-const emit = defineEmits<{
-  (e: "update:visible", value: boolean): void;
-}>();
-
-// 响应式数据
-const searchValue = ref("");
-const pagination = ref({
-  current: 1,
-  pageSize: 10,
-  total: 0 // 初始化为0,由接口数据决定
-});
-const selectedMineId = ref("");
-// 新增:存储接口返回的密闭数据
-const goafList = ref<any[]>([]);
-
-// 表格列配置 - 修复字段拼写错误(devicePos → devicePos)
-const columns = [
-  {
-    title: "操作",
-    key: "operation",
-    slots: { customRender: "operation" },
-    width: 80,
-    fixed: 'left'
-  },
-  {
-    title: "密闭位置",
-    dataIndex: "devicePos", // 修正拼写错误
-    key: "devicePos",
-    ellipsis: true,
-    tooltip: true
-  },
-];
-
-// 表格数据过滤逻辑 - 核心修改:基于接口坐标判断isPlaced
-const filteredDataWithStatus = computed(() => {
-  // 从接口返回的goafList过滤
-  let filteredData = goafList.value.filter(item => {
-    // 密闭位置搜索匹配(兼容空值)
-    const isSearchMatch = searchValue.value 
-      ? (item.devicePos || '').includes(searchValue.value) 
-      : true;
-    return isSearchMatch;
+  import { ref, computed, onMounted, watch } from 'vue';
+  import { message } from 'ant-design-vue';
+  import { bindPosition, removePosition, getMarkerStatusList, renderGoafMarkers } from '../app';
+  import { getGoafList } from '../cad.api';
+
+  interface Props {
+    visible: boolean;
+    mineCode: string;
+  }
+  const props = defineProps<Props>();
+  const emit = defineEmits<{
+    (e: 'update:visible', value: boolean): void;
+  }>();
+
+  // 响应式数据
+  const searchValue = ref('');
+  const pagination = ref({
+    current: 1,
+    pageSize: 10,
+    total: 0, // 初始化为0,由接口数据决定
   });
+  const selectedMineId = ref('');
+  // 新增:存储接口返回的密闭数据
+  const goafList = ref<any[]>([]);
+
+  // 表格列配置 - 修复字段拼写错误(devicePos → devicePos)
+  const columns = [
+    {
+      title: '操作',
+      key: 'operation',
+      slots: { customRender: 'operation' },
+      width: 80,
+      fixed: 'left',
+    },
+    {
+      title: '密闭位置',
+      dataIndex: 'devicePos', // 修正拼写错误
+      key: 'devicePos',
+      ellipsis: true,
+      tooltip: true,
+    },
+  ];
+
+  // 表格数据过滤逻辑 - 核心修改:基于接口坐标判断isPlaced
+  const filteredDataWithStatus = computed(() => {
+    // 从接口返回的goafList过滤
+    let filteredData = goafList.value.filter((item) => {
+      // 密闭位置搜索匹配(兼容空值)
+      const isSearchMatch = searchValue.value ? (item.devicePos || '').includes(searchValue.value) : true;
+      return isSearchMatch;
+    });
+
+    // 关联标记状态 + 核心:优先判断接口返回的坐标
+    const placedMarkers = getMarkerStatusList() || [];
+    const dataWithStatus = filteredData.map((item) => {
+      // 判断接口坐标是否有效(非null/""且为数字)
+      const hasValidX = item.xcoordinate && !isNaN(Number(item.xcoordinate));
+      const hasValidY = item.ycoordinate && !isNaN(Number(item.ycoordinate));
+      // 兜底:本地标记是否存在(防止接口未同步的临时状态)
+      const matchedMarker = placedMarkers.find((marker) => marker.data?.id === item.id);
+
+      return {
+        ...item,
+        // 优先用接口坐标判断,无接口坐标时用本地标记
+        isPlaced: hasValidX && hasValidY,
+        sensorId: matchedMarker?.sensorId || item.id,
+      };
+    });
 
-  // 关联标记状态 + 核心:优先判断接口返回的坐标
-  const placedMarkers = getMarkerStatusList() || [];
-  const dataWithStatus = filteredData.map(item => {
-    // 判断接口坐标是否有效(非null/""且为数字)
-    const hasValidX = item.xcoordinate && !isNaN(Number(item.xcoordinate));
-    const hasValidY = item.ycoordinate && !isNaN(Number(item.ycoordinate));
-    // 兜底:本地标记是否存在(防止接口未同步的临时状态)
-    const matchedMarker = placedMarkers.find(marker => marker.data?.id === item.id);
-    
-    return {
-      ...item,
-      // 优先用接口坐标判断,无接口坐标时用本地标记
-      isPlaced: hasValidX && hasValidY, 
-      sensorId: matchedMarker?.sensorId || item.id,
-    };
+    // 分页逻辑
+    const start = (pagination.value.current - 1) * pagination.value.pageSize;
+    const end = start + pagination.value.pageSize;
+    pagination.value.total = filteredData.length;
+    return dataWithStatus.slice(start, end);
   });
 
-  // 分页逻辑
-  const start = (pagination.value.current - 1) * pagination.value.pageSize;
-  const end = start + pagination.value.pageSize;
-  pagination.value.total = filteredData.length;
-  return dataWithStatus.slice(start, end);
-});
-
-// 关闭抽屉
-const handleClose = () => emit("update:visible", false);
-
-// 搜索方法
-const handleGoafSearch = async () => {
-  // 校验:必须选择煤矿
-  if (!selectedMineId.value) {
-    message.warning("请先选择煤矿!");
-    return;
-  }
+  // 关闭抽屉
+  const handleClose = () => emit('update:visible', false);
 
-  try {
-    // 调用接口
-    const res = await getGoafList({
-      order: "desc",
-      mineCode: selectedMineId.value,
-    });
-    goafList.value = res || [];
-    pagination.value.current = 1; // 搜索后重置页码到第一页
-    await renderGoafMarkers(goafList.value); // 渲染标记
-
-  } catch (error) {
-    goafList.value = [];
-    message.error(`查询失败:${(error as Error).message}`);
-    console.error("接口请求失败:", error);
-  }
-};
-
-// 刷新方法 - 优化:强制重新请求接口
-const handleRefresh = async () => {
-  searchValue.value = "";
-  pagination.value.current = 1;
-  pagination.value = { ...pagination.value }; // 触发响应式更新
-  
-  // 如果已选择煤矿,刷新时重新请求接口(保证数据最新)
-  if (selectedMineId.value) {
-    await handleGoafSearch();
-  } else {
-    goafList.value = []; // 未选煤矿则清空表格
-  }
-};
-
-// 表格分页变化
-const handleTableChange = (pag: any) => {
-  pagination.value = { ...pagination.value, ...pag };
-};
-
-// 布点方法 - 优化:布点后主动刷新接口数据
-const handleDeploy = async (record: any) => {
-  try {
-    const marker = await bindPosition({ 
-      id: record.id,
-      devicePos: record.devicePos
-    });
-    if (!marker) {
-      message.warning("布点操作已取消");
+  // 搜索方法
+  const handleGoafSearch = async () => {
+    // 校验:必须选择煤矿
+    if (!selectedMineId.value) {
+      message.warning('请先选择煤矿!');
       return;
     }
-    // 布点成功后刷新接口数据,保证按钮状态同步
-    await handleRefresh();
-  } catch (error) {
-    message.error(`布点失败:${(error as Error).message}`);
-    console.error("布点失败:", error);
-  }
-};
-
-// 移除后主动刷新接口数据
-const handleRemove = async (record: any) => {
-  try {
-    const isSuccess = await removePosition(record.sensorId, record.id);
-    if (isSuccess) {
-      // 移除成功后刷新接口数据,保证按钮状态同步
+
+    try {
+      // 调用接口
+      const res = await getGoafList({
+        order: 'desc',
+        mineCode: selectedMineId.value,
+      });
+      goafList.value = res || [];
+      pagination.value.current = 1; // 搜索后重置页码到第一页
+      await renderGoafMarkers(goafList.value); // 渲染标记
+    } catch (error) {
+      goafList.value = [];
+      message.error(`查询失败:${(error as Error).message}`);
+      console.error('接口请求失败:', error);
+    }
+  };
+
+  // 刷新方法 - 优化:强制重新请求接口
+  const handleRefresh = async () => {
+    searchValue.value = '';
+    pagination.value.current = 1;
+    pagination.value = { ...pagination.value }; // 触发响应式更新
+
+    // 如果已选择煤矿,刷新时重新请求接口(保证数据最新)
+    if (selectedMineId.value) {
+      await handleGoafSearch();
+    } else {
+      goafList.value = []; // 未选煤矿则清空表格
+    }
+  };
+
+  // 表格分页变化
+  const handleTableChange = (pag: any) => {
+    pagination.value = { ...pagination.value, ...pag };
+  };
+
+  // 布点方法 - 优化:布点后主动刷新接口数据
+  const handleDeploy = async (record: any) => {
+    try {
+      const marker = await bindPosition({
+        id: record.id,
+        devicePos: record.devicePos,
+      });
+      if (!marker) {
+        message.warning('布点操作已取消');
+        return;
+      }
+      // 布点成功后刷新接口数据,保证按钮状态同步
       await handleRefresh();
+    } catch (error) {
+      message.error(`布点失败:${(error as Error).message}`);
+      console.error('布点失败:', error);
     }
-  } catch (error) {
-    message.error(`移除失败:${(error as Error).message}`);
-    console.error("移除失败:", error);
-  }
-};
-
-// 煤矿选择变化
-const handleMineChange = (mineId: string) => {
-  selectedMineId.value = mineId;
-};
+  };
+
+  // 移除后主动刷新接口数据
+  const handleRemove = async (record: any) => {
+    try {
+      const isSuccess = await removePosition(record.sensorId, record.id);
+      if (isSuccess) {
+        // 移除成功后刷新接口数据,保证按钮状态同步
+        await handleRefresh();
+      }
+    } catch (error) {
+      message.error(`移除失败:${(error as Error).message}`);
+      console.error('移除失败:', error);
+    }
+  };
+
+  // 煤矿选择变化
+  const handleMineChange = (mineId: string) => {
+    selectedMineId.value = mineId;
+  };
+
+  watch(
+    () => props.mineCode,
+    (newVal) => {
+      if (newVal) {
+        selectedMineId.value = newVal;
+      }
+    },
+    { immediate: true }
+  );
+
+  // 监听抽屉显隐:打开时刷新数据
+  watch(
+    () => props.visible,
+    async (isVisible) => {
+      if (isVisible) await handleRefresh(); // 异步数据加载
+    },
+    { immediate: true }
+  );
+
+  // 初始化:分页总数同步为接口数据量
+  onMounted(() => {
+    pagination.value.total = goafList.value.length;
+  });
+</script>
 
-watch(() => props.mineCode, (newVal) => {
-  if (newVal) {
-    selectedMineId.value = newVal;
+<style scoped>
+  /* 自定义抽屉核心容器 */
+  .custom-drawer {
+    position: fixed;
+    top: 50px;
+    left: 0;
+    z-index: 999;
+    width: 450px;
+    height: calc(100vh - 50px);
+    background: #ffffff;
+    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
+    transform: translateX(-100%);
+    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
   }
-}, { immediate: true });
 
+  /* 抽屉打开状态 - 滑入动画 */
+  .custom-drawer-open {
+    transform: translateX(0);
+  }
 
-// 监听抽屉显隐:打开时刷新数据
-watch(() => props.visible, async (isVisible) => {
-  if (isVisible) await handleRefresh(); // 异步数据加载
-}, { immediate: true });
+  /* 抽屉头部 */
+  .custom-drawer-header {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #ffffff;
+    background-color: #2d4f82;
+    padding: 14px 20px;
+    flex-shrink: 0;
+  }
 
-// 初始化:分页总数同步为接口数据量
-onMounted(() => {
-  pagination.value.total = goafList.value.length;
-});
-</script>
+  .custom-drawer-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #ffffff;
+    line-height: 1.5;
+  }
 
-<style scoped>
-/* 自定义抽屉核心容器 */
-.custom-drawer {
-  position: fixed;
-  top: 50px;
-  left: 0;
-  z-index: 999;
-  width: 450px;
-  height: calc(100vh - 50px);
-  background: #ffffff;
-  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
-  transform: translateX(-100%);
-  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
-  display: flex;
-  flex-direction: column;
-  overflow: hidden;
-}
-
-/* 抽屉打开状态 - 滑入动画 */
-.custom-drawer-open {
-  transform: translateX(0);
-}
-
-/* 抽屉头部 */
-.custom-drawer-header {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  color: #ffffff;
-  background-color: #2d4f82;
-  padding: 14px 20px;
-  flex-shrink: 0;
-}
-
-.custom-drawer-title {
-  font-size: 16px;
-  font-weight: 600;
-  color: #ffffff;
-  line-height: 1.5;
-}
-
-.close-btn {
+  .close-btn {
     font-size: 20px;
     padding: 0;
     height: 20px;
     width: 20px;
     margin-top: -10px;
     cursor: pointer;
-}
-
-
-/* 抽屉内容区 */
-.custom-drawer-body {
-  flex: 1;
-  overflow-y: auto;
-  padding: 0;
-}
-
-.drawer-content {
-  padding: 16px 20px;
-}
-
-/* 搜索区域布局 */
-.search-section {
-  display: flex;
-  align-items: center;
-  margin-bottom: 16px;
-  width: 100%;
-}
-
-/* 下拉选择区域间距 */
-.select-section {
-  margin-bottom: 16px;
-}
-
-/* 表格区域宽度适配 */
-.table-section {
-  width: 100%;
-}
-
-/* 表格样式 */
-:deep(.ant-table) {
-  font-size: 14px;
-}
-
-:deep(.ant-table-thead > tr > th) {
-  background: #fafafa;
-  font-weight: 600;
-  color: #000;
-  padding: 10px 12px;
-  border-bottom: 1px solid #f0f0f0;
-}
-
-:deep(.ant-table-tbody > tr > td) {
+  }
+
+  /* 抽屉内容区 */
+  .custom-drawer-body {
+    flex: 1;
+    overflow-y: auto;
+    padding: 0;
+  }
+
+  .drawer-content {
+    padding: 16px 20px;
+  }
+
+  /* 搜索区域布局 */
+  .search-section {
+    display: flex;
+    align-items: center;
+    margin-bottom: 16px;
+    width: 100%;
+  }
+
+  /* 下拉选择区域间距 */
+  .select-section {
+    margin-bottom: 16px;
+  }
+
+  /* 表格区域宽度适配 */
+  .table-section {
+    width: 100%;
+  }
+
+  /* 表格样式 */
+  :deep(.ant-table) {
+    font-size: 14px;
+  }
+
+  :deep(.ant-table-thead > tr > th) {
+    background: #fafafa;
+    font-weight: 600;
+    color: #000;
+    padding: 10px 12px;
+    border-bottom: 1px solid #f0f0f0;
+  }
+
+  :deep(.ant-table-tbody > tr > td) {
     color: #000 !important;
     font-family: Source Han Sans SC !important;
     font-size: 16px !important;
     font-weight: 400 !important;
     letter-spacing: 0 !important;
-}
-:deep(.ant-table-tbody > .ant-table-row) {
-  &:hover {
-    background-color: #a4d3ee !important;
   }
-}
-:deep(.ant-table-tbody > .ant-table-row > td) {
-  background-color: unset !important;
-  &:hover {
+  :deep(.ant-table-tbody > .ant-table-row) {
+    &:hover {
+      background-color: #a4d3ee !important;
+    }
+  }
+  :deep(.ant-table-tbody > .ant-table-row > td) {
     background-color: unset !important;
+    &:hover {
+      background-color: unset !important;
+    }
   }
-}
-
 
-/* 分页样式 */
-:deep(.ant-pagination) {
-  margin: 16px 0 0 0;
-  text-align: right;
-}
-</style>
+  /* 分页样式 */
+  :deep(.ant-pagination) {
+    margin: 16px 0 0 0;
+    text-align: right;
+  }
+</style>

+ 11 - 16
src/views/system/cadFile/index.vue

@@ -1,13 +1,11 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
-  <BasicTable @register="registerMapTable" :rowSelection="rowSelection" >
+  <BasicTable @register="registerMapTable" :rowSelection="rowSelection">
     <template #resetBefore>
       <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXls"> 下载 </a-button>
     </template>
     <template #action="{ record }">
-      <button @click="handleGoToPageQuery(record, `/manage/mapView`)" class="action-btn" title="">
-        布点
-      </button>
+      <button @click="handleGoToPageQuery(record, `/manage/mapView`)" class="action-btn" title=""> 布点 </button>
       <button @click="handleOpenModal(record)" class="action-btn" title="修改">
         <SvgIcon name="edit" />
       </button>
@@ -28,7 +26,7 @@
     </template>
   </BasicTable>
 
-   <!-- 注册编辑弹框组件 -->
+  <!-- 注册编辑弹框组件 -->
   <MapEditModal @register="registerModal" @success="handleModalSuccess" />
 </template>
 
@@ -39,17 +37,16 @@
   import { SvgIcon } from '/@/components/Icon';
   import { message, Popconfirm } from 'ant-design-vue';
   // 引入动态列/表单配置函数 + 类型
-  import { getColumns, getSearchFormSchema, mockData} from './cad.data';
+  import { getColumns, getSearchFormSchema, mockData } from './cad.data';
   // import { getMineData } from '../basicInfo.api';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { useIntervalFn } from '@vueuse/core';
   import { useModal } from '/@/components/Modal';
-  import MineCascader from '/@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
   import MapEditModal from './components/MapEditModal.vue';
 
   // 路由实例
   const router = useRouter();
-   // 弹框注册
+  // 弹框注册
   const [registerModal, { openModal }] = useModal();
 
   // 生成动态列和搜索表单(computed响应式更新)
@@ -62,8 +59,8 @@
       dataSource: mockData,
       columns, // 绑定动态列
       rowKey: 'mineCode',
-      rowSelection: { 
-        type: 'checkbox' ,
+      rowSelection: {
+        type: 'checkbox',
         onChange: (selectedRowKeys, selectedRows) => {
           console.log('选中了:', selectedRowKeys, selectedRows);
         },
@@ -83,10 +80,10 @@
       params: {},
     },
   });
-  const [registerMapTable, mapTable, {rowSelection} ] = mapManageTable;
+  const [registerMapTable, mapTable, { rowSelection }] = mapManageTable;
   const { pause, resume } = useIntervalFn(() => mapTable.reload({ silence: true }), 10000);
 
-    /**
+  /**
    * 打开弹框函数
    * @param result 弹框数据
    */
@@ -104,7 +101,7 @@
       mapTable.reload();
     }
   }
-    /**
+  /**
    * 删除记录方法
    * @param record 当前行数据
    */
@@ -132,9 +129,7 @@
     // 取消操作,无逻辑(仅关闭气泡)
   }
   // ========== 初始化 ==========
-  onMounted(async () => {
-  
-  });
+  onMounted(async () => {});
 </script>
 
 <style lang="less" scoped>