|
|
@ -17009,7 +17009,7 @@ BI.YearQuarterCombo = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.YearQuarterCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
BI.YearQuarterCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
BI.shortcut('bi.year_quarter_combo', BI.YearQuarterCombo);/** |
|
|
|
BI.shortcut('bi.year_quarter_combo', BI.YearQuarterCombo);/** |
|
|
|
* 简单的复选下拉框控件, 适用于数据量少的情况 |
|
|
|
* 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 |
|
|
|
* 封装了字段处理逻辑 |
|
|
|
* 封装了字段处理逻辑 |
|
|
|
* |
|
|
|
* |
|
|
|
* Created by GUY on 2015/10/29. |
|
|
|
* Created by GUY on 2015/10/29. |
|
|
@ -17088,13 +17088,13 @@ BI.AllValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
return !filter[ob.value]; |
|
|
|
return !filter[ob.value]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) { |
|
|
|
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { |
|
|
|
callback({ |
|
|
|
callback({ |
|
|
|
items: items |
|
|
|
items: items |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { |
|
|
|
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { |
|
|
|
callback({count: items.length}); |
|
|
|
callback({count: items.length}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -17233,24 +17233,23 @@ BI.TreeValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doCheck(0, [], selectedValues); |
|
|
|
doCheck(0, [], this.tree.getRoot(), selectedValues); |
|
|
|
|
|
|
|
|
|
|
|
callback({ |
|
|
|
callback({ |
|
|
|
items: result |
|
|
|
items: result |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function doCheck(floor, parentValues, selected) { |
|
|
|
function doCheck(floor, parentValues, node, selected) { |
|
|
|
if (floor >= self.floors) { |
|
|
|
if (floor >= self.floors) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (selected == null || BI.isEmpty(selected)) { |
|
|
|
if (selected == null || BI.isEmpty(selected)) { |
|
|
|
var children = self._getChildren(parentValues); |
|
|
|
BI.each(node.getChildren(), function (i, child) { |
|
|
|
BI.each(children, function (i, child) { |
|
|
|
|
|
|
|
var newParents = BI.clone(parentValues); |
|
|
|
var newParents = BI.clone(parentValues); |
|
|
|
newParents.push(child.value); |
|
|
|
newParents.push(child.value); |
|
|
|
var llen = self._getChildCount(newParents); |
|
|
|
var llen = self._getChildCount(newParents); |
|
|
|
createOneJson(child, llen); |
|
|
|
createOneJson(child, node.id, llen); |
|
|
|
doCheck(floor + 1, newParents, {}); |
|
|
|
doCheck(floor + 1, newParents, child, {}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -17258,8 +17257,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
var node = self._getNode(k); |
|
|
|
var node = self._getNode(k); |
|
|
|
var newParents = BI.clone(parentValues); |
|
|
|
var newParents = BI.clone(parentValues); |
|
|
|
newParents.push(node.value); |
|
|
|
newParents.push(node.value); |
|
|
|
createOneJson(node, getCount(selected[k], newParents)); |
|
|
|
createOneJson(node, BI.last(parentValues), getCount(selected[k], newParents)); |
|
|
|
doCheck(floor + 1, newParents, selected[k]); |
|
|
|
doCheck(floor + 1, newParents, node, selected[k]); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -17274,10 +17273,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
return BI.size(jo); |
|
|
|
return BI.size(jo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function createOneJson(node, llen) { |
|
|
|
function createOneJson(node, pId, llen) { |
|
|
|
result.push({ |
|
|
|
result.push({ |
|
|
|
id: node.id, |
|
|
|
id: node.id, |
|
|
|
pId: node.pId, |
|
|
|
pId: pId, |
|
|
|
text: node.text + (llen > 0 ? ("(" + BI.i18nText("BI-Basic_Altogether") + llen + BI.i18nText("BI-Basic_Count") + ")") : ""), |
|
|
|
text: node.text + (llen > 0 ? ("(" + BI.i18nText("BI-Basic_Altogether") + llen + BI.i18nText("BI-Basic_Count") + ")") : ""), |
|
|
|
value: node.value, |
|
|
|
value: node.value, |
|
|
|
open: true |
|
|
|
open: true |
|
|
@ -17659,7 +17658,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
if (valueMap[current][0] === 1) { |
|
|
|
if (valueMap[current][0] === 1) { |
|
|
|
var values = BI.clone(parentValues); |
|
|
|
var values = BI.clone(parentValues); |
|
|
|
values.push(current); |
|
|
|
values.push(current); |
|
|
|
if (hasChild && self._getChildCount(values) != valueMap[current][1]) { |
|
|
|
if (hasChild && self._getChildCount(values) !== valueMap[current][1]) { |
|
|
|
halfCheck = true; |
|
|
|
halfCheck = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (valueMap[current][0] === 2) { |
|
|
|
} else if (valueMap[current][0] === 2) { |
|
|
@ -17815,13 +17814,13 @@ BI.ValueChooserCombo = BI.inherit(BI.Widget, { |
|
|
|
return !filter[ob.value]; |
|
|
|
return !filter[ob.value]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) { |
|
|
|
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { |
|
|
|
callback({ |
|
|
|
callback({ |
|
|
|
items: items |
|
|
|
items: items |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { |
|
|
|
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { |
|
|
|
callback({count: items.length}); |
|
|
|
callback({count: items.length}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|