From be57c60a2b1ce03ebdd264176149c52870c0b760 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期二, 11 十一月 2025 10:52:28 +0800
Subject: [PATCH] 企业改成单位

---
 src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue b/src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
index e6be06a..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"
@@ -55,6 +55,12 @@
         </el-row>
         <el-form-item label="部门名称:"  prop="deptName">
           <el-input v-model.trim="state.form.deptName" :disabled="state.title =='查看'" placeholder="部门名称"></el-input>
+        </el-form-item>
+        <el-form-item label="是否是管理层:"  prop="deptType" v-if="state.title !== '修改密码'">
+          <el-radio-group v-model="state.form.deptType"  :disabled="disabled">
+            <el-radio :label="1">是</el-radio>
+            <el-radio :label="0">否</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="负责人:" prop="leaderUserId">
           <el-select clearable v-model="state.form.leaderUserId" :disabled="state.title =='查看'" filterable placeholder="负责人" style="width: 100%">
@@ -140,7 +146,8 @@
     companyId: null,
     responsType: 1,
     childDeptIds: [],
-    orderNum: 0
+    orderNum: 0,
+    deptType: 0
   },
   isAdmin: false,
   companyList: [],
@@ -168,7 +175,7 @@
   if(isAdmin){
     state.companyList = companyList
   }
-  await getUserList()
+  await getUserList(companyId)
   await getDepartList(companyId)
   await getSysClauseList()
   state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看';
@@ -182,6 +189,7 @@
     state.oldClauseList = value.caluseVO1List
     state.form.childDeptIds = value.sysDeptManageVoList?.map(i=>i.subDeptId)
     state.form.responsType = Number(value.responsType)
+    state.form.deptType = Number(value.deptType)
   }else{
     if(value.deptId && value.companyId){
       state.form.parentId = value.deptId
@@ -193,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{
@@ -204,6 +212,7 @@
 
 const getDeptList = async ()=>{
   await getDepartList(state.form.companyId)
+  await getUserList(state.form.companyId)
 }
 
 const getDepartList = async (companyId)=> {
@@ -270,7 +279,8 @@
     companyId: null,
     responsType: 1,
     childDeptIds: [],
-    orderNum: 0
+    orderNum: 0,
+    deptType: 0
   }
 
   superRef.value.clearValidate();

--
Gitblit v1.9.2