|
|
@ -37,6 +37,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); |
|
|
|
var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); |
|
|
|
var name = this._getNodeValue(treeNode); |
|
|
|
var name = this._getNodeValue(treeNode); |
|
|
|
|
|
|
|
this.fireEvent(BI.PartTree.EVENT_CLICK_TREE_NODE); |
|
|
|
if (treeNode.checked === true) { |
|
|
|
if (treeNode.checked === true) { |
|
|
|
this.options.paras.selectedValues = this._getUnionValue(); |
|
|
|
this.options.paras.selectedValues = this._getUnionValue(); |
|
|
|
// this._buildTree(self.options.paras.selectedValues, BI.concat(parentValues, name));
|
|
|
|
// this._buildTree(self.options.paras.selectedValues, BI.concat(parentValues, name));
|
|
|
@ -80,7 +81,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
var rootNoots = this.nodes.getNodes(); |
|
|
|
var rootNoots = this.nodes.getNodes(); |
|
|
|
track(rootNoots); |
|
|
|
track(rootNoots); |
|
|
|
|
|
|
|
|
|
|
|
function track (nodes) { |
|
|
|
function track(nodes) { |
|
|
|
BI.each(nodes, function (i, node) { |
|
|
|
BI.each(nodes, function (i, node) { |
|
|
|
var checkState = node.getCheckStatus(); |
|
|
|
var checkState = node.getCheckStatus(); |
|
|
|
if (checkState.checked === false) { |
|
|
|
if (checkState.checked === false) { |
|
|
@ -135,7 +136,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
self.fireEvent(BI.Events.AFTERINIT); |
|
|
|
self.fireEvent(BI.Events.AFTERINIT); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function callback (nodes) { |
|
|
|
function callback(nodes) { |
|
|
|
if (self._stop === true) { |
|
|
|
if (self._stop === true) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -171,7 +172,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
track([], valueA, valueB); |
|
|
|
track([], valueA, valueB); |
|
|
|
track([], valueB, valueA); |
|
|
|
track([], valueB, valueA); |
|
|
|
|
|
|
|
|
|
|
|
function track (parent, node, compare) { |
|
|
|
function track(parent, node, compare) { |
|
|
|
BI.each(node, function (n, item) { |
|
|
|
BI.each(node, function (n, item) { |
|
|
|
if (BI.isNull(compare[n])) { |
|
|
|
if (BI.isNull(compare[n])) { |
|
|
|
self._addTreeNode(map, parent, n, item); |
|
|
|
self._addTreeNode(map, parent, n, item); |
|
|
@ -197,4 +198,5 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.PartTree.EVENT_CLICK_TREE_NODE = "EVENT_CLICK_TREE_NODE"; |
|
|
|
BI.shortcut("bi.part_tree", BI.PartTree); |
|
|
|
BI.shortcut("bi.part_tree", BI.PartTree); |
|
|
|