mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
fix: 人员选择组件无法加载子部门人员 (#3219)
This commit is contained in:
parent
ecc544e692
commit
5bbf83ac4b
@ -712,6 +712,21 @@ export const FormItemStore = StoreNode.named('FormItemStore')
|
||||
data
|
||||
);
|
||||
|
||||
// 插入新的子节点,用于之后BaseSelection.resolveSelected查找
|
||||
if (Array.isArray(self.options[0].children)) {
|
||||
const children = self.options[0].children.concat();
|
||||
|
||||
flattenTree(self.options[0].leftOptions).forEach(item => {
|
||||
if (
|
||||
!findTree(self.options[0].children, node => node.ref === item.value)
|
||||
) {
|
||||
children.push({ref: item.value, defer: true});
|
||||
}
|
||||
});
|
||||
|
||||
setOptions([{...self.options[0], children}], undefined, data);
|
||||
}
|
||||
|
||||
return json;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user