From 06661fa6408ac922959dc6d79dab41596acdb375 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 28 七月 2026 18:16:36 +0800
Subject: [PATCH] fix: 安全设施巡检流程调整

---
 src/components/PIMTable/PIMTable.vue |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 5c317e0..d9cfdda 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -333,6 +333,7 @@
   const uploadRefs = ref([]);
   const currentFiles = ref({});
   const uploadKeys = ref({});
+  const parentMethods = inject("parentMethods", {});
 
   const indexMethod = index => {
     return (props.page.current - 1) * props.page.size + index + 1;
@@ -342,6 +343,10 @@
   const goLink = (row, linkMethod) => {
     if (!linkMethod) {
       return ElMessage.warning("璇烽厤缃� link 浜嬩欢");
+    }
+    if (typeof linkMethod === "function") {
+      linkMethod(row);
+      return;
     }
     const parentMethod = getParentMethod(linkMethod);
     if (typeof parentMethod === "function") {
@@ -353,8 +358,7 @@
 
   // 鑾峰彇鐖剁粍浠舵柟娉曪紙绀轰緥瀹炵幇锛�
   const getParentMethod = methodName => {
-    const parentMethods = inject("parentMethods", {});
-    return parentMethods[methodName];
+    return parentMethods?.[methodName];
   };
 
   const dataTypeFn = (val, format) => {

--
Gitblit v1.9.3