Browse Source

Merge pull request #134 in FUI/fineui from ~GUY/fineui:master to master

* commit '54c48a5fb9e4d8da001a3da2b3633d0d8895bece':
  update
  update
es6
guy 7 years ago
parent
commit
f78154892c
  1. 138
      bi/base.js
  2. 2
      demo/config.js
  3. 0
      demo/js/category/customATree/demo.multilayerselecttree.leveltree.js
  4. 47
      demo/js/category/largeTable/cell.js
  5. 98
      demo/js/category/largeTable/face.js
  6. 38
      demo/js/category/largeTable/header.js
  7. 39
      demo/js/category/largeTable/sequenceheadercell.normal.js
  8. 2
      demo/js/category/largeTable/table.js
  9. 8
      demo/js/config/addons.js
  10. 12
      demo/js/config/category.js
  11. 138
      dist/base.js
  12. 138
      dist/bundle.js
  13. 70
      dist/bundle.min.js
  14. 435
      dist/demo.js
  15. 2
      src/base/combination/combo.js
  16. 68
      src/base/table/table.grid.js
  17. 68
      src/base/table/table.grid.quick.js

138
bi/base.js

@ -3261,7 +3261,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0) {
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -31384,40 +31384,40 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.contextLayout.attr("items", items);
this.contextLayout.resize();
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid._populate(this.header[0]);
this.topRightGrid._populate(this.header[1]);
@ -31738,40 +31738,40 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
});
});
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid.populate(leftHeader);
this.topRightGrid.populate(rightHeader);

2
demo/config.js

@ -1,4 +1,4 @@
Demo.CONFIG = Demo.CORE_CONFIG.concat(Demo.BASE_CONFIG).concat(Demo.CASE_CONFIG).concat(Demo.WIDGET_CONFIG).concat(Demo.COMPONENT_CONFIG).concat(Demo.ADDONS_CONFIG);
Demo.CONFIG = Demo.CORE_CONFIG.concat(Demo.BASE_CONFIG).concat(Demo.CASE_CONFIG).concat(Demo.WIDGET_CONFIG).concat(Demo.COMPONENT_CONFIG).concat(Demo.ADDONS_CONFIG).concat(Demo.CATEGORY_CONFIG);
Demo.CONSTANTS = {
SIMPLE_ITEMS: BI.map("柳州市城贸金属材料有限责任公司 柳州市建福房屋租赁有限公司 柳州市迅昌数码办公设备有限责任公司 柳州市河海贸易有限责任公司 柳州市花篮制衣厂 柳州市兴溪物资有限公司 柳州市针织总厂 柳州市衡管物资有限公司 柳州市琪成机电设备有限公司 柳州市松林工程机械修理厂".match(/[^\s]+/g), function (i, v) {

0
demo/js/component/demo.multilayerselecttree.leveltree.js → demo/js/category/customATree/demo.multilayerselecttree.leveltree.js

47
demo/js/category/largeTable/cell.js

@ -0,0 +1,47 @@
/**
* Created by roy on 16/5/23.
*/
BI.DetailTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DetailTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-detail-table-cell",
dId: "",
text: ""
})
},
_init: function () {
BI.DetailTableCell.superclass._init.apply(this, arguments);
this._createItem();
},
_createItem: function () {
var self = this, o = this.options;
var type = this.options.dimensionType;
var item = BI.createWidget({
type: "bi.label",
height: o.height,
text: o.text,
title: o.text,
lgap: 5,
rgap: 5
});
if (BI.isNotEmptyString(o.color)) {
this.element.css("color", o.color);
}
BI.createWidget({
type: "bi.vertical",
element: this,
items: [item]
})
//表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}
},
});
BI.shortcut("bi.detail_table_cell", BI.DetailTableCell);

98
demo/js/category/largeTable/face.js

@ -0,0 +1,98 @@
Demo.Face = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-face"
},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.sequence_table",
ref: function () {
self.table = this;
},
isNeedFreeze: null,
isNeedMerge: false,
summaryCellStyleGetter: function (isLast) {
return {
background: "rgb(4, 177, 194)",
color: "#ffffff",
fontWeight: "bold"
};
},
sequenceCellStyleGetter: function (index) {
return {
background: "rgb(4, 177, 194)",
color: "#ffffff",
fontWeight: "bold"
};
},
headerCellStyleGetter: function () {
return {
background: "rgb(4, 177, 194)",
color: "#ffffff",
fontWeight: "bold"
};
},
el: {
type: "bi.adaptive_table",
el: {
type: "bi.resizable_table",
el: {
type: "bi.grid_table"
}
}
},
sequence: {
type: "bi.sequence_table_list_number",
pageSize: 100,
sequenceHeaderCreator: {
type: "bi.normal_sequence_header_cell",
styleGetter: function () {
return {
background: "rgb(4, 177, 194)",
color: "#ffffff",
fontWeight: "bold"
};
}
}
},
itemsCreator: function (op, populate) {
}
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
}
},
mounted: function () {
var self = this;
this._resizeHandler = BI.debounce(function () {
var width = self.element.width(), height = self.element.height();
if (self.table.getWidth() !== width || self.table.getHeight() !== height) {
self.table.setWidth(width);
self.table.setHeight(height);
self.table.populate();
}
}, 0);
BI.ResizeDetector.addResizeListener(this, function () {
self._resizeHandler();
});
this.table.setWidth(this.element.width());
this.table.setHeight(this.element.height());
this.table.attr("columnSize", BI.makeArray(26, ""));
this.table.attr("minColumnSize", BI.makeArray(26, 80));
this.table.attr("isNeedFreeze", true);
this.table.attr("freezeCols", []);
this.table.attr("showSequence", true);
this.table.attr("headerRowSize", 25);
this.table.attr("rowSize", 25);
this.table.populate(TABLE_ITEMS, TABLE_HEADER);
}
});
BI.shortcut("demo.large_table", Demo.Face);

