1.0.95 部门查询用户优化

dev
yinq 3 months ago
parent 831018f476
commit a2b2a77789

@ -235,9 +235,11 @@ async function getDeptAllUser(deptId: any) {
}
/** 查询所有用户 */
async function getAllUser() {
const res = await listUserByDeptId(100);
allUserList.value = res.data || [];
async function getAllUser(deptId: any) {
if (deptId !== null && deptId !== '' && deptId !== undefined) {
const res = await listUserByDeptId(deptId);
allUserList.value = res.data || [];
}
}
/** 取消按钮 */
@ -287,7 +289,7 @@ const handleAdd = async (row?: DeptVO) => {
getDeptAllUser(row.deptId);
}
//
getAllUser();
getAllUser(row.deptId);
dialog.visible = true;
dialog.title = '添加部门';
}
@ -299,7 +301,7 @@ const handleUpdate = async (row: DeptVO) => {
//
getDeptAllUser(row.deptId);
//
getAllUser();
getAllUser(row.deptId);
const res = await getDept(row.deptId);
form.value = res.data;
const response = await listDeptExcludeChild(row.deptId);

Loading…
Cancel
Save