Browse Source

update

master
Urthur 7 years ago
parent
commit
7e77bb9b44
  1. 13
      bi/case.js
  2. 8
      bi/core.css
  3. 184
      bi/polyfill.js
  4. 16149
      bi/widget.js
  5. 17
      demo/config.js
  6. 3
      demo/css/main.css
  7. 2
      demo/js/config/base.js
  8. 2
      demo/js/config/case.js
  9. 257
      demo/js/config/widget.js
  10. 121
      demo/js/widget/arrangment/demo.adaptive_arrangement.js
  11. 0
      demo/js/widget/arrangment/demo.interactive_arrangement.js
  12. 31
      demo/js/widget/combo/demo.formula_combo.js
  13. 38
      demo/js/widget/combo/demo.icon_combo.js
  14. 45
      demo/js/widget/combo/demo.static_combo.js
  15. 60
      demo/js/widget/combo/demo.text_value_combo.js
  16. 57
      demo/js/widget/combo/demo.text_value_down_list_combo.js
  17. 32
      demo/js/widget/combo/demo.text_vlaue_check_combo.js
  18. 31
      demo/js/widget/date/demo.date.js
  19. 39
      demo/js/widget/date/demo.datepane.js
  20. 27
      demo/js/widget/dialog/demo.dialog.js
  21. 136
      demo/js/widget/downlist/demo.downlist.js
  22. 46
      demo/js/widget/editor/demo.adapt_editor.js
  23. 22
      demo/js/widget/editor/demo.clear_editor.js
  24. 22
      demo/js/widget/editor/demo.record_editor.js
  25. 29
      demo/js/widget/editor/demo.search_editor.js
  26. 41
      demo/js/widget/editor/demo.shelter_editor.js
  27. 24
      demo/js/widget/editor/demo.sign_editor.js
  28. 24
      demo/js/widget/editor/demo.sign_initial_editor.js
  29. 22
      demo/js/widget/editor/demo.sign_style_editor.js
  30. 24
      demo/js/widget/editor/demo.state_editor.js
  31. 28
      demo/js/widget/editor/demo.text_editor.js
  32. 20
      demo/js/widget/month/demo.month.js
  33. 6
      demo/js/widget/multiselect/demo.multi_select_combo.js
  34. 41
      demo/js/widget/multitree/demo.multi_tree_combo.js
  35. 44
      demo/js/widget/numericalinterval/demo.numerical_interval.js
  36. 77
      demo/js/widget/pathchooser/demo.directionpathchooser.js
  37. 0
      demo/js/widget/pathchooser/demo.pathchooser.js
  38. 20
      demo/js/widget/quarter/demo.quarter.js
  39. 0
      demo/js/widget/relationview/demo.relationview.js
  40. 35
      demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js
  41. 182
      demo/js/widget/selecttree/demo.select_tree_combo.js
  42. 35
      demo/js/widget/singletree/demo.multilayer_single_tree_combo.js
  43. 181
      demo/js/widget/singletree/demo.single_tree_combo.js
  44. 40
      demo/js/widget/table/demo.excel_table.js
  45. 33
      demo/js/widget/timeinterval/demo.time_interval.js
  46. 66
      demo/js/widget/tree/demo.multilayer_select_tree_combo.js
  47. 24
      demo/js/widget/tree/demo.switch_tree.js
  48. 19
      demo/js/widget/year/demo.year.js
  49. 32
      demo/js/widget/yearmonth/demo.year_month_combo.js
  50. 33
      demo/js/widget/yearquarter/demo.year_quarter_combo.js
  51. 7
      demo/less/main.less
  52. 13
      docs/case.js
  53. 8
      docs/core.css
  54. 3
      docs/demo.css
  55. 2923
      docs/demo.js
  56. BIN
      docs/icon/arrow left right.png
  57. BIN
      docs/icon/radio.png
  58. BIN
      docs/icon/slider.png
  59. BIN
      docs/icon/双向箭头.png
  60. 46
      docs/index.html
  61. 184
      docs/polyfill.js
  62. 832
      docs/widget.css
  63. 16149
      docs/widget.js
  64. 1776
      package-lock.json
  65. 13
      src/case/tree/tree.display.js
  66. 11
      src/component/treevaluechooser/abstract.treevaluechooser.js
  67. 8
      src/css/core/utils/common.css
  68. 8
      src/less/core/utils/common.less
  69. 2
      src/less/resource/icon.less
  70. 17
      src/widget/multiselect/multiselect.combo.js

13
bi/case.js

