Commit f00d3252 authored by xxx's avatar xxx

修改人员信息中部门显示unknown问题

parent 100f3e45
...@@ -197,17 +197,23 @@ export default { ...@@ -197,17 +197,23 @@ export default {
loadOptions({ action, parentNode, callback }) { loadOptions({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) { if (action === LOAD_CHILDREN_OPTIONS) {
HttpReq.truckDispatching.getAllDepartmentQuery({enabled: true, pid: parentNode.id}).then(response => { HttpReq.truckDispatching.getAllDepartmentQuery({enabled: true, pid: parentNode.id}).then(response => {
let arr = []; let arr = [];
for(let index of response.content){ for(let index of response.content){
let chiledModeInfo = {} ; let chiledModeInfo = {};
chiledModeInfo.id = index.id chiledModeInfo.id = index.id;
chiledModeInfo.label = index.name; chiledModeInfo.label = index.name;
chiledModeInfo.children = null; arr.push(chiledModeInfo);
arr.push(chiledModeInfo);
} }
parentNode.children = arr; parentNode.children = response.content.map(function(obj) {
if(obj.hasChildren) {
obj.children = null;
}
return obj
})
}); });
callback(); setTimeout(() => {
callback()
}, 200)
} }
}, },
loadData() { loadData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment