|
|
|
@ -16,6 +16,12 @@ export class PartTree extends AsyncTree {
|
|
|
|
|
|
|
|
|
|
static EVENT_CLICK_TREE_NODE = "EVENT_CLICK_TREE_NODE"; |
|
|
|
|
|
|
|
|
|
_defaultConfig() { |
|
|
|
|
return extend(super._defaultConfig(...arguments), { |
|
|
|
|
isSelectedAny: true, //是否返回所有被checked的结点(包括被checked的结点的子结点)
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
constructor(...args) { |
|
|
|
|
super(...args); |
|
|
|
|
this.seMethos = super._selectTreeNode; |
|
|
|
@ -55,8 +61,11 @@ export class PartTree extends AsyncTree {
|
|
|
|
|
const name = this._getNodeValue(treeNode); |
|
|
|
|
this.fireEvent(PartTree.EVENT_CLICK_TREE_NODE); |
|
|
|
|
if (treeNode.checked === true) { |
|
|
|
|
this.options.paras.selectedValues = this._getUnionValue(); |
|
|
|
|
// this._buildTree(self.options.paras.selectedValues, concat(parentValues, name));
|
|
|
|
|
if (this.options.isSelectedAny) { |
|
|
|
|
this.options.paras.selectedValues = this._getUnionValue(); //获取所有被selected的结点
|
|
|
|
|
} else { |
|
|
|
|
this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});//给selectedValues增加被click的结点(不包含该节点的子结点)
|
|
|
|
|
} |
|
|
|
|
o.itemsCreator( |
|
|
|
|
extend({}, o.paras, { |
|
|
|
|
type: TreeView.REQ_TYPE_ADJUST_DATA, |
|
|
|
|