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
| import { BasicColumn, FormSchema } from '/@/components/Table';
| import { render } from '/@/utils/common/renderUtils';
| import { JCronValidator } from '/@/components/Form';
|
| export const columns: BasicColumn[] = [
| {
| title: '任务类名',
| dataIndex: 'jobClassName',
| width: 200,
| align: 'left',
| },
| {
| title: 'Cron表达式',
| dataIndex: 'cronExpression',
| width: 200,
| },
| {
| title: '参数',
| dataIndex: 'parameter',
| width: 200,
| },
| {
| title: '描述',
| dataIndex: 'description',
| width: 200,
| },
| {
| title: '状态',
| dataIndex: 'status',
| width: 100,
| customRender: ({ text }) => {
| const color = text == '0' ? 'green' : text == '-1' ? 'red' : 'gray';
| return render.renderTag(render.renderDict(text, 'quartz_status'), color);
| },
| },
| ];
|
| export const searchFormSchema: FormSchema[] = [
| {
| field: 'jobClassName',
| label: '任务类名',
| component: 'Input',
| colProps: { span: 8 },
| },
| {
| field: 'status',
| label: '任务状态',
| component: 'JDictSelectTag',
| componentProps: {
| dictCode: 'quartz_status',
| stringToNumber: true,
| },
| colProps: { span: 8 },
| },
| ];
|
| export const formSchema: FormSchema[] = [
| {
| field: 'id',
| label: 'id',
| component: 'Input',
| show: false,
| },
| {
| field: 'jobClassName',
| label: '任务类名',
| component: 'Input',
| required: true,
| },
| {
| field: 'cronExpression',
| label: 'Cron表达式',
| component: 'JEasyCron',
| defaultValue: '* * * * * ? *',
| rules: [{ required: true, message: '请输入Cron表达式' }, { validator: JCronValidator }],
| },
| {
| field: 'paramterType',
| label: '参数类型',
| component: 'Select',
| defaultValue: 'string',
| componentProps: {
| options: [
| { label: '字符串', value: 'string' },
| { label: 'JSON对象', value: 'json' },
| ],
| },
| },
| {
| field: 'parameter',
| label: '参数',
| component: 'InputTextArea',
| ifShow: ({ values }) => {
| return values.paramterType == 'string';
| },
| },
| {
| field: 'parameter',
| label: '参数',
| component: 'JAddInput',
| helpMessage: '键值对形式填写',
| ifShow: ({ values }) => {
| return values.paramterType == 'json';
| },
| },
| {
| field: 'status',
| label: '状态',
| component: 'JDictSelectTag',
| componentProps: {
| dictCode: 'quartz_status',
| type: 'radioButton',
| stringToNumber: true,
| dropdownStyle: {
| maxHeight: '6vh',
| },
| },
| },
| {
| field: 'description',
| label: '描述',
| component: 'InputTextArea',
| },
| ];
|
|