@ -12033,6 +12033,19 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
return setting; return setting;
}, },
_dealWidthNodes: function (nodes) {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
} else {
node.text = node.value;
}
});
return nodes;
},
initTree: function (nodes, setting) { initTree: function (nodes, setting) {
var setting = setting || this._configSetting(); var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);

8
bi/core.css

@ -3900,7 +3900,7 @@ i {
.bi-list-item-none:hover, .bi-list-item-none:hover,
.bi-list-item-none.hover { .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:hover .bi-input, .bi-list-item-none:hover .bi-input,
.bi-list-item-none.hover .bi-input { .bi-list-item-none.hover .bi-input {
@ -3913,7 +3913,7 @@ i {
.bi-list-item-none:active, .bi-list-item-none:active,
.bi-list-item-none.active { .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:active .bi-input, .bi-list-item-none:active .bi-input,
.bi-list-item-none.active .bi-input { .bi-list-item-none.active .bi-input {
@ -3951,7 +3951,7 @@ i {
.bi-theme-dark .bi-list-item-none:hover, .bi-theme-dark .bi-list-item-none:hover,
.bi-theme-dark .bi-list-item-none.hover { .bi-theme-dark .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:hover .bi-input, .bi-theme-dark .bi-list-item-none:hover .bi-input,
.bi-theme-dark .bi-list-item-none.hover .bi-input { .bi-theme-dark .bi-list-item-none.hover .bi-input {
@ -3964,7 +3964,7 @@ i {
.bi-theme-dark .bi-list-item-none:active, .bi-theme-dark .bi-list-item-none:active,
.bi-theme-dark .bi-list-item-none.active { .bi-theme-dark .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:active .bi-input, .bi-theme-dark .bi-list-item-none:active .bi-input,
.bi-theme-dark .bi-list-item-none.active .bi-input { .bi-theme-dark .bi-list-item-none.active .bi-input {

184
bi/polyfill.js

@ -1,93 +1,93 @@
if(![].indexOf){ if(![].indexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.indexOf = function (o) { Array.prototype.indexOf = function (o) {
for (var i = 0, len = this.length; i < len; i++) { for (var i = 0, len = this.length; i < len; i++) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
} }
if(![].lastIndexOf){ if(![].lastIndexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* ie67不支持数组的这个方法 * ie67不支持数组的这个方法
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.lastIndexOf = function (o) { Array.prototype.lastIndexOf = function (o) {
for (var len = this.length, i = len - 1; i >= 0; i--) { for (var len = this.length, i = len - 1; i >= 0; i--) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
}/** }/**
* 特殊情况 * 特殊情况
* Created by wang on 15/6/23. * Created by wang on 15/6/23.
*/ */
//解决console未定义问题 guy //解决console未定义问题 guy
window.console = window.console || (function () { window.console = window.console || (function () {
var c = {}; var c = {};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
= c.clear = c.exception = c.trace = c.assert = function () { = c.clear = c.exception = c.trace = c.assert = function () {
}; };
return c; return c;
})(); })();
/* /*
* 前端缓存 * 前端缓存
*/ */
window.localStorage || (window.localStorage = { window.localStorage || (window.localStorage = {
items: {}, items: {},
setItem: function (k, v) { setItem: function (k, v) {
BI.Cache.addCookie(k, v); BI.Cache.addCookie(k, v);
}, },
getItem: function (k) { getItem: function (k) {
return BI.Cache.getCookie(k); return BI.Cache.getCookie(k);
}, },
removeItem: function (k) { removeItem: function (k) {
BI.Cache.deleteCookie(k); BI.Cache.deleteCookie(k);
}, },
key: function () { key: function () {
}, },
clear: function () { clear: function () {
this.items = {}; this.items = {};
} }
});//修复ie9下sort方法的bug });//修复ie9下sort方法的bug
!function (window) { !function (window) {
var ua = window.navigator.userAgent.toLowerCase(), var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/; reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) { if (reg.test(ua)) {
var _sort = Array.prototype.sort; var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) { Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') { if (!!fn && typeof fn === 'function') {
if (this.length < 2) { if (this.length < 2) {
return this; return this;
} }
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) { for (; i < l; i++) {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]); t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t : r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0; !!t ? 1 : 0) > 0;
if (r === true) { if (r === true) {
tmp = this[i]; tmp = this[i];
this[i] = this[j]; this[i] = this[j];
this[j] = tmp; this[j] = tmp;
} }
} }
} }
return this; return this;
} else { } else {
return _sort.call(this); return _sort.call(this);
} }
}; };
} }
}(window); }(window);

16149
bi/widget.js

File diff suppressed because it is too large Load Diff

17
demo/config.js

File diff suppressed because one or more lines are too long

3
demo/css/main.css

@ -45,3 +45,6 @@ body {
.bi-theme-dark body { .bi-theme-dark body {
background-color: #191B2B; background-color: #191B2B;
} }
.demo-editor {
border: 1px solid #cccccc;
}

2
demo/js/config/base.js

@ -1,7 +1,7 @@
Demo.BASE_CONFIG = [{ Demo.BASE_CONFIG = [{
id: 2, id: 2,
text: "基础控件", text: "基础控件",
open: true open: false
}, { }, {
pId: 2, pId: 2,
text: "bi.label", text: "bi.label",

2
demo/js/config/case.js

@ -1,7 +1,7 @@
Demo.CASE_CONFIG = [{ Demo.CASE_CONFIG = [{
id: 3, id: 3,
text: "实例控件", text: "实例控件",
open: true, open: false
}, { }, {
pId: 3, pId: 3,
id: 301, id: 301,

257
demo/js/config/widget.js

@ -1,4 +1,5 @@
Demo.WIDGET_CONFIG = [{ Demo.WIDGET_CONFIG = [{
<<<<<<< HEAD
id: 4, id: 4,
text: "详细控件" text: "详细控件"
}, { }, {
@ -49,4 +50,258 @@ Demo.WIDGET_CONFIG = [{
pId: 4, pId: 4,
text: "bi.custom_date_time", text: "bi.custom_date_time",
value: "demo.custom_date_time" value: "demo.custom_date_time"
}]; }];
=======
id: 4,
text: "详细控件",
open: true
}, {
id: 400,
pId: 4,
text: "tree"
}, {
pId: 400,
text: "bi.multi_tree_combo",
value: "demo.multi_tree_combo"
}, {
id: 401,
pId: 4,
text: "table"
}, {
pId: 401,
text: "bi.preview_table",
value: "demo.preview_table"
}, {
pId: 401,
text: "bi.responsive_table",
value: "demo.responsive_table"
}, {
pId: 401,
text: "bi.excel_table",
value: "demo.excel_table"
}, {
pId: 4,
id: 402,
text: "年份控件",
open: false
}, {
pId: 402,
text: "bi.year_combo",
value: "demo.year"
}, {
pId: 4,
id: 403,
text: "月份控件",
open: false
}, {
pId: 403,
text: "bi.month_combo",
value: "demo.month"
}, {
pId: 4,
id: 404,
text: "季度控件",
open: false
}, {
pId: 404,
text: "bi.quarter_combo",
value: "demo.quarter"
}, {
pId: 4,
id: 405,
text: "下拉列表",
open: false
}, {
pId: 405,
text: "bi.down_list_combo",
value: "demo.down_list"
}, {
pId: 4,
id: 406,
text: "文本框控件",
open: false
}, {
pId: 406,
text: "bi.text_editor",
value: "demo.text_editor"
}, {
pId: 406,
text: "bi.search_editor",
value: "demo.search_editor"
}, {
pId: 406,
text: "bi.sign_editor",
value: "demo.sign_editor"
}, {
pId: 406,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, {
pId: 406,
text: "bi.sign_style_editor",
value: "demo.sign_style_editor"
}, {
pId: 406,
text: "bi.state_editor",
value: "demo.state_editor"
}, {
pId: 406,
text: "bi.clear_editor",
value: "demo.clear_editor"
}, {
pId: 406,
text: "bi.record_editor",
value: "demo.record_editor"
}, {
pId: 406,
text: "bi.shelter_editor",
value: "demo.shelter_editor"
},
{
pId: 4,
id: 407,
text: "下拉框控件",
open: false
}, {
pId: 407,
text: "bi.text_value_combo",
value: "demo.text_value_combo"
}, {
pId: 407,
text: "bi.text_value_check_combo",
value: "demo.text_value_check_combo"
}, {
pId: 407,
text: "bi.text_value_down_list_combo",
value: "demo.text_value_down_list_combo"
}, {
pId: 407,
text: "bi.static_combo",
value: "demo.static_combo"
}, {
pId: 407,
text: "bi.icon_combo",
value: "demo.icon_combo"
}, {
pId: 407,
text: "bi.formula_combo",
value: "demo.formula_combo"
}, {
pId: 4,
id: 408,
text: "选择字段列表",
open: false
}, {
pId: 408,
text: "bi.placeholder"
}, {
pId: 4,
id: 409,
text: "公式编辑器",
open: false
}, {
pId: 409,
text: "bi.placeholder"
}, {
pId: 4,
id: 410,
text: "数值区间控件"
}, {
pId: 410,
text: "bi.numerical_interval",
value: "demo.numberical_interval"
}, {
pId: 4,
id: 411,
text: "下拉复选框有确定按钮"
}, {
pId: 411,
text: "bi.multi_select_combo",
value: "demo.multi_select_combo"
}, {
pId: 4,
id: 412,
text: "简单日期控件"
}, {
pId: 412,
text: "bi.date_combo",
value: "demo.date"
}, {
pId: 412,
text: "bi.date_pane_widget",
value: "demo.date_pane_widget"
}, {
pId: 412,
text: "bi.year_month_combo",
value: "demo.year_month_combo"
},{
pId: 412,
text: "bi.year_quarter_combo",
value: "demo.year_quarter_combo"
},{
pId: 4,
id: 413,
text: "简单下拉树"
}, {
pId: 413,
text: "bi.single_tree_combo",
value: "demo.single_tree_combo"
}, {
pId: 413,
text: "bi.multilayer_single_tree_combo",
value: "demo.multilayer_single_tree_combo"
}, {
pId: 4,
id: 414,
text: "可选下拉树"
}, {
pId: 414,
text: "bi.select_tree_combo",
value: "demo.select_tree_combo"
}, {
pId: 414,
text: "bi.multilayer_select_tree_combo",
value: "demo.multilayer_select_tree_combo"
}, {
pId: 4,
id: 415,
text: "路径选择"
}, {
pId: 415,
text: "bi.path_chooser",
value: "demo.path_chooser"
}, {
pId: 415,
text: "bi.direction_path_chooser",
value: "demo.direction_path_chooser"
}, {
pId: 4,
id: 416,
text: "关联视图"
}, {
pId: 416,
text: "bi.relation_view",
value: "demo.relation_view"
}, {
pId: 4,
id: 417,
text: "布局"
}, {
pId: 417,
text: "bi.adaptive_arrangement",
value: "demo.adaptive_arrangement"
}, {
pId: 417,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}, {
pId: 4,
id: 418,
text: "提示对话框"
}, {
pId: 418,
text: "bi.dialog",
value: "demo.dialog"
}
];
>>>>>>> 3903ca444e161ac208f69ba22c0a3136d7a0fa81

121
demo/js/widget/arrangment/demo.adaptive_arrangement.js

@ -0,0 +1,121 @@
Demo.AdaptiveArrangement = BI.inherit(BI.Widget, {
_createItem: function () {
var self = this;
var id = BI.UUID();
var item = BI.createWidget({
type: "bi.text_button",
id: id,
cls: "layout-bg" + BI.random(1, 8),
handler: function () {
self.arrangement.deleteRegion(id);
}
});
item.setValue(item.attr("id"));
return item;
},
render: function () {
var self = this;
this.arrangement = BI.createWidget({
type: "bi.adaptive_arrangement",
layoutType: BI.Arrangement.LAYOUT_TYPE.ADAPTIVE,
cls: "mvc-border",
width: 800,
height: 400,
items: []
});
var drag = BI.createWidget({
type: "bi.label",
cls: "mvc-border",
width: 100,
height: 25,
text: "drag me"
});
// drag.element.draggable &&
drag.element.draggable({
revert: true,
cursorAt: {
left: 0,
top: 0
},
drag: function (e, ui) {
self.arrangement.setPosition({
left: ui.position.left,
top: ui.position.top
}, {
width: 300,
height: 200
})
},
stop: function (e, ui) {
self.arrangement.addRegion({
el: self._createItem()
});
},
helper: function (e) {
var helper = self.arrangement.getHelper();
return helper.element;
}
});
BI.createWidget({
type: "bi.absolute",
items: [{
el: drag,
left: 30,
top: 450
}, {
el: this.arrangement,
left: 30,
top: 30
}, {
el: {
type: "bi.button",
text: "回撤",
height: 25,
handler: function () {
//self.arrangement.revoke();
}
},
left: 130,
top: 450
}, {
el: {
type: "bi.button",
text: "getAllRegions",
height: 25,
handler: function () {
var items = [];
BI.each(self.arrangement.getAllRegions(), function (i, region) {
items.push({
id: region.id,
left: region.left,
top: region.top,
width: region.width,
height: region.height
});
});
BI.Msg.toast(JSON.stringify(items));
}
},
left: 230,
top: 450
}, {
el: {
type: "bi.button",
text: "relayout",
height: 25,
handler: function () {
self.arrangement.relayout();
}
},
left: 330,
top: 450
}]
});
}
});
BI.shortcut("demo.adaptive_arrangement", Demo.AdaptiveArrangement);

0
demo/js/widget/demo.interactivearrangement.js → demo/js/widget/arrangment/demo.interactive_arrangement.js

31
demo/js/widget/combo/demo.formula_combo.js

@ -0,0 +1,31 @@
/**
* Created by Dailer on 2017/7/12.
*/
Demo.FormulaCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.formula_combo",
fieldItems: [{
text: "A",
value: "A",
fieldType: 16
}],
width: 200,
height: 30
}],
vgap: 20
}
}
})
BI.shortcut("demo.formula_combo", Demo.FormulaCombo);

38
demo/js/widget/combo/demo.icon_combo.js

@ -0,0 +1,38 @@
/**
* Created by Dailer on 2017/7/12.
*/
Demo.IconCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_combo",
ref:function(_ref){
self.refs=_ref;
},
// iconClass: "pull-down-ha-font",
items: [{
value: "第一项",
iconClass: "delete-font"
}, {
value: "第二项",
iconClass: "rename-font"
}, {
value: "第三项",
iconClass: "move-font"
}]
}],
vgap: 20
}
}
})
BI.shortcut("demo.icon_combo", Demo.IconCombo);

45
demo/js/widget/combo/demo.static_combo.js

@ -0,0 +1,45 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.StaticCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
beforeMounted: function () {
this.refs.setValue(2);
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.static_combo",
text: "Value 不变",
width: 300,
ref: function (_ref) {
self.refs = _ref;
},
items: [
{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}
]
}],
vgap: 20
}
}
})
BI.shortcut("demo.static_combo", Demo.StaticCombo);

60
demo/js/widget/combo/demo.text_value_combo.js

@ -0,0 +1,60 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextValueCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
},{
type: "bi.text_value_check_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
},{
type: "bi.text_value_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
}],
vgap: 20
}
}
})
BI.shortcut("demo.text_value_combo", Demo.TextValueCombo);

57
demo/js/widget/combo/demo.text_value_down_list_combo.js

@ -0,0 +1,57 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
beforeMounted:function(){
this.refs.setValue(2);
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.label",
cls: "layout-bg2",
text: "分组+二级",
width: 300
}, {
type: "bi.text_value_down_list_combo",
text: "天气热死了",
width: 300,
ref: function (_ref) {
self.refs = _ref;
},
items: [
[{
el: {
text: "MVC-1",
value: 1
},
children: [{
text: "MVC-1-1",
value: 11
}]
}],
[{
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
]
}],
vgap: 20
}
}
})
BI.shortcut("demo.text_value_down_list_combo", Demo.TextValueDownListCombo);

