mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
feat(data-visualization): add offset param to charts-query (#5911)
* feat(locale): add offset param to charts-query(backend) * feat(locale): add offset param to charts-query(frontend) --------- Co-authored-by: mahuan <1007409254@qq.com>
This commit is contained in:
parent
5de1666c51
commit
7f7a1fdbfb
@ -461,6 +461,19 @@ export const querySchema: ISchema = {
|
||||
},
|
||||
},
|
||||
},
|
||||
offset: {
|
||||
title: '{{t("Offset")}}',
|
||||
type: 'number',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-component': 'InputNumber',
|
||||
'x-component-props': {
|
||||
defaultValue: 0,
|
||||
min: 0,
|
||||
style: {
|
||||
width: '100px',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// sql: {
|
||||
|
@ -50,6 +50,7 @@ export type QueryProps = Partial<{
|
||||
}[];
|
||||
filter: any;
|
||||
limit: number;
|
||||
offset: number;
|
||||
sql: {
|
||||
fields?: string;
|
||||
clauses?: string;
|
||||
|
@ -23,6 +23,7 @@
|
||||
"Filter": "Filter",
|
||||
"Sort": "Sort",
|
||||
"Limit": "Limit",
|
||||
"Offset": "Offset",
|
||||
"Enable cache": "Enable cache",
|
||||
"TTL (second)": "TTL (second)",
|
||||
"Field": "Field",
|
||||
|
@ -23,6 +23,7 @@
|
||||
"Filter": "フィルター",
|
||||
"Sort": "ソート",
|
||||
"Limit": "制限",
|
||||
"Offset": "スキップする件数",
|
||||
"Enable cache": "キャッシュを有効化",
|
||||
"TTL (second)": "TTL(秒)",
|
||||
"Field": "フィールド",
|
||||
@ -97,4 +98,4 @@
|
||||
"Show padding": "パディングを表示",
|
||||
"Distinct": "重複排除",
|
||||
"Collapse": "折りたたみ"
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
"Filter": "필터",
|
||||
"Sort": "정렬",
|
||||
"Limit": "결과 제한",
|
||||
"Offset": "건너뛸 개수",
|
||||
"Enable cache": "캐시 활성화",
|
||||
"TTL (second)": "TTL (초)",
|
||||
"Field": "필드",
|
||||
|
@ -23,6 +23,7 @@
|
||||
"Filter": "过滤",
|
||||
"Sort": "排序",
|
||||
"Limit": "结果数量",
|
||||
"Offset": "跳过数量",
|
||||
"Enable cache": "启用缓存",
|
||||
"TTL (second)": "缓存时间 (秒)",
|
||||
"Field": "字段",
|
||||
|
@ -91,7 +91,7 @@ export class QueryParser {
|
||||
|
||||
parse() {
|
||||
return async (ctx: Context, next: Next) => {
|
||||
const { measures, dimensions, orders, include, where, limit } = ctx.action.params.values;
|
||||
const { measures, dimensions, orders, include, where, limit, offset } = ctx.action.params.values;
|
||||
const { attributes: measureAttributes, fieldMap: measureFieldMap, hasAgg } = this.parseMeasures(ctx, measures);
|
||||
const {
|
||||
attributes: dimensionAttributes,
|
||||
@ -109,6 +109,7 @@ export class QueryParser {
|
||||
group,
|
||||
order,
|
||||
limit: limit || 2000,
|
||||
offset: offset || 0,
|
||||
subQuery: false,
|
||||
raw: true,
|
||||
},
|
||||
|
@ -38,6 +38,7 @@ export type QueryParams = Partial<{
|
||||
orders: OrderProps[];
|
||||
filter: any;
|
||||
limit: number;
|
||||
offset: number;
|
||||
sql: {
|
||||
fields?: string;
|
||||
clauses?: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user