From a6b2cfe49615d07675c820dc887b552703c435aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=8D=A3=E6=AD=86?= Date: Fri, 14 Jul 2017 09:06:38 +0800 Subject: [PATCH] no message --- demo/js/widget/demo.adaptivearrangement.js | 17 - demo/js/widget/demo.date.js | 27 - demo/js/widget/demo.datepane.js | 46 -- demo/js/widget/demo.directionpathchooser.js | 77 --- demo/js/widget/demo.excel_table.js | 40 -- demo/js/widget/demo.interactivearrangement.js | 13 - demo/js/widget/demo.month.js | 20 - demo/js/widget/demo.multiselectcombo.js | 83 --- demo/js/widget/demo.pathchooser.js | 177 ------ demo/js/widget/demo.quarter.js | 20 - demo/js/widget/demo.relationview.js | 65 -- demo/js/widget/demo.year.js | 19 - docs/demo.js | 596 +----------------- 13 files changed, 2 insertions(+), 1198 deletions(-) delete mode 100644 demo/js/widget/demo.adaptivearrangement.js delete mode 100644 demo/js/widget/demo.date.js delete mode 100644 demo/js/widget/demo.datepane.js delete mode 100644 demo/js/widget/demo.directionpathchooser.js delete mode 100644 demo/js/widget/demo.excel_table.js delete mode 100644 demo/js/widget/demo.interactivearrangement.js delete mode 100644 demo/js/widget/demo.month.js delete mode 100644 demo/js/widget/demo.multiselectcombo.js delete mode 100644 demo/js/widget/demo.pathchooser.js delete mode 100644 demo/js/widget/demo.quarter.js delete mode 100644 demo/js/widget/demo.relationview.js delete mode 100644 demo/js/widget/demo.year.js diff --git a/demo/js/widget/demo.adaptivearrangement.js b/demo/js/widget/demo.adaptivearrangement.js deleted file mode 100644 index 9060101213..0000000000 --- a/demo/js/widget/demo.adaptivearrangement.js +++ /dev/null @@ -1,17 +0,0 @@ - - - -Demo.AdaptiveArrangement=BI.inherit(BI.Widget,{ - props:{ - baseCls:"demo-adaptive-arrangement" - }, - - render:function(){ - return{ - type:"bi.adaptive_arrangement", - items:[] - } - } -}) - -BI.shortcut("demo.adaptive_arrangement",Demo.AdaptiveArrangement) \ No newline at end of file diff --git a/demo/js/widget/demo.date.js b/demo/js/widget/demo.date.js deleted file mode 100644 index db08e049f0..0000000000 --- a/demo/js/widget/demo.date.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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 BI.createWidget({ - type: "bi.vertical", - vgap: 10, - items: [{ - el:{ - type: "bi.date_calendar_popup" - } - }] - }) - } -}) - -BI.shortcut("demo.date", Demo.Date); \ No newline at end of file diff --git a/demo/js/widget/demo.datepane.js b/demo/js/widget/demo.datepane.js deleted file mode 100644 index 694c47be2a..0000000000 --- a/demo/js/widget/demo.datepane.js +++ /dev/null @@ -1,46 +0,0 @@ - - - -Demo.DatePane = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-datepane" - }, - render: function () { - - var datepane = BI.createWidget({ - type: "bi.date_pane_widget", - selectedTime: { - year: 2017, - month: 12, - day: 11 - } - }) - - return { - type: "bi.horizontal_auto", - items: [{ - type: "bi.vertical", - vgap: 10, - items: [ - { - type: "bi.label", - cls: "layout-bg2", - text: "bi.date_pane_widget" - }, { - el: datepane - }, - { - type:"bi.button", - text:"getValue", - handler:function(){ - BI.Msg.toast("date"+JSON.stringify(datepane.getValue())); - } - } - ], - width: "50%" - }] - } - } -}) - -BI.shortcut("demo.date_pane", Demo.DatePane); \ No newline at end of file diff --git a/demo/js/widget/demo.directionpathchooser.js b/demo/js/widget/demo.directionpathchooser.js deleted file mode 100644 index 647521fe92..0000000000 --- a/demo/js/widget/demo.directionpathchooser.js +++ /dev/null @@ -1,77 +0,0 @@ - - - -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); \ No newline at end of file diff --git a/demo/js/widget/demo.excel_table.js b/demo/js/widget/demo.excel_table.js deleted file mode 100644 index 5e518d1652..0000000000 --- a/demo/js/widget/demo.excel_table.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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); \ No newline at end of file diff --git a/demo/js/widget/demo.interactivearrangement.js b/demo/js/widget/demo.interactivearrangement.js deleted file mode 100644 index 8551daa724..0000000000 --- a/demo/js/widget/demo.interactivearrangement.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Created by User on 2017/3/22. - */ -Demo.RelationView = BI.inherit(BI.Widget, { - props: { - }, - render: function () { - return { - type: "bi.interactive_arrangement", - }; - } -}); -BI.shortcut("demo.interactive_arrangement", Demo.RelationView); \ No newline at end of file diff --git a/demo/js/widget/demo.month.js b/demo/js/widget/demo.month.js deleted file mode 100644 index c40ccdad92..0000000000 --- a/demo/js/widget/demo.month.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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); \ No newline at end of file diff --git a/demo/js/widget/demo.multiselectcombo.js b/demo/js/widget/demo.multiselectcombo.js deleted file mode 100644 index 57b3df91f1..0000000000 --- a/demo/js/widget/demo.multiselectcombo.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Created by User on 2017/3/22. - */ -Demo.MultiSelectCombo = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-multi-select-combo" - }, - - _createMultiSelectCombo: function () { - var self = this; - var widget = BI.createWidget({ - type: 'bi.multi_select_combo', - itemsCreator: BI.bind(this._itemsCreator, this), - width: 200 - }); - - widget.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () { - BI.Msg.toast(JSON.stringify(this.getValue())); - }); - - return widget; - }, - - _getItemsByTimes: function (items, times) { - var res = []; - for (var i = (times - 1) * 3; items[i] && i < times * 3; i++) { - res.push(items[i]); - } - return res; - }, - - _hasNextByTimes: function (items, times) { - return times * 3 < items.length; - }, - - _itemsCreator: function (options, callback) { - var self = this; - var items = Demo.CONSTANTS.ITEMS; - var keywords = (options.keywords || []).slice(); - if (options.keyword) { - keywords.push(options.keyword); - } - BI.each(keywords, function (i, kw) { - var search = BI.Func.getSearchResult(items, kw); - items = search.matched.concat(search.finded); - }); - if (options.selected_values) {//过滤 - var filter = BI.makeObject(options.selected_values, true); - items = BI.filter(items, function (i, ob) { - return !filter[ob.value]; - }); - } - if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) { - callback({ - items: items - }); - return; - } - if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { - callback({count: items.length}); - return; - } - BI.delay(function () { - callback({ - items: self._getItemsByTimes(items, options.times), - hasNext: self._hasNextByTimes(items, options.times) - }); - }, 1000); - }, - - render: function () { - return { - type: 'bi.absolute', - scrolly: false, - items: [{ - el: this._createMultiSelectCombo(), - right: "50%", - top: 10 - }] - } - } -}); -BI.shortcut("demo.multi_select_combo", Demo.MultiSelectCombo); \ No newline at end of file diff --git a/demo/js/widget/demo.pathchooser.js b/demo/js/widget/demo.pathchooser.js deleted file mode 100644 index 25e44b5e76..0000000000 --- a/demo/js/widget/demo.pathchooser.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Created by User on 2017/3/22. - */ -Demo.PathChooser = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-path-chooser" - }, - render: function () { - var pathchooser = BI.createWidget({ - type: "bi.path_chooser", - width: 800, - height: 400, - items: // [ - // [{region: "区域X", value: "X1"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // //{region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域F", value: "F"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域F", value: "F"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X", text: "X"}, - // {region: "区域Q", value: "Q", text: "Q"}, - // {region: "区域A", value: "A", text: "A"}, - // {region: "区域C", value: "C", text: "C"}, - // {region: "区域D", value: "D", text: "D"}, - // {region: "区域F", value: "F", text: "F"}, - // {region: "区域H", value: "H", text: "H"}, - // {region: "区域I", value: "I", text: "I"}, - // {region: "区域J", value: "J", text: "J"}] - //] - [[{ - "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" - }]] - }); - pathchooser.setValue(); - return { - type: "bi.absolute", - items: [{ - el: pathchooser, - left: 100, - top: 100 - }, { - el: { - type: "bi.button", - text: "getValue", - handler: function () { - BI.Msg.toast(JSON.stringify(pathchooser.getValue())); - } - }, - left: 100, - bottom: 10 - }] - } - } -}); -BI.shortcut("demo.path_chooser", Demo.PathChooser); \ No newline at end of file diff --git a/demo/js/widget/demo.quarter.js b/demo/js/widget/demo.quarter.js deleted file mode 100644 index bad058e63b..0000000000 --- a/demo/js/widget/demo.quarter.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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); \ No newline at end of file diff --git a/demo/js/widget/demo.relationview.js b/demo/js/widget/demo.relationview.js deleted file mode 100644 index ebe6e94676..0000000000 --- a/demo/js/widget/demo.relationview.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Created by User on 2017/3/22. - */ -Demo.RelationView = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-relation-view" - }, - render: function () { - var relationview = BI.createWidget({ - type: "bi.relation_view", - items: [ - { - primary: { - region: "B", regionText: "比", regionTitle: "bbb", regionHandler: function () { - alert("a") - }, - - - title: "b2...", - value: "b2", text: "b2字段", - handler: function () { - alert("d") - } - }, - foreign: {region: "C", value: "c1", text: "c1字段"} - }, - { - primary: {region: "A", value: "a1", text: "a1字段"}, - foreign: {region: "C", value: "c2", text: "c2字段"} - }, - { - primary: {region: "C", value: "c3", text: "c3字段"}, - foreign: {region: "D", value: "d1", text: "d1字段"} - }, - { - primary: {region: "A", value: "a1", text: "a1字段"}, - foreign: {region: "B", value: "b1", text: "b1字段"} - }, - - { - primary: {region: "X", value: "x1", text: "x1字段"}, - foreign: {region: "Y", value: "y1", text: "y1字段"} - }, - { - primary: {region: "X", value: "x2", text: "x2字段"}, - foreign: {region: "Z", value: "z1", text: "z1字段"} - }, - { - primary: {region: "X", value: "x2", text: "x2字段"}, - foreign: {region: "B", value: "b1", text: "b1字段"} - }, - { - primary: {region: "X33", value: "x233", text: "x233字段"}, - } - ] - }); - return { - type: "bi.float_center_adapt", - items: [{ - el: relationview - }] - } - } -}); -BI.shortcut("demo.relation_view", Demo.RelationView); \ No newline at end of file diff --git a/demo/js/widget/demo.year.js b/demo/js/widget/demo.year.js deleted file mode 100644 index 810b224b91..0000000000 --- a/demo/js/widget/demo.year.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * 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); \ No newline at end of file diff --git a/docs/demo.js b/docs/demo.js index 2187c818c4..db020e5f27 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -6544,170 +6544,7 @@ BI.shortcut("demo.date", Demo.Date);Demo.DatePane = BI.inherit(BI.Widget, { } }) -BI.shortcut("demo.date_pane", Demo.DatePane); - - -Demo.AdaptiveArrangement=BI.inherit(BI.Widget,{ - props:{ - baseCls:"demo-adaptive-arrangement" - }, - - render:function(){ - return{ - type:"bi.adaptive_arrangement", - items:[] - } - } -}) - -BI.shortcut("demo.adaptive_arrangement",Demo.AdaptiveArrangement)/** - * 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 BI.createWidget({ - type: "bi.vertical", - vgap: 10, - items: [{ - el:{ - type: "bi.date_calendar_popup" - } - }] - }) - } -}) - -BI.shortcut("demo.date", Demo.Date); - - -Demo.DatePane = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-datepane" - }, - render: function () { - - var datepane = BI.createWidget({ - type: "bi.date_pane_widget", - selectedTime: { - year: 2017, - month: 12, - day: 11 - } - }) - - return { - type: "bi.horizontal_auto", - items: [{ - type: "bi.vertical", - vgap: 10, - items: [ - { - type: "bi.label", - cls: "layout-bg2", - text: "bi.date_pane_widget" - }, { - el: datepane - }, - { - type:"bi.button", - text:"getValue", - handler:function(){ - BI.Msg.toast("date"+JSON.stringify(datepane.getValue())); - } - } - ], - width: "50%" - }] - } - } -}) - -BI.shortcut("demo.date_pane", Demo.DatePane); - - -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);Demo.Downlist = BI.inherit(BI.Widget, { +BI.shortcut("demo.date_pane", Demo.DatePane);Demo.Downlist = BI.inherit(BI.Widget, { props: { baseCls: "demo-downlist" }, @@ -6842,436 +6679,7 @@ BI.shortcut("demo.direction_path_chooser",Demo.DirectionPathChooser);Demo.Downli } }) -BI.shortcut("demo.down_list", Demo.Downlist);/** - * 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);/** - * Created by User on 2017/3/22. - */ -Demo.RelationView = BI.inherit(BI.Widget, { - props: { - }, - render: function () { - return { - type: "bi.interactive_arrangement", - }; - } -}); -BI.shortcut("demo.interactive_arrangement", Demo.RelationView);/** - * 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);/** - * Created by User on 2017/3/22. - */ -Demo.MultiSelectCombo = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-multi-select-combo" - }, - - _createMultiSelectCombo: function () { - var self = this; - var widget = BI.createWidget({ - type: 'bi.multi_select_combo', - itemsCreator: BI.bind(this._itemsCreator, this), - width: 200 - }); - - widget.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () { - BI.Msg.toast(JSON.stringify(this.getValue())); - }); - - return widget; - }, - - _getItemsByTimes: function (items, times) { - var res = []; - for (var i = (times - 1) * 3; items[i] && i < times * 3; i++) { - res.push(items[i]); - } - return res; - }, - - _hasNextByTimes: function (items, times) { - return times * 3 < items.length; - }, - - _itemsCreator: function (options, callback) { - var self = this; - var items = Demo.CONSTANTS.ITEMS; - var keywords = (options.keywords || []).slice(); - if (options.keyword) { - keywords.push(options.keyword); - } - BI.each(keywords, function (i, kw) { - var search = BI.Func.getSearchResult(items, kw); - items = search.matched.concat(search.finded); - }); - if (options.selected_values) {//过滤 - var filter = BI.makeObject(options.selected_values, true); - items = BI.filter(items, function (i, ob) { - return !filter[ob.value]; - }); - } - if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) { - callback({ - items: items - }); - return; - } - if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { - callback({count: items.length}); - return; - } - BI.delay(function () { - callback({ - items: self._getItemsByTimes(items, options.times), - hasNext: self._hasNextByTimes(items, options.times) - }); - }, 1000); - }, - - render: function () { - return { - type: 'bi.absolute', - scrolly: false, - items: [{ - el: this._createMultiSelectCombo(), - right: "50%", - top: 10 - }] - } - } -}); -BI.shortcut("demo.multi_select_combo", Demo.MultiSelectCombo);/** - * Created by User on 2017/3/22. - */ -Demo.PathChooser = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-path-chooser" - }, - render: function () { - var pathchooser = BI.createWidget({ - type: "bi.path_chooser", - width: 800, - height: 400, - items: // [ - // [{region: "区域X", value: "X1"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // //{region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E"}, - // {region: "区域G", value: "G"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域E", value: "E1"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域D", value: "D"}, - // {region: "区域F", value: "F"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X"}, - // {region: "区域Q", value: "Q"}, - // {region: "区域A", value: "A"}, - // {region: "区域B", value: "B"}, - // {region: "区域C", value: "C"}, - // {region: "区域D", value: "D"}, - // {region: "区域F", value: "F"}, - // {region: "区域H", value: "H"}, - // {region: "区域I", value: "I"}, - // {region: "区域J", value: "J"}], - // [{region: "区域X", value: "X", text: "X"}, - // {region: "区域Q", value: "Q", text: "Q"}, - // {region: "区域A", value: "A", text: "A"}, - // {region: "区域C", value: "C", text: "C"}, - // {region: "区域D", value: "D", text: "D"}, - // {region: "区域F", value: "F", text: "F"}, - // {region: "区域H", value: "H", text: "H"}, - // {region: "区域I", value: "I", text: "I"}, - // {region: "区域J", value: "J", text: "J"}] - //] - [[{ - "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" - }]] - }); - pathchooser.setValue(); - return { - type: "bi.absolute", - items: [{ - el: pathchooser, - left: 100, - top: 100 - }, { - el: { - type: "bi.button", - text: "getValue", - handler: function () { - BI.Msg.toast(JSON.stringify(pathchooser.getValue())); - } - }, - left: 100, - bottom: 10 - }] - } - } -}); -BI.shortcut("demo.path_chooser", Demo.PathChooser);/** - * 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);/** - * Created by User on 2017/3/22. - */ -Demo.RelationView = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-relation-view" - }, - render: function () { - var relationview = BI.createWidget({ - type: "bi.relation_view", - items: [ - { - primary: { - region: "B", regionText: "比", regionTitle: "bbb", regionHandler: function () { - alert("a") - }, - - - title: "b2...", - value: "b2", text: "b2字段", - handler: function () { - alert("d") - } - }, - foreign: {region: "C", value: "c1", text: "c1字段"} - }, - { - primary: {region: "A", value: "a1", text: "a1字段"}, - foreign: {region: "C", value: "c2", text: "c2字段"} - }, - { - primary: {region: "C", value: "c3", text: "c3字段"}, - foreign: {region: "D", value: "d1", text: "d1字段"} - }, - { - primary: {region: "A", value: "a1", text: "a1字段"}, - foreign: {region: "B", value: "b1", text: "b1字段"} - }, - - { - primary: {region: "X", value: "x1", text: "x1字段"}, - foreign: {region: "Y", value: "y1", text: "y1字段"} - }, - { - primary: {region: "X", value: "x2", text: "x2字段"}, - foreign: {region: "Z", value: "z1", text: "z1字段"} - }, - { - primary: {region: "X", value: "x2", text: "x2字段"}, - foreign: {region: "B", value: "b1", text: "b1字段"} - }, - { - primary: {region: "X33", value: "x233", text: "x233字段"}, - } - ] - }); - return { - type: "bi.float_center_adapt", - items: [{ - el: relationview - }] - } - } -}); -BI.shortcut("demo.relation_view", Demo.RelationView);/** - * 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);Demo.DialogView = BI.inherit(BI.Widget, { +BI.shortcut("demo.down_list", Demo.Downlist);Demo.DialogView = BI.inherit(BI.Widget, { render: function () { var items = [{