Browse Source

REPORT-95320 fix: 【冒烟】【权限管理】权限复用页面搜索并选中部门后,取消搜索后查看实际未选中

es6
zsmj 2 years ago
parent
commit
91ca48b4b6
  1. 24
      packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js

24
packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js

@ -379,13 +379,7 @@ export class AbstractTreeValueChooser extends Widget {
result.push([k]); result.push([k]);
}); });
dealWithSelectedValues(selectedValues, []); const isAllSelected = (selected, parents) => isEmpty(selected) || this._getChildCount(parents) === size(selected);
const jo = {};
each(result, (i, strs) => {
this._buildTree(jo, strs);
});
callback(jo);
function dealWithSelectedValues(selected, parents) { function dealWithSelectedValues(selected, parents) {
if (selected == null || isEmpty(selected)) { if (selected == null || isEmpty(selected)) {
@ -408,7 +402,15 @@ export class AbstractTreeValueChooser extends Widget {
return can && isAllSelected(selected, parents); return can && isAllSelected(selected, parents);
} }
const isAllSelected = (selected, parents) => isEmpty(selected) || this._getChildCount(parents) === size(selected); dealWithSelectedValues(selectedValues, []);
const jo = {};
each(result, (i, strs) => {
this._buildTree(jo, strs);
});
callback(jo);
} }
_reqInitTreeNode(op, callback) { _reqInitTreeNode(op, callback) {
@ -469,7 +471,7 @@ export class AbstractTreeValueChooser extends Widget {
} }
return output; return output;
}; }
function nodeSearch(deep, parentValues, current, isAllSelect, result) { function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(parentValues, current, keyword)) { if (self._isMatch(parentValues, current, keyword)) {
@ -512,7 +514,7 @@ export class AbstractTreeValueChooser extends Widget {
} }
return [can, checked]; return [can, checked];
}; }
function createOneJson(parentValues, value, isOpen, checked, half, flag, result) { function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {
const node = self._getTreeNode(parentValues, value); const node = self._getTreeNode(parentValues, value);
@ -529,7 +531,7 @@ export class AbstractTreeValueChooser extends Widget {
flag, flag,
disabled: node.disabled, disabled: node.disabled,
}); });
}; }
function isHalf(parentValues, value) { function isHalf(parentValues, value) {
const find = findSelectedObj(parentValues); const find = findSelectedObj(parentValues);

Loading…
Cancel
Save