38
demo/js/category/largeTable/header.js

@ -0,0 +1,38 @@
/**
* Created by Young's on 2016/4/15.
*/
BI.DetailTableHeader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DetailTableHeader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-detail-table-header"
})
},
_init: function () {
BI.DetailTableHeader.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var dId = o.dId;
var name = o.text;
BI.createWidget({
type: "bi.htape",
element: this,
items: [{
el: {
type: "bi.label",
text: name,
title: name,
whiteSpace: "nowrap",
textAlign: "center",
lgap: 5,
height: o.height
}
}]
});
//表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}
},
});
BI.shortcut("bi.detail_table_header", BI.DetailTableHeader);

39
demo/js/category/largeTable/sequenceheadercell.normal.js

@ -0,0 +1,39 @@
/**
* created by young
* 默认风格表格表头
*/
BI.NormalSequenceHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NormalSequenceHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-normal-sequence-header-cell",
})
},
_init: function () {
BI.NormalSequenceHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
forceCenter: true,
hgap: 5,
text: BI.i18nText("BI-Number_Index")
});
this._digestStyle();
},
_digestStyle: function () {
var o = this.options;
var style = o.styleGetter();
if (style) {
this.element.css(style);
}
},
populate: function () {
this._digestStyle();
}
});
BI.NormalSequenceHeaderCell.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.normal_sequence_header_cell", BI.NormalSequenceHeaderCell);

2
demo/js/category/largeTable/table.js

File diff suppressed because one or more lines are too long

8
demo/js/config/addons.js

@ -14,12 +14,4 @@ Demo.ADDONS_CONFIG = [{
id: 602,
text: "滚动sliders",
value: "demo.slider"
}, {
id: 100000,
text: "小demo",
value: "demo.platform_level_tree"
}, {
pId: 100000,
text: "平台用",
value: "demo.platform_level_tree"
}];

12
demo/js/config/category.js

@ -0,0 +1,12 @@
Demo.CATEGORY_CONFIG = [{
id: 100000,
text: "专题"
}, {
pId: 100000,
text: "自定义一棵树",
value: "demo.platform_level_tree"
}, {
pId: 100000,
text: "大表格",
value: "demo.large_table"
}];

138
dist/base.js vendored

@ -3261,7 +3261,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0) {
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -31384,40 +31384,40 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.contextLayout.attr("items", items);
this.contextLayout.resize();
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid._populate(this.header[0]);
this.topRightGrid._populate(this.header[1]);
@ -31738,40 +31738,40 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
});
});
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid.populate(leftHeader);
this.topRightGrid.populate(rightHeader);

138
dist/bundle.js vendored

@ -32132,7 +32132,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0) {
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -60255,40 +60255,40 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.contextLayout.attr("items", items);
this.contextLayout.resize();
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid._populate(this.header[0]);
this.topRightGrid._populate(this.header[1]);
@ -60609,40 +60609,40 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
});
});
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid.populate(leftHeader);
this.topRightGrid.populate(rightHeader);

70
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

435
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
src/base/combination/combo.js

@ -219,7 +219,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0) {
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);

68
src/base/table/table.grid.js

@ -362,40 +362,40 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.contextLayout.attr("items", items);
this.contextLayout.resize();
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid._populate(this.header[0]);
this.topRightGrid._populate(this.header[1]);

68
src/base/table/table.grid.quick.js

@ -209,40 +209,40 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
});
});
this.topLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.topRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomLeftGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
this.bottomRightGrid.attr({
overscanColumnCount: 0,
overscanRowCount: 0
});
function overscan(grid, w, h, rSize, cSize) {
var rCount = h / rSize;
var cCount = w / cSize;
if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
grid.attr("overscanRowCount", 100);
grid.attr("overscanColumnCount", 100);
}
}
if (freezeColLength > 0) {
overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
}
if (o.columnSize.length - freezeColLength > 0) {
overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
}
// this.topLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.topRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomLeftGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
// this.bottomRightGrid.attr({
// overscanColumnCount: 0,
// overscanRowCount: 0
// });
//
// function overscan(grid, w, h, rSize, cSize) {
// var rCount = h / rSize;
// var cCount = w / cSize;
// if (cCount * (120 / rSize) >= 80 || rCount * (120 / cSize) >= 80) {
// grid.attr("overscanRowCount", 100);
// grid.attr("overscanColumnCount", 100);
// }
// }
//
// if (freezeColLength > 0) {
// overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength);
// overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength);
// }
// if (o.columnSize.length - freezeColLength > 0) {
// overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength));
// }
this.topLeftGrid.populate(leftHeader);
this.topRightGrid.populate(rightHeader);

Loading…
Cancel
Save