refactor: 移除不必要的部门接口
This commit is contained in:
@@ -9,14 +9,6 @@ export function listDept(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询部门列表(排除当前自身节点)
|
||||
export function listDeptExcludeItself(deptId) {
|
||||
return request({
|
||||
url: `/system/dept/list/exclude/${deptId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询部门详细
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
|
||||
@@ -230,8 +230,12 @@ function toggleExpandAll() {
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
deptApi.listDeptExcludeItself(row.deptId).then((response) => {
|
||||
deptOptions.value = proxy.handleTree(response, 'deptId');
|
||||
deptApi.listDept(row.deptId).then((response) => {
|
||||
const deptListExcludeItSelf = response.filter((dept) => {
|
||||
return dept.deptId !== row.deptId;
|
||||
});
|
||||
|
||||
deptOptions.value = proxy.handleTree(deptListExcludeItSelf, 'deptId');
|
||||
});
|
||||
deptApi.getDept(row.deptId).then((response) => {
|
||||
form.value = response;
|
||||
|
||||
Reference in New Issue
Block a user