From afb26685e0dd38e6a1eada6ad207177666d5642b Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 12 五月 2026 18:02:15 +0800
Subject: [PATCH] 班组长根据角色获取

---
 src/api/system/user.js                                   |    8 ++++++++
 src/views/productionManagement/productionOrder/index.vue |    2 +-
 src/views/productionManagement/productionTeam/index.vue  |   12 ++++++++++--
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/api/system/user.js b/src/api/system/user.js
index 431f6b0..3350997 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -142,6 +142,14 @@
   })
 }
 
+// 鏌ヨ鍥㈤槦璐熻矗浜哄垪琛�
+export function teamLeaderList() {
+  return request({
+    url: '/system/user/teamLeaderList',
+    method: 'get'
+  })
+}
+
 // 鏌ヨ鐢ㄦ埛鍒楄〃
 export function userListNoPage() {
   return request({
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 234d012..63f735d 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -409,7 +409,7 @@
           name: "棰嗘枡",
           type: "text",
           color: "#5EC7AB",
-          showHide: row => !row.endOrder && !row.returned && userStore.id === row.teamLeaderUserId,
+          showHide: row => !row.endOrder && !row.returned,
           clickFun: row => {
             openMaterialDialog(row);
           },
diff --git a/src/views/productionManagement/productionTeam/index.vue b/src/views/productionManagement/productionTeam/index.vue
index b3fdcf9..39f79ae 100644
--- a/src/views/productionManagement/productionTeam/index.vue
+++ b/src/views/productionManagement/productionTeam/index.vue
@@ -67,7 +67,7 @@
               filterable
           >
             <el-option
-                v-for="user in userList"
+                v-for="user in leaderList"
                 :key="user.userId"
                 :label="user.nickName"
                 :value="user.userId"
@@ -114,7 +114,7 @@
   getTeamDetail,
   getTeamListPage,
 } from "@/api/productionManagement/productionTeam.js";
-import { userListNoPageByTenantId } from "@/api/system/user.js";
+import { teamLeaderList, userListNoPageByTenantId } from "@/api/system/user.js";
 
 const { proxy } = getCurrentInstance();
 
@@ -171,6 +171,7 @@
 const open = ref(false);
 const title = ref("");
 const userList = ref([]);
+const leaderList = ref([]);
 const selectedIds = ref([]);
 
 // 鍙�夋嫨鐨勬垚鍛樺垪琛紙鎺掗櫎鐝粍闀匡級
@@ -268,6 +269,13 @@
 
 /** 鑾峰彇鐢ㄦ埛鍒楄〃 */
 function getUserList() {
+  teamLeaderList().then((response) => {
+    if (response.code === 200) {
+      leaderList.value = response.data || [];
+    }
+  });
+
+
   userListNoPageByTenantId().then((response) => {
     if (response.code === 200) {
       userList.value = response.data || [];

--
Gitblit v1.9.3