Browse Source

no message

es6
刘荣歆 7 years ago
parent
commit
a6b2cfe496
  1. 17
      demo/js/widget/demo.adaptivearrangement.js
  2. 27
      demo/js/widget/demo.date.js
  3. 46
      demo/js/widget/demo.datepane.js
  4. 77
      demo/js/widget/demo.directionpathchooser.js
  5. 40
      demo/js/widget/demo.excel_table.js
  6. 13
      demo/js/widget/demo.interactivearrangement.js
  7. 20
      demo/js/widget/demo.month.js
  8. 83
      demo/js/widget/demo.multiselectcombo.js
  9. 177
      demo/js/widget/demo.pathchooser.js
  10. 20
      demo/js/widget/demo.quarter.js
  11. 65
      demo/js/widget/demo.relationview.js
  12. 19
      demo/js/widget/demo.year.js
  13. 596
      docs/demo.js

17
demo/js/widget/demo.adaptivearrangement.js

@ -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)

27
demo/js/widget/demo.date.js

@ -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);

46
demo/js/widget/demo.datepane.js

@ -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);

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

@ -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);

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

@ -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);

13
demo/js/widget/demo.interactivearrangement.js

@ -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);

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

@ -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);

83
demo/js/widget/demo.multiselectcombo.js

@ -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);

177
demo/js/widget/demo.pathchooser.js

@ -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);

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

@ -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);

65
demo/js/widget/demo.relationview.js

@ -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);

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

@ -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);

596
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); BI.shortcut("demo.date_pane", Demo.DatePane);Demo.Downlist = BI.inherit(BI.Widget, {
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, {
props: { props: {
baseCls: "demo-downlist" baseCls: "demo-downlist"
}, },
@ -6842,436 +6679,7 @@ BI.shortcut("demo.direction_path_chooser",Demo.DirectionPathChooser);Demo.Downli
} }
}) })
BI.shortcut("demo.down_list", Demo.Downlist);/** BI.shortcut("demo.down_list", Demo.Downlist);Demo.DialogView = BI.inherit(BI.Widget, {
* 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, {
render: function () { render: function () {
var items = [{ var items = [{

Loading…
Cancel
Save