32
demo/js/widget/combo/demo.text_vlaue_check_combo.js

@ -0,0 +1,32 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextValueCheckCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_check_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
}],
vgap: 20
}
}
})
BI.shortcut("demo.text_value_check_combo", Demo.TextValueCheckCombo);

31
demo/js/widget/date/demo.date.js

@ -0,0 +1,31 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.Date = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-date"
},
_init: function () {
Demo.Date.superclass._init.apply(this, arguments);
},
render: function () {
return {
type: "bi.horizontal_auto",
vgap: 10,
items: [{
type: "bi.date_combo",
width: 300
}, {
type: "bi.button",
text: "getVlaue",
height: 50,
width: 300
}]
}
}
})
BI.shortcut("demo.date", Demo.Date);

39
demo/js/widget/date/demo.datepane.js

@ -0,0 +1,39 @@
Demo.DatePane = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-datepane"
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.label",
cls: "layout-bg2",
text: "bi.date_pane_widget"
}, {
type: "bi.date_pane_widget",
selectedTime: {
year: 2017,
month: 12,
day: 11
},
height:300
},
{
type: "bi.button",
text: "getValue",
handler: function () {
BI.Msg.toast("date" + JSON.stringify(datepane.getValue()));
}
}
],
width: "50%"
}]
}
}
})
BI.shortcut("demo.date_pane_widget", Demo.DatePane);

27
demo/js/widget/dialog/demo.dialog.js

@ -0,0 +1,27 @@
Demo.DialogView = BI.inherit(BI.Widget, {
render: function () {
var items = [{
el: {
type: 'bi.button',
text: '弹出对话框',
level: 'common',
height: 30
}
}];
BI.each(items, function (i, item) {
item.el.handler = function () {
BI.Msg.alert('提示', "这是一段可以换行的文字,为了使它换行我要多写几个字,但是我又凑不够这么多的字,万般焦急下,只能随便写写");
}
});
return {
type: "bi.left",
vgap: 200,
hgap: 20,
items: items
}
}
});
BI.shortcut("demo.dialog", Demo.DialogView);

136
demo/js/widget/downlist/demo.downlist.js

@ -0,0 +1,136 @@
Demo.Downlist = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-downlist"
},
mounted: function () {
var downlist = this.downlist;
var label = this.label;
downlist.on(BI.DownListCombo.EVENT_CHANGE, function (value, fatherValue) {
label.setValue(JSON.stringify(downlist.getValue()));
});
this.downlist.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
label.setValue(JSON.stringify(downlist.getValue()));
});
},
render: function () {
self = this;
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.down_list_combo",
ref: function (_ref) {
self.downlist = _ref;
},
cls:"layout-bg3",
height: 30,
width: 100,
items: [
[{
el: {
text: "column 1111",
iconCls1: "check-mark-e-font",
value: 11
},
children: [{
text: "column 1.1",
value: 21,
cls: "dot-e-font",
selected: true
}, {
text: "column 1.222222222222222222222222222222222222",
cls: "dot-e-font",
value: 22,
}]
}],
[{
el: {
type: "bi.icon_text_icon_item",
text: "column 2",
iconCls1: "chart-type-e-font",
cls: "dot-e-font",
value: 12
},
disabled: true,
children: [{
type: "bi.icon_text_item",
cls: "dot-e-font",
height: 25,
text: "column 2.1",
value: 11
}, {
text: "column 2.2",
value: 12,
cls: "dot-e-font"
}]
}],
[{
text: "column 8",
value: 18,
cls: "dot-e-font",
selected: true
},
{
text: "column 9",
cls: "dot-e-font",
value: 19
}
],
[{
text: "column 10",
value: 20,
cls: "dot-e-font",
selected: true
},
{
text: "column 11",
cls: "dot-e-font",
value: 21
},
{
text: "column 12",
cls: "dot-e-font",
value: 22
},
{
text: "column 13",
cls: "dot-e-font",
value: 23
},
{
text: "column 14",
cls: "dot-e-font",
value: 24
},
{
text: "column 15",
cls: "dot-e-font",
value: 23
}
]
]
}, {
type: "bi.label",
text: "显示选择值",
width:500,
cls:"layout-bg4",
ref: function (_ref) {
self.label = _ref;
}
}],
vgap: 20
}
}
})
BI.shortcut("demo.down_list", Demo.Downlist);

46
demo/js/widget/editor/demo.adapt_editor.js

@ -0,0 +1,46 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.AdaptEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
//这东西好奇怪,不支持设置宽度,那么渲染出来宽度几乎没有,无奈之下只能假装给他个默认值了
beforeMounted: function () {
this.refs.setValue("Winter is coming !")
},
render: function () {
var self = this;
var editor = BI.createWidget({
type: "bi.adapt_editor",
cls: "layout-bg5",
ref: function (_ref) {
self.refs = _ref;
}
})
var text=["You know nothing! Jon Snow","A Lannister always pays his debts.","Power is a curious thing."]
return {
type: "bi.horizontal_auto",
items: [{
el: editor
}, {
type: "bi.button",
text: "为了展示长度真的是可变的,每点一下就换一行字",
handler: function () {
var temp=text.shift();
editor.setValue(temp);
text.push(temp);
}
}],
vgap: 20
}
}
})
BI.shortcut("demo.adapt_editor", Demo.AdaptEditor);

