config.ts
1.67 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
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
export enum FormFieldsEnum {
CODE = 'code',
CATEGORY_NAME = 'name',
CATEGORY_STATUS = 'status',
CATEGORY_TYPE = 'type',
CATEGORY_DETAILS = 'planDetails',
}
const { t } = useI18n();
const statusOptions = [
{ label: t('equipment.checkPlan.enableText'), value: 'ENABLE' },
{ label: t('equipment.checkPlan.disabledText'), value: 'DISABLE' },
];
const typeOptions = [
{ label: t('equipment.checkPlan.inspectionText'), value: 'INSPECTION' },
{ label: t('equipment.checkPlan.maintenanceText'), value: 'MAINTENANCE' },
];
export const formSchema: FormSchema[] = [
{
field: FormFieldsEnum.CODE,
label: t('equipment.checkPlan.nameCode'),
component: 'Input',
componentProps() {
return {
disabled: 'disabled',
}
}
},
{
field: FormFieldsEnum.CATEGORY_NAME,
label: t('equipment.checkPlan.nameText'),
component: 'Input',
componentProps() {
return {
disabled: 'disabled',
};
},
},
{
field: FormFieldsEnum.CATEGORY_STATUS,
label: t('equipment.checkPlan.statusText'),
component: 'Select',
componentProps: {
options: statusOptions,
disabled: 'disabled',
},
},
{
field: FormFieldsEnum.CATEGORY_TYPE,
label: t('equipment.checkPlan.typeText'),
component: 'Select',
componentProps: {
options: typeOptions,
disabled: 'disabled',
},
},
{
field: FormFieldsEnum.CATEGORY_DETAILS,
label: t('equipment.checkPlan.nameDetail'),
component: 'InputTextArea',
componentProps() {
return {
disabled: 'disabled',
};
},
},
];