下拉框回显

This commit is contained in:
‘huanghaiixia’
2026-03-02 14:41:03 +08:00
parent 594d9ebd11
commit d4d18129d2
19 changed files with 93 additions and 67 deletions

View File

@ -240,8 +240,8 @@
}
}
const getCompDeptInfo = async (id)=> {
const res = await getCompDept(id)
const getCompDeptInfo = async (id, deptId)=> {
const res = await getCompDept(id, deptId)
formState.bDeptName = res?.dept?.name
formState.bDeptId = res?.dept?.id
@ -254,10 +254,10 @@
const onSearchUser = (val)=> {
openModal(true,{isUpdate: false})
}
const handleSuccess = (val) => {
const handleSuccess = (val, deptId) => {
formState.empName = val[0].name
formState.empId = val[0].id
getCompDeptInfo(formState.empId)
getCompDeptInfo(formState.empId, deptId)
}
const handleSuccessDept = (val, info) => {
formState.bDeptName = val[0].name