@ -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 ,