data.ts
1.54 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
import { FormSchema as BFormSchema } from '../../../../components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
const statusOptions = [
{ label: t('common.enableText'), value: 'ENABLE' },
{ label: t('common.stop'), value: 'STOP' },
];
const typeOptions = [
{ label: t('common.maintenance'), value: '1' },
{ label: t('basicConfiguration.unit.typeMaintenance'), value: '2' },
{ label: t('basicConfiguration.unit.typeInspection'), value: '3' },
{ label: t('basicConfiguration.unit.typeCheck'), value: '4' },
];
export const formSchema: BFormSchema[] = [
{
field: 'code',
label: t('basicConfiguration.unit.unitCode'),
component: 'Input',
colProps: { span: 24 },
required: true,
componentProps: {
maxLength: 20,
},
},
{
field: 'name',
label: t('basicConfiguration.unit.unitName'),
component: 'Input',
colProps: { span: 24 },
required: true,
componentProps: {
maxLength: 20,
},
},
{
field: 'type',
component: 'Select',
label: t('basicConfiguration.unit.unitType'),
required: true,
colProps: { span: 24 },
componentProps: {
options: typeOptions,
},
},
{
field: 'status',
component: 'Select',
label: t('common.status'),
required: true,
colProps: { span: 24 },
componentProps: {
options: statusOptions,
},
},
{
field: 'notes',
label: t('common.remarkText'),
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
maxLength: 200,
},
},
];