From e852bb49cbf0d860d784cf3b7a76a9202d19dd9c Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期四, 30 四月 2026 15:13:11 +0800
Subject: [PATCH] 安全生产附件上传弹窗

---
 src/views/productionManagement/workOrderManagement/index.vue |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index c1b0474..bb09a10 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -265,7 +265,9 @@
   import { getCurrentInstance, reactive, toRefs } from "vue";
   import MaterialDialog from "./components/MaterialDialog.vue";
   import FileList from "@/components/Dialog/FileList.vue";
+  import useUserStore from "@/store/modules/user";
   const { proxy } = getCurrentInstance();
+  const userStore = useUserStore();
 
   const tableColumn = ref([
     {
@@ -368,7 +370,22 @@
           clickFun: row => {
             showReportDialog(row);
           },
-          disabled: row => row.planQuantity <= 0,
+          disabled: row => {
+            if (row.planQuantity <= 0) return true;
+            if (!row.userIds) return false;
+            try {
+              const userIds =
+                typeof row.userIds === "string"
+                  ? JSON.parse(row.userIds)
+                  : row.userIds;
+              if (Array.isArray(userIds)) {
+                return !userIds.some(id => String(id) === String(userStore.id));
+              }
+              return true;
+            } catch (e) {
+              return true;
+            }
+          },
         },
       ],
     },
@@ -801,6 +818,7 @@
   };
 
   onMounted(() => {
+    userStore.getInfo();
     getList();
     // 鑾峰彇鐢ㄦ埛鍒楄〃
     userListNoPageByTenantId().then(res => {

--
Gitblit v1.9.3