代码优化,避免【部门】移动节点时出现PID数据环形问题
This commit is contained in:
@@ -8,10 +8,11 @@ export function getDepts(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeptSuperior(ids) {
|
||||
export function getDeptSuperior(ids, exclude) {
|
||||
exclude = exclude !== undefined ? exclude : false
|
||||
const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
|
||||
return request({
|
||||
url: 'api/dept/superior',
|
||||
url: 'api/dept/superior?exclude=' + exclude,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
}
|
||||
},
|
||||
getSupDepts(id) {
|
||||
crudDept.getDeptSuperior(id).then(res => {
|
||||
crudDept.getDeptSuperior(id, true).then(res => {
|
||||
const data = res.content
|
||||
this.buildDepts(data)
|
||||
this.depts = data
|
||||
|
||||
Reference in New Issue
Block a user