Browse Source

无JIRA任务,isParent 用 parent

master
Dailer 6 years ago
parent
commit
50eca83418
  1. 10
      demo/config.js
  2. 2
      src/case/tree/tree.level.js
  3. 3
      src/case/tree/ztree/tree.display.js
  4. 2
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  5. 2
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  6. 2
      src/widget/selecttree/selecttree.popup.js

10
demo/config.js

@ -1524,13 +1524,19 @@ Demo.CONSTANTS = {
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 12111, pId: 1211, value: "第五级文件1", text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"},
{
id: 12111,
pId: 1211,
value: "第五级文件1",
text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},
{id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"},
{id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"},
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"}],
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"},
{id: 3, pId: -1, value: "第一级目录3", text: "第一级目录3", isParent: true}],
LEVELTREE: [{
id: 1,
text: "第一项",

2
src/case/tree/tree.level.js

@ -31,7 +31,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID();
}
extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node";

3
src/case/tree/ztree/tree.display.js

@ -38,7 +38,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
}
};
function beforeCollapse (treeId, treeNode) {
function beforeCollapse(treeId, treeNode) {
return false;
}
@ -49,6 +49,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";

2
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -30,7 +30,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID();
}
extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node";

2
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -30,7 +30,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID();
}
extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node";

2
src/widget/selecttree/selecttree.popup.js

@ -20,7 +20,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer};
node.id = node.id || BI.UUID();
extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node";

Loading…
Cancel
Save