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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
| import { BasicColumn } from '/@/components/Table';
| import { FormSchema } from '/@/components/Table';
| import { render } from '/@/utils/common/renderUtils';
|
| export const columns: BasicColumn[] = [
| {
| title: '姓名',
| dataIndex: 'name',
| width: 170,
| align: 'left',
| resizable: true,
| sorter: {
| multiple:1
| }
| },
| {
| title: '关键词',
| dataIndex: 'keyWord',
| width: 130,
| resizable: true,
| },
| {
| title: '打卡时间',
| dataIndex: 'punchTime',
| width: 140,
| resizable: true,
| },
| {
| title: '工资',
| dataIndex: 'salaryMoney',
| width: 140,
| resizable: true,
| sorter: {
| multiple: 2
| }
| },
| {
| title: '奖金',
| dataIndex: 'bonusMoney',
| width: 140,
| resizable: true,
| },
| {
| title: '性别',
| dataIndex: 'sex',
| sorter: {
| multiple: 3
| },
| customRender: ({ record }) => {
| return render.renderDict(record.sex, 'sex');
| // let v = record.sex ? (record.sex == '1' ? '男' : '女') : '';
| // return h('span', v);
| },
| width: 120,
| resizable: true,
| },
| {
| title: '生日',
| dataIndex: 'birthday',
| width: 120,
| resizable: true,
| },
| {
| title: '邮箱',
| dataIndex: 'email',
| width: 120,
| resizable: true,
| },
| {
| title: '个人简介',
| dataIndex: 'content',
| width: 120,
| resizable: true,
| },
| ];
|
| export const searchFormSchema: FormSchema[] = [
| {
| field: 'name',
| label: '姓名',
| component: 'Input',
| colProps: { span: 8 },
| },
| {
| field: 'birthday',
| label: '生日',
| component: 'RangePicker',
| componentProps: {
| valueType: 'Date'
| },
| colProps: { span: 8 },
| },
| {
| field: 'age',
| label: '年龄',
| component: 'Input',
| slot: 'age',
| colProps: { span: 8 },
| },
| {
| field: 'sex',
| label: '性别',
| colProps: { span: 8 },
| component: 'JDictSelectTag',
| componentProps: {
| dictCode: 'sex',
| placeholder: '请选择性别',
| },
| },
| ];
|
| export const formSchema: FormSchema[] = [
| {
| field: 'id',
| label: 'id',
| component: 'Input',
| show: false,
| },
| {
| field: 'createBy',
| label: 'createBy',
| component: 'Input',
| show: false,
| },
| {
| field: 'createTime',
| label: 'createTime',
| component: 'Input',
| show: false,
| },
| {
| field: 'name',
| label: '名字',
| component: 'Input',
| required: true,
| componentProps: {
| placeholder: '请输入名字',
| },
| },
| {
| field: 'keyWord',
| label: '关键词',
| component: 'Input',
| componentProps: {
| placeholder: '请输入关键词',
| },
| },
| {
| field: 'punchTime',
| label: '打卡时间',
| component: 'DatePicker',
| componentProps: {
| showTime: true,
| valueFormat: 'YYYY-MM-DD HH:mm:ss',
| placeholder: '请选择打卡时间',
| },
| },
| {
| field: 'salaryMoney',
| label: '工资',
| component: 'Input',
| componentProps: {
| placeholder: '请输入工资',
| },
| },
| {
| field: 'sex',
| label: '性别',
| component: 'JDictSelectTag',
| defaultValue: '1',
| componentProps: {
| type: 'radio',
| dictCode: 'sex',
| placeholder: '请选择性别',
| },
| },
| {
| field: 'age',
| label: '年龄',
| component: 'InputNumber',
| defaultValue: 1,
| componentProps: {
| placeholder: '请输入年龄',
| },
| },
| {
| field: 'birthday',
| label: '生日',
| component: 'DatePicker',
| defaultValue: '',
| componentProps: {
| valueFormat: 'YYYY-MM-DD',
| placeholder: '请选择生日',
| },
| },
| {
| field: 'email',
| label: '邮箱',
| component: 'Input',
| rules: [{ required: false, type: 'email', message: '邮箱格式不正确', trigger: 'blur' }],
| componentProps: {
| placeholder: '请输入邮箱',
| },
| },
| {
| field: 'content',
| label: '个人简介 - To introduce myself',
| component: 'InputTextArea',
| labelLength: 4,
| componentProps: {
| placeholder: '请输入个人简介',
| },
| },
| {
| field: 'updateCount',
| label: '乐观锁',
| show: false,
| component: 'Input',
| },
| ];
|
|