Showing
58 changed files
with
505 additions
and
463 deletions
@@ -129,7 +129,7 @@ export interface FormSchema { | @@ -129,7 +129,7 @@ export interface FormSchema { | ||
129 | // Variable name bound to v-model Default value | 129 | // Variable name bound to v-model Default value |
130 | valueField?: string; | 130 | valueField?: string; |
131 | // Label name | 131 | // Label name |
132 | - label: string | VNode; | 132 | + label: string; |
133 | // Auxiliary text | 133 | // Auxiliary text |
134 | subLabel?: string; | 134 | subLabel?: string; |
135 | // Help text on the right side of the text | 135 | // Help text on the right side of the text |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | AssignToCustomerFieldsEnum, | 2 | AssignToCustomerFieldsEnum, |
4 | AssignToCustomerFieldsNameEnum, | 3 | AssignToCustomerFieldsNameEnum, |
@@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | @@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 12 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
14 | component: 'Input', | 13 | component: 'Input', |
15 | - label: h('span', t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)), | 14 | + label: t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN), |
16 | helpMessage: | 15 | helpMessage: |
17 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 16 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
18 | componentProps: { | 17 | componentProps: { |
19 | - placeholder: `请输入${AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN}`, | 18 | + placeholder: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)}`, |
20 | }, | 19 | }, |
21 | }, | 20 | }, |
22 | { | 21 | { |
@@ -24,18 +23,23 @@ export const formSchemas: FormSchema[] = [ | @@ -24,18 +23,23 @@ export const formSchemas: FormSchema[] = [ | ||
24 | component: 'Checkbox', | 23 | component: 'Checkbox', |
25 | label: '', | 24 | label: '', |
26 | renderComponentContent: () => ({ | 25 | renderComponentContent: () => ({ |
27 | - default: () => AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS, | 26 | + default: () => t(AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS), |
28 | }), | 27 | }), |
29 | }, | 28 | }, |
30 | { | 29 | { |
31 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 30 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
32 | component: 'InputNumber', | 31 | component: 'InputNumber', |
33 | - label: h('span', t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)), | ||
34 | - required: true, | 32 | + label: t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION), |
33 | + rules: [ | ||
34 | + { | ||
35 | + required: true, | ||
36 | + message: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, | ||
37 | + }, | ||
38 | + ], | ||
35 | helpMessage: | 39 | helpMessage: |
36 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 40 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
37 | componentProps: { | 41 | componentProps: { |
38 | - placeholder: `请输入${AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION}`, | 42 | + placeholder: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, |
39 | min: 0, | 43 | min: 0, |
40 | }, | 44 | }, |
41 | }, | 45 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 12 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
14 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
15 | - label: h('span', t(ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS)), | 14 | + label: t(ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS), |
16 | componentProps: { | 15 | componentProps: { |
17 | javaScriptEditorProps: { | 16 | javaScriptEditorProps: { |
18 | functionName: 'Details', | 17 | functionName: 'Details', |
@@ -25,10 +24,10 @@ export const formSchemas: FormSchema[] = [ | @@ -25,10 +24,10 @@ export const formSchemas: FormSchema[] = [ | ||
25 | { | 24 | { |
26 | field: ClearAlarmFieldsEnum.ALARM_TYPE, | 25 | field: ClearAlarmFieldsEnum.ALARM_TYPE, |
27 | component: 'Input', | 26 | component: 'Input', |
28 | - label: h('span', t(ClearAlarmFieldsNameEnum.ALARM_TYPE)), | 27 | + label: t(ClearAlarmFieldsNameEnum.ALARM_TYPE), |
29 | required: true, | 28 | required: true, |
30 | componentProps: { | 29 | componentProps: { |
31 | - placeholder: `请输入${ClearAlarmFieldsNameEnum.ALARM_TYPE}`, | 30 | + placeholder: `请输入${t(ClearAlarmFieldsNameEnum.ALARM_TYPE)}`, |
32 | }, | 31 | }, |
33 | }, | 32 | }, |
34 | ]; | 33 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
@@ -14,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | @@ -14,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | ||
14 | component: 'Checkbox', | 13 | component: 'Checkbox', |
15 | label: '', | 14 | label: '', |
16 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
17 | - default: () => CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA, | 16 | + default: () => t(CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA), |
18 | }), | 17 | }), |
19 | }, | 18 | }, |
20 | { | 19 | { |
@@ -23,13 +22,13 @@ export const formSchemas: FormSchema[] = [ | @@ -23,13 +22,13 @@ export const formSchemas: FormSchema[] = [ | ||
23 | label: '', | 22 | label: '', |
24 | show: ({ model }) => model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 23 | show: ({ model }) => model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
25 | renderComponentContent: () => ({ | 24 | renderComponentContent: () => ({ |
26 | - default: () => CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS, | 25 | + default: () => t(CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS), |
27 | }), | 26 | }), |
28 | }, | 27 | }, |
29 | { | 28 | { |
30 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 29 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
31 | component: 'JavascriptEditorWithTestModal', | 30 | component: 'JavascriptEditorWithTestModal', |
32 | - label: h('span', t(CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS)), | 31 | + label: t(CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS), |
33 | valueField: 'value', | 32 | valueField: 'value', |
34 | changeEvent: 'update:value', | 33 | changeEvent: 'update:value', |
35 | show: ({ model }) => | 34 | show: ({ model }) => |
@@ -49,13 +48,13 @@ export const formSchemas: FormSchema[] = [ | @@ -49,13 +48,13 @@ export const formSchemas: FormSchema[] = [ | ||
49 | { | 48 | { |
50 | field: CreateAlarmFieldsEnum.ALARM_TYPE, | 49 | field: CreateAlarmFieldsEnum.ALARM_TYPE, |
51 | component: 'Input', | 50 | component: 'Input', |
52 | - label: h('span', t(CreateAlarmFieldsNameEnum.ALARM_TYPE)), | 51 | + label: t(CreateAlarmFieldsNameEnum.ALARM_TYPE), |
53 | helpMessage: [ | 52 | helpMessage: [ |
54 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 53 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
55 | ], | 54 | ], |
56 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 55 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
57 | componentProps: { | 56 | componentProps: { |
58 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.ALARM_TYPE}`, | 57 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.ALARM_TYPE)}`, |
59 | }, | 58 | }, |
60 | }, | 59 | }, |
61 | { | 60 | { |
@@ -64,19 +63,19 @@ export const formSchemas: FormSchema[] = [ | @@ -64,19 +63,19 @@ export const formSchemas: FormSchema[] = [ | ||
64 | label: '', | 63 | label: '', |
65 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 64 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
66 | renderComponentContent: () => ({ | 65 | renderComponentContent: () => ({ |
67 | - default: () => CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY, | 66 | + default: () => t(CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY), |
68 | }), | 67 | }), |
69 | }, | 68 | }, |
70 | { | 69 | { |
71 | field: CreateAlarmFieldsEnum.SEVERITY, | 70 | field: CreateAlarmFieldsEnum.SEVERITY, |
72 | component: 'Input', | 71 | component: 'Input', |
73 | - label: h('span', t(CreateAlarmFieldsNameEnum.SEVERITY)), | 72 | + label: t(CreateAlarmFieldsNameEnum.SEVERITY), |
74 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 73 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
75 | helpMessage: [ | 74 | helpMessage: [ |
76 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', | 75 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', |
77 | ], | 76 | ], |
78 | componentProps: { | 77 | componentProps: { |
79 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.SEVERITY}`, | 78 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.SEVERITY)}`, |
80 | }, | 79 | }, |
81 | }, | 80 | }, |
82 | { | 81 | { |
@@ -85,18 +84,18 @@ export const formSchemas: FormSchema[] = [ | @@ -85,18 +84,18 @@ export const formSchemas: FormSchema[] = [ | ||
85 | label: '', | 84 | label: '', |
86 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 85 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
87 | renderComponentContent: () => ({ | 86 | renderComponentContent: () => ({ |
88 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE, | 87 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE), |
89 | }), | 88 | }), |
90 | }, | 89 | }, |
91 | { | 90 | { |
92 | field: CreateAlarmFieldsEnum.RELATION_TYPES, | 91 | field: CreateAlarmFieldsEnum.RELATION_TYPES, |
93 | component: 'Select', | 92 | component: 'Select', |
94 | - label: h('span', t(CreateAlarmFieldsNameEnum.RELATION_TYPES)), | 93 | + label: t(CreateAlarmFieldsNameEnum.RELATION_TYPES), |
95 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 94 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
96 | componentProps: { | 95 | componentProps: { |
97 | open: false, | 96 | open: false, |
98 | mode: 'tags', | 97 | mode: 'tags', |
99 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.RELATION_TYPES}`, | 98 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.RELATION_TYPES)}`, |
100 | }, | 99 | }, |
101 | }, | 100 | }, |
102 | { | 101 | { |
@@ -105,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | @@ -105,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | ||
105 | label: '', | 104 | label: '', |
106 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 105 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
107 | renderComponentContent: () => ({ | 106 | renderComponentContent: () => ({ |
108 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT, | 107 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT), |
109 | }), | 108 | }), |
110 | }, | 109 | }, |
111 | { | 110 | { |
@@ -114,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | @@ -114,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | ||
114 | label: '', | 113 | label: '', |
115 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 114 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
116 | renderComponentContent: () => ({ | 115 | renderComponentContent: () => ({ |
117 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER, | 116 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER), |
118 | }), | 117 | }), |
119 | }, | 118 | }, |
120 | ]; | 119 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | DirectionEnum, | 2 | DirectionEnum, |
4 | DirectionNameEnum, | 3 | DirectionNameEnum, |
@@ -18,21 +17,21 @@ export const formSchemas: FormSchema[] = [ | @@ -18,21 +17,21 @@ export const formSchemas: FormSchema[] = [ | ||
18 | { | 17 | { |
19 | field: CreateRelationFieldsEnum.DIRECTION, | 18 | field: CreateRelationFieldsEnum.DIRECTION, |
20 | component: 'Select', | 19 | component: 'Select', |
21 | - label: h('span', t(CreateRelationFieldsNameEnum.DIRECTION)), | ||
22 | - required: true, | 20 | + label: t(CreateRelationFieldsNameEnum.DIRECTION), |
21 | + rules: [{ required: true, message: `请选择${t(CreateRelationFieldsNameEnum.DIRECTION)}` }], | ||
23 | componentProps: { | 22 | componentProps: { |
24 | options: Object.keys(DirectionEnum).map((value) => ({ | 23 | options: Object.keys(DirectionEnum).map((value) => ({ |
25 | label: DirectionNameEnum[value], | 24 | label: DirectionNameEnum[value], |
26 | value, | 25 | value, |
27 | })), | 26 | })), |
28 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
29 | - placeholder: `请选择${CreateRelationFieldsNameEnum.DIRECTION}`, | 28 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.DIRECTION)}`, |
30 | }, | 29 | }, |
31 | }, | 30 | }, |
32 | { | 31 | { |
33 | field: CreateRelationFieldsEnum.ENTITY_TYPE, | 32 | field: CreateRelationFieldsEnum.ENTITY_TYPE, |
34 | component: 'Select', | 33 | component: 'Select', |
35 | - label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_TYPE)), | 34 | + label: t(CreateRelationFieldsNameEnum.ENTITY_TYPE), |
36 | colProps: { span: 8 }, | 35 | colProps: { span: 8 }, |
37 | required: true, | 36 | required: true, |
38 | componentProps: { | 37 | componentProps: { |
@@ -41,28 +40,29 @@ export const formSchemas: FormSchema[] = [ | @@ -41,28 +40,29 @@ export const formSchemas: FormSchema[] = [ | ||
41 | value, | 40 | value, |
42 | })), | 41 | })), |
43 | getPopupContainer: () => document.body, | 42 | getPopupContainer: () => document.body, |
44 | - placeholder: `请选择${CreateRelationFieldsNameEnum.ENTITY_TYPE}`, | 43 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE)}`, |
45 | }, | 44 | }, |
46 | }, | 45 | }, |
47 | { | 46 | { |
48 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, | 47 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, |
49 | component: 'Input', | 48 | component: 'Input', |
50 | - label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)), | 49 | + label: t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN), |
51 | colProps: { span: 8 }, | 50 | colProps: { span: 8 }, |
52 | - required: true, | ||
53 | helpMessage: [ | 51 | helpMessage: [ |
54 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 52 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
55 | ], | 53 | ], |
54 | + rules: [ | ||
55 | + { required: true, message: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}` }, | ||
56 | + ], | ||
56 | componentProps: { | 57 | componentProps: { |
57 | - placeholder: `请输入${CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN}`, | 58 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}`, |
58 | }, | 59 | }, |
59 | }, | 60 | }, |
60 | { | 61 | { |
61 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, | 62 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, |
62 | component: 'Input', | 63 | component: 'Input', |
63 | - label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)), | 64 | + label: t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN), |
64 | colProps: { span: 8 }, | 65 | colProps: { span: 8 }, |
65 | - required: true, | ||
66 | helpMessage: [ | 66 | helpMessage: [ |
67 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 67 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
68 | ], | 68 | ], |
@@ -70,25 +70,28 @@ export const formSchemas: FormSchema[] = [ | @@ -70,25 +70,28 @@ export const formSchemas: FormSchema[] = [ | ||
70 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; | 70 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; |
71 | return [EntityTypeEnum.ASSET, EntityTypeEnum.DEVICE].includes(type); | 71 | return [EntityTypeEnum.ASSET, EntityTypeEnum.DEVICE].includes(type); |
72 | }, | 72 | }, |
73 | + rules: [ | ||
74 | + { required: true, message: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)}` }, | ||
75 | + ], | ||
73 | componentProps: { | 76 | componentProps: { |
74 | - placeholder: `请选择${CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN}`, | 77 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)}`, |
75 | }, | 78 | }, |
76 | }, | 79 | }, |
77 | { | 80 | { |
78 | field: CreateRelationFieldsEnum.RELATION_TYPE, | 81 | field: CreateRelationFieldsEnum.RELATION_TYPE, |
79 | component: 'Input', | 82 | component: 'Input', |
80 | - label: h('span', t(CreateRelationFieldsNameEnum.RELATION_TYPE)), | 83 | + label: t(CreateRelationFieldsNameEnum.RELATION_TYPE), |
81 | helpMessage: [ | 84 | helpMessage: [ |
82 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 85 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
83 | ], | 86 | ], |
84 | componentProps: { | 87 | componentProps: { |
85 | - placeholder: `请输入${CreateRelationFieldsNameEnum.RELATION_TYPE}`, | 88 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.RELATION_TYPE)}`, |
86 | }, | 89 | }, |
87 | }, | 90 | }, |
88 | { | 91 | { |
89 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, | 92 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, |
90 | component: 'Checkbox', | 93 | component: 'Checkbox', |
91 | - label: h('span', t(CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS)), | 94 | + label: t(CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS), |
92 | helpMessage: '', | 95 | helpMessage: '', |
93 | show: ({ model }) => { | 96 | show: ({ model }) => { |
94 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; | 97 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; |
@@ -101,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | @@ -101,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | ||
101 | { | 104 | { |
102 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, | 105 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, |
103 | component: 'Checkbox', | 106 | component: 'Checkbox', |
104 | - label: h('span', t(CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS)), | 107 | + label: t(CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS), |
105 | renderComponentContent: () => ({ | 108 | renderComponentContent: () => ({ |
106 | default: () => | 109 | default: () => |
107 | 'Removes current relations from the originator of the incoming message based on direction and type.', | 110 | 'Removes current relations from the originator of the incoming message based on direction and type.', |
@@ -110,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | @@ -110,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | ||
110 | { | 113 | { |
111 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, | 114 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, |
112 | component: 'Checkbox', | 115 | component: 'Checkbox', |
113 | - label: h('span', t(CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY)), | 116 | + label: t(CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY), |
114 | renderComponentContent: () => ({ | 117 | renderComponentContent: () => ({ |
115 | default: () => 'Used to process submitted message as a message from another entity.', | 118 | default: () => 'Used to process submitted message as a message from another entity.', |
116 | }), | 119 | }), |
@@ -118,11 +121,11 @@ export const formSchemas: FormSchema[] = [ | @@ -118,11 +121,11 @@ export const formSchemas: FormSchema[] = [ | ||
118 | { | 121 | { |
119 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 122 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
120 | component: 'InputNumber', | 123 | component: 'InputNumber', |
121 | - label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)), | 124 | + label: t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION), |
122 | required: true, | 125 | required: true, |
123 | componentProps: { | 126 | componentProps: { |
124 | min: 0, | 127 | min: 0, |
125 | - placeholder: `请输入${CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION}`, | 128 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)}`, |
126 | }, | 129 | }, |
127 | }, | 130 | }, |
128 | ]; | 131 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | DelayDeprecatedFieldsEnum, | 2 | DelayDeprecatedFieldsEnum, |
4 | DelayDeprecatedFieldsNameEnum, | 3 | DelayDeprecatedFieldsNameEnum, |
@@ -11,7 +10,7 @@ const { t } = useI18n(); | @@ -11,7 +10,7 @@ const { t } = useI18n(); | ||
11 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
12 | { | 11 | { |
13 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, | 12 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, |
14 | - label: h('span', t(DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS)), | 13 | + label: t(DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS), |
15 | component: 'Checkbox', | 14 | component: 'Checkbox', |
16 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
17 | default: () => | 16 | default: () => |
@@ -21,34 +20,43 @@ export const formSchemas: FormSchema[] = [ | @@ -21,34 +20,43 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 20 | { |
22 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, | 21 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, |
23 | component: 'Input', | 22 | component: 'Input', |
24 | - label: h('span', t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN)), | ||
25 | - required: true, | 23 | + label: t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN), |
26 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 24 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
25 | + rules: [ | ||
26 | + { | ||
27 | + required: true, | ||
28 | + message: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN}`, | ||
29 | + }, | ||
30 | + ], | ||
27 | componentProps: { | 31 | componentProps: { |
28 | min: 0, | 32 | min: 0, |
29 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN}`, | 33 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN)}`, |
30 | }, | 34 | }, |
31 | }, | 35 | }, |
32 | { | 36 | { |
33 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, | 37 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, |
34 | component: 'InputNumber', | 38 | component: 'InputNumber', |
35 | - label: h('span', t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)), | ||
36 | - required: true, | 39 | + label: t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS), |
37 | ifShow: ({ model }) => | 40 | ifShow: ({ model }) => |
38 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 41 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
42 | + rules: [ | ||
43 | + { required: true, message: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)}` }, | ||
44 | + ], | ||
39 | componentProps: { | 45 | componentProps: { |
40 | min: 0, | 46 | min: 0, |
41 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS}`, | 47 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)}`, |
42 | }, | 48 | }, |
43 | }, | 49 | }, |
44 | { | 50 | { |
45 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, | 51 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, |
46 | component: 'InputNumber', | 52 | component: 'InputNumber', |
47 | - label: h('span', t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)), | ||
48 | - required: true, | 53 | + label: t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS), |
54 | + rules: [ | ||
55 | + { required: true, message: `请输入${t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)}` }, | ||
56 | + ], | ||
49 | componentProps: { | 57 | componentProps: { |
50 | min: 0, | 58 | min: 0, |
51 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS}`, | 59 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)}`, |
52 | }, | 60 | }, |
53 | }, | 61 | }, |
54 | ]; | 62 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | DirectionEnum, | 2 | DirectionEnum, |
4 | DirectionNameEnum, | 3 | DirectionNameEnum, |
@@ -18,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | { | 17 | { |
19 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, | 18 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, |
20 | component: 'Checkbox', | 19 | component: 'Checkbox', |
21 | - label: h('span', t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)), | 20 | + label: t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY), |
22 | renderComponentContent: () => ({ | 21 | renderComponentContent: () => ({ |
23 | default: () => | 22 | default: () => |
24 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', | 23 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', |
@@ -27,70 +26,82 @@ export const formSchemas: FormSchema[] = [ | @@ -27,70 +26,82 @@ export const formSchemas: FormSchema[] = [ | ||
27 | { | 26 | { |
28 | field: DeleteRelationFieldsEnum.DIRECTION, | 27 | field: DeleteRelationFieldsEnum.DIRECTION, |
29 | component: 'Select', | 28 | component: 'Select', |
30 | - label: h('span', t(DeleteRelationFieldsNameEnum.DIRECTION)), | ||
31 | - required: true, | 29 | + label: t(DeleteRelationFieldsNameEnum.DIRECTION), |
32 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 30 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
31 | + rules: [ | ||
32 | + { | ||
33 | + required: true, | ||
34 | + message: `请选择${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, | ||
35 | + }, | ||
36 | + ], | ||
33 | componentProps: { | 37 | componentProps: { |
34 | options: Object.keys(DirectionEnum).map((value) => ({ | 38 | options: Object.keys(DirectionEnum).map((value) => ({ |
35 | label: DirectionNameEnum[value], | 39 | label: DirectionNameEnum[value], |
36 | value, | 40 | value, |
37 | })), | 41 | })), |
38 | getPopupContainer: () => document.body, | 42 | getPopupContainer: () => document.body, |
39 | - placeholder: `请选择${DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY}`, | 43 | + placeholder: `请选择${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, |
40 | }, | 44 | }, |
41 | }, | 45 | }, |
42 | { | 46 | { |
43 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, | 47 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, |
44 | component: 'Select', | 48 | component: 'Select', |
45 | - label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)), | ||
46 | - required: true, | 49 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_TYPE), |
47 | colProps: { span: 12 }, | 50 | colProps: { span: 12 }, |
51 | + rules: [{ required: true, message: `请选择${t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)}` }], | ||
48 | componentProps: { | 52 | componentProps: { |
49 | options: Object.keys(EntityTypeEnum).map((value) => ({ | 53 | options: Object.keys(EntityTypeEnum).map((value) => ({ |
50 | label: EntityTypeNameEnum[value], | 54 | label: EntityTypeNameEnum[value], |
51 | value, | 55 | value, |
52 | })), | 56 | })), |
53 | getPopupContainer: () => document.body, | 57 | getPopupContainer: () => document.body, |
54 | - placeholder: `请选择${DeleteRelationFieldsNameEnum.ENTITY_TYPE}`, | 58 | + placeholder: `请选择${t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)}`, |
55 | }, | 59 | }, |
56 | }, | 60 | }, |
57 | { | 61 | { |
58 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, | 62 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, |
59 | component: 'Input', | 63 | component: 'Input', |
60 | - label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)), | ||
61 | - required: true, | 64 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN), |
62 | colProps: { span: 12 }, | 65 | colProps: { span: 12 }, |
63 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 66 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
64 | helpMessage: [ | 67 | helpMessage: [ |
65 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 68 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
66 | ], | 69 | ], |
70 | + rules: [ | ||
71 | + { required: true, message: `请输入${t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}` }, | ||
72 | + ], | ||
67 | componentProps: { | 73 | componentProps: { |
68 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN}`, | 74 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}`, |
69 | }, | 75 | }, |
70 | }, | 76 | }, |
71 | { | 77 | { |
72 | field: DeleteRelationFieldsEnum.RELATION_TYPE, | 78 | field: DeleteRelationFieldsEnum.RELATION_TYPE, |
73 | component: 'Input', | 79 | component: 'Input', |
74 | - label: h('span', t(DeleteRelationFieldsNameEnum.RELATION_TYPE)), | ||
75 | - required: true, | 80 | + label: t(DeleteRelationFieldsNameEnum.RELATION_TYPE), |
76 | helpMessage: [ | 81 | helpMessage: [ |
77 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 82 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
78 | ], | 83 | ], |
84 | + rules: [{ required: true, message: `请输入${t(DeleteRelationFieldsNameEnum.RELATION_TYPE)}` }], | ||
79 | componentProps: { | 85 | componentProps: { |
80 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.RELATION_TYPE}`, | 86 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.RELATION_TYPE)}`, |
81 | }, | 87 | }, |
82 | }, | 88 | }, |
83 | { | 89 | { |
84 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 90 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
85 | component: 'InputNumber', | 91 | component: 'InputNumber', |
86 | - label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)), | ||
87 | - required: true, | 92 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION), |
88 | helpMessage: [ | 93 | helpMessage: [ |
89 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', | 94 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', |
90 | ], | 95 | ], |
96 | + rules: [ | ||
97 | + { | ||
98 | + required: true, | ||
99 | + message: `请输入${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, | ||
100 | + }, | ||
101 | + ], | ||
91 | componentProps: { | 102 | componentProps: { |
92 | min: 0, | 103 | min: 0, |
93 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY}`, | 104 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, |
94 | }, | 105 | }, |
95 | }, | 106 | }, |
96 | ]; | 107 | ]; |
@@ -3,6 +3,9 @@ import { | @@ -3,6 +3,9 @@ import { | ||
3 | DeviceProfileFieldsNameEnum, | 3 | DeviceProfileFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
@@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | component: 'Checkbox', | 13 | component: 'Checkbox', |
11 | label: '', | 14 | label: '', |
12 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
13 | - default: () => DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE, | 16 | + default: () => t(DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE), |
14 | }), | 17 | }), |
15 | }, | 18 | }, |
16 | { | 19 | { |
@@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | component: 'Checkbox', | 21 | component: 'Checkbox', |
19 | label: '', | 22 | label: '', |
20 | renderComponentContent: () => ({ | 23 | renderComponentContent: () => ({ |
21 | - default: () => DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START, | 24 | + default: () => t(DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START), |
22 | }), | 25 | }), |
23 | }, | 26 | }, |
24 | ]; | 27 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { EntityTypeEnum, EntityTypeNameEnum } from '../../../enum/form'; | 1 | import { EntityTypeEnum, EntityTypeNameEnum } from '../../../enum/form'; |
3 | import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/formField/action'; |
4 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
@@ -14,34 +13,34 @@ export const formSchemas: FormSchema[] = [ | @@ -14,34 +13,34 @@ export const formSchemas: FormSchema[] = [ | ||
14 | { | 13 | { |
15 | field: GeneratorFieldsEnum.MSG_COUNT, | 14 | field: GeneratorFieldsEnum.MSG_COUNT, |
16 | component: 'InputNumber', | 15 | component: 'InputNumber', |
17 | - label: h('span', t(GeneratorFieldsNameEnum.MSG_COUNT)), | ||
18 | - required: true, | 16 | + label: t(GeneratorFieldsNameEnum.MSG_COUNT), |
17 | + rules: [{ required: true, message: `请输入${t(GeneratorFieldsNameEnum.MSG_COUNT)}` }], | ||
19 | componentProps: { | 18 | componentProps: { |
20 | min: 0, | 19 | min: 0, |
21 | - placeholder: `请输入${GeneratorFieldsNameEnum.MSG_COUNT}`, | 20 | + placeholder: `请输入${t(GeneratorFieldsNameEnum.MSG_COUNT)}`, |
22 | }, | 21 | }, |
23 | }, | 22 | }, |
24 | { | 23 | { |
25 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, | 24 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, |
26 | component: 'InputNumber', | 25 | component: 'InputNumber', |
27 | - label: h('span', t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)), | ||
28 | - required: true, | 26 | + label: t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS), |
27 | + rules: [{ required: true, message: `请输入${t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)}` }], | ||
29 | componentProps: { | 28 | componentProps: { |
30 | min: 0, | 29 | min: 0, |
31 | - placeholder: `请输入${GeneratorFieldsNameEnum.PERIOD_IN_SECONDS}`, | 30 | + placeholder: `请输入${t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)}`, |
32 | }, | 31 | }, |
33 | }, | 32 | }, |
34 | { | 33 | { |
35 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, | 34 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, |
36 | component: 'Select', | 35 | component: 'Select', |
37 | - label: h('span', t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE)), | 36 | + label: t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE), |
38 | colProps: { span: 8 }, | 37 | colProps: { span: 8 }, |
39 | componentProps: { | 38 | componentProps: { |
40 | options: Object.keys(EntityTypeEnum).map((value) => ({ | 39 | options: Object.keys(EntityTypeEnum).map((value) => ({ |
41 | label: EntityTypeNameEnum[value], | 40 | label: EntityTypeNameEnum[value], |
42 | value, | 41 | value, |
43 | })), | 42 | })), |
44 | - placeholder: `请选择${GeneratorFieldsNameEnum.ORIGINATOR_TYPE}`, | 43 | + placeholder: `请选择${t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE)}`, |
45 | getPopupContainer: () => document.body, | 44 | getPopupContainer: () => document.body, |
46 | }, | 45 | }, |
47 | }, | 46 | }, |
@@ -58,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | @@ -58,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | ||
58 | { | 57 | { |
59 | field: GeneratorFieldsEnum.JS_SCRIPT, | 58 | field: GeneratorFieldsEnum.JS_SCRIPT, |
60 | component: 'JavascriptEditorWithTestModal', | 59 | component: 'JavascriptEditorWithTestModal', |
61 | - label: h('span', t(GeneratorFieldsNameEnum.JS_SCRIPT)), | 60 | + label: t(GeneratorFieldsNameEnum.JS_SCRIPT), |
62 | valueField: 'value', | 61 | valueField: 'value', |
63 | changeEvent: 'update:value', | 62 | changeEvent: 'update:value', |
64 | componentProps: { | 63 | componentProps: { |
1 | -import { h } from 'vue'; | ||
2 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; | 1 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | GpsGeofencingEventsFieldsEnum, | 3 | GpsGeofencingEventsFieldsEnum, |
@@ -13,29 +12,41 @@ export const formSchemas: FormSchema[] = [ | @@ -13,29 +12,41 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, | 13 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, |
15 | component: 'Input', | 14 | component: 'Input', |
16 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)), | ||
17 | - required: true, | 15 | + label: t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME), |
16 | + rules: [ | ||
17 | + { | ||
18 | + required: true, | ||
19 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)}`, | ||
20 | + }, | ||
21 | + ], | ||
18 | componentProps: { | 22 | componentProps: { |
19 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME}`, | 23 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)}`, |
20 | }, | 24 | }, |
21 | }, | 25 | }, |
22 | { | 26 | { |
23 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, | 27 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, |
24 | component: 'Input', | 28 | component: 'Input', |
25 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)), | ||
26 | - required: true, | 29 | + label: t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME), |
30 | + rules: [ | ||
31 | + { | ||
32 | + required: true, | ||
33 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)}`, | ||
34 | + }, | ||
35 | + ], | ||
27 | componentProps: { | 36 | componentProps: { |
28 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME}`, | 37 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)}`, |
29 | }, | 38 | }, |
30 | }, | 39 | }, |
31 | { | 40 | { |
32 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, | 41 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, |
33 | component: 'Select', | 42 | component: 'Select', |
34 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)), | ||
35 | - required: true, | 43 | + label: t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE), |
44 | + rules: [ | ||
45 | + { required: true, message: `请选择${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)}` }, | ||
46 | + ], | ||
36 | componentProps: { | 47 | componentProps: { |
37 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), | 48 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), |
38 | - placeholder: `请选择${GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE}`, | 49 | + placeholder: `请选择${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)}`, |
39 | }, | 50 | }, |
40 | }, | 51 | }, |
41 | { | 52 | { |
@@ -43,143 +54,178 @@ export const formSchemas: FormSchema[] = [ | @@ -43,143 +54,178 @@ export const formSchemas: FormSchema[] = [ | ||
43 | component: 'Checkbox', | 54 | component: 'Checkbox', |
44 | label: '', | 55 | label: '', |
45 | renderComponentContent: () => ({ | 56 | renderComponentContent: () => ({ |
46 | - default: () => GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA, | 57 | + default: () => |
58 | + t(GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA), | ||
47 | }), | 59 | }), |
48 | }, | 60 | }, |
49 | { | 61 | { |
50 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, | 62 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, |
51 | component: 'Input', | 63 | component: 'Input', |
52 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)), | ||
53 | - required: true, | 64 | + label: t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME), |
54 | ifShow: ({ model }) => | 65 | ifShow: ({ model }) => |
55 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && | 66 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && |
56 | model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 67 | model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
68 | + rules: [ | ||
69 | + { | ||
70 | + required: true, | ||
71 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)}`, | ||
72 | + }, | ||
73 | + ], | ||
57 | componentProps: { | 74 | componentProps: { |
58 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME}`, | 75 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)}`, |
59 | }, | 76 | }, |
60 | }, | 77 | }, |
61 | { | 78 | { |
62 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, | 79 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, |
63 | component: 'Input', | 80 | component: 'Input', |
64 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)), | 81 | + label: t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION), |
65 | helpMessage: | 82 | helpMessage: |
66 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', | 83 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', |
67 | - required: true, | ||
68 | ifShow: ({ model }) => | 84 | ifShow: ({ model }) => |
69 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && | 85 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && |
70 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 86 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
87 | + rules: [ | ||
88 | + { | ||
89 | + required: true, | ||
90 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)}`, | ||
91 | + }, | ||
92 | + ], | ||
71 | componentProps: { | 93 | componentProps: { |
72 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION}`, | 94 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)}`, |
73 | }, | 95 | }, |
74 | }, | 96 | }, |
75 | { | 97 | { |
76 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, | 98 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, |
77 | component: 'InputNumber', | 99 | component: 'InputNumber', |
78 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)), | 100 | + label: t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE), |
79 | colProps: { span: 12 }, | 101 | colProps: { span: 12 }, |
80 | - required: true, | ||
81 | ifShow: ({ model }) => | 102 | ifShow: ({ model }) => |
82 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 103 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
83 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 104 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
105 | + rules: [ | ||
106 | + { required: true, message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)}` }, | ||
107 | + ], | ||
84 | componentProps: { | 108 | componentProps: { |
85 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE}`, | 109 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)}`, |
86 | }, | 110 | }, |
87 | }, | 111 | }, |
88 | { | 112 | { |
89 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, | 113 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, |
90 | component: 'InputNumber', | 114 | component: 'InputNumber', |
91 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE)), | 115 | + label: t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE), |
92 | colProps: { span: 12 }, | 116 | colProps: { span: 12 }, |
93 | ifShow: ({ model }) => | 117 | ifShow: ({ model }) => |
94 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 118 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
95 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 119 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
96 | componentProps: { | 120 | componentProps: { |
97 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE}`, | 121 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE)}`, |
98 | }, | 122 | }, |
99 | }, | 123 | }, |
100 | { | 124 | { |
101 | field: GpsGeofencingEventsFieldsEnum.RANGE, | 125 | field: GpsGeofencingEventsFieldsEnum.RANGE, |
102 | component: 'InputNumber', | 126 | component: 'InputNumber', |
103 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.RANGE)), | 127 | + label: t(GpsGeofencingEventsFieldsNameEnum.RANGE), |
104 | colProps: { span: 12 }, | 128 | colProps: { span: 12 }, |
105 | - required: true, | ||
106 | ifShow: ({ model }) => | 129 | ifShow: ({ model }) => |
107 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 130 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
108 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 131 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
132 | + rules: [{ required: true, message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.RANGE)}` }], | ||
109 | componentProps: { | 133 | componentProps: { |
110 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.RANGE}`, | 134 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.RANGE)}`, |
111 | }, | 135 | }, |
112 | }, | 136 | }, |
113 | { | 137 | { |
114 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, | 138 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, |
115 | component: 'Select', | 139 | component: 'Select', |
116 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)), | 140 | + label: t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT), |
117 | colProps: { span: 12 }, | 141 | colProps: { span: 12 }, |
118 | - required: true, | ||
119 | ifShow: ({ model }) => | 142 | ifShow: ({ model }) => |
120 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 143 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
121 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 144 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
145 | + rules: [ | ||
146 | + { required: true, message: `请选择${t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)}` }, | ||
147 | + ], | ||
122 | componentProps: { | 148 | componentProps: { |
123 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 149 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
124 | label: RangeUtilNameEnum[value], | 150 | label: RangeUtilNameEnum[value], |
125 | value, | 151 | value, |
126 | })), | 152 | })), |
127 | getPopupContainer: () => document.body, | 153 | getPopupContainer: () => document.body, |
128 | - placeholder: `请选择${GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT}`, | 154 | + placeholder: `请选择${t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)}`, |
129 | }, | 155 | }, |
130 | }, | 156 | }, |
131 | { | 157 | { |
132 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, | 158 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, |
133 | component: 'InputNumber', | 159 | component: 'InputNumber', |
134 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)), | 160 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION), |
135 | colProps: { span: 12 }, | 161 | colProps: { span: 12 }, |
136 | - required: true, | 162 | + rules: [ |
163 | + { | ||
164 | + required: true, | ||
165 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)}`, | ||
166 | + }, | ||
167 | + ], | ||
137 | componentProps: { | 168 | componentProps: { |
138 | min: 1, | 169 | min: 1, |
139 | max: 2147483647, | 170 | max: 2147483647, |
140 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION}`, | 171 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)}`, |
141 | }, | 172 | }, |
142 | }, | 173 | }, |
143 | { | 174 | { |
144 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, | 175 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, |
145 | component: 'Select', | 176 | component: 'Select', |
146 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)), | 177 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT), |
147 | colProps: { span: 12 }, | 178 | colProps: { span: 12 }, |
148 | - required: true, | 179 | + rules: [ |
180 | + { | ||
181 | + required: true, | ||
182 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)}`, | ||
183 | + }, | ||
184 | + ], | ||
149 | componentProps: { | 185 | componentProps: { |
150 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 186 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
151 | label: RangeUtilNameEnum[value], | 187 | label: RangeUtilNameEnum[value], |
152 | value, | 188 | value, |
153 | })), | 189 | })), |
154 | getPopupContainer: () => document.body, | 190 | getPopupContainer: () => document.body, |
155 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT}`, | 191 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)}`, |
156 | }, | 192 | }, |
157 | }, | 193 | }, |
158 | { | 194 | { |
159 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, | 195 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, |
160 | component: 'InputNumber', | 196 | component: 'InputNumber', |
161 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)), | 197 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION), |
162 | colProps: { span: 12 }, | 198 | colProps: { span: 12 }, |
163 | - required: true, | 199 | + rules: [ |
200 | + { | ||
201 | + required: true, | ||
202 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)}`, | ||
203 | + }, | ||
204 | + ], | ||
164 | componentProps: { | 205 | componentProps: { |
165 | min: 1, | 206 | min: 1, |
166 | max: 2147483647, | 207 | max: 2147483647, |
167 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION}`, | 208 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)}`, |
168 | }, | 209 | }, |
169 | }, | 210 | }, |
170 | { | 211 | { |
171 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, | 212 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, |
172 | component: 'Select', | 213 | component: 'Select', |
173 | - label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)), | 214 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT), |
174 | colProps: { span: 12 }, | 215 | colProps: { span: 12 }, |
175 | - required: true, | 216 | + rules: [ |
217 | + { | ||
218 | + required: true, | ||
219 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)}`, | ||
220 | + }, | ||
221 | + ], | ||
176 | componentProps: { | 222 | componentProps: { |
177 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 223 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
178 | label: RangeUtilNameEnum[value], | 224 | label: RangeUtilNameEnum[value], |
179 | value, | 225 | value, |
180 | })), | 226 | })), |
181 | getPopupContainer: () => document.body, | 227 | getPopupContainer: () => document.body, |
182 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT}`, | 228 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)}`, |
183 | }, | 229 | }, |
184 | }, | 230 | }, |
185 | ]; | 231 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
@@ -11,7 +10,7 @@ export const formSchemas: FormSchema[] = [ | @@ -11,7 +10,7 @@ export const formSchemas: FormSchema[] = [ | ||
11 | { | 10 | { |
12 | field: LogFieldsEnum.JS_SCRIPT, | 11 | field: LogFieldsEnum.JS_SCRIPT, |
13 | component: 'JavascriptEditorWithTestModal', | 12 | component: 'JavascriptEditorWithTestModal', |
14 | - label: h('span', t(LogFieldsNameEnum.JS_SCRIPT)), | 13 | + label: t(LogFieldsNameEnum.JS_SCRIPT), |
15 | valueField: 'value', | 14 | valueField: 'value', |
16 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
17 | componentProps: { | 16 | componentProps: { |
1 | -import { h } from 'vue'; | ||
2 | import { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 3 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -9,21 +8,21 @@ export const formSchemas: FormSchema[] = [ | @@ -9,21 +8,21 @@ export const formSchemas: FormSchema[] = [ | ||
9 | { | 8 | { |
10 | field: MessageCountFieldsEnum.INTERVAL, | 9 | field: MessageCountFieldsEnum.INTERVAL, |
11 | component: 'InputNumber', | 10 | component: 'InputNumber', |
12 | - label: h('span', t(MessageCountFieldsNameEnum.INTERVAL)), | ||
13 | - required: true, | 11 | + label: t(MessageCountFieldsNameEnum.INTERVAL), |
12 | + rules: [{ required: true, message: `请输入${t(MessageCountFieldsNameEnum.INTERVAL)}` }], | ||
14 | componentProps: { | 13 | componentProps: { |
15 | step: 1, | 14 | step: 1, |
16 | precision: 0, | 15 | precision: 0, |
17 | - placeholder: `请输入${MessageCountFieldsNameEnum.INTERVAL}`, | 16 | + placeholder: `请输入${t(MessageCountFieldsNameEnum.INTERVAL)}`, |
18 | }, | 17 | }, |
19 | }, | 18 | }, |
20 | { | 19 | { |
21 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, | 20 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, |
22 | component: 'Input', | 21 | component: 'Input', |
23 | - label: h('span', t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)), | ||
24 | - required: true, | 22 | + label: t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX), |
23 | + rules: [{ required: true, message: `请输入${t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)}` }], | ||
25 | componentProps: { | 24 | componentProps: { |
26 | - placeholder: `请输入${MessageCountFieldsNameEnum.TELEMETRY_PREFIX}`, | 25 | + placeholder: `请输入${t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)}`, |
27 | }, | 26 | }, |
28 | }, | 27 | }, |
29 | ]; | 28 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; | 1 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; |
3 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } from '../../../enum/formField/action'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -10,12 +9,12 @@ export const formSchemas: FormSchema[] = [ | @@ -10,12 +9,12 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 9 | { |
11 | field: PushToEdgeFieldsEnum.SCOPE, | 10 | field: PushToEdgeFieldsEnum.SCOPE, |
12 | component: 'Select', | 11 | component: 'Select', |
13 | - label: h('span', t(PushToEdgeFieldsNameEnum.SCOPE)), | ||
14 | - required: true, | 12 | + label: t(PushToEdgeFieldsNameEnum.SCOPE), |
13 | + rules: [{ required: true, message: `请选择${t(PushToEdgeFieldsNameEnum.SCOPE)}` }], | ||
15 | componentProps: { | 14 | componentProps: { |
16 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 15 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
17 | getPopupContainer: () => document.body, | 16 | getPopupContainer: () => document.body, |
18 | - placeholder: `请选择${PushToEdgeFieldsNameEnum.SCOPE}`, | 17 | + placeholder: `请选择${t(PushToEdgeFieldsNameEnum.SCOPE)}`, |
19 | }, | 18 | }, |
20 | }, | 19 | }, |
21 | ]; | 20 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 3 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -9,9 +8,9 @@ export const formSchemas: FormSchema[] = [ | @@ -9,9 +8,9 @@ export const formSchemas: FormSchema[] = [ | ||
9 | { | 8 | { |
10 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, | 9 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, |
11 | component: 'Input', | 10 | component: 'Input', |
12 | - label: h('span', t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE)), | 11 | + label: t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE), |
13 | componentProps: { | 12 | componentProps: { |
14 | - placeholder: `请输入${RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE}`, | 13 | + placeholder: `请输入${t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE)}`, |
15 | }, | 14 | }, |
16 | }, | 15 | }, |
17 | ]; | 16 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | RpcCallRequestFieldsEnum, | 2 | RpcCallRequestFieldsEnum, |
4 | RpcCallRequestFieldsNameEnum, | 3 | RpcCallRequestFieldsNameEnum, |
@@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | @@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, | 12 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, |
14 | component: 'InputNumber', | 13 | component: 'InputNumber', |
15 | - label: h('span', t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS)), | 14 | + label: t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS), |
16 | required: true, | 15 | required: true, |
17 | componentProps: { | 16 | componentProps: { |
18 | min: 0, | 17 | min: 0, |
19 | - placeholder: `请输入${RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS}`, | 18 | + placeholder: `请输入${t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS)}`, |
20 | }, | 19 | }, |
21 | }, | 20 | }, |
22 | ]; | 21 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; | 1 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | SaveAttributesFieldsEnum, | 3 | SaveAttributesFieldsEnum, |
@@ -13,18 +12,18 @@ export const formSchemas: FormSchema[] = [ | @@ -13,18 +12,18 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: SaveAttributesFieldsEnum.SCOPE, | 13 | field: SaveAttributesFieldsEnum.SCOPE, |
15 | component: 'Select', | 14 | component: 'Select', |
16 | - label: h('span', t(SaveAttributesFieldsNameEnum.SCOPE)), | 15 | + label: t(SaveAttributesFieldsNameEnum.SCOPE), |
17 | required: true, | 16 | required: true, |
18 | componentProps: { | 17 | componentProps: { |
19 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 18 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
20 | getPopupContainer: () => document.body, | 19 | getPopupContainer: () => document.body, |
21 | - placeholder: `请选择${SaveAttributesFieldsNameEnum.SCOPE}`, | 20 | + placeholder: `请选择${t(SaveAttributesFieldsNameEnum.SCOPE)}`, |
22 | }, | 21 | }, |
23 | }, | 22 | }, |
24 | { | 23 | { |
25 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, | 24 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, |
26 | component: 'Checkbox', | 25 | component: 'Checkbox', |
27 | - label: h('span', t(SaveAttributesFieldsNameEnum.NOTIFY_DEVICE)), | 26 | + label: t(SaveAttributesFieldsNameEnum.NOTIFY_DEVICE), |
28 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, | 27 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, |
29 | renderComponentContent: () => ({ | 28 | renderComponentContent: () => ({ |
30 | default: () => | 29 | default: () => |
@@ -20,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | { | 20 | { |
21 | field: SaveEventFieldsEnum.CONFIGURATION, | 21 | field: SaveEventFieldsEnum.CONFIGURATION, |
22 | component: 'JSONEditor', | 22 | component: 'JSONEditor', |
23 | - label: h('span', t(SaveEventFieldsNameEnum.CONFIGURATION)), | 23 | + label: t(SaveEventFieldsNameEnum.CONFIGURATION), |
24 | valueField: 'value', | 24 | valueField: 'value', |
25 | changeEvent: 'update:value', | 25 | changeEvent: 'update:value', |
26 | }, | 26 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | SaveTimeseriesFieldsEnum, | 2 | SaveTimeseriesFieldsEnum, |
4 | SaveTimeseriesFieldsNameEnum, | 3 | SaveTimeseriesFieldsNameEnum, |
@@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | @@ -12,11 +11,11 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, | 12 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, |
14 | component: 'InputNumber', | 13 | component: 'InputNumber', |
15 | - label: h('span', t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL)), | 14 | + label: t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL), |
16 | required: true, | 15 | required: true, |
17 | componentProps: { | 16 | componentProps: { |
18 | min: 0, | 17 | min: 0, |
19 | - placeholder: `请输入${SaveTimeseriesFieldsNameEnum.DEFAULT_TTL}`, | 18 | + placeholder: `请输入${t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL)}`, |
20 | }, | 19 | }, |
21 | }, | 20 | }, |
22 | { | 21 | { |
@@ -24,13 +23,13 @@ export const formSchemas: FormSchema[] = [ | @@ -24,13 +23,13 @@ export const formSchemas: FormSchema[] = [ | ||
24 | component: 'Checkbox', | 23 | component: 'Checkbox', |
25 | label: '', | 24 | label: '', |
26 | renderComponentContent: () => ({ | 25 | renderComponentContent: () => ({ |
27 | - default: () => SaveTimeseriesFieldsNameEnum.DEFAULT_TTL, | 26 | + default: () => t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL), |
28 | }), | 27 | }), |
29 | }, | 28 | }, |
30 | { | 29 | { |
31 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, | 30 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, |
32 | component: 'Checkbox', | 31 | component: 'Checkbox', |
33 | - label: h('span', t(SaveTimeseriesFieldsNameEnum.USE_SERVER_TS)), | 32 | + label: t(SaveTimeseriesFieldsNameEnum.USE_SERVER_TS), |
34 | renderComponentContent: () => ({ | 33 | renderComponentContent: () => ({ |
35 | default: () => | 34 | default: () => |
36 | 'Enable this setting to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).', | 35 | 'Enable this setting to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).', |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | SaveToCustomTableFieldsEnum, | 2 | SaveToCustomTableFieldsEnum, |
4 | SaveToCustomTableFieldsNameEnum, | 3 | SaveToCustomTableFieldsNameEnum, |
@@ -15,16 +14,16 @@ export const formSchemas: FormSchema[] = [ | @@ -15,16 +14,16 @@ export const formSchemas: FormSchema[] = [ | ||
15 | { | 14 | { |
16 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, | 15 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, |
17 | component: 'Input', | 16 | component: 'Input', |
18 | - label: h('span', t(SaveToCustomTableFieldsNameEnum.TABLE_NAME)), | 17 | + label: t(SaveToCustomTableFieldsNameEnum.TABLE_NAME), |
19 | required: true, | 18 | required: true, |
20 | componentProps: { | 19 | componentProps: { |
21 | - placeholder: `请输入${SaveToCustomTableFieldsEnum.TABLE_NAME}`, | 20 | + placeholder: `请输入${t(SaveToCustomTableFieldsNameEnum.TABLE_NAME)}`, |
22 | }, | 21 | }, |
23 | }, | 22 | }, |
24 | { | 23 | { |
25 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, | 24 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, |
26 | component: 'AttributeConfiguration', | 25 | component: 'AttributeConfiguration', |
27 | - label: h('span', t(SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING)), | 26 | + label: t(SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING), |
28 | required: true, | 27 | required: true, |
29 | valueField: 'value', | 28 | valueField: 'value', |
30 | changeEvent: 'update:value', | 29 | changeEvent: 'update:value', |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | UnassignFromCustomerFieldsEnum, | 2 | UnassignFromCustomerFieldsEnum, |
4 | UnassignFromCustomerFieldsNameEnum, | 3 | UnassignFromCustomerFieldsNameEnum, |
@@ -12,27 +11,27 @@ const { t } = useI18n(); | @@ -12,27 +11,27 @@ const { t } = useI18n(); | ||
12 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
13 | { | 12 | { |
14 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 13 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
15 | - label: h('span', t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)), | 14 | + label: t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN), |
16 | component: 'Input', | 15 | component: 'Input', |
17 | required: true, | 16 | required: true, |
18 | helpMessage: [ | 17 | helpMessage: [ |
19 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
20 | ], | 19 | ], |
21 | componentProps: { | 20 | componentProps: { |
22 | - placeholder: `请输入${UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN}`, | 21 | + placeholder: `请输入${t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)}`, |
23 | }, | 22 | }, |
24 | }, | 23 | }, |
25 | { | 24 | { |
26 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 25 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
27 | component: 'InputNumber', | 26 | component: 'InputNumber', |
28 | - label: h('span', t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)), | 27 | + label: t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION), |
29 | required: true, | 28 | required: true, |
30 | helpMessage: [ | 29 | helpMessage: [ |
31 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 30 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
32 | ], | 31 | ], |
33 | componentProps: { | 32 | componentProps: { |
34 | min: 0, | 33 | min: 0, |
35 | - placeholder: `请输入${UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION}`, | 34 | + placeholder: `请输入${t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, |
36 | }, | 35 | }, |
37 | }, | 36 | }, |
38 | ]; | 37 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | CalculateDeltaFieldsEnum, | 2 | CalculateDeltaFieldsEnum, |
4 | CalculateDeltaFieldsNameEnum, | 3 | CalculateDeltaFieldsNameEnum, |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, | 12 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, |
14 | component: 'Input', | 13 | component: 'Input', |
15 | - label: h('span', t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)), | 14 | + label: t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY), |
16 | colProps: { span: 8 }, | 15 | colProps: { span: 8 }, |
17 | rules: [ | 16 | rules: [ |
18 | { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}` }, | 17 | { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}` }, |
@@ -24,7 +23,7 @@ export const formSchemas: FormSchema[] = [ | @@ -24,7 +23,7 @@ export const formSchemas: FormSchema[] = [ | ||
24 | { | 23 | { |
25 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, | 24 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, |
26 | component: 'Input', | 25 | component: 'Input', |
27 | - label: h('span', t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)), | 26 | + label: t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY), |
28 | colProps: { span: 8 }, | 27 | colProps: { span: 8 }, |
29 | rules: [ | 28 | rules: [ |
30 | { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}` }, | 29 | { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}` }, |
@@ -36,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | @@ -36,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | ||
36 | { | 35 | { |
37 | field: CalculateDeltaFieldsEnum.ROUND, | 36 | field: CalculateDeltaFieldsEnum.ROUND, |
38 | component: 'InputNumber', | 37 | component: 'InputNumber', |
39 | - label: h('span', t(CalculateDeltaFieldsNameEnum.ROUND)), | 38 | + label: t(CalculateDeltaFieldsNameEnum.ROUND), |
40 | colProps: { span: 8 }, | 39 | colProps: { span: 8 }, |
41 | componentProps: { | 40 | componentProps: { |
42 | step: 1, | 41 | step: 1, |
@@ -77,7 +76,7 @@ export const formSchemas: FormSchema[] = [ | @@ -77,7 +76,7 @@ export const formSchemas: FormSchema[] = [ | ||
77 | { | 76 | { |
78 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, | 77 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, |
79 | component: 'Input', | 78 | component: 'Input', |
80 | - label: h('span', t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY)), | 79 | + label: t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY), |
81 | required: true, | 80 | required: true, |
82 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], | 81 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], |
83 | componentProps: { | 82 | componentProps: { |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | CustomerAttributesFieldsEnum, | 2 | CustomerAttributesFieldsEnum, |
4 | CustomerAttributesFieldsNameEnum, | 3 | CustomerAttributesFieldsNameEnum, |
@@ -25,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | @@ -25,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | ||
25 | { | 24 | { |
26 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, | 25 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, |
27 | component: 'AttributeConfiguration', | 26 | component: 'AttributeConfiguration', |
28 | - label: h('span', t(CustomerAttributesFieldsNameEnum.ATTR_MAPING)), | 27 | + label: t(CustomerAttributesFieldsNameEnum.ATTR_MAPING), |
29 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, | 28 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, |
30 | valueField: 'value', | 29 | valueField: 'value', |
31 | changeEvent: 'update:value', | 30 | changeEvent: 'update:value', |
1 | -import { h } from 'vue'; | ||
2 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; | 1 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | CustomerDetailsFieldsEnum, | 3 | CustomerDetailsFieldsEnum, |
@@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, | 13 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, |
15 | component: 'Select', | 14 | component: 'Select', |
16 | - label: h('span', t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)), | 15 | + label: t(CustomerDetailsFieldsNameEnum.DETAILS_LIST), |
17 | rules: [{ required: true, message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}` }], | 16 | rules: [{ required: true, message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}` }], |
18 | componentProps: { | 17 | componentProps: { |
19 | mode: 'multiple', | 18 | mode: 'multiple', |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | OriginatorAttributesEnum, | 2 | OriginatorAttributesEnum, |
4 | OriginatorAttributesNameEnum, | 3 | OriginatorAttributesNameEnum, |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, | 12 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, |
14 | component: 'Checkbox', | 13 | component: 'Checkbox', |
15 | - label: h('span', t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT)), | 14 | + label: t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT), |
16 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
17 | default: () => | 16 | default: () => |
18 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', | 17 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', |
@@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 20 | { |
22 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, | 21 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, |
23 | component: 'Select', | 22 | component: 'Select', |
24 | - label: h('span', t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)), | 23 | + label: t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES), |
25 | helpMessage: [ | 24 | helpMessage: [ |
26 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 25 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
27 | ], | 26 | ], |
@@ -34,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | @@ -34,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | ||
34 | { | 33 | { |
35 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, | 34 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, |
36 | component: 'Select', | 35 | component: 'Select', |
37 | - label: h('span', t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)), | 36 | + label: t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES), |
38 | helpMessage: [ | 37 | helpMessage: [ |
39 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 38 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
40 | ], | 39 | ], |
@@ -47,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | @@ -47,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | ||
47 | { | 46 | { |
48 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, | 47 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, |
49 | component: 'Select', | 48 | component: 'Select', |
50 | - label: h('span', t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)), | 49 | + label: t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES), |
51 | helpMessage: [ | 50 | helpMessage: [ |
52 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 51 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
53 | ], | 52 | ], |
@@ -60,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | @@ -60,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | ||
60 | { | 59 | { |
61 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, | 60 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, |
62 | component: 'Select', | 61 | component: 'Select', |
63 | - label: h('span', t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES)), | 62 | + label: t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES), |
64 | helpMessage: [ | 63 | helpMessage: [ |
65 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 64 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
66 | ], | 65 | ], |
@@ -73,7 +72,7 @@ export const formSchemas: FormSchema[] = [ | @@ -73,7 +72,7 @@ export const formSchemas: FormSchema[] = [ | ||
73 | { | 72 | { |
74 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, | 73 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, |
75 | component: 'Checkbox', | 74 | component: 'Checkbox', |
76 | - label: h('span', t(OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS)), | 75 | + label: t(OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS), |
77 | renderComponentContent: () => ({ | 76 | renderComponentContent: () => ({ |
78 | default: () => | 77 | default: () => |
79 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', | 78 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', |
1 | -import { h } from 'vue'; | ||
2 | import { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; | 1 | import { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 3 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: OriginatorFieldsEnum.FIELDS_MAPPING, | 12 | field: OriginatorFieldsEnum.FIELDS_MAPPING, |
14 | component: 'AttributeConfiguration', | 13 | component: 'AttributeConfiguration', |
15 | - label: h('span', t(OriginatorFieldsNameEnum.FIELDS_MAPPING)), | 14 | + label: t(OriginatorFieldsNameEnum.FIELDS_MAPPING), |
16 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, | 15 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, |
17 | valueField: 'value', | 16 | valueField: 'value', |
18 | changeEvent: 'update:value', | 17 | changeEvent: 'update:value', |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | AggregationEnum, | 2 | AggregationEnum, |
4 | AggregationNameEnum, | 3 | AggregationNameEnum, |
@@ -20,7 +19,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +19,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | { | 19 | { |
21 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, | 20 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, |
22 | component: 'Select', | 21 | component: 'Select', |
23 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES)), | 22 | + label: t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES), |
24 | componentProps: { | 23 | componentProps: { |
25 | mode: 'tags', | 24 | mode: 'tags', |
26 | open: false, | 25 | open: false, |
@@ -31,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -31,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
31 | { | 30 | { |
32 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, | 31 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, |
33 | component: 'Select', | 32 | component: 'Select', |
34 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)), | 33 | + label: t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE), |
35 | rules: [ | 34 | rules: [ |
36 | { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}` }, | 35 | { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}` }, |
37 | ], | 36 | ], |
@@ -44,7 +43,7 @@ export const formSchemas: FormSchema[] = [ | @@ -44,7 +43,7 @@ export const formSchemas: FormSchema[] = [ | ||
44 | { | 43 | { |
45 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, | 44 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, |
46 | component: 'Select', | 45 | component: 'Select', |
47 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)), | 46 | + label: t(OriginatorTelemetryFieldsNameEnum.AGGREGATION), |
48 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 47 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
49 | rules: [ | 48 | rules: [ |
50 | { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}` }, | 49 | { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}` }, |
@@ -61,20 +60,20 @@ export const formSchemas: FormSchema[] = [ | @@ -61,20 +60,20 @@ export const formSchemas: FormSchema[] = [ | ||
61 | { | 60 | { |
62 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, | 61 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, |
63 | component: 'Select', | 62 | component: 'Select', |
64 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.ORDER_BY)), | 63 | + label: t(OriginatorTelemetryFieldsNameEnum.ORDER_BY), |
65 | helpMessage: ['Select to choose telemetry sampling order.'], | 64 | helpMessage: ['Select to choose telemetry sampling order.'], |
66 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 65 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
67 | rules: [{ required: true, message: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}` }], | 66 | rules: [{ required: true, message: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}` }], |
68 | componentProps: { | 67 | componentProps: { |
69 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), | 68 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), |
70 | - placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}`, | 69 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.ORDER_BY)}`, |
71 | getPopupContainer: () => document.body, | 70 | getPopupContainer: () => document.body, |
72 | }, | 71 | }, |
73 | }, | 72 | }, |
74 | { | 73 | { |
75 | field: OriginatorTelemetryFieldsEnum.LIMIT, | 74 | field: OriginatorTelemetryFieldsEnum.LIMIT, |
76 | component: 'InputNumber', | 75 | component: 'InputNumber', |
77 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.LIMIT)), | 76 | + label: t(OriginatorTelemetryFieldsNameEnum.LIMIT), |
78 | helpMessage: [ | 77 | helpMessage: [ |
79 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", | 78 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", |
80 | ], | 79 | ], |
@@ -98,11 +97,11 @@ export const formSchemas: FormSchema[] = [ | @@ -98,11 +97,11 @@ export const formSchemas: FormSchema[] = [ | ||
98 | { | 97 | { |
99 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, | 98 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, |
100 | component: 'InputNumber', | 99 | component: 'InputNumber', |
101 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)), | 100 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL), |
102 | colProps: { span: 12 }, | 101 | colProps: { span: 12 }, |
103 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 102 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
104 | rules: [ | 103 | rules: [ |
105 | - { required: true, message: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL}` }, | 104 | + { required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)}` }, |
106 | ], | 105 | ], |
107 | componentProps: { | 106 | componentProps: { |
108 | step: 1, | 107 | step: 1, |
@@ -113,13 +112,13 @@ export const formSchemas: FormSchema[] = [ | @@ -113,13 +112,13 @@ export const formSchemas: FormSchema[] = [ | ||
113 | { | 112 | { |
114 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, | 113 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, |
115 | component: 'Select', | 114 | component: 'Select', |
116 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)), | 115 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT), |
117 | colProps: { span: 12 }, | 116 | colProps: { span: 12 }, |
118 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 117 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
119 | rules: [ | 118 | rules: [ |
120 | { | 119 | { |
121 | required: true, | 120 | required: true, |
122 | - message: `请选择${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT}`, | 121 | + message: `请选择${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)}`, |
123 | }, | 122 | }, |
124 | ], | 123 | ], |
125 | componentProps: { | 124 | componentProps: { |
@@ -134,7 +133,7 @@ export const formSchemas: FormSchema[] = [ | @@ -134,7 +133,7 @@ export const formSchemas: FormSchema[] = [ | ||
134 | { | 133 | { |
135 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, | 134 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, |
136 | component: 'InputNumber', | 135 | component: 'InputNumber', |
137 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)), | 136 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL), |
138 | colProps: { span: 12 }, | 137 | colProps: { span: 12 }, |
139 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 138 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
140 | rules: [ | 139 | rules: [ |
@@ -149,7 +148,7 @@ export const formSchemas: FormSchema[] = [ | @@ -149,7 +148,7 @@ export const formSchemas: FormSchema[] = [ | ||
149 | { | 148 | { |
150 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, | 149 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, |
151 | component: 'Select', | 150 | component: 'Select', |
152 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)), | 151 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT), |
153 | colProps: { span: 12 }, | 152 | colProps: { span: 12 }, |
154 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 153 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
155 | rules: [ | 154 | rules: [ |
@@ -170,7 +169,7 @@ export const formSchemas: FormSchema[] = [ | @@ -170,7 +169,7 @@ export const formSchemas: FormSchema[] = [ | ||
170 | { | 169 | { |
171 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, | 170 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, |
172 | component: 'Input', | 171 | component: 'Input', |
173 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)), | 172 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN), |
174 | helpMessage: [ | 173 | helpMessage: [ |
175 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 174 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
176 | ], | 175 | ], |
@@ -188,7 +187,7 @@ export const formSchemas: FormSchema[] = [ | @@ -188,7 +187,7 @@ export const formSchemas: FormSchema[] = [ | ||
188 | { | 187 | { |
189 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, | 188 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, |
190 | component: 'Input', | 189 | component: 'Input', |
191 | - label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)), | 190 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN), |
192 | helpMessage: [ | 191 | helpMessage: [ |
193 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 192 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
194 | ], | 193 | ], |
@@ -5,7 +5,7 @@ import { | @@ -5,7 +5,7 @@ import { | ||
5 | RelatedAttributesFieldsEnum, | 5 | RelatedAttributesFieldsEnum, |
6 | RelatedAttributesFieldsNameEnum, | 6 | RelatedAttributesFieldsNameEnum, |
7 | } from '../../../enum/formField/enrichment'; | 7 | } from '../../../enum/formField/enrichment'; |
8 | -import { h } from 'vue'; | 8 | + |
9 | import { useI18n } from '/@/hooks/web/useI18n'; | 9 | import { useI18n } from '/@/hooks/web/useI18n'; |
10 | const { t } = useI18n(); | 10 | const { t } = useI18n(); |
11 | 11 | ||
@@ -16,7 +16,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +16,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | { | 16 | { |
17 | field: RelatedAttributesFieldsEnum.RELATIONS_QUERY, | 17 | field: RelatedAttributesFieldsEnum.RELATIONS_QUERY, |
18 | component: 'RelationsQuery', | 18 | component: 'RelationsQuery', |
19 | - label: h('span', t(RelatedAttributesFieldsNameEnum.RELATIONS_QUERY)), | 19 | + label: t(RelatedAttributesFieldsNameEnum.RELATIONS_QUERY), |
20 | changeEvent: 'update:value', | 20 | changeEvent: 'update:value', |
21 | valueField: 'value', | 21 | valueField: 'value', |
22 | slot: RelatedAttributesFieldsEnum.RELATIONS_QUERY, | 22 | slot: RelatedAttributesFieldsEnum.RELATIONS_QUERY, |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | DirectionEnum, | 2 | DirectionEnum, |
4 | DirectionNameEnum, | 3 | DirectionNameEnum, |
@@ -46,7 +45,7 @@ export const formSchemas: FormSchema[] = [ | @@ -46,7 +45,7 @@ export const formSchemas: FormSchema[] = [ | ||
46 | { | 45 | { |
47 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, | 46 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, |
48 | component: 'Select', | 47 | component: 'Select', |
49 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION)), | 48 | + label: t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION), |
50 | colProps: { span: 12 }, | 49 | colProps: { span: 12 }, |
51 | rules: [ | 50 | rules: [ |
52 | { | 51 | { |
@@ -66,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | @@ -66,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | ||
66 | { | 65 | { |
67 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, | 66 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, |
68 | component: 'InputNumber', | 67 | component: 'InputNumber', |
69 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL)), | 68 | + label: t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL), |
70 | colProps: { span: 12 }, | 69 | colProps: { span: 12 }, |
71 | componentProps: { | 70 | componentProps: { |
72 | min: 1, | 71 | min: 1, |
@@ -76,7 +75,7 @@ export const formSchemas: FormSchema[] = [ | @@ -76,7 +75,7 @@ export const formSchemas: FormSchema[] = [ | ||
76 | { | 75 | { |
77 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, | 76 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, |
78 | component: 'Select', | 77 | component: 'Select', |
79 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE)), | 78 | + label: t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE), |
80 | componentProps: { | 79 | componentProps: { |
81 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 80 | options: Object.keys(RelationTypeEnum).map((value) => ({ |
82 | label: RelationTypeNameEnum[value], | 81 | label: RelationTypeNameEnum[value], |
@@ -89,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | @@ -89,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | ||
89 | { | 88 | { |
90 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, | 89 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, |
91 | component: 'ApiSelect', | 90 | component: 'ApiSelect', |
92 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES)), | 91 | + label: t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES), |
93 | componentProps: { | 92 | componentProps: { |
94 | mode: 'multiple', | 93 | mode: 'multiple', |
95 | api: getDeviceTypes, | 94 | api: getDeviceTypes, |
@@ -110,7 +109,7 @@ export const formSchemas: FormSchema[] = [ | @@ -110,7 +109,7 @@ export const formSchemas: FormSchema[] = [ | ||
110 | { | 109 | { |
111 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, | 110 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, |
112 | component: 'Select', | 111 | component: 'Select', |
113 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES)), | 112 | + label: t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES), |
114 | componentProps: { | 113 | componentProps: { |
115 | open: false, | 114 | open: false, |
116 | mode: 'tags', | 115 | mode: 'tags', |
@@ -120,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | @@ -120,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | ||
120 | { | 119 | { |
121 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, | 120 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, |
122 | component: 'Select', | 121 | component: 'Select', |
123 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES)), | 122 | + label: t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES), |
124 | componentProps: { | 123 | componentProps: { |
125 | open: false, | 124 | open: false, |
126 | mode: 'tags', | 125 | mode: 'tags', |
@@ -130,7 +129,7 @@ export const formSchemas: FormSchema[] = [ | @@ -130,7 +129,7 @@ export const formSchemas: FormSchema[] = [ | ||
130 | { | 129 | { |
131 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, | 130 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, |
132 | component: 'Select', | 131 | component: 'Select', |
133 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES)), | 132 | + label: t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES), |
134 | componentProps: { | 133 | componentProps: { |
135 | open: false, | 134 | open: false, |
136 | mode: 'tags', | 135 | mode: 'tags', |
@@ -140,7 +139,7 @@ export const formSchemas: FormSchema[] = [ | @@ -140,7 +139,7 @@ export const formSchemas: FormSchema[] = [ | ||
140 | { | 139 | { |
141 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, | 140 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, |
142 | component: 'Select', | 141 | component: 'Select', |
143 | - label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES)), | 142 | + label: t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES), |
144 | componentProps: { | 143 | componentProps: { |
145 | open: false, | 144 | open: false, |
146 | mode: 'tags', | 145 | mode: 'tags', |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | TenantAttributesFieldsEnum, | 2 | TenantAttributesFieldsEnum, |
4 | TenantAttributesFieldsNameEnum, | 3 | TenantAttributesFieldsNameEnum, |
@@ -25,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | @@ -25,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | ||
25 | { | 24 | { |
26 | field: TenantAttributesFieldsEnum.ATTR_MAPING, | 25 | field: TenantAttributesFieldsEnum.ATTR_MAPING, |
27 | component: 'AttributeConfiguration', | 26 | component: 'AttributeConfiguration', |
28 | - label: h('span', t(TenantAttributesFieldsNameEnum.ATTR_MAPING)), | 27 | + label: t(TenantAttributesFieldsNameEnum.ATTR_MAPING), |
29 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, | 28 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, |
30 | valueField: 'value', | 29 | valueField: 'value', |
31 | changeEvent: 'update:value', | 30 | changeEvent: 'update:value', |
1 | -import { h } from 'vue'; | ||
2 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; | 1 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | TenantDetailsFieldsEnum, | 3 | TenantDetailsFieldsEnum, |
@@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: TenantDetailsFieldsEnum.DETAILS_LIST, | 13 | field: TenantDetailsFieldsEnum.DETAILS_LIST, |
15 | component: 'Select', | 14 | component: 'Select', |
16 | - label: h('span', t(TenantDetailsFieldsNameEnum.DETAILS_LIST)), | 15 | + label: t(TenantDetailsFieldsNameEnum.DETAILS_LIST), |
17 | rules: [{ required: true, message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}` }], | 16 | rules: [{ required: true, message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}` }], |
18 | componentProps: { | 17 | componentProps: { |
19 | mode: 'multiple', | 18 | mode: 'multiple', |
1 | -import { h } from 'vue'; | ||
2 | import { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 3 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -9,7 +8,7 @@ export const formSchemas: FormSchema[] = [ | @@ -9,7 +8,7 @@ export const formSchemas: FormSchema[] = [ | ||
9 | { | 8 | { |
10 | field: AlarmNoticeFieldsEnum.CONFIGURATION, | 9 | field: AlarmNoticeFieldsEnum.CONFIGURATION, |
11 | component: 'JSONEditor', | 10 | component: 'JSONEditor', |
12 | - label: h('span', t(AlarmNoticeFieldsNameEnum.CONFIGURATION)), | 11 | + label: t(AlarmNoticeFieldsNameEnum.CONFIGURATION), |
13 | valueField: 'value', | 12 | valueField: 'value', |
14 | changeEvent: 'update:value', | 13 | changeEvent: 'update:value', |
15 | }, | 14 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 3 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -8,38 +7,38 @@ const { t } = useI18n(); | @@ -8,38 +7,38 @@ const { t } = useI18n(); | ||
8 | export const formSchemas: FormSchema[] = [ | 7 | export const formSchemas: FormSchema[] = [ |
9 | { | 8 | { |
10 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, | 9 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, |
11 | - label: h('span', t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN)), | 10 | + label: t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN), |
12 | component: 'Input', | 11 | component: 'Input', |
13 | required: true, | 12 | required: true, |
14 | componentProps: { | 13 | componentProps: { |
15 | - placeholder: `请输入${AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN}`, | 14 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN)}`, |
16 | }, | 15 | }, |
17 | }, | 16 | }, |
18 | { | 17 | { |
19 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, | 18 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, |
20 | - label: h('span', t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID)), | 19 | + label: t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID), |
21 | component: 'Input', | 20 | component: 'Input', |
22 | required: true, | 21 | required: true, |
23 | componentProps: { | 22 | componentProps: { |
24 | - placeholder: `请输入${AwsSnsFieldsNameEnum.ACCESS_KEY_ID}`, | 23 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID)}`, |
25 | }, | 24 | }, |
26 | }, | 25 | }, |
27 | { | 26 | { |
28 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, | 27 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, |
29 | - label: h('span', t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY)), | 28 | + label: t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY), |
30 | component: 'Input', | 29 | component: 'Input', |
31 | required: true, | 30 | required: true, |
32 | componentProps: { | 31 | componentProps: { |
33 | - placeholder: `请输入${AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY}`, | 32 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
34 | }, | 33 | }, |
35 | }, | 34 | }, |
36 | { | 35 | { |
37 | field: AwsSnsFieldsEnum.REGION, | 36 | field: AwsSnsFieldsEnum.REGION, |
38 | - label: h('span', t(AwsSnsFieldsNameEnum.REGION)), | 37 | + label: t(AwsSnsFieldsNameEnum.REGION), |
39 | component: 'Input', | 38 | component: 'Input', |
40 | required: true, | 39 | required: true, |
41 | componentProps: { | 40 | componentProps: { |
42 | - placeholder: `请输入${AwsSnsFieldsNameEnum.REGION}`, | 41 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.REGION)}`, |
43 | }, | 42 | }, |
44 | }, | 43 | }, |
45 | ]; | 44 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; | 1 | import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; |
3 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; |
4 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; | 3 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; |
@@ -12,7 +11,7 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | @@ -12,7 +11,7 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | ||
12 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
13 | { | 12 | { |
14 | field: AwsSqsFieldsEnum.QUEUE_TYPE, | 13 | field: AwsSqsFieldsEnum.QUEUE_TYPE, |
15 | - label: h('span', t(AwsSqsFieldsNameEnum.QUEUE_TYPE)), | 14 | + label: t(AwsSqsFieldsNameEnum.QUEUE_TYPE), |
16 | component: 'Select', | 15 | component: 'Select', |
17 | required: true, | 16 | required: true, |
18 | componentProps: { | 17 | componentProps: { |
@@ -21,21 +20,21 @@ export const formSchemas: FormSchema[] = [ | @@ -21,21 +20,21 @@ export const formSchemas: FormSchema[] = [ | ||
21 | value, | 20 | value, |
22 | })), | 21 | })), |
23 | getPopupContainer: () => document.body, | 22 | getPopupContainer: () => document.body, |
24 | - placeholder: `请选择${AwsSqsFieldsNameEnum.QUEUE_TYPE}`, | 23 | + placeholder: `请选择${t(t(AwsSqsFieldsNameEnum.QUEUE_TYPE))}`, |
25 | }, | 24 | }, |
26 | }, | 25 | }, |
27 | { | 26 | { |
28 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, | 27 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, |
29 | - label: h('span', t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN)), | 28 | + label: t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN), |
30 | component: 'Input', | 29 | component: 'Input', |
31 | required: true, | 30 | required: true, |
32 | componentProps: { | 31 | componentProps: { |
33 | - placeholder: `请输入${AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN}`, | 32 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN)}`, |
34 | }, | 33 | }, |
35 | }, | 34 | }, |
36 | { | 35 | { |
37 | field: AwsSqsFieldsEnum.DELAY_SECONDS, | 36 | field: AwsSqsFieldsEnum.DELAY_SECONDS, |
38 | - label: h('span', t(AwsSqsFieldsNameEnum.DELAY_SECONDS)), | 37 | + label: t(AwsSqsFieldsNameEnum.DELAY_SECONDS), |
39 | component: 'Input', | 38 | component: 'Input', |
40 | required: true, | 39 | required: true, |
41 | helpMessage: [ | 40 | helpMessage: [ |
@@ -43,12 +42,12 @@ export const formSchemas: FormSchema[] = [ | @@ -43,12 +42,12 @@ export const formSchemas: FormSchema[] = [ | ||
43 | ], | 42 | ], |
44 | show: ({ model }) => model[AwsSqsFieldsEnum.QUEUE_TYPE] === QueueTypeEnum.STANDARD, | 43 | show: ({ model }) => model[AwsSqsFieldsEnum.QUEUE_TYPE] === QueueTypeEnum.STANDARD, |
45 | componentProps: { | 44 | componentProps: { |
46 | - placeholder: `请输入${AwsSqsFieldsNameEnum.DELAY_SECONDS}`, | 45 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.DELAY_SECONDS)}`, |
47 | }, | 46 | }, |
48 | }, | 47 | }, |
49 | { | 48 | { |
50 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, | 49 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, |
51 | - label: h('span', t(AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES)), | 50 | + label: t(AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES), |
52 | component: 'AttributeConfiguration', | 51 | component: 'AttributeConfiguration', |
53 | helpMessage: | 52 | helpMessage: |
54 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', | 53 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', |
@@ -56,29 +55,29 @@ export const formSchemas: FormSchema[] = [ | @@ -56,29 +55,29 @@ export const formSchemas: FormSchema[] = [ | ||
56 | }, | 55 | }, |
57 | { | 56 | { |
58 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, | 57 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, |
59 | - label: h('span', t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID)), | 58 | + label: t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID), |
60 | component: 'Input', | 59 | component: 'Input', |
61 | required: true, | 60 | required: true, |
62 | componentProps: { | 61 | componentProps: { |
63 | - placeholder: `请输入${AwsSqsFieldsNameEnum.ACCESS_KEY_ID}`, | 62 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID)}`, |
64 | }, | 63 | }, |
65 | }, | 64 | }, |
66 | { | 65 | { |
67 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, | 66 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, |
68 | - label: h('span', t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY)), | 67 | + label: t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY), |
69 | component: 'Input', | 68 | component: 'Input', |
70 | required: true, | 69 | required: true, |
71 | componentProps: { | 70 | componentProps: { |
72 | - placeholder: `请输入${AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY}`, | 71 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
73 | }, | 72 | }, |
74 | }, | 73 | }, |
75 | { | 74 | { |
76 | field: AwsSqsFieldsEnum.REGION, | 75 | field: AwsSqsFieldsEnum.REGION, |
77 | - label: h('span', t(AwsSqsFieldsNameEnum.REGION)), | 76 | + label: t(AwsSqsFieldsNameEnum.REGION), |
78 | component: 'Input', | 77 | component: 'Input', |
79 | required: true, | 78 | required: true, |
80 | componentProps: { | 79 | componentProps: { |
81 | - placeholder: `请输入${AwsSqsFieldsNameEnum.REGION}`, | 80 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.REGION)}`, |
82 | }, | 81 | }, |
83 | }, | 82 | }, |
84 | ]; | 83 | ]; |
@@ -3,6 +3,9 @@ import { | @@ -3,6 +3,9 @@ import { | ||
3 | AzureIotHubFieldsNameEnum, | 3 | AzureIotHubFieldsNameEnum, |
4 | } from '../../../../enum/formField/external'; | 4 | } from '../../../../enum/formField/external'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export enum CredentialsTypeEnum { | 10 | export enum CredentialsTypeEnum { |
8 | PEM = 'cert.PEM', | 11 | PEM = 'cert.PEM', |
@@ -53,7 +56,7 @@ export const formSchemas = ( | @@ -53,7 +56,7 @@ export const formSchemas = ( | ||
53 | return [ | 56 | return [ |
54 | { | 57 | { |
55 | field: AzureIotHubFieldsEnum.TYPE, | 58 | field: AzureIotHubFieldsEnum.TYPE, |
56 | - label: AzureIotHubFieldsNameEnum.TYPE, | 59 | + label: t(AzureIotHubFieldsNameEnum.TYPE), |
57 | component: 'Select', | 60 | component: 'Select', |
58 | required: true, | 61 | required: true, |
59 | defaultValue: CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, | 62 | defaultValue: CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, |
@@ -61,8 +64,9 @@ export const formSchemas = ( | @@ -61,8 +64,9 @@ export const formSchemas = ( | ||
61 | const { setFieldsValue } = formActionType; | 64 | const { setFieldsValue } = formActionType; |
62 | return { | 65 | return { |
63 | options: credentialsTypeOptions, | 66 | options: credentialsTypeOptions, |
64 | - placeholder: `请选择${AzureIotHubFieldsNameEnum.TYPE}`, | 67 | + placeholder: `请选择${t(AzureIotHubFieldsNameEnum.TYPE)}`, |
65 | getPopupContainer: () => document.body, | 68 | getPopupContainer: () => document.body, |
69 | + allowClear: false, | ||
66 | onChange( | 70 | onChange( |
67 | value: CredentialsTypeEnum, | 71 | value: CredentialsTypeEnum, |
68 | option: { label: CredentialsTypeNameEnum; value: CredentialsTypeEnum } | 72 | option: { label: CredentialsTypeNameEnum; value: CredentialsTypeEnum } |
@@ -84,24 +88,24 @@ export const formSchemas = ( | @@ -84,24 +88,24 @@ export const formSchemas = ( | ||
84 | }, | 88 | }, |
85 | { | 89 | { |
86 | field: AzureIotHubFieldsEnum.SAS_KEY, | 90 | field: AzureIotHubFieldsEnum.SAS_KEY, |
87 | - label: AzureIotHubFieldsNameEnum.SAS_KEY, | 91 | + label: t(AzureIotHubFieldsNameEnum.SAS_KEY), |
88 | required: true, | 92 | required: true, |
89 | component: 'Input', | 93 | component: 'Input', |
90 | ifShow: ({ model }) => | 94 | ifShow: ({ model }) => |
91 | model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, | 95 | model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, |
92 | componentProps: { | 96 | componentProps: { |
93 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.SAS_KEY}`, | 97 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.SAS_KEY)}`, |
94 | }, | 98 | }, |
95 | }, | 99 | }, |
96 | { | 100 | { |
97 | field: AzureIotHubFieldsEnum.CA_CERT_FILE_NAME, | 101 | field: AzureIotHubFieldsEnum.CA_CERT_FILE_NAME, |
98 | - label: AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME, | 102 | + label: t(AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME), |
99 | component: 'InputPassword', | 103 | component: 'InputPassword', |
100 | show: false, | 104 | show: false, |
101 | }, | 105 | }, |
102 | { | 106 | { |
103 | field: AzureIotHubFieldsEnum.CA_CERT, | 107 | field: AzureIotHubFieldsEnum.CA_CERT, |
104 | - label: AzureIotHubFieldsNameEnum.CA_CERT, | 108 | + label: t(AzureIotHubFieldsNameEnum.CA_CERT), |
105 | component: 'ApiUpload', | 109 | component: 'ApiUpload', |
106 | valueField: 'fileList', | 110 | valueField: 'fileList', |
107 | changeEvent: 'update:fileList', | 111 | changeEvent: 'update:fileList', |
@@ -118,13 +122,13 @@ export const formSchemas = ( | @@ -118,13 +122,13 @@ export const formSchemas = ( | ||
118 | }, | 122 | }, |
119 | { | 123 | { |
120 | field: AzureIotHubFieldsEnum.CERT_FILE_NAME, | 124 | field: AzureIotHubFieldsEnum.CERT_FILE_NAME, |
121 | - label: AzureIotHubFieldsNameEnum.CERT_FILE_NAME, | 125 | + label: t(AzureIotHubFieldsNameEnum.CERT_FILE_NAME), |
122 | component: 'InputPassword', | 126 | component: 'InputPassword', |
123 | show: false, | 127 | show: false, |
124 | }, | 128 | }, |
125 | { | 129 | { |
126 | field: AzureIotHubFieldsEnum.CERT, | 130 | field: AzureIotHubFieldsEnum.CERT, |
127 | - label: AzureIotHubFieldsNameEnum.CERT, | 131 | + label: t(AzureIotHubFieldsNameEnum.CERT), |
128 | component: 'ApiUpload', | 132 | component: 'ApiUpload', |
129 | valueField: 'fileList', | 133 | valueField: 'fileList', |
130 | changeEvent: 'update:fileList', | 134 | changeEvent: 'update:fileList', |
@@ -143,13 +147,13 @@ export const formSchemas = ( | @@ -143,13 +147,13 @@ export const formSchemas = ( | ||
143 | }, | 147 | }, |
144 | { | 148 | { |
145 | field: AzureIotHubFieldsEnum.PRIVATE_KEY_FILE_NAME, | 149 | field: AzureIotHubFieldsEnum.PRIVATE_KEY_FILE_NAME, |
146 | - label: AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME, | 150 | + label: t(AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME), |
147 | component: 'InputPassword', | 151 | component: 'InputPassword', |
148 | show: false, | 152 | show: false, |
149 | }, | 153 | }, |
150 | { | 154 | { |
151 | field: AzureIotHubFieldsEnum.PRIVATE_KEY, | 155 | field: AzureIotHubFieldsEnum.PRIVATE_KEY, |
152 | - label: AzureIotHubFieldsNameEnum.PRIVATE_KEY, | 156 | + label: t(AzureIotHubFieldsNameEnum.PRIVATE_KEY), |
153 | component: 'ApiUpload', | 157 | component: 'ApiUpload', |
154 | valueField: 'fileList', | 158 | valueField: 'fileList', |
155 | changeEvent: 'update:fileList', | 159 | changeEvent: 'update:fileList', |
@@ -168,11 +172,11 @@ export const formSchemas = ( | @@ -168,11 +172,11 @@ export const formSchemas = ( | ||
168 | }, | 172 | }, |
169 | { | 173 | { |
170 | field: AzureIotHubFieldsEnum.PASSWORD, | 174 | field: AzureIotHubFieldsEnum.PASSWORD, |
171 | - label: AzureIotHubFieldsNameEnum.PASSWORD, | 175 | + label: t(AzureIotHubFieldsNameEnum.PASSWORD), |
172 | component: 'InputPassword', | 176 | component: 'InputPassword', |
173 | ifShow: ({ model }) => model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.PEM, | 177 | ifShow: ({ model }) => model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.PEM, |
174 | componentProps: { | 178 | componentProps: { |
175 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.PASSWORD}`, | 179 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.PASSWORD)}`, |
176 | }, | 180 | }, |
177 | }, | 181 | }, |
178 | ]; | 182 | ]; |
1 | import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import { CredentialsCard } from './CredentialsCard'; | 3 | import { CredentialsCard } from './CredentialsCard'; |
4 | -import { h } from 'vue'; | 4 | + |
5 | import { useI18n } from '/@/hooks/web/useI18n'; | 5 | import { useI18n } from '/@/hooks/web/useI18n'; |
6 | 6 | ||
7 | const { t } = useI18n(); | 7 | const { t } = useI18n(); |
@@ -11,31 +11,31 @@ useComponentRegister('CredentialsCard', CredentialsCard); | @@ -11,31 +11,31 @@ useComponentRegister('CredentialsCard', CredentialsCard); | ||
11 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
12 | { | 12 | { |
13 | field: AzureIotHubFieldsEnum.TOPIC_PATTERN, | 13 | field: AzureIotHubFieldsEnum.TOPIC_PATTERN, |
14 | - label: h('span', t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN)), | 14 | + label: t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN), |
15 | component: 'Input', | 15 | component: 'Input', |
16 | required: true, | 16 | required: true, |
17 | helpMessage: | 17 | helpMessage: |
18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
19 | componentProps: { | 19 | componentProps: { |
20 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.TOPIC_PATTERN}`, | 20 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN)}`, |
21 | }, | 21 | }, |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | field: AzureIotHubFieldsEnum.HOST, | 24 | field: AzureIotHubFieldsEnum.HOST, |
25 | - label: h('span', t(AzureIotHubFieldsNameEnum.HOST)), | 25 | + label: t(AzureIotHubFieldsNameEnum.HOST), |
26 | component: 'Input', | 26 | component: 'Input', |
27 | required: true, | 27 | required: true, |
28 | componentProps: { | 28 | componentProps: { |
29 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.HOST}`, | 29 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.HOST)}`, |
30 | }, | 30 | }, |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | field: AzureIotHubFieldsEnum.CLIENT_ID, | 33 | field: AzureIotHubFieldsEnum.CLIENT_ID, |
34 | - label: h('span', t(AzureIotHubFieldsNameEnum.CLIENT_ID)), | 34 | + label: t(AzureIotHubFieldsNameEnum.CLIENT_ID), |
35 | component: 'Input', | 35 | component: 'Input', |
36 | required: true, | 36 | required: true, |
37 | componentProps: { | 37 | componentProps: { |
38 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.CLIENT_ID}`, | 38 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.CLIENT_ID)}`, |
39 | }, | 39 | }, |
40 | }, | 40 | }, |
41 | { | 41 | { |
@@ -2,7 +2,7 @@ import { GcpPubsubFieldsEnum, GcpPubsubFieldsNameEnum } from '../../../enum/form | @@ -2,7 +2,7 @@ import { GcpPubsubFieldsEnum, GcpPubsubFieldsNameEnum } from '../../../enum/form | ||
2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
3 | import { FileItemType, getFileData } from '../AzureIotHub/CredentialsCard/config'; | 3 | import { FileItemType, getFileData } from '../AzureIotHub/CredentialsCard/config'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | -import { h } from 'vue'; | 5 | + |
6 | import { useI18n } from '/@/hooks/web/useI18n'; | 6 | import { useI18n } from '/@/hooks/web/useI18n'; |
7 | 7 | ||
8 | const { t } = useI18n(); | 8 | const { t } = useI18n(); |
@@ -12,34 +12,34 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | @@ -12,34 +12,34 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | ||
12 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
13 | { | 13 | { |
14 | field: GcpPubsubFieldsEnum.PROJECT_ID, | 14 | field: GcpPubsubFieldsEnum.PROJECT_ID, |
15 | - label: h('span', t(GcpPubsubFieldsNameEnum.PROJECT_ID)), | 15 | + label: t(GcpPubsubFieldsNameEnum.PROJECT_ID), |
16 | component: 'Input', | 16 | component: 'Input', |
17 | required: true, | 17 | required: true, |
18 | componentProps: { | 18 | componentProps: { |
19 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.PROJECT_ID}`, | 19 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.PROJECT_ID)}`, |
20 | }, | 20 | }, |
21 | }, | 21 | }, |
22 | { | 22 | { |
23 | field: GcpPubsubFieldsEnum.TOPIC_NAME, | 23 | field: GcpPubsubFieldsEnum.TOPIC_NAME, |
24 | - label: h('span', t(GcpPubsubFieldsNameEnum.TOPIC_NAME)), | 24 | + label: t(GcpPubsubFieldsNameEnum.TOPIC_NAME), |
25 | component: 'Input', | 25 | component: 'Input', |
26 | required: true, | 26 | required: true, |
27 | componentProps: { | 27 | componentProps: { |
28 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.TOPIC_NAME}`, | 28 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.TOPIC_NAME)}`, |
29 | }, | 29 | }, |
30 | }, | 30 | }, |
31 | { | 31 | { |
32 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY_FILE_NAME, | 32 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY_FILE_NAME, |
33 | - label: h('span', t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME)), | 33 | + label: t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME), |
34 | component: 'Input', | 34 | component: 'Input', |
35 | show: false, | 35 | show: false, |
36 | componentProps: { | 36 | componentProps: { |
37 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.TOPIC_NAME}`, | 37 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.TOPIC_NAME)}`, |
38 | }, | 38 | }, |
39 | }, | 39 | }, |
40 | { | 40 | { |
41 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, | 41 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, |
42 | - label: h('span', t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY)), | 42 | + label: t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY), |
43 | component: 'ApiUpload', | 43 | component: 'ApiUpload', |
44 | valueField: 'fileList', | 44 | valueField: 'fileList', |
45 | changeEvent: 'update:fileList', | 45 | changeEvent: 'update:fileList', |
@@ -57,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | @@ -57,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | ||
57 | }, | 57 | }, |
58 | { | 58 | { |
59 | field: GcpPubsubFieldsEnum.MESSAGE_ATTRIBUTES, | 59 | field: GcpPubsubFieldsEnum.MESSAGE_ATTRIBUTES, |
60 | - label: h('span', t(GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES)), | 60 | + label: t(GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES), |
61 | component: 'AttributeConfiguration', | 61 | component: 'AttributeConfiguration', |
62 | helpMessage: | 62 | helpMessage: |
63 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', | 63 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', |
@@ -2,7 +2,7 @@ import { KafkaFieldsEnum, KafkaFieldsNameEnum } from '../../../enum/formField/ex | @@ -2,7 +2,7 @@ import { KafkaFieldsEnum, KafkaFieldsNameEnum } from '../../../enum/formField/ex | ||
2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | import { CharsetEncodingEnum, CharsetEncodingNameEnum } from '../../../enum/form'; | 4 | import { CharsetEncodingEnum, CharsetEncodingNameEnum } from '../../../enum/form'; |
5 | -import { h } from 'vue'; | 5 | + |
6 | import { useI18n } from '/@/hooks/web/useI18n'; | 6 | import { useI18n } from '/@/hooks/web/useI18n'; |
7 | 7 | ||
8 | const { t } = useI18n(); | 8 | const { t } = useI18n(); |
@@ -12,63 +12,63 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | @@ -12,63 +12,63 @@ useComponentRegister('AttributeConfiguration', AttributeConfiguration); | ||
12 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
13 | { | 13 | { |
14 | field: KafkaFieldsEnum.TOPIC_PATTERN, | 14 | field: KafkaFieldsEnum.TOPIC_PATTERN, |
15 | - label: h('span', t(KafkaFieldsNameEnum.TOPIC_PATTERN)), | 15 | + label: t(KafkaFieldsNameEnum.TOPIC_PATTERN), |
16 | component: 'Input', | 16 | component: 'Input', |
17 | helpMessage: | 17 | helpMessage: |
18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
19 | required: true, | 19 | required: true, |
20 | componentProps: { | 20 | componentProps: { |
21 | - placeholder: `请输入${KafkaFieldsEnum.TOPIC_PATTERN}`, | 21 | + placeholder: `请输入${t(KafkaFieldsEnum.TOPIC_PATTERN)}`, |
22 | }, | 22 | }, |
23 | }, | 23 | }, |
24 | { | 24 | { |
25 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, | 25 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, |
26 | - label: h('span', t(KafkaFieldsNameEnum.BOOTSTRAP_SERVERS)), | 26 | + label: t(KafkaFieldsNameEnum.BOOTSTRAP_SERVERS), |
27 | component: 'Input', | 27 | component: 'Input', |
28 | required: true, | 28 | required: true, |
29 | componentProps: { | 29 | componentProps: { |
30 | - placeholder: `请输入${KafkaFieldsEnum.BOOTSTRAP_SERVERS}`, | 30 | + placeholder: `请输入${t(KafkaFieldsEnum.BOOTSTRAP_SERVERS)}`, |
31 | }, | 31 | }, |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | field: KafkaFieldsEnum.RETRIES, | 34 | field: KafkaFieldsEnum.RETRIES, |
35 | - label: h('span', t(KafkaFieldsNameEnum.RETRIES)), | 35 | + label: t(KafkaFieldsNameEnum.RETRIES), |
36 | component: 'InputNumber', | 36 | component: 'InputNumber', |
37 | componentProps: { | 37 | componentProps: { |
38 | min: 0, | 38 | min: 0, |
39 | - placeholder: `请输入${KafkaFieldsEnum.BOOTSTRAP_SERVERS}`, | 39 | + placeholder: `请输入${t(KafkaFieldsEnum.BOOTSTRAP_SERVERS)}`, |
40 | }, | 40 | }, |
41 | }, | 41 | }, |
42 | { | 42 | { |
43 | field: KafkaFieldsEnum.BATCH_SIZE, | 43 | field: KafkaFieldsEnum.BATCH_SIZE, |
44 | - label: h('span', t(KafkaFieldsNameEnum.BATCH_SIZE)), | 44 | + label: t(KafkaFieldsNameEnum.BATCH_SIZE), |
45 | component: 'InputNumber', | 45 | component: 'InputNumber', |
46 | componentProps: { | 46 | componentProps: { |
47 | min: 0, | 47 | min: 0, |
48 | - placeholder: `请输入${KafkaFieldsEnum.BATCH_SIZE}`, | 48 | + placeholder: `请输入${t(KafkaFieldsEnum.BATCH_SIZE)}`, |
49 | }, | 49 | }, |
50 | }, | 50 | }, |
51 | { | 51 | { |
52 | field: KafkaFieldsEnum.LINGER, | 52 | field: KafkaFieldsEnum.LINGER, |
53 | - label: h('span', t(KafkaFieldsNameEnum.LINGER)), | 53 | + label: t(KafkaFieldsNameEnum.LINGER), |
54 | component: 'InputNumber', | 54 | component: 'InputNumber', |
55 | componentProps: { | 55 | componentProps: { |
56 | min: 0, | 56 | min: 0, |
57 | - placeholder: `请输入${KafkaFieldsEnum.LINGER}`, | 57 | + placeholder: `请输入${t(KafkaFieldsEnum.LINGER)}`, |
58 | }, | 58 | }, |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | field: KafkaFieldsEnum.BUFFER_MEMORY, | 61 | field: KafkaFieldsEnum.BUFFER_MEMORY, |
62 | - label: h('span', t(KafkaFieldsNameEnum.BUFFER_MEMORY)), | 62 | + label: t(KafkaFieldsNameEnum.BUFFER_MEMORY), |
63 | component: 'InputNumber', | 63 | component: 'InputNumber', |
64 | componentProps: { | 64 | componentProps: { |
65 | min: 0, | 65 | min: 0, |
66 | - placeholder: `请输入${KafkaFieldsEnum.BUFFER_MEMORY}`, | 66 | + placeholder: `请输入${t(KafkaFieldsEnum.BUFFER_MEMORY)}`, |
67 | }, | 67 | }, |
68 | }, | 68 | }, |
69 | { | 69 | { |
70 | field: KafkaFieldsEnum.ACKS, | 70 | field: KafkaFieldsEnum.ACKS, |
71 | - label: h('span', t(KafkaFieldsEnum.ACKS)), | 71 | + label: t(KafkaFieldsEnum.ACKS), |
72 | component: 'Select', | 72 | component: 'Select', |
73 | required: true, | 73 | required: true, |
74 | componentProps: { | 74 | componentProps: { |
@@ -78,37 +78,37 @@ export const formSchemas: FormSchema[] = [ | @@ -78,37 +78,37 @@ export const formSchemas: FormSchema[] = [ | ||
78 | { label: '0', value: '0' }, | 78 | { label: '0', value: '0' }, |
79 | { label: '1', value: '1' }, | 79 | { label: '1', value: '1' }, |
80 | ], | 80 | ], |
81 | - placeholder: `请选择${KafkaFieldsEnum.BUFFER_MEMORY}`, | 81 | + placeholder: `请选择${t(KafkaFieldsEnum.ACKS)}`, |
82 | getPopupContainer: () => document.body, | 82 | getPopupContainer: () => document.body, |
83 | }, | 83 | }, |
84 | }, | 84 | }, |
85 | { | 85 | { |
86 | field: KafkaFieldsEnum.KEY_SERIALIZER, | 86 | field: KafkaFieldsEnum.KEY_SERIALIZER, |
87 | - label: h('span', t(KafkaFieldsNameEnum.KEY_SERIALIZER)), | 87 | + label: t(KafkaFieldsNameEnum.KEY_SERIALIZER), |
88 | component: 'Input', | 88 | component: 'Input', |
89 | required: true, | 89 | required: true, |
90 | componentProps: { | 90 | componentProps: { |
91 | - placeholder: `请输入${KafkaFieldsEnum.KEY_SERIALIZER}`, | 91 | + placeholder: `请输入${t(KafkaFieldsNameEnum.KEY_SERIALIZER)}`, |
92 | }, | 92 | }, |
93 | }, | 93 | }, |
94 | { | 94 | { |
95 | field: KafkaFieldsEnum.VALUE_SERIALIZER, | 95 | field: KafkaFieldsEnum.VALUE_SERIALIZER, |
96 | - label: h('span', t(KafkaFieldsNameEnum.VALUE_SERIALIZER)), | 96 | + label: t(KafkaFieldsNameEnum.VALUE_SERIALIZER), |
97 | component: 'Input', | 97 | component: 'Input', |
98 | required: true, | 98 | required: true, |
99 | componentProps: { | 99 | componentProps: { |
100 | - placeholder: `请输入${KafkaFieldsEnum.VALUE_SERIALIZER}`, | 100 | + placeholder: `请输入${t(KafkaFieldsNameEnum.VALUE_SERIALIZER)}`, |
101 | }, | 101 | }, |
102 | }, | 102 | }, |
103 | { | 103 | { |
104 | field: KafkaFieldsEnum.OTHER_PROPERTIES, | 104 | field: KafkaFieldsEnum.OTHER_PROPERTIES, |
105 | - label: h('span', t(KafkaFieldsNameEnum.OTHER_PROPERTIES)), | 105 | + label: t(KafkaFieldsNameEnum.OTHER_PROPERTIES), |
106 | component: 'AttributeConfiguration', | 106 | component: 'AttributeConfiguration', |
107 | slot: KafkaFieldsEnum.OTHER_PROPERTIES, | 107 | slot: KafkaFieldsEnum.OTHER_PROPERTIES, |
108 | }, | 108 | }, |
109 | { | 109 | { |
110 | field: KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS, | 110 | field: KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS, |
111 | - label: h('span', t(KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS)), | 111 | + label: t(KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS), |
112 | component: 'Checkbox', | 112 | component: 'Checkbox', |
113 | renderComponentContent: () => ({ | 113 | renderComponentContent: () => ({ |
114 | default: () => | 114 | default: () => |
@@ -117,7 +117,7 @@ export const formSchemas: FormSchema[] = [ | @@ -117,7 +117,7 @@ export const formSchemas: FormSchema[] = [ | ||
117 | }, | 117 | }, |
118 | { | 118 | { |
119 | field: KafkaFieldsEnum.KAFKA_HEADERS_CHARSET, | 119 | field: KafkaFieldsEnum.KAFKA_HEADERS_CHARSET, |
120 | - label: h('span', t(KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET)), | 120 | + label: t(KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET), |
121 | component: 'Select', | 121 | component: 'Select', |
122 | required: true, | 122 | required: true, |
123 | show: ({ model }) => model[KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS], | 123 | show: ({ model }) => model[KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS], |
@@ -126,7 +126,7 @@ export const formSchemas: FormSchema[] = [ | @@ -126,7 +126,7 @@ export const formSchemas: FormSchema[] = [ | ||
126 | label: CharsetEncodingNameEnum[value], | 126 | label: CharsetEncodingNameEnum[value], |
127 | value, | 127 | value, |
128 | })), | 128 | })), |
129 | - placeholder: `请选择${KafkaFieldsEnum.KAFKA_HEADERS_CHARSET}`, | 129 | + placeholder: `请选择${t(KafkaFieldsEnum.KAFKA_HEADERS_CHARSET)}`, |
130 | getPopupContainer: () => document.body, | 130 | getPopupContainer: () => document.body, |
131 | }, | 131 | }, |
132 | }, | 132 | }, |
1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../../enum/formField/external'; | 1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | // Credentials type | 7 | // Credentials type |
5 | export enum CredentialsTypeEnum { | 8 | export enum CredentialsTypeEnum { |
@@ -51,15 +54,16 @@ export const formSchemas = ( | @@ -51,15 +54,16 @@ export const formSchemas = ( | ||
51 | return [ | 54 | return [ |
52 | { | 55 | { |
53 | field: MqttFieldsEnum.TYPE, | 56 | field: MqttFieldsEnum.TYPE, |
54 | - label: MqttFieldsNameEnum.TYPE, | 57 | + label: t(MqttFieldsNameEnum.TYPE), |
55 | component: 'Select', | 58 | component: 'Select', |
56 | required: true, | 59 | required: true, |
57 | defaultValue: CredentialsTypeEnum.ANONYMOUS, | 60 | defaultValue: CredentialsTypeEnum.ANONYMOUS, |
58 | componentProps: ({ formActionType }) => { | 61 | componentProps: ({ formActionType }) => { |
59 | const { setFieldsValue } = formActionType; | 62 | const { setFieldsValue } = formActionType; |
60 | return { | 63 | return { |
64 | + allowClear: false, | ||
61 | options: credentialsTypeOptions, | 65 | options: credentialsTypeOptions, |
62 | - placeholder: `请选择${MqttFieldsNameEnum.TYPE}`, | 66 | + placeholder: `请选择${t(MqttFieldsNameEnum.TYPE)}`, |
63 | getPopupContainer: () => document.body, | 67 | getPopupContainer: () => document.body, |
64 | onChange( | 68 | onChange( |
65 | value: CredentialsTypeEnum, | 69 | value: CredentialsTypeEnum, |
@@ -81,23 +85,23 @@ export const formSchemas = ( | @@ -81,23 +85,23 @@ export const formSchemas = ( | ||
81 | }, | 85 | }, |
82 | { | 86 | { |
83 | field: MqttFieldsEnum.USERNAME, | 87 | field: MqttFieldsEnum.USERNAME, |
84 | - label: MqttFieldsNameEnum.USERNAME, | 88 | + label: t(MqttFieldsNameEnum.USERNAME), |
85 | component: 'Input', | 89 | component: 'Input', |
86 | required: true, | 90 | required: true, |
87 | ifShow: ({ model }) => model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, | 91 | ifShow: ({ model }) => model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, |
88 | componentProps: { | 92 | componentProps: { |
89 | - placeholder: `请输入${MqttFieldsNameEnum.USERNAME}`, | 93 | + placeholder: `请输入${t(MqttFieldsNameEnum.USERNAME)}`, |
90 | }, | 94 | }, |
91 | }, | 95 | }, |
92 | { | 96 | { |
93 | field: MqttFieldsEnum.CA_CERT_FILE_NAME, | 97 | field: MqttFieldsEnum.CA_CERT_FILE_NAME, |
94 | - label: MqttFieldsNameEnum.CA_CERT_FILE_NAME, | 98 | + label: t(MqttFieldsNameEnum.CA_CERT_FILE_NAME), |
95 | component: 'InputPassword', | 99 | component: 'InputPassword', |
96 | show: false, | 100 | show: false, |
97 | }, | 101 | }, |
98 | { | 102 | { |
99 | field: MqttFieldsEnum.CA_CERT, | 103 | field: MqttFieldsEnum.CA_CERT, |
100 | - label: MqttFieldsNameEnum.CA_CERT, | 104 | + label: t(MqttFieldsNameEnum.CA_CERT), |
101 | component: 'ApiUpload', | 105 | component: 'ApiUpload', |
102 | valueField: 'fileList', | 106 | valueField: 'fileList', |
103 | changeEvent: 'update:fileList', | 107 | changeEvent: 'update:fileList', |
@@ -116,13 +120,13 @@ export const formSchemas = ( | @@ -116,13 +120,13 @@ export const formSchemas = ( | ||
116 | }, | 120 | }, |
117 | { | 121 | { |
118 | field: MqttFieldsEnum.CERT_FILE_NAME, | 122 | field: MqttFieldsEnum.CERT_FILE_NAME, |
119 | - label: MqttFieldsNameEnum.CERT_FILE_NAME, | 123 | + label: t(MqttFieldsNameEnum.CERT_FILE_NAME), |
120 | component: 'InputPassword', | 124 | component: 'InputPassword', |
121 | show: false, | 125 | show: false, |
122 | }, | 126 | }, |
123 | { | 127 | { |
124 | field: MqttFieldsEnum.CERT, | 128 | field: MqttFieldsEnum.CERT, |
125 | - label: MqttFieldsNameEnum.CERT, | 129 | + label: t(MqttFieldsNameEnum.CERT), |
126 | component: 'ApiUpload', | 130 | component: 'ApiUpload', |
127 | valueField: 'fileList', | 131 | valueField: 'fileList', |
128 | changeEvent: 'update:fileList', | 132 | changeEvent: 'update:fileList', |
@@ -141,13 +145,13 @@ export const formSchemas = ( | @@ -141,13 +145,13 @@ export const formSchemas = ( | ||
141 | }, | 145 | }, |
142 | { | 146 | { |
143 | field: MqttFieldsEnum.PRIVATE_KEY_FILE_NAME, | 147 | field: MqttFieldsEnum.PRIVATE_KEY_FILE_NAME, |
144 | - label: MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME, | 148 | + label: t(MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME), |
145 | component: 'InputPassword', | 149 | component: 'InputPassword', |
146 | show: false, | 150 | show: false, |
147 | }, | 151 | }, |
148 | { | 152 | { |
149 | field: MqttFieldsEnum.PRIVATE_KEY, | 153 | field: MqttFieldsEnum.PRIVATE_KEY, |
150 | - label: MqttFieldsNameEnum.PRIVATE_KEY, | 154 | + label: t(MqttFieldsNameEnum.PRIVATE_KEY), |
151 | component: 'ApiUpload', | 155 | component: 'ApiUpload', |
152 | valueField: 'fileList', | 156 | valueField: 'fileList', |
153 | changeEvent: 'update:fileList', | 157 | changeEvent: 'update:fileList', |
@@ -166,13 +170,13 @@ export const formSchemas = ( | @@ -166,13 +170,13 @@ export const formSchemas = ( | ||
166 | }, | 170 | }, |
167 | { | 171 | { |
168 | field: MqttFieldsEnum.PASSWORD, | 172 | field: MqttFieldsEnum.PASSWORD, |
169 | - label: MqttFieldsNameEnum.PASSWORD, | 173 | + label: t(MqttFieldsNameEnum.PASSWORD), |
170 | component: 'InputPassword', | 174 | component: 'InputPassword', |
171 | ifShow: ({ model }) => | 175 | ifShow: ({ model }) => |
172 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.PEM || | 176 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.PEM || |
173 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, | 177 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, |
174 | componentProps: { | 178 | componentProps: { |
175 | - placeholder: `请输入${MqttFieldsNameEnum.PASSWORD}`, | 179 | + placeholder: `请输入${t(MqttFieldsNameEnum.PASSWORD)}`, |
176 | }, | 180 | }, |
177 | }, | 181 | }, |
178 | ]; | 182 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { CredentialsCard } from './CredentialsCard'; | 2 | import { CredentialsCard } from './CredentialsCard'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
@@ -11,58 +10,58 @@ useComponentRegister('CredentialsCard', CredentialsCard); | @@ -11,58 +10,58 @@ useComponentRegister('CredentialsCard', CredentialsCard); | ||
11 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
12 | { | 11 | { |
13 | field: MqttFieldsEnum.TOPIC_PATTERN, | 12 | field: MqttFieldsEnum.TOPIC_PATTERN, |
14 | - label: h('span', t(MqttFieldsNameEnum.TOPIC_PATTERN)), | 13 | + label: t(MqttFieldsNameEnum.TOPIC_PATTERN), |
15 | component: 'Input', | 14 | component: 'Input', |
16 | helpMessage: | 15 | helpMessage: |
17 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 16 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
18 | required: true, | 17 | required: true, |
19 | componentProps: { | 18 | componentProps: { |
20 | - placeholder: `请输入${MqttFieldsNameEnum.TOPIC_PATTERN}`, | 19 | + placeholder: `请输入${t(MqttFieldsNameEnum.TOPIC_PATTERN)}`, |
21 | }, | 20 | }, |
22 | }, | 21 | }, |
23 | { | 22 | { |
24 | field: MqttFieldsEnum.HOST, | 23 | field: MqttFieldsEnum.HOST, |
25 | - label: h('span', t(MqttFieldsNameEnum.HOST)), | 24 | + label: t(MqttFieldsNameEnum.HOST), |
26 | component: 'Input', | 25 | component: 'Input', |
27 | required: true, | 26 | required: true, |
28 | colProps: { span: 8 }, | 27 | colProps: { span: 8 }, |
29 | componentProps: { | 28 | componentProps: { |
30 | - placeholder: `请输入${MqttFieldsNameEnum.HOST}`, | 29 | + placeholder: `请输入${t(MqttFieldsNameEnum.HOST)}`, |
31 | }, | 30 | }, |
32 | }, | 31 | }, |
33 | { | 32 | { |
34 | field: MqttFieldsEnum.PORT, | 33 | field: MqttFieldsEnum.PORT, |
35 | - label: h('span', t(MqttFieldsNameEnum.PORT)), | 34 | + label: t(MqttFieldsNameEnum.PORT), |
36 | component: 'InputNumber', | 35 | component: 'InputNumber', |
37 | required: true, | 36 | required: true, |
38 | colProps: { span: 8 }, | 37 | colProps: { span: 8 }, |
39 | componentProps: { | 38 | componentProps: { |
40 | - placeholder: `请输入${MqttFieldsNameEnum.PORT}`, | 39 | + placeholder: `请输入${t(MqttFieldsNameEnum.PORT)}`, |
41 | }, | 40 | }, |
42 | }, | 41 | }, |
43 | { | 42 | { |
44 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, | 43 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, |
45 | - label: h('span', t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC)), | 44 | + label: t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC), |
46 | component: 'Input', | 45 | component: 'Input', |
47 | required: true, | 46 | required: true, |
48 | colProps: { span: 8 }, | 47 | colProps: { span: 8 }, |
49 | componentProps: { | 48 | componentProps: { |
50 | - placeholder: `请输入${MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC}`, | 49 | + placeholder: `请输入${t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC)}`, |
51 | }, | 50 | }, |
52 | }, | 51 | }, |
53 | { | 52 | { |
54 | field: MqttFieldsEnum.CLIENT_ID, | 53 | field: MqttFieldsEnum.CLIENT_ID, |
55 | - label: h('span', t(MqttFieldsNameEnum.CLIENT_ID)), | 54 | + label: t(MqttFieldsNameEnum.CLIENT_ID), |
56 | component: 'Input', | 55 | component: 'Input', |
57 | helpMessage: | 56 | helpMessage: |
58 | 'Hint: Optional. Leave empty for auto-generated Client ID. Be careful when specifying the Client ID. Majority of the MQTT brokers will not allow multiple connections with the same Client ID. To connect to such brokers, your mqtt Client ID must be unique. When platform is running in a micro-services mode, the copy of rule node is launched in each micro-service. This will automatically lead to multiple mqtt clients with the same ID and may cause failures of the rule node. To avoid such failures enable "Add Service ID as suffix to Client ID" option below.', | 57 | 'Hint: Optional. Leave empty for auto-generated Client ID. Be careful when specifying the Client ID. Majority of the MQTT brokers will not allow multiple connections with the same Client ID. To connect to such brokers, your mqtt Client ID must be unique. When platform is running in a micro-services mode, the copy of rule node is launched in each micro-service. This will automatically lead to multiple mqtt clients with the same ID and may cause failures of the rule node. To avoid such failures enable "Add Service ID as suffix to Client ID" option below.', |
59 | componentProps: { | 58 | componentProps: { |
60 | - placeholder: `请输入${MqttFieldsNameEnum.TOPIC_PATTERN}`, | 59 | + placeholder: `请输入${t(MqttFieldsNameEnum.TOPIC_PATTERN)}`, |
61 | }, | 60 | }, |
62 | }, | 61 | }, |
63 | { | 62 | { |
64 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, | 63 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, |
65 | - label: h('span', t(MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX)), | 64 | + label: t(MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX), |
66 | component: 'Checkbox', | 65 | component: 'Checkbox', |
67 | renderComponentContent: () => ({ | 66 | renderComponentContent: () => ({ |
68 | default: () => | 67 | default: () => |
@@ -80,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | @@ -80,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | ||
80 | label: '', | 79 | label: '', |
81 | component: 'Checkbox', | 80 | component: 'Checkbox', |
82 | renderComponentContent: () => ({ | 81 | renderComponentContent: () => ({ |
83 | - default: () => MqttFieldsNameEnum.CLEAN_SESSION, | 82 | + default: () => t(MqttFieldsNameEnum.CLEAN_SESSION), |
84 | }), | 83 | }), |
85 | }, | 84 | }, |
86 | { | 85 | { |
@@ -88,12 +87,12 @@ export const formSchemas: FormSchema[] = [ | @@ -88,12 +87,12 @@ export const formSchemas: FormSchema[] = [ | ||
88 | label: '', | 87 | label: '', |
89 | component: 'Checkbox', | 88 | component: 'Checkbox', |
90 | renderComponentContent: () => ({ | 89 | renderComponentContent: () => ({ |
91 | - default: () => MqttFieldsNameEnum.SSL, | 90 | + default: () => t(MqttFieldsNameEnum.SSL), |
92 | }), | 91 | }), |
93 | }, | 92 | }, |
94 | { | 93 | { |
95 | field: MqttFieldsEnum.CREDENTIALS, | 94 | field: MqttFieldsEnum.CREDENTIALS, |
96 | - label: h('span', t(MqttFieldsNameEnum.CREDENTIALS)), | 95 | + label: t(MqttFieldsNameEnum.CREDENTIALS), |
97 | component: 'CredentialsCard', | 96 | component: 'CredentialsCard', |
98 | slot: MqttFieldsEnum.CREDENTIALS, | 97 | slot: MqttFieldsEnum.CREDENTIALS, |
99 | }, | 98 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { MessagePropertiesEnum } from '../../../enum/form'; | 1 | import { MessagePropertiesEnum } from '../../../enum/form'; |
3 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -9,73 +8,73 @@ const { t } = useI18n(); | @@ -9,73 +8,73 @@ const { t } = useI18n(); | ||
9 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
10 | { | 9 | { |
11 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, | 10 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, |
12 | - label: h('span', t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN)), | 11 | + label: t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN), |
13 | component: 'Input', | 12 | component: 'Input', |
14 | componentProps: { | 13 | componentProps: { |
15 | - placeholder: `请输入${RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN}`, | 14 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN)}`, |
16 | }, | 15 | }, |
17 | }, | 16 | }, |
18 | { | 17 | { |
19 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, | 18 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, |
20 | - label: h('span', t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)), | 19 | + label: t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN), |
21 | component: 'Input', | 20 | component: 'Input', |
22 | componentProps: { | 21 | componentProps: { |
23 | - placeholder: `请输入${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, | 22 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)}`, |
24 | }, | 23 | }, |
25 | }, | 24 | }, |
26 | { | 25 | { |
27 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, | 26 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, |
28 | - label: h('span', t(RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES)), | 27 | + label: t(RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES), |
29 | component: 'Select', | 28 | component: 'Select', |
30 | componentProps: { | 29 | componentProps: { |
31 | allowClear: true, | 30 | allowClear: true, |
32 | options: Object.keys(MessagePropertiesEnum).map((value) => ({ label: value, value })), | 31 | options: Object.keys(MessagePropertiesEnum).map((value) => ({ label: value, value })), |
33 | - placeholder: `请选择${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, | 32 | + placeholder: `请选择${t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)}`, |
34 | getPopupContainer: () => document.body, | 33 | getPopupContainer: () => document.body, |
35 | }, | 34 | }, |
36 | }, | 35 | }, |
37 | { | 36 | { |
38 | field: RabbitmqFieldsEnum.HOST, | 37 | field: RabbitmqFieldsEnum.HOST, |
39 | - label: h('span', t(RabbitmqFieldsNameEnum.HOST)), | 38 | + label: t(RabbitmqFieldsNameEnum.HOST), |
40 | component: 'Input', | 39 | component: 'Input', |
41 | required: true, | 40 | required: true, |
42 | colProps: { span: 12 }, | 41 | colProps: { span: 12 }, |
43 | componentProps: { | 42 | componentProps: { |
44 | - placeholder: `请输入${RabbitmqFieldsNameEnum.HOST}`, | 43 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.HOST)}`, |
45 | }, | 44 | }, |
46 | }, | 45 | }, |
47 | { | 46 | { |
48 | field: RabbitmqFieldsEnum.PORT, | 47 | field: RabbitmqFieldsEnum.PORT, |
49 | - label: h('span', t(RabbitmqFieldsNameEnum.PORT)), | 48 | + label: t(RabbitmqFieldsNameEnum.PORT), |
50 | component: 'InputNumber', | 49 | component: 'InputNumber', |
51 | required: true, | 50 | required: true, |
52 | colProps: { span: 12 }, | 51 | colProps: { span: 12 }, |
53 | componentProps: { | 52 | componentProps: { |
54 | - placeholder: `请输入${RabbitmqFieldsNameEnum.PORT}`, | 53 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.PORT)}`, |
55 | }, | 54 | }, |
56 | }, | 55 | }, |
57 | { | 56 | { |
58 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, | 57 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, |
59 | - label: h('span', t(RabbitmqFieldsNameEnum.VIRTUAL_HOST)), | 58 | + label: t(RabbitmqFieldsNameEnum.VIRTUAL_HOST), |
60 | component: 'Input', | 59 | component: 'Input', |
61 | componentProps: { | 60 | componentProps: { |
62 | - placeholder: `请输入${RabbitmqFieldsNameEnum.VIRTUAL_HOST}`, | 61 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.VIRTUAL_HOST)}`, |
63 | }, | 62 | }, |
64 | }, | 63 | }, |
65 | { | 64 | { |
66 | field: RabbitmqFieldsEnum.USERNAME, | 65 | field: RabbitmqFieldsEnum.USERNAME, |
67 | - label: h('span', t(RabbitmqFieldsNameEnum.USERNAME)), | 66 | + label: t(RabbitmqFieldsNameEnum.USERNAME), |
68 | component: 'Input', | 67 | component: 'Input', |
69 | componentProps: { | 68 | componentProps: { |
70 | - placeholder: `请输入${RabbitmqFieldsNameEnum.USERNAME}`, | 69 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.USERNAME)}`, |
71 | }, | 70 | }, |
72 | }, | 71 | }, |
73 | { | 72 | { |
74 | field: RabbitmqFieldsEnum.PASSWORD, | 73 | field: RabbitmqFieldsEnum.PASSWORD, |
75 | - label: h('span', t(RabbitmqFieldsNameEnum.PASSWORD)), | 74 | + label: t(RabbitmqFieldsNameEnum.PASSWORD), |
76 | component: 'Input', | 75 | component: 'Input', |
77 | componentProps: { | 76 | componentProps: { |
78 | - placeholder: `请输入${RabbitmqFieldsNameEnum.PASSWORD}`, | 77 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.PASSWORD)}`, |
79 | }, | 78 | }, |
80 | }, | 79 | }, |
81 | { | 80 | { |
@@ -83,30 +82,30 @@ export const formSchemas: FormSchema[] = [ | @@ -83,30 +82,30 @@ export const formSchemas: FormSchema[] = [ | ||
83 | component: 'Checkbox', | 82 | component: 'Checkbox', |
84 | label: '', | 83 | label: '', |
85 | renderComponentContent: () => ({ | 84 | renderComponentContent: () => ({ |
86 | - default: () => RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED, | 85 | + default: () => t(RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED), |
87 | }), | 86 | }), |
88 | }, | 87 | }, |
89 | { | 88 | { |
90 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, | 89 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, |
91 | - label: h('span', t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT)), | 90 | + label: t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT), |
92 | component: 'InputNumber', | 91 | component: 'InputNumber', |
93 | componentProps: { | 92 | componentProps: { |
94 | min: 0, | 93 | min: 0, |
95 | - placeholder: `请输入${RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT}`, | 94 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT)}`, |
96 | }, | 95 | }, |
97 | }, | 96 | }, |
98 | { | 97 | { |
99 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, | 98 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, |
100 | - label: h('span', t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT)), | 99 | + label: t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT), |
101 | component: 'InputNumber', | 100 | component: 'InputNumber', |
102 | componentProps: { | 101 | componentProps: { |
103 | min: 0, | 102 | min: 0, |
104 | - placeholder: `请输入${RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT}`, | 103 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT)}`, |
105 | }, | 104 | }, |
106 | }, | 105 | }, |
107 | { | 106 | { |
108 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 107 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
109 | - label: h('span', t(RabbitmqFieldsNameEnum.CLIENT_PROPERTIES)), | 108 | + label: t(RabbitmqFieldsNameEnum.CLIENT_PROPERTIES), |
110 | component: 'Input', | 109 | component: 'Input', |
111 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 110 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
112 | }, | 111 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; | 1 | import { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; |
3 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -9,24 +8,24 @@ const { t } = useI18n(); | @@ -9,24 +8,24 @@ const { t } = useI18n(); | ||
9 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
10 | { | 9 | { |
11 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, | 10 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, |
12 | - label: h('span', t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN)), | 11 | + label: t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN), |
13 | component: 'Input', | 12 | component: 'Input', |
14 | required: true, | 13 | required: true, |
15 | helpMessage: | 14 | helpMessage: |
16 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 15 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
17 | componentProps: { | 16 | componentProps: { |
18 | - placeholder: `请输入${RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN}`, | 17 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN)}`, |
19 | }, | 18 | }, |
20 | }, | 19 | }, |
21 | { | 20 | { |
22 | field: RestApiCallFieldsEnum.REQUEST_METHOD, | 21 | field: RestApiCallFieldsEnum.REQUEST_METHOD, |
23 | - label: h('span', t(RestApiCallFieldsNameEnum.REQUEST_METHOD)), | 22 | + label: t(RestApiCallFieldsNameEnum.REQUEST_METHOD), |
24 | component: 'Select', | 23 | component: 'Select', |
25 | required: true, | 24 | required: true, |
26 | componentProps: { | 25 | componentProps: { |
27 | options: Object.keys(RequestMethodEnum).map((value) => ({ label: value, value })), | 26 | options: Object.keys(RequestMethodEnum).map((value) => ({ label: value, value })), |
28 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
29 | - placeholder: `请选择${RestApiCallFieldsNameEnum.REQUEST_METHOD}`, | 28 | + placeholder: `请选择${t(RestApiCallFieldsNameEnum.REQUEST_METHOD)}`, |
30 | }, | 29 | }, |
31 | }, | 30 | }, |
32 | { | 31 | { |
@@ -34,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | @@ -34,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | ||
34 | label: '', | 33 | label: '', |
35 | component: 'Checkbox', | 34 | component: 'Checkbox', |
36 | renderComponentContent: () => ({ | 35 | renderComponentContent: () => ({ |
37 | - default: () => RestApiCallFieldsNameEnum.ENABLE_PROXY, | 36 | + default: () => t(RestApiCallFieldsNameEnum.ENABLE_PROXY), |
38 | }), | 37 | }), |
39 | }, | 38 | }, |
40 | { | 39 | { |
@@ -43,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | @@ -43,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | ||
43 | component: 'Checkbox', | 42 | component: 'Checkbox', |
44 | show: ({ model }) => !model[RestApiCallFieldsEnum.ENABLE_PROXY], | 43 | show: ({ model }) => !model[RestApiCallFieldsEnum.ENABLE_PROXY], |
45 | renderComponentContent: () => ({ | 44 | renderComponentContent: () => ({ |
46 | - default: () => RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY, | 45 | + default: () => t(RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY), |
47 | }), | 46 | }), |
48 | }, | 47 | }, |
49 | { | 48 | { |
@@ -51,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | @@ -51,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | ||
51 | label: '', | 50 | label: '', |
52 | component: 'Checkbox', | 51 | component: 'Checkbox', |
53 | renderComponentContent: () => ({ | 52 | renderComponentContent: () => ({ |
54 | - default: () => RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY, | 53 | + default: () => t(RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY), |
55 | }), | 54 | }), |
56 | }, | 55 | }, |
57 | { | 56 | { |
@@ -60,12 +59,12 @@ export const formSchemas: FormSchema[] = [ | @@ -60,12 +59,12 @@ export const formSchemas: FormSchema[] = [ | ||
60 | component: 'Checkbox', | 59 | component: 'Checkbox', |
61 | show: ({ model }) => model[RestApiCallFieldsEnum.ENABLE_PROXY], | 60 | show: ({ model }) => model[RestApiCallFieldsEnum.ENABLE_PROXY], |
62 | renderComponentContent: () => ({ | 61 | renderComponentContent: () => ({ |
63 | - default: () => RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES, | 62 | + default: () => t(RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES), |
64 | }), | 63 | }), |
65 | }, | 64 | }, |
66 | { | 65 | { |
67 | field: RestApiCallFieldsEnum.PROXY_SCHEME, | 66 | field: RestApiCallFieldsEnum.PROXY_SCHEME, |
68 | - label: h('span', t(RestApiCallFieldsNameEnum.PROXY_SCHEME)), | 67 | + label: t(RestApiCallFieldsNameEnum.PROXY_SCHEME), |
69 | component: 'Select', | 68 | component: 'Select', |
70 | required: true, | 69 | required: true, |
71 | colProps: { span: 8 }, | 70 | colProps: { span: 8 }, |
@@ -75,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | @@ -75,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | ||
75 | value, | 74 | value, |
76 | })), | 75 | })), |
77 | getPopupContainer: () => document.body, | 76 | getPopupContainer: () => document.body, |
78 | - placeholder: `请选择${RestApiCallFieldsEnum.PROXY_SCHEME}`, | 77 | + placeholder: `请选择${t(RestApiCallFieldsEnum.PROXY_SCHEME)}`, |
79 | }, | 78 | }, |
80 | ifShow: ({ model }) => { | 79 | ifShow: ({ model }) => { |
81 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 80 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -84,12 +83,12 @@ export const formSchemas: FormSchema[] = [ | @@ -84,12 +83,12 @@ export const formSchemas: FormSchema[] = [ | ||
84 | }, | 83 | }, |
85 | { | 84 | { |
86 | field: RestApiCallFieldsEnum.PROXY_HOST, | 85 | field: RestApiCallFieldsEnum.PROXY_HOST, |
87 | - label: h('span', t(RestApiCallFieldsNameEnum.PROXY_HOST)), | 86 | + label: t(RestApiCallFieldsNameEnum.PROXY_HOST), |
88 | component: 'Input', | 87 | component: 'Input', |
89 | required: true, | 88 | required: true, |
90 | colProps: { span: 8 }, | 89 | colProps: { span: 8 }, |
91 | componentProps: { | 90 | componentProps: { |
92 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_HOST}`, | 91 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_HOST)}`, |
93 | }, | 92 | }, |
94 | ifShow: ({ model }) => { | 93 | ifShow: ({ model }) => { |
95 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 94 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -98,12 +97,12 @@ export const formSchemas: FormSchema[] = [ | @@ -98,12 +97,12 @@ export const formSchemas: FormSchema[] = [ | ||
98 | }, | 97 | }, |
99 | { | 98 | { |
100 | field: RestApiCallFieldsEnum.PROXY_PORT, | 99 | field: RestApiCallFieldsEnum.PROXY_PORT, |
101 | - label: h('span', t(RestApiCallFieldsNameEnum.PROXY_PORT)), | 100 | + label: t(RestApiCallFieldsNameEnum.PROXY_PORT), |
102 | component: 'InputNumber', | 101 | component: 'InputNumber', |
103 | required: true, | 102 | required: true, |
104 | colProps: { span: 8 }, | 103 | colProps: { span: 8 }, |
105 | componentProps: { | 104 | componentProps: { |
106 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_HOST}`, | 105 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_HOST)}`, |
107 | }, | 106 | }, |
108 | ifShow: ({ model }) => { | 107 | ifShow: ({ model }) => { |
109 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 108 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -112,10 +111,10 @@ export const formSchemas: FormSchema[] = [ | @@ -112,10 +111,10 @@ export const formSchemas: FormSchema[] = [ | ||
112 | }, | 111 | }, |
113 | { | 112 | { |
114 | field: RestApiCallFieldsEnum.PROXY_USER, | 113 | field: RestApiCallFieldsEnum.PROXY_USER, |
115 | - label: h('span', t(RestApiCallFieldsNameEnum.PROXY_USER)), | 114 | + label: t(RestApiCallFieldsNameEnum.PROXY_USER), |
116 | component: 'Input', | 115 | component: 'Input', |
117 | componentProps: { | 116 | componentProps: { |
118 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_USER}`, | 117 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_USER)}`, |
119 | }, | 118 | }, |
120 | ifShow: ({ model }) => { | 119 | ifShow: ({ model }) => { |
121 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 120 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -124,10 +123,10 @@ export const formSchemas: FormSchema[] = [ | @@ -124,10 +123,10 @@ export const formSchemas: FormSchema[] = [ | ||
124 | }, | 123 | }, |
125 | { | 124 | { |
126 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, | 125 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, |
127 | - label: h('span', t(RestApiCallFieldsNameEnum.PROXY_PASSWORD)), | 126 | + label: t(RestApiCallFieldsNameEnum.PROXY_PASSWORD), |
128 | component: 'Input', | 127 | component: 'Input', |
129 | componentProps: { | 128 | componentProps: { |
130 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_PASSWORD}`, | 129 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_PASSWORD)}`, |
131 | }, | 130 | }, |
132 | ifShow: ({ model }) => { | 131 | ifShow: ({ model }) => { |
133 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 132 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -136,25 +135,25 @@ export const formSchemas: FormSchema[] = [ | @@ -136,25 +135,25 @@ export const formSchemas: FormSchema[] = [ | ||
136 | }, | 135 | }, |
137 | { | 136 | { |
138 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, | 137 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, |
139 | - label: h('span', t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS)), | 138 | + label: t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS), |
140 | component: 'InputNumber', | 139 | component: 'InputNumber', |
141 | componentProps: { | 140 | componentProps: { |
142 | min: 0, | 141 | min: 0, |
143 | - placeholder: `请输入${RestApiCallFieldsNameEnum.READ_TIMEOUT_MS}`, | 142 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS)}`, |
144 | }, | 143 | }, |
145 | }, | 144 | }, |
146 | { | 145 | { |
147 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, | 146 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, |
148 | - label: h('span', t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT)), | 147 | + label: t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT), |
149 | component: 'InputNumber', | 148 | component: 'InputNumber', |
150 | componentProps: { | 149 | componentProps: { |
151 | min: 0, | 150 | min: 0, |
152 | - placeholder: `请输入${RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT}`, | 151 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT)}`, |
153 | }, | 152 | }, |
154 | }, | 153 | }, |
155 | { | 154 | { |
156 | field: RestApiCallFieldsEnum.HEADERS, | 155 | field: RestApiCallFieldsEnum.HEADERS, |
157 | - label: h('span', t(RestApiCallFieldsNameEnum.HEADERS)), | 156 | + label: t(RestApiCallFieldsNameEnum.HEADERS), |
158 | component: 'Input', | 157 | component: 'Input', |
159 | slot: RestApiCallFieldsEnum.HEADERS, | 158 | slot: RestApiCallFieldsEnum.HEADERS, |
160 | }, | 159 | }, |
@@ -163,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | @@ -163,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | ||
163 | label: '', | 162 | label: '', |
164 | component: 'Checkbox', | 163 | component: 'Checkbox', |
165 | renderComponentContent: () => ({ | 164 | renderComponentContent: () => ({ |
166 | - default: () => RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE, | 165 | + default: () => t(RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE), |
167 | }), | 166 | }), |
168 | }, | 167 | }, |
169 | { | 168 | { |
@@ -172,22 +171,22 @@ export const formSchemas: FormSchema[] = [ | @@ -172,22 +171,22 @@ export const formSchemas: FormSchema[] = [ | ||
172 | component: 'Checkbox', | 171 | component: 'Checkbox', |
173 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], | 172 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], |
174 | renderComponentContent: () => ({ | 173 | renderComponentContent: () => ({ |
175 | - default: () => RestApiCallFieldsNameEnum.TRIM_QUEUE, | 174 | + default: () => t(RestApiCallFieldsNameEnum.TRIM_QUEUE), |
176 | }), | 175 | }), |
177 | }, | 176 | }, |
178 | { | 177 | { |
179 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, | 178 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, |
180 | - label: h('span', t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE)), | 179 | + label: t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE), |
181 | component: 'InputNumber', | 180 | component: 'InputNumber', |
182 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], | 181 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], |
183 | componentProps: { | 182 | componentProps: { |
184 | min: 0, | 183 | min: 0, |
185 | - placeholder: `请输入${RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE}`, | 184 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE)}`, |
186 | }, | 185 | }, |
187 | }, | 186 | }, |
188 | { | 187 | { |
189 | field: RestApiCallFieldsEnum.CREDENTIALS, | 188 | field: RestApiCallFieldsEnum.CREDENTIALS, |
190 | - label: h('span', t(RestApiCallFieldsNameEnum.CREDENTIALS)), | 189 | + label: t(RestApiCallFieldsNameEnum.CREDENTIALS), |
191 | component: 'Input', | 190 | component: 'Input', |
192 | slot: RestApiCallFieldsEnum.CREDENTIALS, | 191 | slot: RestApiCallFieldsEnum.CREDENTIALS, |
193 | }, | 192 | }, |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | EmailProtocolEnum, | 2 | EmailProtocolEnum, |
4 | EmailProtocolNameEnum, | 3 | EmailProtocolNameEnum, |
@@ -17,12 +16,12 @@ export const formSchemas: FormSchema[] = [ | @@ -17,12 +16,12 @@ export const formSchemas: FormSchema[] = [ | ||
17 | label: '', | 16 | label: '', |
18 | component: 'Checkbox', | 17 | component: 'Checkbox', |
19 | renderComponentContent: () => ({ | 18 | renderComponentContent: () => ({ |
20 | - default: () => SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS, | 19 | + default: () => t(SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS), |
21 | }), | 20 | }), |
22 | }, | 21 | }, |
23 | { | 22 | { |
24 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, | 23 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, |
25 | - label: h('span', t(SendEmailFieldsNameEnum.SMTP_PROTOCOL)), | 24 | + label: t(SendEmailFieldsNameEnum.SMTP_PROTOCOL), |
26 | component: 'Select', | 25 | component: 'Select', |
27 | required: true, | 26 | required: true, |
28 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 27 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
@@ -31,42 +30,42 @@ export const formSchemas: FormSchema[] = [ | @@ -31,42 +30,42 @@ export const formSchemas: FormSchema[] = [ | ||
31 | label: EmailProtocolNameEnum[value], | 30 | label: EmailProtocolNameEnum[value], |
32 | value, | 31 | value, |
33 | })), | 32 | })), |
34 | - placeholder: `请选择${SendEmailFieldsNameEnum.SMTP_PROTOCOL}`, | 33 | + placeholder: `请选择${t(SendEmailFieldsNameEnum.SMTP_PROTOCOL)}`, |
35 | getPopupContainer: () => document.body, | 34 | getPopupContainer: () => document.body, |
36 | }, | 35 | }, |
37 | }, | 36 | }, |
38 | { | 37 | { |
39 | field: SendEmailFieldsEnum.SMTP_HOST, | 38 | field: SendEmailFieldsEnum.SMTP_HOST, |
40 | - label: h('span', t(SendEmailFieldsNameEnum.SMTP_HOST)), | 39 | + label: t(SendEmailFieldsNameEnum.SMTP_HOST), |
41 | component: 'Input', | 40 | component: 'Input', |
42 | required: true, | 41 | required: true, |
43 | colProps: { span: 12 }, | 42 | colProps: { span: 12 }, |
44 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 43 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
45 | componentProps: { | 44 | componentProps: { |
46 | - placeholder: `请输入${SendEmailFieldsNameEnum.SMTP_HOST}`, | 45 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.SMTP_HOST)}`, |
47 | }, | 46 | }, |
48 | }, | 47 | }, |
49 | { | 48 | { |
50 | field: SendEmailFieldsEnum.SMTP_PORT, | 49 | field: SendEmailFieldsEnum.SMTP_PORT, |
51 | - label: h('span', t(SendEmailFieldsNameEnum.SMTP_PORT)), | 50 | + label: t(SendEmailFieldsNameEnum.SMTP_PORT), |
52 | component: 'InputNumber', | 51 | component: 'InputNumber', |
53 | required: true, | 52 | required: true, |
54 | colProps: { span: 12 }, | 53 | colProps: { span: 12 }, |
55 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 54 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
56 | componentProps: { | 55 | componentProps: { |
57 | min: 0, | 56 | min: 0, |
58 | - placeholder: `请输入${SendEmailFieldsNameEnum.SMTP_PORT}`, | 57 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.SMTP_PORT)}`, |
59 | }, | 58 | }, |
60 | }, | 59 | }, |
61 | { | 60 | { |
62 | field: SendEmailFieldsEnum.TIMEOUT, | 61 | field: SendEmailFieldsEnum.TIMEOUT, |
63 | - label: h('span', t(SendEmailFieldsNameEnum.TIMEOUT)), | 62 | + label: t(SendEmailFieldsNameEnum.TIMEOUT), |
64 | component: 'InputNumber', | 63 | component: 'InputNumber', |
65 | required: true, | 64 | required: true, |
66 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 65 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
67 | componentProps: { | 66 | componentProps: { |
68 | min: 0, | 67 | min: 0, |
69 | - placeholder: `请输入${SendEmailFieldsNameEnum.TIMEOUT}`, | 68 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.TIMEOUT)}`, |
70 | }, | 69 | }, |
71 | }, | 70 | }, |
72 | { | 71 | { |
@@ -75,12 +74,12 @@ export const formSchemas: FormSchema[] = [ | @@ -75,12 +74,12 @@ export const formSchemas: FormSchema[] = [ | ||
75 | component: 'Checkbox', | 74 | component: 'Checkbox', |
76 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 75 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
77 | renderComponentContent: () => ({ | 76 | renderComponentContent: () => ({ |
78 | - default: () => SendEmailFieldsNameEnum.ENABLE_TLS, | 77 | + default: () => t(SendEmailFieldsNameEnum.ENABLE_TLS), |
79 | }), | 78 | }), |
80 | }, | 79 | }, |
81 | { | 80 | { |
82 | field: SendEmailFieldsEnum.TLS_VERSION, | 81 | field: SendEmailFieldsEnum.TLS_VERSION, |
83 | - label: h('span', t(SendEmailFieldsNameEnum.TLS_VERSION)), | 82 | + label: t(SendEmailFieldsNameEnum.TLS_VERSION), |
84 | component: 'Select', | 83 | component: 'Select', |
85 | required: true, | 84 | required: true, |
86 | ifShow: ({ model }) => | 85 | ifShow: ({ model }) => |
@@ -90,7 +89,7 @@ export const formSchemas: FormSchema[] = [ | @@ -90,7 +89,7 @@ export const formSchemas: FormSchema[] = [ | ||
90 | label: TSLVersionNameEnum[value], | 89 | label: TSLVersionNameEnum[value], |
91 | value, | 90 | value, |
92 | })), | 91 | })), |
93 | - placeholder: `请选择${SendEmailFieldsNameEnum.TLS_VERSION}`, | 92 | + placeholder: `请选择${t(SendEmailFieldsNameEnum.TLS_VERSION)}`, |
94 | getPopupContainer: () => document.body, | 93 | getPopupContainer: () => document.body, |
95 | }, | 94 | }, |
96 | }, | 95 | }, |
@@ -100,12 +99,12 @@ export const formSchemas: FormSchema[] = [ | @@ -100,12 +99,12 @@ export const formSchemas: FormSchema[] = [ | ||
100 | component: 'Checkbox', | 99 | component: 'Checkbox', |
101 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 100 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
102 | renderComponentContent: () => ({ | 101 | renderComponentContent: () => ({ |
103 | - default: () => SendEmailFieldsNameEnum.ENABLE_PROXY, | 102 | + default: () => t(SendEmailFieldsNameEnum.ENABLE_PROXY), |
104 | }), | 103 | }), |
105 | }, | 104 | }, |
106 | { | 105 | { |
107 | field: SendEmailFieldsEnum.PROXY_HOST, | 106 | field: SendEmailFieldsEnum.PROXY_HOST, |
108 | - label: h('span', t(SendEmailFieldsNameEnum.PROXY_HOST)), | 107 | + label: t(SendEmailFieldsNameEnum.PROXY_HOST), |
109 | component: 'Input', | 108 | component: 'Input', |
110 | required: true, | 109 | required: true, |
111 | colProps: { span: 12 }, | 110 | colProps: { span: 12 }, |
@@ -113,12 +112,12 @@ export const formSchemas: FormSchema[] = [ | @@ -113,12 +112,12 @@ export const formSchemas: FormSchema[] = [ | ||
113 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 112 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
114 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 113 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
115 | componentProps: { | 114 | componentProps: { |
116 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_HOST}`, | 115 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_HOST)}`, |
117 | }, | 116 | }, |
118 | }, | 117 | }, |
119 | { | 118 | { |
120 | field: SendEmailFieldsEnum.PROXY_PORT, | 119 | field: SendEmailFieldsEnum.PROXY_PORT, |
121 | - label: h('span', t(SendEmailFieldsNameEnum.PROXY_PORT)), | 120 | + label: t(SendEmailFieldsNameEnum.PROXY_PORT), |
122 | component: 'Input', | 121 | component: 'Input', |
123 | required: true, | 122 | required: true, |
124 | colProps: { span: 12 }, | 123 | colProps: { span: 12 }, |
@@ -126,47 +125,47 @@ export const formSchemas: FormSchema[] = [ | @@ -126,47 +125,47 @@ export const formSchemas: FormSchema[] = [ | ||
126 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 125 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
127 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 126 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
128 | componentProps: { | 127 | componentProps: { |
129 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_PORT}`, | 128 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_PORT)}`, |
130 | }, | 129 | }, |
131 | }, | 130 | }, |
132 | { | 131 | { |
133 | field: SendEmailFieldsEnum.PROXY_USER, | 132 | field: SendEmailFieldsEnum.PROXY_USER, |
134 | - label: h('span', t(SendEmailFieldsNameEnum.PROXY_USER)), | 133 | + label: t(SendEmailFieldsNameEnum.PROXY_USER), |
135 | component: 'Input', | 134 | component: 'Input', |
136 | ifShow: ({ model }) => | 135 | ifShow: ({ model }) => |
137 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 136 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
138 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 137 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
139 | componentProps: { | 138 | componentProps: { |
140 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_USER}`, | 139 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_USER)}`, |
141 | }, | 140 | }, |
142 | }, | 141 | }, |
143 | { | 142 | { |
144 | field: SendEmailFieldsEnum.PROXY_PASSWORD, | 143 | field: SendEmailFieldsEnum.PROXY_PASSWORD, |
145 | - label: h('span', t(SendEmailFieldsNameEnum.PROXY_PASSWORD)), | 144 | + label: t(SendEmailFieldsNameEnum.PROXY_PASSWORD), |
146 | component: 'Input', | 145 | component: 'Input', |
147 | ifShow: ({ model }) => | 146 | ifShow: ({ model }) => |
148 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 147 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
149 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 148 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
150 | componentProps: { | 149 | componentProps: { |
151 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_PASSWORD}`, | 150 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_PASSWORD)}`, |
152 | }, | 151 | }, |
153 | }, | 152 | }, |
154 | { | 153 | { |
155 | field: SendEmailFieldsEnum.USERNAME, | 154 | field: SendEmailFieldsEnum.USERNAME, |
156 | - label: h('span', t(SendEmailFieldsNameEnum.USERNAME)), | 155 | + label: t(SendEmailFieldsNameEnum.USERNAME), |
157 | component: 'Input', | 156 | component: 'Input', |
158 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 157 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
159 | componentProps: { | 158 | componentProps: { |
160 | - placeholder: `请输入${SendEmailFieldsNameEnum.USERNAME}`, | 159 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.USERNAME)}`, |
161 | }, | 160 | }, |
162 | }, | 161 | }, |
163 | { | 162 | { |
164 | field: SendEmailFieldsEnum.PASSWORD, | 163 | field: SendEmailFieldsEnum.PASSWORD, |
165 | - label: h('span', t(SendEmailFieldsNameEnum.PASSWORD)), | 164 | + label: t(SendEmailFieldsNameEnum.PASSWORD), |
166 | component: 'InputPassword', | 165 | component: 'InputPassword', |
167 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 166 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
168 | componentProps: { | 167 | componentProps: { |
169 | - placeholder: `请输入${SendEmailFieldsNameEnum.PASSWORD}`, | 168 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PASSWORD)}`, |
170 | }, | 169 | }, |
171 | }, | 170 | }, |
172 | ]; | 171 | ]; |
1 | -import { h } from 'vue'; | ||
2 | import { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; | 1 | import { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; |
3 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -9,24 +8,24 @@ const { t } = useI18n(); | @@ -9,24 +8,24 @@ const { t } = useI18n(); | ||
9 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
10 | { | 9 | { |
11 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, | 10 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, |
12 | - label: h('span', t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE)), | 11 | + label: t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE), |
13 | component: 'Input', | 12 | component: 'Input', |
14 | required: true, | 13 | required: true, |
15 | helpMessage: | 14 | helpMessage: |
16 | 'Comma separated Phone Numbers, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 15 | 'Comma separated Phone Numbers, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
17 | componentProps: { | 16 | componentProps: { |
18 | - placeholder: `请输入${SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE}`, | 17 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE)}`, |
19 | }, | 18 | }, |
20 | }, | 19 | }, |
21 | { | 20 | { |
22 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, | 21 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, |
23 | - label: h('span', t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE)), | 22 | + label: t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE), |
24 | component: 'InputTextArea', | 23 | component: 'InputTextArea', |
25 | required: true, | 24 | required: true, |
26 | helpMessage: | 25 | helpMessage: |
27 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 26 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
28 | componentProps: { | 27 | componentProps: { |
29 | - placeholder: `请输入${SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE}`, | 28 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE)}`, |
30 | }, | 29 | }, |
31 | }, | 30 | }, |
32 | { | 31 | { |
@@ -34,12 +33,12 @@ export const formSchemas: FormSchema[] = [ | @@ -34,12 +33,12 @@ export const formSchemas: FormSchema[] = [ | ||
34 | label: '', | 33 | label: '', |
35 | component: 'Checkbox', | 34 | component: 'Checkbox', |
36 | renderComponentContent: () => ({ | 35 | renderComponentContent: () => ({ |
37 | - default: () => SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS, | 36 | + default: () => t(SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS), |
38 | }), | 37 | }), |
39 | }, | 38 | }, |
40 | { | 39 | { |
41 | field: SendSMSFieldsEnum.TYPE, | 40 | field: SendSMSFieldsEnum.TYPE, |
42 | - label: h('span', t(SendSMSFieldsNameEnum.TYPE)), | 41 | + label: t(SendSMSFieldsNameEnum.TYPE), |
43 | component: 'Select', | 42 | component: 'Select', |
44 | required: true, | 43 | required: true, |
45 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], | 44 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], |
@@ -49,12 +48,12 @@ export const formSchemas: FormSchema[] = [ | @@ -49,12 +48,12 @@ export const formSchemas: FormSchema[] = [ | ||
49 | value, | 48 | value, |
50 | })), | 49 | })), |
51 | getPopupContainer: () => document.body, | 50 | getPopupContainer: () => document.body, |
52 | - placeholder: `请选择${SendSMSFieldsNameEnum.TYPE}`, | 51 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.TYPE)}`, |
53 | }, | 52 | }, |
54 | }, | 53 | }, |
55 | { | 54 | { |
56 | field: SendSMSFieldsEnum.NUMBER_FROM, | 55 | field: SendSMSFieldsEnum.NUMBER_FROM, |
57 | - label: h('span', t(SendSMSFieldsNameEnum.NUMBER_FROM)), | 56 | + label: t(SendSMSFieldsNameEnum.NUMBER_FROM), |
58 | component: 'Input', | 57 | component: 'Input', |
59 | required: true, | 58 | required: true, |
60 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, | 59 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, |
@@ -62,67 +61,67 @@ export const formSchemas: FormSchema[] = [ | @@ -62,67 +61,67 @@ export const formSchemas: FormSchema[] = [ | ||
62 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 61 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
63 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 62 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
64 | componentProps: { | 63 | componentProps: { |
65 | - placeholder: `请输入${SendSMSFieldsNameEnum.NUMBER_FROM}`, | 64 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.NUMBER_FROM)}`, |
66 | }, | 65 | }, |
67 | }, | 66 | }, |
68 | { | 67 | { |
69 | field: SendSMSFieldsEnum.ACCOUNT_SID, | 68 | field: SendSMSFieldsEnum.ACCOUNT_SID, |
70 | - label: h('span', t(SendSMSFieldsNameEnum.ACCOUNT_SID)), | 69 | + label: t(SendSMSFieldsNameEnum.ACCOUNT_SID), |
71 | component: 'Input', | 70 | component: 'Input', |
72 | required: true, | 71 | required: true, |
73 | ifShow: ({ model }) => | 72 | ifShow: ({ model }) => |
74 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 73 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
75 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 74 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
76 | componentProps: { | 75 | componentProps: { |
77 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCOUNT_SID}`, | 76 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCOUNT_SID)}`, |
78 | }, | 77 | }, |
79 | }, | 78 | }, |
80 | { | 79 | { |
81 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, | 80 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, |
82 | - label: h('span', t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN)), | 81 | + label: t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN), |
83 | component: 'Input', | 82 | component: 'Input', |
84 | required: true, | 83 | required: true, |
85 | ifShow: ({ model }) => | 84 | ifShow: ({ model }) => |
86 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 85 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
87 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 86 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
88 | componentProps: { | 87 | componentProps: { |
89 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCOUNT_TOKEN}`, | 88 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN)}`, |
90 | }, | 89 | }, |
91 | }, | 90 | }, |
92 | { | 91 | { |
93 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, | 92 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, |
94 | - label: h('span', t(SendSMSFieldsNameEnum.ACCESS_KEY_ID)), | 93 | + label: t(SendSMSFieldsNameEnum.ACCESS_KEY_ID), |
95 | component: 'Input', | 94 | component: 'Input', |
96 | required: true, | 95 | required: true, |
97 | ifShow: ({ model }) => | 96 | ifShow: ({ model }) => |
98 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 97 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
99 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 98 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
100 | componentProps: { | 99 | componentProps: { |
101 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCESS_KEY_ID}`, | 100 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCESS_KEY_ID)}`, |
102 | }, | 101 | }, |
103 | }, | 102 | }, |
104 | { | 103 | { |
105 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, | 104 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, |
106 | - label: h('span', t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY)), | 105 | + label: t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY), |
107 | component: 'InputPassword', | 106 | component: 'InputPassword', |
108 | required: true, | 107 | required: true, |
109 | ifShow: ({ model }) => | 108 | ifShow: ({ model }) => |
110 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 109 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
111 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 110 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
112 | componentProps: { | 111 | componentProps: { |
113 | - placeholder: `请选择${SendSMSFieldsNameEnum.SECRET_ACCESS_KEY}`, | 112 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
114 | }, | 113 | }, |
115 | }, | 114 | }, |
116 | { | 115 | { |
117 | field: SendSMSFieldsEnum.REGION, | 116 | field: SendSMSFieldsEnum.REGION, |
118 | - label: h('span', t(SendSMSFieldsNameEnum.REGION)), | 117 | + label: t(SendSMSFieldsNameEnum.REGION), |
119 | component: 'InputPassword', | 118 | component: 'InputPassword', |
120 | required: true, | 119 | required: true, |
121 | ifShow: ({ model }) => | 120 | ifShow: ({ model }) => |
122 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 121 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
123 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 122 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
124 | componentProps: { | 123 | componentProps: { |
125 | - placeholder: `请选择${SendSMSFieldsNameEnum.REGION}`, | 124 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.REGION)}`, |
126 | }, | 125 | }, |
127 | }, | 126 | }, |
128 | ]; | 127 | ]; |
@@ -7,13 +7,12 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -7,13 +7,12 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | 7 | ||
8 | const { t } = useI18n(); | 8 | const { t } = useI18n(); |
9 | import { AlarmStatus, AlarmStatusMean } from '/@/enums/alarmEnum'; | 9 | import { AlarmStatus, AlarmStatusMean } from '/@/enums/alarmEnum'; |
10 | -import { h } from 'vue'; | ||
11 | 10 | ||
12 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
13 | { | 12 | { |
14 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, | 13 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, |
15 | component: 'Select', | 14 | component: 'Select', |
16 | - label: h('span', t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)), | 15 | + label: t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST), |
17 | rules: [ | 16 | rules: [ |
18 | { | 17 | { |
19 | required: true, | 18 | required: true, |
1 | -import { h } from 'vue'; | ||
2 | import { | 1 | import { |
3 | CheckExistenceFieldsEnum, | 2 | CheckExistenceFieldsEnum, |
4 | CheckExistenceFieldsNameEnum, | 3 | CheckExistenceFieldsNameEnum, |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, | 12 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, |
14 | component: 'Select', | 13 | component: 'Select', |
15 | - label: h('span', t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)), | 14 | + label: t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES), |
16 | rules: [ | 15 | rules: [ |
17 | { | 16 | { |
18 | required: true, | 17 | required: true, |
@@ -30,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | @@ -30,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | ||
30 | { | 29 | { |
31 | field: CheckExistenceFieldsEnum.METADATA_NAMES, | 30 | field: CheckExistenceFieldsEnum.METADATA_NAMES, |
32 | component: 'Select', | 31 | component: 'Select', |
33 | - label: h('span', t(CheckExistenceFieldsNameEnum.METADATA_NAMES)), | 32 | + label: t(CheckExistenceFieldsNameEnum.METADATA_NAMES), |
34 | rules: [ | 33 | rules: [ |
35 | { | 34 | { |
36 | required: true, | 35 | required: true, |
@@ -26,7 +26,6 @@ import { | @@ -26,7 +26,6 @@ import { | ||
26 | getEntityEdge, | 26 | getEntityEdge, |
27 | } from '/@/api/ruleChainDesigner'; | 27 | } from '/@/api/ruleChainDesigner'; |
28 | import { useUserStore } from '/@/store/modules/user'; | 28 | import { useUserStore } from '/@/store/modules/user'; |
29 | -import { h } from 'vue'; | ||
30 | 29 | ||
31 | export const getEntityIdSelect = (type: EntityTypeEnum) => { | 30 | export const getEntityIdSelect = (type: EntityTypeEnum) => { |
32 | const method = { | 31 | const method = { |
@@ -51,7 +50,7 @@ export const getEntityIdSelect = (type: EntityTypeEnum) => { | @@ -51,7 +50,7 @@ export const getEntityIdSelect = (type: EntityTypeEnum) => { | ||
51 | }; | 50 | }; |
52 | 51 | ||
53 | return { | 52 | return { |
54 | - placeholder: `请选择${EntityTypeNameEnum[type] ?? ''}`, | 53 | + placeholder: `请选择${t(EntityTypeNameEnum[type] ?? '')}`, |
55 | resultField: 'data', | 54 | resultField: 'data', |
56 | labelField: 'name', | 55 | labelField: 'name', |
57 | valueField: 'id.id', | 56 | valueField: 'id.id', |
@@ -74,7 +73,7 @@ export const formSchemas: FormSchema[] = [ | @@ -74,7 +73,7 @@ export const formSchemas: FormSchema[] = [ | ||
74 | { | 73 | { |
75 | field: CheckRelationFieldsEnum.DIRECTION, | 74 | field: CheckRelationFieldsEnum.DIRECTION, |
76 | component: 'Select', | 75 | component: 'Select', |
77 | - label: h('span', t(CheckRelationFieldsNameEnum.DIRECTION)), | 76 | + label: t(CheckRelationFieldsNameEnum.DIRECTION), |
78 | componentProps: { | 77 | componentProps: { |
79 | options: [ | 78 | options: [ |
80 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, | 79 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, |
@@ -87,7 +86,7 @@ export const formSchemas: FormSchema[] = [ | @@ -87,7 +86,7 @@ export const formSchemas: FormSchema[] = [ | ||
87 | { | 86 | { |
88 | field: CheckRelationFieldsEnum.ENTITY_TYPE, | 87 | field: CheckRelationFieldsEnum.ENTITY_TYPE, |
89 | component: 'Select', | 88 | component: 'Select', |
90 | - label: h('span', t(CheckRelationFieldsNameEnum.ENTITY_TYPE)), | 89 | + label: t(CheckRelationFieldsNameEnum.ENTITY_TYPE), |
91 | colProps: { span: 8 }, | 90 | colProps: { span: 8 }, |
92 | componentProps: ({ formActionType }) => { | 91 | componentProps: ({ formActionType }) => { |
93 | const { setFieldsValue } = formActionType; | 92 | const { setFieldsValue } = formActionType; |
@@ -120,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | @@ -120,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | ||
120 | { | 119 | { |
121 | field: CheckRelationFieldsEnum.RELEATION_TYPE, | 120 | field: CheckRelationFieldsEnum.RELEATION_TYPE, |
122 | component: 'Select', | 121 | component: 'Select', |
123 | - label: h('span', t(CheckRelationFieldsNameEnum.RELEATION_TYPE)), | 122 | + label: t(CheckRelationFieldsNameEnum.RELEATION_TYPE), |
124 | defaultValue: RelationTypeEnum.CONTAINS, | 123 | defaultValue: RelationTypeEnum.CONTAINS, |
125 | componentProps: { | 124 | componentProps: { |
126 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 125 | options: Object.keys(RelationTypeEnum).map((value) => ({ |
1 | -import { h } from 'vue'; | ||
2 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; | 1 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | GpsGeofencingFilterFieldsEnum, | 3 | GpsGeofencingFilterFieldsEnum, |
@@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: GpsGeofencingFilterFieldsEnum.LATITUDE_KEY_NAME, | 13 | field: GpsGeofencingFilterFieldsEnum.LATITUDE_KEY_NAME, |
15 | component: 'Input', | 14 | component: 'Input', |
16 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME)), | 15 | + label: t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME), |
17 | componentProps: { | 16 | componentProps: { |
18 | placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME)}`, | 17 | placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME)}`, |
19 | }, | 18 | }, |
@@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 20 | { |
22 | field: GpsGeofencingFilterFieldsEnum.LONGITUDE_KEY_NAME, | 21 | field: GpsGeofencingFilterFieldsEnum.LONGITUDE_KEY_NAME, |
23 | component: 'Input', | 22 | component: 'Input', |
24 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME)), | 23 | + label: t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME), |
25 | componentProps: { | 24 | componentProps: { |
26 | placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME)}`, | 25 | placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME)}`, |
27 | }, | 26 | }, |
@@ -29,7 +28,7 @@ export const formSchemas: FormSchema[] = [ | @@ -29,7 +28,7 @@ export const formSchemas: FormSchema[] = [ | ||
29 | { | 28 | { |
30 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE, | 29 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE, |
31 | component: 'Select', | 30 | component: 'Select', |
32 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE)), | 31 | + label: t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE), |
33 | componentProps: { | 32 | componentProps: { |
34 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), | 33 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), |
35 | placeholder: `请选择${t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE)}`, | 34 | placeholder: `请选择${t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE)}`, |
@@ -47,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | @@ -47,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | ||
47 | { | 46 | { |
48 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_KEY_NAME, | 47 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_KEY_NAME, |
49 | component: 'Input', | 48 | component: 'Input', |
50 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME)), | 49 | + label: t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME), |
51 | show: ({ model }) => | 50 | show: ({ model }) => |
52 | model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 51 | model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
53 | componentProps: { | 52 | componentProps: { |
@@ -57,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | @@ -57,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | ||
57 | { | 56 | { |
58 | field: GpsGeofencingFilterFieldsEnum.POLYGONS_DEFINITION, | 57 | field: GpsGeofencingFilterFieldsEnum.POLYGONS_DEFINITION, |
59 | component: 'Input', | 58 | component: 'Input', |
60 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION)), | 59 | + label: t(GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION), |
61 | helpMessage: | 60 | helpMessage: |
62 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', | 61 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', |
63 | show: ({ model }) => | 62 | show: ({ model }) => |
@@ -70,7 +69,7 @@ export const formSchemas: FormSchema[] = [ | @@ -70,7 +69,7 @@ export const formSchemas: FormSchema[] = [ | ||
70 | { | 69 | { |
71 | field: GpsGeofencingFilterFieldsEnum.CENTER_LATITUDE, | 70 | field: GpsGeofencingFilterFieldsEnum.CENTER_LATITUDE, |
72 | component: 'InputNumber', | 71 | component: 'InputNumber', |
73 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE)), | 72 | + label: t(GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE), |
74 | colProps: { span: 12 }, | 73 | colProps: { span: 12 }, |
75 | show: ({ model }) => | 74 | show: ({ model }) => |
76 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 75 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
@@ -82,7 +81,7 @@ export const formSchemas: FormSchema[] = [ | @@ -82,7 +81,7 @@ export const formSchemas: FormSchema[] = [ | ||
82 | { | 81 | { |
83 | field: GpsGeofencingFilterFieldsEnum.CENTER_LONGITUDE, | 82 | field: GpsGeofencingFilterFieldsEnum.CENTER_LONGITUDE, |
84 | component: 'InputNumber', | 83 | component: 'InputNumber', |
85 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE)), | 84 | + label: t(GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE), |
86 | colProps: { span: 12 }, | 85 | colProps: { span: 12 }, |
87 | show: ({ model }) => | 86 | show: ({ model }) => |
88 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 87 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
@@ -94,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | @@ -94,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | ||
94 | { | 93 | { |
95 | field: GpsGeofencingFilterFieldsEnum.RANGE, | 94 | field: GpsGeofencingFilterFieldsEnum.RANGE, |
96 | component: 'InputNumber', | 95 | component: 'InputNumber', |
97 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.RANGE)), | 96 | + label: t(GpsGeofencingFilterFieldsNameEnum.RANGE), |
98 | colProps: { span: 12 }, | 97 | colProps: { span: 12 }, |
99 | show: ({ model }) => | 98 | show: ({ model }) => |
100 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 99 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
@@ -106,7 +105,7 @@ export const formSchemas: FormSchema[] = [ | @@ -106,7 +105,7 @@ export const formSchemas: FormSchema[] = [ | ||
106 | { | 105 | { |
107 | field: GpsGeofencingFilterFieldsEnum.RANGE_UNIT, | 106 | field: GpsGeofencingFilterFieldsEnum.RANGE_UNIT, |
108 | component: 'Select', | 107 | component: 'Select', |
109 | - label: h('span', t(GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT)), | 108 | + label: t(GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT), |
110 | colProps: { span: 12 }, | 109 | colProps: { span: 12 }, |
111 | show: ({ model }) => | 110 | show: ({ model }) => |
112 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 111 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
1 | -import { h } from 'vue'; | ||
2 | import { MessageTypesEnum, MessageTypesNameEnum } from '../../../enum/form'; | 1 | import { MessageTypesEnum, MessageTypesNameEnum } from '../../../enum/form'; |
3 | import { MessageTypeFieldsEnum, MessageTypeFieldsNameEnum } from '../../../enum/formField/filter'; | 2 | import { MessageTypeFieldsEnum, MessageTypeFieldsNameEnum } from '../../../enum/formField/filter'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -10,7 +9,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +9,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 9 | { |
11 | field: MessageTypeFieldsEnum.MESSAGE_TYPES, | 10 | field: MessageTypeFieldsEnum.MESSAGE_TYPES, |
12 | component: 'Select', | 11 | component: 'Select', |
13 | - label: h('span', t(MessageTypeFieldsNameEnum.MESSAGE_TYPES)), | 12 | + label: t(MessageTypeFieldsNameEnum.MESSAGE_TYPES), |
14 | componentProps: { | 13 | componentProps: { |
15 | options: Object.keys(MessageTypesEnum).map((value) => ({ | 14 | options: Object.keys(MessageTypesEnum).map((value) => ({ |
16 | label: MessageTypesNameEnum[value], | 15 | label: MessageTypesNameEnum[value], |
@@ -8,13 +8,12 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -8,13 +8,12 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | 8 | ||
9 | const { t } = useI18n(); | 9 | const { t } = useI18n(); |
10 | import { DictEnum } from '/@/enums/dictEnum'; | 10 | import { DictEnum } from '/@/enums/dictEnum'; |
11 | -import { h } from 'vue'; | ||
12 | 11 | ||
13 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
14 | { | 13 | { |
15 | field: OriginatorTypeFieldsEnum.ORIGINATOR_TYPES, | 14 | field: OriginatorTypeFieldsEnum.ORIGINATOR_TYPES, |
16 | component: 'ApiSelect', | 15 | component: 'ApiSelect', |
17 | - label: h('span', t(OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES)), | 16 | + label: t(OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES), |
18 | componentProps: { | 17 | componentProps: { |
19 | api: findDictItemByCode, | 18 | api: findDictItemByCode, |
20 | params: { | 19 | params: { |
1 | -import { h } from 'vue'; | ||
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 1 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import HelpMessage from './HelpMessage.vue'; | 2 | import HelpMessage from './HelpMessage.vue'; |
4 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; |
@@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 12 | { |
14 | field: ScriptFieldsEnum.JS_SCRIPT, | 13 | field: ScriptFieldsEnum.JS_SCRIPT, |
15 | component: 'JavascriptEditorWithTestModal', | 14 | component: 'JavascriptEditorWithTestModal', |
16 | - label: h('span', t(ScriptFieldsNameEnum.JS_SCRIPT)), | 15 | + label: t(ScriptFieldsNameEnum.JS_SCRIPT), |
17 | changeEvent: 'update:value', | 16 | changeEvent: 'update:value', |
18 | valueField: 'value', | 17 | valueField: 'value', |
19 | renderComponentContent: () => { | 18 | renderComponentContent: () => { |
1 | -import { h } from 'vue'; | ||
2 | import { SwitchFieldsEnum, SwitchFieldsNameEnum } from '../../../enum/formField/filter'; | 1 | import { SwitchFieldsEnum, SwitchFieldsNameEnum } from '../../../enum/formField/filter'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: SwitchFieldsEnum.JS_SCRIPT, | 12 | field: SwitchFieldsEnum.JS_SCRIPT, |
14 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
15 | - label: h('span', t(SwitchFieldsNameEnum.JS_SCRIPT)), | 14 | + label: t(SwitchFieldsNameEnum.JS_SCRIPT), |
16 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
17 | valueField: 'value', | 16 | valueField: 'value', |
18 | componentProps: { | 17 | componentProps: { |
@@ -2,7 +2,7 @@ import { CheckPointFieldsEnum, CheckPointFieldsNameEnum } from '../../../enum/fo | @@ -2,7 +2,7 @@ import { CheckPointFieldsEnum, CheckPointFieldsNameEnum } from '../../../enum/fo | ||
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import ApiComplete from './ApiComplete.vue'; | 3 | import ApiComplete from './ApiComplete.vue'; |
4 | import { getTenantQueue } from '/@/api/ruleChainDesigner'; | 4 | import { getTenantQueue } from '/@/api/ruleChainDesigner'; |
5 | -import { h } from 'vue'; | 5 | + |
6 | import { useI18n } from '/@/hooks/web/useI18n'; | 6 | import { useI18n } from '/@/hooks/web/useI18n'; |
7 | 7 | ||
8 | const { t } = useI18n(); | 8 | const { t } = useI18n(); |
@@ -12,7 +12,7 @@ useComponentRegister('ApiComplete', ApiComplete); | @@ -12,7 +12,7 @@ useComponentRegister('ApiComplete', ApiComplete); | ||
12 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
13 | { | 13 | { |
14 | field: CheckPointFieldsEnum.QUEUE_NAME, | 14 | field: CheckPointFieldsEnum.QUEUE_NAME, |
15 | - label: h('span', t(CheckPointFieldsNameEnum.QUEUE_NAME)), | 15 | + label: t(CheckPointFieldsNameEnum.QUEUE_NAME), |
16 | component: 'ApiComplete', | 16 | component: 'ApiComplete', |
17 | required: true, | 17 | required: true, |
18 | helpMessage: ['从下拉列表中选择或自定义名称'], | 18 | helpMessage: ['从下拉列表中选择或自定义名称'], |
@@ -20,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | changeEvent: 'update:value', | 20 | changeEvent: 'update:value', |
21 | componentProps: () => { | 21 | componentProps: () => { |
22 | return { | 22 | return { |
23 | - placeholder: `请选择${CheckPointFieldsNameEnum.QUEUE_NAME}`, | 23 | + placeholder: `请选择${t(CheckPointFieldsNameEnum.QUEUE_NAME)}`, |
24 | getPopupContainer: () => document.body, | 24 | getPopupContainer: () => document.body, |
25 | api: async (params: Recordable) => { | 25 | api: async (params: Recordable) => { |
26 | const options = await getTenantQueue(params); | 26 | const options = await getTenantQueue(params); |
@@ -3,7 +3,6 @@ import { RuleChainFieldsEnum, RuleChainFieldsNameEnum } from '../../../enum/form | @@ -3,7 +3,6 @@ import { RuleChainFieldsEnum, RuleChainFieldsNameEnum } from '../../../enum/form | ||
3 | import { getRuleChains } from '/@/api/ruleDesigner'; | 3 | import { getRuleChains } from '/@/api/ruleDesigner'; |
4 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | import { useI18n } from '/@/hooks/web/useI18n'; | 5 | import { useI18n } from '/@/hooks/web/useI18n'; |
6 | -import { h } from 'vue'; | ||
7 | 6 | ||
8 | const { t } = useI18n(); | 7 | const { t } = useI18n(); |
9 | 8 | ||
@@ -26,7 +25,7 @@ export const getFormSchemas = (route: RouteLocationNormalizedLoaded): FormSchema | @@ -26,7 +25,7 @@ export const getFormSchemas = (route: RouteLocationNormalizedLoaded): FormSchema | ||
26 | return [ | 25 | return [ |
27 | { | 26 | { |
28 | field: RuleChainFieldsEnum.RULE_CHAIN_ID, | 27 | field: RuleChainFieldsEnum.RULE_CHAIN_ID, |
29 | - label: h('span', t(RuleChainFieldsNameEnum.RULE_CHAIN_ID)), | 28 | + label: t(RuleChainFieldsNameEnum.RULE_CHAIN_ID), |
30 | component: 'ApiSearchSelect', | 29 | component: 'ApiSearchSelect', |
31 | componentProps: () => { | 30 | componentProps: () => { |
32 | return { | 31 | return { |
1 | -import { h } from 'vue'; | ||
2 | import { OriginatorSourceEnum, OriginatorSourceNameEnum } from '../../../enum/form'; | 1 | import { OriginatorSourceEnum, OriginatorSourceNameEnum } from '../../../enum/form'; |
3 | import { | 2 | import { |
4 | ChangeOriginatorFieldsEnum, | 3 | ChangeOriginatorFieldsEnum, |
@@ -16,7 +15,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +15,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | { | 15 | { |
17 | field: ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE, | 16 | field: ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE, |
18 | component: 'Select', | 17 | component: 'Select', |
19 | - label: h('span', t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE)), | 18 | + label: t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE), |
20 | rules: [ | 19 | rules: [ |
21 | { required: true, message: `请选择${t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE)}` }, | 20 | { required: true, message: `请选择${t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE)}` }, |
22 | ], | 21 | ], |
@@ -32,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | @@ -32,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | ||
32 | { | 31 | { |
33 | field: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, | 32 | field: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, |
34 | component: 'RelationsQuery', | 33 | component: 'RelationsQuery', |
35 | - label: h('span', t(ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY)), | 34 | + label: t(ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY), |
36 | slot: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, | 35 | slot: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, |
37 | ifShow: ({ model }) => | 36 | ifShow: ({ model }) => |
38 | model[ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE] === OriginatorSourceEnum.RELATED, | 37 | model[ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE] === OriginatorSourceEnum.RELATED, |
1 | -import { h } from 'vue'; | ||
2 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/transformation'; | 1 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/transformation'; |
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
@@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -12,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 11 | { |
13 | field: ScriptFieldsEnum.JS_SCRIPT, | 12 | field: ScriptFieldsEnum.JS_SCRIPT, |
14 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
15 | - label: h('span', t(ScriptFieldsNameEnum.JS_SCRIPT)), | 14 | + label: t(ScriptFieldsNameEnum.JS_SCRIPT), |
16 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
17 | valueField: 'value', | 16 | valueField: 'value', |
18 | componentProps: { | 17 | componentProps: { |
1 | -import { h } from 'vue'; | ||
2 | import { MailBodyTypeEnum, MailBodyTypeNameEnum } from '../../../enum/form'; | 1 | import { MailBodyTypeEnum, MailBodyTypeNameEnum } from '../../../enum/form'; |
3 | import { ToEmailFieldsEnum, ToEmailFieldsNameEnum } from '../../../enum/formField/transformation'; | 2 | import { ToEmailFieldsEnum, ToEmailFieldsNameEnum } from '../../../enum/formField/transformation'; |
4 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
@@ -10,7 +9,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +9,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 9 | { |
11 | field: ToEmailFieldsEnum.FROM_TEMPLATE, | 10 | field: ToEmailFieldsEnum.FROM_TEMPLATE, |
12 | component: 'Input', | 11 | component: 'Input', |
13 | - label: h('span', t(ToEmailFieldsNameEnum.FROM_TEMPLATE)), | 12 | + label: t(ToEmailFieldsNameEnum.FROM_TEMPLATE), |
14 | helpMessage: [ | 13 | helpMessage: [ |
15 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 14 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
16 | ], | 15 | ], |
@@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 20 | { |
22 | field: ToEmailFieldsEnum.TO_TEMPLATE, | 21 | field: ToEmailFieldsEnum.TO_TEMPLATE, |
23 | component: 'Input', | 22 | component: 'Input', |
24 | - label: h('span', t(ToEmailFieldsNameEnum.TO_TEMPLATE)), | 23 | + label: t(ToEmailFieldsNameEnum.TO_TEMPLATE), |
25 | helpMessage: [ | 24 | helpMessage: [ |
26 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 25 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
27 | ], | 26 | ], |
@@ -32,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | @@ -32,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | ||
32 | { | 31 | { |
33 | field: ToEmailFieldsEnum.CC_TEMPLATE, | 32 | field: ToEmailFieldsEnum.CC_TEMPLATE, |
34 | component: 'Input', | 33 | component: 'Input', |
35 | - label: h('span', t(ToEmailFieldsNameEnum.CC_TEMPLATE)), | 34 | + label: t(ToEmailFieldsNameEnum.CC_TEMPLATE), |
36 | helpMessage: [ | 35 | helpMessage: [ |
37 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 36 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
38 | ], | 37 | ], |
@@ -43,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | @@ -43,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | ||
43 | { | 42 | { |
44 | field: ToEmailFieldsEnum.BCC_TEMPLATE, | 43 | field: ToEmailFieldsEnum.BCC_TEMPLATE, |
45 | component: 'Input', | 44 | component: 'Input', |
46 | - label: h('span', t(ToEmailFieldsNameEnum.BCC_TEMPLATE)), | 45 | + label: t(ToEmailFieldsNameEnum.BCC_TEMPLATE), |
47 | helpMessage: [ | 46 | helpMessage: [ |
48 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 47 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
49 | ], | 48 | ], |
@@ -54,7 +53,7 @@ export const formSchemas: FormSchema[] = [ | @@ -54,7 +53,7 @@ export const formSchemas: FormSchema[] = [ | ||
54 | { | 53 | { |
55 | field: ToEmailFieldsEnum.SUBJECT_TEMPLATE, | 54 | field: ToEmailFieldsEnum.SUBJECT_TEMPLATE, |
56 | component: 'Input', | 55 | component: 'Input', |
57 | - label: h('span', t(ToEmailFieldsNameEnum.SUBJECT_TEMPLATE)), | 56 | + label: t(ToEmailFieldsNameEnum.SUBJECT_TEMPLATE), |
58 | helpMessage: [ | 57 | helpMessage: [ |
59 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 58 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
60 | ], | 59 | ], |
@@ -65,7 +64,7 @@ export const formSchemas: FormSchema[] = [ | @@ -65,7 +64,7 @@ export const formSchemas: FormSchema[] = [ | ||
65 | { | 64 | { |
66 | field: ToEmailFieldsEnum.MAIL_BODY_TYPE, | 65 | field: ToEmailFieldsEnum.MAIL_BODY_TYPE, |
67 | component: 'Select', | 66 | component: 'Select', |
68 | - label: h('span', t(ToEmailFieldsNameEnum.MAIL_BODY_TYPE)), | 67 | + label: t(ToEmailFieldsNameEnum.MAIL_BODY_TYPE), |
69 | componentProps: ({ formActionType }) => { | 68 | componentProps: ({ formActionType }) => { |
70 | const { setFieldsValue } = formActionType; | 69 | const { setFieldsValue } = formActionType; |
71 | return { | 70 | return { |
@@ -85,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | @@ -85,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | ||
85 | { | 84 | { |
86 | field: ToEmailFieldsEnum.IS_HTML_TEMPLATE, | 85 | field: ToEmailFieldsEnum.IS_HTML_TEMPLATE, |
87 | component: 'Input', | 86 | component: 'Input', |
88 | - label: h('span', t(ToEmailFieldsNameEnum.IS_HTML_TEMPLATE)), | 87 | + label: t(ToEmailFieldsNameEnum.IS_HTML_TEMPLATE), |
89 | show: ({ model }) => model[ToEmailFieldsEnum.MAIL_BODY_TYPE] === MailBodyTypeEnum.DYNAMIC, | 88 | show: ({ model }) => model[ToEmailFieldsEnum.MAIL_BODY_TYPE] === MailBodyTypeEnum.DYNAMIC, |
90 | helpMessage: [ | 89 | helpMessage: [ |
91 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 90 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
@@ -97,7 +96,7 @@ export const formSchemas: FormSchema[] = [ | @@ -97,7 +96,7 @@ export const formSchemas: FormSchema[] = [ | ||
97 | { | 96 | { |
98 | field: ToEmailFieldsEnum.BODY_TEMPLATE, | 97 | field: ToEmailFieldsEnum.BODY_TEMPLATE, |
99 | component: 'InputTextArea', | 98 | component: 'InputTextArea', |
100 | - label: h('span', t(ToEmailFieldsEnum.BODY_TEMPLATE)), | 99 | + label: t(ToEmailFieldsEnum.BODY_TEMPLATE), |
101 | componentProps: { | 100 | componentProps: { |
102 | placeholder: `请输入${t(ToEmailFieldsNameEnum.BODY_TEMPLATE)}`, | 101 | placeholder: `请输入${t(ToEmailFieldsNameEnum.BODY_TEMPLATE)}`, |
103 | autoSize: { minRows: 3 }, | 102 | autoSize: { minRows: 3 }, |
1 | -import { h } from 'vue'; | ||
2 | import { NodeBindDataFieldEnum, NodeBindDataFieldNameEnum } from '../../../enum/node'; | 1 | import { NodeBindDataFieldEnum, NodeBindDataFieldNameEnum } from '../../../enum/node'; |
3 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 3 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -9,7 +8,7 @@ export const TopFormSchemas: FormSchema[] = [ | @@ -9,7 +8,7 @@ export const TopFormSchemas: FormSchema[] = [ | ||
9 | { | 8 | { |
10 | field: NodeBindDataFieldEnum.NAME, | 9 | field: NodeBindDataFieldEnum.NAME, |
11 | component: 'Input', | 10 | component: 'Input', |
12 | - label: h('span', t(NodeBindDataFieldNameEnum.NAME)), | 11 | + label: t(NodeBindDataFieldNameEnum.NAME), |
13 | colProps: { | 12 | colProps: { |
14 | span: 16, | 13 | span: 16, |
15 | }, | 14 | }, |
@@ -21,7 +20,7 @@ export const TopFormSchemas: FormSchema[] = [ | @@ -21,7 +20,7 @@ export const TopFormSchemas: FormSchema[] = [ | ||
21 | { | 20 | { |
22 | field: NodeBindDataFieldEnum.DEBUG_MODE, | 21 | field: NodeBindDataFieldEnum.DEBUG_MODE, |
23 | component: 'Switch', | 22 | component: 'Switch', |
24 | - label: h('span', t(NodeBindDataFieldNameEnum.DEBUG_MODE)), | 23 | + label: t(NodeBindDataFieldNameEnum.DEBUG_MODE), |
25 | colProps: { | 24 | colProps: { |
26 | offset: 2, | 25 | offset: 2, |
27 | span: 6, | 26 | span: 6, |
@@ -41,7 +40,7 @@ export const BottomFormSchemas: FormSchema[] = [ | @@ -41,7 +40,7 @@ export const BottomFormSchemas: FormSchema[] = [ | ||
41 | { | 40 | { |
42 | field: NodeBindDataFieldEnum.DESCRIPTION, | 41 | field: NodeBindDataFieldEnum.DESCRIPTION, |
43 | component: 'InputTextArea', | 42 | component: 'InputTextArea', |
44 | - label: h('span', t(NodeBindDataFieldNameEnum.DESCRIPTION)), | 43 | + label: t(NodeBindDataFieldNameEnum.DESCRIPTION), |
45 | componentProps: { | 44 | componentProps: { |
46 | placeholder: `请输入${t(NodeBindDataFieldNameEnum.DESCRIPTION)}`, | 45 | placeholder: `请输入${t(NodeBindDataFieldNameEnum.DESCRIPTION)}`, |
47 | autoSize: true, | 46 | autoSize: true, |
@@ -67,6 +67,7 @@ | @@ -67,6 +67,7 @@ | ||
67 | <BasicModal | 67 | <BasicModal |
68 | v-model:visible="visible" | 68 | v-model:visible="visible" |
69 | :title="`添加规则节点: ${nodeData?.config?.name}`" | 69 | :title="`添加规则节点: ${nodeData?.config?.name}`" |
70 | + width="50%" | ||
70 | :get-container="getContainer" | 71 | :get-container="getContainer" |
71 | @ok="handleModalOk" | 72 | @ok="handleModalOk" |
72 | @cancel="handleCancel" | 73 | @cancel="handleCancel" |