common.tsx
2.15 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
// 判断条件下拉
export const CONDITION_DATA = [
{
label: "等于",
value: "===",
},
{
label: "不等于",
value: "!=",
},
{
label: "大于",
value: ">",
},
{
label: "小于",
value: "<",
},
{
label: "大于等于",
value: ">=",
},
{
label: "小于等于",
value: "<=",
},
{
label: "包含",
value: "includes",
},
{
label: "不包含",
value: "!includes",
},
{
label: "为(空/0)",
value: "empty",
},
{
label: "不为(空/0)",
value: "!empty",
},
];
// 判断条件下拉 按钮非主表 b类型
export const CONDITION_DATA_TYPEB = [
{
label: "全部为true",
value: "trueAll",
},
{
label: "全部为false",
value: "falseAll",
},
{
label: "至少一个为true",
value: "trueOne",
},
{
label: "至少一个为false",
value: "falseOne",
},
];
// 判断条件下拉 按钮非主表 非b类型
export const CONDITION_DATA_TYPE_NOTB = CONDITION_DATA.reduce((pre, item): any => {
const { label, value } = item;
if (value.includes("includes")) {
return pre;
}
pre.push({
label: `全部${label}`,
value: `${value}All`,
});
pre.push({
label: `至少一个${label}`,
value: `${value}One`,
});
return pre;
}, []);
// 且或组件rowValues默认值
export const INIT_ROW_VALUES = {
pre1: undefined,
value1: "",
condition: undefined,
pre2: undefined,
value2: "",
};
// 且或组件表名下拉固定类型
export const ROW_PRE_OPTIONS = [
{
label: "字符串",
value: "string",
},
{
label: "数字",
value: "number",
},
];
// props
export const PROPS_OPTIONS = [
{
label: "全局变量",
value: "props",
},
];
// 简易筛选数据集
export const SIMPLE_DATASET_FILTER_OPTIONS = [
{
label: "全部数据",
value: "",
},
{
label: "选中数据",
value: "sec",
},
{
label: "首条数据",
value: "first",
},
{
label: "末条数据",
value: "last",
},
];
// radio是否选项
export const RADIO_OPTIONS = [
{
label: "是",
value: "!empty",
},
{
label: "否",
value: "empty",
},
];