22
demo/js/widget/editor/demo.clear_editor.js

@ -0,0 +1,22 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.ClearEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.clear_editor",
cls: "bi-border",
width: 300,
watermark: "这个是带清除按钮的"
}],
vgap: 20
}
}
})
BI.shortcut("demo.clear_editor", Demo.ClearEditor);

22
demo/js/widget/editor/demo.record_editor.js

@ -0,0 +1,22 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.RecordEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.record_editor",
cls: "bi-border",
width: 300,
watermark: "这个是可以记录输入的"
}],
vgap: 20
}
}
})
BI.shortcut("demo.record_editor", Demo.RecordEditor);

29
demo/js/widget/editor/demo.search_editor.js

@ -0,0 +1,29 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SearchEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.search_editor",
width: 300,
watermark:"添加合法性判断",
errorText: "长度必须大于4",
validationChecker:function(){
return this.getValue().length > 4 ? true : false
}
},{
type: "bi.small_search_editor",
width: 300,
watermark:"这个是 small,小一号"
}],
vgap:20
}
}
})
BI.shortcut("demo.search_editor", Demo.SearchEditor);

41
demo/js/widget/editor/demo.shelter_editor.js

@ -0,0 +1,41 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.ClearEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var editor;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.shelter_editor",
cls: "bi-border",
ref:function(_ref){
editor=_ref;
},
width: 300,
watermark: "这个是带标记的"
},{
type:"bi.button",
text:"setValue",
width:300,
handler:function(){
editor.setValue("凛冬将至");
}
},{
type:"bi.button",
text:"doHighLight",
width:300,
handler:function(){
editor.doHighLight();
console.log(editor.getState());
}
}],
vgap: 20
}
}
})
BI.shortcut("demo.shelter_editor", Demo.ClearEditor);

24
demo/js/widget/editor/demo.sign_editor.js

@ -0,0 +1,24 @@
/**
* Created by Dailer on 2017/7/14.
*/
Demo.SignEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_editor",
// cls:"layout-bg5",
value: "123",
text: "456",
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.sign_editor", Demo.SignEditor);

24
demo/js/widget/editor/demo.sign_initial_editor.js

@ -0,0 +1,24 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_initial_editor",
cls:"layout-bg5",
value:"123",
text:"456",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);

22
demo/js/widget/editor/demo.sign_style_editor.js

@ -0,0 +1,22 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignStyleEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_style_editor",
cls:"layout-bg5",
value:"12313",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor);

24
demo/js/widget/editor/demo.state_editor.js

@ -0,0 +1,24 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.StateEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.state_editor",
cls:"bi-border",
value:"123",
text:"456",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.state_editor", Demo.StateEditor);

28
demo/js/widget/editor/demo.text_editor.js

@ -0,0 +1,28 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_editor",
watermark:"这是水印,watermark",
width: 300
},{
type: "bi.text_editor",
watermark:"这个不予许空",
allowBlank: false,
errorText: "非空!",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.text_editor", Demo.TextEditor);

20
demo/js/widget/month/demo.month.js

@ -0,0 +1,20 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.Month = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.month_combo",
width: 300
}]
}
}
})
BI.shortcut("demo.month", Demo.Month);

6
demo/js/widget/demo.multiselectcombo.js → demo/js/widget/multiselect/demo.multi_select_combo.js

@ -44,8 +44,8 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.matched.concat(search.finded); items = search.matched.concat(search.finded);
}); });
if (options.selectedValues) {//过滤 if (options.selected_values) {//过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selected_values, true);
items = BI.filter(items, function (i, ob) { items = BI.filter(items, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
@ -74,7 +74,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
scrolly: false, scrolly: false,
items: [{ items: [{
el: this._createMultiSelectCombo(), el: this._createMultiSelectCombo(),
right: 10, right: "50%",
top: 10 top: 10
}] }]
} }

41
demo/js/widget/multitree/demo.multi_tree_combo.js

@ -0,0 +1,41 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.MultiTreeCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.multi_tree_combo",
ref: function (_ref) {
self.tree = _ref;
},
itemsCreator: function (options, callback) {
console.log(options);
callback({
items: items
});
},
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.multi_tree_combo", Demo.MultiTreeCombo);

44
demo/js/widget/numericalinterval/demo.numerical_interval.js

@ -0,0 +1,44 @@
/**
* Created by Dailer on 2017/7/12.
*/
Demo.NumericalInterval = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
mounted: function () {
var numerical = this.numerical;
var label = this.label;
numerical.on(BI.NumericalInterval.EVENT_CHANGE, function () {
var temp = numerical.getValue();
var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max;
label.setValue(res);
})
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.numerical_interval",
ref: function (_ref) {
self.numerical = _ref;
},
width: 500
}, {
type: "bi.label",
ref: function (_ref) {
self.label = _ref;
},
text: "显示结果"
}],
vgap: 20
}
}
})
BI.shortcut("demo.numberical_interval", Demo.NumericalInterval);

77
demo/js/widget/pathchooser/demo.directionpathchooser.js

@ -0,0 +1,77 @@
Demo.DirectionPathChooser = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-direction-path-chooser"
},
render: function () {
return {
type: "bi.center_adapt",
items: [
{
type: "bi.direction_path_chooser",
items: [[{
"region": "8c4460bc3605685e",
"regionText": "采购订单XXX",
"text": "ID",
"value": "1"
}, {
"region": "0fbd0dc648f41e97",
"regionText": "采购订单",
"text": "学号",
"value": "3"
}, {
"region": "c6d72d6c7e19a667",
"regionText": "供应商基本信息",
"text": "ID",
"value": "5"
}], [{
"region": "ed013e18cc7c8637",
"regionText": "采购订单XXX",
"text": "ID",
"value": "1"
}, {
"region": "153d75878431f8ee",
"regionText": "A3",
"text": "学号",
"value": "2"
}, {
"region": "3861fb024c7d7825",
"regionText": "采购订单",
"text": "学号",
"value": "3"
}, {
"region": "88e3e5071bd10bc5",
"regionText": "供应商",
"text": "ID",
"value": "4"
}, {
"region": "8476c77ab5c147e0",
"regionText": "供应商基本信息",
"text": "ID",
"value": "5"
}], [{
"region": "f00f67fbb9fba6fe",
"regionText": "采购订单XXX",
"text": "ID",
"value": "1"
}, {
"region": "1e8badf5d5793408",
"regionText": "A3",
"text": "学号",
"value": "2"
}, {
"region": "de1ebd3d0986a294",
"regionText": "供应商基本信息",
"text": "ID",
"value": "5"
}]]
}
]
}
}
})
BI.shortcut("demo.direction_path_chooser",Demo.DirectionPathChooser);

0
demo/js/widget/demo.pathchooser.js → demo/js/widget/pathchooser/demo.pathchooser.js

20
demo/js/widget/quarter/demo.quarter.js

@ -0,0 +1,20 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.Quarter = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.quarter_combo",
width: 300
}]
}
}
})
BI.shortcut("demo.quarter", Demo.Quarter);

0
demo/js/widget/demo.relationview.js → demo/js/widget/relationview/demo.relationview.js

35
demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js

@ -0,0 +1,35 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.multilayer_select_tree_combo",
ref: function (_ref) {
self.tree = _ref;
},
text: "默认值",
items: items,
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(self.tree.getValue()[0]);
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.multilayer_select_tree_combo", Demo.MultiLayerSelectTreeCombo);

182
demo/js/widget/selecttree/demo.select_tree_combo.js

