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

Loading…
Cancel
Save