fix(filling): 修改用户管理归属部门显示

This commit is contained in:
dj
2025-08-01 22:50:59 +08:00
parent 9560a964e7
commit 1ad6e021a1

View File

@@ -75,8 +75,8 @@ const schame = computed(() => {
},
{
label: '归属部门',
prop: 'departmentId',
component: 'el-tree-select',
prop:!authStore.roles.includes('superAdmin') ?'departmentName': 'departmentId',
component: !authStore.roles.includes('superAdmin') ?'el-input':'el-tree-select',
props: {
placeholder: '请选择',
clearable: true,
@@ -247,6 +247,7 @@ const init = async () => {
getJobOpt()
]
const resAll = await Promise.all(reqList)
console.log('resAll',resAll)
localData.departmentIdOpt = resAll[0].data
localData.subCompanyIdOpt = resAll[1].data
localData.roleOpt = resAll[2].data
@@ -257,10 +258,11 @@ const getInfo = async () => {
if (!route.query.id) return
// 获取详情数据
const {data} = await getUserDetail(route.query.id)
if (data.subCompanyId) {
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
localData.departmentIdOpt = res.data
}
// if (data.subCompanyId) {
// const res = await getDeptOpt({subCompanyId: data.subCompanyId})
// console.log('getInfo',res)
// localData.departmentIdOpt = res.data
// }
nextTick(() => {
form.value.setValues(data)
currentRoleArray.value = form.value.getValues().roleIds