@ -0,0 +1,182 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
var self = this;
var items = [{
id: 1,
text: "第一项",
value: 1,
isParent: true,
title: "第一项"
}, {
id: 2,
text: "第二项",
value: 2,
isParent: true,
title: "第二项"
}, {
id: 3,
text: "第三项",
value: 3,
isParent: true,
open: true,
title: "第三项"
}, {
id: 4,
text: "第四项",
value: 4,
isParent: true,
title: "第四项"
}, {
id: 5,
text: "第五项",
value: 5,
isParent: true,
title: "第五项"
}, {
id: 6,
text: "第六项",
value: 6,
isParent: true,
open: true,
title: "第六项"
}, {
id: 7,
text: "第七项",
value: 7,
isParent: true,
open: true,
title: "第七项"
}, {
id: 11,
pId: 1,
text: "子项1",
value: 11,
title: "子项1"
}, {
id: 12,
pId: 1,
text: "子项2",
value: 12,
title: "子项2"
}, {
id: 13,
pId: 1,
text: "子项3",
value: 13,
title: "子项3"
}, {
id: 21,
pId: 2,
text: "子项1",
value: 21,
title: "子项1"
}, {
id: 22,
pId: 2,
text: "子项2",
value: 22,
title: "子项2"
}, {
id: 31,
pId: 3,
text: "子项1",
value: 31,
title: "子项1"
}, {
id: 32,
pId: 3,
text: "子项2",
value: 32,
title: "子项2"
}, {
id: 33,
pId: 3,
text: "子项3",
value: 33,
title: "子项3"
}, {
id: 41,
pId: 4,
text: "子项1",
value: 41,
title: "子项1"
}, {
id: 42,
pId: 4,
text: "子项2",
value: 42,
title: "子项2"
}, {
id: 43,
pId: 4,
text: "子项3",
value: 43,
title: "子项3"
}, {
id: 51,
pId: 5,
text: "子项1",
value: 51,
title: "子项1"
}, {
id: 52,
pId: 5,
text: "子项2",
value: 52,
title: "子项2"
}, {
id: 61,
pId: 6,
text: "子项1",
value: 61,
title: "子项1"
}, {
id: 62,
pId: 6,
text: "子项2",
value: 62,
title: "子项2"
}, {
id: 71,
pId: 7,
text: "子项1",
value: 71,
title: "子项1"
}, {
id: 72,
pId: 7,
text: "子项2",
value: 72,
title: "子项2"
}];
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.select_tree_combo",
ref: function (_ref) {
self.tree = _ref;
},
text: "默认值",
items: items,
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(self.tree.getValue()[0]);
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.select_tree_combo", Demo.SelectTreeCombo);

35
demo/js/widget/singletree/demo.multilayer_single_tree_combo.js

@ -0,0 +1,35 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.multilayer_single_tree_combo",
ref: function (_ref) {
self.tree = _ref;
},
text: "默认值",
items: items,
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(self.tree.getValue()[0]);
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.multilayer_single_tree_combo", Demo.MultiLayerSingleTreeCombo);

181
demo/js/widget/singletree/demo.single_tree_combo.js

@ -0,0 +1,181 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.single_tree_combo",
ref: function (_ref) {
self.tree = _ref;
},
text: "默认值",
items: [{
id: 1,
text: "第一项",
value: 1,
isParent: true,
title: "第一项"
}, {
id: 2,
text: "第二项",
value: 1,
isParent: true,
title: "第二项"
}, {
id: 3,
text: "第三项",
value: 1,
isParent: true,
open: true,
title: "第三项"
}, {
id: 4,
text: "第四项",
value: 1,
isParent: true,
title: "第四项"
}, {
id: 5,
text: "第五项",
value: 1,
isParent: true,
title: "第五项"
}, {
id: 6,
text: "第六项",
value: 1,
isParent: true,
open: true,
title: "第六项"
}, {
id: 7,
text: "第七项",
value: 1,
isParent: true,
open: true,
title: "第七项"
}, {
id: 11,
pId: 1,
text: "子项1",
value: 11,
title: "子项1"
}, {
id: 12,
pId: 1,
text: "子项2",
value: 12,
title: "子项2"
}, {
id: 13,
pId: 1,
text: "子项3",
value: 13,
title: "子项3"
}, {
id: 21,
pId: 2,
text: "子项1",
value: 21,
title: "子项1"
}, {
id: 22,
pId: 2,
text: "子项2",
value: 22,
title: "子项2"
}, {
id: 31,
pId: 3,
text: "子项1",
value: 31,
title: "子项1"
}, {
id: 32,
pId: 3,
text: "子项2",
value: 32,
title: "子项2"
}, {
id: 33,
pId: 3,
text: "子项3",
value: 33,
title: "子项3"
}, {
id: 41,
pId: 4,
text: "子项1",
value: 41,
title: "子项1"
}, {
id: 42,
pId: 4,
text: "子项2",
value: 42,
title: "子项2"
}, {
id: 43,
pId: 4,
text: "子项3",
value: 43,
title: "子项3"
}, {
id: 51,
pId: 5,
text: "子项1",
value: 51,
title: "子项1"
}, {
id: 52,
pId: 5,
text: "子项2",
value: 52,
title: "子项2"
}, {
id: 61,
pId: 6,
text: "子项1",
value: 61,
title: "子项1"
}, {
id: 62,
pId: 6,
text: "子项2",
value: 62,
title: "子项2"
}, {
id: 71,
pId: 7,
text: "子项1",
value: 71,
title: "子项1"
}, {
id: 72,
pId: 7,
text: "子项2",
value: 72,
title: "子项2"
}],
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(self.tree.getValue()[0]);
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.single_tree_combo", Demo.SingleTreeCombo);

40
demo/js/widget/table/demo.excel_table.js

@ -0,0 +1,40 @@
/**
* Created by Dailer on 2017/7/12.
*/
Demo.ExcelTable = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.excel_table",
columnSize: [200,200,200,200,200],
items: [
[{
type: "bi.label",
cls: "layout-bg1",
text: "第一行第一列"
}, {
type: "bi.label",
cls: "layout-bg2",
text: "第一行第二列"
}],
[{
type: "bi.label",
cls: "layout-bg3",
text: "第二行第一列"
}, {
type: "bi.label",
cls: "layout-bg4",
text: "第二行第二列"
}]
]
}],
width:500
}
}
})
BI.shortcut("demo.excel_table", Demo.ExcelTable);

33
demo/js/widget/timeinterval/demo.time_interval.js

@ -0,0 +1,33 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.TimeInterval = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.time_interval",
ref: function (_ref) {
self.interval = _ref;
},
width: 300
}, {
type: "bi.button",
text: "getVlaue",
handler: function () {
BI.Msg.toast(JSON.stringify(self.interval.getValue()));
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.time_interval", Demo.TimeInterval);

66
demo/js/widget/tree/demo.multilayer_select_tree_combo.js

@ -1,66 +0,0 @@
/**
* Created by User on 2017/3/22.
*/
Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
props: {},
render: function (vessel) {
var TREEWITHCHILDREN = [{
id: -1, value: "根目录", text: "根目录", children: [
{
id: 1, value: "第一级目录1", text: "第一级目录1", children: [
{id: 11, value: "第二级文件1", text: "第二级文件1"},
{
id: 12, value: "第二级目录2", text: "第二级目录2", children: [
{
id: 121, value: "第三级目录1", text: "第三级目录1", children: [
{
id: 1211, value: "第四级目录1", text: "第四级目录1", children: [
{id: 12111, value: "第五级文件1", text: "第五级文件1"}
]
}
]
},
{id: 122, value: "第三级文件1", text: "第三级文件1"}
]
}
]
},
{
id: 2, value: "第一级目录2", text: "第一级目录2", children: [
{
id: 21, value: "第二级目录3", text: "第二级目录3", children: [
{
id: 211, value: "第三级目录2", text: "第三级目录2", children: [
{id: 2111, value: "第四级文件1", text: "第四级文件1"}
]
},
{id: 212, value: "第三级文件2", text: "第三级文件2"}
]
},
{id: 22, value: "第二级文件2", text: "第二级文件2"}
]
}
]
}];
var items = BI.deepClone(TREEWITHCHILDREN);
var combo = BI.createWidget({
type: "bi.multilayer_select_tree_combo",
});
combo.populate(items);
return {
type: "bi.vertical",
items: [combo, {
type: "bi.button",
width: 100,
text: "getValue",
handler: function () {
BI.Msg.alert("", JSON.stringify(combo.getValue()));
}
}],
vgap: 100
}
}
});
BI.shortcut("demo.multilayer_select_tree_combo", Demo.MultiSelectCombo);

24
demo/js/widget/tree/demo.switch_tree.js

@ -0,0 +1,24 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.SwitchTree = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.switch_tree",
items: items
},{
type:"bi.button",
text:"getValue"
}]
}
}
})
BI.shortcut("demo.switch_tree", Demo.SwitchTree);

19
demo/js/widget/year/demo.year.js

@ -0,0 +1,19 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.Year = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.year_combo",
width: 300
}]
}
}
})
BI.shortcut("demo.year", Demo.Year);

32
demo/js/widget/yearmonth/demo.year_month_combo.js

