create.config.ts
1.26 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
import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
import { FormSchema, useComponentRegister } from '/@/components/Form';
import { RelationsQuery } from '/@/views/rule/designer/src/components/RelationsQuery';
import {
RelatedAttributesFieldsEnum,
RelatedAttributesFieldsNameEnum,
} from '../../../enum/formField/enrichment';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
useComponentRegister('RelationsQuery', RelationsQuery);
useComponentRegister('AttributeConfiguration', AttributeConfiguration);
export const formSchemas: FormSchema[] = [
{
field: RelatedAttributesFieldsEnum.RELATIONS_QUERY,
component: 'RelationsQuery',
label: t(RelatedAttributesFieldsNameEnum.RELATIONS_QUERY),
changeEvent: 'update:value',
valueField: 'value',
slot: RelatedAttributesFieldsEnum.RELATIONS_QUERY,
},
{
field: RelatedAttributesFieldsEnum.TELEMETRY,
component: 'Checkbox',
label: '',
renderComponentContent: () => ({
default: () => t(RelatedAttributesFieldsNameEnum.TELEMETRY),
}),
},
{
field: RelatedAttributesFieldsEnum.ATTR_MAPPING,
component: 'AttributeConfiguration',
label: '',
slot: RelatedAttributesFieldsEnum.ATTR_MAPPING,
},
];