Showing
100 changed files
with
805 additions
and
916 deletions
Too many changes to show.
To preserve performance only 100 of 138 files are displayed.
@@ -129,7 +129,7 @@ export interface FormSchema { | @@ -129,7 +129,7 @@ export interface FormSchema { | ||
129 | // Variable name bound to v-model Default value | 129 | // Variable name bound to v-model Default value |
130 | valueField?: string; | 130 | valueField?: string; |
131 | // Label name | 131 | // Label name |
132 | - label: string; | 132 | + label: string | VNode; |
133 | // Auxiliary text | 133 | // Auxiliary text |
134 | subLabel?: string; | 134 | subLabel?: string; |
135 | // Help text on the right side of the text | 135 | // Help text on the right side of the text |
@@ -12,7 +12,7 @@ export default { | @@ -12,7 +12,7 @@ export default { | ||
12 | }, | 12 | }, |
13 | script: { | 13 | script: { |
14 | name: 'JS脚本', | 14 | name: 'JS脚本', |
15 | - details: `JavaScript函数接收3个输入参数:- metadata:一条消息的元数据;- msg:一条消息的有效负载;- msgType:一条消息的类型。应返回以下结构:{ msg: new payload,<br/> metadata: new metadata,<br/>msgType: new msgType };结果对象中的所有字段都是可选的,如果没有指定,将使用原始消息中的字段。`, | 15 | + details: `JavaScript函数接收3个输入参数: \n - metadata:一条消息的元数据; \n - msg:一条消息的有效负载; \n - msgType:一条消息的类型。 \n 应返回以下结构:{ '{ msg: new payload, metadata: new metadata, msgType: new msgType }' }; \n 结果对象中的所有字段都是可选的,如果没有指定,将使用原始消息中的字段。`, |
16 | description: '使用JavaScript更改消息有效负载、元数据或消息类型。', | 16 | description: '使用JavaScript更改消息有效负载、元数据或消息类型。', |
17 | }, | 17 | }, |
18 | toEmail: { | 18 | toEmail: { |
@@ -4,7 +4,7 @@ import { getMenuListResultModel } from '/@/api/sys/model/menuModel'; | @@ -4,7 +4,7 @@ import { getMenuListResultModel } from '/@/api/sys/model/menuModel'; | ||
4 | import { useI18n } from '/@/hooks/web/useI18n'; | 4 | import { useI18n } from '/@/hooks/web/useI18n'; |
5 | 5 | ||
6 | export function listToTree(lists: getMenuListResultModel): getMenuListResultModel { | 6 | export function listToTree(lists: getMenuListResultModel): getMenuListResultModel { |
7 | - const { t } = useI18n(); //加载国际化 | 7 | + const { t } = useI18n(); // 加载国际化 |
8 | lists.forEach((goods) => { | 8 | lists.forEach((goods) => { |
9 | goods['menuName'] = t(goods.meta.title); // 为goods添加属性menuName | 9 | goods['menuName'] = t(goods.meta.title); // 为goods添加属性menuName |
10 | 10 |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | // Assign to customer | 1 | // Assign to customer |
6 | export enum AssignToCustomerFieldsEnum { | 2 | export enum AssignToCustomerFieldsEnum { |
7 | CUSTOMER_NAME_PATTERN = 'customerNamePattern', | 3 | CUSTOMER_NAME_PATTERN = 'customerNamePattern', |
@@ -10,15 +6,9 @@ export enum AssignToCustomerFieldsEnum { | @@ -10,15 +6,9 @@ export enum AssignToCustomerFieldsEnum { | ||
10 | } | 6 | } |
11 | 7 | ||
12 | export enum AssignToCustomerFieldsNameEnum { | 8 | export enum AssignToCustomerFieldsNameEnum { |
13 | - CUSTOMER_NAME_PATTERN = t( | ||
14 | - 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN' | ||
15 | - ), | ||
16 | - CREATE_CUSTOMER_IF_NOT_EXISTS = t( | ||
17 | - 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS' | ||
18 | - ), | ||
19 | - CUSTOMER_CACHE_EXPIRATION = t( | ||
20 | - 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION' | ||
21 | - ), | 9 | + CUSTOMER_NAME_PATTERN = 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN', |
10 | + CREATE_CUSTOMER_IF_NOT_EXISTS = 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS', | ||
11 | + CUSTOMER_CACHE_EXPIRATION = 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION', | ||
22 | } | 12 | } |
23 | 13 | ||
24 | // clear alarm | 14 | // clear alarm |
@@ -28,10 +18,8 @@ export enum ClearAlarmFieldsEnum { | @@ -28,10 +18,8 @@ export enum ClearAlarmFieldsEnum { | ||
28 | } | 18 | } |
29 | 19 | ||
30 | export enum ClearAlarmFieldsNameEnum { | 20 | export enum ClearAlarmFieldsNameEnum { |
31 | - ALARM_TYPE = t('designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_TYPE'), | ||
32 | - ALARM_DETAILS_BUILD_JS = t( | ||
33 | - 'designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS' | ||
34 | - ), | 21 | + ALARM_TYPE = 'designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_TYPE', |
22 | + ALARM_DETAILS_BUILD_JS = 'designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS', | ||
35 | } | 23 | } |
36 | 24 | ||
37 | // Create alarm | 25 | // Create alarm |
@@ -49,28 +37,16 @@ export enum CreateAlarmFieldsEnum { | @@ -49,28 +37,16 @@ export enum CreateAlarmFieldsEnum { | ||
49 | } | 37 | } |
50 | 38 | ||
51 | export enum CreateAlarmFieldsNameEnum { | 39 | export enum CreateAlarmFieldsNameEnum { |
52 | - ALARM_DETAILS_BUILD_JS = t( | ||
53 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS' | ||
54 | - ), | ||
55 | - USE_MESSAGE_ALARM_DATA = t( | ||
56 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA' | ||
57 | - ), | ||
58 | - OVERWRITE_ALARM_DETAILS = t( | ||
59 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS' | ||
60 | - ), | ||
61 | - ALARM_TYPE = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_TYPE'), | ||
62 | - SEVERITY = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.SEVERITY'), | ||
63 | - PROPAGATE = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE'), | ||
64 | - RELATION_TYPES = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.RELATION_TYPES'), | ||
65 | - PROPAGATE_TO_OWNER = t( | ||
66 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER' | ||
67 | - ), | ||
68 | - PROPAGATE_TO_TENANT = t( | ||
69 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT' | ||
70 | - ), | ||
71 | - DYNAMIC_SEVERITY = t( | ||
72 | - 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY' | ||
73 | - ), | 40 | + ALARM_DETAILS_BUILD_JS = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS', |
41 | + USE_MESSAGE_ALARM_DATA = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA', | ||
42 | + OVERWRITE_ALARM_DETAILS = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS', | ||
43 | + ALARM_TYPE = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_TYPE', | ||
44 | + SEVERITY = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.SEVERITY', | ||
45 | + PROPAGATE = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE', | ||
46 | + RELATION_TYPES = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.RELATION_TYPES', | ||
47 | + PROPAGATE_TO_OWNER = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER', | ||
48 | + PROPAGATE_TO_TENANT = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT', | ||
49 | + DYNAMIC_SEVERITY = 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY', | ||
74 | } | 50 | } |
75 | 51 | ||
76 | // Create relation | 52 | // Create relation |
@@ -87,27 +63,15 @@ export enum CreateRelationFieldsEnum { | @@ -87,27 +63,15 @@ export enum CreateRelationFieldsEnum { | ||
87 | } | 63 | } |
88 | 64 | ||
89 | export enum CreateRelationFieldsNameEnum { | 65 | export enum CreateRelationFieldsNameEnum { |
90 | - DIRECTION = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.DIRECTION'), | ||
91 | - ENTITY_TYPE = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE'), | ||
92 | - ENTITY_NAME_PATTERN = t( | ||
93 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN' | ||
94 | - ), | ||
95 | - ENTITY_TYPE_PATTERN = t( | ||
96 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN' | ||
97 | - ), | ||
98 | - RELATION_TYPE = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.RELATION_TYPE'), | ||
99 | - CREATE_ENTITY_IF_NOT_EXISTS = t( | ||
100 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS' | ||
101 | - ), | ||
102 | - REMOVE_CURRENT_RELATIONS = t( | ||
103 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS' | ||
104 | - ), | ||
105 | - CHANGE_ORIGINATOR_TO_RELATED_ENTITY = t( | ||
106 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY' | ||
107 | - ), | ||
108 | - ENTITY_CACHE_EXPIRATION = t( | ||
109 | - 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION' | ||
110 | - ), | 66 | + DIRECTION = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.DIRECTION', |
67 | + ENTITY_TYPE = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE', | ||
68 | + ENTITY_NAME_PATTERN = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN', | ||
69 | + ENTITY_TYPE_PATTERN = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN', | ||
70 | + RELATION_TYPE = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.RELATION_TYPE', | ||
71 | + CREATE_ENTITY_IF_NOT_EXISTS = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS', | ||
72 | + REMOVE_CURRENT_RELATIONS = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS', | ||
73 | + CHANGE_ORIGINATOR_TO_RELATED_ENTITY = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY', | ||
74 | + ENTITY_CACHE_EXPIRATION = 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION', | ||
111 | } | 75 | } |
112 | 76 | ||
113 | // Delay deprecated | 77 | // Delay deprecated |
@@ -119,18 +83,10 @@ export enum DelayDeprecatedFieldsEnum { | @@ -119,18 +83,10 @@ export enum DelayDeprecatedFieldsEnum { | ||
119 | } | 83 | } |
120 | 84 | ||
121 | export enum DelayDeprecatedFieldsNameEnum { | 85 | export enum DelayDeprecatedFieldsNameEnum { |
122 | - USE_METADATA_PERIOD_IN_SECONDS_PATTERNS = t( | ||
123 | - 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS' | ||
124 | - ), | ||
125 | - PERIOD_IN_SECONDS = t( | ||
126 | - 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS' | ||
127 | - ), | ||
128 | - PERIOD_IN_SECONDS_PATTERN = t( | ||
129 | - 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN' | ||
130 | - ), | ||
131 | - MAX_PENDING_MSGS = t( | ||
132 | - 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS' | ||
133 | - ), | 86 | + USE_METADATA_PERIOD_IN_SECONDS_PATTERNS = 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS', |
87 | + PERIOD_IN_SECONDS = 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS', | ||
88 | + PERIOD_IN_SECONDS_PATTERN = 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN', | ||
89 | + MAX_PENDING_MSGS = 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS', | ||
134 | } | 90 | } |
135 | 91 | ||
136 | export enum DeleteRelationFieldsEnum { | 92 | export enum DeleteRelationFieldsEnum { |
@@ -143,18 +99,12 @@ export enum DeleteRelationFieldsEnum { | @@ -143,18 +99,12 @@ export enum DeleteRelationFieldsEnum { | ||
143 | } | 99 | } |
144 | 100 | ||
145 | export enum DeleteRelationFieldsNameEnum { | 101 | export enum DeleteRelationFieldsNameEnum { |
146 | - DELETE_FOR_SINGLE_ENTITY = t( | ||
147 | - 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY' | ||
148 | - ), | ||
149 | - DIRECTION = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DIRECTION'), | ||
150 | - ENTITY_TYPE = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_TYPE'), | ||
151 | - ENTITY_NAME_PATTERN = t( | ||
152 | - 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN' | ||
153 | - ), | ||
154 | - RELATION_TYPE = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.RELATION_TYPE'), | ||
155 | - ENTITY_CACHE_EXPIRATION = t( | ||
156 | - 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION' | ||
157 | - ), | 102 | + DELETE_FOR_SINGLE_ENTITY = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY', |
103 | + DIRECTION = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DIRECTION', | ||
104 | + ENTITY_TYPE = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_TYPE', | ||
105 | + ENTITY_NAME_PATTERN = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN', | ||
106 | + RELATION_TYPE = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.RELATION_TYPE', | ||
107 | + ENTITY_CACHE_EXPIRATION = 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION', | ||
158 | } | 108 | } |
159 | 109 | ||
160 | // device profile | 110 | // device profile |
@@ -164,12 +114,8 @@ export enum DeviceProfileFieldsEnum { | @@ -164,12 +114,8 @@ export enum DeviceProfileFieldsEnum { | ||
164 | } | 114 | } |
165 | 115 | ||
166 | export enum DeviceProfileFieldsNameEnum { | 116 | export enum DeviceProfileFieldsNameEnum { |
167 | - PERSIST_ALARM_RULES_STATE = t( | ||
168 | - 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE' | ||
169 | - ), | ||
170 | - FETCH_ALARM_RULES_STATE_ON_START = t( | ||
171 | - 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START' | ||
172 | - ), | 117 | + PERSIST_ALARM_RULES_STATE = 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE', |
118 | + FETCH_ALARM_RULES_STATE_ON_START = 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START', | ||
173 | } | 119 | } |
174 | 120 | ||
175 | // Generator | 121 | // Generator |
@@ -182,13 +128,11 @@ export enum GeneratorFieldsEnum { | @@ -182,13 +128,11 @@ export enum GeneratorFieldsEnum { | ||
182 | } | 128 | } |
183 | 129 | ||
184 | export enum GeneratorFieldsNameEnum { | 130 | export enum GeneratorFieldsNameEnum { |
185 | - MSG_COUNT = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.MSG_COUNT'), | ||
186 | - PERIOD_IN_SECONDS = t( | ||
187 | - 'designer_form_label.actions.index.GeneratorFieldsNameEnum.PERIOD_IN_SECONDS' | ||
188 | - ), | ||
189 | - JS_SCRIPT = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.JS_SCRIPT'), | 131 | + MSG_COUNT = 'designer_form_label.actions.index.GeneratorFieldsNameEnum.MSG_COUNT', |
132 | + PERIOD_IN_SECONDS = 'designer_form_label.actions.index.GeneratorFieldsNameEnum.PERIOD_IN_SECONDS', | ||
133 | + JS_SCRIPT = 'designer_form_label.actions.index.GeneratorFieldsNameEnum.JS_SCRIPT', | ||
190 | // ORIGINATOR_ID = '资产', | 134 | // ORIGINATOR_ID = '资产', |
191 | - ORIGINATOR_TYPE = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.ORIGINATOR_TYPE'), | 135 | + ORIGINATOR_TYPE = 'designer_form_label.actions.index.GeneratorFieldsNameEnum.ORIGINATOR_TYPE', |
192 | } | 136 | } |
193 | 137 | ||
194 | // Gps geofencing events | 138 | // Gps geofencing events |
@@ -210,44 +154,20 @@ export enum GpsGeofencingEventsFieldsEnum { | @@ -210,44 +154,20 @@ export enum GpsGeofencingEventsFieldsEnum { | ||
210 | } | 154 | } |
211 | 155 | ||
212 | export enum GpsGeofencingEventsFieldsNameEnum { | 156 | export enum GpsGeofencingEventsFieldsNameEnum { |
213 | - LATITUDE_KEY_NAME = t( | ||
214 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME' | ||
215 | - ), | ||
216 | - LONGITUDE_KEY_NAME = t( | ||
217 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME' | ||
218 | - ), | ||
219 | - PERIMETER_TYPE = t( | ||
220 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE' | ||
221 | - ), | ||
222 | - FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = t( | ||
223 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA' | ||
224 | - ), | ||
225 | - PERIMETER_KEY_NAME = t( | ||
226 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME' | ||
227 | - ), | ||
228 | - CENTER_LATITUDE = t( | ||
229 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE' | ||
230 | - ), | ||
231 | - CENTER_LONGITUDE = t( | ||
232 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE' | ||
233 | - ), | ||
234 | - RANGE = t('designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE'), | ||
235 | - RANGE_UNIT = t('designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT'), | ||
236 | - POLYGONS_DEFINITION = t( | ||
237 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION' | ||
238 | - ), | ||
239 | - MIN_INSIDE_DURATION = t( | ||
240 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION' | ||
241 | - ), | ||
242 | - MIN_INSIDE_DURATION_TIME_UNIT = t( | ||
243 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT' | ||
244 | - ), | ||
245 | - MIN_OUTSIDE_DURATION = t( | ||
246 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION' | ||
247 | - ), | ||
248 | - MIN_OUTSIDE_DURATION_TIME_UNIT = t( | ||
249 | - 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT' | ||
250 | - ), | 157 | + LATITUDE_KEY_NAME = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME', |
158 | + LONGITUDE_KEY_NAME = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME', | ||
159 | + PERIMETER_TYPE = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE', | ||
160 | + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA', | ||
161 | + PERIMETER_KEY_NAME = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME', | ||
162 | + CENTER_LATITUDE = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE', | ||
163 | + CENTER_LONGITUDE = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE', | ||
164 | + RANGE = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE', | ||
165 | + RANGE_UNIT = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT', | ||
166 | + POLYGONS_DEFINITION = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION', | ||
167 | + MIN_INSIDE_DURATION = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION', | ||
168 | + MIN_INSIDE_DURATION_TIME_UNIT = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT', | ||
169 | + MIN_OUTSIDE_DURATION = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION', | ||
170 | + MIN_OUTSIDE_DURATION_TIME_UNIT = 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT', | ||
251 | } | 171 | } |
252 | 172 | ||
253 | // Log | 173 | // Log |
@@ -256,7 +176,7 @@ export enum LogFieldsEnum { | @@ -256,7 +176,7 @@ export enum LogFieldsEnum { | ||
256 | } | 176 | } |
257 | 177 | ||
258 | export enum LogFieldsNameEnum { | 178 | export enum LogFieldsNameEnum { |
259 | - JS_SCRIPT = t('designer_form_label.actions.index.LogFieldsNameEnum.JS_SCRIPT'), | 179 | + JS_SCRIPT = 'designer_form_label.actions.index.LogFieldsNameEnum.JS_SCRIPT', |
260 | } | 180 | } |
261 | 181 | ||
262 | // Message Count | 182 | // Message Count |
@@ -266,10 +186,8 @@ export enum MessageCountFieldsEnum { | @@ -266,10 +186,8 @@ export enum MessageCountFieldsEnum { | ||
266 | } | 186 | } |
267 | 187 | ||
268 | export enum MessageCountFieldsNameEnum { | 188 | export enum MessageCountFieldsNameEnum { |
269 | - INTERVAL = t('designer_form_label.actions.index.MessageCountFieldsNameEnum.INTERVAL'), | ||
270 | - TELEMETRY_PREFIX = t( | ||
271 | - 'designer_form_label.actions.index.MessageCountFieldsNameEnum.TELEMETRY_PREFIX' | ||
272 | - ), | 189 | + INTERVAL = 'designer_form_label.actions.index.MessageCountFieldsNameEnum.INTERVAL', |
190 | + TELEMETRY_PREFIX = 'designer_form_label.actions.index.MessageCountFieldsNameEnum.TELEMETRY_PREFIX', | ||
273 | } | 191 | } |
274 | 192 | ||
275 | // Push to edge | 193 | // Push to edge |
@@ -278,7 +196,7 @@ export enum PushToEdgeFieldsEnum { | @@ -278,7 +196,7 @@ export enum PushToEdgeFieldsEnum { | ||
278 | } | 196 | } |
279 | 197 | ||
280 | export enum PushToEdgeFieldsNameEnum { | 198 | export enum PushToEdgeFieldsNameEnum { |
281 | - SCOPE = t('designer_form_label.actions.index.PushToEdgeFieldsNameEnum.SCOPE'), | 199 | + SCOPE = 'designer_form_label.actions.index.PushToEdgeFieldsNameEnum.SCOPE', |
282 | } | 200 | } |
283 | // Rpc call reply | 201 | // Rpc call reply |
284 | export enum RpcCallReplyFieldsEnum { | 202 | export enum RpcCallReplyFieldsEnum { |
@@ -286,9 +204,7 @@ export enum RpcCallReplyFieldsEnum { | @@ -286,9 +204,7 @@ export enum RpcCallReplyFieldsEnum { | ||
286 | } | 204 | } |
287 | 205 | ||
288 | export enum RpcCallReplyFieldsNameEnum { | 206 | export enum RpcCallReplyFieldsNameEnum { |
289 | - REQUEST_ID_META_DATA_ATTRIBUTE = t( | ||
290 | - 'designer_form_label.actions.index.RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE' | ||
291 | - ), | 207 | + REQUEST_ID_META_DATA_ATTRIBUTE = 'designer_form_label.actions.index.RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE', |
292 | } | 208 | } |
293 | 209 | ||
294 | // Rpc call request | 210 | // Rpc call request |
@@ -297,9 +213,7 @@ export enum RpcCallRequestFieldsEnum { | @@ -297,9 +213,7 @@ export enum RpcCallRequestFieldsEnum { | ||
297 | } | 213 | } |
298 | 214 | ||
299 | export enum RpcCallRequestFieldsNameEnum { | 215 | export enum RpcCallRequestFieldsNameEnum { |
300 | - TIMEOUT_IN_SECONDS = t( | ||
301 | - 'designer_form_label.actions.index.RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS' | ||
302 | - ), | 216 | + TIMEOUT_IN_SECONDS = 'designer_form_label.actions.index.RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS', |
303 | } | 217 | } |
304 | 218 | ||
305 | // Save attribute | 219 | // Save attribute |
@@ -309,8 +223,8 @@ export enum SaveAttributesFieldsEnum { | @@ -309,8 +223,8 @@ export enum SaveAttributesFieldsEnum { | ||
309 | } | 223 | } |
310 | 224 | ||
311 | export enum SaveAttributesFieldsNameEnum { | 225 | export enum SaveAttributesFieldsNameEnum { |
312 | - NOTIFY_DEVICE = t('designer_form_label.actions.index.SaveAttributesFieldsNameEnum.NOTIFY_DEVICE'), | ||
313 | - SCOPE = t('designer_form_label.actions.index.SaveAttributesFieldsNameEnum.SCOPE'), | 226 | + NOTIFY_DEVICE = 'designer_form_label.actions.index.SaveAttributesFieldsNameEnum.NOTIFY_DEVICE', |
227 | + SCOPE = 'designer_form_label.actions.index.SaveAttributesFieldsNameEnum.SCOPE', | ||
314 | } | 228 | } |
315 | 229 | ||
316 | // Save event | 230 | // Save event |
@@ -319,7 +233,7 @@ export enum SaveEventFieldsEnum { | @@ -319,7 +233,7 @@ export enum SaveEventFieldsEnum { | ||
319 | } | 233 | } |
320 | 234 | ||
321 | export enum SaveEventFieldsNameEnum { | 235 | export enum SaveEventFieldsNameEnum { |
322 | - CONFIGURATION = t('designer_form_label.actions.index.SaveEventFieldsNameEnum.CONFIGURATION'), | 236 | + CONFIGURATION = 'designer_form_label.actions.index.SaveEventFieldsNameEnum.CONFIGURATION', |
323 | } | 237 | } |
324 | 238 | ||
325 | // Save timeseries | 239 | // Save timeseries |
@@ -330,11 +244,9 @@ export enum SaveTimeseriesFieldsEnum { | @@ -330,11 +244,9 @@ export enum SaveTimeseriesFieldsEnum { | ||
330 | } | 244 | } |
331 | 245 | ||
332 | export enum SaveTimeseriesFieldsNameEnum { | 246 | export enum SaveTimeseriesFieldsNameEnum { |
333 | - DEFAULT_TTL = t('designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.DEFAULT_TTL'), | ||
334 | - SKIP_LATEST_PERSISTENCE = t( | ||
335 | - 'designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.SKIP_LATEST_PERSISTENCE' | ||
336 | - ), | ||
337 | - USE_SERVER_TS = t('designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.USE_SERVER_TS'), | 247 | + DEFAULT_TTL = 'designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.DEFAULT_TTL', |
248 | + SKIP_LATEST_PERSISTENCE = 'designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.SKIP_LATEST_PERSISTENCE', | ||
249 | + USE_SERVER_TS = 'designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.USE_SERVER_TS', | ||
338 | } | 250 | } |
339 | 251 | ||
340 | // save to custom table | 252 | // save to custom table |
@@ -344,10 +256,8 @@ export enum SaveToCustomTableFieldsEnum { | @@ -344,10 +256,8 @@ export enum SaveToCustomTableFieldsEnum { | ||
344 | } | 256 | } |
345 | 257 | ||
346 | export enum SaveToCustomTableFieldsNameEnum { | 258 | export enum SaveToCustomTableFieldsNameEnum { |
347 | - FIELDS_MAPPING = t( | ||
348 | - 'designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING' | ||
349 | - ), | ||
350 | - TABLE_NAME = t('designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.TABLE_NAME'), | 259 | + FIELDS_MAPPING = 'designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING', |
260 | + TABLE_NAME = 'designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.TABLE_NAME', | ||
351 | } | 261 | } |
352 | 262 | ||
353 | // Unassign from customer | 263 | // Unassign from customer |
@@ -357,10 +267,6 @@ export enum UnassignFromCustomerFieldsEnum { | @@ -357,10 +267,6 @@ export enum UnassignFromCustomerFieldsEnum { | ||
357 | } | 267 | } |
358 | 268 | ||
359 | export enum UnassignFromCustomerFieldsNameEnum { | 269 | export enum UnassignFromCustomerFieldsNameEnum { |
360 | - CUSTOMER_NAME_PATTERN = t( | ||
361 | - 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN' | ||
362 | - ), | ||
363 | - CUSTOMER_CACHE_EXPIRATION = t( | ||
364 | - 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION' | ||
365 | - ), | 270 | + CUSTOMER_NAME_PATTERN = 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN', |
271 | + CUSTOMER_CACHE_EXPIRATION = 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION', | ||
366 | } | 272 | } |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | export enum CommonFieldsEnum { | 1 | export enum CommonFieldsEnum { |
6 | NAME = 'name', | 2 | NAME = 'name', |
7 | DESCRIPTION = 'description', | 3 | DESCRIPTION = 'description', |
@@ -9,9 +5,9 @@ export enum CommonFieldsEnum { | @@ -9,9 +5,9 @@ export enum CommonFieldsEnum { | ||
9 | } | 5 | } |
10 | 6 | ||
11 | export enum CommonFieldsNameEnum { | 7 | export enum CommonFieldsNameEnum { |
12 | - NAME = t('designer_form_label.common.index.CommonFieldsNameEnum.NAME'), | ||
13 | - DESCRIPTION = t('designer_form_label.common.index.CommonFieldsNameEnum.DESCRIPTION'), | ||
14 | - DEBUG_MODE = t('designer_form_label.common.index.CommonFieldsNameEnum.DEBUG_MODE'), | 8 | + NAME = 'designer_form_label.common.index.CommonFieldsNameEnum.NAME', |
9 | + DESCRIPTION = 'designer_form_label.common.index.CommonFieldsNameEnum.DESCRIPTION', | ||
10 | + DEBUG_MODE = 'designer_form_label.common.index.CommonFieldsNameEnum.DEBUG_MODE', | ||
15 | } | 11 | } |
16 | 12 | ||
17 | export const CommonFields = { ...CommonFieldsEnum }; | 13 | export const CommonFields = { ...CommonFieldsEnum }; |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | // Enrichment Calculate delta | 1 | // Enrichment Calculate delta |
6 | export enum CalculateDeltaFieldsEnum { | 2 | export enum CalculateDeltaFieldsEnum { |
7 | INPUT_VALUE_KEY = 'inputValueKey', | 3 | INPUT_VALUE_KEY = 'inputValueKey', |
@@ -14,23 +10,13 @@ export enum CalculateDeltaFieldsEnum { | @@ -14,23 +10,13 @@ export enum CalculateDeltaFieldsEnum { | ||
14 | } | 10 | } |
15 | 11 | ||
16 | export enum CalculateDeltaFieldsNameEnum { | 12 | export enum CalculateDeltaFieldsNameEnum { |
17 | - INPUT_VALUE_KEY = t( | ||
18 | - 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY' | ||
19 | - ), | ||
20 | - OUTPUT_VALUE_KEY = t( | ||
21 | - 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY' | ||
22 | - ), | ||
23 | - ROUND = t('designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ROUND'), | ||
24 | - USE_CACHE = t('designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.USE_CACHE'), | ||
25 | - TELL_FAILURE_IF_DELTA_IS_NEGATIVE = t( | ||
26 | - 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE' | ||
27 | - ), | ||
28 | - ADD_PERIOD_BETWEEN_MSGS = t( | ||
29 | - 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS' | ||
30 | - ), | ||
31 | - PERIOD_VALUE_KEY = t( | ||
32 | - 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY' | ||
33 | - ), | 13 | + INPUT_VALUE_KEY = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY', |
14 | + OUTPUT_VALUE_KEY = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY', | ||
15 | + ROUND = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ROUND', | ||
16 | + USE_CACHE = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.USE_CACHE', | ||
17 | + TELL_FAILURE_IF_DELTA_IS_NEGATIVE = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE', | ||
18 | + ADD_PERIOD_BETWEEN_MSGS = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS', | ||
19 | + PERIOD_VALUE_KEY = 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY', | ||
34 | } | 20 | } |
35 | 21 | ||
36 | // Enrichment Customer Attributes | 22 | // Enrichment Customer Attributes |
@@ -40,10 +26,8 @@ export enum CustomerAttributesFieldsEnum { | @@ -40,10 +26,8 @@ export enum CustomerAttributesFieldsEnum { | ||
40 | } | 26 | } |
41 | 27 | ||
42 | export enum CustomerAttributesFieldsNameEnum { | 28 | export enum CustomerAttributesFieldsNameEnum { |
43 | - ATTR_MAPING = t( | ||
44 | - 'designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.ATTR_MAPING' | ||
45 | - ), | ||
46 | - TELEMETRY = t('designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.TELEMETRY'), | 29 | + ATTR_MAPING = 'designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.ATTR_MAPING', |
30 | + TELEMETRY = 'designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.TELEMETRY', | ||
47 | } | 31 | } |
48 | 32 | ||
49 | // Enrichment Customer details | 33 | // Enrichment Customer details |
@@ -53,12 +37,8 @@ export enum CustomerDetailsFieldsEnum { | @@ -53,12 +37,8 @@ export enum CustomerDetailsFieldsEnum { | ||
53 | } | 37 | } |
54 | 38 | ||
55 | export enum CustomerDetailsFieldsNameEnum { | 39 | export enum CustomerDetailsFieldsNameEnum { |
56 | - DETAILS_LIST = t( | ||
57 | - 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.DETAILS_LIST' | ||
58 | - ), | ||
59 | - ADD_TO_METADATA = t( | ||
60 | - 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.ADD_TO_METADATA' | ||
61 | - ), | 40 | + DETAILS_LIST = 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.DETAILS_LIST', |
41 | + ADD_TO_METADATA = 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.ADD_TO_METADATA', | ||
62 | } | 42 | } |
63 | 43 | ||
64 | // Enrichment Originator attributes | 44 | // Enrichment Originator attributes |
@@ -72,24 +52,12 @@ export enum OriginatorAttributesEnum { | @@ -72,24 +52,12 @@ export enum OriginatorAttributesEnum { | ||
72 | } | 52 | } |
73 | 53 | ||
74 | export enum OriginatorAttributesNameEnum { | 54 | export enum OriginatorAttributesNameEnum { |
75 | - TELL_FAILURE_IF_ABSENT = t( | ||
76 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT' | ||
77 | - ), | ||
78 | - CLIENT_ATTRIBUTE_NAMES = t( | ||
79 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES' | ||
80 | - ), | ||
81 | - SHARED_ATTRIBUTE_NAMES = t( | ||
82 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES' | ||
83 | - ), | ||
84 | - SERVER_ATTRIBUTE_NAMES = t( | ||
85 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES' | ||
86 | - ), | ||
87 | - LATEST_TS_KEY_NAMES = t( | ||
88 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES' | ||
89 | - ), | ||
90 | - GET_LATEST_VALUE_WITH_TS = t( | ||
91 | - 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS' | ||
92 | - ), | 55 | + TELL_FAILURE_IF_ABSENT = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT', |
56 | + CLIENT_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES', | ||
57 | + SHARED_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES', | ||
58 | + SERVER_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES', | ||
59 | + LATEST_TS_KEY_NAMES = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES', | ||
60 | + GET_LATEST_VALUE_WITH_TS = 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS', | ||
93 | } | 61 | } |
94 | 62 | ||
95 | // Enrichment Originator Fields | 63 | // Enrichment Originator Fields |
@@ -98,9 +66,7 @@ export enum OriginatorFieldsEnum { | @@ -98,9 +66,7 @@ export enum OriginatorFieldsEnum { | ||
98 | } | 66 | } |
99 | 67 | ||
100 | export enum OriginatorFieldsNameEnum { | 68 | export enum OriginatorFieldsNameEnum { |
101 | - FIELDS_MAPPING = t( | ||
102 | - 'designer_form_label.enrichments.index.OriginatorFieldsNameEnum.FIELDS_MAPPING' | ||
103 | - ), | 69 | + FIELDS_MAPPING = 'designer_form_label.enrichments.index.OriginatorFieldsNameEnum.FIELDS_MAPPING', |
104 | } | 70 | } |
105 | 71 | ||
106 | // Enrichment originator telemetry | 72 | // Enrichment originator telemetry |
@@ -120,38 +86,18 @@ export enum OriginatorTelemetryFieldsEnum { | @@ -120,38 +86,18 @@ export enum OriginatorTelemetryFieldsEnum { | ||
120 | } | 86 | } |
121 | 87 | ||
122 | export enum OriginatorTelemetryFieldsNameEnum { | 88 | export enum OriginatorTelemetryFieldsNameEnum { |
123 | - LATEST_TS_KEY_NAMES = t( | ||
124 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES' | ||
125 | - ), | ||
126 | - AGGREGATION = t( | ||
127 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.AGGREGATION' | ||
128 | - ), | ||
129 | - FETCH_MODE = t( | ||
130 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.FETCH_MODE' | ||
131 | - ), | ||
132 | - ORDER_BY = t('designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.ORDER_BY'), | ||
133 | - LIMIT = t('designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LIMIT'), | ||
134 | - USE_METADATA_INTERVAL_PATTERNS = t( | ||
135 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS' | ||
136 | - ), | ||
137 | - START_INTERVAL = t( | ||
138 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL' | ||
139 | - ), | ||
140 | - START_INTERVAL_TIME_UNIT = t( | ||
141 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT' | ||
142 | - ), | ||
143 | - END_INTERVAL = t( | ||
144 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL' | ||
145 | - ), | ||
146 | - END_INTERVAL_TIME_UNIT = t( | ||
147 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT' | ||
148 | - ), | ||
149 | - START_INTERVAL_PATTERN = t( | ||
150 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN' | ||
151 | - ), | ||
152 | - END_INTERVAL_PATTERN = t( | ||
153 | - 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN' | ||
154 | - ), | 89 | + LATEST_TS_KEY_NAMES = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES', |
90 | + AGGREGATION = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.AGGREGATION', | ||
91 | + FETCH_MODE = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.FETCH_MODE', | ||
92 | + ORDER_BY = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.ORDER_BY', | ||
93 | + LIMIT = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LIMIT', | ||
94 | + USE_METADATA_INTERVAL_PATTERNS = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS', | ||
95 | + START_INTERVAL = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL', | ||
96 | + START_INTERVAL_TIME_UNIT = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT', | ||
97 | + END_INTERVAL = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL', | ||
98 | + END_INTERVAL_TIME_UNIT = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT', | ||
99 | + START_INTERVAL_PATTERN = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN', | ||
100 | + END_INTERVAL_PATTERN = 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN', | ||
155 | } | 101 | } |
156 | 102 | ||
157 | // Enrichment Related attributes | 103 | // Enrichment Related attributes |
@@ -162,13 +108,9 @@ export enum RelatedAttributesFieldsEnum { | @@ -162,13 +108,9 @@ export enum RelatedAttributesFieldsEnum { | ||
162 | } | 108 | } |
163 | 109 | ||
164 | export enum RelatedAttributesFieldsNameEnum { | 110 | export enum RelatedAttributesFieldsNameEnum { |
165 | - RELATIONS_QUERY = t( | ||
166 | - 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.RELATIONS_QUERY' | ||
167 | - ), | ||
168 | - ATTR_MAPPING = t( | ||
169 | - 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.ATTR_MAPPING' | ||
170 | - ), | ||
171 | - TELEMETRY = t('designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.TELEMETRY'), | 111 | + RELATIONS_QUERY = 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.RELATIONS_QUERY', |
112 | + ATTR_MAPPING = 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.ATTR_MAPPING', | ||
113 | + TELEMETRY = 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.TELEMETRY', | ||
172 | } | 114 | } |
173 | 115 | ||
174 | // Enrichment Related device Attributes | 116 | // Enrichment Related device Attributes |
@@ -190,44 +132,20 @@ export enum RelatedDeviceAttributeFieldsEnum { | @@ -190,44 +132,20 @@ export enum RelatedDeviceAttributeFieldsEnum { | ||
190 | } | 132 | } |
191 | 133 | ||
192 | export enum RelatedDeviceAttributeFieldsNameEnum { | 134 | export enum RelatedDeviceAttributeFieldsNameEnum { |
193 | - DEVICE_RELATIONS_QUERY = t( | ||
194 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_RELATIONS_QUERY' | ||
195 | - ), | ||
196 | - TELL_FAILURE_IF_ABSENT = t( | ||
197 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT' | ||
198 | - ), | ||
199 | - CLIENT_ATTRIBUTE_NAMES = t( | ||
200 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES' | ||
201 | - ), | ||
202 | - SHARED_ATTRIBUTE_NAMES = t( | ||
203 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES' | ||
204 | - ), | ||
205 | - SERVER_ATTRIBUTE_NAMES = t( | ||
206 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES' | ||
207 | - ), | ||
208 | - LATEST_TS_KEY_NAMES = t( | ||
209 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES' | ||
210 | - ), | ||
211 | - GET_LATEST_VALUE_WITH_TS = t( | ||
212 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS' | ||
213 | - ), | ||
214 | - FETCH_LAST_LEVEL_ONLY = t( | ||
215 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY' | ||
216 | - ), | 135 | + DEVICE_RELATIONS_QUERY = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_RELATIONS_QUERY', |
136 | + TELL_FAILURE_IF_ABSENT = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT', | ||
137 | + CLIENT_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES', | ||
138 | + SHARED_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES', | ||
139 | + SERVER_ATTRIBUTE_NAMES = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES', | ||
140 | + LATEST_TS_KEY_NAMES = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES', | ||
141 | + GET_LATEST_VALUE_WITH_TS = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS', | ||
142 | + FETCH_LAST_LEVEL_ONLY = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY', | ||
217 | 143 | ||
218 | // DEVICE_RELATIONS_QUERY | 144 | // DEVICE_RELATIONS_QUERY |
219 | - DIRECTION = t( | ||
220 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DIRECTION' | ||
221 | - ), | ||
222 | - MAX_LEVEL = t( | ||
223 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL' | ||
224 | - ), | ||
225 | - RELATION_TYPE = t( | ||
226 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE' | ||
227 | - ), | ||
228 | - DEVICE_TYPES = t( | ||
229 | - 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES' | ||
230 | - ), | 145 | + DIRECTION = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DIRECTION', |
146 | + MAX_LEVEL = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL', | ||
147 | + RELATION_TYPE = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE', | ||
148 | + DEVICE_TYPES = 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES', | ||
231 | } | 149 | } |
232 | 150 | ||
233 | // Tenant attributes | 151 | // Tenant attributes |
@@ -237,10 +155,8 @@ export enum TenantAttributesFieldsEnum { | @@ -237,10 +155,8 @@ export enum TenantAttributesFieldsEnum { | ||
237 | } | 155 | } |
238 | 156 | ||
239 | export enum TenantAttributesFieldsNameEnum { | 157 | export enum TenantAttributesFieldsNameEnum { |
240 | - ATTR_MAPING = t( | ||
241 | - 'designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.ATTR_MAPING' | ||
242 | - ), | ||
243 | - TELEMETRY = t('designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.TELEMETRY'), | 158 | + ATTR_MAPING = 'designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.ATTR_MAPING', |
159 | + TELEMETRY = 'designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.TELEMETRY', | ||
244 | } | 160 | } |
245 | 161 | ||
246 | // Enrichment Tenant details | 162 | // Enrichment Tenant details |
@@ -250,10 +166,6 @@ export enum TenantDetailsFieldsEnum { | @@ -250,10 +166,6 @@ export enum TenantDetailsFieldsEnum { | ||
250 | } | 166 | } |
251 | 167 | ||
252 | export enum TenantDetailsFieldsNameEnum { | 168 | export enum TenantDetailsFieldsNameEnum { |
253 | - DETAILS_LIST = t( | ||
254 | - 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.DETAILS_LIST' | ||
255 | - ), | ||
256 | - ADD_TO_METADATA = t( | ||
257 | - 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.ADD_TO_METADATA' | ||
258 | - ), | 169 | + DETAILS_LIST = 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.DETAILS_LIST', |
170 | + ADD_TO_METADATA = 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.ADD_TO_METADATA', | ||
259 | } | 171 | } |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | // Alarm notice | 1 | // Alarm notice |
6 | export enum AlarmNoticeFieldsEnum { | 2 | export enum AlarmNoticeFieldsEnum { |
7 | CONFIGURATION = 'CONFIGURATION', | 3 | CONFIGURATION = 'CONFIGURATION', |
8 | } | 4 | } |
9 | 5 | ||
10 | export enum AlarmNoticeFieldsNameEnum { | 6 | export enum AlarmNoticeFieldsNameEnum { |
11 | - CONFIGURATION = t('designer_form_label.externals.index.AlarmNoticeFieldsNameEnum.CONFIGURATION'), | 7 | + CONFIGURATION = 'designer_form_label.externals.index.AlarmNoticeFieldsNameEnum.CONFIGURATION', |
12 | } | 8 | } |
13 | 9 | ||
14 | // aws sns | 10 | // aws sns |
@@ -20,14 +16,10 @@ export enum AwsSnsFieldsEnum { | @@ -20,14 +16,10 @@ export enum AwsSnsFieldsEnum { | ||
20 | } | 16 | } |
21 | 17 | ||
22 | export enum AwsSnsFieldsNameEnum { | 18 | export enum AwsSnsFieldsNameEnum { |
23 | - TOPIC_ARN_PATTERN = t( | ||
24 | - 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN' | ||
25 | - ), | ||
26 | - ACCESS_KEY_ID = t('designer_form_label.externals.index.AwsSnsFieldsNameEnum.ACCESS_KEY_ID'), | ||
27 | - SECRET_ACCESS_KEY = t( | ||
28 | - 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY' | ||
29 | - ), | ||
30 | - REGION = t('designer_form_label.externals.index.AwsSnsFieldsNameEnum.REGION'), | 19 | + TOPIC_ARN_PATTERN = 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN', |
20 | + ACCESS_KEY_ID = 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.ACCESS_KEY_ID', | ||
21 | + SECRET_ACCESS_KEY = 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY', | ||
22 | + REGION = 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.REGION', | ||
31 | } | 23 | } |
32 | 24 | ||
33 | // Aws sqs | 25 | // Aws sqs |
@@ -42,19 +34,13 @@ export enum AwsSqsFieldsEnum { | @@ -42,19 +34,13 @@ export enum AwsSqsFieldsEnum { | ||
42 | } | 34 | } |
43 | 35 | ||
44 | export enum AwsSqsFieldsNameEnum { | 36 | export enum AwsSqsFieldsNameEnum { |
45 | - QUEUE_TYPE = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_TYPE'), | ||
46 | - QUEUE_URL_PATTERN = t( | ||
47 | - 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN' | ||
48 | - ), | ||
49 | - DELAY_SECONDS = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.DELAY_SECONDS'), | ||
50 | - MESSAGE_ATTRIBUTES = t( | ||
51 | - 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES' | ||
52 | - ), | ||
53 | - ACCESS_KEY_ID = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.ACCESS_KEY_ID'), | ||
54 | - SECRET_ACCESS_KEY = t( | ||
55 | - 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY' | ||
56 | - ), | ||
57 | - REGION = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.REGION'), | 37 | + QUEUE_TYPE = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_TYPE', |
38 | + QUEUE_URL_PATTERN = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN', | ||
39 | + DELAY_SECONDS = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.DELAY_SECONDS', | ||
40 | + MESSAGE_ATTRIBUTES = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES', | ||
41 | + ACCESS_KEY_ID = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.ACCESS_KEY_ID', | ||
42 | + SECRET_ACCESS_KEY = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY', | ||
43 | + REGION = 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.REGION', | ||
58 | } | 44 | } |
59 | 45 | ||
60 | // Azure iot hub | 46 | // Azure iot hub |
@@ -80,32 +66,24 @@ export enum AzureIotHubFieldsEnum { | @@ -80,32 +66,24 @@ export enum AzureIotHubFieldsEnum { | ||
80 | } | 66 | } |
81 | 67 | ||
82 | export enum AzureIotHubFieldsNameEnum { | 68 | export enum AzureIotHubFieldsNameEnum { |
83 | - TOPIC_PATTERN = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TOPIC_PATTERN'), | ||
84 | - HOST = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.HOST'), | ||
85 | - PORT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PORT'), | ||
86 | - CONNECT_TIMEOUT_SEC = t( | ||
87 | - 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CONNECT_TIMEOUT_SEC' | ||
88 | - ), | ||
89 | - CLIENT_ID = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLIENT_ID'), | ||
90 | - CLEAN_SESSION = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLEAN_SESSION'), | ||
91 | - SSL = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SSL'), | ||
92 | - CREDENTIALS = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CREDENTIALS'), | 69 | + TOPIC_PATTERN = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TOPIC_PATTERN', |
70 | + HOST = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.HOST', | ||
71 | + PORT = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PORT', | ||
72 | + CONNECT_TIMEOUT_SEC = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CONNECT_TIMEOUT_SEC', | ||
73 | + CLIENT_ID = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLIENT_ID', | ||
74 | + CLEAN_SESSION = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLEAN_SESSION', | ||
75 | + SSL = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SSL', | ||
76 | + CREDENTIALS = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CREDENTIALS', | ||
93 | 77 | ||
94 | - TYPE = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TYPE'), | ||
95 | - SAS_KEY = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SAS_KEY'), | ||
96 | - CA_CERT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT'), | ||
97 | - CA_CERT_FILE_NAME = t( | ||
98 | - 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME' | ||
99 | - ), | ||
100 | - PRIVATE_KEY = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY'), | ||
101 | - PRIVATE_KEY_FILE_NAME = t( | ||
102 | - 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME' | ||
103 | - ), | ||
104 | - CERT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT'), | ||
105 | - CERT_FILE_NAME = t( | ||
106 | - 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT_FILE_NAME' | ||
107 | - ), | ||
108 | - PASSWORD = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PASSWORD'), | 78 | + TYPE = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TYPE', |
79 | + SAS_KEY = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SAS_KEY', | ||
80 | + CA_CERT = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT', | ||
81 | + CA_CERT_FILE_NAME = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME', | ||
82 | + PRIVATE_KEY = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY', | ||
83 | + PRIVATE_KEY_FILE_NAME = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME', | ||
84 | + CERT = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT', | ||
85 | + CERT_FILE_NAME = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT_FILE_NAME', | ||
86 | + PASSWORD = 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PASSWORD', | ||
109 | } | 87 | } |
110 | 88 | ||
111 | // GCP pubsub | 89 | // GCP pubsub |
@@ -118,17 +96,11 @@ export enum GcpPubsubFieldsEnum { | @@ -118,17 +96,11 @@ export enum GcpPubsubFieldsEnum { | ||
118 | } | 96 | } |
119 | 97 | ||
120 | export enum GcpPubsubFieldsNameEnum { | 98 | export enum GcpPubsubFieldsNameEnum { |
121 | - PROJECT_ID = t('designer_form_label.externals.index.GcpPubsubFieldsNameEnum.PROJECT_ID'), | ||
122 | - TOPIC_NAME = t('designer_form_label.externals.index.GcpPubsubFieldsNameEnum.TOPIC_NAME'), | ||
123 | - SERVICE_ACCOUNT_KEY = t( | ||
124 | - 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY' | ||
125 | - ), | ||
126 | - SERVICE_ACCOUNT_KEY_FILE_NAME = t( | ||
127 | - 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME' | ||
128 | - ), | ||
129 | - MESSAGE_ATTRIBUTES = t( | ||
130 | - 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES' | ||
131 | - ), | 99 | + PROJECT_ID = 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.PROJECT_ID', |
100 | + TOPIC_NAME = 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.TOPIC_NAME', | ||
101 | + SERVICE_ACCOUNT_KEY = 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY', | ||
102 | + SERVICE_ACCOUNT_KEY_FILE_NAME = 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME', | ||
103 | + MESSAGE_ATTRIBUTES = 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES', | ||
132 | } | 104 | } |
133 | 105 | ||
134 | // Kafka | 106 | // Kafka |
@@ -148,24 +120,18 @@ export enum KafkaFieldsEnum { | @@ -148,24 +120,18 @@ export enum KafkaFieldsEnum { | ||
148 | } | 120 | } |
149 | 121 | ||
150 | export enum KafkaFieldsNameEnum { | 122 | export enum KafkaFieldsNameEnum { |
151 | - TOPIC_PATTERN = t('designer_form_label.externals.index.KafkaFieldsNameEnum.TOPIC_PATTERN'), | ||
152 | - BOOTSTRAP_SERVERS = t( | ||
153 | - 'designer_form_label.externals.index.KafkaFieldsNameEnum.BOOTSTRAP_SERVERS' | ||
154 | - ), | ||
155 | - RETRIES = t('designer_form_label.externals.index.KafkaFieldsNameEnum.RETRIES'), | ||
156 | - BATCH_SIZE = t('designer_form_label.externals.index.KafkaFieldsNameEnum.BATCH_SIZE'), | ||
157 | - LINGER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.LINGER'), | ||
158 | - BUFFER_MEMORY = t('designer_form_label.externals.index.KafkaFieldsNameEnum.BUFFER_MEMORY'), | ||
159 | - ACKS = t('designer_form_label.externals.index.KafkaFieldsNameEnum.ACKS'), | ||
160 | - KEY_SERIALIZER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.KEY_SERIALIZER'), | ||
161 | - VALUE_SERIALIZER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.VALUE_SERIALIZER'), | ||
162 | - OTHER_PROPERTIES = t('designer_form_label.externals.index.KafkaFieldsNameEnum.OTHER_PROPERTIES'), | ||
163 | - ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS = t( | ||
164 | - 'designer_form_label.externals.index.KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS' | ||
165 | - ), | ||
166 | - KAFKA_HEADERS_CHARSET = t( | ||
167 | - 'designer_form_label.externals.index.KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET' | ||
168 | - ), | 123 | + TOPIC_PATTERN = 'designer_form_label.externals.index.KafkaFieldsNameEnum.TOPIC_PATTERN', |
124 | + BOOTSTRAP_SERVERS = 'designer_form_label.externals.index.KafkaFieldsNameEnum.BOOTSTRAP_SERVERS', | ||
125 | + RETRIES = 'designer_form_label.externals.index.KafkaFieldsNameEnum.RETRIES', | ||
126 | + BATCH_SIZE = 'designer_form_label.externals.index.KafkaFieldsNameEnum.BATCH_SIZE', | ||
127 | + LINGER = 'designer_form_label.externals.index.KafkaFieldsNameEnum.LINGER', | ||
128 | + BUFFER_MEMORY = 'designer_form_label.externals.index.KafkaFieldsNameEnum.BUFFER_MEMORY', | ||
129 | + ACKS = 'designer_form_label.externals.index.KafkaFieldsNameEnum.ACKS', | ||
130 | + KEY_SERIALIZER = 'designer_form_label.externals.index.KafkaFieldsNameEnum.KEY_SERIALIZER', | ||
131 | + VALUE_SERIALIZER = 'designer_form_label.externals.index.KafkaFieldsNameEnum.VALUE_SERIALIZER', | ||
132 | + OTHER_PROPERTIES = 'designer_form_label.externals.index.KafkaFieldsNameEnum.OTHER_PROPERTIES', | ||
133 | + ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS = 'designer_form_label.externals.index.KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS', | ||
134 | + KAFKA_HEADERS_CHARSET = 'designer_form_label.externals.index.KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET', | ||
169 | } | 135 | } |
170 | 136 | ||
171 | // Mqtt | 137 | // Mqtt |
@@ -192,31 +158,25 @@ export enum MqttFieldsEnum { | @@ -192,31 +158,25 @@ export enum MqttFieldsEnum { | ||
192 | } | 158 | } |
193 | 159 | ||
194 | export enum MqttFieldsNameEnum { | 160 | export enum MqttFieldsNameEnum { |
195 | - TOPIC_PATTERN = t('designer_form_label.externals.index.MqttFieldsNameEnum.TOPIC_PATTERN'), | ||
196 | - HOST = t('designer_form_label.externals.index.MqttFieldsNameEnum.HOST'), | ||
197 | - PORT = t('designer_form_label.externals.index.MqttFieldsNameEnum.PORT'), | ||
198 | - CONNECT_TIMEOUT_SEC = t( | ||
199 | - 'designer_form_label.externals.index.MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC' | ||
200 | - ), | ||
201 | - CLIENT_ID = t('designer_form_label.externals.index.MqttFieldsNameEnum.CLIENT_ID'), | ||
202 | - APPEND_CLIENT_ID_SUFFIX = t( | ||
203 | - 'designer_form_label.externals.index.MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX' | ||
204 | - ), | ||
205 | - CLEAN_SESSION = t('designer_form_label.externals.index.MqttFieldsNameEnum.CLEAN_SESSION'), | ||
206 | - SSL = t('designer_form_label.externals.index.MqttFieldsNameEnum.SSL'), | ||
207 | - CREDENTIALS = t('designer_form_label.externals.index.MqttFieldsNameEnum.CREDENTIALS'), | 161 | + TOPIC_PATTERN = 'designer_form_label.externals.index.MqttFieldsNameEnum.TOPIC_PATTERN', |
162 | + HOST = 'designer_form_label.externals.index.MqttFieldsNameEnum.HOST', | ||
163 | + PORT = 'designer_form_label.externals.index.MqttFieldsNameEnum.PORT', | ||
164 | + CONNECT_TIMEOUT_SEC = 'designer_form_label.externals.index.MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC', | ||
165 | + CLIENT_ID = 'designer_form_label.externals.index.MqttFieldsNameEnum.CLIENT_ID', | ||
166 | + APPEND_CLIENT_ID_SUFFIX = 'designer_form_label.externals.index.MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX', | ||
167 | + CLEAN_SESSION = 'designer_form_label.externals.index.MqttFieldsNameEnum.CLEAN_SESSION', | ||
168 | + SSL = 'designer_form_label.externals.index.MqttFieldsNameEnum.SSL', | ||
169 | + CREDENTIALS = 'designer_form_label.externals.index.MqttFieldsNameEnum.CREDENTIALS', | ||
208 | 170 | ||
209 | - TYPE = t('designer_form_label.externals.index.MqttFieldsNameEnum.TYPE'), | ||
210 | - PASSWORD = t('designer_form_label.externals.index.MqttFieldsNameEnum.PASSWORD'), | ||
211 | - CA_CERT = t('designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT'), | ||
212 | - CA_CERT_FILE_NAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT_FILE_NAME'), | ||
213 | - PRIVATE_KEY = t('designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY'), | ||
214 | - PRIVATE_KEY_FILE_NAME = t( | ||
215 | - 'designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME' | ||
216 | - ), | ||
217 | - CERT = t('designer_form_label.externals.index.MqttFieldsNameEnum.CERT'), | ||
218 | - CERT_FILE_NAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.CERT_FILE_NAME'), | ||
219 | - USERNAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.USERNAME'), | 171 | + TYPE = 'designer_form_label.externals.index.MqttFieldsNameEnum.TYPE', |
172 | + PASSWORD = 'designer_form_label.externals.index.MqttFieldsNameEnum.PASSWORD', | ||
173 | + CA_CERT = 'designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT', | ||
174 | + CA_CERT_FILE_NAME = 'designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT_FILE_NAME', | ||
175 | + PRIVATE_KEY = 'designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY', | ||
176 | + PRIVATE_KEY_FILE_NAME = 'designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME', | ||
177 | + CERT = 'designer_form_label.externals.index.MqttFieldsNameEnum.CERT', | ||
178 | + CERT_FILE_NAME = 'designer_form_label.externals.index.MqttFieldsNameEnum.CERT_FILE_NAME', | ||
179 | + USERNAME = 'designer_form_label.externals.index.MqttFieldsNameEnum.USERNAME', | ||
220 | } | 180 | } |
221 | 181 | ||
222 | // Rabbitmq | 182 | // Rabbitmq |
@@ -236,32 +196,18 @@ export enum RabbitmqFieldsEnum { | @@ -236,32 +196,18 @@ export enum RabbitmqFieldsEnum { | ||
236 | } | 196 | } |
237 | 197 | ||
238 | export enum RabbitmqFieldsNameEnum { | 198 | export enum RabbitmqFieldsNameEnum { |
239 | - EXCHANGE_NAME_PATTERN = t( | ||
240 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN' | ||
241 | - ), | ||
242 | - ROUTING_KEY_PATTERN = t( | ||
243 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN' | ||
244 | - ), | ||
245 | - MESSAGE_PROPERTIES = t( | ||
246 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES' | ||
247 | - ), | ||
248 | - HOST = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.HOST'), | ||
249 | - PORT = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.PORT'), | ||
250 | - VIRTUAL_HOST = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.VIRTUAL_HOST'), | ||
251 | - USERNAME = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.USERNAME'), | ||
252 | - PASSWORD = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.PASSWORD'), | ||
253 | - AUTOMATIC_RECOVERY_ENABLED = t( | ||
254 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED' | ||
255 | - ), | ||
256 | - CONNECTION_TIMEOUT = t( | ||
257 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT' | ||
258 | - ), | ||
259 | - HANDSHAKE_TIMEOUT = t( | ||
260 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT' | ||
261 | - ), | ||
262 | - CLIENT_PROPERTIES = t( | ||
263 | - 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CLIENT_PROPERTIES' | ||
264 | - ), | 199 | + EXCHANGE_NAME_PATTERN = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN', |
200 | + ROUTING_KEY_PATTERN = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN', | ||
201 | + MESSAGE_PROPERTIES = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES', | ||
202 | + HOST = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.HOST', | ||
203 | + PORT = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.PORT', | ||
204 | + VIRTUAL_HOST = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.VIRTUAL_HOST', | ||
205 | + USERNAME = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.USERNAME', | ||
206 | + PASSWORD = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.PASSWORD', | ||
207 | + AUTOMATIC_RECOVERY_ENABLED = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED', | ||
208 | + CONNECTION_TIMEOUT = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT', | ||
209 | + HANDSHAKE_TIMEOUT = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT', | ||
210 | + CLIENT_PROPERTIES = 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CLIENT_PROPERTIES', | ||
265 | } | 211 | } |
266 | 212 | ||
267 | // Rest api call | 213 | // Rest api call |
@@ -297,60 +243,34 @@ export enum RestApiCallFieldsEnum { | @@ -297,60 +243,34 @@ export enum RestApiCallFieldsEnum { | ||
297 | } | 243 | } |
298 | 244 | ||
299 | export enum RestApiCallFieldsNameEnum { | 245 | export enum RestApiCallFieldsNameEnum { |
300 | - REST_ENDPOINT_URL_PATTERN = t( | ||
301 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN' | ||
302 | - ), | ||
303 | - REQUEST_METHOD = t( | ||
304 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REQUEST_METHOD' | ||
305 | - ), | ||
306 | - USE_SIMPLE_CLIENT_HTTP_FACTORY = t( | ||
307 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY' | ||
308 | - ), | ||
309 | - IGNORE_REQUEST_BODY = t( | ||
310 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY' | ||
311 | - ), | ||
312 | - ENABLE_PROXY = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.ENABLE_PROXY'), | ||
313 | - USE_SYSTEM_PROXY_PROPERTIES = t( | ||
314 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES' | ||
315 | - ), | ||
316 | - PROXY_SCHEME = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_SCHEME'), | ||
317 | - PROXY_HOST = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_HOST'), | ||
318 | - PROXY_PORT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PORT'), | ||
319 | - PROXY_USER = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_USER'), | ||
320 | - PROXY_PASSWORD = t( | ||
321 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PASSWORD' | ||
322 | - ), | ||
323 | - READ_TIMEOUT_MS = t( | ||
324 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.READ_TIMEOUT_MS' | ||
325 | - ), | ||
326 | - MAX_PARALLEL_REQUESTS_COUNT = t( | ||
327 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT' | ||
328 | - ), | ||
329 | - HEADERS = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.HEADERS'), | ||
330 | - USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE = t( | ||
331 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE' | ||
332 | - ), | ||
333 | - TRIM_QUEUE = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.TRIM_QUEUE'), | ||
334 | - MAX_QUEUE_SIZE = t( | ||
335 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE' | ||
336 | - ), | ||
337 | - CREDENTIALS = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CREDENTIALS'), | 246 | + REST_ENDPOINT_URL_PATTERN = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN', |
247 | + REQUEST_METHOD = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REQUEST_METHOD', | ||
248 | + USE_SIMPLE_CLIENT_HTTP_FACTORY = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY', | ||
249 | + IGNORE_REQUEST_BODY = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY', | ||
250 | + ENABLE_PROXY = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.ENABLE_PROXY', | ||
251 | + USE_SYSTEM_PROXY_PROPERTIES = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES', | ||
252 | + PROXY_SCHEME = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_SCHEME', | ||
253 | + PROXY_HOST = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_HOST', | ||
254 | + PROXY_PORT = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PORT', | ||
255 | + PROXY_USER = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_USER', | ||
256 | + PROXY_PASSWORD = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PASSWORD', | ||
257 | + READ_TIMEOUT_MS = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.READ_TIMEOUT_MS', | ||
258 | + MAX_PARALLEL_REQUESTS_COUNT = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT', | ||
259 | + HEADERS = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.HEADERS', | ||
260 | + USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE', | ||
261 | + TRIM_QUEUE = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.TRIM_QUEUE', | ||
262 | + MAX_QUEUE_SIZE = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE', | ||
263 | + CREDENTIALS = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CREDENTIALS', | ||
338 | 264 | ||
339 | - TYPE = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.TYPE'), | ||
340 | - PASSWORD = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PASSWORD'), | ||
341 | - CA_CERT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT'), | ||
342 | - CA_CERT_FILE_NAME = t( | ||
343 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT_FILE_NAME' | ||
344 | - ), | ||
345 | - PRIVATE_KEY = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY'), | ||
346 | - PRIVATE_KEY_FILE_NAME = t( | ||
347 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY_FILE_NAME' | ||
348 | - ), | ||
349 | - CERT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT'), | ||
350 | - CERT_FILE_NAME = t( | ||
351 | - 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT_FILE_NAME' | ||
352 | - ), | ||
353 | - USERNAME = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.USERNAME'), | 265 | + TYPE = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.TYPE', |
266 | + PASSWORD = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PASSWORD', | ||
267 | + CA_CERT = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT', | ||
268 | + CA_CERT_FILE_NAME = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT_FILE_NAME', | ||
269 | + PRIVATE_KEY = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY', | ||
270 | + PRIVATE_KEY_FILE_NAME = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY_FILE_NAME', | ||
271 | + CERT = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT', | ||
272 | + CERT_FILE_NAME = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT_FILE_NAME', | ||
273 | + USERNAME = 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USERNAME', | ||
354 | } | 274 | } |
355 | 275 | ||
356 | // send email | 276 | // send email |
@@ -372,22 +292,20 @@ export enum SendEmailFieldsEnum { | @@ -372,22 +292,20 @@ export enum SendEmailFieldsEnum { | ||
372 | } | 292 | } |
373 | 293 | ||
374 | export enum SendEmailFieldsNameEnum { | 294 | export enum SendEmailFieldsNameEnum { |
375 | - USE_SYSTEM_SMTP_SETTINGS = t( | ||
376 | - 'designer_form_label.externals.index.SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS' | ||
377 | - ), | ||
378 | - SMTP_PROTOCOL = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PROTOCOL'), | ||
379 | - SMTP_HOST = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_HOST'), | ||
380 | - SMTP_PORT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PORT'), | ||
381 | - TIMEOUT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.TIMEOUT'), | ||
382 | - ENABLE_TLS = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_TLS'), | ||
383 | - TLS_VERSION = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.TLS_VERSION'), | ||
384 | - ENABLE_PROXY = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_PROXY'), | ||
385 | - PROXY_HOST = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_HOST'), | ||
386 | - PROXY_PORT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PORT'), | ||
387 | - PROXY_USER = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_USER'), | ||
388 | - PROXY_PASSWORD = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PASSWORD'), | ||
389 | - USERNAME = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.USERNAME'), | ||
390 | - PASSWORD = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PASSWORD'), | 295 | + USE_SYSTEM_SMTP_SETTINGS = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS', |
296 | + SMTP_PROTOCOL = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PROTOCOL', | ||
297 | + SMTP_HOST = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_HOST', | ||
298 | + SMTP_PORT = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PORT', | ||
299 | + TIMEOUT = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.TIMEOUT', | ||
300 | + ENABLE_TLS = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_TLS', | ||
301 | + TLS_VERSION = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.TLS_VERSION', | ||
302 | + ENABLE_PROXY = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_PROXY', | ||
303 | + PROXY_HOST = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_HOST', | ||
304 | + PROXY_PORT = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PORT', | ||
305 | + PROXY_USER = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_USER', | ||
306 | + PROXY_PASSWORD = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PASSWORD', | ||
307 | + USERNAME = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.USERNAME', | ||
308 | + PASSWORD = 'designer_form_label.externals.index.SendEmailFieldsNameEnum.PASSWORD', | ||
391 | } | 309 | } |
392 | 310 | ||
393 | export enum SendSMSFieldsEnum { | 311 | export enum SendSMSFieldsEnum { |
@@ -406,26 +324,16 @@ export enum SendSMSFieldsEnum { | @@ -406,26 +324,16 @@ export enum SendSMSFieldsEnum { | ||
406 | } | 324 | } |
407 | 325 | ||
408 | export enum SendSMSFieldsNameEnum { | 326 | export enum SendSMSFieldsNameEnum { |
409 | - NUMBERS_TO_TEMPLATE = t( | ||
410 | - 'designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE' | ||
411 | - ), | ||
412 | - SMS_MESSAGE_TEMPLATE = t( | ||
413 | - 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE' | ||
414 | - ), | ||
415 | - USE_SYSTEM_SMS_SETTINGS = t( | ||
416 | - 'designer_form_label.externals.index.SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS' | ||
417 | - ), | ||
418 | - SMS_PROVIDER_CONFIGURATION = t( | ||
419 | - 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_PROVIDER_CONFIGURATION' | ||
420 | - ), | 327 | + NUMBERS_TO_TEMPLATE = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE', |
328 | + SMS_MESSAGE_TEMPLATE = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE', | ||
329 | + USE_SYSTEM_SMS_SETTINGS = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS', | ||
330 | + SMS_PROVIDER_CONFIGURATION = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_PROVIDER_CONFIGURATION', | ||
421 | 331 | ||
422 | - ACCESS_KEY_ID = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCESS_KEY_ID'), | ||
423 | - SECRET_ACCESS_KEY = t( | ||
424 | - 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SECRET_ACCESS_KEY' | ||
425 | - ), | ||
426 | - REGION = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.REGION'), | ||
427 | - TYPE = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.TYPE'), | ||
428 | - NUMBER_FROM = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBER_FROM'), | ||
429 | - ACCOUNT_SID = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_SID'), | ||
430 | - ACCOUNT_TOKEN = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_TOKEN'), | 332 | + ACCESS_KEY_ID = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCESS_KEY_ID', |
333 | + SECRET_ACCESS_KEY = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SECRET_ACCESS_KEY', | ||
334 | + REGION = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.REGION', | ||
335 | + TYPE = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.TYPE', | ||
336 | + NUMBER_FROM = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBER_FROM', | ||
337 | + ACCOUNT_SID = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_SID', | ||
338 | + ACCOUNT_TOKEN = 'designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_TOKEN', | ||
431 | } | 339 | } |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | // Filter Check Alarm Status Fields | 1 | // Filter Check Alarm Status Fields |
6 | export enum CheckAlarmStatusFieldEnum { | 2 | export enum CheckAlarmStatusFieldEnum { |
7 | ALARM_STATUS_LIST = 'alarmStatusList', | 3 | ALARM_STATUS_LIST = 'alarmStatusList', |
8 | } | 4 | } |
9 | 5 | ||
10 | export enum CheckAlarmStatusFieldNameEnum { | 6 | export enum CheckAlarmStatusFieldNameEnum { |
11 | - ALARM_STATUS_LIST = t( | ||
12 | - 'designer_form_label.filters.index.CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST' | ||
13 | - ), | 7 | + ALARM_STATUS_LIST = 'designer_form_label.filters.index.CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST', |
14 | } | 8 | } |
15 | 9 | ||
16 | // Filter CHeck Existence Fields | 10 | // Filter CHeck Existence Fields |
@@ -21,13 +15,9 @@ export enum CheckExistenceFieldsEnum { | @@ -21,13 +15,9 @@ export enum CheckExistenceFieldsEnum { | ||
21 | } | 15 | } |
22 | 16 | ||
23 | export enum CheckExistenceFieldsNameEnum { | 17 | export enum CheckExistenceFieldsNameEnum { |
24 | - MESSAGE_NAMES = t('designer_form_label.filters.index.CheckExistenceFieldsNameEnum.MESSAGE_NAMES'), | ||
25 | - METADATA_NAMES = t( | ||
26 | - 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.METADATA_NAMES' | ||
27 | - ), | ||
28 | - CHECK_ALL_KEYS = t( | ||
29 | - 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS' | ||
30 | - ), | 18 | + MESSAGE_NAMES = 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.MESSAGE_NAMES', |
19 | + METADATA_NAMES = 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.METADATA_NAMES', | ||
20 | + CHECK_ALL_KEYS = 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS', | ||
31 | } | 21 | } |
32 | 22 | ||
33 | // Filter Check Relation Fields | 23 | // Filter Check Relation Fields |
@@ -40,14 +30,10 @@ export enum CheckRelationFieldsEnum { | @@ -40,14 +30,10 @@ export enum CheckRelationFieldsEnum { | ||
40 | } | 30 | } |
41 | 31 | ||
42 | export enum CheckRelationFieldsNameEnum { | 32 | export enum CheckRelationFieldsNameEnum { |
43 | - DIRECTION = t('designer_form_label.filters.index.CheckRelationFieldsNameEnum.DIRECTION'), | ||
44 | - CHECK_FOR_SINGLE_ENTITY = t( | ||
45 | - 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY' | ||
46 | - ), | ||
47 | - ENTITY_TYPE = t('designer_form_label.filters.index.CheckRelationFieldsNameEnum.ENTITY_TYPE'), | ||
48 | - RELEATION_TYPE = t( | ||
49 | - 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.RELEATION_TYPE' | ||
50 | - ), | 33 | + DIRECTION = 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.DIRECTION', |
34 | + CHECK_FOR_SINGLE_ENTITY = 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY', | ||
35 | + ENTITY_TYPE = 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.ENTITY_TYPE', | ||
36 | + RELEATION_TYPE = 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.RELEATION_TYPE', | ||
51 | } | 37 | } |
52 | 38 | ||
53 | // Filter Gps geofencing filter | 39 | // Filter Gps geofencing filter |
@@ -65,32 +51,16 @@ export enum GpsGeofencingFilterFieldsEnum { | @@ -65,32 +51,16 @@ export enum GpsGeofencingFilterFieldsEnum { | ||
65 | } | 51 | } |
66 | 52 | ||
67 | export enum GpsGeofencingFilterFieldsNameEnum { | 53 | export enum GpsGeofencingFilterFieldsNameEnum { |
68 | - LATITUDE_KEY_NAME = t( | ||
69 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME' | ||
70 | - ), | ||
71 | - LONGITUDE_KEY_NAME = t( | ||
72 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME' | ||
73 | - ), | ||
74 | - PERIMETER_TYPE = t( | ||
75 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE' | ||
76 | - ), | ||
77 | - FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = t( | ||
78 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA' | ||
79 | - ), | ||
80 | - CENTER_LATITUDE = t( | ||
81 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE' | ||
82 | - ), | ||
83 | - CENTER_LONGITUDE = t( | ||
84 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE' | ||
85 | - ), | ||
86 | - RANGE = t('designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE'), | ||
87 | - RANGE_UNIT = t('designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT'), | ||
88 | - PERIMETER_KEY_NAME = t( | ||
89 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME' | ||
90 | - ), | ||
91 | - POLYGONS_DEFINITION = t( | ||
92 | - 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION' | ||
93 | - ), | 54 | + LATITUDE_KEY_NAME = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME', |
55 | + LONGITUDE_KEY_NAME = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME', | ||
56 | + PERIMETER_TYPE = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE', | ||
57 | + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA', | ||
58 | + CENTER_LATITUDE = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE', | ||
59 | + CENTER_LONGITUDE = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE', | ||
60 | + RANGE = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE', | ||
61 | + RANGE_UNIT = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT', | ||
62 | + PERIMETER_KEY_NAME = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME', | ||
63 | + POLYGONS_DEFINITION = 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION', | ||
94 | } | 64 | } |
95 | 65 | ||
96 | // Filter Message Type | 66 | // Filter Message Type |
@@ -99,7 +69,7 @@ export enum MessageTypeFieldsEnum { | @@ -99,7 +69,7 @@ export enum MessageTypeFieldsEnum { | ||
99 | } | 69 | } |
100 | 70 | ||
101 | export enum MessageTypeFieldsNameEnum { | 71 | export enum MessageTypeFieldsNameEnum { |
102 | - MESSAGE_TYPES = t('designer_form_label.filters.index.MessageTypeFieldsNameEnum.MESSAGE_TYPES'), | 72 | + MESSAGE_TYPES = 'designer_form_label.filters.index.MessageTypeFieldsNameEnum.MESSAGE_TYPES', |
103 | } | 73 | } |
104 | 74 | ||
105 | // Filter Originator Type | 75 | // Filter Originator Type |
@@ -108,9 +78,7 @@ export enum OriginatorTypeFieldsEnum { | @@ -108,9 +78,7 @@ export enum OriginatorTypeFieldsEnum { | ||
108 | } | 78 | } |
109 | 79 | ||
110 | export enum OriginatorTypeFieldsNameEnum { | 80 | export enum OriginatorTypeFieldsNameEnum { |
111 | - ORIGINATOR_TYPES = t( | ||
112 | - 'designer_form_label.filters.index.OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES' | ||
113 | - ), | 81 | + ORIGINATOR_TYPES = 'designer_form_label.filters.index.OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES', |
114 | } | 82 | } |
115 | 83 | ||
116 | // Filter Script | 84 | // Filter Script |
@@ -119,7 +87,7 @@ export enum ScriptFieldsEnum { | @@ -119,7 +87,7 @@ export enum ScriptFieldsEnum { | ||
119 | } | 87 | } |
120 | 88 | ||
121 | export enum ScriptFieldsNameEnum { | 89 | export enum ScriptFieldsNameEnum { |
122 | - JS_SCRIPT = t('designer_form_label.filters.index.ScriptFieldsNameEnum.JS_SCRIPT'), | 90 | + JS_SCRIPT = 'designer_form_label.filters.index.ScriptFieldsNameEnum.JS_SCRIPT', |
123 | } | 91 | } |
124 | 92 | ||
125 | // Filter Switch | 93 | // Filter Switch |
@@ -128,5 +96,5 @@ export enum SwitchFieldsEnum { | @@ -128,5 +96,5 @@ export enum SwitchFieldsEnum { | ||
128 | } | 96 | } |
129 | 97 | ||
130 | export enum SwitchFieldsNameEnum { | 98 | export enum SwitchFieldsNameEnum { |
131 | - JS_SCRIPT = t('designer_form_label.filters.index.SwitchFieldsNameEnum.JS_SCRIPT'), | 99 | + JS_SCRIPT = 'designer_form_label.filters.index.SwitchFieldsNameEnum.JS_SCRIPT', |
132 | } | 100 | } |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | export enum CheckPointFieldsEnum { | 1 | export enum CheckPointFieldsEnum { |
6 | QUEUE_NAME = 'queueName', | 2 | QUEUE_NAME = 'queueName', |
7 | } | 3 | } |
8 | export enum CheckPointFieldsNameEnum { | 4 | export enum CheckPointFieldsNameEnum { |
9 | - QUEUE_NAME = t('designer_form_label.flows.index.CheckPointFieldsNameEnum.QUEUE_NAME'), | 5 | + QUEUE_NAME = 'designer_form_label.flows.index.CheckPointFieldsNameEnum.QUEUE_NAME', |
10 | } | 6 | } |
11 | 7 | ||
12 | export enum RuleChainFieldsEnum { | 8 | export enum RuleChainFieldsEnum { |
@@ -14,5 +10,5 @@ export enum RuleChainFieldsEnum { | @@ -14,5 +10,5 @@ export enum RuleChainFieldsEnum { | ||
14 | } | 10 | } |
15 | 11 | ||
16 | export enum RuleChainFieldsNameEnum { | 12 | export enum RuleChainFieldsNameEnum { |
17 | - RULE_CHAIN_ID = t('designer_form_label.flows.index.RuleChainFieldsNameEnum.RULE_CHAIN_ID'), | 13 | + RULE_CHAIN_ID = 'designer_form_label.flows.index.RuleChainFieldsNameEnum.RULE_CHAIN_ID', |
18 | } | 14 | } |
1 | -import { useI18n } from '/@/hooks/web/useI18n'; | ||
2 | - | ||
3 | -const { t } = useI18n() as any; //加载国际化 | ||
4 | - | ||
5 | // Change originator | 1 | // Change originator |
6 | export enum ChangeOriginatorFieldsEnum { | 2 | export enum ChangeOriginatorFieldsEnum { |
7 | ORIGINATOR_SOURCE = 'originatorSource', | 3 | ORIGINATOR_SOURCE = 'originatorSource', |
@@ -9,12 +5,8 @@ export enum ChangeOriginatorFieldsEnum { | @@ -9,12 +5,8 @@ export enum ChangeOriginatorFieldsEnum { | ||
9 | } | 5 | } |
10 | 6 | ||
11 | export enum ChangeOriginatorFieldsNameEnum { | 7 | export enum ChangeOriginatorFieldsNameEnum { |
12 | - ORIGINATOR_SOURCE = t( | ||
13 | - 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE' | ||
14 | - ), | ||
15 | - RELATIONS_QUERY = t( | ||
16 | - 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY' | ||
17 | - ), | 8 | + ORIGINATOR_SOURCE = 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE', |
9 | + RELATIONS_QUERY = 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY', | ||
18 | } | 10 | } |
19 | 11 | ||
20 | export enum ScriptFieldsEnum { | 12 | export enum ScriptFieldsEnum { |
@@ -22,7 +14,7 @@ export enum ScriptFieldsEnum { | @@ -22,7 +14,7 @@ export enum ScriptFieldsEnum { | ||
22 | } | 14 | } |
23 | 15 | ||
24 | export enum ScriptFieldsNameEnum { | 16 | export enum ScriptFieldsNameEnum { |
25 | - JS_SCRIPT = t('designer_form_label.transformations.index.ScriptFieldsNameEnum.JS_SCRIPT'), | 17 | + JS_SCRIPT = 'designer_form_label.transformations.index.ScriptFieldsNameEnum.JS_SCRIPT', |
26 | } | 18 | } |
27 | 19 | ||
28 | export enum ToEmailFieldsEnum { | 20 | export enum ToEmailFieldsEnum { |
@@ -37,22 +29,12 @@ export enum ToEmailFieldsEnum { | @@ -37,22 +29,12 @@ export enum ToEmailFieldsEnum { | ||
37 | } | 29 | } |
38 | 30 | ||
39 | export enum ToEmailFieldsNameEnum { | 31 | export enum ToEmailFieldsNameEnum { |
40 | - FROM_TEMPLATE = t( | ||
41 | - 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.FROM_TEMPLATE' | ||
42 | - ), | ||
43 | - TO_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.TO_TEMPLATE'), | ||
44 | - CC_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.CC_TEMPLATE'), | ||
45 | - BCC_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.BCC_TEMPLATE'), | ||
46 | - SUBJECT_TEMPLATE = t( | ||
47 | - 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.SUBJECT_TEMPLATE' | ||
48 | - ), | ||
49 | - MAIL_BODY_TYPE = t( | ||
50 | - 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.MAIL_BODY_TYPE' | ||
51 | - ), | ||
52 | - IS_HTML_TEMPLATE = t( | ||
53 | - 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.IS_HTML_TEMPLATE' | ||
54 | - ), | ||
55 | - BODY_TEMPLATE = t( | ||
56 | - 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.BODY_TEMPLATE' | ||
57 | - ), | 32 | + FROM_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.FROM_TEMPLATE', |
33 | + TO_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.TO_TEMPLATE', | ||
34 | + CC_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.CC_TEMPLATE', | ||
35 | + BCC_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.BCC_TEMPLATE', | ||
36 | + SUBJECT_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.SUBJECT_TEMPLATE', | ||
37 | + MAIL_BODY_TYPE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.MAIL_BODY_TYPE', | ||
38 | + IS_HTML_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.IS_HTML_TEMPLATE', | ||
39 | + BODY_TEMPLATE = 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.BODY_TEMPLATE', | ||
58 | } | 40 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | AssignToCustomerFieldsEnum, | 3 | AssignToCustomerFieldsEnum, |
3 | AssignToCustomerFieldsNameEnum, | 4 | AssignToCustomerFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 13 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
10 | component: 'Input', | 14 | component: 'Input', |
11 | - label: AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN, | 15 | + label: h('span', t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)), |
12 | helpMessage: | 16 | helpMessage: |
13 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 17 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
14 | componentProps: { | 18 | componentProps: { |
@@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | { | 30 | { |
27 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 31 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
28 | component: 'InputNumber', | 32 | component: 'InputNumber', |
29 | - label: AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION, | 33 | + label: h('span', t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)), |
30 | required: true, | 34 | required: true, |
31 | helpMessage: | 35 | helpMessage: |
32 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 36 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.ASSIGN_TO_CUSTOMER); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.ASSIGN_TO_CUSTOMER); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AssignToCustomerDataType { | 10 | export interface AssignToCustomerDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 9 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
6 | 10 | ||
@@ -8,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -8,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
8 | { | 12 | { |
9 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 13 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
10 | component: 'JavascriptEditorWithTestModal', | 14 | component: 'JavascriptEditorWithTestModal', |
11 | - label: ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS, | 15 | + label: h('span', t(ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS)), |
12 | componentProps: { | 16 | componentProps: { |
13 | javaScriptEditorProps: { | 17 | javaScriptEditorProps: { |
14 | functionName: 'Details', | 18 | functionName: 'Details', |
@@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 25 | { |
22 | field: ClearAlarmFieldsEnum.ALARM_TYPE, | 26 | field: ClearAlarmFieldsEnum.ALARM_TYPE, |
23 | component: 'Input', | 27 | component: 'Input', |
24 | - label: ClearAlarmFieldsNameEnum.ALARM_TYPE, | 28 | + label: h('span', t(ClearAlarmFieldsNameEnum.ALARM_TYPE)), |
25 | required: true, | 29 | required: true, |
26 | componentProps: { | 30 | componentProps: { |
27 | placeholder: `请输入${ClearAlarmFieldsNameEnum.ALARM_TYPE}`, | 31 | placeholder: `请输入${ClearAlarmFieldsNameEnum.ALARM_TYPE}`, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CLEAR_ALARM); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CLEAR_ALARM); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface ClearAlarmDataType { | 10 | export interface ClearAlarmDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.COPY_TO_VIEW); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.COPY_TO_VIEW); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CopyToViewDataType { | 10 | export interface CopyToViewDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 9 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
6 | 10 | ||
@@ -25,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | @@ -25,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | ||
25 | { | 29 | { |
26 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 30 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
27 | component: 'JavascriptEditorWithTestModal', | 31 | component: 'JavascriptEditorWithTestModal', |
28 | - label: CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS, | 32 | + label: h('span', t(CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS)), |
29 | valueField: 'value', | 33 | valueField: 'value', |
30 | changeEvent: 'update:value', | 34 | changeEvent: 'update:value', |
31 | show: ({ model }) => | 35 | show: ({ model }) => |
@@ -45,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | @@ -45,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | ||
45 | { | 49 | { |
46 | field: CreateAlarmFieldsEnum.ALARM_TYPE, | 50 | field: CreateAlarmFieldsEnum.ALARM_TYPE, |
47 | component: 'Input', | 51 | component: 'Input', |
48 | - label: CreateAlarmFieldsNameEnum.ALARM_TYPE, | 52 | + label: h('span', t(CreateAlarmFieldsNameEnum.ALARM_TYPE)), |
49 | helpMessage: [ | 53 | helpMessage: [ |
50 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 54 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
51 | ], | 55 | ], |
@@ -66,7 +70,7 @@ export const formSchemas: FormSchema[] = [ | @@ -66,7 +70,7 @@ export const formSchemas: FormSchema[] = [ | ||
66 | { | 70 | { |
67 | field: CreateAlarmFieldsEnum.SEVERITY, | 71 | field: CreateAlarmFieldsEnum.SEVERITY, |
68 | component: 'Input', | 72 | component: 'Input', |
69 | - label: CreateAlarmFieldsNameEnum.SEVERITY, | 73 | + label: h('span', t(CreateAlarmFieldsNameEnum.SEVERITY)), |
70 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 74 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
71 | helpMessage: [ | 75 | helpMessage: [ |
72 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', | 76 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', |
@@ -87,7 +91,7 @@ export const formSchemas: FormSchema[] = [ | @@ -87,7 +91,7 @@ export const formSchemas: FormSchema[] = [ | ||
87 | { | 91 | { |
88 | field: CreateAlarmFieldsEnum.RELATION_TYPES, | 92 | field: CreateAlarmFieldsEnum.RELATION_TYPES, |
89 | component: 'Select', | 93 | component: 'Select', |
90 | - label: CreateAlarmFieldsNameEnum.RELATION_TYPES, | 94 | + label: h('span', t(CreateAlarmFieldsNameEnum.RELATION_TYPES)), |
91 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 95 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
92 | componentProps: { | 96 | componentProps: { |
93 | open: false, | 97 | open: false, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_ALARM); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_ALARM); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CreateAlarmDataType { | 10 | export interface CreateAlarmDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | DirectionEnum, | 3 | DirectionEnum, |
3 | DirectionNameEnum, | 4 | DirectionNameEnum, |
@@ -9,12 +10,15 @@ import { | @@ -9,12 +10,15 @@ import { | ||
9 | CreateRelationFieldsNameEnum, | 10 | CreateRelationFieldsNameEnum, |
10 | } from '../../../enum/formField/action'; | 11 | } from '../../../enum/formField/action'; |
11 | import { FormSchema } from '/@/components/Form'; | 12 | import { FormSchema } from '/@/components/Form'; |
13 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
14 | + | ||
15 | +const { t } = useI18n(); | ||
12 | 16 | ||
13 | export const formSchemas: FormSchema[] = [ | 17 | export const formSchemas: FormSchema[] = [ |
14 | { | 18 | { |
15 | field: CreateRelationFieldsEnum.DIRECTION, | 19 | field: CreateRelationFieldsEnum.DIRECTION, |
16 | component: 'Select', | 20 | component: 'Select', |
17 | - label: CreateRelationFieldsNameEnum.DIRECTION, | 21 | + label: h('span', t(CreateRelationFieldsNameEnum.DIRECTION)), |
18 | required: true, | 22 | required: true, |
19 | componentProps: { | 23 | componentProps: { |
20 | options: Object.keys(DirectionEnum).map((value) => ({ | 24 | options: Object.keys(DirectionEnum).map((value) => ({ |
@@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | @@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | ||
28 | { | 32 | { |
29 | field: CreateRelationFieldsEnum.ENTITY_TYPE, | 33 | field: CreateRelationFieldsEnum.ENTITY_TYPE, |
30 | component: 'Select', | 34 | component: 'Select', |
31 | - label: CreateRelationFieldsNameEnum.ENTITY_TYPE, | 35 | + label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_TYPE)), |
32 | colProps: { span: 8 }, | 36 | colProps: { span: 8 }, |
33 | required: true, | 37 | required: true, |
34 | componentProps: { | 38 | componentProps: { |
@@ -43,7 +47,7 @@ export const formSchemas: FormSchema[] = [ | @@ -43,7 +47,7 @@ export const formSchemas: FormSchema[] = [ | ||
43 | { | 47 | { |
44 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, | 48 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, |
45 | component: 'Input', | 49 | component: 'Input', |
46 | - label: CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN, | 50 | + label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)), |
47 | colProps: { span: 8 }, | 51 | colProps: { span: 8 }, |
48 | required: true, | 52 | required: true, |
49 | helpMessage: [ | 53 | helpMessage: [ |
@@ -56,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | @@ -56,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | ||
56 | { | 60 | { |
57 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, | 61 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, |
58 | component: 'Input', | 62 | component: 'Input', |
59 | - label: CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN, | 63 | + label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)), |
60 | colProps: { span: 8 }, | 64 | colProps: { span: 8 }, |
61 | required: true, | 65 | required: true, |
62 | helpMessage: [ | 66 | helpMessage: [ |
@@ -73,7 +77,7 @@ export const formSchemas: FormSchema[] = [ | @@ -73,7 +77,7 @@ export const formSchemas: FormSchema[] = [ | ||
73 | { | 77 | { |
74 | field: CreateRelationFieldsEnum.RELATION_TYPE, | 78 | field: CreateRelationFieldsEnum.RELATION_TYPE, |
75 | component: 'Input', | 79 | component: 'Input', |
76 | - label: CreateRelationFieldsNameEnum.RELATION_TYPE, | 80 | + label: h('span', t(CreateRelationFieldsNameEnum.RELATION_TYPE)), |
77 | helpMessage: [ | 81 | helpMessage: [ |
78 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 82 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
79 | ], | 83 | ], |
@@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | @@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | ||
84 | { | 88 | { |
85 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, | 89 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, |
86 | component: 'Checkbox', | 90 | component: 'Checkbox', |
87 | - label: CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS, | 91 | + label: h('span', t(CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS)), |
88 | helpMessage: '', | 92 | helpMessage: '', |
89 | show: ({ model }) => { | 93 | show: ({ model }) => { |
90 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; | 94 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; |
@@ -97,7 +101,7 @@ export const formSchemas: FormSchema[] = [ | @@ -97,7 +101,7 @@ export const formSchemas: FormSchema[] = [ | ||
97 | { | 101 | { |
98 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, | 102 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, |
99 | component: 'Checkbox', | 103 | component: 'Checkbox', |
100 | - label: CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS, | 104 | + label: h('span', t(CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS)), |
101 | renderComponentContent: () => ({ | 105 | renderComponentContent: () => ({ |
102 | default: () => | 106 | default: () => |
103 | 'Removes current relations from the originator of the incoming message based on direction and type.', | 107 | 'Removes current relations from the originator of the incoming message based on direction and type.', |
@@ -106,7 +110,7 @@ export const formSchemas: FormSchema[] = [ | @@ -106,7 +110,7 @@ export const formSchemas: FormSchema[] = [ | ||
106 | { | 110 | { |
107 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, | 111 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, |
108 | component: 'Checkbox', | 112 | component: 'Checkbox', |
109 | - label: CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, | 113 | + label: h('span', t(CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY)), |
110 | renderComponentContent: () => ({ | 114 | renderComponentContent: () => ({ |
111 | default: () => 'Used to process submitted message as a message from another entity.', | 115 | default: () => 'Used to process submitted message as a message from another entity.', |
112 | }), | 116 | }), |
@@ -114,7 +118,7 @@ export const formSchemas: FormSchema[] = [ | @@ -114,7 +118,7 @@ export const formSchemas: FormSchema[] = [ | ||
114 | { | 118 | { |
115 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 119 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
116 | component: 'InputNumber', | 120 | component: 'InputNumber', |
117 | - label: CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION, | 121 | + label: h('span', t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)), |
118 | required: true, | 122 | required: true, |
119 | componentProps: { | 123 | componentProps: { |
120 | min: 0, | 124 | min: 0, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_RELATION); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_RELATION); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CreateRelationDataType { | 10 | export interface CreateRelationDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | DelayDeprecatedFieldsEnum, | 3 | DelayDeprecatedFieldsEnum, |
3 | DelayDeprecatedFieldsNameEnum, | 4 | DelayDeprecatedFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, | 13 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, |
10 | - label: DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, | 14 | + label: h('span', t(DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS)), |
11 | component: 'Checkbox', | 15 | component: 'Checkbox', |
12 | renderComponentContent: () => ({ | 16 | renderComponentContent: () => ({ |
13 | default: () => | 17 | default: () => |
@@ -17,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -17,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
17 | { | 21 | { |
18 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, | 22 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, |
19 | component: 'Input', | 23 | component: 'Input', |
20 | - label: DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN, | 24 | + label: h('span', t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN)), |
21 | required: true, | 25 | required: true, |
22 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 26 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
23 | componentProps: { | 27 | componentProps: { |
@@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | @@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | ||
28 | { | 32 | { |
29 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, | 33 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, |
30 | component: 'InputNumber', | 34 | component: 'InputNumber', |
31 | - label: DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS, | 35 | + label: h('span', t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)), |
32 | required: true, | 36 | required: true, |
33 | ifShow: ({ model }) => | 37 | ifShow: ({ model }) => |
34 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 38 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
@@ -40,7 +44,7 @@ export const formSchemas: FormSchema[] = [ | @@ -40,7 +44,7 @@ export const formSchemas: FormSchema[] = [ | ||
40 | { | 44 | { |
41 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, | 45 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, |
42 | component: 'InputNumber', | 46 | component: 'InputNumber', |
43 | - label: DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS, | 47 | + label: h('span', t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)), |
44 | required: true, | 48 | required: true, |
45 | componentProps: { | 49 | componentProps: { |
46 | min: 0, | 50 | min: 0, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELAY_DEPRECATED); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELAY_DEPRECATED); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface DelayDeprecatedDataType { | 10 | export interface DelayDeprecatedDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | DirectionEnum, | 3 | DirectionEnum, |
3 | DirectionNameEnum, | 4 | DirectionNameEnum, |
@@ -9,12 +10,15 @@ import { | @@ -9,12 +10,15 @@ import { | ||
9 | DeleteRelationFieldsNameEnum, | 10 | DeleteRelationFieldsNameEnum, |
10 | } from '../../../enum/formField/action'; | 11 | } from '../../../enum/formField/action'; |
11 | import { FormSchema } from '/@/components/Form'; | 12 | import { FormSchema } from '/@/components/Form'; |
13 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
14 | + | ||
15 | +const { t } = useI18n(); | ||
12 | 16 | ||
13 | export const formSchemas: FormSchema[] = [ | 17 | export const formSchemas: FormSchema[] = [ |
14 | { | 18 | { |
15 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, | 19 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, |
16 | component: 'Checkbox', | 20 | component: 'Checkbox', |
17 | - label: DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY, | 21 | + label: h('span', t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)), |
18 | renderComponentContent: () => ({ | 22 | renderComponentContent: () => ({ |
19 | default: () => | 23 | default: () => |
20 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', | 24 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', |
@@ -23,7 +27,7 @@ export const formSchemas: FormSchema[] = [ | @@ -23,7 +27,7 @@ export const formSchemas: FormSchema[] = [ | ||
23 | { | 27 | { |
24 | field: DeleteRelationFieldsEnum.DIRECTION, | 28 | field: DeleteRelationFieldsEnum.DIRECTION, |
25 | component: 'Select', | 29 | component: 'Select', |
26 | - label: DeleteRelationFieldsNameEnum.DIRECTION, | 30 | + label: h('span', t(DeleteRelationFieldsNameEnum.DIRECTION)), |
27 | required: true, | 31 | required: true, |
28 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 32 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
29 | componentProps: { | 33 | componentProps: { |
@@ -38,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | @@ -38,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | ||
38 | { | 42 | { |
39 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, | 43 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, |
40 | component: 'Select', | 44 | component: 'Select', |
41 | - label: DeleteRelationFieldsNameEnum.ENTITY_TYPE, | 45 | + label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)), |
42 | required: true, | 46 | required: true, |
43 | colProps: { span: 12 }, | 47 | colProps: { span: 12 }, |
44 | componentProps: { | 48 | componentProps: { |
@@ -53,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | @@ -53,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | ||
53 | { | 57 | { |
54 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, | 58 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, |
55 | component: 'Input', | 59 | component: 'Input', |
56 | - label: DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN, | 60 | + label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)), |
57 | required: true, | 61 | required: true, |
58 | colProps: { span: 12 }, | 62 | colProps: { span: 12 }, |
59 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 63 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
@@ -67,7 +71,7 @@ export const formSchemas: FormSchema[] = [ | @@ -67,7 +71,7 @@ export const formSchemas: FormSchema[] = [ | ||
67 | { | 71 | { |
68 | field: DeleteRelationFieldsEnum.RELATION_TYPE, | 72 | field: DeleteRelationFieldsEnum.RELATION_TYPE, |
69 | component: 'Input', | 73 | component: 'Input', |
70 | - label: DeleteRelationFieldsNameEnum.RELATION_TYPE, | 74 | + label: h('span', t(DeleteRelationFieldsNameEnum.RELATION_TYPE)), |
71 | required: true, | 75 | required: true, |
72 | helpMessage: [ | 76 | helpMessage: [ |
73 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 77 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
@@ -79,7 +83,7 @@ export const formSchemas: FormSchema[] = [ | @@ -79,7 +83,7 @@ export const formSchemas: FormSchema[] = [ | ||
79 | { | 83 | { |
80 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 84 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
81 | component: 'InputNumber', | 85 | component: 'InputNumber', |
82 | - label: DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION, | 86 | + label: h('span', t(DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)), |
83 | required: true, | 87 | required: true, |
84 | helpMessage: [ | 88 | helpMessage: [ |
85 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', | 89 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELETE_RELATION); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELETE_RELATION); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface DeleteRelationDataType { | 11 | export interface DeleteRelationDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DEVICE_PROFILE); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.DEVICE_PROFILE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface DeviceProfileDataType { | 11 | export interface DeviceProfileDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
1 | +import { h } from 'vue'; | ||
1 | import { EntityTypeEnum, EntityTypeNameEnum } from '../../../enum/form'; | 2 | import { EntityTypeEnum, EntityTypeNameEnum } from '../../../enum/form'; |
2 | import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/formField/action'; | 3 | import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 4 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { getEntityIdSelect } from '../../Filter/CheckRelation/create.config'; | 5 | import { getEntityIdSelect } from '../../Filter/CheckRelation/create.config'; |
5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 11 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
8 | 12 | ||
@@ -10,7 +14,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +14,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 14 | { |
11 | field: GeneratorFieldsEnum.MSG_COUNT, | 15 | field: GeneratorFieldsEnum.MSG_COUNT, |
12 | component: 'InputNumber', | 16 | component: 'InputNumber', |
13 | - label: GeneratorFieldsNameEnum.MSG_COUNT, | 17 | + label: h('span', t(GeneratorFieldsNameEnum.MSG_COUNT)), |
14 | required: true, | 18 | required: true, |
15 | componentProps: { | 19 | componentProps: { |
16 | min: 0, | 20 | min: 0, |
@@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | { | 24 | { |
21 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, | 25 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, |
22 | component: 'InputNumber', | 26 | component: 'InputNumber', |
23 | - label: GeneratorFieldsNameEnum.PERIOD_IN_SECONDS, | 27 | + label: h('span', t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)), |
24 | required: true, | 28 | required: true, |
25 | componentProps: { | 29 | componentProps: { |
26 | min: 0, | 30 | min: 0, |
@@ -30,7 +34,7 @@ export const formSchemas: FormSchema[] = [ | @@ -30,7 +34,7 @@ export const formSchemas: FormSchema[] = [ | ||
30 | { | 34 | { |
31 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, | 35 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, |
32 | component: 'Select', | 36 | component: 'Select', |
33 | - label: GeneratorFieldsNameEnum.ORIGINATOR_TYPE, | 37 | + label: h('span', t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE)), |
34 | colProps: { span: 8 }, | 38 | colProps: { span: 8 }, |
35 | componentProps: { | 39 | componentProps: { |
36 | options: Object.keys(EntityTypeEnum).map((value) => ({ | 40 | options: Object.keys(EntityTypeEnum).map((value) => ({ |
@@ -54,7 +58,7 @@ export const formSchemas: FormSchema[] = [ | @@ -54,7 +58,7 @@ export const formSchemas: FormSchema[] = [ | ||
54 | { | 58 | { |
55 | field: GeneratorFieldsEnum.JS_SCRIPT, | 59 | field: GeneratorFieldsEnum.JS_SCRIPT, |
56 | component: 'JavascriptEditorWithTestModal', | 60 | component: 'JavascriptEditorWithTestModal', |
57 | - label: GeneratorFieldsNameEnum.JS_SCRIPT, | 61 | + label: h('span', t(GeneratorFieldsNameEnum.JS_SCRIPT)), |
58 | valueField: 'value', | 62 | valueField: 'value', |
59 | changeEvent: 'update:value', | 63 | changeEvent: 'update:value', |
60 | componentProps: { | 64 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.GENERATOR); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.GENERATOR); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface GeneratorDataType { | 11 | export interface GeneratorDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
1 | +import { h } from 'vue'; | ||
1 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; | 2 | import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; |
2 | import { | 3 | import { |
3 | GpsGeofencingEventsFieldsEnum, | 4 | GpsGeofencingEventsFieldsEnum, |
4 | GpsGeofencingEventsFieldsNameEnum, | 5 | GpsGeofencingEventsFieldsNameEnum, |
5 | } from '../../../enum/formField/action'; | 6 | } from '../../../enum/formField/action'; |
6 | import { FormSchema } from '/@/components/Form'; | 7 | import { FormSchema } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, | 14 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, |
11 | component: 'Input', | 15 | component: 'Input', |
12 | - label: GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME, | 16 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)), |
13 | required: true, | 17 | required: true, |
14 | componentProps: { | 18 | componentProps: { |
15 | placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME}`, | 19 | placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME}`, |
@@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | { | 22 | { |
19 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, | 23 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, |
20 | component: 'Input', | 24 | component: 'Input', |
21 | - label: GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME, | 25 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)), |
22 | required: true, | 26 | required: true, |
23 | componentProps: { | 27 | componentProps: { |
24 | placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME}`, | 28 | placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME}`, |
@@ -27,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | @@ -27,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | ||
27 | { | 31 | { |
28 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, | 32 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, |
29 | component: 'Select', | 33 | component: 'Select', |
30 | - label: GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE, | 34 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)), |
31 | required: true, | 35 | required: true, |
32 | componentProps: { | 36 | componentProps: { |
33 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), | 37 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), |
@@ -45,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | @@ -45,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | ||
45 | { | 49 | { |
46 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, | 50 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, |
47 | component: 'Input', | 51 | component: 'Input', |
48 | - label: GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME, | 52 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)), |
49 | required: true, | 53 | required: true, |
50 | ifShow: ({ model }) => | 54 | ifShow: ({ model }) => |
51 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && | 55 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && |
@@ -57,7 +61,7 @@ export const formSchemas: FormSchema[] = [ | @@ -57,7 +61,7 @@ export const formSchemas: FormSchema[] = [ | ||
57 | { | 61 | { |
58 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, | 62 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, |
59 | component: 'Input', | 63 | component: 'Input', |
60 | - label: GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION, | 64 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)), |
61 | helpMessage: | 65 | helpMessage: |
62 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', | 66 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', |
63 | required: true, | 67 | required: true, |
@@ -71,7 +75,7 @@ export const formSchemas: FormSchema[] = [ | @@ -71,7 +75,7 @@ export const formSchemas: FormSchema[] = [ | ||
71 | { | 75 | { |
72 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, | 76 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, |
73 | component: 'InputNumber', | 77 | component: 'InputNumber', |
74 | - label: GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE, | 78 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)), |
75 | colProps: { span: 12 }, | 79 | colProps: { span: 12 }, |
76 | required: true, | 80 | required: true, |
77 | ifShow: ({ model }) => | 81 | ifShow: ({ model }) => |
@@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | @@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | ||
84 | { | 88 | { |
85 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, | 89 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, |
86 | component: 'InputNumber', | 90 | component: 'InputNumber', |
87 | - label: GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE, | 91 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE)), |
88 | colProps: { span: 12 }, | 92 | colProps: { span: 12 }, |
89 | ifShow: ({ model }) => | 93 | ifShow: ({ model }) => |
90 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 94 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
@@ -96,7 +100,7 @@ export const formSchemas: FormSchema[] = [ | @@ -96,7 +100,7 @@ export const formSchemas: FormSchema[] = [ | ||
96 | { | 100 | { |
97 | field: GpsGeofencingEventsFieldsEnum.RANGE, | 101 | field: GpsGeofencingEventsFieldsEnum.RANGE, |
98 | component: 'InputNumber', | 102 | component: 'InputNumber', |
99 | - label: GpsGeofencingEventsFieldsNameEnum.RANGE, | 103 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.RANGE)), |
100 | colProps: { span: 12 }, | 104 | colProps: { span: 12 }, |
101 | required: true, | 105 | required: true, |
102 | ifShow: ({ model }) => | 106 | ifShow: ({ model }) => |
@@ -109,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | @@ -109,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | ||
109 | { | 113 | { |
110 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, | 114 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, |
111 | component: 'Select', | 115 | component: 'Select', |
112 | - label: GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT, | 116 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)), |
113 | colProps: { span: 12 }, | 117 | colProps: { span: 12 }, |
114 | required: true, | 118 | required: true, |
115 | ifShow: ({ model }) => | 119 | ifShow: ({ model }) => |
@@ -127,7 +131,7 @@ export const formSchemas: FormSchema[] = [ | @@ -127,7 +131,7 @@ export const formSchemas: FormSchema[] = [ | ||
127 | { | 131 | { |
128 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, | 132 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, |
129 | component: 'InputNumber', | 133 | component: 'InputNumber', |
130 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION, | 134 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)), |
131 | colProps: { span: 12 }, | 135 | colProps: { span: 12 }, |
132 | required: true, | 136 | required: true, |
133 | componentProps: { | 137 | componentProps: { |
@@ -139,7 +143,7 @@ export const formSchemas: FormSchema[] = [ | @@ -139,7 +143,7 @@ export const formSchemas: FormSchema[] = [ | ||
139 | { | 143 | { |
140 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, | 144 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, |
141 | component: 'Select', | 145 | component: 'Select', |
142 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT, | 146 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)), |
143 | colProps: { span: 12 }, | 147 | colProps: { span: 12 }, |
144 | required: true, | 148 | required: true, |
145 | componentProps: { | 149 | componentProps: { |
@@ -154,7 +158,7 @@ export const formSchemas: FormSchema[] = [ | @@ -154,7 +158,7 @@ export const formSchemas: FormSchema[] = [ | ||
154 | { | 158 | { |
155 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, | 159 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, |
156 | component: 'InputNumber', | 160 | component: 'InputNumber', |
157 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION, | 161 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)), |
158 | colProps: { span: 12 }, | 162 | colProps: { span: 12 }, |
159 | required: true, | 163 | required: true, |
160 | componentProps: { | 164 | componentProps: { |
@@ -166,7 +170,7 @@ export const formSchemas: FormSchema[] = [ | @@ -166,7 +170,7 @@ export const formSchemas: FormSchema[] = [ | ||
166 | { | 170 | { |
167 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, | 171 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, |
168 | component: 'Select', | 172 | component: 'Select', |
169 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, | 173 | + label: h('span', t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)), |
170 | colProps: { span: 12 }, | 174 | colProps: { span: 12 }, |
171 | required: true, | 175 | required: true, |
172 | componentProps: { | 176 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.GPS_GEOFENCING_EVENTS); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.GPS_GEOFENCING_EVENTS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface GpsGeofencingEventsDataType { | 10 | export interface GpsGeofencingEventsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | +const { t } = useI18n(); | ||
4 | 7 | ||
5 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 8 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
6 | 9 | ||
@@ -8,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -8,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
8 | { | 11 | { |
9 | field: LogFieldsEnum.JS_SCRIPT, | 12 | field: LogFieldsEnum.JS_SCRIPT, |
10 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
11 | - label: LogFieldsNameEnum.JS_SCRIPT, | 14 | + label: h('span', t(LogFieldsNameEnum.JS_SCRIPT)), |
12 | valueField: 'value', | 15 | valueField: 'value', |
13 | changeEvent: 'update:value', | 16 | changeEvent: 'update:value', |
14 | componentProps: { | 17 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.LOG); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.LOG); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface LogDataType { | 10 | export interface LogDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
3 | 7 | ||
4 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
5 | { | 9 | { |
6 | field: MessageCountFieldsEnum.INTERVAL, | 10 | field: MessageCountFieldsEnum.INTERVAL, |
7 | component: 'InputNumber', | 11 | component: 'InputNumber', |
8 | - label: MessageCountFieldsNameEnum.INTERVAL, | 12 | + label: h('span', t(MessageCountFieldsNameEnum.INTERVAL)), |
9 | required: true, | 13 | required: true, |
10 | componentProps: { | 14 | componentProps: { |
11 | step: 1, | 15 | step: 1, |
@@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | { | 20 | { |
17 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, | 21 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, |
18 | component: 'Input', | 22 | component: 'Input', |
19 | - label: MessageCountFieldsNameEnum.TELEMETRY_PREFIX, | 23 | + label: h('span', t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)), |
20 | required: true, | 24 | required: true, |
21 | componentProps: { | 25 | componentProps: { |
22 | placeholder: `请输入${MessageCountFieldsNameEnum.TELEMETRY_PREFIX}`, | 26 | placeholder: `请输入${MessageCountFieldsNameEnum.TELEMETRY_PREFIX}`, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.MESSAGE_COUNT); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.MESSAGE_COUNT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface MessageCountDataType { | 11 | export interface MessageCountDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
1 | +import { h } from 'vue'; | ||
1 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; | 2 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; |
2 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } from '../../../enum/formField/action'; | 3 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | export const formSchemas: FormSchema[] = [ | 9 | export const formSchemas: FormSchema[] = [ |
6 | { | 10 | { |
7 | field: PushToEdgeFieldsEnum.SCOPE, | 11 | field: PushToEdgeFieldsEnum.SCOPE, |
8 | component: 'Select', | 12 | component: 'Select', |
9 | - label: PushToEdgeFieldsNameEnum.SCOPE, | 13 | + label: h('span', t(PushToEdgeFieldsNameEnum.SCOPE)), |
10 | required: true, | 14 | required: true, |
11 | componentProps: { | 15 | componentProps: { |
12 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 16 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.PUSH_TO_EDGE); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.PUSH_TO_EDGE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface PushToEdgeDataType { | 10 | export interface PushToEdgeDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
3 | 7 | ||
4 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
5 | { | 9 | { |
6 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, | 10 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, |
7 | component: 'Input', | 11 | component: 'Input', |
8 | - label: RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE, | 12 | + label: h('span', t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE)), |
9 | componentProps: { | 13 | componentProps: { |
10 | placeholder: `请输入${RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE}`, | 14 | placeholder: `请输入${RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE}`, |
11 | }, | 15 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REPLY); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REPLY); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RpcCallReplyDataType { | 10 | export interface RpcCallReplyDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | RpcCallRequestFieldsEnum, | 3 | RpcCallRequestFieldsEnum, |
3 | RpcCallRequestFieldsNameEnum, | 4 | RpcCallRequestFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, | 13 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, |
10 | component: 'InputNumber', | 14 | component: 'InputNumber', |
11 | - label: RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS, | 15 | + label: h('span', t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS)), |
12 | required: true, | 16 | required: true, |
13 | componentProps: { | 17 | componentProps: { |
14 | min: 0, | 18 | min: 0, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REQUEST); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REQUEST); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RpcCallRequestDataType { | 10 | export interface RpcCallRequestDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; | 2 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; |
2 | import { | 3 | import { |
3 | SaveAttributesFieldsEnum, | 4 | SaveAttributesFieldsEnum, |
4 | SaveAttributesFieldsNameEnum, | 5 | SaveAttributesFieldsNameEnum, |
5 | } from '../../../enum/formField/action'; | 6 | } from '../../../enum/formField/action'; |
6 | import { FormSchema } from '/@/components/Form'; | 7 | import { FormSchema } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: SaveAttributesFieldsEnum.SCOPE, | 14 | field: SaveAttributesFieldsEnum.SCOPE, |
11 | component: 'Select', | 15 | component: 'Select', |
12 | - label: SaveAttributesFieldsNameEnum.SCOPE, | 16 | + label: h('span', t(SaveAttributesFieldsNameEnum.SCOPE)), |
13 | required: true, | 17 | required: true, |
14 | componentProps: { | 18 | componentProps: { |
15 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 19 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
@@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | { | 24 | { |
21 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, | 25 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, |
22 | component: 'Checkbox', | 26 | component: 'Checkbox', |
23 | - label: SaveAttributesFieldsNameEnum.NOTIFY_DEVICE, | 27 | + label: h('span', t(SaveAttributesFieldsNameEnum.NOTIFY_DEVICE)), |
24 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, | 28 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, |
25 | renderComponentContent: () => ({ | 29 | renderComponentContent: () => ({ |
26 | default: () => | 30 | default: () => |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SaveAttributesDataType { | 10 | export interface SaveAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { h } from 'vue'; | 1 | import { h } from 'vue'; |
2 | import { SaveEventFieldsEnum, SaveEventFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { SaveEventFieldsEnum, SaveEventFieldsNameEnum } from '../../../enum/formField/action'; |
3 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
4 | 7 | ||
5 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
6 | { | 9 | { |
@@ -17,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -17,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
17 | { | 20 | { |
18 | field: SaveEventFieldsEnum.CONFIGURATION, | 21 | field: SaveEventFieldsEnum.CONFIGURATION, |
19 | component: 'JSONEditor', | 22 | component: 'JSONEditor', |
20 | - label: SaveEventFieldsNameEnum.CONFIGURATION, | 23 | + label: h('span', t(SaveEventFieldsNameEnum.CONFIGURATION)), |
21 | valueField: 'value', | 24 | valueField: 'value', |
22 | changeEvent: 'update:value', | 25 | changeEvent: 'update:value', |
23 | }, | 26 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_EVENT); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_EVENT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SaveEventDataType { | 10 | export interface SaveEventDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | SaveTimeseriesFieldsEnum, | 3 | SaveTimeseriesFieldsEnum, |
3 | SaveTimeseriesFieldsNameEnum, | 4 | SaveTimeseriesFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, | 13 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, |
10 | component: 'InputNumber', | 14 | component: 'InputNumber', |
11 | - label: SaveTimeseriesFieldsNameEnum.DEFAULT_TTL, | 15 | + label: h('span', t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL)), |
12 | required: true, | 16 | required: true, |
13 | componentProps: { | 17 | componentProps: { |
14 | min: 0, | 18 | min: 0, |
@@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | { | 30 | { |
27 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, | 31 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, |
28 | component: 'Checkbox', | 32 | component: 'Checkbox', |
29 | - label: SaveTimeseriesFieldsNameEnum.USE_SERVER_TS, | 33 | + label: h('span', t(SaveTimeseriesFieldsNameEnum.USE_SERVER_TS)), |
30 | renderComponentContent: () => ({ | 34 | renderComponentContent: () => ({ |
31 | default: () => | 35 | default: () => |
32 | '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).', | 36 | 'Enable this setting to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TIMESERIES); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TIMESERIES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SaveTimeseriesDataType { | 10 | export interface SaveTimeseriesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | SaveToCustomTableFieldsEnum, | 3 | SaveToCustomTableFieldsEnum, |
3 | SaveToCustomTableFieldsNameEnum, | 4 | SaveToCustomTableFieldsNameEnum, |
@@ -5,13 +6,16 @@ import { | @@ -5,13 +6,16 @@ import { | ||
5 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; | 6 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; |
6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 7 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
7 | import { isObject } from '/@/utils/is'; | 8 | import { isObject } from '/@/utils/is'; |
9 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
10 | + | ||
11 | +const { t } = useI18n(); | ||
8 | 12 | ||
9 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 13 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
10 | export const formSchemas: FormSchema[] = [ | 14 | export const formSchemas: FormSchema[] = [ |
11 | { | 15 | { |
12 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, | 16 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, |
13 | component: 'Input', | 17 | component: 'Input', |
14 | - label: SaveToCustomTableFieldsNameEnum.TABLE_NAME, | 18 | + label: h('span', t(SaveToCustomTableFieldsNameEnum.TABLE_NAME)), |
15 | required: true, | 19 | required: true, |
16 | componentProps: { | 20 | componentProps: { |
17 | placeholder: `请输入${SaveToCustomTableFieldsEnum.TABLE_NAME}`, | 21 | placeholder: `请输入${SaveToCustomTableFieldsEnum.TABLE_NAME}`, |
@@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,7 +24,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | { | 24 | { |
21 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, | 25 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, |
22 | component: 'AttributeConfiguration', | 26 | component: 'AttributeConfiguration', |
23 | - label: SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING, | 27 | + label: h('span', t(SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING)), |
24 | required: true, | 28 | required: true, |
25 | valueField: 'value', | 29 | valueField: 'value', |
26 | changeEvent: 'update:value', | 30 | changeEvent: 'update:value', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TO_CUSTOM_TABLE); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TO_CUSTOM_TABLE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SaveToCustomTableDataType { | 10 | export interface SaveToCustomTableDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_END); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_END); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SynchronizationEndDataType { | 10 | export interface SynchronizationEndDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_START); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_START); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SynchronizationStartDataType { | 10 | export interface SynchronizationStartDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | UnassignFromCustomerFieldsEnum, | 3 | UnassignFromCustomerFieldsEnum, |
3 | UnassignFromCustomerFieldsNameEnum, | 4 | UnassignFromCustomerFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
5 | 6 | ||
6 | import { FormSchema } from '/@/components/Form'; | 7 | import { FormSchema } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 14 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
11 | - label: UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN, | 15 | + label: h('span', t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)), |
12 | component: 'Input', | 16 | component: 'Input', |
13 | required: true, | 17 | required: true, |
14 | helpMessage: [ | 18 | helpMessage: [ |
@@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 25 | { |
22 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 26 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
23 | component: 'InputNumber', | 27 | component: 'InputNumber', |
24 | - label: UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION, | 28 | + label: h('span', t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)), |
25 | required: true, | 29 | required: true, |
26 | helpMessage: [ | 30 | helpMessage: [ |
27 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 31 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.UNASSIGN_FROM_CUSTOMER); | 7 | const keys = useCreateNodeKey(ActionCategoryComponentEnum.UNASSIGN_FROM_CUSTOMER); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface UnassignFromCustomerDataType { | 10 | export interface UnassignFromCustomerDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -24,7 +24,7 @@ import { SaveAttributesConfig } from './SaveAttributes'; | @@ -24,7 +24,7 @@ import { SaveAttributesConfig } from './SaveAttributes'; | ||
24 | import { CreateRelationConfig } from './CreateRelation'; | 24 | import { CreateRelationConfig } from './CreateRelation'; |
25 | import { useI18n } from '/@/hooks/web/useI18n'; | 25 | import { useI18n } from '/@/hooks/web/useI18n'; |
26 | 26 | ||
27 | -const { t } = useI18n(); //加载国际化 | 27 | +const { t } = useI18n(); // 加载国际化 |
28 | export const ActionCategoryConfig: CategoryConfigType = { | 28 | export const ActionCategoryConfig: CategoryConfigType = { |
29 | category: RuleNodeTypeEnum.ACTION, | 29 | category: RuleNodeTypeEnum.ACTION, |
30 | title: t('designer_config.actions.index.title'), | 30 | title: t('designer_config.actions.index.title'), |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | CalculateDeltaFieldsEnum, | 3 | CalculateDeltaFieldsEnum, |
3 | CalculateDeltaFieldsNameEnum, | 4 | CalculateDeltaFieldsNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, | 13 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, |
10 | component: 'Input', | 14 | component: 'Input', |
11 | - label: CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY, | ||
12 | - required: true, | 15 | + label: h('span', t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)), |
13 | colProps: { span: 8 }, | 16 | colProps: { span: 8 }, |
17 | + rules: [ | ||
18 | + { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}` }, | ||
19 | + ], | ||
14 | componentProps: { | 20 | componentProps: { |
15 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY}`, | 21 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}`, |
16 | }, | 22 | }, |
17 | }, | 23 | }, |
18 | { | 24 | { |
19 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, | 25 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, |
20 | component: 'Input', | 26 | component: 'Input', |
21 | - label: CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY, | ||
22 | - required: true, | 27 | + label: h('span', t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)), |
23 | colProps: { span: 8 }, | 28 | colProps: { span: 8 }, |
29 | + rules: [ | ||
30 | + { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}` }, | ||
31 | + ], | ||
24 | componentProps: { | 32 | componentProps: { |
25 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY}`, | 33 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}`, |
26 | }, | 34 | }, |
27 | }, | 35 | }, |
28 | { | 36 | { |
29 | field: CalculateDeltaFieldsEnum.ROUND, | 37 | field: CalculateDeltaFieldsEnum.ROUND, |
30 | component: 'InputNumber', | 38 | component: 'InputNumber', |
31 | - label: CalculateDeltaFieldsNameEnum.ROUND, | 39 | + label: h('span', t(CalculateDeltaFieldsNameEnum.ROUND)), |
32 | colProps: { span: 8 }, | 40 | colProps: { span: 8 }, |
33 | componentProps: { | 41 | componentProps: { |
34 | step: 1, | 42 | step: 1, |
35 | max: 15, | 43 | max: 15, |
36 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.ROUND}`, | 44 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.ROUND)}`, |
37 | }, | 45 | }, |
38 | }, | 46 | }, |
39 | { | 47 | { |
@@ -42,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | @@ -42,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | ||
42 | label: '', | 50 | label: '', |
43 | renderComponentContent: () => { | 51 | renderComponentContent: () => { |
44 | return { | 52 | return { |
45 | - default: () => CalculateDeltaFieldsNameEnum.USE_CACHE, | 53 | + default: () => t(CalculateDeltaFieldsNameEnum.USE_CACHE), |
46 | }; | 54 | }; |
47 | }, | 55 | }, |
48 | }, | 56 | }, |
@@ -52,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | @@ -52,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | ||
52 | label: '', | 60 | label: '', |
53 | renderComponentContent: () => { | 61 | renderComponentContent: () => { |
54 | return { | 62 | return { |
55 | - default: () => CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE, | 63 | + default: () => t(CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE), |
56 | }; | 64 | }; |
57 | }, | 65 | }, |
58 | }, | 66 | }, |
@@ -62,18 +70,18 @@ export const formSchemas: FormSchema[] = [ | @@ -62,18 +70,18 @@ export const formSchemas: FormSchema[] = [ | ||
62 | label: '', | 70 | label: '', |
63 | renderComponentContent: () => { | 71 | renderComponentContent: () => { |
64 | return { | 72 | return { |
65 | - default: () => CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS, | 73 | + default: () => t(CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS), |
66 | }; | 74 | }; |
67 | }, | 75 | }, |
68 | }, | 76 | }, |
69 | { | 77 | { |
70 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, | 78 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, |
71 | component: 'Input', | 79 | component: 'Input', |
72 | - label: CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY, | 80 | + label: h('span', t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY)), |
73 | required: true, | 81 | required: true, |
74 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], | 82 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], |
75 | componentProps: { | 83 | componentProps: { |
76 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY}`, | 84 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY)}`, |
77 | }, | 85 | }, |
78 | }, | 86 | }, |
79 | ]; | 87 | ]; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CALCULATE_DELTA); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CALCULATE_DELTA); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CalculateDeltaDataType { | 10 | export interface CalculateDeltaDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | CustomerAttributesFieldsEnum, | 3 | CustomerAttributesFieldsEnum, |
3 | CustomerAttributesFieldsNameEnum, | 4 | CustomerAttributesFieldsNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 8 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
7 | 9 | ||
10 | +const { t } = useI18n(); | ||
11 | + | ||
8 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 12 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
9 | 13 | ||
10 | export const formSchemas: FormSchema[] = [ | 14 | export const formSchemas: FormSchema[] = [ |
@@ -14,14 +18,14 @@ export const formSchemas: FormSchema[] = [ | @@ -14,14 +18,14 @@ export const formSchemas: FormSchema[] = [ | ||
14 | label: '', | 18 | label: '', |
15 | renderComponentContent: () => { | 19 | renderComponentContent: () => { |
16 | return { | 20 | return { |
17 | - default: () => CustomerAttributesFieldsNameEnum.TELEMETRY, | 21 | + default: () => t(CustomerAttributesFieldsNameEnum.TELEMETRY), |
18 | }; | 22 | }; |
19 | }, | 23 | }, |
20 | }, | 24 | }, |
21 | { | 25 | { |
22 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, | 26 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, |
23 | component: 'AttributeConfiguration', | 27 | component: 'AttributeConfiguration', |
24 | - label: CustomerAttributesFieldsNameEnum.ATTR_MAPING, | 28 | + label: h('span', t(CustomerAttributesFieldsNameEnum.ATTR_MAPING)), |
25 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, | 29 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, |
26 | valueField: 'value', | 30 | valueField: 'value', |
27 | changeEvent: 'update:value', | 31 | changeEvent: 'update:value', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CustomerAttributesDataType { | 10 | export interface CustomerAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; | 2 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; |
2 | import { | 3 | import { |
3 | CustomerDetailsFieldsEnum, | 4 | CustomerDetailsFieldsEnum, |
4 | CustomerDetailsFieldsNameEnum, | 5 | CustomerDetailsFieldsNameEnum, |
5 | } from '../../../enum/formField/enrichment'; | 6 | } from '../../../enum/formField/enrichment'; |
6 | import { FormSchema } from '/@/components/Form'; | 7 | import { FormSchema } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, | 14 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, |
11 | component: 'Select', | 15 | component: 'Select', |
12 | - label: CustomerDetailsFieldsNameEnum.DETAILS_LIST, | ||
13 | - required: true, //ft修改为必传 | 16 | + label: h('span', t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)), |
17 | + rules: [{ required: true, message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}` }], | ||
14 | componentProps: { | 18 | componentProps: { |
15 | mode: 'multiple', | 19 | mode: 'multiple', |
16 | options: Object.keys(DetailsListEnum).map((item) => ({ | 20 | options: Object.keys(DetailsListEnum).map((item) => ({ |
@@ -18,6 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,6 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | value: item, | 22 | value: item, |
19 | })), | 23 | })), |
20 | getPopupContainer: () => document.body, | 24 | getPopupContainer: () => document.body, |
25 | + placeholder: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}`, | ||
21 | }, | 26 | }, |
22 | }, | 27 | }, |
23 | { | 28 | { |
@@ -26,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | label: '', | 31 | label: '', |
27 | renderComponentContent: () => { | 32 | renderComponentContent: () => { |
28 | return { | 33 | return { |
29 | - default: () => CustomerDetailsFieldsNameEnum.ADD_TO_METADATA, | 34 | + default: () => t(CustomerDetailsFieldsNameEnum.ADD_TO_METADATA), |
30 | }; | 35 | }; |
31 | }, | 36 | }, |
32 | }, | 37 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_DETAILS); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_DETAILS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CustomerDetailsDataType { | 10 | export interface CustomerDetailsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | OriginatorAttributesEnum, | 3 | OriginatorAttributesEnum, |
3 | OriginatorAttributesNameEnum, | 4 | OriginatorAttributesNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, | 13 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, |
10 | component: 'Checkbox', | 14 | component: 'Checkbox', |
11 | - label: OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT, | 15 | + label: h('span', t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT)), |
12 | renderComponentContent: () => ({ | 16 | renderComponentContent: () => ({ |
13 | default: () => | 17 | default: () => |
14 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', | 18 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', |
@@ -17,59 +21,59 @@ export const formSchemas: FormSchema[] = [ | @@ -17,59 +21,59 @@ export const formSchemas: FormSchema[] = [ | ||
17 | { | 21 | { |
18 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, | 22 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, |
19 | component: 'Select', | 23 | component: 'Select', |
20 | - label: OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES, | 24 | + label: h('span', t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)), |
21 | helpMessage: [ | 25 | helpMessage: [ |
22 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 26 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
23 | ], | 27 | ], |
24 | componentProps: { | 28 | componentProps: { |
25 | mode: 'tags', | 29 | mode: 'tags', |
26 | open: false, | 30 | open: false, |
27 | - placeholder: `请输入${OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES}`, | 31 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)}`, |
28 | }, | 32 | }, |
29 | }, | 33 | }, |
30 | { | 34 | { |
31 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, | 35 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, |
32 | component: 'Select', | 36 | component: 'Select', |
33 | - label: OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES, | 37 | + label: h('span', t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)), |
34 | helpMessage: [ | 38 | helpMessage: [ |
35 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 39 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
36 | ], | 40 | ], |
37 | componentProps: { | 41 | componentProps: { |
38 | mode: 'tags', | 42 | mode: 'tags', |
39 | open: false, | 43 | open: false, |
40 | - placeholder: `请输入${OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES}`, | 44 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)}`, |
41 | }, | 45 | }, |
42 | }, | 46 | }, |
43 | { | 47 | { |
44 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, | 48 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, |
45 | component: 'Select', | 49 | component: 'Select', |
46 | - label: OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES, | 50 | + label: h('span', t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)), |
47 | helpMessage: [ | 51 | helpMessage: [ |
48 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 52 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
49 | ], | 53 | ], |
50 | componentProps: { | 54 | componentProps: { |
51 | mode: 'tags', | 55 | mode: 'tags', |
52 | open: false, | 56 | open: false, |
53 | - placeholder: `请输入${OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES}`, | 57 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)}`, |
54 | }, | 58 | }, |
55 | }, | 59 | }, |
56 | { | 60 | { |
57 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, | 61 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, |
58 | component: 'Select', | 62 | component: 'Select', |
59 | - label: OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES, | 63 | + label: h('span', t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES)), |
60 | helpMessage: [ | 64 | helpMessage: [ |
61 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 65 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
62 | ], | 66 | ], |
63 | componentProps: { | 67 | componentProps: { |
64 | mode: 'tags', | 68 | mode: 'tags', |
65 | open: false, | 69 | open: false, |
66 | - placeholder: `请输入${OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES}`, | 70 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES)}`, |
67 | }, | 71 | }, |
68 | }, | 72 | }, |
69 | { | 73 | { |
70 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, | 74 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, |
71 | component: 'Checkbox', | 75 | component: 'Checkbox', |
72 | - label: OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS, | 76 | + label: h('span', t(OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS)), |
73 | renderComponentContent: () => ({ | 77 | renderComponentContent: () => ({ |
74 | default: () => | 78 | default: () => |
75 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', | 79 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OriginatorAttributesDataType { | 10 | export interface OriginatorAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; | 2 | import { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; |
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 4 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 9 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
6 | 10 | ||
@@ -8,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -8,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
8 | { | 12 | { |
9 | field: OriginatorFieldsEnum.FIELDS_MAPPING, | 13 | field: OriginatorFieldsEnum.FIELDS_MAPPING, |
10 | component: 'AttributeConfiguration', | 14 | component: 'AttributeConfiguration', |
11 | - label: OriginatorFieldsNameEnum.FIELDS_MAPPING, | 15 | + label: h('span', t(OriginatorFieldsNameEnum.FIELDS_MAPPING)), |
12 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, | 16 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, |
13 | valueField: 'value', | 17 | valueField: 'value', |
14 | changeEvent: 'update:value', | 18 | changeEvent: 'update:value', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_FIELDS); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_FIELDS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OriginatorFieldsDataType { | 10 | export interface OriginatorFieldsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | AggregationEnum, | 3 | AggregationEnum, |
3 | AggregationNameEnum, | 4 | AggregationNameEnum, |
@@ -11,72 +12,79 @@ import { | @@ -11,72 +12,79 @@ import { | ||
11 | OriginatorTelemetryFieldsNameEnum, | 12 | OriginatorTelemetryFieldsNameEnum, |
12 | } from '../../../enum/formField/enrichment'; | 13 | } from '../../../enum/formField/enrichment'; |
13 | import { FormSchema } from '/@/components/Form'; | 14 | import { FormSchema } from '/@/components/Form'; |
15 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
16 | + | ||
17 | +const { t } = useI18n(); | ||
14 | 18 | ||
15 | export const formSchemas: FormSchema[] = [ | 19 | export const formSchemas: FormSchema[] = [ |
16 | { | 20 | { |
17 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, | 21 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, |
18 | component: 'Select', | 22 | component: 'Select', |
19 | - label: OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES, | 23 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES)), |
20 | componentProps: { | 24 | componentProps: { |
21 | mode: 'tags', | 25 | mode: 'tags', |
22 | open: false, | 26 | open: false, |
23 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES}`, | 27 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES)}`, |
24 | getPopupContainer: () => document.body, | 28 | getPopupContainer: () => document.body, |
25 | }, | 29 | }, |
26 | }, | 30 | }, |
27 | { | 31 | { |
28 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, | 32 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, |
29 | component: 'Select', | 33 | component: 'Select', |
30 | - label: OriginatorTelemetryFieldsNameEnum.FETCH_MODE, | ||
31 | - required: true, | 34 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)), |
35 | + rules: [ | ||
36 | + { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}` }, | ||
37 | + ], | ||
32 | componentProps: { | 38 | componentProps: { |
33 | options: Object.keys(FetchModeEnum).map((value) => ({ label: value, value })), | 39 | options: Object.keys(FetchModeEnum).map((value) => ({ label: value, value })), |
34 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}`, | 40 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}`, |
35 | getPopupContainer: () => document.body, | 41 | getPopupContainer: () => document.body, |
36 | }, | 42 | }, |
37 | }, | 43 | }, |
38 | { | 44 | { |
39 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, | 45 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, |
40 | component: 'Select', | 46 | component: 'Select', |
41 | - label: OriginatorTelemetryFieldsNameEnum.AGGREGATION, | ||
42 | - required: true, | 47 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)), |
43 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 48 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
49 | + rules: [ | ||
50 | + { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}` }, | ||
51 | + ], | ||
44 | componentProps: { | 52 | componentProps: { |
45 | options: Object.keys(AggregationEnum).map((value) => ({ | 53 | options: Object.keys(AggregationEnum).map((value) => ({ |
46 | label: AggregationNameEnum[value], | 54 | label: AggregationNameEnum[value], |
47 | value, | 55 | value, |
48 | })), | 56 | })), |
49 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.AGGREGATION}`, | 57 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}`, |
50 | getPopupContainer: () => document.body, | 58 | getPopupContainer: () => document.body, |
51 | }, | 59 | }, |
52 | }, | 60 | }, |
53 | { | 61 | { |
54 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, | 62 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, |
55 | component: 'Select', | 63 | component: 'Select', |
56 | - label: OriginatorTelemetryFieldsNameEnum.ORDER_BY, | ||
57 | - required: true, | 64 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.ORDER_BY)), |
58 | helpMessage: ['Select to choose telemetry sampling order.'], | 65 | helpMessage: ['Select to choose telemetry sampling order.'], |
59 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 66 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
67 | + rules: [{ required: true, message: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}` }], | ||
60 | componentProps: { | 68 | componentProps: { |
61 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), | 69 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), |
62 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}`, | 70 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}`, |
63 | getPopupContainer: () => document.body, | 71 | getPopupContainer: () => document.body, |
64 | }, | 72 | }, |
65 | }, | 73 | }, |
66 | { | 74 | { |
67 | field: OriginatorTelemetryFieldsEnum.LIMIT, | 75 | field: OriginatorTelemetryFieldsEnum.LIMIT, |
68 | component: 'InputNumber', | 76 | component: 'InputNumber', |
69 | - label: OriginatorTelemetryFieldsNameEnum.LIMIT, | ||
70 | - required: true, | 77 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.LIMIT)), |
71 | helpMessage: [ | 78 | helpMessage: [ |
72 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", | 79 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", |
73 | ], | 80 | ], |
74 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 81 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
82 | + rules: [{ required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.LIMIT)}` }], | ||
75 | componentProps: { | 83 | componentProps: { |
76 | min: 2, | 84 | min: 2, |
77 | max: 1000, | 85 | max: 1000, |
78 | step: 1, | 86 | step: 1, |
79 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.LIMIT}`, | 87 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.LIMIT)}`, |
80 | }, | 88 | }, |
81 | }, | 89 | }, |
82 | { | 90 | { |
@@ -84,91 +92,115 @@ export const formSchemas: FormSchema[] = [ | @@ -84,91 +92,115 @@ export const formSchemas: FormSchema[] = [ | ||
84 | component: 'Checkbox', | 92 | component: 'Checkbox', |
85 | label: '', | 93 | label: '', |
86 | renderComponentContent: () => ({ | 94 | renderComponentContent: () => ({ |
87 | - default: () => OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS, | 95 | + default: () => t(OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS), |
88 | }), | 96 | }), |
89 | }, | 97 | }, |
90 | { | 98 | { |
91 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, | 99 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, |
92 | component: 'InputNumber', | 100 | component: 'InputNumber', |
93 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL, | 101 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)), |
94 | colProps: { span: 12 }, | 102 | colProps: { span: 12 }, |
95 | - required: true, | ||
96 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 103 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
104 | + rules: [ | ||
105 | + { required: true, message: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL}` }, | ||
106 | + ], | ||
97 | componentProps: { | 107 | componentProps: { |
98 | step: 1, | 108 | step: 1, |
99 | min: 0, | 109 | min: 0, |
100 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL}`, | 110 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)}`, |
101 | }, | 111 | }, |
102 | }, | 112 | }, |
103 | { | 113 | { |
104 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, | 114 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, |
105 | component: 'Select', | 115 | component: 'Select', |
106 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT, | 116 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)), |
107 | colProps: { span: 12 }, | 117 | colProps: { span: 12 }, |
108 | - required: true, | ||
109 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 118 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
119 | + rules: [ | ||
120 | + { | ||
121 | + required: true, | ||
122 | + message: `请选择${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT}`, | ||
123 | + }, | ||
124 | + ], | ||
110 | componentProps: { | 125 | componentProps: { |
111 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | 126 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ |
112 | label: TimeIntervalUnitNameEnum[value], | 127 | label: TimeIntervalUnitNameEnum[value], |
113 | value, | 128 | value, |
114 | })), | 129 | })), |
115 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT}`, | 130 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)}`, |
116 | getPopupContainer: () => document.body, | 131 | getPopupContainer: () => document.body, |
117 | }, | 132 | }, |
118 | }, | 133 | }, |
119 | { | 134 | { |
120 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, | 135 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, |
121 | component: 'InputNumber', | 136 | component: 'InputNumber', |
122 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL, | 137 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)), |
123 | colProps: { span: 12 }, | 138 | colProps: { span: 12 }, |
124 | - required: true, | ||
125 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 139 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
140 | + rules: [ | ||
141 | + { required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)}` }, | ||
142 | + ], | ||
126 | componentProps: { | 143 | componentProps: { |
127 | step: 1, | 144 | step: 1, |
128 | min: 0, | 145 | min: 0, |
129 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.END_INTERVAL}`, | 146 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)}`, |
130 | }, | 147 | }, |
131 | }, | 148 | }, |
132 | { | 149 | { |
133 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, | 150 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, |
134 | component: 'Select', | 151 | component: 'Select', |
135 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT, | 152 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)), |
136 | colProps: { span: 12 }, | 153 | colProps: { span: 12 }, |
137 | - required: true, | ||
138 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 154 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
155 | + rules: [ | ||
156 | + { | ||
157 | + required: true, | ||
158 | + message: `请选择${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)}`, | ||
159 | + }, | ||
160 | + ], | ||
139 | componentProps: { | 161 | componentProps: { |
140 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | 162 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ |
141 | label: TimeIntervalUnitNameEnum[value], | 163 | label: TimeIntervalUnitNameEnum[value], |
142 | value, | 164 | value, |
143 | })), | 165 | })), |
144 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT}`, | 166 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)}`, |
145 | getPopupContainer: () => document.body, | 167 | getPopupContainer: () => document.body, |
146 | }, | 168 | }, |
147 | }, | 169 | }, |
148 | { | 170 | { |
149 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, | 171 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, |
150 | component: 'Input', | 172 | component: 'Input', |
151 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN, | ||
152 | - required: true, | 173 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)), |
153 | helpMessage: [ | 174 | helpMessage: [ |
154 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 175 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
155 | ], | 176 | ], |
156 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 177 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
178 | + rules: [ | ||
179 | + { | ||
180 | + required: true, | ||
181 | + message: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)}`, | ||
182 | + }, | ||
183 | + ], | ||
157 | componentProps: { | 184 | componentProps: { |
158 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN}`, | 185 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)}`, |
159 | }, | 186 | }, |
160 | }, | 187 | }, |
161 | { | 188 | { |
162 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, | 189 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, |
163 | component: 'Input', | 190 | component: 'Input', |
164 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN, | ||
165 | - required: true, | 191 | + label: h('span', t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)), |
166 | helpMessage: [ | 192 | helpMessage: [ |
167 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 193 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
168 | ], | 194 | ], |
195 | + rules: [ | ||
196 | + { | ||
197 | + required: true, | ||
198 | + message: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)}`, | ||
199 | + }, | ||
200 | + ], | ||
169 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 201 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
170 | componentProps: { | 202 | componentProps: { |
171 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN}`, | 203 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)}`, |
172 | }, | 204 | }, |
173 | }, | 205 | }, |
174 | ]; | 206 | ]; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_TELEMETRY); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_TELEMETRY); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OriginatorTelemetryDataType { | 10 | export interface OriginatorTelemetryDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -5,6 +5,9 @@ import { | @@ -5,6 +5,9 @@ import { | ||
5 | RelatedAttributesFieldsEnum, | 5 | RelatedAttributesFieldsEnum, |
6 | RelatedAttributesFieldsNameEnum, | 6 | RelatedAttributesFieldsNameEnum, |
7 | } from '../../../enum/formField/enrichment'; | 7 | } from '../../../enum/formField/enrichment'; |
8 | +import { h } from 'vue'; | ||
9 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
10 | +const { t } = useI18n(); | ||
8 | 11 | ||
9 | useComponentRegister('RelationsQuery', RelationsQuery); | 12 | useComponentRegister('RelationsQuery', RelationsQuery); |
10 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 13 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
@@ -13,7 +16,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +16,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | { | 16 | { |
14 | field: RelatedAttributesFieldsEnum.RELATIONS_QUERY, | 17 | field: RelatedAttributesFieldsEnum.RELATIONS_QUERY, |
15 | component: 'RelationsQuery', | 18 | component: 'RelationsQuery', |
16 | - label: RelatedAttributesFieldsNameEnum.RELATIONS_QUERY, | 19 | + label: h('span', t(RelatedAttributesFieldsNameEnum.RELATIONS_QUERY)), |
17 | changeEvent: 'update:value', | 20 | changeEvent: 'update:value', |
18 | valueField: 'value', | 21 | valueField: 'value', |
19 | slot: RelatedAttributesFieldsEnum.RELATIONS_QUERY, | 22 | slot: RelatedAttributesFieldsEnum.RELATIONS_QUERY, |
@@ -23,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | @@ -23,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | ||
23 | component: 'Checkbox', | 26 | component: 'Checkbox', |
24 | label: '', | 27 | label: '', |
25 | renderComponentContent: () => ({ | 28 | renderComponentContent: () => ({ |
26 | - default: () => RelatedAttributesFieldsNameEnum.TELEMETRY, | 29 | + default: () => t(RelatedAttributesFieldsNameEnum.TELEMETRY), |
27 | }), | 30 | }), |
28 | }, | 31 | }, |
29 | { | 32 | { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RelatedAttributesDataType { | 10 | export interface RelatedAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | DirectionEnum, | 3 | DirectionEnum, |
3 | DirectionNameEnum, | 4 | DirectionNameEnum, |
@@ -11,6 +12,9 @@ import { | @@ -11,6 +12,9 @@ import { | ||
11 | 12 | ||
12 | import { getDeviceTypes } from '/@/api/ruleChainDesigner'; | 13 | import { getDeviceTypes } from '/@/api/ruleChainDesigner'; |
13 | import { FormSchema } from '/@/components/Form'; | 14 | import { FormSchema } from '/@/components/Form'; |
15 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
16 | + | ||
17 | +const { t } = useI18n(); | ||
14 | 18 | ||
15 | export interface ValueType { | 19 | export interface ValueType { |
16 | deviceRelationsQuery: DeviceRelationsQuery; | 20 | deviceRelationsQuery: DeviceRelationsQuery; |
@@ -36,58 +40,63 @@ export const formSchemas: FormSchema[] = [ | @@ -36,58 +40,63 @@ export const formSchemas: FormSchema[] = [ | ||
36 | component: 'Checkbox', | 40 | component: 'Checkbox', |
37 | label: '', | 41 | label: '', |
38 | renderComponentContent: () => ({ | 42 | renderComponentContent: () => ({ |
39 | - default: () => RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY, | 43 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY), |
40 | }), | 44 | }), |
41 | }, | 45 | }, |
42 | { | 46 | { |
43 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, | 47 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, |
44 | component: 'Select', | 48 | component: 'Select', |
45 | - label: RelatedDeviceAttributeFieldsNameEnum.DIRECTION, | ||
46 | - required: true, | 49 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION)), |
47 | colProps: { span: 12 }, | 50 | colProps: { span: 12 }, |
51 | + rules: [ | ||
52 | + { | ||
53 | + required: true, | ||
54 | + message: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY)}`, | ||
55 | + }, | ||
56 | + ], | ||
48 | componentProps: { | 57 | componentProps: { |
49 | options: Object.keys(DirectionEnum).map((value) => ({ | 58 | options: Object.keys(DirectionEnum).map((value) => ({ |
50 | label: DirectionNameEnum[value], | 59 | label: DirectionNameEnum[value], |
51 | value, | 60 | value, |
52 | })), | 61 | })), |
53 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.DIRECTION}`, | 62 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION)}`, |
54 | getPopupContainer: () => document.body, | 63 | getPopupContainer: () => document.body, |
55 | }, | 64 | }, |
56 | }, | 65 | }, |
57 | { | 66 | { |
58 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, | 67 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, |
59 | component: 'InputNumber', | 68 | component: 'InputNumber', |
60 | - label: RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL, | 69 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL)), |
61 | colProps: { span: 12 }, | 70 | colProps: { span: 12 }, |
62 | componentProps: { | 71 | componentProps: { |
63 | min: 1, | 72 | min: 1, |
64 | - placeholder: `请输入${RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL}`, | 73 | + placeholder: `请输入${t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL)}`, |
65 | }, | 74 | }, |
66 | }, | 75 | }, |
67 | { | 76 | { |
68 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, | 77 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, |
69 | component: 'Select', | 78 | component: 'Select', |
70 | - label: RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE, | 79 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE)), |
71 | componentProps: { | 80 | componentProps: { |
72 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 81 | options: Object.keys(RelationTypeEnum).map((value) => ({ |
73 | label: RelationTypeNameEnum[value], | 82 | label: RelationTypeNameEnum[value], |
74 | value, | 83 | value, |
75 | })), | 84 | })), |
76 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE}`, | 85 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE)}`, |
77 | getPopupContainer: () => document.body, | 86 | getPopupContainer: () => document.body, |
78 | }, | 87 | }, |
79 | }, | 88 | }, |
80 | { | 89 | { |
81 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, | 90 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, |
82 | component: 'ApiSelect', | 91 | component: 'ApiSelect', |
83 | - label: RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES, | 92 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES)), |
84 | componentProps: { | 93 | componentProps: { |
85 | mode: 'multiple', | 94 | mode: 'multiple', |
86 | api: getDeviceTypes, | 95 | api: getDeviceTypes, |
87 | labelField: 'type', | 96 | labelField: 'type', |
88 | valueField: 'type', | 97 | valueField: 'type', |
89 | getPopupContainer: () => document.body, | 98 | getPopupContainer: () => document.body, |
90 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES}`, | 99 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES)}`, |
91 | }, | 100 | }, |
92 | }, | 101 | }, |
93 | { | 102 | { |
@@ -95,47 +104,47 @@ export const formSchemas: FormSchema[] = [ | @@ -95,47 +104,47 @@ export const formSchemas: FormSchema[] = [ | ||
95 | component: 'Checkbox', | 104 | component: 'Checkbox', |
96 | label: '', | 105 | label: '', |
97 | renderComponentContent: () => ({ | 106 | renderComponentContent: () => ({ |
98 | - default: () => RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT, | 107 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT), |
99 | }), | 108 | }), |
100 | }, | 109 | }, |
101 | { | 110 | { |
102 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, | 111 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, |
103 | component: 'Select', | 112 | component: 'Select', |
104 | - label: RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES, | 113 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES)), |
105 | componentProps: { | 114 | componentProps: { |
106 | open: false, | 115 | open: false, |
107 | mode: 'tags', | 116 | mode: 'tags', |
108 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES, | 117 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES), |
109 | }, | 118 | }, |
110 | }, | 119 | }, |
111 | { | 120 | { |
112 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, | 121 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, |
113 | component: 'Select', | 122 | component: 'Select', |
114 | - label: RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES, | 123 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES)), |
115 | componentProps: { | 124 | componentProps: { |
116 | open: false, | 125 | open: false, |
117 | mode: 'tags', | 126 | mode: 'tags', |
118 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES, | 127 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES), |
119 | }, | 128 | }, |
120 | }, | 129 | }, |
121 | { | 130 | { |
122 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, | 131 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, |
123 | component: 'Select', | 132 | component: 'Select', |
124 | - label: RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES, | 133 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES)), |
125 | componentProps: { | 134 | componentProps: { |
126 | open: false, | 135 | open: false, |
127 | mode: 'tags', | 136 | mode: 'tags', |
128 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES, | 137 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES), |
129 | }, | 138 | }, |
130 | }, | 139 | }, |
131 | { | 140 | { |
132 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, | 141 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, |
133 | component: 'Select', | 142 | component: 'Select', |
134 | - label: RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES, | 143 | + label: h('span', t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES)), |
135 | componentProps: { | 144 | componentProps: { |
136 | open: false, | 145 | open: false, |
137 | mode: 'tags', | 146 | mode: 'tags', |
138 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES, | 147 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES), |
139 | }, | 148 | }, |
140 | }, | 149 | }, |
141 | { | 150 | { |
@@ -143,7 +152,7 @@ export const formSchemas: FormSchema[] = [ | @@ -143,7 +152,7 @@ export const formSchemas: FormSchema[] = [ | ||
143 | component: 'Checkbox', | 152 | component: 'Checkbox', |
144 | label: '', | 153 | label: '', |
145 | renderComponentContent: () => ({ | 154 | renderComponentContent: () => ({ |
146 | - default: () => RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS, | 155 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS), |
147 | }), | 156 | }), |
148 | }, | 157 | }, |
149 | ]; | 158 | ]; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_DEVICE_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_DEVICE_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RelatedDeviceAttributesDataType { | 10 | export interface RelatedDeviceAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | TenantAttributesFieldsEnum, | 3 | TenantAttributesFieldsEnum, |
3 | TenantAttributesFieldsNameEnum, | 4 | TenantAttributesFieldsNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
6 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 7 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 12 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
9 | 13 | ||
@@ -14,14 +18,14 @@ export const formSchemas: FormSchema[] = [ | @@ -14,14 +18,14 @@ export const formSchemas: FormSchema[] = [ | ||
14 | label: '', | 18 | label: '', |
15 | renderComponentContent: () => { | 19 | renderComponentContent: () => { |
16 | return { | 20 | return { |
17 | - default: () => TenantAttributesFieldsNameEnum.TELEMETRY, | 21 | + default: () => t(TenantAttributesFieldsNameEnum.TELEMETRY), |
18 | }; | 22 | }; |
19 | }, | 23 | }, |
20 | }, | 24 | }, |
21 | { | 25 | { |
22 | field: TenantAttributesFieldsEnum.ATTR_MAPING, | 26 | field: TenantAttributesFieldsEnum.ATTR_MAPING, |
23 | component: 'AttributeConfiguration', | 27 | component: 'AttributeConfiguration', |
24 | - label: TenantAttributesFieldsNameEnum.ATTR_MAPING, | 28 | + label: h('span', t(TenantAttributesFieldsNameEnum.ATTR_MAPING)), |
25 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, | 29 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, |
26 | valueField: 'value', | 30 | valueField: 'value', |
27 | changeEvent: 'update:value', | 31 | changeEvent: 'update:value', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_ATTRIBUTES); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_ATTRIBUTES); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface TenantAttributesDataType { | 10 | export interface TenantAttributesDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; | 2 | import { DetailsListEnum, DetailsListNameEnum } from '../../../enum/form'; |
2 | import { | 3 | import { |
3 | TenantDetailsFieldsEnum, | 4 | TenantDetailsFieldsEnum, |
4 | TenantDetailsFieldsNameEnum, | 5 | TenantDetailsFieldsNameEnum, |
5 | } from '../../../enum/formField/enrichment'; | 6 | } from '../../../enum/formField/enrichment'; |
6 | import { FormSchema } from '/@/components/Form'; | 7 | import { FormSchema } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: TenantDetailsFieldsEnum.DETAILS_LIST, | 14 | field: TenantDetailsFieldsEnum.DETAILS_LIST, |
11 | component: 'Select', | 15 | component: 'Select', |
12 | - label: TenantDetailsFieldsNameEnum.DETAILS_LIST, | ||
13 | - required: true, | 16 | + label: h('span', t(TenantDetailsFieldsNameEnum.DETAILS_LIST)), |
17 | + rules: [{ required: true, message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}` }], | ||
14 | componentProps: { | 18 | componentProps: { |
15 | mode: 'multiple', | 19 | mode: 'multiple', |
16 | options: Object.keys(DetailsListEnum).map((value) => ({ | 20 | options: Object.keys(DetailsListEnum).map((value) => ({ |
@@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | value, | 22 | value, |
19 | })), | 23 | })), |
20 | getPopupContainer: () => document.body, | 24 | getPopupContainer: () => document.body, |
21 | - placeholder: `请选择${TenantDetailsFieldsNameEnum.DETAILS_LIST}`, | 25 | + placeholder: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}`, |
22 | }, | 26 | }, |
23 | }, | 27 | }, |
24 | { | 28 | { |
@@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | component: 'Checkbox', | 30 | component: 'Checkbox', |
27 | label: '', | 31 | label: '', |
28 | renderComponentContent: () => ({ | 32 | renderComponentContent: () => ({ |
29 | - default: () => TenantDetailsFieldsNameEnum.DETAILS_LIST, | 33 | + default: () => t(TenantDetailsFieldsNameEnum.ADD_TO_METADATA), |
30 | }), | 34 | }), |
31 | }, | 35 | }, |
32 | ]; | 36 | ]; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS); | 7 | const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface TenantDetailsDataType { | 11 | export interface TenantDetailsDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
@@ -12,7 +12,7 @@ import { OriginatorAttributesConfig } from './OriginatorAttributes'; | @@ -12,7 +12,7 @@ import { OriginatorAttributesConfig } from './OriginatorAttributes'; | ||
12 | import { CustomerDetailsConfig } from './CustomerDetails'; | 12 | import { CustomerDetailsConfig } from './CustomerDetails'; |
13 | import { useI18n } from '/@/hooks/web/useI18n'; | 13 | import { useI18n } from '/@/hooks/web/useI18n'; |
14 | 14 | ||
15 | -const { t } = useI18n(); //加载国际化 | 15 | +const { t } = useI18n(); // 加载国际化 |
16 | export const EnrichmentCategoryConfig: CategoryConfigType = { | 16 | export const EnrichmentCategoryConfig: CategoryConfigType = { |
17 | category: RuleNodeTypeEnum.ENRICHMENT, | 17 | category: RuleNodeTypeEnum.ENRICHMENT, |
18 | title: t('designer_config.enrichments.index.title'), | 18 | title: t('designer_config.enrichments.index.title'), |
1 | +import { h } from 'vue'; | ||
1 | import { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
3 | 7 | ||
4 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
5 | { | 9 | { |
6 | field: AlarmNoticeFieldsEnum.CONFIGURATION, | 10 | field: AlarmNoticeFieldsEnum.CONFIGURATION, |
7 | component: 'JSONEditor', | 11 | component: 'JSONEditor', |
8 | - label: AlarmNoticeFieldsNameEnum.CONFIGURATION, | 12 | + label: h('span', t(AlarmNoticeFieldsNameEnum.CONFIGURATION)), |
9 | valueField: 'value', | 13 | valueField: 'value', |
10 | changeEvent: 'update:value', | 14 | changeEvent: 'update:value', |
11 | }, | 15 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AlarmNoticeDataType { | 10 | export interface AlarmNoticeDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 3 | import { FormSchema } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
3 | 7 | ||
4 | export const formSchemas: FormSchema[] = [ | 8 | export const formSchemas: FormSchema[] = [ |
5 | { | 9 | { |
6 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, | 10 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, |
7 | - label: AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN, | 11 | + label: h('span', t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN)), |
8 | component: 'Input', | 12 | component: 'Input', |
9 | required: true, | 13 | required: true, |
10 | componentProps: { | 14 | componentProps: { |
@@ -13,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | }, | 17 | }, |
14 | { | 18 | { |
15 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, | 19 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, |
16 | - label: AwsSnsFieldsNameEnum.ACCESS_KEY_ID, | 20 | + label: h('span', t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID)), |
17 | component: 'Input', | 21 | component: 'Input', |
18 | required: true, | 22 | required: true, |
19 | componentProps: { | 23 | componentProps: { |
@@ -22,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | @@ -22,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | ||
22 | }, | 26 | }, |
23 | { | 27 | { |
24 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, | 28 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, |
25 | - label: AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY, | 29 | + label: h('span', t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY)), |
26 | component: 'Input', | 30 | component: 'Input', |
27 | required: true, | 31 | required: true, |
28 | componentProps: { | 32 | componentProps: { |
@@ -31,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | @@ -31,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | ||
31 | }, | 35 | }, |
32 | { | 36 | { |
33 | field: AwsSnsFieldsEnum.REGION, | 37 | field: AwsSnsFieldsEnum.REGION, |
34 | - label: AwsSnsFieldsNameEnum.REGION, | 38 | + label: h('span', t(AwsSnsFieldsNameEnum.REGION)), |
35 | component: 'Input', | 39 | component: 'Input', |
36 | required: true, | 40 | required: true, |
37 | componentProps: { | 41 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SNS); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SNS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AwsSnsDataType { | 10 | export interface AwsSnsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; | 2 | import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; |
2 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; | 3 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; | 4 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
5 | 9 | ||
6 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 10 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: AwsSqsFieldsEnum.QUEUE_TYPE, | 14 | field: AwsSqsFieldsEnum.QUEUE_TYPE, |
11 | - label: AwsSqsFieldsNameEnum.QUEUE_TYPE, | 15 | + label: h('span', t(AwsSqsFieldsNameEnum.QUEUE_TYPE)), |
12 | component: 'Select', | 16 | component: 'Select', |
13 | required: true, | 17 | required: true, |
14 | componentProps: { | 18 | componentProps: { |
@@ -22,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | @@ -22,7 +26,7 @@ export const formSchemas: FormSchema[] = [ | ||
22 | }, | 26 | }, |
23 | { | 27 | { |
24 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, | 28 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, |
25 | - label: AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN, | 29 | + label: h('span', t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN)), |
26 | component: 'Input', | 30 | component: 'Input', |
27 | required: true, | 31 | required: true, |
28 | componentProps: { | 32 | componentProps: { |
@@ -31,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | @@ -31,7 +35,7 @@ export const formSchemas: FormSchema[] = [ | ||
31 | }, | 35 | }, |
32 | { | 36 | { |
33 | field: AwsSqsFieldsEnum.DELAY_SECONDS, | 37 | field: AwsSqsFieldsEnum.DELAY_SECONDS, |
34 | - label: AwsSqsFieldsNameEnum.DELAY_SECONDS, | 38 | + label: h('span', t(AwsSqsFieldsNameEnum.DELAY_SECONDS)), |
35 | component: 'Input', | 39 | component: 'Input', |
36 | required: true, | 40 | required: true, |
37 | helpMessage: [ | 41 | helpMessage: [ |
@@ -44,7 +48,7 @@ export const formSchemas: FormSchema[] = [ | @@ -44,7 +48,7 @@ export const formSchemas: FormSchema[] = [ | ||
44 | }, | 48 | }, |
45 | { | 49 | { |
46 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, | 50 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, |
47 | - label: AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES, | 51 | + label: h('span', t(AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES)), |
48 | component: 'AttributeConfiguration', | 52 | component: 'AttributeConfiguration', |
49 | helpMessage: | 53 | helpMessage: |
50 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', | 54 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', |
@@ -52,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | @@ -52,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | ||
52 | }, | 56 | }, |
53 | { | 57 | { |
54 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, | 58 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, |
55 | - label: AwsSqsFieldsNameEnum.ACCESS_KEY_ID, | 59 | + label: h('span', t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID)), |
56 | component: 'Input', | 60 | component: 'Input', |
57 | required: true, | 61 | required: true, |
58 | componentProps: { | 62 | componentProps: { |
@@ -61,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | @@ -61,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | ||
61 | }, | 65 | }, |
62 | { | 66 | { |
63 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, | 67 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, |
64 | - label: AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY, | 68 | + label: h('span', t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY)), |
65 | component: 'Input', | 69 | component: 'Input', |
66 | required: true, | 70 | required: true, |
67 | componentProps: { | 71 | componentProps: { |
@@ -70,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | @@ -70,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | ||
70 | }, | 74 | }, |
71 | { | 75 | { |
72 | field: AwsSqsFieldsEnum.REGION, | 76 | field: AwsSqsFieldsEnum.REGION, |
73 | - label: AwsSqsFieldsNameEnum.REGION, | 77 | + label: h('span', t(AwsSqsFieldsNameEnum.REGION)), |
74 | component: 'Input', | 78 | component: 'Input', |
75 | required: true, | 79 | required: true, |
76 | componentProps: { | 80 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SQS); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SQS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AwsSqsDataType { | 10 | export interface AwsSqsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import { CredentialsCard } from './CredentialsCard'; | 3 | import { CredentialsCard } from './CredentialsCard'; |
4 | +import { h } from 'vue'; | ||
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | useComponentRegister('CredentialsCard', CredentialsCard); | 9 | useComponentRegister('CredentialsCard', CredentialsCard); |
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: AzureIotHubFieldsEnum.TOPIC_PATTERN, | 13 | field: AzureIotHubFieldsEnum.TOPIC_PATTERN, |
10 | - label: AzureIotHubFieldsNameEnum.TOPIC_PATTERN, | 14 | + label: h('span', t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN)), |
11 | component: 'Input', | 15 | component: 'Input', |
12 | required: true, | 16 | required: true, |
13 | helpMessage: | 17 | helpMessage: |
@@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | }, | 22 | }, |
19 | { | 23 | { |
20 | field: AzureIotHubFieldsEnum.HOST, | 24 | field: AzureIotHubFieldsEnum.HOST, |
21 | - label: AzureIotHubFieldsNameEnum.HOST, | 25 | + label: h('span', t(AzureIotHubFieldsNameEnum.HOST)), |
22 | component: 'Input', | 26 | component: 'Input', |
23 | required: true, | 27 | required: true, |
24 | componentProps: { | 28 | componentProps: { |
@@ -27,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | @@ -27,7 +31,7 @@ export const formSchemas: FormSchema[] = [ | ||
27 | }, | 31 | }, |
28 | { | 32 | { |
29 | field: AzureIotHubFieldsEnum.CLIENT_ID, | 33 | field: AzureIotHubFieldsEnum.CLIENT_ID, |
30 | - label: AzureIotHubFieldsNameEnum.CLIENT_ID, | 34 | + label: h('span', t(AzureIotHubFieldsNameEnum.CLIENT_ID)), |
31 | component: 'Input', | 35 | component: 'Input', |
32 | required: true, | 36 | required: true, |
33 | componentProps: { | 37 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AZURE_IOT_HUB); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AZURE_IOT_HUB); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AzureIotHubDataType { | 10 | export interface AzureIotHubDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -2,13 +2,17 @@ import { GcpPubsubFieldsEnum, GcpPubsubFieldsNameEnum } from '../../../enum/form | @@ -2,13 +2,17 @@ import { GcpPubsubFieldsEnum, GcpPubsubFieldsNameEnum } from '../../../enum/form | ||
2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
3 | import { FileItemType, getFileData } from '../AzureIotHub/CredentialsCard/config'; | 3 | import { FileItemType, getFileData } from '../AzureIotHub/CredentialsCard/config'; |
4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | +import { h } from 'vue'; | ||
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
5 | 9 | ||
6 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 10 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: GcpPubsubFieldsEnum.PROJECT_ID, | 14 | field: GcpPubsubFieldsEnum.PROJECT_ID, |
11 | - label: GcpPubsubFieldsNameEnum.PROJECT_ID, | 15 | + label: h('span', t(GcpPubsubFieldsNameEnum.PROJECT_ID)), |
12 | component: 'Input', | 16 | component: 'Input', |
13 | required: true, | 17 | required: true, |
14 | componentProps: { | 18 | componentProps: { |
@@ -17,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -17,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
17 | }, | 21 | }, |
18 | { | 22 | { |
19 | field: GcpPubsubFieldsEnum.TOPIC_NAME, | 23 | field: GcpPubsubFieldsEnum.TOPIC_NAME, |
20 | - label: GcpPubsubFieldsNameEnum.TOPIC_NAME, | 24 | + label: h('span', t(GcpPubsubFieldsNameEnum.TOPIC_NAME)), |
21 | component: 'Input', | 25 | component: 'Input', |
22 | required: true, | 26 | required: true, |
23 | componentProps: { | 27 | componentProps: { |
@@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | }, | 30 | }, |
27 | { | 31 | { |
28 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY_FILE_NAME, | 32 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY_FILE_NAME, |
29 | - label: GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME, | 33 | + label: h('span', t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME)), |
30 | component: 'Input', | 34 | component: 'Input', |
31 | show: false, | 35 | show: false, |
32 | componentProps: { | 36 | componentProps: { |
@@ -35,7 +39,7 @@ export const formSchemas: FormSchema[] = [ | @@ -35,7 +39,7 @@ export const formSchemas: FormSchema[] = [ | ||
35 | }, | 39 | }, |
36 | { | 40 | { |
37 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, | 41 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, |
38 | - label: GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY, | 42 | + label: h('span', t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY)), |
39 | component: 'ApiUpload', | 43 | component: 'ApiUpload', |
40 | valueField: 'fileList', | 44 | valueField: 'fileList', |
41 | changeEvent: 'update:fileList', | 45 | changeEvent: 'update:fileList', |
@@ -53,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | @@ -53,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | ||
53 | }, | 57 | }, |
54 | { | 58 | { |
55 | field: GcpPubsubFieldsEnum.MESSAGE_ATTRIBUTES, | 59 | field: GcpPubsubFieldsEnum.MESSAGE_ATTRIBUTES, |
56 | - label: GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES, | 60 | + label: h('span', t(GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES)), |
57 | component: 'AttributeConfiguration', | 61 | component: 'AttributeConfiguration', |
58 | helpMessage: | 62 | helpMessage: |
59 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', | 63 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.GCP_PUBSUB); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.GCP_PUBSUB); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface GcpPubsubDataType { | 10 | export interface GcpPubsubDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -2,13 +2,17 @@ import { KafkaFieldsEnum, KafkaFieldsNameEnum } from '../../../enum/formField/ex | @@ -2,13 +2,17 @@ import { KafkaFieldsEnum, KafkaFieldsNameEnum } from '../../../enum/formField/ex | ||
2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 2 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | import { CharsetEncodingEnum, CharsetEncodingNameEnum } from '../../../enum/form'; | 4 | import { CharsetEncodingEnum, CharsetEncodingNameEnum } from '../../../enum/form'; |
5 | +import { h } from 'vue'; | ||
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
5 | 9 | ||
6 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 10 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: KafkaFieldsEnum.TOPIC_PATTERN, | 14 | field: KafkaFieldsEnum.TOPIC_PATTERN, |
11 | - label: KafkaFieldsNameEnum.TOPIC_PATTERN, | 15 | + label: h('span', t(KafkaFieldsNameEnum.TOPIC_PATTERN)), |
12 | component: 'Input', | 16 | component: 'Input', |
13 | helpMessage: | 17 | helpMessage: |
14 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 18 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
@@ -19,7 +23,7 @@ export const formSchemas: FormSchema[] = [ | @@ -19,7 +23,7 @@ export const formSchemas: FormSchema[] = [ | ||
19 | }, | 23 | }, |
20 | { | 24 | { |
21 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, | 25 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, |
22 | - label: KafkaFieldsNameEnum.BOOTSTRAP_SERVERS, | 26 | + label: h('span', t(KafkaFieldsNameEnum.BOOTSTRAP_SERVERS)), |
23 | component: 'Input', | 27 | component: 'Input', |
24 | required: true, | 28 | required: true, |
25 | componentProps: { | 29 | componentProps: { |
@@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | @@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | ||
28 | }, | 32 | }, |
29 | { | 33 | { |
30 | field: KafkaFieldsEnum.RETRIES, | 34 | field: KafkaFieldsEnum.RETRIES, |
31 | - label: KafkaFieldsNameEnum.RETRIES, | 35 | + label: h('span', t(KafkaFieldsNameEnum.RETRIES)), |
32 | component: 'InputNumber', | 36 | component: 'InputNumber', |
33 | componentProps: { | 37 | componentProps: { |
34 | min: 0, | 38 | min: 0, |
@@ -37,7 +41,7 @@ export const formSchemas: FormSchema[] = [ | @@ -37,7 +41,7 @@ export const formSchemas: FormSchema[] = [ | ||
37 | }, | 41 | }, |
38 | { | 42 | { |
39 | field: KafkaFieldsEnum.BATCH_SIZE, | 43 | field: KafkaFieldsEnum.BATCH_SIZE, |
40 | - label: KafkaFieldsNameEnum.BATCH_SIZE, | 44 | + label: h('span', t(KafkaFieldsNameEnum.BATCH_SIZE)), |
41 | component: 'InputNumber', | 45 | component: 'InputNumber', |
42 | componentProps: { | 46 | componentProps: { |
43 | min: 0, | 47 | min: 0, |
@@ -46,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | @@ -46,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | ||
46 | }, | 50 | }, |
47 | { | 51 | { |
48 | field: KafkaFieldsEnum.LINGER, | 52 | field: KafkaFieldsEnum.LINGER, |
49 | - label: KafkaFieldsNameEnum.LINGER, | 53 | + label: h('span', t(KafkaFieldsNameEnum.LINGER)), |
50 | component: 'InputNumber', | 54 | component: 'InputNumber', |
51 | componentProps: { | 55 | componentProps: { |
52 | min: 0, | 56 | min: 0, |
@@ -55,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | @@ -55,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | ||
55 | }, | 59 | }, |
56 | { | 60 | { |
57 | field: KafkaFieldsEnum.BUFFER_MEMORY, | 61 | field: KafkaFieldsEnum.BUFFER_MEMORY, |
58 | - label: KafkaFieldsNameEnum.BUFFER_MEMORY, | 62 | + label: h('span', t(KafkaFieldsNameEnum.BUFFER_MEMORY)), |
59 | component: 'InputNumber', | 63 | component: 'InputNumber', |
60 | componentProps: { | 64 | componentProps: { |
61 | min: 0, | 65 | min: 0, |
@@ -64,7 +68,7 @@ export const formSchemas: FormSchema[] = [ | @@ -64,7 +68,7 @@ export const formSchemas: FormSchema[] = [ | ||
64 | }, | 68 | }, |
65 | { | 69 | { |
66 | field: KafkaFieldsEnum.ACKS, | 70 | field: KafkaFieldsEnum.ACKS, |
67 | - label: KafkaFieldsEnum.ACKS, | 71 | + label: h('span', t(KafkaFieldsEnum.ACKS)), |
68 | component: 'Select', | 72 | component: 'Select', |
69 | required: true, | 73 | required: true, |
70 | componentProps: { | 74 | componentProps: { |
@@ -80,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | @@ -80,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | ||
80 | }, | 84 | }, |
81 | { | 85 | { |
82 | field: KafkaFieldsEnum.KEY_SERIALIZER, | 86 | field: KafkaFieldsEnum.KEY_SERIALIZER, |
83 | - label: KafkaFieldsNameEnum.KEY_SERIALIZER, | 87 | + label: h('span', t(KafkaFieldsNameEnum.KEY_SERIALIZER)), |
84 | component: 'Input', | 88 | component: 'Input', |
85 | required: true, | 89 | required: true, |
86 | componentProps: { | 90 | componentProps: { |
@@ -89,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | @@ -89,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | ||
89 | }, | 93 | }, |
90 | { | 94 | { |
91 | field: KafkaFieldsEnum.VALUE_SERIALIZER, | 95 | field: KafkaFieldsEnum.VALUE_SERIALIZER, |
92 | - label: KafkaFieldsNameEnum.VALUE_SERIALIZER, | 96 | + label: h('span', t(KafkaFieldsNameEnum.VALUE_SERIALIZER)), |
93 | component: 'Input', | 97 | component: 'Input', |
94 | required: true, | 98 | required: true, |
95 | componentProps: { | 99 | componentProps: { |
@@ -98,13 +102,13 @@ export const formSchemas: FormSchema[] = [ | @@ -98,13 +102,13 @@ export const formSchemas: FormSchema[] = [ | ||
98 | }, | 102 | }, |
99 | { | 103 | { |
100 | field: KafkaFieldsEnum.OTHER_PROPERTIES, | 104 | field: KafkaFieldsEnum.OTHER_PROPERTIES, |
101 | - label: KafkaFieldsNameEnum.OTHER_PROPERTIES, | 105 | + label: h('span', t(KafkaFieldsNameEnum.OTHER_PROPERTIES)), |
102 | component: 'AttributeConfiguration', | 106 | component: 'AttributeConfiguration', |
103 | slot: KafkaFieldsEnum.OTHER_PROPERTIES, | 107 | slot: KafkaFieldsEnum.OTHER_PROPERTIES, |
104 | }, | 108 | }, |
105 | { | 109 | { |
106 | field: KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS, | 110 | field: KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS, |
107 | - label: KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS, | 111 | + label: h('span', t(KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS)), |
108 | component: 'Checkbox', | 112 | component: 'Checkbox', |
109 | renderComponentContent: () => ({ | 113 | renderComponentContent: () => ({ |
110 | default: () => | 114 | default: () => |
@@ -113,7 +117,7 @@ export const formSchemas: FormSchema[] = [ | @@ -113,7 +117,7 @@ export const formSchemas: FormSchema[] = [ | ||
113 | }, | 117 | }, |
114 | { | 118 | { |
115 | field: KafkaFieldsEnum.KAFKA_HEADERS_CHARSET, | 119 | field: KafkaFieldsEnum.KAFKA_HEADERS_CHARSET, |
116 | - label: KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET, | 120 | + label: h('span', t(KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET)), |
117 | component: 'Select', | 121 | component: 'Select', |
118 | required: true, | 122 | required: true, |
119 | show: ({ model }) => model[KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS], | 123 | show: ({ model }) => model[KafkaFieldsEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS], |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.KAFKA); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.KAFKA); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface KafkaDataType { | 10 | export interface KafkaDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { CredentialsCard } from './CredentialsCard'; | 3 | import { CredentialsCard } from './CredentialsCard'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 4 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | useComponentRegister('CredentialsCard', CredentialsCard); | 9 | useComponentRegister('CredentialsCard', CredentialsCard); |
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: MqttFieldsEnum.TOPIC_PATTERN, | 13 | field: MqttFieldsEnum.TOPIC_PATTERN, |
10 | - label: MqttFieldsNameEnum.TOPIC_PATTERN, | 14 | + label: h('span', t(MqttFieldsNameEnum.TOPIC_PATTERN)), |
11 | component: 'Input', | 15 | component: 'Input', |
12 | helpMessage: | 16 | helpMessage: |
13 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 17 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
@@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | }, | 22 | }, |
19 | { | 23 | { |
20 | field: MqttFieldsEnum.HOST, | 24 | field: MqttFieldsEnum.HOST, |
21 | - label: MqttFieldsNameEnum.HOST, | 25 | + label: h('span', t(MqttFieldsNameEnum.HOST)), |
22 | component: 'Input', | 26 | component: 'Input', |
23 | required: true, | 27 | required: true, |
24 | colProps: { span: 8 }, | 28 | colProps: { span: 8 }, |
@@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | @@ -28,7 +32,7 @@ export const formSchemas: FormSchema[] = [ | ||
28 | }, | 32 | }, |
29 | { | 33 | { |
30 | field: MqttFieldsEnum.PORT, | 34 | field: MqttFieldsEnum.PORT, |
31 | - label: MqttFieldsNameEnum.PORT, | 35 | + label: h('span', t(MqttFieldsNameEnum.PORT)), |
32 | component: 'InputNumber', | 36 | component: 'InputNumber', |
33 | required: true, | 37 | required: true, |
34 | colProps: { span: 8 }, | 38 | colProps: { span: 8 }, |
@@ -38,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | @@ -38,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | ||
38 | }, | 42 | }, |
39 | { | 43 | { |
40 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, | 44 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, |
41 | - label: MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC, | 45 | + label: h('span', t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC)), |
42 | component: 'Input', | 46 | component: 'Input', |
43 | required: true, | 47 | required: true, |
44 | colProps: { span: 8 }, | 48 | colProps: { span: 8 }, |
@@ -48,7 +52,7 @@ export const formSchemas: FormSchema[] = [ | @@ -48,7 +52,7 @@ export const formSchemas: FormSchema[] = [ | ||
48 | }, | 52 | }, |
49 | { | 53 | { |
50 | field: MqttFieldsEnum.CLIENT_ID, | 54 | field: MqttFieldsEnum.CLIENT_ID, |
51 | - label: MqttFieldsNameEnum.CLIENT_ID, | 55 | + label: h('span', t(MqttFieldsNameEnum.CLIENT_ID)), |
52 | component: 'Input', | 56 | component: 'Input', |
53 | helpMessage: | 57 | helpMessage: |
54 | '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.', | 58 | 'Hint: Optional. Leave empty for auto-generated Client ID. Be careful when specifying the Client ID. Majority of the MQTT brokers will not allow multiple connections with the same Client ID. To connect to such brokers, your mqtt Client ID must be unique. When platform is running in a micro-services mode, the copy of rule node is launched in each micro-service. This will automatically lead to multiple mqtt clients with the same ID and may cause failures of the rule node. To avoid such failures enable "Add Service ID as suffix to Client ID" option below.', |
@@ -58,7 +62,7 @@ export const formSchemas: FormSchema[] = [ | @@ -58,7 +62,7 @@ export const formSchemas: FormSchema[] = [ | ||
58 | }, | 62 | }, |
59 | { | 63 | { |
60 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, | 64 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, |
61 | - label: MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX, | 65 | + label: h('span', t(MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX)), |
62 | component: 'Checkbox', | 66 | component: 'Checkbox', |
63 | renderComponentContent: () => ({ | 67 | renderComponentContent: () => ({ |
64 | default: () => | 68 | default: () => |
@@ -89,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | @@ -89,7 +93,7 @@ export const formSchemas: FormSchema[] = [ | ||
89 | }, | 93 | }, |
90 | { | 94 | { |
91 | field: MqttFieldsEnum.CREDENTIALS, | 95 | field: MqttFieldsEnum.CREDENTIALS, |
92 | - label: MqttFieldsNameEnum.CREDENTIALS, | 96 | + label: h('span', t(MqttFieldsNameEnum.CREDENTIALS)), |
93 | component: 'CredentialsCard', | 97 | component: 'CredentialsCard', |
94 | slot: MqttFieldsEnum.CREDENTIALS, | 98 | slot: MqttFieldsEnum.CREDENTIALS, |
95 | }, | 99 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.MQTT); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.MQTT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface MqttDataType { | 10 | export interface MqttDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { MessagePropertiesEnum } from '../../../enum/form'; | 2 | import { MessagePropertiesEnum } from '../../../enum/form'; |
2 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; | 3 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | export const formSchemas: FormSchema[] = [ | 9 | export const formSchemas: FormSchema[] = [ |
6 | { | 10 | { |
7 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, | 11 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, |
8 | - label: RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN, | 12 | + label: h('span', t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN)), |
9 | component: 'Input', | 13 | component: 'Input', |
10 | componentProps: { | 14 | componentProps: { |
11 | placeholder: `请输入${RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN}`, | 15 | placeholder: `请输入${RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN}`, |
@@ -13,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | @@ -13,7 +17,7 @@ export const formSchemas: FormSchema[] = [ | ||
13 | }, | 17 | }, |
14 | { | 18 | { |
15 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, | 19 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, |
16 | - label: RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN, | 20 | + label: h('span', t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)), |
17 | component: 'Input', | 21 | component: 'Input', |
18 | componentProps: { | 22 | componentProps: { |
19 | placeholder: `请输入${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, | 23 | placeholder: `请输入${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, |
@@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | @@ -21,7 +25,7 @@ export const formSchemas: FormSchema[] = [ | ||
21 | }, | 25 | }, |
22 | { | 26 | { |
23 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, | 27 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, |
24 | - label: RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES, | 28 | + label: h('span', t(RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES)), |
25 | component: 'Select', | 29 | component: 'Select', |
26 | componentProps: { | 30 | componentProps: { |
27 | allowClear: true, | 31 | allowClear: true, |
@@ -32,7 +36,7 @@ export const formSchemas: FormSchema[] = [ | @@ -32,7 +36,7 @@ export const formSchemas: FormSchema[] = [ | ||
32 | }, | 36 | }, |
33 | { | 37 | { |
34 | field: RabbitmqFieldsEnum.HOST, | 38 | field: RabbitmqFieldsEnum.HOST, |
35 | - label: RabbitmqFieldsNameEnum.HOST, | 39 | + label: h('span', t(RabbitmqFieldsNameEnum.HOST)), |
36 | component: 'Input', | 40 | component: 'Input', |
37 | required: true, | 41 | required: true, |
38 | colProps: { span: 12 }, | 42 | colProps: { span: 12 }, |
@@ -42,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | @@ -42,7 +46,7 @@ export const formSchemas: FormSchema[] = [ | ||
42 | }, | 46 | }, |
43 | { | 47 | { |
44 | field: RabbitmqFieldsEnum.PORT, | 48 | field: RabbitmqFieldsEnum.PORT, |
45 | - label: RabbitmqFieldsNameEnum.PORT, | 49 | + label: h('span', t(RabbitmqFieldsNameEnum.PORT)), |
46 | component: 'InputNumber', | 50 | component: 'InputNumber', |
47 | required: true, | 51 | required: true, |
48 | colProps: { span: 12 }, | 52 | colProps: { span: 12 }, |
@@ -52,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | @@ -52,7 +56,7 @@ export const formSchemas: FormSchema[] = [ | ||
52 | }, | 56 | }, |
53 | { | 57 | { |
54 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, | 58 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, |
55 | - label: RabbitmqFieldsNameEnum.VIRTUAL_HOST, | 59 | + label: h('span', t(RabbitmqFieldsNameEnum.VIRTUAL_HOST)), |
56 | component: 'Input', | 60 | component: 'Input', |
57 | componentProps: { | 61 | componentProps: { |
58 | placeholder: `请输入${RabbitmqFieldsNameEnum.VIRTUAL_HOST}`, | 62 | placeholder: `请输入${RabbitmqFieldsNameEnum.VIRTUAL_HOST}`, |
@@ -60,7 +64,7 @@ export const formSchemas: FormSchema[] = [ | @@ -60,7 +64,7 @@ export const formSchemas: FormSchema[] = [ | ||
60 | }, | 64 | }, |
61 | { | 65 | { |
62 | field: RabbitmqFieldsEnum.USERNAME, | 66 | field: RabbitmqFieldsEnum.USERNAME, |
63 | - label: RabbitmqFieldsNameEnum.USERNAME, | 67 | + label: h('span', t(RabbitmqFieldsNameEnum.USERNAME)), |
64 | component: 'Input', | 68 | component: 'Input', |
65 | componentProps: { | 69 | componentProps: { |
66 | placeholder: `请输入${RabbitmqFieldsNameEnum.USERNAME}`, | 70 | placeholder: `请输入${RabbitmqFieldsNameEnum.USERNAME}`, |
@@ -68,7 +72,7 @@ export const formSchemas: FormSchema[] = [ | @@ -68,7 +72,7 @@ export const formSchemas: FormSchema[] = [ | ||
68 | }, | 72 | }, |
69 | { | 73 | { |
70 | field: RabbitmqFieldsEnum.PASSWORD, | 74 | field: RabbitmqFieldsEnum.PASSWORD, |
71 | - label: RabbitmqFieldsNameEnum.PASSWORD, | 75 | + label: h('span', t(RabbitmqFieldsNameEnum.PASSWORD)), |
72 | component: 'Input', | 76 | component: 'Input', |
73 | componentProps: { | 77 | componentProps: { |
74 | placeholder: `请输入${RabbitmqFieldsNameEnum.PASSWORD}`, | 78 | placeholder: `请输入${RabbitmqFieldsNameEnum.PASSWORD}`, |
@@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | @@ -84,7 +88,7 @@ export const formSchemas: FormSchema[] = [ | ||
84 | }, | 88 | }, |
85 | { | 89 | { |
86 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, | 90 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, |
87 | - label: RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT, | 91 | + label: h('span', t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT)), |
88 | component: 'InputNumber', | 92 | component: 'InputNumber', |
89 | componentProps: { | 93 | componentProps: { |
90 | min: 0, | 94 | min: 0, |
@@ -93,7 +97,7 @@ export const formSchemas: FormSchema[] = [ | @@ -93,7 +97,7 @@ export const formSchemas: FormSchema[] = [ | ||
93 | }, | 97 | }, |
94 | { | 98 | { |
95 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, | 99 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, |
96 | - label: RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT, | 100 | + label: h('span', t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT)), |
97 | component: 'InputNumber', | 101 | component: 'InputNumber', |
98 | componentProps: { | 102 | componentProps: { |
99 | min: 0, | 103 | min: 0, |
@@ -102,7 +106,7 @@ export const formSchemas: FormSchema[] = [ | @@ -102,7 +106,7 @@ export const formSchemas: FormSchema[] = [ | ||
102 | }, | 106 | }, |
103 | { | 107 | { |
104 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 108 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
105 | - label: RabbitmqFieldsNameEnum.CLIENT_PROPERTIES, | 109 | + label: h('span', t(RabbitmqFieldsNameEnum.CLIENT_PROPERTIES)), |
106 | component: 'Input', | 110 | component: 'Input', |
107 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 111 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
108 | }, | 112 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.RABBITMQ); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.RABBITMQ); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface RabbitmqDataType { | 11 | export interface RabbitmqDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
1 | +import { h } from 'vue'; | ||
1 | import { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; | 2 | import { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; |
2 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; | 3 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | export const formSchemas: FormSchema[] = [ | 9 | export const formSchemas: FormSchema[] = [ |
6 | { | 10 | { |
7 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, | 11 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, |
8 | - label: RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN, | 12 | + label: h('span', t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN)), |
9 | component: 'Input', | 13 | component: 'Input', |
10 | required: true, | 14 | required: true, |
11 | helpMessage: | 15 | helpMessage: |
@@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | }, | 20 | }, |
17 | { | 21 | { |
18 | field: RestApiCallFieldsEnum.REQUEST_METHOD, | 22 | field: RestApiCallFieldsEnum.REQUEST_METHOD, |
19 | - label: RestApiCallFieldsNameEnum.REQUEST_METHOD, | 23 | + label: h('span', t(RestApiCallFieldsNameEnum.REQUEST_METHOD)), |
20 | component: 'Select', | 24 | component: 'Select', |
21 | required: true, | 25 | required: true, |
22 | componentProps: { | 26 | componentProps: { |
@@ -61,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | @@ -61,7 +65,7 @@ export const formSchemas: FormSchema[] = [ | ||
61 | }, | 65 | }, |
62 | { | 66 | { |
63 | field: RestApiCallFieldsEnum.PROXY_SCHEME, | 67 | field: RestApiCallFieldsEnum.PROXY_SCHEME, |
64 | - label: RestApiCallFieldsNameEnum.PROXY_SCHEME, | 68 | + label: h('span', t(RestApiCallFieldsNameEnum.PROXY_SCHEME)), |
65 | component: 'Select', | 69 | component: 'Select', |
66 | required: true, | 70 | required: true, |
67 | colProps: { span: 8 }, | 71 | colProps: { span: 8 }, |
@@ -80,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | @@ -80,7 +84,7 @@ export const formSchemas: FormSchema[] = [ | ||
80 | }, | 84 | }, |
81 | { | 85 | { |
82 | field: RestApiCallFieldsEnum.PROXY_HOST, | 86 | field: RestApiCallFieldsEnum.PROXY_HOST, |
83 | - label: RestApiCallFieldsNameEnum.PROXY_HOST, | 87 | + label: h('span', t(RestApiCallFieldsNameEnum.PROXY_HOST)), |
84 | component: 'Input', | 88 | component: 'Input', |
85 | required: true, | 89 | required: true, |
86 | colProps: { span: 8 }, | 90 | colProps: { span: 8 }, |
@@ -94,7 +98,7 @@ export const formSchemas: FormSchema[] = [ | @@ -94,7 +98,7 @@ export const formSchemas: FormSchema[] = [ | ||
94 | }, | 98 | }, |
95 | { | 99 | { |
96 | field: RestApiCallFieldsEnum.PROXY_PORT, | 100 | field: RestApiCallFieldsEnum.PROXY_PORT, |
97 | - label: RestApiCallFieldsNameEnum.PROXY_PORT, | 101 | + label: h('span', t(RestApiCallFieldsNameEnum.PROXY_PORT)), |
98 | component: 'InputNumber', | 102 | component: 'InputNumber', |
99 | required: true, | 103 | required: true, |
100 | colProps: { span: 8 }, | 104 | colProps: { span: 8 }, |
@@ -108,7 +112,7 @@ export const formSchemas: FormSchema[] = [ | @@ -108,7 +112,7 @@ export const formSchemas: FormSchema[] = [ | ||
108 | }, | 112 | }, |
109 | { | 113 | { |
110 | field: RestApiCallFieldsEnum.PROXY_USER, | 114 | field: RestApiCallFieldsEnum.PROXY_USER, |
111 | - label: RestApiCallFieldsNameEnum.PROXY_USER, | 115 | + label: h('span', t(RestApiCallFieldsNameEnum.PROXY_USER)), |
112 | component: 'Input', | 116 | component: 'Input', |
113 | componentProps: { | 117 | componentProps: { |
114 | placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_USER}`, | 118 | placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_USER}`, |
@@ -120,7 +124,7 @@ export const formSchemas: FormSchema[] = [ | @@ -120,7 +124,7 @@ export const formSchemas: FormSchema[] = [ | ||
120 | }, | 124 | }, |
121 | { | 125 | { |
122 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, | 126 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, |
123 | - label: RestApiCallFieldsNameEnum.PROXY_PASSWORD, | 127 | + label: h('span', t(RestApiCallFieldsNameEnum.PROXY_PASSWORD)), |
124 | component: 'Input', | 128 | component: 'Input', |
125 | componentProps: { | 129 | componentProps: { |
126 | placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_PASSWORD}`, | 130 | placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_PASSWORD}`, |
@@ -132,7 +136,7 @@ export const formSchemas: FormSchema[] = [ | @@ -132,7 +136,7 @@ export const formSchemas: FormSchema[] = [ | ||
132 | }, | 136 | }, |
133 | { | 137 | { |
134 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, | 138 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, |
135 | - label: RestApiCallFieldsNameEnum.READ_TIMEOUT_MS, | 139 | + label: h('span', t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS)), |
136 | component: 'InputNumber', | 140 | component: 'InputNumber', |
137 | componentProps: { | 141 | componentProps: { |
138 | min: 0, | 142 | min: 0, |
@@ -141,7 +145,7 @@ export const formSchemas: FormSchema[] = [ | @@ -141,7 +145,7 @@ export const formSchemas: FormSchema[] = [ | ||
141 | }, | 145 | }, |
142 | { | 146 | { |
143 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, | 147 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, |
144 | - label: RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT, | 148 | + label: h('span', t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT)), |
145 | component: 'InputNumber', | 149 | component: 'InputNumber', |
146 | componentProps: { | 150 | componentProps: { |
147 | min: 0, | 151 | min: 0, |
@@ -150,7 +154,7 @@ export const formSchemas: FormSchema[] = [ | @@ -150,7 +154,7 @@ export const formSchemas: FormSchema[] = [ | ||
150 | }, | 154 | }, |
151 | { | 155 | { |
152 | field: RestApiCallFieldsEnum.HEADERS, | 156 | field: RestApiCallFieldsEnum.HEADERS, |
153 | - label: RestApiCallFieldsNameEnum.HEADERS, | 157 | + label: h('span', t(RestApiCallFieldsNameEnum.HEADERS)), |
154 | component: 'Input', | 158 | component: 'Input', |
155 | slot: RestApiCallFieldsEnum.HEADERS, | 159 | slot: RestApiCallFieldsEnum.HEADERS, |
156 | }, | 160 | }, |
@@ -173,7 +177,7 @@ export const formSchemas: FormSchema[] = [ | @@ -173,7 +177,7 @@ export const formSchemas: FormSchema[] = [ | ||
173 | }, | 177 | }, |
174 | { | 178 | { |
175 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, | 179 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, |
176 | - label: RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE, | 180 | + label: h('span', t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE)), |
177 | component: 'InputNumber', | 181 | component: 'InputNumber', |
178 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], | 182 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], |
179 | componentProps: { | 183 | componentProps: { |
@@ -183,7 +187,7 @@ export const formSchemas: FormSchema[] = [ | @@ -183,7 +187,7 @@ export const formSchemas: FormSchema[] = [ | ||
183 | }, | 187 | }, |
184 | { | 188 | { |
185 | field: RestApiCallFieldsEnum.CREDENTIALS, | 189 | field: RestApiCallFieldsEnum.CREDENTIALS, |
186 | - label: RestApiCallFieldsNameEnum.CREDENTIALS, | 190 | + label: h('span', t(RestApiCallFieldsNameEnum.CREDENTIALS)), |
187 | component: 'Input', | 191 | component: 'Input', |
188 | slot: RestApiCallFieldsEnum.CREDENTIALS, | 192 | slot: RestApiCallFieldsEnum.CREDENTIALS, |
189 | }, | 193 | }, |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.REST_API_CALL); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.REST_API_CALL); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RestApiCallDataType { | 10 | export interface RestApiCallDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | EmailProtocolEnum, | 3 | EmailProtocolEnum, |
3 | EmailProtocolNameEnum, | 4 | EmailProtocolNameEnum, |
@@ -6,6 +7,9 @@ import { | @@ -6,6 +7,9 @@ import { | ||
6 | } from '../../../enum/form'; | 7 | } from '../../../enum/form'; |
7 | import { SendEmailFieldsEnum, SendEmailFieldsNameEnum } from '../../../enum/formField/external'; | 8 | import { SendEmailFieldsEnum, SendEmailFieldsNameEnum } from '../../../enum/formField/external'; |
8 | import { FormSchema } from '/@/components/Form'; | 9 | import { FormSchema } from '/@/components/Form'; |
10 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
11 | + | ||
12 | +const { t } = useI18n(); | ||
9 | 13 | ||
10 | export const formSchemas: FormSchema[] = [ | 14 | export const formSchemas: FormSchema[] = [ |
11 | { | 15 | { |
@@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +22,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | }, | 22 | }, |
19 | { | 23 | { |
20 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, | 24 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, |
21 | - label: SendEmailFieldsNameEnum.SMTP_PROTOCOL, | 25 | + label: h('span', t(SendEmailFieldsNameEnum.SMTP_PROTOCOL)), |
22 | component: 'Select', | 26 | component: 'Select', |
23 | required: true, | 27 | required: true, |
24 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 28 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
@@ -33,7 +37,7 @@ export const formSchemas: FormSchema[] = [ | @@ -33,7 +37,7 @@ export const formSchemas: FormSchema[] = [ | ||
33 | }, | 37 | }, |
34 | { | 38 | { |
35 | field: SendEmailFieldsEnum.SMTP_HOST, | 39 | field: SendEmailFieldsEnum.SMTP_HOST, |
36 | - label: SendEmailFieldsNameEnum.SMTP_HOST, | 40 | + label: h('span', t(SendEmailFieldsNameEnum.SMTP_HOST)), |
37 | component: 'Input', | 41 | component: 'Input', |
38 | required: true, | 42 | required: true, |
39 | colProps: { span: 12 }, | 43 | colProps: { span: 12 }, |
@@ -44,7 +48,7 @@ export const formSchemas: FormSchema[] = [ | @@ -44,7 +48,7 @@ export const formSchemas: FormSchema[] = [ | ||
44 | }, | 48 | }, |
45 | { | 49 | { |
46 | field: SendEmailFieldsEnum.SMTP_PORT, | 50 | field: SendEmailFieldsEnum.SMTP_PORT, |
47 | - label: SendEmailFieldsNameEnum.SMTP_PORT, | 51 | + label: h('span', t(SendEmailFieldsNameEnum.SMTP_PORT)), |
48 | component: 'InputNumber', | 52 | component: 'InputNumber', |
49 | required: true, | 53 | required: true, |
50 | colProps: { span: 12 }, | 54 | colProps: { span: 12 }, |
@@ -56,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | @@ -56,7 +60,7 @@ export const formSchemas: FormSchema[] = [ | ||
56 | }, | 60 | }, |
57 | { | 61 | { |
58 | field: SendEmailFieldsEnum.TIMEOUT, | 62 | field: SendEmailFieldsEnum.TIMEOUT, |
59 | - label: SendEmailFieldsNameEnum.TIMEOUT, | 63 | + label: h('span', t(SendEmailFieldsNameEnum.TIMEOUT)), |
60 | component: 'InputNumber', | 64 | component: 'InputNumber', |
61 | required: true, | 65 | required: true, |
62 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 66 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
@@ -76,7 +80,7 @@ export const formSchemas: FormSchema[] = [ | @@ -76,7 +80,7 @@ export const formSchemas: FormSchema[] = [ | ||
76 | }, | 80 | }, |
77 | { | 81 | { |
78 | field: SendEmailFieldsEnum.TLS_VERSION, | 82 | field: SendEmailFieldsEnum.TLS_VERSION, |
79 | - label: SendEmailFieldsNameEnum.TLS_VERSION, | 83 | + label: h('span', t(SendEmailFieldsNameEnum.TLS_VERSION)), |
80 | component: 'Select', | 84 | component: 'Select', |
81 | required: true, | 85 | required: true, |
82 | ifShow: ({ model }) => | 86 | ifShow: ({ model }) => |
@@ -101,7 +105,7 @@ export const formSchemas: FormSchema[] = [ | @@ -101,7 +105,7 @@ export const formSchemas: FormSchema[] = [ | ||
101 | }, | 105 | }, |
102 | { | 106 | { |
103 | field: SendEmailFieldsEnum.PROXY_HOST, | 107 | field: SendEmailFieldsEnum.PROXY_HOST, |
104 | - label: SendEmailFieldsNameEnum.PROXY_HOST, | 108 | + label: h('span', t(SendEmailFieldsNameEnum.PROXY_HOST)), |
105 | component: 'Input', | 109 | component: 'Input', |
106 | required: true, | 110 | required: true, |
107 | colProps: { span: 12 }, | 111 | colProps: { span: 12 }, |
@@ -114,7 +118,7 @@ export const formSchemas: FormSchema[] = [ | @@ -114,7 +118,7 @@ export const formSchemas: FormSchema[] = [ | ||
114 | }, | 118 | }, |
115 | { | 119 | { |
116 | field: SendEmailFieldsEnum.PROXY_PORT, | 120 | field: SendEmailFieldsEnum.PROXY_PORT, |
117 | - label: SendEmailFieldsNameEnum.PROXY_PORT, | 121 | + label: h('span', t(SendEmailFieldsNameEnum.PROXY_PORT)), |
118 | component: 'Input', | 122 | component: 'Input', |
119 | required: true, | 123 | required: true, |
120 | colProps: { span: 12 }, | 124 | colProps: { span: 12 }, |
@@ -127,7 +131,7 @@ export const formSchemas: FormSchema[] = [ | @@ -127,7 +131,7 @@ export const formSchemas: FormSchema[] = [ | ||
127 | }, | 131 | }, |
128 | { | 132 | { |
129 | field: SendEmailFieldsEnum.PROXY_USER, | 133 | field: SendEmailFieldsEnum.PROXY_USER, |
130 | - label: SendEmailFieldsNameEnum.PROXY_USER, | 134 | + label: h('span', t(SendEmailFieldsNameEnum.PROXY_USER)), |
131 | component: 'Input', | 135 | component: 'Input', |
132 | ifShow: ({ model }) => | 136 | ifShow: ({ model }) => |
133 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 137 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
@@ -138,7 +142,7 @@ export const formSchemas: FormSchema[] = [ | @@ -138,7 +142,7 @@ export const formSchemas: FormSchema[] = [ | ||
138 | }, | 142 | }, |
139 | { | 143 | { |
140 | field: SendEmailFieldsEnum.PROXY_PASSWORD, | 144 | field: SendEmailFieldsEnum.PROXY_PASSWORD, |
141 | - label: SendEmailFieldsNameEnum.PROXY_PASSWORD, | 145 | + label: h('span', t(SendEmailFieldsNameEnum.PROXY_PASSWORD)), |
142 | component: 'Input', | 146 | component: 'Input', |
143 | ifShow: ({ model }) => | 147 | ifShow: ({ model }) => |
144 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 148 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
@@ -149,7 +153,7 @@ export const formSchemas: FormSchema[] = [ | @@ -149,7 +153,7 @@ export const formSchemas: FormSchema[] = [ | ||
149 | }, | 153 | }, |
150 | { | 154 | { |
151 | field: SendEmailFieldsEnum.USERNAME, | 155 | field: SendEmailFieldsEnum.USERNAME, |
152 | - label: SendEmailFieldsNameEnum.USERNAME, | 156 | + label: h('span', t(SendEmailFieldsNameEnum.USERNAME)), |
153 | component: 'Input', | 157 | component: 'Input', |
154 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 158 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
155 | componentProps: { | 159 | componentProps: { |
@@ -158,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | @@ -158,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | ||
158 | }, | 162 | }, |
159 | { | 163 | { |
160 | field: SendEmailFieldsEnum.PASSWORD, | 164 | field: SendEmailFieldsEnum.PASSWORD, |
161 | - label: SendEmailFieldsNameEnum.PASSWORD, | 165 | + label: h('span', t(SendEmailFieldsNameEnum.PASSWORD)), |
162 | component: 'InputPassword', | 166 | component: 'InputPassword', |
163 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 167 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
164 | componentProps: { | 168 | componentProps: { |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_EMAIL); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_EMAIL); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SendEmailDataType { | 10 | export interface SendEmailDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | +import { h } from 'vue'; | ||
1 | import { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; | 2 | import { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; |
2 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; | 3 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
4 | 8 | ||
5 | export const formSchemas: FormSchema[] = [ | 9 | export const formSchemas: FormSchema[] = [ |
6 | { | 10 | { |
7 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, | 11 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, |
8 | - label: SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE, | 12 | + label: h('span', t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE)), |
9 | component: 'Input', | 13 | component: 'Input', |
10 | required: true, | 14 | required: true, |
11 | helpMessage: | 15 | helpMessage: |
@@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | }, | 20 | }, |
17 | { | 21 | { |
18 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, | 22 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, |
19 | - label: SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE, | 23 | + label: h('span', t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE)), |
20 | component: 'InputTextArea', | 24 | component: 'InputTextArea', |
21 | required: true, | 25 | required: true, |
22 | helpMessage: | 26 | helpMessage: |
@@ -35,7 +39,7 @@ export const formSchemas: FormSchema[] = [ | @@ -35,7 +39,7 @@ export const formSchemas: FormSchema[] = [ | ||
35 | }, | 39 | }, |
36 | { | 40 | { |
37 | field: SendSMSFieldsEnum.TYPE, | 41 | field: SendSMSFieldsEnum.TYPE, |
38 | - label: SendSMSFieldsNameEnum.TYPE, | 42 | + label: h('span', t(SendSMSFieldsNameEnum.TYPE)), |
39 | component: 'Select', | 43 | component: 'Select', |
40 | required: true, | 44 | required: true, |
41 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], | 45 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], |
@@ -50,7 +54,7 @@ export const formSchemas: FormSchema[] = [ | @@ -50,7 +54,7 @@ export const formSchemas: FormSchema[] = [ | ||
50 | }, | 54 | }, |
51 | { | 55 | { |
52 | field: SendSMSFieldsEnum.NUMBER_FROM, | 56 | field: SendSMSFieldsEnum.NUMBER_FROM, |
53 | - label: SendSMSFieldsNameEnum.NUMBER_FROM, | 57 | + label: h('span', t(SendSMSFieldsNameEnum.NUMBER_FROM)), |
54 | component: 'Input', | 58 | component: 'Input', |
55 | required: true, | 59 | required: true, |
56 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, | 60 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, |
@@ -63,7 +67,7 @@ export const formSchemas: FormSchema[] = [ | @@ -63,7 +67,7 @@ export const formSchemas: FormSchema[] = [ | ||
63 | }, | 67 | }, |
64 | { | 68 | { |
65 | field: SendSMSFieldsEnum.ACCOUNT_SID, | 69 | field: SendSMSFieldsEnum.ACCOUNT_SID, |
66 | - label: SendSMSFieldsNameEnum.ACCOUNT_SID, | 70 | + label: h('span', t(SendSMSFieldsNameEnum.ACCOUNT_SID)), |
67 | component: 'Input', | 71 | component: 'Input', |
68 | required: true, | 72 | required: true, |
69 | ifShow: ({ model }) => | 73 | ifShow: ({ model }) => |
@@ -75,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | @@ -75,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | ||
75 | }, | 79 | }, |
76 | { | 80 | { |
77 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, | 81 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, |
78 | - label: SendSMSFieldsNameEnum.ACCOUNT_TOKEN, | 82 | + label: h('span', t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN)), |
79 | component: 'Input', | 83 | component: 'Input', |
80 | required: true, | 84 | required: true, |
81 | ifShow: ({ model }) => | 85 | ifShow: ({ model }) => |
@@ -87,7 +91,7 @@ export const formSchemas: FormSchema[] = [ | @@ -87,7 +91,7 @@ export const formSchemas: FormSchema[] = [ | ||
87 | }, | 91 | }, |
88 | { | 92 | { |
89 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, | 93 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, |
90 | - label: SendSMSFieldsNameEnum.ACCESS_KEY_ID, | 94 | + label: h('span', t(SendSMSFieldsNameEnum.ACCESS_KEY_ID)), |
91 | component: 'Input', | 95 | component: 'Input', |
92 | required: true, | 96 | required: true, |
93 | ifShow: ({ model }) => | 97 | ifShow: ({ model }) => |
@@ -99,7 +103,7 @@ export const formSchemas: FormSchema[] = [ | @@ -99,7 +103,7 @@ export const formSchemas: FormSchema[] = [ | ||
99 | }, | 103 | }, |
100 | { | 104 | { |
101 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, | 105 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, |
102 | - label: SendSMSFieldsNameEnum.SECRET_ACCESS_KEY, | 106 | + label: h('span', t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY)), |
103 | component: 'InputPassword', | 107 | component: 'InputPassword', |
104 | required: true, | 108 | required: true, |
105 | ifShow: ({ model }) => | 109 | ifShow: ({ model }) => |
@@ -111,7 +115,7 @@ export const formSchemas: FormSchema[] = [ | @@ -111,7 +115,7 @@ export const formSchemas: FormSchema[] = [ | ||
111 | }, | 115 | }, |
112 | { | 116 | { |
113 | field: SendSMSFieldsEnum.REGION, | 117 | field: SendSMSFieldsEnum.REGION, |
114 | - label: SendSMSFieldsNameEnum.REGION, | 118 | + label: h('span', t(SendSMSFieldsNameEnum.REGION)), |
115 | component: 'InputPassword', | 119 | component: 'InputPassword', |
116 | required: true, | 120 | required: true, |
117 | ifShow: ({ model }) => | 121 | ifShow: ({ model }) => |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_SMS); | 7 | const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_SMS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SendSmsDataType { | 10 | export interface SendSmsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -13,7 +13,7 @@ import { RabbitmqConfig } from './Rabbitmq'; | @@ -13,7 +13,7 @@ import { RabbitmqConfig } from './Rabbitmq'; | ||
13 | import { AwsSqsConfig } from './AwsSqs'; | 13 | import { AwsSqsConfig } from './AwsSqs'; |
14 | import { useI18n } from '/@/hooks/web/useI18n'; | 14 | import { useI18n } from '/@/hooks/web/useI18n'; |
15 | 15 | ||
16 | -const { t } = useI18n(); //加载国际化 | 16 | +const { t } = useI18n(); // 加载国际化 |
17 | export const ExternalCategoryConfig: CategoryConfigType = { | 17 | export const ExternalCategoryConfig: CategoryConfigType = { |
18 | category: RuleNodeTypeEnum.EXTERNAL, | 18 | category: RuleNodeTypeEnum.EXTERNAL, |
19 | title: t('designer_config.externals.index.title'), | 19 | title: t('designer_config.externals.index.title'), |
@@ -3,18 +3,28 @@ import { | @@ -3,18 +3,28 @@ import { | ||
3 | CheckAlarmStatusFieldNameEnum, | 3 | CheckAlarmStatusFieldNameEnum, |
4 | } from '../../../enum/formField/filter'; | 4 | } from '../../../enum/formField/filter'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | import { AlarmStatus, AlarmStatusMean } from '/@/enums/alarmEnum'; | 9 | import { AlarmStatus, AlarmStatusMean } from '/@/enums/alarmEnum'; |
10 | +import { h } from 'vue'; | ||
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, | 14 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, |
11 | component: 'Select', | 15 | component: 'Select', |
12 | - label: CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST, | ||
13 | - required: true, | 16 | + label: h('span', t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)), |
17 | + rules: [ | ||
18 | + { | ||
19 | + required: true, | ||
20 | + message: `请选择${t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)}`, | ||
21 | + type: 'array', | ||
22 | + }, | ||
23 | + ], | ||
14 | componentProps: { | 24 | componentProps: { |
15 | mode: 'multiple', | 25 | mode: 'multiple', |
16 | getPopupContainer: () => document.body, | 26 | getPopupContainer: () => document.body, |
17 | - placeholder: `请选择${CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST}`, | 27 | + placeholder: `请选择${t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)}`, |
18 | options: [ | 28 | options: [ |
19 | { | 29 | { |
20 | label: AlarmStatusMean[AlarmStatus.CLEARED_UN_ACK], | 30 | label: AlarmStatusMean[AlarmStatus.CLEARED_UN_ACK], |
@@ -7,7 +7,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -7,7 +7,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | 7 | ||
8 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_ALARM_STATUS); | 8 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_ALARM_STATUS); |
9 | 9 | ||
10 | -const { t } = useI18n(); //加载国际化 | 10 | +const { t } = useI18n(); // 加载国际化 |
11 | export interface CheckAlarmStatusDataType { | 11 | export interface CheckAlarmStatusDataType { |
12 | alarmStatusList: AlarmStatus[]; | 12 | alarmStatusList: AlarmStatus[]; |
13 | } | 13 | } |
1 | +import { h } from 'vue'; | ||
1 | import { | 2 | import { |
2 | CheckExistenceFieldsEnum, | 3 | CheckExistenceFieldsEnum, |
3 | CheckExistenceFieldsNameEnum, | 4 | CheckExistenceFieldsNameEnum, |
4 | } from '../../../enum/formField/filter'; | 5 | } from '../../../enum/formField/filter'; |
5 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
6 | 10 | ||
7 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
8 | { | 12 | { |
9 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, | 13 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, |
10 | component: 'Select', | 14 | component: 'Select', |
11 | - label: CheckExistenceFieldsNameEnum.MESSAGE_NAMES, | ||
12 | - rules: [{ required: true, type: 'array' }], | 15 | + label: h('span', t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)), |
16 | + rules: [ | ||
17 | + { | ||
18 | + required: true, | ||
19 | + type: 'array', | ||
20 | + message: `请选择${t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)}`, | ||
21 | + }, | ||
22 | + ], | ||
13 | componentProps: { | 23 | componentProps: { |
14 | mode: 'tags', | 24 | mode: 'tags', |
15 | open: false, | 25 | open: false, |
16 | getPopupContainer: () => document.body, | 26 | getPopupContainer: () => document.body, |
17 | - placeholder: `请选择${CheckExistenceFieldsNameEnum.MESSAGE_NAMES}`, | 27 | + placeholder: `请选择${t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)}`, |
18 | }, | 28 | }, |
19 | }, | 29 | }, |
20 | { | 30 | { |
21 | field: CheckExistenceFieldsEnum.METADATA_NAMES, | 31 | field: CheckExistenceFieldsEnum.METADATA_NAMES, |
22 | component: 'Select', | 32 | component: 'Select', |
23 | - label: CheckExistenceFieldsNameEnum.METADATA_NAMES, | ||
24 | - rules: [{ required: true, type: 'array' }], | 33 | + label: h('span', t(CheckExistenceFieldsNameEnum.METADATA_NAMES)), |
34 | + rules: [ | ||
35 | + { | ||
36 | + required: true, | ||
37 | + type: 'array', | ||
38 | + message: `请选择${t(CheckExistenceFieldsNameEnum.METADATA_NAMES)}`, | ||
39 | + }, | ||
40 | + ], | ||
25 | componentProps: { | 41 | componentProps: { |
26 | mode: 'tags', | 42 | mode: 'tags', |
27 | open: false, | 43 | open: false, |
28 | getPopupContainer: () => document.body, | 44 | getPopupContainer: () => document.body, |
29 | - placeholder: `请选择${CheckExistenceFieldsNameEnum.METADATA_NAMES}`, | 45 | + placeholder: `请选择${t(CheckExistenceFieldsNameEnum.METADATA_NAMES)}`, |
30 | }, | 46 | }, |
31 | }, | 47 | }, |
32 | { | 48 | { |
@@ -34,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | @@ -34,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | ||
34 | component: 'Checkbox', | 50 | component: 'Checkbox', |
35 | label: '', | 51 | label: '', |
36 | renderComponentContent: () => ({ | 52 | renderComponentContent: () => ({ |
37 | - default: () => CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS, | 53 | + default: () => t(CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS), |
38 | }), | 54 | }), |
39 | }, | 55 | }, |
40 | ]; | 56 | ]; |
@@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -6,7 +6,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | 6 | ||
7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_EXISTENCE_FIELDS); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_EXISTENCE_FIELDS); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CheckExistenceFieldsDataType { | 10 | export interface CheckExistenceFieldsDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -11,6 +11,10 @@ import { | @@ -11,6 +11,10 @@ import { | ||
11 | CheckRelationFieldsNameEnum, | 11 | CheckRelationFieldsNameEnum, |
12 | } from '../../../enum/formField/filter'; | 12 | } from '../../../enum/formField/filter'; |
13 | import { FormSchema } from '/@/components/Form'; | 13 | import { FormSchema } from '/@/components/Form'; |
14 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
15 | + | ||
16 | +const { t } = useI18n(); | ||
17 | + | ||
14 | import { | 18 | import { |
15 | getEntityDevice, | 19 | getEntityDevice, |
16 | getEntityAssets, | 20 | getEntityAssets, |
@@ -22,6 +26,7 @@ import { | @@ -22,6 +26,7 @@ import { | ||
22 | getEntityEdge, | 26 | getEntityEdge, |
23 | } from '/@/api/ruleChainDesigner'; | 27 | } from '/@/api/ruleChainDesigner'; |
24 | import { useUserStore } from '/@/store/modules/user'; | 28 | import { useUserStore } from '/@/store/modules/user'; |
29 | +import { h } from 'vue'; | ||
25 | 30 | ||
26 | export const getEntityIdSelect = (type: EntityTypeEnum) => { | 31 | export const getEntityIdSelect = (type: EntityTypeEnum) => { |
27 | const method = { | 32 | const method = { |
@@ -63,26 +68,26 @@ export const formSchemas: FormSchema[] = [ | @@ -63,26 +68,26 @@ export const formSchemas: FormSchema[] = [ | ||
63 | component: 'Checkbox', | 68 | component: 'Checkbox', |
64 | label: '', | 69 | label: '', |
65 | renderComponentContent: () => ({ | 70 | renderComponentContent: () => ({ |
66 | - default: () => CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY, | 71 | + default: () => t(CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY), |
67 | }), | 72 | }), |
68 | }, | 73 | }, |
69 | { | 74 | { |
70 | field: CheckRelationFieldsEnum.DIRECTION, | 75 | field: CheckRelationFieldsEnum.DIRECTION, |
71 | component: 'Select', | 76 | component: 'Select', |
72 | - label: CheckRelationFieldsNameEnum.DIRECTION, | 77 | + label: h('span', t(CheckRelationFieldsNameEnum.DIRECTION)), |
73 | componentProps: { | 78 | componentProps: { |
74 | options: [ | 79 | options: [ |
75 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, | 80 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, |
76 | { label: DirectionNameEnum.TO, value: DirectionEnum.TO }, | 81 | { label: DirectionNameEnum.TO, value: DirectionEnum.TO }, |
77 | ], | 82 | ], |
78 | - placeholder: `请选择${CheckRelationFieldsNameEnum.DIRECTION}`, | 83 | + placeholder: `请选择${t(CheckRelationFieldsNameEnum.DIRECTION)}`, |
79 | getPopupContainer: () => document.body, | 84 | getPopupContainer: () => document.body, |
80 | }, | 85 | }, |
81 | }, | 86 | }, |
82 | { | 87 | { |
83 | field: CheckRelationFieldsEnum.ENTITY_TYPE, | 88 | field: CheckRelationFieldsEnum.ENTITY_TYPE, |
84 | component: 'Select', | 89 | component: 'Select', |
85 | - label: CheckRelationFieldsNameEnum.ENTITY_TYPE, | 90 | + label: h('span', t(CheckRelationFieldsNameEnum.ENTITY_TYPE)), |
86 | colProps: { span: 8 }, | 91 | colProps: { span: 8 }, |
87 | componentProps: ({ formActionType }) => { | 92 | componentProps: ({ formActionType }) => { |
88 | const { setFieldsValue } = formActionType; | 93 | const { setFieldsValue } = formActionType; |
@@ -91,7 +96,7 @@ export const formSchemas: FormSchema[] = [ | @@ -91,7 +96,7 @@ export const formSchemas: FormSchema[] = [ | ||
91 | label: EntityTypeNameEnum[key], | 96 | label: EntityTypeNameEnum[key], |
92 | value: key, | 97 | value: key, |
93 | })), | 98 | })), |
94 | - placeholder: `请选择${CheckRelationFieldsNameEnum.ENTITY_TYPE}`, | 99 | + placeholder: `请选择${t(CheckRelationFieldsNameEnum.ENTITY_TYPE)}`, |
95 | getPopupContainer: () => document.body, | 100 | getPopupContainer: () => document.body, |
96 | onChange: () => { | 101 | onChange: () => { |
97 | setFieldsValue({ [CheckRelationFieldsEnum.ENTITY_ID]: null }); | 102 | setFieldsValue({ [CheckRelationFieldsEnum.ENTITY_ID]: null }); |
@@ -108,7 +113,6 @@ export const formSchemas: FormSchema[] = [ | @@ -108,7 +113,6 @@ export const formSchemas: FormSchema[] = [ | ||
108 | show: ({ model }) => model[CheckRelationFieldsEnum.ENTITY_TYPE], | 113 | show: ({ model }) => model[CheckRelationFieldsEnum.ENTITY_TYPE], |
109 | componentProps: ({ formModel }) => { | 114 | componentProps: ({ formModel }) => { |
110 | const entityType = formModel[CheckRelationFieldsEnum.ENTITY_TYPE]; | 115 | const entityType = formModel[CheckRelationFieldsEnum.ENTITY_TYPE]; |
111 | - | ||
112 | return getEntityIdSelect(entityType); | 116 | return getEntityIdSelect(entityType); |
113 | }, | 117 | }, |
114 | ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY], | 118 | ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY], |
@@ -116,7 +120,7 @@ export const formSchemas: FormSchema[] = [ | @@ -116,7 +120,7 @@ export const formSchemas: FormSchema[] = [ | ||
116 | { | 120 | { |
117 | field: CheckRelationFieldsEnum.RELEATION_TYPE, | 121 | field: CheckRelationFieldsEnum.RELEATION_TYPE, |
118 | component: 'Select', | 122 | component: 'Select', |
119 | - label: CheckRelationFieldsNameEnum.RELEATION_TYPE, | 123 | + label: h('span', t(CheckRelationFieldsNameEnum.RELEATION_TYPE)), |
120 | defaultValue: RelationTypeEnum.CONTAINS, | 124 | defaultValue: RelationTypeEnum.CONTAINS, |
121 | componentProps: { | 125 | componentProps: { |
122 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 126 | options: Object.keys(RelationTypeEnum).map((value) => ({ |