@ -0,0 +1,32 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.YearMonthCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.year_month_combo",
ref: function (_ref) {
self.widget = _ref;
},
width: 300
}, {
type: "bi.button",
text: "getValue",
handler: function () {
BI.Msg.toast(JSON.stringify(self.widget.getValue()))
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.year_month_combo", Demo.YearMonthCombo);

33
demo/js/widget/yearquarter/demo.year_quarter_combo.js

@ -0,0 +1,33 @@
/**
* Created by Dailer on 2017/7/13.
*/
Demo.YearQuarterCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self=this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.year_quarter_combo",
width: 300,
ref:function(_ref){
self.widget=_ref;
},
yearBehaviors: {},
quarterBehaviors: {},
}, {
type: "bi.button",
text: "getValue",
handler:function(){
BI.Msg.toast(JSON.stringify(self.widget.getValue()))
},
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.year_quarter_combo", Demo.YearQuarterCombo);

7
demo/less/main.less

@ -1,5 +1,4 @@
@import "index"; @import "index";
.layout-bg-white { .layout-bg-white {
background-color: #ffffff; background-color: #ffffff;
} }
@ -60,4 +59,8 @@ body {
.bi-theme-dark body { .bi-theme-dark body {
background-color: @color-bi-background-normal-theme-dark; background-color: @color-bi-background-normal-theme-dark;
} }
.demo-editor {
border: 1px solid rgb(204, 204, 204);
}

13
docs/case.js

@ -12033,6 +12033,19 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
return setting; return setting;
}, },
_dealWidthNodes: function (nodes) {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
} else {
node.text = node.value;
}
});
return nodes;
},
initTree: function (nodes, setting) { initTree: function (nodes, setting) {
var setting = setting || this._configSetting(); var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);

8
docs/core.css

@ -3900,7 +3900,7 @@ i {
.bi-list-item-none:hover, .bi-list-item-none:hover,
.bi-list-item-none.hover { .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:hover .bi-input, .bi-list-item-none:hover .bi-input,
.bi-list-item-none.hover .bi-input { .bi-list-item-none.hover .bi-input {
@ -3913,7 +3913,7 @@ i {
.bi-list-item-none:active, .bi-list-item-none:active,
.bi-list-item-none.active { .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:active .bi-input, .bi-list-item-none:active .bi-input,
.bi-list-item-none.active .bi-input { .bi-list-item-none.active .bi-input {
@ -3951,7 +3951,7 @@ i {
.bi-theme-dark .bi-list-item-none:hover, .bi-theme-dark .bi-list-item-none:hover,
.bi-theme-dark .bi-list-item-none.hover { .bi-theme-dark .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:hover .bi-input, .bi-theme-dark .bi-list-item-none:hover .bi-input,
.bi-theme-dark .bi-list-item-none.hover .bi-input { .bi-theme-dark .bi-list-item-none.hover .bi-input {
@ -3964,7 +3964,7 @@ i {
.bi-theme-dark .bi-list-item-none:active, .bi-theme-dark .bi-list-item-none:active,
.bi-theme-dark .bi-list-item-none.active { .bi-theme-dark .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:active .bi-input, .bi-theme-dark .bi-list-item-none:active .bi-input,
.bi-theme-dark .bi-list-item-none.active .bi-input { .bi-theme-dark .bi-list-item-none.active .bi-input {

3
docs/demo.css

@ -48,6 +48,9 @@ body {
.bi-theme-dark body { .bi-theme-dark body {
background-color: #191B2B; background-color: #191B2B;
} }
.demo-editor {
border: 1px solid #cccccc;
}
.demo-north { .demo-north {
background-color: #3c8dbc; background-color: #3c8dbc;
} }

2923
docs/demo.js

File diff suppressed because one or more lines are too long

BIN
docs/icon/arrow left right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
docs/icon/radio.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

BIN
docs/icon/slider.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
docs/icon/双向箭头.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

46
docs/index.html

@ -1,33 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" <head>
href="core.css"/> <meta charset="utf-8">
<link rel="stylesheet" type="text/css" <title></title>
href="base.css"/> <link rel="stylesheet" type="text/css" href="core.css" />
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css" href="base.css" />
href="widget.css"/> <link rel="stylesheet" type="text/css" href="widget.css" />
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css" href="resource.css" />
href="resource.css"/> <link rel="stylesheet" type="text/css" href="demo.css" />
<link rel="stylesheet" type="text/css"
href="demo.css"/>
<script src="polyfill.js"></script> <script src="polyfill.js"></script>
<script src="core.js"></script> <script src="core.js"></script>
<script src="base.js"></script> <script src="base.js"></script>
<script src="case.js"></script> <script src="case.js"></script>
<script src="widget.js"></script> <script src="widget.js"></script>
<!--图表--> <!--图表-->
<script src="vancharts-all.js"></script> <script src="vancharts-all.js"></script>
<script src="biconst.js"></script><!--图表用到的常量(直接拿的bi的常量)--> <script src="biconst.js"></script>
<script src="chart.js"></script> <!--图表用到的常量(直接拿的bi的常量)-->
<script src="chart.js"></script>
<script src="demo.js"></script> <script src="demo.js"></script>
</head> </head>
<body> <body>
<div id="wrapper"></div> <div id="wrapper"></div>
</body> </body>
</html> </html>

184
docs/polyfill.js

@ -1,93 +1,93 @@
if(![].indexOf){ if(![].indexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.indexOf = function (o) { Array.prototype.indexOf = function (o) {
for (var i = 0, len = this.length; i < len; i++) { for (var i = 0, len = this.length; i < len; i++) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
} }
if(![].lastIndexOf){ if(![].lastIndexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* ie67不支持数组的这个方法 * ie67不支持数组的这个方法
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.lastIndexOf = function (o) { Array.prototype.lastIndexOf = function (o) {
for (var len = this.length, i = len - 1; i >= 0; i--) { for (var len = this.length, i = len - 1; i >= 0; i--) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
}/** }/**
* 特殊情况 * 特殊情况
* Created by wang on 15/6/23. * Created by wang on 15/6/23.
*/ */
//解决console未定义问题 guy //解决console未定义问题 guy
window.console = window.console || (function () { window.console = window.console || (function () {
var c = {}; var c = {};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
= c.clear = c.exception = c.trace = c.assert = function () { = c.clear = c.exception = c.trace = c.assert = function () {
}; };
return c; return c;
})(); })();
/* /*
* 前端缓存 * 前端缓存
*/ */
window.localStorage || (window.localStorage = { window.localStorage || (window.localStorage = {
items: {}, items: {},
setItem: function (k, v) { setItem: function (k, v) {
BI.Cache.addCookie(k, v); BI.Cache.addCookie(k, v);
}, },
getItem: function (k) { getItem: function (k) {
return BI.Cache.getCookie(k); return BI.Cache.getCookie(k);
}, },
removeItem: function (k) { removeItem: function (k) {
BI.Cache.deleteCookie(k); BI.Cache.deleteCookie(k);
}, },
key: function () { key: function () {
}, },
clear: function () { clear: function () {
this.items = {}; this.items = {};
} }
});//修复ie9下sort方法的bug });//修复ie9下sort方法的bug
!function (window) { !function (window) {
var ua = window.navigator.userAgent.toLowerCase(), var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/; reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) { if (reg.test(ua)) {
var _sort = Array.prototype.sort; var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) { Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') { if (!!fn && typeof fn === 'function') {
if (this.length < 2) { if (this.length < 2) {
return this; return this;
} }
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) { for (; i < l; i++) {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]); t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t : r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0; !!t ? 1 : 0) > 0;
if (r === true) { if (r === true) {
tmp = this[i]; tmp = this[i];
this[i] = this[j]; this[i] = this[j];
this[j] = tmp; this[j] = tmp;
} }
} }
} }
return this; return this;
} else { } else {
return _sort.call(this); return _sort.call(this);
} }
}; };
} }
}(window); }(window);

832
docs/widget.css

@ -1,416 +1,416 @@
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement .arrangement-helper { .bi-arrangement .arrangement-helper {
background: #3f8ce8; background: #3f8ce8;
z-index: 1000000000; z-index: 1000000000;
} }
.bi-arrangement .arrangement-block { .bi-arrangement .arrangement-block {
z-index: 1000000000; z-index: 1000000000;
} }
.bi-arrangement .arrangement-drop-container { .bi-arrangement .arrangement-drop-container {
z-index: 1000000000; z-index: 1000000000;
} }
.bi-arrangement .arrangement-drop-container .arrangement-drop-region { .bi-arrangement .arrangement-drop-container .arrangement-drop-region {
overflow: hidden; overflow: hidden;
} }
.bi-arrangement .arrangement-drop-container .drop-devider { .bi-arrangement .arrangement-drop-container .drop-devider {
z-index: 1000000001; z-index: 1000000001;
background: #3f8ce8; background: #3f8ce8;
} }
.bi-arrangement .arrangement-drop-container .top-left, .bi-arrangement .arrangement-drop-container .top-left,
.bi-arrangement .arrangement-drop-container .top-right, .bi-arrangement .arrangement-drop-container .top-right,
.bi-arrangement .arrangement-drop-container .bottom-left, .bi-arrangement .arrangement-drop-container .bottom-left,
.bi-arrangement .arrangement-drop-container .bottom-right, .bi-arrangement .arrangement-drop-container .bottom-right,
.bi-arrangement .arrangement-drop-container .top-left-second, .bi-arrangement .arrangement-drop-container .top-left-second,
.bi-arrangement .arrangement-drop-container .top-right-second, .bi-arrangement .arrangement-drop-container .top-right-second,
.bi-arrangement .arrangement-drop-container .bottom-left-second, .bi-arrangement .arrangement-drop-container .bottom-left-second,
.bi-arrangement .arrangement-drop-container .bottom-right-second, .bi-arrangement .arrangement-drop-container .bottom-right-second,
.bi-arrangement .arrangement-drop-container .top-center, .bi-arrangement .arrangement-drop-container .top-center,
.bi-arrangement .arrangement-drop-container .bottom-center, .bi-arrangement .arrangement-drop-container .bottom-center,
.bi-arrangement .arrangement-drop-container .left-center, .bi-arrangement .arrangement-drop-container .left-center,
.bi-arrangement .arrangement-drop-container .right-center, .bi-arrangement .arrangement-drop-container .right-center,
.bi-arrangement .arrangement-drop-container .top-center-second, .bi-arrangement .arrangement-drop-container .top-center-second,
.bi-arrangement .arrangement-drop-container .bottom-center-second, .bi-arrangement .arrangement-drop-container .bottom-center-second,
.bi-arrangement .arrangement-drop-container .left-center-second, .bi-arrangement .arrangement-drop-container .left-center-second,
.bi-arrangement .arrangement-drop-container .right-center-second { .bi-arrangement .arrangement-drop-container .right-center-second {
z-index: 1000000001; z-index: 1000000001;
background: #3f8ce8; background: #3f8ce8;
} }
.bi-arrangement-droppable { .bi-arrangement-droppable {
z-index: 100000; z-index: 100000;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text { .bi-adapt-editor .adapt-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-search-editor .close-font { .bi-search-editor .close-font {
font-size: 20px; font-size: 20px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 20px; font-size: 20px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor { .bi-small-search-editor .bi-editor {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-input { .bi-small-search-editor .bi-editor .bi-input {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-label { .bi-small-search-editor .bi-editor .bi-label {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 18px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 18px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-initial-editor .sign-initial-editor-text { .bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-style-editor .sign-style-editor-text { .bi-sign-style-editor .sign-style-editor-text {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
} }
.bi-sign-style-editor .sign-style-editor-tip { .bi-sign-style-editor .sign-style-editor-tip {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
color: #808080; color: #808080;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-text-editor { .bi-text-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger { .bi-date-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-down-list-popup .bi-down-list-item .list-item-text { .bi-down-list-popup .bi-down-list-item .list-item-text {
max-width: 203px; max-width: 203px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-excel-table > div.bottom-right > div > div > table { .bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #d4dadd; border-right: 1px solid #d4dadd;
} }
.bi-theme-dark .bi-excel-table > div.bottom-right > div > div > table { .bi-theme-dark .bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #525466; border-right: 1px solid #525466;
} }
.bi-excel-table-header-cell { .bi-excel-table-header-cell {
font-weight: bold; font-weight: bold;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-file-manager-nav-button .file-manager-nav-button-text { .bi-file-manager-nav-button .file-manager-nav-button-text {
max-width: 200px; max-width: 200px;
} }
.bi-file-manager-nav-button .file-manager-nav-button-text.active { .bi-file-manager-nav-button .file-manager-nav-button-text.active {
background-color: #eff1f4; background-color: #eff1f4;
color: #999999; color: #999999;
} }
.bi-file-manager-nav-button .file-manager-nav-button-triangle { .bi-file-manager-nav-button .file-manager-nav-button-triangle {
z-index: 1; z-index: 1;
} }
.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active { .bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active {
background-color: #191b2b; background-color: #191b2b;
color: #999999; color: #999999;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-fine-tuning-number-editor { .bi-fine-tuning-number-editor {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }
.bi-interactive-arrangement .interactive-arrangement-dragtag-line { .bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000; z-index: 1000000000;
background-color: #f07d0a; background-color: #f07d0a;
} }
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon { .bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000; z-index: 1000000000;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-month-trigger { .bi-month-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }
.bi-multi-select-check-pane .multi-select-check-selected { .bi-multi-select-check-pane .multi-select-check-selected {
text-decoration: underline; text-decoration: underline;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-combo .multi-select-trigger-icon-button { .bi-multi-select-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-trigger { .bi-multi-select-trigger {
-webkit-border-radius: 2px 2px 2px 2px; -webkit-border-radius: 2px 2px 2px 2px;
-moz-border-radius: 2px 2px 2px 2px; -moz-border-radius: 2px 2px 2px 2px;
border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px;
} }
.bi-multi-select-search-pane .multi-select-toolbar { .bi-multi-select-search-pane .multi-select-toolbar {
color: #e85050; color: #e85050;
} }
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-pane .multi-tree-check-selected { .bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3f8ce8; color: #3f8ce8;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-combo .multi-select-trigger-icon-button { .bi-multi-tree-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-multi-tree-popup .popup-view-tree { .bi-multi-tree-popup .popup-view-tree {
min-height: 170px; min-height: 170px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-selected-button .trigger-check-selected { .bi-multi-tree-check-selected-button .trigger-check-selected {
color: #3f8ce8; color: #3f8ce8;
z-index: 1; z-index: 1;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-numerical-interval .numerical-interval-small-editor { .bi-numerical-interval .numerical-interval-small-editor {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px; -webkit-border-bottom-left-radius: 2px;
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-editor { .bi-numerical-interval .numerical-interval-big-editor {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-right-radius: 2px;
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo { .bi-numerical-interval .numerical-interval-big-combo {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px; -webkit-border-bottom-left-radius: 2px;
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval .numerical-interval-small-combo { .bi-numerical-interval .numerical-interval-small-combo {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-right-radius: 2px;
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval.number-error .bi-input { .bi-numerical-interval.number-error .bi-input {
color: #e85050; color: #e85050;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-page-table-cell { .bi-page-table-cell {
-webkit-user-select: initial; -webkit-user-select: initial;
-khtml-user-select: initial; -khtml-user-select: initial;
-moz-user-select: initial; -moz-user-select: initial;
-ms-user-select: initial; -ms-user-select: initial;
-o-user-select: initial; -o-user-select: initial;
user-select: initial; user-select: initial;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-path-chooser .path-chooser-radio { .bi-path-chooser .path-chooser-radio {
z-index: 1; z-index: 1;
} }
.bi-path-region .path-region-label { .bi-path-region .path-region-label {
z-index: 1; z-index: 1;
} }
.bi-preview-table-cell { .bi-preview-table-cell {
min-height: 25px; min-height: 25px;
min-width: 80px; min-width: 80px;
max-width: 220px; max-width: 220px;
} }
.bi-preview-table { .bi-preview-table {
-webkit-user-select: initial; -webkit-user-select: initial;
-khtml-user-select: initial; -khtml-user-select: initial;
-moz-user-select: initial; -moz-user-select: initial;
-ms-user-select: initial; -ms-user-select: initial;
-o-user-select: initial; -o-user-select: initial;
user-select: initial; user-select: initial;
} }
.bi-preview-table > div > table > thead > tr.odd, .bi-preview-table > div > table > thead > tr.odd,
.bi-preview-table > div > div > div > table > thead > tr.odd { .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #eff1f4; background-color: #eff1f4;
} }
.bi-theme-dark .bi-preview-table > div > table > thead > tr.odd, .bi-theme-dark .bi-preview-table > div > table > thead > tr.odd,
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd { .bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #191b2b; background-color: #191b2b;
} }
.bi-preview-table-header-cell { .bi-preview-table-header-cell {
font-weight: bold; font-weight: bold;
min-height: 25px; min-height: 25px;
min-width: 80px; min-width: 80px;
max-width: 220px; max-width: 220px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-quarter-trigger { .bi-quarter-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-relation-view-region .relation-view-region-container { .bi-relation-view-region .relation-view-region-container {
z-index: 1; z-index: 1;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }
.bi-relation-view-region .relation-view-region-container.other-package { .bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed; border-style: dashed;
} }
.bi-sequence-table-dynamic-number .sequence-table-title-cell { .bi-sequence-table-dynamic-number .sequence-table-title-cell {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden; overflow-y: hidden;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
.bi-sequence-table-dynamic-number .sequence-table-number-cell { .bi-sequence-table-dynamic-number .sequence-table-number-cell {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
.bi-sequence-table-list-number .sequence-table-title-cell { .bi-sequence-table-list-number .sequence-table-title-cell {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden; overflow-y: hidden;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
.bi-sequence-table-list-number .sequence-table-number-cell { .bi-sequence-table-list-number .sequence-table-number-cell {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-tree-number .sequence-table-title-cell { .bi-sequence-table-tree-number .sequence-table-title-cell {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden; overflow-y: hidden;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
.bi-sequence-table-tree-number .sequence-table-number-cell { .bi-sequence-table-tree-number .sequence-table-number-cell {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/*Safari3.2+*/ /*Safari3.2+*/
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/*Firefox3.5+*/ /*Firefox3.5+*/
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
/*IE8*/ /*IE8*/
box-sizing: border-box; box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
} }
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-popup .year-popup-navigation { .bi-year-popup .year-popup-navigation {
line-height: 30px; line-height: 30px;
} }
.bi-year-popup .year-popup-navigation > .center-element { .bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
} }
.bi-year-popup .year-popup-navigation > .first-element { .bi-year-popup .year-popup-navigation > .first-element {
border-left: none; border-left: none;
} }
.bi-theme-dark .bi-year-popup .year-popup-navigation > .center-element { .bi-theme-dark .bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #525466; border-left: 1px solid #525466;
} }
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element { .bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none; border-left: none;
} }
.bi-year-trigger { .bi-year-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
} }

16149
docs/widget.js

File diff suppressed because it is too large Load Diff

1776
package-lock.json generated

File diff suppressed because it is too large Load Diff

13
src/case/tree/tree.display.js

@ -44,6 +44,19 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
return setting; return setting;
}, },
_dealWidthNodes: function (nodes) {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
} else {
node.text = node.value;
}
});
return nodes;
},
initTree: function (nodes, setting) { initTree: function (nodes, setting) {
var setting = setting || this._configSetting(); var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);

11
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -227,7 +227,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
function search(parents, current, result, searched) { function search(parents, current, result, searched) {
var newParents = BI.clone(parents); var newParents = BI.clone(parents);
newParents.push(current); newParents.push(current);
if (self._isMatch(current, keyword)) { if (self._isMatch(parents, current, keyword)) {
searched && searched.push(newParents); searched && searched.push(newParents);
return true; return true;
} }
@ -256,7 +256,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
function isSearchValueInParent(parentValues) { function isSearchValueInParent(parentValues) {
for (var i = 0, len = parentValues.length; i < len; i++) { for (var i = 0, len = parentValues.length; i < len; i++) {
if (self._isMatch(parentValues[i], keyword)) { if (self._isMatch(parentValues.slice(0, parentValues.length - 1), parentValues[i], keyword)) {
return true; return true;
} }
} }
@ -382,7 +382,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
} }
function nodeSearch(deep, parentValues, current, isAllSelect, result) { function nodeSearch(deep, parentValues, current, isAllSelect, result) {
if (self._isMatch(current, keyword)) { if (self._isMatch(parentValues, current, keyword)) {
var checked = isAllSelect || isSelected(parentValues, current); var checked = isAllSelect || isSelected(parentValues, current);
createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result); createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);
return [true, checked]; return [true, checked];
@ -612,8 +612,9 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}); });
}, },
_isMatch: function (value, keyword) { _isMatch: function (parentValues, value, keyword) {
var finded = BI.Func.getSearchResult([value], keyword); var node = this._getTreeNode(parentValues, value);
var finded = BI.Func.getSearchResult([node.text || node.value], keyword);
return finded.finded.length > 0 || finded.matched.length > 0; return finded.finded.length > 0 || finded.matched.length > 0;
}, },

8
src/css/core/utils/common.css

@ -724,7 +724,7 @@
.bi-list-item-none:hover, .bi-list-item-none:hover,
.bi-list-item-none.hover { .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:hover .bi-input, .bi-list-item-none:hover .bi-input,
.bi-list-item-none.hover .bi-input { .bi-list-item-none.hover .bi-input {
@ -737,7 +737,7 @@
.bi-list-item-none:active, .bi-list-item-none:active,
.bi-list-item-none.active { .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-list-item-none:active .bi-input, .bi-list-item-none:active .bi-input,
.bi-list-item-none.active .bi-input { .bi-list-item-none.active .bi-input {
@ -775,7 +775,7 @@
.bi-theme-dark .bi-list-item-none:hover, .bi-theme-dark .bi-list-item-none:hover,
.bi-theme-dark .bi-list-item-none.hover { .bi-theme-dark .bi-list-item-none.hover {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:hover .bi-input, .bi-theme-dark .bi-list-item-none:hover .bi-input,
.bi-theme-dark .bi-list-item-none.hover .bi-input { .bi-theme-dark .bi-list-item-none.hover .bi-input {
@ -788,7 +788,7 @@
.bi-theme-dark .bi-list-item-none:active, .bi-theme-dark .bi-list-item-none:active,
.bi-theme-dark .bi-list-item-none.active { .bi-theme-dark .bi-list-item-none.active {
color: inherit; color: inherit;
background-color: inherit; background-color: transparent;
} }
.bi-theme-dark .bi-list-item-none:active .bi-input, .bi-theme-dark .bi-list-item-none:active .bi-input,
.bi-theme-dark .bi-list-item-none.active .bi-input { .bi-theme-dark .bi-list-item-none.active .bi-input {

8
src/less/core/utils/common.less

@ -706,7 +706,7 @@
& .bi-textarea { & .bi-textarea {
color: inherit; color: inherit;
} }
background-color: inherit; background-color: transparent;
} }
&:active, &.active { &:active, &.active {
color: inherit; color: inherit;
@ -716,7 +716,7 @@
& .bi-textarea { & .bi-textarea {
color: inherit; color: inherit;
} }
background-color: inherit; background-color: transparent;
& .bi-high-light { & .bi-high-light {
color: inherit; color: inherit;
} }
@ -748,7 +748,7 @@
& .bi-textarea { & .bi-textarea {
color: inherit; color: inherit;
} }
background-color: inherit; background-color: transparent;
} }
&:active, &.active { &:active, &.active {
color: inherit; color: inherit;
@ -758,7 +758,7 @@
& .bi-textarea { & .bi-textarea {
color: inherit; color: inherit;
} }
background-color: inherit; background-color: transparent;
& .bi-high-light { & .bi-high-light {
color: inherit; color: inherit;
} }

2
src/less/resource/icon.less

@ -55,3 +55,5 @@
//Half Select //Half Select
.icon(check-half-select-icon, @icon-half-select); .icon(check-half-select-icon, @icon-half-select);

17
src/widget/multiselect/multiselect.combo.js

@ -24,6 +24,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.trigger.getCounter().setButtonChecked(self.storeValue); self.trigger.getCounter().setButtonChecked(self.storeValue);
}; };
this.storeValue = {}; this.storeValue = {};
//标记正在请求数据
this.requesting = false;
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
@ -162,10 +164,16 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.populate(); self.populate();
}); });
}); });
//当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件
this.wants2Quit = false;
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
//important:关闭弹出时又可能没有退出编辑状态 //important:关闭弹出时又可能没有退出编辑状态
self.trigger.stopEditing(); self.trigger.stopEditing();
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); if (self.requesting === true) {
self.wants2Quit = true;
} else {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
}
}); });
var triggerBtn = BI.createWidget({ var triggerBtn = BI.createWidget({
@ -218,6 +226,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) { _joinKeywords: function (keywords, callback) {
var self = this, o = this.options; var self = this, o = this.options;
this._assertValue(this.storeValue); this._assertValue(this.storeValue);
this.requesting = true;
o.itemsCreator({ o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: keywords keywords: keywords
@ -240,6 +249,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_joinAll: function (res, callback) { _joinAll: function (res, callback) {
var self = this, o = this.options; var self = this, o = this.options;
this._assertValue(res); this._assertValue(res);
this.requesting = true;
o.itemsCreator({ o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()] keywords: [this.trigger.getKey()]
@ -300,6 +310,11 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
value: [] value: []
} }
} }
if (self.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
}
self.requesting = false;
} }
}, },

Loading…
Cancel
Save