diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.js b/src/component/treevaluechooser/abstract.treevaluechooser.js index 6288cc4dc..90c63c25e 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -556,6 +556,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { BI.each(nodes, function (idx, node) { allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value]))); }); + var lastFind; BI.each(allNodes, function (idx, node) { var valueMap = dealWithSelectedValue(node.parentValues, selectedValues); // REPORT-24409 fix: 设置节点全部展开,添加的节点没有给状态 @@ -566,7 +567,13 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { if (find) { parentCheckState.checked = find.halfCheck ? false : find.checked; parentCheckState.half = find.halfCheck; + // 默认展开也需要重置父节点的halfCheck + if (BI.isNotNull(lastFind) && (lastFind !== find || allNodes.length - 1 === idx)) { + lastFind.half = lastFind.halfCheck; + lastFind.halfCheck = false; + } } + lastFind = find; var state = getCheckState(node.value, node.parentValues, valueMap, parentCheckState); result.push({ id: node.id, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index f47b3f84b..2b6e25282 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -25,7 +25,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { this._initData(o.items); } this.combo = BI.createWidget({ - type: "bi.multi_tree_list_combo", + type: "bi.multi_tree_combo", simple: o.simple, text: o.text, allowEdit: o.allowEdit,