From 406a25c07c33ac3a969e3bdb4d5e90e74c2ed9a3 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期四, 13 十一月 2025 14:02:55 +0800
Subject: [PATCH] 修改新增

---
 src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
index 134ef0d..96830dc 100644
--- a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
@@ -9,7 +9,7 @@
         :close-on-click-modal="false"
     >
       <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px">
-        <el-form-item label="企业:" prop="companyId" v-if="state.isAdmin">
+        <el-form-item label="单位:" prop="companyId" v-if="state.isAdmin">
           <el-select v-model="state.form.companyId" placeholder="请选择" clearable @change="getDeptList()">
             <el-option
                 v-for="item in state.companyList"
@@ -175,7 +175,7 @@
   if(isAdmin){
     state.companyList = companyList
   }
-  await getUserList()
+  await getUserList(companyId)
   await getDepartList(companyId)
   await getSysClauseList()
   state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看';
@@ -201,8 +201,8 @@
   dialogVisible.value = true
 }
 
-const getUserList = async ()=> {
-  const res = await listUser({pageIndex: 1,pageSize: 999})
+const getUserList = async (companyId)=> {
+  const res = await listUser({pageIndex: 1,pageSize: 999, companyId: companyId})
   if(res.code == 200){
     state.userList = res.data.list?res.data.list:[]
   }else{
@@ -212,6 +212,7 @@
 
 const getDeptList = async ()=>{
   await getDepartList(state.form.companyId)
+  await getUserList(state.form.companyId)
 }
 
 const getDepartList = async (companyId)=> {

--
Gitblit v1.9.2