diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.js b/src/component/treevaluechooser/abstract.treevaluechooser.js index db31a1500..53e31298f 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -532,7 +532,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var checkState = op.checkState || {}; var parentValues = op.parentValues || []; var selectedValues = op.selectedValues || {}; - function getResult(parentValues) { + function getResult(parentValues, checkState) { var valueMap = {}; // if (judgeState(parentValues, selectedValues, checkState)) { valueMap = dealWithSelectedValue(parentValues, selectedValues); @@ -557,12 +557,12 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { warningTitle: nodes[i].warningTitle, }); if (openState) { - getResult(parentValues.concat([nodes[i].value])); + getResult(parentValues.concat([nodes[i].value]), {checked: state[0], half: state[1]}); } } } - getResult(parentValues); + getResult(parentValues, checkState); // 如果指定节点全部打开 // if (o.open) { diff --git a/src/component/treevaluechooser/pane.treevaluechooser.js b/src/component/treevaluechooser/pane.treevaluechooser.js index e6fc4f07a..66486711a 100644 --- a/src/component/treevaluechooser/pane.treevaluechooser.js +++ b/src/component/treevaluechooser/pane.treevaluechooser.js @@ -29,6 +29,9 @@ BI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, { this.pane.on(BI.MultiSelectTree.EVENT_CHANGE, function () { self.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE); }); + if (BI.isNotNull(o.value)) { + this.pane.setSelectedValue(o.value); + } if (BI.isNotNull(o.items)) { this._initData(o.items); this.pane.populate();