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