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