|
|
|
@ -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); |
|
|
|
|