提交 c96d0878 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新表格

上级 d6d10bc5
...@@ -4,14 +4,12 @@ ...@@ -4,14 +4,12 @@
{{#if item.align}} {{#if item.align}}
align: "{{lowerCase item.align}}", align: "{{lowerCase item.align}}",
{{/if}} {{/if}}
{{#neq lastColumn true}}
{{#if item.widthUnit 'PX'}} {{#if item.widthUnit 'PX'}}
width: {{item.width}}, width: {{item.width}},
{{else}} {{else}}
minWidth: {{item.width}}, minWidth: {{item.width}},
{{/if}} {{/if}}
resizable: true, resizable: true,
{{/neq}}
{{#eq item.columnType 'GROUPGRIDCOLUMN'}} {{#eq item.columnType 'GROUPGRIDCOLUMN'}}
children: [ children: [
{{#each item.psDEGridColumns as | column |}} {{#each item.psDEGridColumns as | column |}}
......
...@@ -280,7 +280,7 @@ export class GridControl extends MainControl { ...@@ -280,7 +280,7 @@ export class GridControl extends MainControl {
* @memberof GridControl * @memberof GridControl
*/ */
public async handleDataAgg() { public async handleDataAgg() {
const { aggMode } = this.controlState; const { aggMode, enablePagingBar } = this.controlState;
if (!Object.is(aggMode, "NONE")) { if (!Object.is(aggMode, "NONE")) {
const dataAggRef = toRef(this.controlState, "dataAgg"); const dataAggRef = toRef(this.controlState, "dataAgg");
const currentRef = toRef(this.controlState, "current"); const currentRef = toRef(this.controlState, "current");
...@@ -292,9 +292,11 @@ export class GridControl extends MainControl { ...@@ -292,9 +292,11 @@ export class GridControl extends MainControl {
} else if (Object.is(aggMode, "ALL")) { } else if (Object.is(aggMode, "ALL")) {
aggData = await this.remoteAgg(); aggData = await this.remoteAgg();
} }
if (enablePagingBar) {
const start: number = (currentRef.value - 1) * pageSizeRef.value > 0 ? (currentRef.value - 1) * pageSizeRef.value - 1 : 0; const start: number = (currentRef.value - 1) * pageSizeRef.value > 0 ? (currentRef.value - 1) * pageSizeRef.value - 1 : 0;
const end: number = currentRef.value * pageSizeRef.value; const end: number = currentRef.value * pageSizeRef.value;
aggData = aggData.slice(start, end); aggData = aggData.slice(start, end);
}
const columnsModelRef = toRef(this.controlState, "columnsModel"); const columnsModelRef = toRef(this.controlState, "columnsModel");
const columnsModel: IParam[] = []; const columnsModel: IParam[] = [];
columnsModelRef.value.forEach((column: IParam) => { columnsModelRef.value.forEach((column: IParam) => {
...@@ -377,6 +379,8 @@ export class GridControl extends MainControl { ...@@ -377,6 +379,8 @@ export class GridControl extends MainControl {
group: i % 2 === 1 ? "分组1": "分组2", group: i % 2 === 1 ? "分组1": "分组2",
srfkey: i, srfkey: i,
tefsubjecttypename: `Edrward ${i}`, tefsubjecttypename: `Edrward ${i}`,
nian: i,
testdata: i,
updatedate: 32, updatedate: 32,
description: `London Park no. ${i}`, description: `London Park no. ${i}`,
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册