constant.ts
2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
export const BASE_SCHEMA = {
type: 'object',
properties: {},
};
export enum NumFormulaEnum {
// 求和
SUM = 'SUM',
// 平均值
AVERAGE = 'AVERAGE',
// 乘积
PRODUCT = 'PRODUCT',
// 求差
DIFF = 'DIFF',
// 相除
DIV = 'DIV',
// 最大值
MAX = 'MAX',
// 最小值
MIN = 'MIN',
// 求余
MOD = 'MOD',
// 自定义
CUSTOM = 'CUSTOM',
}
/**
* 数字计算公式选项
*/
export const NumFormulaOptions = [
{
key: NumFormulaEnum.SUM,
name: '求和',
},
{
key: NumFormulaEnum.AVERAGE,
name: '平均值',
},
{
key: NumFormulaEnum.PRODUCT,
name: '乘积',
},
{
key: NumFormulaEnum.DIFF,
name: '求差',
},
{
key: NumFormulaEnum.DIV,
name: '相除',
},
{
key: NumFormulaEnum.MAX,
name: '最大值',
},
{
key: NumFormulaEnum.MIN,
name: '最小值',
},
{
key: NumFormulaEnum.MOD,
name: '求余',
},
{
key: NumFormulaEnum.CUSTOM,
name: '自定义',
},
];
/**
* 表汇总计算
*/
export enum TableFormulaEnum {
// 计数
COUNT = 'COUNT',
// 空值计数
COUNTBLANK = 'COUNTBLANK',
// 非空值计数
COUNTA = 'COUNTA',
// 去重计数(不含空值)
COUNTUNIQUE = 'COUNTUNIQUE',
// 自定义
CUSTOM = 'CUSTOM',
}
/**
* 表汇总计算选项
*/
export const TableFormulaOptions = [
{
key: NumFormulaEnum.SUM,
name: '求和',
},
{
key: NumFormulaEnum.MAX,
name: '最大值',
},
{
key: NumFormulaEnum.MIN,
name: '最小值',
},
{
key: NumFormulaEnum.AVERAGE,
name: '平均值',
},
{
key: TableFormulaEnum.COUNT,
name: '计数',
},
{
key: TableFormulaEnum.COUNTA,
name: '非空计数',
},
{
key: TableFormulaEnum.COUNTBLANK,
name: '为空计数',
},
{
key: TableFormulaEnum.COUNTUNIQUE,
name: '去重计算(不含空值)',
},
// {
// key: TableFormulaEnum.CUSTOM,
// name: '自定义',
// },
];
/**
* 时间计算单位
*/
export const TimeUnitOptions = [
{
key: 'YEAR',
name: '年',
},
{
key: 'MONTH',
name: '月',
},
{
key: 'DAY',
name: '日',
},
{
key: 'HOUR',
name: '时',
},
{
key: 'MINUTE',
name: '分',
},
{
key: 'SECONDS',
name: '秒',
},
];
export const precisionOptions = [
{
key: 'UNIT',
name: '依据“结果单位”计算',
},
{
key: 'PRECISE',
name: '精确计算',
},
];
export const fillType = [
{
key: 'START',
name: '最早补齐(第一天的 00:00:00)',
label: '最早补齐',
},
{
key: 'END',
name: '最晚补齐(最后一天的23:59:59)',
label: '最晚补齐',
},
];