Commit 94ab22ef742859abccf43b15fe3bea6cedde22ff
Merge branch 'fix/rule-chain-i18n-usage' into 'main_dev'
Fix/rule chain i18n usage See merge request yunteng/thingskit-front!1038
Showing
141 changed files
with
1188 additions
and
1186 deletions
@@ -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 | } |
@@ -3,16 +3,19 @@ import { | @@ -3,16 +3,19 @@ import { | ||
3 | AssignToCustomerFieldsNameEnum, | 3 | AssignToCustomerFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 12 | field: AssignToCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
10 | component: 'Input', | 13 | component: 'Input', |
11 | - label: AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN, | 14 | + label: t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN), |
12 | helpMessage: | 15 | helpMessage: |
13 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 16 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
14 | componentProps: { | 17 | componentProps: { |
15 | - placeholder: `请输入${AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN}`, | 18 | + placeholder: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)}`, |
16 | }, | 19 | }, |
17 | }, | 20 | }, |
18 | { | 21 | { |
@@ -20,18 +23,23 @@ export const formSchemas: FormSchema[] = [ | @@ -20,18 +23,23 @@ export const formSchemas: FormSchema[] = [ | ||
20 | component: 'Checkbox', | 23 | component: 'Checkbox', |
21 | label: '', | 24 | label: '', |
22 | renderComponentContent: () => ({ | 25 | renderComponentContent: () => ({ |
23 | - default: () => AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS, | 26 | + default: () => t(AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS), |
24 | }), | 27 | }), |
25 | }, | 28 | }, |
26 | { | 29 | { |
27 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 30 | field: AssignToCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
28 | component: 'InputNumber', | 31 | component: 'InputNumber', |
29 | - label: AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION, | ||
30 | - required: true, | 32 | + label: t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION), |
33 | + rules: [ | ||
34 | + { | ||
35 | + required: true, | ||
36 | + message: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, | ||
37 | + }, | ||
38 | + ], | ||
31 | helpMessage: | 39 | helpMessage: |
32 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 40 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
33 | componentProps: { | 41 | componentProps: { |
34 | - placeholder: `请输入${AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION}`, | 42 | + placeholder: `请输入${t(AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, |
35 | min: 0, | 43 | min: 0, |
36 | }, | 44 | }, |
37 | }, | 45 | }, |
@@ -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 { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { ClearAlarmFieldsEnum, ClearAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
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: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 12 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
10 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
11 | - label: ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS, | 14 | + label: t(ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS), |
12 | componentProps: { | 15 | componentProps: { |
13 | javaScriptEditorProps: { | 16 | javaScriptEditorProps: { |
14 | functionName: 'Details', | 17 | functionName: 'Details', |
@@ -21,10 +24,10 @@ export const formSchemas: FormSchema[] = [ | @@ -21,10 +24,10 @@ export const formSchemas: FormSchema[] = [ | ||
21 | { | 24 | { |
22 | field: ClearAlarmFieldsEnum.ALARM_TYPE, | 25 | field: ClearAlarmFieldsEnum.ALARM_TYPE, |
23 | component: 'Input', | 26 | component: 'Input', |
24 | - label: ClearAlarmFieldsNameEnum.ALARM_TYPE, | 27 | + label: t(ClearAlarmFieldsNameEnum.ALARM_TYPE), |
25 | required: true, | 28 | required: true, |
26 | componentProps: { | 29 | componentProps: { |
27 | - placeholder: `请输入${ClearAlarmFieldsNameEnum.ALARM_TYPE}`, | 30 | + placeholder: `请输入${t(ClearAlarmFieldsNameEnum.ALARM_TYPE)}`, |
28 | }, | 31 | }, |
29 | }, | 32 | }, |
30 | ]; | 33 | ]; |
@@ -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 { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { CreateAlarmFieldsEnum, CreateAlarmFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
4 | 7 | ||
5 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 8 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
6 | 9 | ||
@@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | component: 'Checkbox', | 13 | component: 'Checkbox', |
11 | label: '', | 14 | label: '', |
12 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
13 | - default: () => CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA, | 16 | + default: () => t(CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA), |
14 | }), | 17 | }), |
15 | }, | 18 | }, |
16 | { | 19 | { |
@@ -19,13 +22,13 @@ export const formSchemas: FormSchema[] = [ | @@ -19,13 +22,13 @@ export const formSchemas: FormSchema[] = [ | ||
19 | label: '', | 22 | label: '', |
20 | show: ({ model }) => model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 23 | show: ({ model }) => model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
21 | renderComponentContent: () => ({ | 24 | renderComponentContent: () => ({ |
22 | - default: () => CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS, | 25 | + default: () => t(CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS), |
23 | }), | 26 | }), |
24 | }, | 27 | }, |
25 | { | 28 | { |
26 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, | 29 | field: CreateAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
27 | component: 'JavascriptEditorWithTestModal', | 30 | component: 'JavascriptEditorWithTestModal', |
28 | - label: CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS, | 31 | + label: t(CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS), |
29 | valueField: 'value', | 32 | valueField: 'value', |
30 | changeEvent: 'update:value', | 33 | changeEvent: 'update:value', |
31 | show: ({ model }) => | 34 | show: ({ model }) => |
@@ -45,13 +48,13 @@ export const formSchemas: FormSchema[] = [ | @@ -45,13 +48,13 @@ export const formSchemas: FormSchema[] = [ | ||
45 | { | 48 | { |
46 | field: CreateAlarmFieldsEnum.ALARM_TYPE, | 49 | field: CreateAlarmFieldsEnum.ALARM_TYPE, |
47 | component: 'Input', | 50 | component: 'Input', |
48 | - label: CreateAlarmFieldsNameEnum.ALARM_TYPE, | 51 | + label: t(CreateAlarmFieldsNameEnum.ALARM_TYPE), |
49 | helpMessage: [ | 52 | helpMessage: [ |
50 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 53 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
51 | ], | 54 | ], |
52 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 55 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
53 | componentProps: { | 56 | componentProps: { |
54 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.ALARM_TYPE}`, | 57 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.ALARM_TYPE)}`, |
55 | }, | 58 | }, |
56 | }, | 59 | }, |
57 | { | 60 | { |
@@ -60,19 +63,19 @@ export const formSchemas: FormSchema[] = [ | @@ -60,19 +63,19 @@ export const formSchemas: FormSchema[] = [ | ||
60 | label: '', | 63 | label: '', |
61 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 64 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
62 | renderComponentContent: () => ({ | 65 | renderComponentContent: () => ({ |
63 | - default: () => CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY, | 66 | + default: () => t(CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY), |
64 | }), | 67 | }), |
65 | }, | 68 | }, |
66 | { | 69 | { |
67 | field: CreateAlarmFieldsEnum.SEVERITY, | 70 | field: CreateAlarmFieldsEnum.SEVERITY, |
68 | component: 'Input', | 71 | component: 'Input', |
69 | - label: CreateAlarmFieldsNameEnum.SEVERITY, | 72 | + label: t(CreateAlarmFieldsNameEnum.SEVERITY), |
70 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 73 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
71 | helpMessage: [ | 74 | helpMessage: [ |
72 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', | 75 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', |
73 | ], | 76 | ], |
74 | componentProps: { | 77 | componentProps: { |
75 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.SEVERITY}`, | 78 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.SEVERITY)}`, |
76 | }, | 79 | }, |
77 | }, | 80 | }, |
78 | { | 81 | { |
@@ -81,18 +84,18 @@ export const formSchemas: FormSchema[] = [ | @@ -81,18 +84,18 @@ export const formSchemas: FormSchema[] = [ | ||
81 | label: '', | 84 | label: '', |
82 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 85 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
83 | renderComponentContent: () => ({ | 86 | renderComponentContent: () => ({ |
84 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE, | 87 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE), |
85 | }), | 88 | }), |
86 | }, | 89 | }, |
87 | { | 90 | { |
88 | field: CreateAlarmFieldsEnum.RELATION_TYPES, | 91 | field: CreateAlarmFieldsEnum.RELATION_TYPES, |
89 | component: 'Select', | 92 | component: 'Select', |
90 | - label: CreateAlarmFieldsNameEnum.RELATION_TYPES, | 93 | + label: t(CreateAlarmFieldsNameEnum.RELATION_TYPES), |
91 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 94 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
92 | componentProps: { | 95 | componentProps: { |
93 | open: false, | 96 | open: false, |
94 | mode: 'tags', | 97 | mode: 'tags', |
95 | - placeholder: `请输入${CreateAlarmFieldsNameEnum.RELATION_TYPES}`, | 98 | + placeholder: `请输入${t(CreateAlarmFieldsNameEnum.RELATION_TYPES)}`, |
96 | }, | 99 | }, |
97 | }, | 100 | }, |
98 | { | 101 | { |
@@ -101,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | @@ -101,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | ||
101 | label: '', | 104 | label: '', |
102 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 105 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
103 | renderComponentContent: () => ({ | 106 | renderComponentContent: () => ({ |
104 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT, | 107 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT), |
105 | }), | 108 | }), |
106 | }, | 109 | }, |
107 | { | 110 | { |
@@ -110,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | @@ -110,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | ||
110 | label: '', | 113 | label: '', |
111 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], | 114 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
112 | renderComponentContent: () => ({ | 115 | renderComponentContent: () => ({ |
113 | - default: () => CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER, | 116 | + default: () => t(CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER), |
114 | }), | 117 | }), |
115 | }, | 118 | }, |
116 | ]; | 119 | ]; |
@@ -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 | } |
@@ -9,26 +9,29 @@ import { | @@ -9,26 +9,29 @@ import { | ||
9 | CreateRelationFieldsNameEnum, | 9 | CreateRelationFieldsNameEnum, |
10 | } from '../../../enum/formField/action'; | 10 | } from '../../../enum/formField/action'; |
11 | import { FormSchema } from '/@/components/Form'; | 11 | import { FormSchema } from '/@/components/Form'; |
12 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
13 | + | ||
14 | +const { t } = useI18n(); | ||
12 | 15 | ||
13 | export const formSchemas: FormSchema[] = [ | 16 | export const formSchemas: FormSchema[] = [ |
14 | { | 17 | { |
15 | field: CreateRelationFieldsEnum.DIRECTION, | 18 | field: CreateRelationFieldsEnum.DIRECTION, |
16 | component: 'Select', | 19 | component: 'Select', |
17 | - label: CreateRelationFieldsNameEnum.DIRECTION, | ||
18 | - required: true, | 20 | + label: t(CreateRelationFieldsNameEnum.DIRECTION), |
21 | + rules: [{ required: true, message: `请选择${t(CreateRelationFieldsNameEnum.DIRECTION)}` }], | ||
19 | componentProps: { | 22 | componentProps: { |
20 | options: Object.keys(DirectionEnum).map((value) => ({ | 23 | options: Object.keys(DirectionEnum).map((value) => ({ |
21 | label: DirectionNameEnum[value], | 24 | label: DirectionNameEnum[value], |
22 | value, | 25 | value, |
23 | })), | 26 | })), |
24 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
25 | - placeholder: `请选择${CreateRelationFieldsNameEnum.DIRECTION}`, | 28 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.DIRECTION)}`, |
26 | }, | 29 | }, |
27 | }, | 30 | }, |
28 | { | 31 | { |
29 | field: CreateRelationFieldsEnum.ENTITY_TYPE, | 32 | field: CreateRelationFieldsEnum.ENTITY_TYPE, |
30 | component: 'Select', | 33 | component: 'Select', |
31 | - label: CreateRelationFieldsNameEnum.ENTITY_TYPE, | 34 | + label: t(CreateRelationFieldsNameEnum.ENTITY_TYPE), |
32 | colProps: { span: 8 }, | 35 | colProps: { span: 8 }, |
33 | required: true, | 36 | required: true, |
34 | componentProps: { | 37 | componentProps: { |
@@ -37,28 +40,29 @@ export const formSchemas: FormSchema[] = [ | @@ -37,28 +40,29 @@ export const formSchemas: FormSchema[] = [ | ||
37 | value, | 40 | value, |
38 | })), | 41 | })), |
39 | getPopupContainer: () => document.body, | 42 | getPopupContainer: () => document.body, |
40 | - placeholder: `请选择${CreateRelationFieldsNameEnum.ENTITY_TYPE}`, | 43 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE)}`, |
41 | }, | 44 | }, |
42 | }, | 45 | }, |
43 | { | 46 | { |
44 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, | 47 | field: CreateRelationFieldsEnum.ENTITY_NAME_PATTERN, |
45 | component: 'Input', | 48 | component: 'Input', |
46 | - label: CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN, | 49 | + label: t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN), |
47 | colProps: { span: 8 }, | 50 | colProps: { span: 8 }, |
48 | - required: true, | ||
49 | helpMessage: [ | 51 | helpMessage: [ |
50 | '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', |
51 | ], | 53 | ], |
54 | + rules: [ | ||
55 | + { required: true, message: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}` }, | ||
56 | + ], | ||
52 | componentProps: { | 57 | componentProps: { |
53 | - placeholder: `请输入${CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN}`, | 58 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}`, |
54 | }, | 59 | }, |
55 | }, | 60 | }, |
56 | { | 61 | { |
57 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, | 62 | field: CreateRelationFieldsEnum.ENTITY_TYPE_PATTERN, |
58 | component: 'Input', | 63 | component: 'Input', |
59 | - label: CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN, | 64 | + label: t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN), |
60 | colProps: { span: 8 }, | 65 | colProps: { span: 8 }, |
61 | - required: true, | ||
62 | helpMessage: [ | 66 | helpMessage: [ |
63 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 67 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
64 | ], | 68 | ], |
@@ -66,25 +70,28 @@ export const formSchemas: FormSchema[] = [ | @@ -66,25 +70,28 @@ export const formSchemas: FormSchema[] = [ | ||
66 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; | 70 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; |
67 | return [EntityTypeEnum.ASSET, EntityTypeEnum.DEVICE].includes(type); | 71 | return [EntityTypeEnum.ASSET, EntityTypeEnum.DEVICE].includes(type); |
68 | }, | 72 | }, |
73 | + rules: [ | ||
74 | + { required: true, message: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)}` }, | ||
75 | + ], | ||
69 | componentProps: { | 76 | componentProps: { |
70 | - placeholder: `请选择${CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN}`, | 77 | + placeholder: `请选择${t(CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN)}`, |
71 | }, | 78 | }, |
72 | }, | 79 | }, |
73 | { | 80 | { |
74 | field: CreateRelationFieldsEnum.RELATION_TYPE, | 81 | field: CreateRelationFieldsEnum.RELATION_TYPE, |
75 | component: 'Input', | 82 | component: 'Input', |
76 | - label: CreateRelationFieldsNameEnum.RELATION_TYPE, | 83 | + label: t(CreateRelationFieldsNameEnum.RELATION_TYPE), |
77 | helpMessage: [ | 84 | helpMessage: [ |
78 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 85 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
79 | ], | 86 | ], |
80 | componentProps: { | 87 | componentProps: { |
81 | - placeholder: `请输入${CreateRelationFieldsNameEnum.RELATION_TYPE}`, | 88 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.RELATION_TYPE)}`, |
82 | }, | 89 | }, |
83 | }, | 90 | }, |
84 | { | 91 | { |
85 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, | 92 | field: CreateRelationFieldsEnum.CREATE_ENTITY_IF_NOT_EXISTS, |
86 | component: 'Checkbox', | 93 | component: 'Checkbox', |
87 | - label: CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS, | 94 | + label: t(CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS), |
88 | helpMessage: '', | 95 | helpMessage: '', |
89 | show: ({ model }) => { | 96 | show: ({ model }) => { |
90 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; | 97 | const type = model[CreateRelationFieldsEnum.ENTITY_TYPE]; |
@@ -97,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | @@ -97,7 +104,7 @@ export const formSchemas: FormSchema[] = [ | ||
97 | { | 104 | { |
98 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, | 105 | field: CreateRelationFieldsEnum.REMOVE_CURRENT_RELATIONS, |
99 | component: 'Checkbox', | 106 | component: 'Checkbox', |
100 | - label: CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS, | 107 | + label: t(CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS), |
101 | renderComponentContent: () => ({ | 108 | renderComponentContent: () => ({ |
102 | default: () => | 109 | default: () => |
103 | 'Removes current relations from the originator of the incoming message based on direction and type.', | 110 | 'Removes current relations from the originator of the incoming message based on direction and type.', |
@@ -106,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | @@ -106,7 +113,7 @@ export const formSchemas: FormSchema[] = [ | ||
106 | { | 113 | { |
107 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, | 114 | field: CreateRelationFieldsEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, |
108 | component: 'Checkbox', | 115 | component: 'Checkbox', |
109 | - label: CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY, | 116 | + label: t(CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY), |
110 | renderComponentContent: () => ({ | 117 | renderComponentContent: () => ({ |
111 | default: () => 'Used to process submitted message as a message from another entity.', | 118 | default: () => 'Used to process submitted message as a message from another entity.', |
112 | }), | 119 | }), |
@@ -114,11 +121,11 @@ export const formSchemas: FormSchema[] = [ | @@ -114,11 +121,11 @@ export const formSchemas: FormSchema[] = [ | ||
114 | { | 121 | { |
115 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 122 | field: CreateRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
116 | component: 'InputNumber', | 123 | component: 'InputNumber', |
117 | - label: CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION, | 124 | + label: t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION), |
118 | required: true, | 125 | required: true, |
119 | componentProps: { | 126 | componentProps: { |
120 | min: 0, | 127 | min: 0, |
121 | - placeholder: `请输入${CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION}`, | 128 | + placeholder: `请输入${t(CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION)}`, |
122 | }, | 129 | }, |
123 | }, | 130 | }, |
124 | ]; | 131 | ]; |
@@ -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 | } |
@@ -3,11 +3,14 @@ import { | @@ -3,11 +3,14 @@ import { | ||
3 | DelayDeprecatedFieldsNameEnum, | 3 | DelayDeprecatedFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, | 12 | field: DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, |
10 | - label: DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS, | 13 | + label: t(DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS), |
11 | component: 'Checkbox', | 14 | component: 'Checkbox', |
12 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
13 | default: () => | 16 | default: () => |
@@ -17,34 +20,43 @@ export const formSchemas: FormSchema[] = [ | @@ -17,34 +20,43 @@ export const formSchemas: FormSchema[] = [ | ||
17 | { | 20 | { |
18 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, | 21 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS_PATTERN, |
19 | component: 'Input', | 22 | component: 'Input', |
20 | - label: DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN, | ||
21 | - required: true, | 23 | + label: t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN), |
22 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 24 | ifShow: ({ model }) => model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
25 | + rules: [ | ||
26 | + { | ||
27 | + required: true, | ||
28 | + message: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN}`, | ||
29 | + }, | ||
30 | + ], | ||
23 | componentProps: { | 31 | componentProps: { |
24 | min: 0, | 32 | min: 0, |
25 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN}`, | 33 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN)}`, |
26 | }, | 34 | }, |
27 | }, | 35 | }, |
28 | { | 36 | { |
29 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, | 37 | field: DelayDeprecatedFieldsEnum.PERIOD_IN_SECONDS, |
30 | component: 'InputNumber', | 38 | component: 'InputNumber', |
31 | - label: DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS, | ||
32 | - required: true, | 39 | + label: t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS), |
33 | ifShow: ({ model }) => | 40 | ifShow: ({ model }) => |
34 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], | 41 | !model[DelayDeprecatedFieldsEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS], |
42 | + rules: [ | ||
43 | + { required: true, message: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)}` }, | ||
44 | + ], | ||
35 | componentProps: { | 45 | componentProps: { |
36 | min: 0, | 46 | min: 0, |
37 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS}`, | 47 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS)}`, |
38 | }, | 48 | }, |
39 | }, | 49 | }, |
40 | { | 50 | { |
41 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, | 51 | field: DelayDeprecatedFieldsEnum.MAX_PENDING_MSGS, |
42 | component: 'InputNumber', | 52 | component: 'InputNumber', |
43 | - label: DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS, | ||
44 | - required: true, | 53 | + label: t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS), |
54 | + rules: [ | ||
55 | + { required: true, message: `请输入${t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)}` }, | ||
56 | + ], | ||
45 | componentProps: { | 57 | componentProps: { |
46 | min: 0, | 58 | min: 0, |
47 | - placeholder: `请输入${DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS}`, | 59 | + placeholder: `请输入${t(DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS)}`, |
48 | }, | 60 | }, |
49 | }, | 61 | }, |
50 | ]; | 62 | ]; |
@@ -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 | } |
@@ -9,12 +9,15 @@ import { | @@ -9,12 +9,15 @@ import { | ||
9 | DeleteRelationFieldsNameEnum, | 9 | DeleteRelationFieldsNameEnum, |
10 | } from '../../../enum/formField/action'; | 10 | } from '../../../enum/formField/action'; |
11 | import { FormSchema } from '/@/components/Form'; | 11 | import { FormSchema } from '/@/components/Form'; |
12 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
13 | + | ||
14 | +const { t } = useI18n(); | ||
12 | 15 | ||
13 | export const formSchemas: FormSchema[] = [ | 16 | export const formSchemas: FormSchema[] = [ |
14 | { | 17 | { |
15 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, | 18 | field: DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY, |
16 | component: 'Checkbox', | 19 | component: 'Checkbox', |
17 | - label: DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY, | 20 | + label: t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY), |
18 | renderComponentContent: () => ({ | 21 | renderComponentContent: () => ({ |
19 | default: () => | 22 | default: () => |
20 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', | 23 | 'Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.', |
@@ -23,70 +26,82 @@ export const formSchemas: FormSchema[] = [ | @@ -23,70 +26,82 @@ export const formSchemas: FormSchema[] = [ | ||
23 | { | 26 | { |
24 | field: DeleteRelationFieldsEnum.DIRECTION, | 27 | field: DeleteRelationFieldsEnum.DIRECTION, |
25 | component: 'Select', | 28 | component: 'Select', |
26 | - label: DeleteRelationFieldsNameEnum.DIRECTION, | ||
27 | - required: true, | 29 | + label: t(DeleteRelationFieldsNameEnum.DIRECTION), |
28 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 30 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
31 | + rules: [ | ||
32 | + { | ||
33 | + required: true, | ||
34 | + message: `请选择${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, | ||
35 | + }, | ||
36 | + ], | ||
29 | componentProps: { | 37 | componentProps: { |
30 | options: Object.keys(DirectionEnum).map((value) => ({ | 38 | options: Object.keys(DirectionEnum).map((value) => ({ |
31 | label: DirectionNameEnum[value], | 39 | label: DirectionNameEnum[value], |
32 | value, | 40 | value, |
33 | })), | 41 | })), |
34 | getPopupContainer: () => document.body, | 42 | getPopupContainer: () => document.body, |
35 | - placeholder: `请选择${DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY}`, | 43 | + placeholder: `请选择${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, |
36 | }, | 44 | }, |
37 | }, | 45 | }, |
38 | { | 46 | { |
39 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, | 47 | field: DeleteRelationFieldsEnum.ENTITY_TYPE, |
40 | component: 'Select', | 48 | component: 'Select', |
41 | - label: DeleteRelationFieldsNameEnum.ENTITY_TYPE, | ||
42 | - required: true, | 49 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_TYPE), |
43 | colProps: { span: 12 }, | 50 | colProps: { span: 12 }, |
51 | + rules: [{ required: true, message: `请选择${t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)}` }], | ||
44 | componentProps: { | 52 | componentProps: { |
45 | options: Object.keys(EntityTypeEnum).map((value) => ({ | 53 | options: Object.keys(EntityTypeEnum).map((value) => ({ |
46 | label: EntityTypeNameEnum[value], | 54 | label: EntityTypeNameEnum[value], |
47 | value, | 55 | value, |
48 | })), | 56 | })), |
49 | getPopupContainer: () => document.body, | 57 | getPopupContainer: () => document.body, |
50 | - placeholder: `请选择${DeleteRelationFieldsNameEnum.ENTITY_TYPE}`, | 58 | + placeholder: `请选择${t(DeleteRelationFieldsNameEnum.ENTITY_TYPE)}`, |
51 | }, | 59 | }, |
52 | }, | 60 | }, |
53 | { | 61 | { |
54 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, | 62 | field: DeleteRelationFieldsEnum.ENTITY_NAME_PATTERN, |
55 | component: 'Input', | 63 | component: 'Input', |
56 | - label: DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN, | ||
57 | - required: true, | 64 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN), |
58 | colProps: { span: 12 }, | 65 | colProps: { span: 12 }, |
59 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], | 66 | show: ({ model }) => model[DeleteRelationFieldsEnum.DELETE_FOR_SINGLE_ENTITY], |
60 | helpMessage: [ | 67 | helpMessage: [ |
61 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 68 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
62 | ], | 69 | ], |
70 | + rules: [ | ||
71 | + { required: true, message: `请输入${t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}` }, | ||
72 | + ], | ||
63 | componentProps: { | 73 | componentProps: { |
64 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN}`, | 74 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN)}`, |
65 | }, | 75 | }, |
66 | }, | 76 | }, |
67 | { | 77 | { |
68 | field: DeleteRelationFieldsEnum.RELATION_TYPE, | 78 | field: DeleteRelationFieldsEnum.RELATION_TYPE, |
69 | component: 'Input', | 79 | component: 'Input', |
70 | - label: DeleteRelationFieldsNameEnum.RELATION_TYPE, | ||
71 | - required: true, | 80 | + label: t(DeleteRelationFieldsNameEnum.RELATION_TYPE), |
72 | helpMessage: [ | 81 | helpMessage: [ |
73 | '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', |
74 | ], | 83 | ], |
84 | + rules: [{ required: true, message: `请输入${t(DeleteRelationFieldsNameEnum.RELATION_TYPE)}` }], | ||
75 | componentProps: { | 85 | componentProps: { |
76 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.RELATION_TYPE}`, | 86 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.RELATION_TYPE)}`, |
77 | }, | 87 | }, |
78 | }, | 88 | }, |
79 | { | 89 | { |
80 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, | 90 | field: DeleteRelationFieldsEnum.ENTITY_CACHE_EXPIRATION, |
81 | component: 'InputNumber', | 91 | component: 'InputNumber', |
82 | - label: DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION, | ||
83 | - required: true, | 92 | + label: t(DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION), |
84 | helpMessage: [ | 93 | helpMessage: [ |
85 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', | 94 | 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.', |
86 | ], | 95 | ], |
96 | + rules: [ | ||
97 | + { | ||
98 | + required: true, | ||
99 | + message: `请输入${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, | ||
100 | + }, | ||
101 | + ], | ||
87 | componentProps: { | 102 | componentProps: { |
88 | min: 0, | 103 | min: 0, |
89 | - placeholder: `请输入${DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY}`, | 104 | + placeholder: `请输入${t(DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY)}`, |
90 | }, | 105 | }, |
91 | }, | 106 | }, |
92 | ]; | 107 | ]; |
@@ -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; |
@@ -3,6 +3,9 @@ import { | @@ -3,6 +3,9 @@ import { | ||
3 | DeviceProfileFieldsNameEnum, | 3 | DeviceProfileFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
@@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +13,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | component: 'Checkbox', | 13 | component: 'Checkbox', |
11 | label: '', | 14 | label: '', |
12 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
13 | - default: () => DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE, | 16 | + default: () => t(DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE), |
14 | }), | 17 | }), |
15 | }, | 18 | }, |
16 | { | 19 | { |
@@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | component: 'Checkbox', | 21 | component: 'Checkbox', |
19 | label: '', | 22 | label: '', |
20 | renderComponentContent: () => ({ | 23 | renderComponentContent: () => ({ |
21 | - default: () => DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START, | 24 | + default: () => t(DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START), |
22 | }), | 25 | }), |
23 | }, | 26 | }, |
24 | ]; | 27 | ]; |
@@ -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; |
@@ -3,6 +3,9 @@ import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/form | @@ -3,6 +3,9 @@ import { GeneratorFieldsEnum, GeneratorFieldsNameEnum } from '../../../enum/form | ||
3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
4 | import { getEntityIdSelect } from '../../Filter/CheckRelation/create.config'; | 4 | import { getEntityIdSelect } from '../../Filter/CheckRelation/create.config'; |
5 | 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(); | ||
6 | 9 | ||
7 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 10 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
8 | 11 | ||
@@ -10,34 +13,34 @@ export const formSchemas: FormSchema[] = [ | @@ -10,34 +13,34 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 13 | { |
11 | field: GeneratorFieldsEnum.MSG_COUNT, | 14 | field: GeneratorFieldsEnum.MSG_COUNT, |
12 | component: 'InputNumber', | 15 | component: 'InputNumber', |
13 | - label: GeneratorFieldsNameEnum.MSG_COUNT, | ||
14 | - required: true, | 16 | + label: t(GeneratorFieldsNameEnum.MSG_COUNT), |
17 | + rules: [{ required: true, message: `请输入${t(GeneratorFieldsNameEnum.MSG_COUNT)}` }], | ||
15 | componentProps: { | 18 | componentProps: { |
16 | min: 0, | 19 | min: 0, |
17 | - placeholder: `请输入${GeneratorFieldsNameEnum.MSG_COUNT}`, | 20 | + placeholder: `请输入${t(GeneratorFieldsNameEnum.MSG_COUNT)}`, |
18 | }, | 21 | }, |
19 | }, | 22 | }, |
20 | { | 23 | { |
21 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, | 24 | field: GeneratorFieldsEnum.PERIOD_IN_SECONDS, |
22 | component: 'InputNumber', | 25 | component: 'InputNumber', |
23 | - label: GeneratorFieldsNameEnum.PERIOD_IN_SECONDS, | ||
24 | - required: true, | 26 | + label: t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS), |
27 | + rules: [{ required: true, message: `请输入${t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)}` }], | ||
25 | componentProps: { | 28 | componentProps: { |
26 | min: 0, | 29 | min: 0, |
27 | - placeholder: `请输入${GeneratorFieldsNameEnum.PERIOD_IN_SECONDS}`, | 30 | + placeholder: `请输入${t(GeneratorFieldsNameEnum.PERIOD_IN_SECONDS)}`, |
28 | }, | 31 | }, |
29 | }, | 32 | }, |
30 | { | 33 | { |
31 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, | 34 | field: GeneratorFieldsEnum.ORIGINATOR_TYPE, |
32 | component: 'Select', | 35 | component: 'Select', |
33 | - label: GeneratorFieldsNameEnum.ORIGINATOR_TYPE, | 36 | + label: t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE), |
34 | colProps: { span: 8 }, | 37 | colProps: { span: 8 }, |
35 | componentProps: { | 38 | componentProps: { |
36 | options: Object.keys(EntityTypeEnum).map((value) => ({ | 39 | options: Object.keys(EntityTypeEnum).map((value) => ({ |
37 | label: EntityTypeNameEnum[value], | 40 | label: EntityTypeNameEnum[value], |
38 | value, | 41 | value, |
39 | })), | 42 | })), |
40 | - placeholder: `请选择${GeneratorFieldsNameEnum.ORIGINATOR_TYPE}`, | 43 | + placeholder: `请选择${t(GeneratorFieldsNameEnum.ORIGINATOR_TYPE)}`, |
41 | getPopupContainer: () => document.body, | 44 | getPopupContainer: () => document.body, |
42 | }, | 45 | }, |
43 | }, | 46 | }, |
@@ -54,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | @@ -54,7 +57,7 @@ export const formSchemas: FormSchema[] = [ | ||
54 | { | 57 | { |
55 | field: GeneratorFieldsEnum.JS_SCRIPT, | 58 | field: GeneratorFieldsEnum.JS_SCRIPT, |
56 | component: 'JavascriptEditorWithTestModal', | 59 | component: 'JavascriptEditorWithTestModal', |
57 | - label: GeneratorFieldsNameEnum.JS_SCRIPT, | 60 | + label: t(GeneratorFieldsNameEnum.JS_SCRIPT), |
58 | valueField: 'value', | 61 | valueField: 'value', |
59 | changeEvent: 'update:value', | 62 | changeEvent: 'update:value', |
60 | componentProps: { | 63 | 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; |
@@ -4,34 +4,49 @@ import { | @@ -4,34 +4,49 @@ import { | ||
4 | GpsGeofencingEventsFieldsNameEnum, | 4 | GpsGeofencingEventsFieldsNameEnum, |
5 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, | 13 | field: GpsGeofencingEventsFieldsEnum.LATITUDE_KEY_NAME, |
11 | component: 'Input', | 14 | component: 'Input', |
12 | - label: GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME, | ||
13 | - required: true, | 15 | + label: t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME), |
16 | + rules: [ | ||
17 | + { | ||
18 | + required: true, | ||
19 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)}`, | ||
20 | + }, | ||
21 | + ], | ||
14 | componentProps: { | 22 | componentProps: { |
15 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME}`, | 23 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME)}`, |
16 | }, | 24 | }, |
17 | }, | 25 | }, |
18 | { | 26 | { |
19 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, | 27 | field: GpsGeofencingEventsFieldsEnum.LONGITUDE_KEY_NAME, |
20 | component: 'Input', | 28 | component: 'Input', |
21 | - label: GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME, | ||
22 | - required: true, | 29 | + label: t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME), |
30 | + rules: [ | ||
31 | + { | ||
32 | + required: true, | ||
33 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)}`, | ||
34 | + }, | ||
35 | + ], | ||
23 | componentProps: { | 36 | componentProps: { |
24 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME}`, | 37 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME)}`, |
25 | }, | 38 | }, |
26 | }, | 39 | }, |
27 | { | 40 | { |
28 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, | 41 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE, |
29 | component: 'Select', | 42 | component: 'Select', |
30 | - label: GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE, | ||
31 | - required: true, | 43 | + label: t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE), |
44 | + rules: [ | ||
45 | + { required: true, message: `请选择${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)}` }, | ||
46 | + ], | ||
32 | componentProps: { | 47 | componentProps: { |
33 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), | 48 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), |
34 | - placeholder: `请选择${GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE}`, | 49 | + placeholder: `请选择${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE)}`, |
35 | }, | 50 | }, |
36 | }, | 51 | }, |
37 | { | 52 | { |
@@ -39,143 +54,178 @@ export const formSchemas: FormSchema[] = [ | @@ -39,143 +54,178 @@ export const formSchemas: FormSchema[] = [ | ||
39 | component: 'Checkbox', | 54 | component: 'Checkbox', |
40 | label: '', | 55 | label: '', |
41 | renderComponentContent: () => ({ | 56 | renderComponentContent: () => ({ |
42 | - default: () => GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA, | 57 | + default: () => |
58 | + t(GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA), | ||
43 | }), | 59 | }), |
44 | }, | 60 | }, |
45 | { | 61 | { |
46 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, | 62 | field: GpsGeofencingEventsFieldsEnum.PERIMETER_KEY_NAME, |
47 | component: 'Input', | 63 | component: 'Input', |
48 | - label: GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME, | ||
49 | - required: true, | 64 | + label: t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME), |
50 | ifShow: ({ model }) => | 65 | ifShow: ({ model }) => |
51 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && | 66 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && |
52 | model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 67 | model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
68 | + rules: [ | ||
69 | + { | ||
70 | + required: true, | ||
71 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)}`, | ||
72 | + }, | ||
73 | + ], | ||
53 | componentProps: { | 74 | componentProps: { |
54 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME}`, | 75 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME)}`, |
55 | }, | 76 | }, |
56 | }, | 77 | }, |
57 | { | 78 | { |
58 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, | 79 | field: GpsGeofencingEventsFieldsEnum.POLYGONS_DEFINITION, |
59 | component: 'Input', | 80 | component: 'Input', |
60 | - label: GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION, | 81 | + label: t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION), |
61 | helpMessage: | 82 | helpMessage: |
62 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', | 83 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', |
63 | - required: true, | ||
64 | ifShow: ({ model }) => | 84 | ifShow: ({ model }) => |
65 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && | 85 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON && |
66 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 86 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
87 | + rules: [ | ||
88 | + { | ||
89 | + required: true, | ||
90 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)}`, | ||
91 | + }, | ||
92 | + ], | ||
67 | componentProps: { | 93 | componentProps: { |
68 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION}`, | 94 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION)}`, |
69 | }, | 95 | }, |
70 | }, | 96 | }, |
71 | { | 97 | { |
72 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, | 98 | field: GpsGeofencingEventsFieldsEnum.CENTER_LATITUDE, |
73 | component: 'InputNumber', | 99 | component: 'InputNumber', |
74 | - label: GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE, | 100 | + label: t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE), |
75 | colProps: { span: 12 }, | 101 | colProps: { span: 12 }, |
76 | - required: true, | ||
77 | ifShow: ({ model }) => | 102 | ifShow: ({ model }) => |
78 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 103 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
79 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 104 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
105 | + rules: [ | ||
106 | + { required: true, message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)}` }, | ||
107 | + ], | ||
80 | componentProps: { | 108 | componentProps: { |
81 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE}`, | 109 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE)}`, |
82 | }, | 110 | }, |
83 | }, | 111 | }, |
84 | { | 112 | { |
85 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, | 113 | field: GpsGeofencingEventsFieldsEnum.CENTER_LONGITUDE, |
86 | component: 'InputNumber', | 114 | component: 'InputNumber', |
87 | - label: GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE, | 115 | + label: t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE), |
88 | colProps: { span: 12 }, | 116 | colProps: { span: 12 }, |
89 | ifShow: ({ model }) => | 117 | ifShow: ({ model }) => |
90 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 118 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
91 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 119 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
92 | componentProps: { | 120 | componentProps: { |
93 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE}`, | 121 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE)}`, |
94 | }, | 122 | }, |
95 | }, | 123 | }, |
96 | { | 124 | { |
97 | field: GpsGeofencingEventsFieldsEnum.RANGE, | 125 | field: GpsGeofencingEventsFieldsEnum.RANGE, |
98 | component: 'InputNumber', | 126 | component: 'InputNumber', |
99 | - label: GpsGeofencingEventsFieldsNameEnum.RANGE, | 127 | + label: t(GpsGeofencingEventsFieldsNameEnum.RANGE), |
100 | colProps: { span: 12 }, | 128 | colProps: { span: 12 }, |
101 | - required: true, | ||
102 | ifShow: ({ model }) => | 129 | ifShow: ({ model }) => |
103 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 130 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
104 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 131 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
132 | + rules: [{ required: true, message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.RANGE)}` }], | ||
105 | componentProps: { | 133 | componentProps: { |
106 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.RANGE}`, | 134 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.RANGE)}`, |
107 | }, | 135 | }, |
108 | }, | 136 | }, |
109 | { | 137 | { |
110 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, | 138 | field: GpsGeofencingEventsFieldsEnum.RANGE_UNIT, |
111 | component: 'Select', | 139 | component: 'Select', |
112 | - label: GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT, | 140 | + label: t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT), |
113 | colProps: { span: 12 }, | 141 | colProps: { span: 12 }, |
114 | - required: true, | ||
115 | ifShow: ({ model }) => | 142 | ifShow: ({ model }) => |
116 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 143 | model[GpsGeofencingEventsFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
117 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 144 | !model[GpsGeofencingEventsFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
145 | + rules: [ | ||
146 | + { required: true, message: `请选择${t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)}` }, | ||
147 | + ], | ||
118 | componentProps: { | 148 | componentProps: { |
119 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 149 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
120 | label: RangeUtilNameEnum[value], | 150 | label: RangeUtilNameEnum[value], |
121 | value, | 151 | value, |
122 | })), | 152 | })), |
123 | getPopupContainer: () => document.body, | 153 | getPopupContainer: () => document.body, |
124 | - placeholder: `请选择${GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT}`, | 154 | + placeholder: `请选择${t(GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT)}`, |
125 | }, | 155 | }, |
126 | }, | 156 | }, |
127 | { | 157 | { |
128 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, | 158 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION, |
129 | component: 'InputNumber', | 159 | component: 'InputNumber', |
130 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION, | 160 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION), |
131 | colProps: { span: 12 }, | 161 | colProps: { span: 12 }, |
132 | - required: true, | 162 | + rules: [ |
163 | + { | ||
164 | + required: true, | ||
165 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)}`, | ||
166 | + }, | ||
167 | + ], | ||
133 | componentProps: { | 168 | componentProps: { |
134 | min: 1, | 169 | min: 1, |
135 | max: 2147483647, | 170 | max: 2147483647, |
136 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION}`, | 171 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION)}`, |
137 | }, | 172 | }, |
138 | }, | 173 | }, |
139 | { | 174 | { |
140 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, | 175 | field: GpsGeofencingEventsFieldsEnum.MIN_INSIDE_DURATION_TIME_UNIT, |
141 | component: 'Select', | 176 | component: 'Select', |
142 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT, | 177 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT), |
143 | colProps: { span: 12 }, | 178 | colProps: { span: 12 }, |
144 | - required: true, | 179 | + rules: [ |
180 | + { | ||
181 | + required: true, | ||
182 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)}`, | ||
183 | + }, | ||
184 | + ], | ||
145 | componentProps: { | 185 | componentProps: { |
146 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 186 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
147 | label: RangeUtilNameEnum[value], | 187 | label: RangeUtilNameEnum[value], |
148 | value, | 188 | value, |
149 | })), | 189 | })), |
150 | getPopupContainer: () => document.body, | 190 | getPopupContainer: () => document.body, |
151 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT}`, | 191 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT)}`, |
152 | }, | 192 | }, |
153 | }, | 193 | }, |
154 | { | 194 | { |
155 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, | 195 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION, |
156 | component: 'InputNumber', | 196 | component: 'InputNumber', |
157 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION, | 197 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION), |
158 | colProps: { span: 12 }, | 198 | colProps: { span: 12 }, |
159 | - required: true, | 199 | + rules: [ |
200 | + { | ||
201 | + required: true, | ||
202 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)}`, | ||
203 | + }, | ||
204 | + ], | ||
160 | componentProps: { | 205 | componentProps: { |
161 | min: 1, | 206 | min: 1, |
162 | max: 2147483647, | 207 | max: 2147483647, |
163 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION}`, | 208 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION)}`, |
164 | }, | 209 | }, |
165 | }, | 210 | }, |
166 | { | 211 | { |
167 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, | 212 | field: GpsGeofencingEventsFieldsEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, |
168 | component: 'Select', | 213 | component: 'Select', |
169 | - label: GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT, | 214 | + label: t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT), |
170 | colProps: { span: 12 }, | 215 | colProps: { span: 12 }, |
171 | - required: true, | 216 | + rules: [ |
217 | + { | ||
218 | + required: true, | ||
219 | + message: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)}`, | ||
220 | + }, | ||
221 | + ], | ||
172 | componentProps: { | 222 | componentProps: { |
173 | options: Object.keys(RangeUtilEnum).map((value) => ({ | 223 | options: Object.keys(RangeUtilEnum).map((value) => ({ |
174 | label: RangeUtilNameEnum[value], | 224 | label: RangeUtilNameEnum[value], |
175 | value, | 225 | value, |
176 | })), | 226 | })), |
177 | getPopupContainer: () => document.body, | 227 | getPopupContainer: () => document.body, |
178 | - placeholder: `请输入${GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT}`, | 228 | + placeholder: `请输入${t(GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT)}`, |
179 | }, | 229 | }, |
180 | }, | 230 | }, |
181 | ]; | 231 | ]; |
@@ -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 { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | +const { t } = useI18n(); | ||
4 | 6 | ||
5 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 7 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
6 | 8 | ||
@@ -8,7 +10,7 @@ export const formSchemas: FormSchema[] = [ | @@ -8,7 +10,7 @@ export const formSchemas: FormSchema[] = [ | ||
8 | { | 10 | { |
9 | field: LogFieldsEnum.JS_SCRIPT, | 11 | field: LogFieldsEnum.JS_SCRIPT, |
10 | component: 'JavascriptEditorWithTestModal', | 12 | component: 'JavascriptEditorWithTestModal', |
11 | - label: LogFieldsNameEnum.JS_SCRIPT, | 13 | + label: t(LogFieldsNameEnum.JS_SCRIPT), |
12 | valueField: 'value', | 14 | valueField: 'value', |
13 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
14 | componentProps: { | 16 | 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 { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { MessageCountFieldsEnum, MessageCountFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | export const formSchemas: FormSchema[] = [ | 7 | export const formSchemas: FormSchema[] = [ |
5 | { | 8 | { |
6 | field: MessageCountFieldsEnum.INTERVAL, | 9 | field: MessageCountFieldsEnum.INTERVAL, |
7 | component: 'InputNumber', | 10 | component: 'InputNumber', |
8 | - label: MessageCountFieldsNameEnum.INTERVAL, | ||
9 | - required: true, | 11 | + label: t(MessageCountFieldsNameEnum.INTERVAL), |
12 | + rules: [{ required: true, message: `请输入${t(MessageCountFieldsNameEnum.INTERVAL)}` }], | ||
10 | componentProps: { | 13 | componentProps: { |
11 | step: 1, | 14 | step: 1, |
12 | precision: 0, | 15 | precision: 0, |
13 | - placeholder: `请输入${MessageCountFieldsNameEnum.INTERVAL}`, | 16 | + placeholder: `请输入${t(MessageCountFieldsNameEnum.INTERVAL)}`, |
14 | }, | 17 | }, |
15 | }, | 18 | }, |
16 | { | 19 | { |
17 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, | 20 | field: MessageCountFieldsEnum.TELEMETRY_PREFIX, |
18 | component: 'Input', | 21 | component: 'Input', |
19 | - label: MessageCountFieldsNameEnum.TELEMETRY_PREFIX, | ||
20 | - required: true, | 22 | + label: t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX), |
23 | + rules: [{ required: true, message: `请输入${t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)}` }], | ||
21 | componentProps: { | 24 | componentProps: { |
22 | - placeholder: `请输入${MessageCountFieldsNameEnum.TELEMETRY_PREFIX}`, | 25 | + placeholder: `请输入${t(MessageCountFieldsNameEnum.TELEMETRY_PREFIX)}`, |
23 | }, | 26 | }, |
24 | }, | 27 | }, |
25 | ]; | 28 | ]; |
@@ -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 { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; | 1 | import { ScopeEnum, ScopeNameEnum } from '../../../enum/form'; |
2 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } from '../../../enum/formField/action'; | 2 | import { PushToEdgeFieldsEnum, PushToEdgeFieldsNameEnum } 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 | { |
7 | field: PushToEdgeFieldsEnum.SCOPE, | 10 | field: PushToEdgeFieldsEnum.SCOPE, |
8 | component: 'Select', | 11 | component: 'Select', |
9 | - label: PushToEdgeFieldsNameEnum.SCOPE, | ||
10 | - required: true, | 12 | + label: t(PushToEdgeFieldsNameEnum.SCOPE), |
13 | + rules: [{ required: true, message: `请选择${t(PushToEdgeFieldsNameEnum.SCOPE)}` }], | ||
11 | componentProps: { | 14 | componentProps: { |
12 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 15 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
13 | getPopupContainer: () => document.body, | 16 | getPopupContainer: () => document.body, |
14 | - placeholder: `请选择${PushToEdgeFieldsNameEnum.SCOPE}`, | 17 | + placeholder: `请选择${t(PushToEdgeFieldsNameEnum.SCOPE)}`, |
15 | }, | 18 | }, |
16 | }, | 19 | }, |
17 | ]; | 20 | ]; |
@@ -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 { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; | 1 | import { RpcCallReplyFieldsEnum, RpcCallReplyFieldsNameEnum } from '../../../enum/formField/action'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | export const formSchemas: FormSchema[] = [ | 7 | export const formSchemas: FormSchema[] = [ |
5 | { | 8 | { |
6 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, | 9 | field: RpcCallReplyFieldsEnum.REQUEST_ID_META_DATA_ATTRIBUTE, |
7 | component: 'Input', | 10 | component: 'Input', |
8 | - label: RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE, | 11 | + label: t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE), |
9 | componentProps: { | 12 | componentProps: { |
10 | - placeholder: `请输入${RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE}`, | 13 | + placeholder: `请输入${t(RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE)}`, |
11 | }, | 14 | }, |
12 | }, | 15 | }, |
13 | ]; | 16 | ]; |
@@ -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 | } |
@@ -3,16 +3,19 @@ import { | @@ -3,16 +3,19 @@ import { | ||
3 | RpcCallRequestFieldsNameEnum, | 3 | RpcCallRequestFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, | 12 | field: RpcCallRequestFieldsEnum.TIMEOUT_IN_SECONDS, |
10 | component: 'InputNumber', | 13 | component: 'InputNumber', |
11 | - label: RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS, | 14 | + label: t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS), |
12 | required: true, | 15 | required: true, |
13 | componentProps: { | 16 | componentProps: { |
14 | min: 0, | 17 | min: 0, |
15 | - placeholder: `请输入${RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS}`, | 18 | + placeholder: `请输入${t(RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS)}`, |
16 | }, | 19 | }, |
17 | }, | 20 | }, |
18 | ]; | 21 | ]; |
@@ -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 | } |
@@ -4,23 +4,26 @@ import { | @@ -4,23 +4,26 @@ import { | ||
4 | SaveAttributesFieldsNameEnum, | 4 | SaveAttributesFieldsNameEnum, |
5 | } from '../../../enum/formField/action'; | 5 | } from '../../../enum/formField/action'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: SaveAttributesFieldsEnum.SCOPE, | 13 | field: SaveAttributesFieldsEnum.SCOPE, |
11 | component: 'Select', | 14 | component: 'Select', |
12 | - label: SaveAttributesFieldsNameEnum.SCOPE, | 15 | + label: t(SaveAttributesFieldsNameEnum.SCOPE), |
13 | required: true, | 16 | required: true, |
14 | componentProps: { | 17 | componentProps: { |
15 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), | 18 | options: Object.keys(ScopeEnum).map((value) => ({ label: ScopeNameEnum[value], value })), |
16 | getPopupContainer: () => document.body, | 19 | getPopupContainer: () => document.body, |
17 | - placeholder: `请选择${SaveAttributesFieldsNameEnum.SCOPE}`, | 20 | + placeholder: `请选择${t(SaveAttributesFieldsNameEnum.SCOPE)}`, |
18 | }, | 21 | }, |
19 | }, | 22 | }, |
20 | { | 23 | { |
21 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, | 24 | field: SaveAttributesFieldsEnum.NOTIFY_DEVICE, |
22 | component: 'Checkbox', | 25 | component: 'Checkbox', |
23 | - label: SaveAttributesFieldsNameEnum.NOTIFY_DEVICE, | 26 | + label: t(SaveAttributesFieldsNameEnum.NOTIFY_DEVICE), |
24 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, | 27 | ifShow: ({ model }) => model[SaveAttributesFieldsEnum.SCOPE] === ScopeEnum.SHARED_SCOPE, |
25 | renderComponentContent: () => ({ | 28 | renderComponentContent: () => ({ |
26 | default: () => | 29 | 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: 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 | } |
@@ -3,16 +3,19 @@ import { | @@ -3,16 +3,19 @@ import { | ||
3 | SaveTimeseriesFieldsNameEnum, | 3 | SaveTimeseriesFieldsNameEnum, |
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, | 12 | field: SaveTimeseriesFieldsEnum.DEFAULT_TTL, |
10 | component: 'InputNumber', | 13 | component: 'InputNumber', |
11 | - label: SaveTimeseriesFieldsNameEnum.DEFAULT_TTL, | 14 | + label: t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL), |
12 | required: true, | 15 | required: true, |
13 | componentProps: { | 16 | componentProps: { |
14 | min: 0, | 17 | min: 0, |
15 | - placeholder: `请输入${SaveTimeseriesFieldsNameEnum.DEFAULT_TTL}`, | 18 | + placeholder: `请输入${t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL)}`, |
16 | }, | 19 | }, |
17 | }, | 20 | }, |
18 | { | 21 | { |
@@ -20,13 +23,13 @@ export const formSchemas: FormSchema[] = [ | @@ -20,13 +23,13 @@ export const formSchemas: FormSchema[] = [ | ||
20 | component: 'Checkbox', | 23 | component: 'Checkbox', |
21 | label: '', | 24 | label: '', |
22 | renderComponentContent: () => ({ | 25 | renderComponentContent: () => ({ |
23 | - default: () => SaveTimeseriesFieldsNameEnum.DEFAULT_TTL, | 26 | + default: () => t(SaveTimeseriesFieldsNameEnum.DEFAULT_TTL), |
24 | }), | 27 | }), |
25 | }, | 28 | }, |
26 | { | 29 | { |
27 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, | 30 | field: SaveTimeseriesFieldsEnum.USE_SERVER_TS, |
28 | component: 'Checkbox', | 31 | component: 'Checkbox', |
29 | - label: SaveTimeseriesFieldsNameEnum.USE_SERVER_TS, | 32 | + label: t(SaveTimeseriesFieldsNameEnum.USE_SERVER_TS), |
30 | renderComponentContent: () => ({ | 33 | renderComponentContent: () => ({ |
31 | default: () => | 34 | 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).', | 35 | 'Enable this setting to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).', |
@@ -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 | } |
@@ -5,22 +5,25 @@ import { | @@ -5,22 +5,25 @@ import { | ||
5 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; | 5 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; |
6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 6 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
7 | import { isObject } from '/@/utils/is'; | 7 | import { isObject } from '/@/utils/is'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
8 | 11 | ||
9 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 12 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
10 | export const formSchemas: FormSchema[] = [ | 13 | export const formSchemas: FormSchema[] = [ |
11 | { | 14 | { |
12 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, | 15 | field: SaveToCustomTableFieldsEnum.TABLE_NAME, |
13 | component: 'Input', | 16 | component: 'Input', |
14 | - label: SaveToCustomTableFieldsNameEnum.TABLE_NAME, | 17 | + label: t(SaveToCustomTableFieldsNameEnum.TABLE_NAME), |
15 | required: true, | 18 | required: true, |
16 | componentProps: { | 19 | componentProps: { |
17 | - placeholder: `请输入${SaveToCustomTableFieldsEnum.TABLE_NAME}`, | 20 | + placeholder: `请输入${t(SaveToCustomTableFieldsNameEnum.TABLE_NAME)}`, |
18 | }, | 21 | }, |
19 | }, | 22 | }, |
20 | { | 23 | { |
21 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, | 24 | field: SaveToCustomTableFieldsEnum.FIELDS_MAPPING, |
22 | component: 'AttributeConfiguration', | 25 | component: 'AttributeConfiguration', |
23 | - label: SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING, | 26 | + label: t(SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING), |
24 | required: true, | 27 | required: true, |
25 | valueField: 'value', | 28 | valueField: 'value', |
26 | changeEvent: 'update:value', | 29 | 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 | } |
@@ -4,31 +4,34 @@ import { | @@ -4,31 +4,34 @@ import { | ||
4 | } from '../../../enum/formField/action'; | 4 | } from '../../../enum/formField/action'; |
5 | 5 | ||
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, | 13 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN, |
11 | - label: UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN, | 14 | + label: t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN), |
12 | component: 'Input', | 15 | component: 'Input', |
13 | required: true, | 16 | required: true, |
14 | helpMessage: [ | 17 | helpMessage: [ |
15 | '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', |
16 | ], | 19 | ], |
17 | componentProps: { | 20 | componentProps: { |
18 | - placeholder: `请输入${UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN}`, | 21 | + placeholder: `请输入${t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN)}`, |
19 | }, | 22 | }, |
20 | }, | 23 | }, |
21 | { | 24 | { |
22 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, | 25 | field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION, |
23 | component: 'InputNumber', | 26 | component: 'InputNumber', |
24 | - label: UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION, | 27 | + label: t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION), |
25 | required: true, | 28 | required: true, |
26 | helpMessage: [ | 29 | helpMessage: [ |
27 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', | 30 | 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.', |
28 | ], | 31 | ], |
29 | componentProps: { | 32 | componentProps: { |
30 | min: 0, | 33 | min: 0, |
31 | - placeholder: `请输入${UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION}`, | 34 | + placeholder: `请输入${t(UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION)}`, |
32 | }, | 35 | }, |
33 | }, | 36 | }, |
34 | ]; | 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(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'), |
@@ -3,37 +3,44 @@ import { | @@ -3,37 +3,44 @@ import { | ||
3 | CalculateDeltaFieldsNameEnum, | 3 | CalculateDeltaFieldsNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 4 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, | 12 | field: CalculateDeltaFieldsEnum.INPUT_VALUE_KEY, |
10 | component: 'Input', | 13 | component: 'Input', |
11 | - label: CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY, | ||
12 | - required: true, | 14 | + label: t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY), |
13 | colProps: { span: 8 }, | 15 | colProps: { span: 8 }, |
16 | + rules: [ | ||
17 | + { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}` }, | ||
18 | + ], | ||
14 | componentProps: { | 19 | componentProps: { |
15 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY}`, | 20 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY)}`, |
16 | }, | 21 | }, |
17 | }, | 22 | }, |
18 | { | 23 | { |
19 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, | 24 | field: CalculateDeltaFieldsEnum.OUTPUT_VALUE_KEY, |
20 | component: 'Input', | 25 | component: 'Input', |
21 | - label: CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY, | ||
22 | - required: true, | 26 | + label: t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY), |
23 | colProps: { span: 8 }, | 27 | colProps: { span: 8 }, |
28 | + rules: [ | ||
29 | + { required: true, message: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}` }, | ||
30 | + ], | ||
24 | componentProps: { | 31 | componentProps: { |
25 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY}`, | 32 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY)}`, |
26 | }, | 33 | }, |
27 | }, | 34 | }, |
28 | { | 35 | { |
29 | field: CalculateDeltaFieldsEnum.ROUND, | 36 | field: CalculateDeltaFieldsEnum.ROUND, |
30 | component: 'InputNumber', | 37 | component: 'InputNumber', |
31 | - label: CalculateDeltaFieldsNameEnum.ROUND, | 38 | + label: t(CalculateDeltaFieldsNameEnum.ROUND), |
32 | colProps: { span: 8 }, | 39 | colProps: { span: 8 }, |
33 | componentProps: { | 40 | componentProps: { |
34 | step: 1, | 41 | step: 1, |
35 | max: 15, | 42 | max: 15, |
36 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.ROUND}`, | 43 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.ROUND)}`, |
37 | }, | 44 | }, |
38 | }, | 45 | }, |
39 | { | 46 | { |
@@ -42,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | @@ -42,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | ||
42 | label: '', | 49 | label: '', |
43 | renderComponentContent: () => { | 50 | renderComponentContent: () => { |
44 | return { | 51 | return { |
45 | - default: () => CalculateDeltaFieldsNameEnum.USE_CACHE, | 52 | + default: () => t(CalculateDeltaFieldsNameEnum.USE_CACHE), |
46 | }; | 53 | }; |
47 | }, | 54 | }, |
48 | }, | 55 | }, |
@@ -52,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | @@ -52,7 +59,7 @@ export const formSchemas: FormSchema[] = [ | ||
52 | label: '', | 59 | label: '', |
53 | renderComponentContent: () => { | 60 | renderComponentContent: () => { |
54 | return { | 61 | return { |
55 | - default: () => CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE, | 62 | + default: () => t(CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE), |
56 | }; | 63 | }; |
57 | }, | 64 | }, |
58 | }, | 65 | }, |
@@ -62,18 +69,18 @@ export const formSchemas: FormSchema[] = [ | @@ -62,18 +69,18 @@ export const formSchemas: FormSchema[] = [ | ||
62 | label: '', | 69 | label: '', |
63 | renderComponentContent: () => { | 70 | renderComponentContent: () => { |
64 | return { | 71 | return { |
65 | - default: () => CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS, | 72 | + default: () => t(CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS), |
66 | }; | 73 | }; |
67 | }, | 74 | }, |
68 | }, | 75 | }, |
69 | { | 76 | { |
70 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, | 77 | field: CalculateDeltaFieldsEnum.PERIOD_VALUE_KEY, |
71 | component: 'Input', | 78 | component: 'Input', |
72 | - label: CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY, | 79 | + label: t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY), |
73 | required: true, | 80 | required: true, |
74 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], | 81 | ifShow: ({ model }) => model[CalculateDeltaFieldsEnum.ADD_PERIOD_BETWEEN_MSGS], |
75 | componentProps: { | 82 | componentProps: { |
76 | - placeholder: `请输入${CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY}`, | 83 | + placeholder: `请输入${t(CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY)}`, |
77 | }, | 84 | }, |
78 | }, | 85 | }, |
79 | ]; | 86 | ]; |
@@ -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 | } |
@@ -3,8 +3,11 @@ import { | @@ -3,8 +3,11 @@ import { | ||
3 | CustomerAttributesFieldsNameEnum, | 3 | CustomerAttributesFieldsNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 4 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 7 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
7 | 8 | ||
9 | +const { t } = useI18n(); | ||
10 | + | ||
8 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 11 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
9 | 12 | ||
10 | export const formSchemas: FormSchema[] = [ | 13 | export const formSchemas: FormSchema[] = [ |
@@ -14,14 +17,14 @@ export const formSchemas: FormSchema[] = [ | @@ -14,14 +17,14 @@ export const formSchemas: FormSchema[] = [ | ||
14 | label: '', | 17 | label: '', |
15 | renderComponentContent: () => { | 18 | renderComponentContent: () => { |
16 | return { | 19 | return { |
17 | - default: () => CustomerAttributesFieldsNameEnum.TELEMETRY, | 20 | + default: () => t(CustomerAttributesFieldsNameEnum.TELEMETRY), |
18 | }; | 21 | }; |
19 | }, | 22 | }, |
20 | }, | 23 | }, |
21 | { | 24 | { |
22 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, | 25 | field: CustomerAttributesFieldsEnum.ATTR_MAPING, |
23 | component: 'AttributeConfiguration', | 26 | component: 'AttributeConfiguration', |
24 | - label: CustomerAttributesFieldsNameEnum.ATTR_MAPING, | 27 | + label: t(CustomerAttributesFieldsNameEnum.ATTR_MAPING), |
25 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, | 28 | slot: CustomerAttributesFieldsEnum.ATTR_MAPING, |
26 | valueField: 'value', | 29 | valueField: 'value', |
27 | 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(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 | } |
@@ -4,13 +4,16 @@ import { | @@ -4,13 +4,16 @@ import { | ||
4 | CustomerDetailsFieldsNameEnum, | 4 | CustomerDetailsFieldsNameEnum, |
5 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, | 13 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, |
11 | component: 'Select', | 14 | component: 'Select', |
12 | - label: CustomerDetailsFieldsNameEnum.DETAILS_LIST, | ||
13 | - required: true, //ft修改为必传 | 15 | + label: t(CustomerDetailsFieldsNameEnum.DETAILS_LIST), |
16 | + rules: [{ required: true, message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}` }], | ||
14 | componentProps: { | 17 | componentProps: { |
15 | mode: 'multiple', | 18 | mode: 'multiple', |
16 | options: Object.keys(DetailsListEnum).map((item) => ({ | 19 | options: Object.keys(DetailsListEnum).map((item) => ({ |
@@ -18,6 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,6 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | value: item, | 21 | value: item, |
19 | })), | 22 | })), |
20 | getPopupContainer: () => document.body, | 23 | getPopupContainer: () => document.body, |
24 | + placeholder: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}`, | ||
21 | }, | 25 | }, |
22 | }, | 26 | }, |
23 | { | 27 | { |
@@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +30,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | label: '', | 30 | label: '', |
27 | renderComponentContent: () => { | 31 | renderComponentContent: () => { |
28 | return { | 32 | return { |
29 | - default: () => CustomerDetailsFieldsNameEnum.ADD_TO_METADATA, | 33 | + default: () => t(CustomerDetailsFieldsNameEnum.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.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 | } |
@@ -3,12 +3,15 @@ import { | @@ -3,12 +3,15 @@ import { | ||
3 | OriginatorAttributesNameEnum, | 3 | OriginatorAttributesNameEnum, |
4 | } from '../../../enum/formField/enrichment'; | 4 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, | 12 | field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, |
10 | component: 'Checkbox', | 13 | component: 'Checkbox', |
11 | - label: OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT, | 14 | + label: t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT), |
12 | renderComponentContent: () => ({ | 15 | renderComponentContent: () => ({ |
13 | default: () => | 16 | default: () => |
14 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', | 17 | 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', |
@@ -17,59 +20,59 @@ export const formSchemas: FormSchema[] = [ | @@ -17,59 +20,59 @@ export const formSchemas: FormSchema[] = [ | ||
17 | { | 20 | { |
18 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, | 21 | field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, |
19 | component: 'Select', | 22 | component: 'Select', |
20 | - label: OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES, | 23 | + label: t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES), |
21 | helpMessage: [ | 24 | helpMessage: [ |
22 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 25 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
23 | ], | 26 | ], |
24 | componentProps: { | 27 | componentProps: { |
25 | mode: 'tags', | 28 | mode: 'tags', |
26 | open: false, | 29 | open: false, |
27 | - placeholder: `请输入${OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES}`, | 30 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)}`, |
28 | }, | 31 | }, |
29 | }, | 32 | }, |
30 | { | 33 | { |
31 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, | 34 | field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, |
32 | component: 'Select', | 35 | component: 'Select', |
33 | - label: OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES, | 36 | + label: t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES), |
34 | helpMessage: [ | 37 | helpMessage: [ |
35 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 38 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
36 | ], | 39 | ], |
37 | componentProps: { | 40 | componentProps: { |
38 | mode: 'tags', | 41 | mode: 'tags', |
39 | open: false, | 42 | open: false, |
40 | - placeholder: `请输入${OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES}`, | 43 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)}`, |
41 | }, | 44 | }, |
42 | }, | 45 | }, |
43 | { | 46 | { |
44 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, | 47 | field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, |
45 | component: 'Select', | 48 | component: 'Select', |
46 | - label: OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES, | 49 | + label: t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES), |
47 | helpMessage: [ | 50 | helpMessage: [ |
48 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 51 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
49 | ], | 52 | ], |
50 | componentProps: { | 53 | componentProps: { |
51 | mode: 'tags', | 54 | mode: 'tags', |
52 | open: false, | 55 | open: false, |
53 | - placeholder: `请输入${OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES}`, | 56 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)}`, |
54 | }, | 57 | }, |
55 | }, | 58 | }, |
56 | { | 59 | { |
57 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, | 60 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, |
58 | component: 'Select', | 61 | component: 'Select', |
59 | - label: OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES, | 62 | + label: t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES), |
60 | helpMessage: [ | 63 | helpMessage: [ |
61 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | 64 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
62 | ], | 65 | ], |
63 | componentProps: { | 66 | componentProps: { |
64 | mode: 'tags', | 67 | mode: 'tags', |
65 | open: false, | 68 | open: false, |
66 | - placeholder: `请输入${OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES}`, | 69 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES)}`, |
67 | }, | 70 | }, |
68 | }, | 71 | }, |
69 | { | 72 | { |
70 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, | 73 | field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS, |
71 | component: 'Checkbox', | 74 | component: 'Checkbox', |
72 | - label: OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS, | 75 | + label: t(OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS), |
73 | renderComponentContent: () => ({ | 76 | renderComponentContent: () => ({ |
74 | default: () => | 77 | default: () => |
75 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', | 78 | 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"', |
@@ -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 { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; | 1 | import { OriginatorFieldsEnum, OriginatorFieldsNameEnum } from '../../../enum/formField/enrichment'; |
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 3 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
4 | 7 | ||
5 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 8 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
6 | 9 | ||
@@ -8,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | @@ -8,7 +11,7 @@ export const formSchemas: FormSchema[] = [ | ||
8 | { | 11 | { |
9 | field: OriginatorFieldsEnum.FIELDS_MAPPING, | 12 | field: OriginatorFieldsEnum.FIELDS_MAPPING, |
10 | component: 'AttributeConfiguration', | 13 | component: 'AttributeConfiguration', |
11 | - label: OriginatorFieldsNameEnum.FIELDS_MAPPING, | 14 | + label: t(OriginatorFieldsNameEnum.FIELDS_MAPPING), |
12 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, | 15 | slot: OriginatorFieldsEnum.FIELDS_MAPPING, |
13 | valueField: 'value', | 16 | valueField: 'value', |
14 | changeEvent: 'update:value', | 17 | 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 | } |
@@ -11,72 +11,79 @@ import { | @@ -11,72 +11,79 @@ import { | ||
11 | OriginatorTelemetryFieldsNameEnum, | 11 | OriginatorTelemetryFieldsNameEnum, |
12 | } from '../../../enum/formField/enrichment'; | 12 | } from '../../../enum/formField/enrichment'; |
13 | import { FormSchema } from '/@/components/Form'; | 13 | import { FormSchema } from '/@/components/Form'; |
14 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
15 | + | ||
16 | +const { t } = useI18n(); | ||
14 | 17 | ||
15 | export const formSchemas: FormSchema[] = [ | 18 | export const formSchemas: FormSchema[] = [ |
16 | { | 19 | { |
17 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, | 20 | field: OriginatorTelemetryFieldsEnum.LATEST_TS_KEY_NAMES, |
18 | component: 'Select', | 21 | component: 'Select', |
19 | - label: OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES, | 22 | + label: t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES), |
20 | componentProps: { | 23 | componentProps: { |
21 | mode: 'tags', | 24 | mode: 'tags', |
22 | open: false, | 25 | open: false, |
23 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES}`, | 26 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES)}`, |
24 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
25 | }, | 28 | }, |
26 | }, | 29 | }, |
27 | { | 30 | { |
28 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, | 31 | field: OriginatorTelemetryFieldsEnum.FETCH_MODE, |
29 | component: 'Select', | 32 | component: 'Select', |
30 | - label: OriginatorTelemetryFieldsNameEnum.FETCH_MODE, | ||
31 | - required: true, | 33 | + label: t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE), |
34 | + rules: [ | ||
35 | + { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}` }, | ||
36 | + ], | ||
32 | componentProps: { | 37 | componentProps: { |
33 | options: Object.keys(FetchModeEnum).map((value) => ({ label: value, value })), | 38 | options: Object.keys(FetchModeEnum).map((value) => ({ label: value, value })), |
34 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}`, | 39 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.FETCH_MODE)}`, |
35 | getPopupContainer: () => document.body, | 40 | getPopupContainer: () => document.body, |
36 | }, | 41 | }, |
37 | }, | 42 | }, |
38 | { | 43 | { |
39 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, | 44 | field: OriginatorTelemetryFieldsEnum.AGGREGATION, |
40 | component: 'Select', | 45 | component: 'Select', |
41 | - label: OriginatorTelemetryFieldsNameEnum.AGGREGATION, | ||
42 | - required: true, | 46 | + label: t(OriginatorTelemetryFieldsNameEnum.AGGREGATION), |
43 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 47 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
48 | + rules: [ | ||
49 | + { required: true, message: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}` }, | ||
50 | + ], | ||
44 | componentProps: { | 51 | componentProps: { |
45 | options: Object.keys(AggregationEnum).map((value) => ({ | 52 | options: Object.keys(AggregationEnum).map((value) => ({ |
46 | label: AggregationNameEnum[value], | 53 | label: AggregationNameEnum[value], |
47 | value, | 54 | value, |
48 | })), | 55 | })), |
49 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.AGGREGATION}`, | 56 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.AGGREGATION)}`, |
50 | getPopupContainer: () => document.body, | 57 | getPopupContainer: () => document.body, |
51 | }, | 58 | }, |
52 | }, | 59 | }, |
53 | { | 60 | { |
54 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, | 61 | field: OriginatorTelemetryFieldsEnum.ORDER_BY, |
55 | component: 'Select', | 62 | component: 'Select', |
56 | - label: OriginatorTelemetryFieldsNameEnum.ORDER_BY, | ||
57 | - required: true, | 63 | + label: t(OriginatorTelemetryFieldsNameEnum.ORDER_BY), |
58 | helpMessage: ['Select to choose telemetry sampling order.'], | 64 | helpMessage: ['Select to choose telemetry sampling order.'], |
59 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 65 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
66 | + rules: [{ required: true, message: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}` }], | ||
60 | componentProps: { | 67 | componentProps: { |
61 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), | 68 | options: Object.keys(OrderByEnum).map((value) => ({ label: value, value })), |
62 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.FETCH_MODE}`, | 69 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.ORDER_BY)}`, |
63 | getPopupContainer: () => document.body, | 70 | getPopupContainer: () => document.body, |
64 | }, | 71 | }, |
65 | }, | 72 | }, |
66 | { | 73 | { |
67 | field: OriginatorTelemetryFieldsEnum.LIMIT, | 74 | field: OriginatorTelemetryFieldsEnum.LIMIT, |
68 | component: 'InputNumber', | 75 | component: 'InputNumber', |
69 | - label: OriginatorTelemetryFieldsNameEnum.LIMIT, | ||
70 | - required: true, | 76 | + label: t(OriginatorTelemetryFieldsNameEnum.LIMIT), |
71 | helpMessage: [ | 77 | helpMessage: [ |
72 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", | 78 | "Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.", |
73 | ], | 79 | ], |
74 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, | 80 | show: ({ model }) => model[OriginatorTelemetryFieldsEnum.FETCH_MODE] === FetchModeEnum.ALL, |
81 | + rules: [{ required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.LIMIT)}` }], | ||
75 | componentProps: { | 82 | componentProps: { |
76 | min: 2, | 83 | min: 2, |
77 | max: 1000, | 84 | max: 1000, |
78 | step: 1, | 85 | step: 1, |
79 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.LIMIT}`, | 86 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.LIMIT)}`, |
80 | }, | 87 | }, |
81 | }, | 88 | }, |
82 | { | 89 | { |
@@ -84,91 +91,115 @@ export const formSchemas: FormSchema[] = [ | @@ -84,91 +91,115 @@ export const formSchemas: FormSchema[] = [ | ||
84 | component: 'Checkbox', | 91 | component: 'Checkbox', |
85 | label: '', | 92 | label: '', |
86 | renderComponentContent: () => ({ | 93 | renderComponentContent: () => ({ |
87 | - default: () => OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS, | 94 | + default: () => t(OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS), |
88 | }), | 95 | }), |
89 | }, | 96 | }, |
90 | { | 97 | { |
91 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, | 98 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL, |
92 | component: 'InputNumber', | 99 | component: 'InputNumber', |
93 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL, | 100 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL), |
94 | colProps: { span: 12 }, | 101 | colProps: { span: 12 }, |
95 | - required: true, | ||
96 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 102 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
103 | + rules: [ | ||
104 | + { required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)}` }, | ||
105 | + ], | ||
97 | componentProps: { | 106 | componentProps: { |
98 | step: 1, | 107 | step: 1, |
99 | min: 0, | 108 | min: 0, |
100 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL}`, | 109 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL)}`, |
101 | }, | 110 | }, |
102 | }, | 111 | }, |
103 | { | 112 | { |
104 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, | 113 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_TIME_UNIT, |
105 | component: 'Select', | 114 | component: 'Select', |
106 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT, | 115 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT), |
107 | colProps: { span: 12 }, | 116 | colProps: { span: 12 }, |
108 | - required: true, | ||
109 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 117 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
118 | + rules: [ | ||
119 | + { | ||
120 | + required: true, | ||
121 | + message: `请选择${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)}`, | ||
122 | + }, | ||
123 | + ], | ||
110 | componentProps: { | 124 | componentProps: { |
111 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | 125 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ |
112 | label: TimeIntervalUnitNameEnum[value], | 126 | label: TimeIntervalUnitNameEnum[value], |
113 | value, | 127 | value, |
114 | })), | 128 | })), |
115 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT}`, | 129 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT)}`, |
116 | getPopupContainer: () => document.body, | 130 | getPopupContainer: () => document.body, |
117 | }, | 131 | }, |
118 | }, | 132 | }, |
119 | { | 133 | { |
120 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, | 134 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL, |
121 | component: 'InputNumber', | 135 | component: 'InputNumber', |
122 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL, | 136 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL), |
123 | colProps: { span: 12 }, | 137 | colProps: { span: 12 }, |
124 | - required: true, | ||
125 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 138 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
139 | + rules: [ | ||
140 | + { required: true, message: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)}` }, | ||
141 | + ], | ||
126 | componentProps: { | 142 | componentProps: { |
127 | step: 1, | 143 | step: 1, |
128 | min: 0, | 144 | min: 0, |
129 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.END_INTERVAL}`, | 145 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL)}`, |
130 | }, | 146 | }, |
131 | }, | 147 | }, |
132 | { | 148 | { |
133 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, | 149 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_TIME_UNIT, |
134 | component: 'Select', | 150 | component: 'Select', |
135 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT, | 151 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT), |
136 | colProps: { span: 12 }, | 152 | colProps: { span: 12 }, |
137 | - required: true, | ||
138 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 153 | show: ({ model }) => !model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
154 | + rules: [ | ||
155 | + { | ||
156 | + required: true, | ||
157 | + message: `请选择${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)}`, | ||
158 | + }, | ||
159 | + ], | ||
139 | componentProps: { | 160 | componentProps: { |
140 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | 161 | options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ |
141 | label: TimeIntervalUnitNameEnum[value], | 162 | label: TimeIntervalUnitNameEnum[value], |
142 | value, | 163 | value, |
143 | })), | 164 | })), |
144 | - placeholder: `请选择${OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT}`, | 165 | + placeholder: `请选择${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT)}`, |
145 | getPopupContainer: () => document.body, | 166 | getPopupContainer: () => document.body, |
146 | }, | 167 | }, |
147 | }, | 168 | }, |
148 | { | 169 | { |
149 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, | 170 | field: OriginatorTelemetryFieldsEnum.START_INTERVAL_PATTERN, |
150 | component: 'Input', | 171 | component: 'Input', |
151 | - label: OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN, | ||
152 | - required: true, | 172 | + label: t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN), |
153 | helpMessage: [ | 173 | helpMessage: [ |
154 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 174 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
155 | ], | 175 | ], |
156 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 176 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
177 | + rules: [ | ||
178 | + { | ||
179 | + required: true, | ||
180 | + message: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)}`, | ||
181 | + }, | ||
182 | + ], | ||
157 | componentProps: { | 183 | componentProps: { |
158 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN}`, | 184 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN)}`, |
159 | }, | 185 | }, |
160 | }, | 186 | }, |
161 | { | 187 | { |
162 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, | 188 | field: OriginatorTelemetryFieldsEnum.END_INTERVAL_PATTERN, |
163 | component: 'Input', | 189 | component: 'Input', |
164 | - label: OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN, | ||
165 | - required: true, | 190 | + label: t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN), |
166 | helpMessage: [ | 191 | helpMessage: [ |
167 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 192 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
168 | ], | 193 | ], |
194 | + rules: [ | ||
195 | + { | ||
196 | + required: true, | ||
197 | + message: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)}`, | ||
198 | + }, | ||
199 | + ], | ||
169 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], | 200 | ifShow: ({ model }) => model[OriginatorTelemetryFieldsEnum.USE_METADATA_INTERVAL_PATTERNS], |
170 | componentProps: { | 201 | componentProps: { |
171 | - placeholder: `请输入${OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN}`, | 202 | + placeholder: `请输入${t(OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN)}`, |
172 | }, | 203 | }, |
173 | }, | 204 | }, |
174 | ]; | 205 | ]; |
@@ -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 | } |
@@ -6,6 +6,9 @@ import { | @@ -6,6 +6,9 @@ import { | ||
6 | RelatedAttributesFieldsNameEnum, | 6 | RelatedAttributesFieldsNameEnum, |
7 | } from '../../../enum/formField/enrichment'; | 7 | } from '../../../enum/formField/enrichment'; |
8 | 8 | ||
9 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
10 | +const { t } = useI18n(); | ||
11 | + | ||
9 | useComponentRegister('RelationsQuery', RelationsQuery); | 12 | useComponentRegister('RelationsQuery', RelationsQuery); |
10 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 13 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
11 | 14 | ||
@@ -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: 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 | } |
@@ -11,6 +11,9 @@ import { | @@ -11,6 +11,9 @@ import { | ||
11 | 11 | ||
12 | import { getDeviceTypes } from '/@/api/ruleChainDesigner'; | 12 | import { getDeviceTypes } from '/@/api/ruleChainDesigner'; |
13 | import { FormSchema } from '/@/components/Form'; | 13 | import { FormSchema } from '/@/components/Form'; |
14 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
15 | + | ||
16 | +const { t } = useI18n(); | ||
14 | 17 | ||
15 | export interface ValueType { | 18 | export interface ValueType { |
16 | deviceRelationsQuery: DeviceRelationsQuery; | 19 | deviceRelationsQuery: DeviceRelationsQuery; |
@@ -36,58 +39,63 @@ export const formSchemas: FormSchema[] = [ | @@ -36,58 +39,63 @@ export const formSchemas: FormSchema[] = [ | ||
36 | component: 'Checkbox', | 39 | component: 'Checkbox', |
37 | label: '', | 40 | label: '', |
38 | renderComponentContent: () => ({ | 41 | renderComponentContent: () => ({ |
39 | - default: () => RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY, | 42 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY), |
40 | }), | 43 | }), |
41 | }, | 44 | }, |
42 | { | 45 | { |
43 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, | 46 | field: RelatedDeviceAttributeFieldsEnum.DIRECTION, |
44 | component: 'Select', | 47 | component: 'Select', |
45 | - label: RelatedDeviceAttributeFieldsNameEnum.DIRECTION, | ||
46 | - required: true, | 48 | + label: t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION), |
47 | colProps: { span: 12 }, | 49 | colProps: { span: 12 }, |
50 | + rules: [ | ||
51 | + { | ||
52 | + required: true, | ||
53 | + message: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY)}`, | ||
54 | + }, | ||
55 | + ], | ||
48 | componentProps: { | 56 | componentProps: { |
49 | options: Object.keys(DirectionEnum).map((value) => ({ | 57 | options: Object.keys(DirectionEnum).map((value) => ({ |
50 | label: DirectionNameEnum[value], | 58 | label: DirectionNameEnum[value], |
51 | value, | 59 | value, |
52 | })), | 60 | })), |
53 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.DIRECTION}`, | 61 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.DIRECTION)}`, |
54 | getPopupContainer: () => document.body, | 62 | getPopupContainer: () => document.body, |
55 | }, | 63 | }, |
56 | }, | 64 | }, |
57 | { | 65 | { |
58 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, | 66 | field: RelatedDeviceAttributeFieldsEnum.MAX_LEVEL, |
59 | component: 'InputNumber', | 67 | component: 'InputNumber', |
60 | - label: RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL, | 68 | + label: t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL), |
61 | colProps: { span: 12 }, | 69 | colProps: { span: 12 }, |
62 | componentProps: { | 70 | componentProps: { |
63 | min: 1, | 71 | min: 1, |
64 | - placeholder: `请输入${RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL}`, | 72 | + placeholder: `请输入${t(RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL)}`, |
65 | }, | 73 | }, |
66 | }, | 74 | }, |
67 | { | 75 | { |
68 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, | 76 | field: RelatedDeviceAttributeFieldsEnum.RELATION_TYPE, |
69 | component: 'Select', | 77 | component: 'Select', |
70 | - label: RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE, | 78 | + label: t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE), |
71 | componentProps: { | 79 | componentProps: { |
72 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 80 | options: Object.keys(RelationTypeEnum).map((value) => ({ |
73 | label: RelationTypeNameEnum[value], | 81 | label: RelationTypeNameEnum[value], |
74 | value, | 82 | value, |
75 | })), | 83 | })), |
76 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE}`, | 84 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE)}`, |
77 | getPopupContainer: () => document.body, | 85 | getPopupContainer: () => document.body, |
78 | }, | 86 | }, |
79 | }, | 87 | }, |
80 | { | 88 | { |
81 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, | 89 | field: RelatedDeviceAttributeFieldsEnum.DEVICE_TYPES, |
82 | component: 'ApiSelect', | 90 | component: 'ApiSelect', |
83 | - label: RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES, | 91 | + label: t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES), |
84 | componentProps: { | 92 | componentProps: { |
85 | mode: 'multiple', | 93 | mode: 'multiple', |
86 | api: getDeviceTypes, | 94 | api: getDeviceTypes, |
87 | labelField: 'type', | 95 | labelField: 'type', |
88 | valueField: 'type', | 96 | valueField: 'type', |
89 | getPopupContainer: () => document.body, | 97 | getPopupContainer: () => document.body, |
90 | - placeholder: `请选择${RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES}`, | 98 | + placeholder: `请选择${t(RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES)}`, |
91 | }, | 99 | }, |
92 | }, | 100 | }, |
93 | { | 101 | { |
@@ -95,47 +103,47 @@ export const formSchemas: FormSchema[] = [ | @@ -95,47 +103,47 @@ export const formSchemas: FormSchema[] = [ | ||
95 | component: 'Checkbox', | 103 | component: 'Checkbox', |
96 | label: '', | 104 | label: '', |
97 | renderComponentContent: () => ({ | 105 | renderComponentContent: () => ({ |
98 | - default: () => RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT, | 106 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT), |
99 | }), | 107 | }), |
100 | }, | 108 | }, |
101 | { | 109 | { |
102 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, | 110 | field: RelatedDeviceAttributeFieldsEnum.CLIENT_ATTRIBUTE_NAMES, |
103 | component: 'Select', | 111 | component: 'Select', |
104 | - label: RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES, | 112 | + label: t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES), |
105 | componentProps: { | 113 | componentProps: { |
106 | open: false, | 114 | open: false, |
107 | mode: 'tags', | 115 | mode: 'tags', |
108 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES, | 116 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES), |
109 | }, | 117 | }, |
110 | }, | 118 | }, |
111 | { | 119 | { |
112 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, | 120 | field: RelatedDeviceAttributeFieldsEnum.SHARED_ATTRIBUTE_NAMES, |
113 | component: 'Select', | 121 | component: 'Select', |
114 | - label: RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES, | 122 | + label: t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES), |
115 | componentProps: { | 123 | componentProps: { |
116 | open: false, | 124 | open: false, |
117 | mode: 'tags', | 125 | mode: 'tags', |
118 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES, | 126 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES), |
119 | }, | 127 | }, |
120 | }, | 128 | }, |
121 | { | 129 | { |
122 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, | 130 | field: RelatedDeviceAttributeFieldsEnum.SERVER_ATTRIBUTE_NAMES, |
123 | component: 'Select', | 131 | component: 'Select', |
124 | - label: RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES, | 132 | + label: t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES), |
125 | componentProps: { | 133 | componentProps: { |
126 | open: false, | 134 | open: false, |
127 | mode: 'tags', | 135 | mode: 'tags', |
128 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES, | 136 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES), |
129 | }, | 137 | }, |
130 | }, | 138 | }, |
131 | { | 139 | { |
132 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, | 140 | field: RelatedDeviceAttributeFieldsEnum.LATEST_TS_KEY_NAMES, |
133 | component: 'Select', | 141 | component: 'Select', |
134 | - label: RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES, | 142 | + label: t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES), |
135 | componentProps: { | 143 | componentProps: { |
136 | open: false, | 144 | open: false, |
137 | mode: 'tags', | 145 | mode: 'tags', |
138 | - placeholder: RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES, | 146 | + placeholder: t(RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES), |
139 | }, | 147 | }, |
140 | }, | 148 | }, |
141 | { | 149 | { |
@@ -143,7 +151,7 @@ export const formSchemas: FormSchema[] = [ | @@ -143,7 +151,7 @@ export const formSchemas: FormSchema[] = [ | ||
143 | component: 'Checkbox', | 151 | component: 'Checkbox', |
144 | label: '', | 152 | label: '', |
145 | renderComponentContent: () => ({ | 153 | renderComponentContent: () => ({ |
146 | - default: () => RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS, | 154 | + default: () => t(RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS), |
147 | }), | 155 | }), |
148 | }, | 156 | }, |
149 | ]; | 157 | ]; |
@@ -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 | } |
@@ -4,6 +4,9 @@ import { | @@ -4,6 +4,9 @@ import { | ||
4 | } from '../../../enum/formField/enrichment'; | 4 | } from '../../../enum/formField/enrichment'; |
5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 5 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
6 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; | 6 | import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 11 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
9 | 12 | ||
@@ -14,14 +17,14 @@ export const formSchemas: FormSchema[] = [ | @@ -14,14 +17,14 @@ export const formSchemas: FormSchema[] = [ | ||
14 | label: '', | 17 | label: '', |
15 | renderComponentContent: () => { | 18 | renderComponentContent: () => { |
16 | return { | 19 | return { |
17 | - default: () => TenantAttributesFieldsNameEnum.TELEMETRY, | 20 | + default: () => t(TenantAttributesFieldsNameEnum.TELEMETRY), |
18 | }; | 21 | }; |
19 | }, | 22 | }, |
20 | }, | 23 | }, |
21 | { | 24 | { |
22 | field: TenantAttributesFieldsEnum.ATTR_MAPING, | 25 | field: TenantAttributesFieldsEnum.ATTR_MAPING, |
23 | component: 'AttributeConfiguration', | 26 | component: 'AttributeConfiguration', |
24 | - label: TenantAttributesFieldsNameEnum.ATTR_MAPING, | 27 | + label: t(TenantAttributesFieldsNameEnum.ATTR_MAPING), |
25 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, | 28 | slot: TenantAttributesFieldsEnum.ATTR_MAPING, |
26 | valueField: 'value', | 29 | valueField: 'value', |
27 | 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(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 | } |
@@ -4,13 +4,16 @@ import { | @@ -4,13 +4,16 @@ import { | ||
4 | TenantDetailsFieldsNameEnum, | 4 | TenantDetailsFieldsNameEnum, |
5 | } from '../../../enum/formField/enrichment'; | 5 | } from '../../../enum/formField/enrichment'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: TenantDetailsFieldsEnum.DETAILS_LIST, | 13 | field: TenantDetailsFieldsEnum.DETAILS_LIST, |
11 | component: 'Select', | 14 | component: 'Select', |
12 | - label: TenantDetailsFieldsNameEnum.DETAILS_LIST, | ||
13 | - required: true, | 15 | + label: t(TenantDetailsFieldsNameEnum.DETAILS_LIST), |
16 | + rules: [{ required: true, message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}` }], | ||
14 | componentProps: { | 17 | componentProps: { |
15 | mode: 'multiple', | 18 | mode: 'multiple', |
16 | options: Object.keys(DetailsListEnum).map((value) => ({ | 19 | options: Object.keys(DetailsListEnum).map((value) => ({ |
@@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | @@ -18,7 +21,7 @@ export const formSchemas: FormSchema[] = [ | ||
18 | value, | 21 | value, |
19 | })), | 22 | })), |
20 | getPopupContainer: () => document.body, | 23 | getPopupContainer: () => document.body, |
21 | - placeholder: `请选择${TenantDetailsFieldsNameEnum.DETAILS_LIST}`, | 24 | + placeholder: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}`, |
22 | }, | 25 | }, |
23 | }, | 26 | }, |
24 | { | 27 | { |
@@ -26,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | @@ -26,7 +29,7 @@ export const formSchemas: FormSchema[] = [ | ||
26 | component: 'Checkbox', | 29 | component: 'Checkbox', |
27 | label: '', | 30 | label: '', |
28 | renderComponentContent: () => ({ | 31 | renderComponentContent: () => ({ |
29 | - default: () => TenantDetailsFieldsNameEnum.DETAILS_LIST, | 32 | + default: () => t(TenantDetailsFieldsNameEnum.ADD_TO_METADATA), |
30 | }), | 33 | }), |
31 | }, | 34 | }, |
32 | ]; | 35 | ]; |
@@ -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 { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AlarmNoticeFieldsEnum, AlarmNoticeFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | export const formSchemas: FormSchema[] = [ | 7 | export const formSchemas: FormSchema[] = [ |
5 | { | 8 | { |
6 | field: AlarmNoticeFieldsEnum.CONFIGURATION, | 9 | field: AlarmNoticeFieldsEnum.CONFIGURATION, |
7 | component: 'JSONEditor', | 10 | component: 'JSONEditor', |
8 | - label: AlarmNoticeFieldsNameEnum.CONFIGURATION, | 11 | + label: t(AlarmNoticeFieldsNameEnum.CONFIGURATION), |
9 | valueField: 'value', | 12 | valueField: 'value', |
10 | changeEvent: 'update:value', | 13 | changeEvent: 'update:value', |
11 | }, | 14 | }, |
@@ -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 { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { AwsSnsFieldsEnum, AwsSnsFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | export const formSchemas: FormSchema[] = [ | 7 | export const formSchemas: FormSchema[] = [ |
5 | { | 8 | { |
6 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, | 9 | field: AwsSnsFieldsEnum.TOPIC_ARN_PATTERN, |
7 | - label: AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN, | 10 | + label: t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN), |
8 | component: 'Input', | 11 | component: 'Input', |
9 | required: true, | 12 | required: true, |
10 | componentProps: { | 13 | componentProps: { |
11 | - placeholder: `请输入${AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN}`, | 14 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN)}`, |
12 | }, | 15 | }, |
13 | }, | 16 | }, |
14 | { | 17 | { |
15 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, | 18 | field: AwsSnsFieldsEnum.ACCESS_KEY_ID, |
16 | - label: AwsSnsFieldsNameEnum.ACCESS_KEY_ID, | 19 | + label: t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID), |
17 | component: 'Input', | 20 | component: 'Input', |
18 | required: true, | 21 | required: true, |
19 | componentProps: { | 22 | componentProps: { |
20 | - placeholder: `请输入${AwsSnsFieldsNameEnum.ACCESS_KEY_ID}`, | 23 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.ACCESS_KEY_ID)}`, |
21 | }, | 24 | }, |
22 | }, | 25 | }, |
23 | { | 26 | { |
24 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, | 27 | field: AwsSnsFieldsEnum.SECRET_ACCESS_KEY, |
25 | - label: AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY, | 28 | + label: t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY), |
26 | component: 'Input', | 29 | component: 'Input', |
27 | required: true, | 30 | required: true, |
28 | componentProps: { | 31 | componentProps: { |
29 | - placeholder: `请输入${AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY}`, | 32 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
30 | }, | 33 | }, |
31 | }, | 34 | }, |
32 | { | 35 | { |
33 | field: AwsSnsFieldsEnum.REGION, | 36 | field: AwsSnsFieldsEnum.REGION, |
34 | - label: AwsSnsFieldsNameEnum.REGION, | 37 | + label: t(AwsSnsFieldsNameEnum.REGION), |
35 | component: 'Input', | 38 | component: 'Input', |
36 | required: true, | 39 | required: true, |
37 | componentProps: { | 40 | componentProps: { |
38 | - placeholder: `请输入${AwsSnsFieldsNameEnum.REGION}`, | 41 | + placeholder: `请输入${t(AwsSnsFieldsNameEnum.REGION)}`, |
39 | }, | 42 | }, |
40 | }, | 43 | }, |
41 | ]; | 44 | ]; |
@@ -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 | } |
@@ -2,13 +2,16 @@ import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; | @@ -2,13 +2,16 @@ import { QueueTypeEnum, QueueTypeNameEnum } from '../../../enum/form'; | ||
2 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { AwsSqsFieldsEnum, AwsSqsFieldsNameEnum } from '../../../enum/formField/external'; |
3 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; | 3 | import { AttributeConfiguration } from '../../../src/components/AttributeConfiguration'; |
4 | 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(); | ||
5 | 8 | ||
6 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); | 9 | useComponentRegister('AttributeConfiguration', AttributeConfiguration); |
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: AwsSqsFieldsEnum.QUEUE_TYPE, | 13 | field: AwsSqsFieldsEnum.QUEUE_TYPE, |
11 | - label: AwsSqsFieldsNameEnum.QUEUE_TYPE, | 14 | + label: t(AwsSqsFieldsNameEnum.QUEUE_TYPE), |
12 | component: 'Select', | 15 | component: 'Select', |
13 | required: true, | 16 | required: true, |
14 | componentProps: { | 17 | componentProps: { |
@@ -17,21 +20,21 @@ export const formSchemas: FormSchema[] = [ | @@ -17,21 +20,21 @@ export const formSchemas: FormSchema[] = [ | ||
17 | value, | 20 | value, |
18 | })), | 21 | })), |
19 | getPopupContainer: () => document.body, | 22 | getPopupContainer: () => document.body, |
20 | - placeholder: `请选择${AwsSqsFieldsNameEnum.QUEUE_TYPE}`, | 23 | + placeholder: `请选择${t(t(AwsSqsFieldsNameEnum.QUEUE_TYPE))}`, |
21 | }, | 24 | }, |
22 | }, | 25 | }, |
23 | { | 26 | { |
24 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, | 27 | field: AwsSqsFieldsEnum.QUEUE_URL_PATTERN, |
25 | - label: AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN, | 28 | + label: t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN), |
26 | component: 'Input', | 29 | component: 'Input', |
27 | required: true, | 30 | required: true, |
28 | componentProps: { | 31 | componentProps: { |
29 | - placeholder: `请输入${AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN}`, | 32 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN)}`, |
30 | }, | 33 | }, |
31 | }, | 34 | }, |
32 | { | 35 | { |
33 | field: AwsSqsFieldsEnum.DELAY_SECONDS, | 36 | field: AwsSqsFieldsEnum.DELAY_SECONDS, |
34 | - label: AwsSqsFieldsNameEnum.DELAY_SECONDS, | 37 | + label: t(AwsSqsFieldsNameEnum.DELAY_SECONDS), |
35 | component: 'Input', | 38 | component: 'Input', |
36 | required: true, | 39 | required: true, |
37 | helpMessage: [ | 40 | helpMessage: [ |
@@ -39,12 +42,12 @@ export const formSchemas: FormSchema[] = [ | @@ -39,12 +42,12 @@ export const formSchemas: FormSchema[] = [ | ||
39 | ], | 42 | ], |
40 | show: ({ model }) => model[AwsSqsFieldsEnum.QUEUE_TYPE] === QueueTypeEnum.STANDARD, | 43 | show: ({ model }) => model[AwsSqsFieldsEnum.QUEUE_TYPE] === QueueTypeEnum.STANDARD, |
41 | componentProps: { | 44 | componentProps: { |
42 | - placeholder: `请输入${AwsSqsFieldsNameEnum.DELAY_SECONDS}`, | 45 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.DELAY_SECONDS)}`, |
43 | }, | 46 | }, |
44 | }, | 47 | }, |
45 | { | 48 | { |
46 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, | 49 | field: AwsSqsFieldsEnum.MESSAGE_ATTRIBUTES, |
47 | - label: AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES, | 50 | + label: t(AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES), |
48 | component: 'AttributeConfiguration', | 51 | component: 'AttributeConfiguration', |
49 | helpMessage: | 52 | helpMessage: |
50 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', | 53 | 'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields', |
@@ -52,29 +55,29 @@ export const formSchemas: FormSchema[] = [ | @@ -52,29 +55,29 @@ export const formSchemas: FormSchema[] = [ | ||
52 | }, | 55 | }, |
53 | { | 56 | { |
54 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, | 57 | field: AwsSqsFieldsEnum.ACCESS_KEY_ID, |
55 | - label: AwsSqsFieldsNameEnum.ACCESS_KEY_ID, | 58 | + label: t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID), |
56 | component: 'Input', | 59 | component: 'Input', |
57 | required: true, | 60 | required: true, |
58 | componentProps: { | 61 | componentProps: { |
59 | - placeholder: `请输入${AwsSqsFieldsNameEnum.ACCESS_KEY_ID}`, | 62 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.ACCESS_KEY_ID)}`, |
60 | }, | 63 | }, |
61 | }, | 64 | }, |
62 | { | 65 | { |
63 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, | 66 | field: AwsSqsFieldsEnum.SECRET_ACCESS_KEY, |
64 | - label: AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY, | 67 | + label: t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY), |
65 | component: 'Input', | 68 | component: 'Input', |
66 | required: true, | 69 | required: true, |
67 | componentProps: { | 70 | componentProps: { |
68 | - placeholder: `请输入${AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY}`, | 71 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
69 | }, | 72 | }, |
70 | }, | 73 | }, |
71 | { | 74 | { |
72 | field: AwsSqsFieldsEnum.REGION, | 75 | field: AwsSqsFieldsEnum.REGION, |
73 | - label: AwsSqsFieldsNameEnum.REGION, | 76 | + label: t(AwsSqsFieldsNameEnum.REGION), |
74 | component: 'Input', | 77 | component: 'Input', |
75 | required: true, | 78 | required: true, |
76 | componentProps: { | 79 | componentProps: { |
77 | - placeholder: `请输入${AwsSqsFieldsNameEnum.REGION}`, | 80 | + placeholder: `请输入${t(AwsSqsFieldsNameEnum.REGION)}`, |
78 | }, | 81 | }, |
79 | }, | 82 | }, |
80 | ]; | 83 | ]; |
@@ -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 | } |
@@ -3,6 +3,9 @@ import { | @@ -3,6 +3,9 @@ import { | ||
3 | AzureIotHubFieldsNameEnum, | 3 | AzureIotHubFieldsNameEnum, |
4 | } from '../../../../enum/formField/external'; | 4 | } from '../../../../enum/formField/external'; |
5 | import { FormSchema } from '/@/components/Form'; | 5 | import { FormSchema } from '/@/components/Form'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
6 | 9 | ||
7 | export enum CredentialsTypeEnum { | 10 | export enum CredentialsTypeEnum { |
8 | PEM = 'cert.PEM', | 11 | PEM = 'cert.PEM', |
@@ -53,7 +56,7 @@ export const formSchemas = ( | @@ -53,7 +56,7 @@ export const formSchemas = ( | ||
53 | return [ | 56 | return [ |
54 | { | 57 | { |
55 | field: AzureIotHubFieldsEnum.TYPE, | 58 | field: AzureIotHubFieldsEnum.TYPE, |
56 | - label: AzureIotHubFieldsNameEnum.TYPE, | 59 | + label: t(AzureIotHubFieldsNameEnum.TYPE), |
57 | component: 'Select', | 60 | component: 'Select', |
58 | required: true, | 61 | required: true, |
59 | defaultValue: CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, | 62 | defaultValue: CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, |
@@ -61,8 +64,9 @@ export const formSchemas = ( | @@ -61,8 +64,9 @@ export const formSchemas = ( | ||
61 | const { setFieldsValue } = formActionType; | 64 | const { setFieldsValue } = formActionType; |
62 | return { | 65 | return { |
63 | options: credentialsTypeOptions, | 66 | options: credentialsTypeOptions, |
64 | - placeholder: `请选择${AzureIotHubFieldsNameEnum.TYPE}`, | 67 | + placeholder: `请选择${t(AzureIotHubFieldsNameEnum.TYPE)}`, |
65 | getPopupContainer: () => document.body, | 68 | getPopupContainer: () => document.body, |
69 | + allowClear: false, | ||
66 | onChange( | 70 | onChange( |
67 | value: CredentialsTypeEnum, | 71 | value: CredentialsTypeEnum, |
68 | option: { label: CredentialsTypeNameEnum; value: CredentialsTypeEnum } | 72 | option: { label: CredentialsTypeNameEnum; value: CredentialsTypeEnum } |
@@ -84,24 +88,24 @@ export const formSchemas = ( | @@ -84,24 +88,24 @@ export const formSchemas = ( | ||
84 | }, | 88 | }, |
85 | { | 89 | { |
86 | field: AzureIotHubFieldsEnum.SAS_KEY, | 90 | field: AzureIotHubFieldsEnum.SAS_KEY, |
87 | - label: AzureIotHubFieldsNameEnum.SAS_KEY, | 91 | + label: t(AzureIotHubFieldsNameEnum.SAS_KEY), |
88 | required: true, | 92 | required: true, |
89 | component: 'Input', | 93 | component: 'Input', |
90 | ifShow: ({ model }) => | 94 | ifShow: ({ model }) => |
91 | model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, | 95 | model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.SHARED_ACCESS_SIGNATURE, |
92 | componentProps: { | 96 | componentProps: { |
93 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.SAS_KEY}`, | 97 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.SAS_KEY)}`, |
94 | }, | 98 | }, |
95 | }, | 99 | }, |
96 | { | 100 | { |
97 | field: AzureIotHubFieldsEnum.CA_CERT_FILE_NAME, | 101 | field: AzureIotHubFieldsEnum.CA_CERT_FILE_NAME, |
98 | - label: AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME, | 102 | + label: t(AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME), |
99 | component: 'InputPassword', | 103 | component: 'InputPassword', |
100 | show: false, | 104 | show: false, |
101 | }, | 105 | }, |
102 | { | 106 | { |
103 | field: AzureIotHubFieldsEnum.CA_CERT, | 107 | field: AzureIotHubFieldsEnum.CA_CERT, |
104 | - label: AzureIotHubFieldsNameEnum.CA_CERT, | 108 | + label: t(AzureIotHubFieldsNameEnum.CA_CERT), |
105 | component: 'ApiUpload', | 109 | component: 'ApiUpload', |
106 | valueField: 'fileList', | 110 | valueField: 'fileList', |
107 | changeEvent: 'update:fileList', | 111 | changeEvent: 'update:fileList', |
@@ -118,13 +122,13 @@ export const formSchemas = ( | @@ -118,13 +122,13 @@ export const formSchemas = ( | ||
118 | }, | 122 | }, |
119 | { | 123 | { |
120 | field: AzureIotHubFieldsEnum.CERT_FILE_NAME, | 124 | field: AzureIotHubFieldsEnum.CERT_FILE_NAME, |
121 | - label: AzureIotHubFieldsNameEnum.CERT_FILE_NAME, | 125 | + label: t(AzureIotHubFieldsNameEnum.CERT_FILE_NAME), |
122 | component: 'InputPassword', | 126 | component: 'InputPassword', |
123 | show: false, | 127 | show: false, |
124 | }, | 128 | }, |
125 | { | 129 | { |
126 | field: AzureIotHubFieldsEnum.CERT, | 130 | field: AzureIotHubFieldsEnum.CERT, |
127 | - label: AzureIotHubFieldsNameEnum.CERT, | 131 | + label: t(AzureIotHubFieldsNameEnum.CERT), |
128 | component: 'ApiUpload', | 132 | component: 'ApiUpload', |
129 | valueField: 'fileList', | 133 | valueField: 'fileList', |
130 | changeEvent: 'update:fileList', | 134 | changeEvent: 'update:fileList', |
@@ -143,13 +147,13 @@ export const formSchemas = ( | @@ -143,13 +147,13 @@ export const formSchemas = ( | ||
143 | }, | 147 | }, |
144 | { | 148 | { |
145 | field: AzureIotHubFieldsEnum.PRIVATE_KEY_FILE_NAME, | 149 | field: AzureIotHubFieldsEnum.PRIVATE_KEY_FILE_NAME, |
146 | - label: AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME, | 150 | + label: t(AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME), |
147 | component: 'InputPassword', | 151 | component: 'InputPassword', |
148 | show: false, | 152 | show: false, |
149 | }, | 153 | }, |
150 | { | 154 | { |
151 | field: AzureIotHubFieldsEnum.PRIVATE_KEY, | 155 | field: AzureIotHubFieldsEnum.PRIVATE_KEY, |
152 | - label: AzureIotHubFieldsNameEnum.PRIVATE_KEY, | 156 | + label: t(AzureIotHubFieldsNameEnum.PRIVATE_KEY), |
153 | component: 'ApiUpload', | 157 | component: 'ApiUpload', |
154 | valueField: 'fileList', | 158 | valueField: 'fileList', |
155 | changeEvent: 'update:fileList', | 159 | changeEvent: 'update:fileList', |
@@ -168,11 +172,11 @@ export const formSchemas = ( | @@ -168,11 +172,11 @@ export const formSchemas = ( | ||
168 | }, | 172 | }, |
169 | { | 173 | { |
170 | field: AzureIotHubFieldsEnum.PASSWORD, | 174 | field: AzureIotHubFieldsEnum.PASSWORD, |
171 | - label: AzureIotHubFieldsNameEnum.PASSWORD, | 175 | + label: t(AzureIotHubFieldsNameEnum.PASSWORD), |
172 | component: 'InputPassword', | 176 | component: 'InputPassword', |
173 | ifShow: ({ model }) => model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.PEM, | 177 | ifShow: ({ model }) => model[AzureIotHubFieldsEnum.TYPE] === CredentialsTypeEnum.PEM, |
174 | componentProps: { | 178 | componentProps: { |
175 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.PASSWORD}`, | 179 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.PASSWORD)}`, |
176 | }, | 180 | }, |
177 | }, | 181 | }, |
178 | ]; | 182 | ]; |
@@ -2,36 +2,40 @@ import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/ | @@ -2,36 +2,40 @@ import { AzureIotHubFieldsEnum, AzureIotHubFieldsNameEnum } from '../../../enum/ | ||
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 | 4 | ||
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
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: t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN), |
11 | component: 'Input', | 15 | component: 'Input', |
12 | required: true, | 16 | required: true, |
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', |
15 | componentProps: { | 19 | componentProps: { |
16 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.TOPIC_PATTERN}`, | 20 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.TOPIC_PATTERN)}`, |
17 | }, | 21 | }, |
18 | }, | 22 | }, |
19 | { | 23 | { |
20 | field: AzureIotHubFieldsEnum.HOST, | 24 | field: AzureIotHubFieldsEnum.HOST, |
21 | - label: AzureIotHubFieldsNameEnum.HOST, | 25 | + label: t(AzureIotHubFieldsNameEnum.HOST), |
22 | component: 'Input', | 26 | component: 'Input', |
23 | required: true, | 27 | required: true, |
24 | componentProps: { | 28 | componentProps: { |
25 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.HOST}`, | 29 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.HOST)}`, |
26 | }, | 30 | }, |
27 | }, | 31 | }, |
28 | { | 32 | { |
29 | field: AzureIotHubFieldsEnum.CLIENT_ID, | 33 | field: AzureIotHubFieldsEnum.CLIENT_ID, |
30 | - label: AzureIotHubFieldsNameEnum.CLIENT_ID, | 34 | + label: t(AzureIotHubFieldsNameEnum.CLIENT_ID), |
31 | component: 'Input', | 35 | component: 'Input', |
32 | required: true, | 36 | required: true, |
33 | componentProps: { | 37 | componentProps: { |
34 | - placeholder: `请输入${AzureIotHubFieldsNameEnum.CLIENT_ID}`, | 38 | + placeholder: `请输入${t(AzureIotHubFieldsNameEnum.CLIENT_ID)}`, |
35 | }, | 39 | }, |
36 | }, | 40 | }, |
37 | { | 41 | { |
@@ -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 | } |
@@ -3,39 +3,43 @@ import { AttributeConfiguration } from '/@/views/rule/designer/src/components/At | @@ -3,39 +3,43 @@ import { AttributeConfiguration } from '/@/views/rule/designer/src/components/At | ||
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 | 5 | ||
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
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: t(GcpPubsubFieldsNameEnum.PROJECT_ID), |
12 | component: 'Input', | 16 | component: 'Input', |
13 | required: true, | 17 | required: true, |
14 | componentProps: { | 18 | componentProps: { |
15 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.PROJECT_ID}`, | 19 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.PROJECT_ID)}`, |
16 | }, | 20 | }, |
17 | }, | 21 | }, |
18 | { | 22 | { |
19 | field: GcpPubsubFieldsEnum.TOPIC_NAME, | 23 | field: GcpPubsubFieldsEnum.TOPIC_NAME, |
20 | - label: GcpPubsubFieldsNameEnum.TOPIC_NAME, | 24 | + label: t(GcpPubsubFieldsNameEnum.TOPIC_NAME), |
21 | component: 'Input', | 25 | component: 'Input', |
22 | required: true, | 26 | required: true, |
23 | componentProps: { | 27 | componentProps: { |
24 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.TOPIC_NAME}`, | 28 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.TOPIC_NAME)}`, |
25 | }, | 29 | }, |
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: t(GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME), |
30 | component: 'Input', | 34 | component: 'Input', |
31 | show: false, | 35 | show: false, |
32 | componentProps: { | 36 | componentProps: { |
33 | - placeholder: `请输入${GcpPubsubFieldsNameEnum.TOPIC_NAME}`, | 37 | + placeholder: `请输入${t(GcpPubsubFieldsNameEnum.TOPIC_NAME)}`, |
34 | }, | 38 | }, |
35 | }, | 39 | }, |
36 | { | 40 | { |
37 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, | 41 | field: GcpPubsubFieldsEnum.SERVICE_ACCOUNT_KEY, |
38 | - label: GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY, | 42 | + label: 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: 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 | } |
@@ -3,68 +3,72 @@ import { AttributeConfiguration } from '/@/views/rule/designer/src/components/At | @@ -3,68 +3,72 @@ import { AttributeConfiguration } from '/@/views/rule/designer/src/components/At | ||
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 | 5 | ||
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
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: 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', |
15 | required: true, | 19 | required: true, |
16 | componentProps: { | 20 | componentProps: { |
17 | - placeholder: `请输入${KafkaFieldsEnum.TOPIC_PATTERN}`, | 21 | + placeholder: `请输入${t(KafkaFieldsEnum.TOPIC_PATTERN)}`, |
18 | }, | 22 | }, |
19 | }, | 23 | }, |
20 | { | 24 | { |
21 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, | 25 | field: KafkaFieldsEnum.BOOTSTRAP_SERVERS, |
22 | - label: KafkaFieldsNameEnum.BOOTSTRAP_SERVERS, | 26 | + label: t(KafkaFieldsNameEnum.BOOTSTRAP_SERVERS), |
23 | component: 'Input', | 27 | component: 'Input', |
24 | required: true, | 28 | required: true, |
25 | componentProps: { | 29 | componentProps: { |
26 | - placeholder: `请输入${KafkaFieldsEnum.BOOTSTRAP_SERVERS}`, | 30 | + placeholder: `请输入${t(KafkaFieldsEnum.BOOTSTRAP_SERVERS)}`, |
27 | }, | 31 | }, |
28 | }, | 32 | }, |
29 | { | 33 | { |
30 | field: KafkaFieldsEnum.RETRIES, | 34 | field: KafkaFieldsEnum.RETRIES, |
31 | - label: KafkaFieldsNameEnum.RETRIES, | 35 | + label: t(KafkaFieldsNameEnum.RETRIES), |
32 | component: 'InputNumber', | 36 | component: 'InputNumber', |
33 | componentProps: { | 37 | componentProps: { |
34 | min: 0, | 38 | min: 0, |
35 | - placeholder: `请输入${KafkaFieldsEnum.BOOTSTRAP_SERVERS}`, | 39 | + placeholder: `请输入${t(KafkaFieldsEnum.BOOTSTRAP_SERVERS)}`, |
36 | }, | 40 | }, |
37 | }, | 41 | }, |
38 | { | 42 | { |
39 | field: KafkaFieldsEnum.BATCH_SIZE, | 43 | field: KafkaFieldsEnum.BATCH_SIZE, |
40 | - label: KafkaFieldsNameEnum.BATCH_SIZE, | 44 | + label: t(KafkaFieldsNameEnum.BATCH_SIZE), |
41 | component: 'InputNumber', | 45 | component: 'InputNumber', |
42 | componentProps: { | 46 | componentProps: { |
43 | min: 0, | 47 | min: 0, |
44 | - placeholder: `请输入${KafkaFieldsEnum.BATCH_SIZE}`, | 48 | + placeholder: `请输入${t(KafkaFieldsEnum.BATCH_SIZE)}`, |
45 | }, | 49 | }, |
46 | }, | 50 | }, |
47 | { | 51 | { |
48 | field: KafkaFieldsEnum.LINGER, | 52 | field: KafkaFieldsEnum.LINGER, |
49 | - label: KafkaFieldsNameEnum.LINGER, | 53 | + label: t(KafkaFieldsNameEnum.LINGER), |
50 | component: 'InputNumber', | 54 | component: 'InputNumber', |
51 | componentProps: { | 55 | componentProps: { |
52 | min: 0, | 56 | min: 0, |
53 | - placeholder: `请输入${KafkaFieldsEnum.LINGER}`, | 57 | + placeholder: `请输入${t(KafkaFieldsEnum.LINGER)}`, |
54 | }, | 58 | }, |
55 | }, | 59 | }, |
56 | { | 60 | { |
57 | field: KafkaFieldsEnum.BUFFER_MEMORY, | 61 | field: KafkaFieldsEnum.BUFFER_MEMORY, |
58 | - label: KafkaFieldsNameEnum.BUFFER_MEMORY, | 62 | + label: t(KafkaFieldsNameEnum.BUFFER_MEMORY), |
59 | component: 'InputNumber', | 63 | component: 'InputNumber', |
60 | componentProps: { | 64 | componentProps: { |
61 | min: 0, | 65 | min: 0, |
62 | - placeholder: `请输入${KafkaFieldsEnum.BUFFER_MEMORY}`, | 66 | + placeholder: `请输入${t(KafkaFieldsEnum.BUFFER_MEMORY)}`, |
63 | }, | 67 | }, |
64 | }, | 68 | }, |
65 | { | 69 | { |
66 | field: KafkaFieldsEnum.ACKS, | 70 | field: KafkaFieldsEnum.ACKS, |
67 | - label: KafkaFieldsEnum.ACKS, | 71 | + label: t(KafkaFieldsEnum.ACKS), |
68 | component: 'Select', | 72 | component: 'Select', |
69 | required: true, | 73 | required: true, |
70 | componentProps: { | 74 | componentProps: { |
@@ -74,37 +78,37 @@ export const formSchemas: FormSchema[] = [ | @@ -74,37 +78,37 @@ export const formSchemas: FormSchema[] = [ | ||
74 | { label: '0', value: '0' }, | 78 | { label: '0', value: '0' }, |
75 | { label: '1', value: '1' }, | 79 | { label: '1', value: '1' }, |
76 | ], | 80 | ], |
77 | - placeholder: `请选择${KafkaFieldsEnum.BUFFER_MEMORY}`, | 81 | + placeholder: `请选择${t(KafkaFieldsEnum.ACKS)}`, |
78 | getPopupContainer: () => document.body, | 82 | getPopupContainer: () => document.body, |
79 | }, | 83 | }, |
80 | }, | 84 | }, |
81 | { | 85 | { |
82 | field: KafkaFieldsEnum.KEY_SERIALIZER, | 86 | field: KafkaFieldsEnum.KEY_SERIALIZER, |
83 | - label: KafkaFieldsNameEnum.KEY_SERIALIZER, | 87 | + label: t(KafkaFieldsNameEnum.KEY_SERIALIZER), |
84 | component: 'Input', | 88 | component: 'Input', |
85 | required: true, | 89 | required: true, |
86 | componentProps: { | 90 | componentProps: { |
87 | - placeholder: `请输入${KafkaFieldsEnum.KEY_SERIALIZER}`, | 91 | + placeholder: `请输入${t(KafkaFieldsNameEnum.KEY_SERIALIZER)}`, |
88 | }, | 92 | }, |
89 | }, | 93 | }, |
90 | { | 94 | { |
91 | field: KafkaFieldsEnum.VALUE_SERIALIZER, | 95 | field: KafkaFieldsEnum.VALUE_SERIALIZER, |
92 | - label: KafkaFieldsNameEnum.VALUE_SERIALIZER, | 96 | + label: t(KafkaFieldsNameEnum.VALUE_SERIALIZER), |
93 | component: 'Input', | 97 | component: 'Input', |
94 | required: true, | 98 | required: true, |
95 | componentProps: { | 99 | componentProps: { |
96 | - placeholder: `请输入${KafkaFieldsEnum.VALUE_SERIALIZER}`, | 100 | + placeholder: `请输入${t(KafkaFieldsNameEnum.VALUE_SERIALIZER)}`, |
97 | }, | 101 | }, |
98 | }, | 102 | }, |
99 | { | 103 | { |
100 | field: KafkaFieldsEnum.OTHER_PROPERTIES, | 104 | field: KafkaFieldsEnum.OTHER_PROPERTIES, |
101 | - label: KafkaFieldsNameEnum.OTHER_PROPERTIES, | 105 | + label: 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: 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: 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], |
@@ -122,7 +126,7 @@ export const formSchemas: FormSchema[] = [ | @@ -122,7 +126,7 @@ export const formSchemas: FormSchema[] = [ | ||
122 | label: CharsetEncodingNameEnum[value], | 126 | label: CharsetEncodingNameEnum[value], |
123 | value, | 127 | value, |
124 | })), | 128 | })), |
125 | - placeholder: `请选择${KafkaFieldsEnum.KAFKA_HEADERS_CHARSET}`, | 129 | + placeholder: `请选择${t(KafkaFieldsEnum.KAFKA_HEADERS_CHARSET)}`, |
126 | getPopupContainer: () => document.body, | 130 | getPopupContainer: () => document.body, |
127 | }, | 131 | }, |
128 | }, | 132 | }, |
@@ -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 { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../../enum/formField/external'; | 1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../../enum/formField/external'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | // Credentials type | 7 | // Credentials type |
5 | export enum CredentialsTypeEnum { | 8 | export enum CredentialsTypeEnum { |
@@ -51,15 +54,16 @@ export const formSchemas = ( | @@ -51,15 +54,16 @@ export const formSchemas = ( | ||
51 | return [ | 54 | return [ |
52 | { | 55 | { |
53 | field: MqttFieldsEnum.TYPE, | 56 | field: MqttFieldsEnum.TYPE, |
54 | - label: MqttFieldsNameEnum.TYPE, | 57 | + label: t(MqttFieldsNameEnum.TYPE), |
55 | component: 'Select', | 58 | component: 'Select', |
56 | required: true, | 59 | required: true, |
57 | defaultValue: CredentialsTypeEnum.ANONYMOUS, | 60 | defaultValue: CredentialsTypeEnum.ANONYMOUS, |
58 | componentProps: ({ formActionType }) => { | 61 | componentProps: ({ formActionType }) => { |
59 | const { setFieldsValue } = formActionType; | 62 | const { setFieldsValue } = formActionType; |
60 | return { | 63 | return { |
64 | + allowClear: false, | ||
61 | options: credentialsTypeOptions, | 65 | options: credentialsTypeOptions, |
62 | - placeholder: `请选择${MqttFieldsNameEnum.TYPE}`, | 66 | + placeholder: `请选择${t(MqttFieldsNameEnum.TYPE)}`, |
63 | getPopupContainer: () => document.body, | 67 | getPopupContainer: () => document.body, |
64 | onChange( | 68 | onChange( |
65 | value: CredentialsTypeEnum, | 69 | value: CredentialsTypeEnum, |
@@ -81,23 +85,23 @@ export const formSchemas = ( | @@ -81,23 +85,23 @@ export const formSchemas = ( | ||
81 | }, | 85 | }, |
82 | { | 86 | { |
83 | field: MqttFieldsEnum.USERNAME, | 87 | field: MqttFieldsEnum.USERNAME, |
84 | - label: MqttFieldsNameEnum.USERNAME, | 88 | + label: t(MqttFieldsNameEnum.USERNAME), |
85 | component: 'Input', | 89 | component: 'Input', |
86 | required: true, | 90 | required: true, |
87 | ifShow: ({ model }) => model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, | 91 | ifShow: ({ model }) => model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, |
88 | componentProps: { | 92 | componentProps: { |
89 | - placeholder: `请输入${MqttFieldsNameEnum.USERNAME}`, | 93 | + placeholder: `请输入${t(MqttFieldsNameEnum.USERNAME)}`, |
90 | }, | 94 | }, |
91 | }, | 95 | }, |
92 | { | 96 | { |
93 | field: MqttFieldsEnum.CA_CERT_FILE_NAME, | 97 | field: MqttFieldsEnum.CA_CERT_FILE_NAME, |
94 | - label: MqttFieldsNameEnum.CA_CERT_FILE_NAME, | 98 | + label: t(MqttFieldsNameEnum.CA_CERT_FILE_NAME), |
95 | component: 'InputPassword', | 99 | component: 'InputPassword', |
96 | show: false, | 100 | show: false, |
97 | }, | 101 | }, |
98 | { | 102 | { |
99 | field: MqttFieldsEnum.CA_CERT, | 103 | field: MqttFieldsEnum.CA_CERT, |
100 | - label: MqttFieldsNameEnum.CA_CERT, | 104 | + label: t(MqttFieldsNameEnum.CA_CERT), |
101 | component: 'ApiUpload', | 105 | component: 'ApiUpload', |
102 | valueField: 'fileList', | 106 | valueField: 'fileList', |
103 | changeEvent: 'update:fileList', | 107 | changeEvent: 'update:fileList', |
@@ -116,13 +120,13 @@ export const formSchemas = ( | @@ -116,13 +120,13 @@ export const formSchemas = ( | ||
116 | }, | 120 | }, |
117 | { | 121 | { |
118 | field: MqttFieldsEnum.CERT_FILE_NAME, | 122 | field: MqttFieldsEnum.CERT_FILE_NAME, |
119 | - label: MqttFieldsNameEnum.CERT_FILE_NAME, | 123 | + label: t(MqttFieldsNameEnum.CERT_FILE_NAME), |
120 | component: 'InputPassword', | 124 | component: 'InputPassword', |
121 | show: false, | 125 | show: false, |
122 | }, | 126 | }, |
123 | { | 127 | { |
124 | field: MqttFieldsEnum.CERT, | 128 | field: MqttFieldsEnum.CERT, |
125 | - label: MqttFieldsNameEnum.CERT, | 129 | + label: t(MqttFieldsNameEnum.CERT), |
126 | component: 'ApiUpload', | 130 | component: 'ApiUpload', |
127 | valueField: 'fileList', | 131 | valueField: 'fileList', |
128 | changeEvent: 'update:fileList', | 132 | changeEvent: 'update:fileList', |
@@ -141,13 +145,13 @@ export const formSchemas = ( | @@ -141,13 +145,13 @@ export const formSchemas = ( | ||
141 | }, | 145 | }, |
142 | { | 146 | { |
143 | field: MqttFieldsEnum.PRIVATE_KEY_FILE_NAME, | 147 | field: MqttFieldsEnum.PRIVATE_KEY_FILE_NAME, |
144 | - label: MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME, | 148 | + label: t(MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME), |
145 | component: 'InputPassword', | 149 | component: 'InputPassword', |
146 | show: false, | 150 | show: false, |
147 | }, | 151 | }, |
148 | { | 152 | { |
149 | field: MqttFieldsEnum.PRIVATE_KEY, | 153 | field: MqttFieldsEnum.PRIVATE_KEY, |
150 | - label: MqttFieldsNameEnum.PRIVATE_KEY, | 154 | + label: t(MqttFieldsNameEnum.PRIVATE_KEY), |
151 | component: 'ApiUpload', | 155 | component: 'ApiUpload', |
152 | valueField: 'fileList', | 156 | valueField: 'fileList', |
153 | changeEvent: 'update:fileList', | 157 | changeEvent: 'update:fileList', |
@@ -166,13 +170,13 @@ export const formSchemas = ( | @@ -166,13 +170,13 @@ export const formSchemas = ( | ||
166 | }, | 170 | }, |
167 | { | 171 | { |
168 | field: MqttFieldsEnum.PASSWORD, | 172 | field: MqttFieldsEnum.PASSWORD, |
169 | - label: MqttFieldsNameEnum.PASSWORD, | 173 | + label: t(MqttFieldsNameEnum.PASSWORD), |
170 | component: 'InputPassword', | 174 | component: 'InputPassword', |
171 | ifShow: ({ model }) => | 175 | ifShow: ({ model }) => |
172 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.PEM || | 176 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.PEM || |
173 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, | 177 | model[MqttFieldsEnum.TYPE] === CredentialsTypeEnum.BASIC, |
174 | componentProps: { | 178 | componentProps: { |
175 | - placeholder: `请输入${MqttFieldsNameEnum.PASSWORD}`, | 179 | + placeholder: `请输入${t(MqttFieldsNameEnum.PASSWORD)}`, |
176 | }, | 180 | }, |
177 | }, | 181 | }, |
178 | ]; | 182 | ]; |
1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; | 1 | import { MqttFieldsEnum, MqttFieldsNameEnum } from '../../../enum/formField/external'; |
2 | import { CredentialsCard } from './CredentialsCard'; | 2 | import { CredentialsCard } from './CredentialsCard'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
6 | +const { t } = useI18n(); | ||
4 | 7 | ||
5 | useComponentRegister('CredentialsCard', CredentialsCard); | 8 | useComponentRegister('CredentialsCard', CredentialsCard); |
6 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: MqttFieldsEnum.TOPIC_PATTERN, | 12 | field: MqttFieldsEnum.TOPIC_PATTERN, |
10 | - label: MqttFieldsNameEnum.TOPIC_PATTERN, | 13 | + label: t(MqttFieldsNameEnum.TOPIC_PATTERN), |
11 | component: 'Input', | 14 | component: 'Input', |
12 | helpMessage: | 15 | helpMessage: |
13 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 16 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
14 | required: true, | 17 | required: true, |
15 | componentProps: { | 18 | componentProps: { |
16 | - placeholder: `请输入${MqttFieldsNameEnum.TOPIC_PATTERN}`, | 19 | + placeholder: `请输入${t(MqttFieldsNameEnum.TOPIC_PATTERN)}`, |
17 | }, | 20 | }, |
18 | }, | 21 | }, |
19 | { | 22 | { |
20 | field: MqttFieldsEnum.HOST, | 23 | field: MqttFieldsEnum.HOST, |
21 | - label: MqttFieldsNameEnum.HOST, | 24 | + label: t(MqttFieldsNameEnum.HOST), |
22 | component: 'Input', | 25 | component: 'Input', |
23 | required: true, | 26 | required: true, |
24 | colProps: { span: 8 }, | 27 | colProps: { span: 8 }, |
25 | componentProps: { | 28 | componentProps: { |
26 | - placeholder: `请输入${MqttFieldsNameEnum.HOST}`, | 29 | + placeholder: `请输入${t(MqttFieldsNameEnum.HOST)}`, |
27 | }, | 30 | }, |
28 | }, | 31 | }, |
29 | { | 32 | { |
30 | field: MqttFieldsEnum.PORT, | 33 | field: MqttFieldsEnum.PORT, |
31 | - label: MqttFieldsNameEnum.PORT, | 34 | + label: t(MqttFieldsNameEnum.PORT), |
32 | component: 'InputNumber', | 35 | component: 'InputNumber', |
33 | required: true, | 36 | required: true, |
34 | colProps: { span: 8 }, | 37 | colProps: { span: 8 }, |
35 | componentProps: { | 38 | componentProps: { |
36 | - placeholder: `请输入${MqttFieldsNameEnum.PORT}`, | 39 | + placeholder: `请输入${t(MqttFieldsNameEnum.PORT)}`, |
37 | }, | 40 | }, |
38 | }, | 41 | }, |
39 | { | 42 | { |
40 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, | 43 | field: MqttFieldsEnum.CONNECT_TIMEOUT_SEC, |
41 | - label: MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC, | 44 | + label: t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC), |
42 | component: 'Input', | 45 | component: 'Input', |
43 | required: true, | 46 | required: true, |
44 | colProps: { span: 8 }, | 47 | colProps: { span: 8 }, |
45 | componentProps: { | 48 | componentProps: { |
46 | - placeholder: `请输入${MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC}`, | 49 | + placeholder: `请输入${t(MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC)}`, |
47 | }, | 50 | }, |
48 | }, | 51 | }, |
49 | { | 52 | { |
50 | field: MqttFieldsEnum.CLIENT_ID, | 53 | field: MqttFieldsEnum.CLIENT_ID, |
51 | - label: MqttFieldsNameEnum.CLIENT_ID, | 54 | + label: t(MqttFieldsNameEnum.CLIENT_ID), |
52 | component: 'Input', | 55 | component: 'Input', |
53 | helpMessage: | 56 | 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.', | 57 | 'Hint: Optional. Leave empty for auto-generated Client ID. Be careful when specifying the Client ID. Majority of the MQTT brokers will not allow multiple connections with the same Client ID. To connect to such brokers, your mqtt Client ID must be unique. When platform is running in a micro-services mode, the copy of rule node is launched in each micro-service. This will automatically lead to multiple mqtt clients with the same ID and may cause failures of the rule node. To avoid such failures enable "Add Service ID as suffix to Client ID" option below.', |
55 | componentProps: { | 58 | componentProps: { |
56 | - placeholder: `请输入${MqttFieldsNameEnum.TOPIC_PATTERN}`, | 59 | + placeholder: `请输入${t(MqttFieldsNameEnum.TOPIC_PATTERN)}`, |
57 | }, | 60 | }, |
58 | }, | 61 | }, |
59 | { | 62 | { |
60 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, | 63 | field: MqttFieldsEnum.APPEND_CLIENT_ID_SUFFIX, |
61 | - label: MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX, | 64 | + label: t(MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX), |
62 | component: 'Checkbox', | 65 | component: 'Checkbox', |
63 | renderComponentContent: () => ({ | 66 | renderComponentContent: () => ({ |
64 | default: () => | 67 | default: () => |
@@ -76,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | @@ -76,7 +79,7 @@ export const formSchemas: FormSchema[] = [ | ||
76 | label: '', | 79 | label: '', |
77 | component: 'Checkbox', | 80 | component: 'Checkbox', |
78 | renderComponentContent: () => ({ | 81 | renderComponentContent: () => ({ |
79 | - default: () => MqttFieldsNameEnum.CLEAN_SESSION, | 82 | + default: () => t(MqttFieldsNameEnum.CLEAN_SESSION), |
80 | }), | 83 | }), |
81 | }, | 84 | }, |
82 | { | 85 | { |
@@ -84,12 +87,12 @@ export const formSchemas: FormSchema[] = [ | @@ -84,12 +87,12 @@ export const formSchemas: FormSchema[] = [ | ||
84 | label: '', | 87 | label: '', |
85 | component: 'Checkbox', | 88 | component: 'Checkbox', |
86 | renderComponentContent: () => ({ | 89 | renderComponentContent: () => ({ |
87 | - default: () => MqttFieldsNameEnum.SSL, | 90 | + default: () => t(MqttFieldsNameEnum.SSL), |
88 | }), | 91 | }), |
89 | }, | 92 | }, |
90 | { | 93 | { |
91 | field: MqttFieldsEnum.CREDENTIALS, | 94 | field: MqttFieldsEnum.CREDENTIALS, |
92 | - label: MqttFieldsNameEnum.CREDENTIALS, | 95 | + label: t(MqttFieldsNameEnum.CREDENTIALS), |
93 | component: 'CredentialsCard', | 96 | component: 'CredentialsCard', |
94 | slot: MqttFieldsEnum.CREDENTIALS, | 97 | slot: MqttFieldsEnum.CREDENTIALS, |
95 | }, | 98 | }, |
@@ -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 { MessagePropertiesEnum } from '../../../enum/form'; | 1 | import { MessagePropertiesEnum } from '../../../enum/form'; |
2 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { RabbitmqFieldsEnum, RabbitmqFieldsNameEnum } from '../../../enum/formField/external'; |
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 | { |
7 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, | 10 | field: RabbitmqFieldsEnum.EXCHANGE_NAME_PATTERN, |
8 | - label: RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN, | 11 | + label: t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN), |
9 | component: 'Input', | 12 | component: 'Input', |
10 | componentProps: { | 13 | componentProps: { |
11 | - placeholder: `请输入${RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN}`, | 14 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN)}`, |
12 | }, | 15 | }, |
13 | }, | 16 | }, |
14 | { | 17 | { |
15 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, | 18 | field: RabbitmqFieldsEnum.ROUTING_KEY_PATTERN, |
16 | - label: RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN, | 19 | + label: t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN), |
17 | component: 'Input', | 20 | component: 'Input', |
18 | componentProps: { | 21 | componentProps: { |
19 | - placeholder: `请输入${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, | 22 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)}`, |
20 | }, | 23 | }, |
21 | }, | 24 | }, |
22 | { | 25 | { |
23 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, | 26 | field: RabbitmqFieldsEnum.MESSAGE_PROPERTIES, |
24 | - label: RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES, | 27 | + label: t(RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES), |
25 | component: 'Select', | 28 | component: 'Select', |
26 | componentProps: { | 29 | componentProps: { |
27 | allowClear: true, | 30 | allowClear: true, |
28 | options: Object.keys(MessagePropertiesEnum).map((value) => ({ label: value, value })), | 31 | options: Object.keys(MessagePropertiesEnum).map((value) => ({ label: value, value })), |
29 | - placeholder: `请选择${RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN}`, | 32 | + placeholder: `请选择${t(RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN)}`, |
30 | getPopupContainer: () => document.body, | 33 | getPopupContainer: () => document.body, |
31 | }, | 34 | }, |
32 | }, | 35 | }, |
33 | { | 36 | { |
34 | field: RabbitmqFieldsEnum.HOST, | 37 | field: RabbitmqFieldsEnum.HOST, |
35 | - label: RabbitmqFieldsNameEnum.HOST, | 38 | + label: t(RabbitmqFieldsNameEnum.HOST), |
36 | component: 'Input', | 39 | component: 'Input', |
37 | required: true, | 40 | required: true, |
38 | colProps: { span: 12 }, | 41 | colProps: { span: 12 }, |
39 | componentProps: { | 42 | componentProps: { |
40 | - placeholder: `请输入${RabbitmqFieldsNameEnum.HOST}`, | 43 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.HOST)}`, |
41 | }, | 44 | }, |
42 | }, | 45 | }, |
43 | { | 46 | { |
44 | field: RabbitmqFieldsEnum.PORT, | 47 | field: RabbitmqFieldsEnum.PORT, |
45 | - label: RabbitmqFieldsNameEnum.PORT, | 48 | + label: t(RabbitmqFieldsNameEnum.PORT), |
46 | component: 'InputNumber', | 49 | component: 'InputNumber', |
47 | required: true, | 50 | required: true, |
48 | colProps: { span: 12 }, | 51 | colProps: { span: 12 }, |
49 | componentProps: { | 52 | componentProps: { |
50 | - placeholder: `请输入${RabbitmqFieldsNameEnum.PORT}`, | 53 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.PORT)}`, |
51 | }, | 54 | }, |
52 | }, | 55 | }, |
53 | { | 56 | { |
54 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, | 57 | field: RabbitmqFieldsEnum.VIRTUAL_HOST, |
55 | - label: RabbitmqFieldsNameEnum.VIRTUAL_HOST, | 58 | + label: t(RabbitmqFieldsNameEnum.VIRTUAL_HOST), |
56 | component: 'Input', | 59 | component: 'Input', |
57 | componentProps: { | 60 | componentProps: { |
58 | - placeholder: `请输入${RabbitmqFieldsNameEnum.VIRTUAL_HOST}`, | 61 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.VIRTUAL_HOST)}`, |
59 | }, | 62 | }, |
60 | }, | 63 | }, |
61 | { | 64 | { |
62 | field: RabbitmqFieldsEnum.USERNAME, | 65 | field: RabbitmqFieldsEnum.USERNAME, |
63 | - label: RabbitmqFieldsNameEnum.USERNAME, | 66 | + label: t(RabbitmqFieldsNameEnum.USERNAME), |
64 | component: 'Input', | 67 | component: 'Input', |
65 | componentProps: { | 68 | componentProps: { |
66 | - placeholder: `请输入${RabbitmqFieldsNameEnum.USERNAME}`, | 69 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.USERNAME)}`, |
67 | }, | 70 | }, |
68 | }, | 71 | }, |
69 | { | 72 | { |
70 | field: RabbitmqFieldsEnum.PASSWORD, | 73 | field: RabbitmqFieldsEnum.PASSWORD, |
71 | - label: RabbitmqFieldsNameEnum.PASSWORD, | 74 | + label: t(RabbitmqFieldsNameEnum.PASSWORD), |
72 | component: 'Input', | 75 | component: 'Input', |
73 | componentProps: { | 76 | componentProps: { |
74 | - placeholder: `请输入${RabbitmqFieldsNameEnum.PASSWORD}`, | 77 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.PASSWORD)}`, |
75 | }, | 78 | }, |
76 | }, | 79 | }, |
77 | { | 80 | { |
@@ -79,30 +82,30 @@ export const formSchemas: FormSchema[] = [ | @@ -79,30 +82,30 @@ export const formSchemas: FormSchema[] = [ | ||
79 | component: 'Checkbox', | 82 | component: 'Checkbox', |
80 | label: '', | 83 | label: '', |
81 | renderComponentContent: () => ({ | 84 | renderComponentContent: () => ({ |
82 | - default: () => RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED, | 85 | + default: () => t(RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED), |
83 | }), | 86 | }), |
84 | }, | 87 | }, |
85 | { | 88 | { |
86 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, | 89 | field: RabbitmqFieldsEnum.CONNECTION_TIMEOUT, |
87 | - label: RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT, | 90 | + label: t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT), |
88 | component: 'InputNumber', | 91 | component: 'InputNumber', |
89 | componentProps: { | 92 | componentProps: { |
90 | min: 0, | 93 | min: 0, |
91 | - placeholder: `请输入${RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT}`, | 94 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT)}`, |
92 | }, | 95 | }, |
93 | }, | 96 | }, |
94 | { | 97 | { |
95 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, | 98 | field: RabbitmqFieldsEnum.HANDSHAKE_TIMEOUT, |
96 | - label: RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT, | 99 | + label: t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT), |
97 | component: 'InputNumber', | 100 | component: 'InputNumber', |
98 | componentProps: { | 101 | componentProps: { |
99 | min: 0, | 102 | min: 0, |
100 | - placeholder: `请输入${RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT}`, | 103 | + placeholder: `请输入${t(RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT)}`, |
101 | }, | 104 | }, |
102 | }, | 105 | }, |
103 | { | 106 | { |
104 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 107 | field: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
105 | - label: RabbitmqFieldsNameEnum.CLIENT_PROPERTIES, | 108 | + label: t(RabbitmqFieldsNameEnum.CLIENT_PROPERTIES), |
106 | component: 'Input', | 109 | component: 'Input', |
107 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, | 110 | slot: RabbitmqFieldsEnum.CLIENT_PROPERTIES, |
108 | }, | 111 | }, |
@@ -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 { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; | 1 | import { ProtocolEnum, ProtocolNameEnum, RequestMethodEnum } from '../../../enum/form'; |
2 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { RestApiCallFieldsEnum, RestApiCallFieldsNameEnum } from '../../../enum/formField/external'; |
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 | { |
7 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, | 10 | field: RestApiCallFieldsEnum.REST_ENDPOINT_URL_PATTERN, |
8 | - label: RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN, | 11 | + label: t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN), |
9 | component: 'Input', | 12 | component: 'Input', |
10 | required: true, | 13 | required: true, |
11 | helpMessage: | 14 | helpMessage: |
12 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 15 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
13 | componentProps: { | 16 | componentProps: { |
14 | - placeholder: `请输入${RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN}`, | 17 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN)}`, |
15 | }, | 18 | }, |
16 | }, | 19 | }, |
17 | { | 20 | { |
18 | field: RestApiCallFieldsEnum.REQUEST_METHOD, | 21 | field: RestApiCallFieldsEnum.REQUEST_METHOD, |
19 | - label: RestApiCallFieldsNameEnum.REQUEST_METHOD, | 22 | + label: t(RestApiCallFieldsNameEnum.REQUEST_METHOD), |
20 | component: 'Select', | 23 | component: 'Select', |
21 | required: true, | 24 | required: true, |
22 | componentProps: { | 25 | componentProps: { |
23 | options: Object.keys(RequestMethodEnum).map((value) => ({ label: value, value })), | 26 | options: Object.keys(RequestMethodEnum).map((value) => ({ label: value, value })), |
24 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
25 | - placeholder: `请选择${RestApiCallFieldsNameEnum.REQUEST_METHOD}`, | 28 | + placeholder: `请选择${t(RestApiCallFieldsNameEnum.REQUEST_METHOD)}`, |
26 | }, | 29 | }, |
27 | }, | 30 | }, |
28 | { | 31 | { |
@@ -30,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | @@ -30,7 +33,7 @@ export const formSchemas: FormSchema[] = [ | ||
30 | label: '', | 33 | label: '', |
31 | component: 'Checkbox', | 34 | component: 'Checkbox', |
32 | renderComponentContent: () => ({ | 35 | renderComponentContent: () => ({ |
33 | - default: () => RestApiCallFieldsNameEnum.ENABLE_PROXY, | 36 | + default: () => t(RestApiCallFieldsNameEnum.ENABLE_PROXY), |
34 | }), | 37 | }), |
35 | }, | 38 | }, |
36 | { | 39 | { |
@@ -39,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | @@ -39,7 +42,7 @@ export const formSchemas: FormSchema[] = [ | ||
39 | component: 'Checkbox', | 42 | component: 'Checkbox', |
40 | show: ({ model }) => !model[RestApiCallFieldsEnum.ENABLE_PROXY], | 43 | show: ({ model }) => !model[RestApiCallFieldsEnum.ENABLE_PROXY], |
41 | renderComponentContent: () => ({ | 44 | renderComponentContent: () => ({ |
42 | - default: () => RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY, | 45 | + default: () => t(RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY), |
43 | }), | 46 | }), |
44 | }, | 47 | }, |
45 | { | 48 | { |
@@ -47,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | @@ -47,7 +50,7 @@ export const formSchemas: FormSchema[] = [ | ||
47 | label: '', | 50 | label: '', |
48 | component: 'Checkbox', | 51 | component: 'Checkbox', |
49 | renderComponentContent: () => ({ | 52 | renderComponentContent: () => ({ |
50 | - default: () => RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY, | 53 | + default: () => t(RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY), |
51 | }), | 54 | }), |
52 | }, | 55 | }, |
53 | { | 56 | { |
@@ -56,12 +59,12 @@ export const formSchemas: FormSchema[] = [ | @@ -56,12 +59,12 @@ export const formSchemas: FormSchema[] = [ | ||
56 | component: 'Checkbox', | 59 | component: 'Checkbox', |
57 | show: ({ model }) => model[RestApiCallFieldsEnum.ENABLE_PROXY], | 60 | show: ({ model }) => model[RestApiCallFieldsEnum.ENABLE_PROXY], |
58 | renderComponentContent: () => ({ | 61 | renderComponentContent: () => ({ |
59 | - default: () => RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES, | 62 | + default: () => t(RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES), |
60 | }), | 63 | }), |
61 | }, | 64 | }, |
62 | { | 65 | { |
63 | field: RestApiCallFieldsEnum.PROXY_SCHEME, | 66 | field: RestApiCallFieldsEnum.PROXY_SCHEME, |
64 | - label: RestApiCallFieldsNameEnum.PROXY_SCHEME, | 67 | + label: t(RestApiCallFieldsNameEnum.PROXY_SCHEME), |
65 | component: 'Select', | 68 | component: 'Select', |
66 | required: true, | 69 | required: true, |
67 | colProps: { span: 8 }, | 70 | colProps: { span: 8 }, |
@@ -71,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | @@ -71,7 +74,7 @@ export const formSchemas: FormSchema[] = [ | ||
71 | value, | 74 | value, |
72 | })), | 75 | })), |
73 | getPopupContainer: () => document.body, | 76 | getPopupContainer: () => document.body, |
74 | - placeholder: `请选择${RestApiCallFieldsEnum.PROXY_SCHEME}`, | 77 | + placeholder: `请选择${t(RestApiCallFieldsEnum.PROXY_SCHEME)}`, |
75 | }, | 78 | }, |
76 | ifShow: ({ model }) => { | 79 | ifShow: ({ model }) => { |
77 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 80 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -80,12 +83,12 @@ export const formSchemas: FormSchema[] = [ | @@ -80,12 +83,12 @@ export const formSchemas: FormSchema[] = [ | ||
80 | }, | 83 | }, |
81 | { | 84 | { |
82 | field: RestApiCallFieldsEnum.PROXY_HOST, | 85 | field: RestApiCallFieldsEnum.PROXY_HOST, |
83 | - label: RestApiCallFieldsNameEnum.PROXY_HOST, | 86 | + label: t(RestApiCallFieldsNameEnum.PROXY_HOST), |
84 | component: 'Input', | 87 | component: 'Input', |
85 | required: true, | 88 | required: true, |
86 | colProps: { span: 8 }, | 89 | colProps: { span: 8 }, |
87 | componentProps: { | 90 | componentProps: { |
88 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_HOST}`, | 91 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_HOST)}`, |
89 | }, | 92 | }, |
90 | ifShow: ({ model }) => { | 93 | ifShow: ({ model }) => { |
91 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 94 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -94,12 +97,12 @@ export const formSchemas: FormSchema[] = [ | @@ -94,12 +97,12 @@ export const formSchemas: FormSchema[] = [ | ||
94 | }, | 97 | }, |
95 | { | 98 | { |
96 | field: RestApiCallFieldsEnum.PROXY_PORT, | 99 | field: RestApiCallFieldsEnum.PROXY_PORT, |
97 | - label: RestApiCallFieldsNameEnum.PROXY_PORT, | 100 | + label: t(RestApiCallFieldsNameEnum.PROXY_PORT), |
98 | component: 'InputNumber', | 101 | component: 'InputNumber', |
99 | required: true, | 102 | required: true, |
100 | colProps: { span: 8 }, | 103 | colProps: { span: 8 }, |
101 | componentProps: { | 104 | componentProps: { |
102 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_HOST}`, | 105 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_HOST)}`, |
103 | }, | 106 | }, |
104 | ifShow: ({ model }) => { | 107 | ifShow: ({ model }) => { |
105 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 108 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -108,10 +111,10 @@ export const formSchemas: FormSchema[] = [ | @@ -108,10 +111,10 @@ export const formSchemas: FormSchema[] = [ | ||
108 | }, | 111 | }, |
109 | { | 112 | { |
110 | field: RestApiCallFieldsEnum.PROXY_USER, | 113 | field: RestApiCallFieldsEnum.PROXY_USER, |
111 | - label: RestApiCallFieldsNameEnum.PROXY_USER, | 114 | + label: t(RestApiCallFieldsNameEnum.PROXY_USER), |
112 | component: 'Input', | 115 | component: 'Input', |
113 | componentProps: { | 116 | componentProps: { |
114 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_USER}`, | 117 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_USER)}`, |
115 | }, | 118 | }, |
116 | ifShow: ({ model }) => { | 119 | ifShow: ({ model }) => { |
117 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 120 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -120,10 +123,10 @@ export const formSchemas: FormSchema[] = [ | @@ -120,10 +123,10 @@ export const formSchemas: FormSchema[] = [ | ||
120 | }, | 123 | }, |
121 | { | 124 | { |
122 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, | 125 | field: RestApiCallFieldsEnum.PROXY_PASSWORD, |
123 | - label: RestApiCallFieldsNameEnum.PROXY_PASSWORD, | 126 | + label: t(RestApiCallFieldsNameEnum.PROXY_PASSWORD), |
124 | component: 'Input', | 127 | component: 'Input', |
125 | componentProps: { | 128 | componentProps: { |
126 | - placeholder: `请输入${RestApiCallFieldsNameEnum.PROXY_PASSWORD}`, | 129 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.PROXY_PASSWORD)}`, |
127 | }, | 130 | }, |
128 | ifShow: ({ model }) => { | 131 | ifShow: ({ model }) => { |
129 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; | 132 | const ifShowField = model[RestApiCallFieldsEnum.ENABLE_PROXY]; |
@@ -132,25 +135,25 @@ export const formSchemas: FormSchema[] = [ | @@ -132,25 +135,25 @@ export const formSchemas: FormSchema[] = [ | ||
132 | }, | 135 | }, |
133 | { | 136 | { |
134 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, | 137 | field: RestApiCallFieldsEnum.READ_TIMEOUT_MS, |
135 | - label: RestApiCallFieldsNameEnum.READ_TIMEOUT_MS, | 138 | + label: t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS), |
136 | component: 'InputNumber', | 139 | component: 'InputNumber', |
137 | componentProps: { | 140 | componentProps: { |
138 | min: 0, | 141 | min: 0, |
139 | - placeholder: `请输入${RestApiCallFieldsNameEnum.READ_TIMEOUT_MS}`, | 142 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.READ_TIMEOUT_MS)}`, |
140 | }, | 143 | }, |
141 | }, | 144 | }, |
142 | { | 145 | { |
143 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, | 146 | field: RestApiCallFieldsEnum.MAX_PARALLEL_REQUESTS_COUNT, |
144 | - label: RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT, | 147 | + label: t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT), |
145 | component: 'InputNumber', | 148 | component: 'InputNumber', |
146 | componentProps: { | 149 | componentProps: { |
147 | min: 0, | 150 | min: 0, |
148 | - placeholder: `请输入${RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT}`, | 151 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT)}`, |
149 | }, | 152 | }, |
150 | }, | 153 | }, |
151 | { | 154 | { |
152 | field: RestApiCallFieldsEnum.HEADERS, | 155 | field: RestApiCallFieldsEnum.HEADERS, |
153 | - label: RestApiCallFieldsNameEnum.HEADERS, | 156 | + label: t(RestApiCallFieldsNameEnum.HEADERS), |
154 | component: 'Input', | 157 | component: 'Input', |
155 | slot: RestApiCallFieldsEnum.HEADERS, | 158 | slot: RestApiCallFieldsEnum.HEADERS, |
156 | }, | 159 | }, |
@@ -159,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | @@ -159,7 +162,7 @@ export const formSchemas: FormSchema[] = [ | ||
159 | label: '', | 162 | label: '', |
160 | component: 'Checkbox', | 163 | component: 'Checkbox', |
161 | renderComponentContent: () => ({ | 164 | renderComponentContent: () => ({ |
162 | - default: () => RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE, | 165 | + default: () => t(RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE), |
163 | }), | 166 | }), |
164 | }, | 167 | }, |
165 | { | 168 | { |
@@ -168,22 +171,22 @@ export const formSchemas: FormSchema[] = [ | @@ -168,22 +171,22 @@ export const formSchemas: FormSchema[] = [ | ||
168 | component: 'Checkbox', | 171 | component: 'Checkbox', |
169 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], | 172 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], |
170 | renderComponentContent: () => ({ | 173 | renderComponentContent: () => ({ |
171 | - default: () => RestApiCallFieldsNameEnum.TRIM_QUEUE, | 174 | + default: () => t(RestApiCallFieldsNameEnum.TRIM_QUEUE), |
172 | }), | 175 | }), |
173 | }, | 176 | }, |
174 | { | 177 | { |
175 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, | 178 | field: RestApiCallFieldsEnum.MAX_QUEUE_SIZE, |
176 | - label: RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE, | 179 | + label: t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE), |
177 | component: 'InputNumber', | 180 | component: 'InputNumber', |
178 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], | 181 | ifShow: ({ model }) => model[RestApiCallFieldsEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE], |
179 | componentProps: { | 182 | componentProps: { |
180 | min: 0, | 183 | min: 0, |
181 | - placeholder: `请输入${RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE}`, | 184 | + placeholder: `请输入${t(RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE)}`, |
182 | }, | 185 | }, |
183 | }, | 186 | }, |
184 | { | 187 | { |
185 | field: RestApiCallFieldsEnum.CREDENTIALS, | 188 | field: RestApiCallFieldsEnum.CREDENTIALS, |
186 | - label: RestApiCallFieldsNameEnum.CREDENTIALS, | 189 | + label: t(RestApiCallFieldsNameEnum.CREDENTIALS), |
187 | component: 'Input', | 190 | component: 'Input', |
188 | slot: RestApiCallFieldsEnum.CREDENTIALS, | 191 | slot: RestApiCallFieldsEnum.CREDENTIALS, |
189 | }, | 192 | }, |
@@ -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 | } |
@@ -6,6 +6,9 @@ import { | @@ -6,6 +6,9 @@ import { | ||
6 | } from '../../../enum/form'; | 6 | } from '../../../enum/form'; |
7 | import { SendEmailFieldsEnum, SendEmailFieldsNameEnum } from '../../../enum/formField/external'; | 7 | import { SendEmailFieldsEnum, SendEmailFieldsNameEnum } from '../../../enum/formField/external'; |
8 | import { FormSchema } from '/@/components/Form'; | 8 | import { FormSchema } from '/@/components/Form'; |
9 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
10 | + | ||
11 | +const { t } = useI18n(); | ||
9 | 12 | ||
10 | export const formSchemas: FormSchema[] = [ | 13 | export const formSchemas: FormSchema[] = [ |
11 | { | 14 | { |
@@ -13,12 +16,12 @@ export const formSchemas: FormSchema[] = [ | @@ -13,12 +16,12 @@ export const formSchemas: FormSchema[] = [ | ||
13 | label: '', | 16 | label: '', |
14 | component: 'Checkbox', | 17 | component: 'Checkbox', |
15 | renderComponentContent: () => ({ | 18 | renderComponentContent: () => ({ |
16 | - default: () => SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS, | 19 | + default: () => t(SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS), |
17 | }), | 20 | }), |
18 | }, | 21 | }, |
19 | { | 22 | { |
20 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, | 23 | field: SendEmailFieldsEnum.SMTP_PROTOCOL, |
21 | - label: SendEmailFieldsNameEnum.SMTP_PROTOCOL, | 24 | + label: t(SendEmailFieldsNameEnum.SMTP_PROTOCOL), |
22 | component: 'Select', | 25 | component: 'Select', |
23 | required: true, | 26 | required: true, |
24 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 27 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
@@ -27,42 +30,42 @@ export const formSchemas: FormSchema[] = [ | @@ -27,42 +30,42 @@ export const formSchemas: FormSchema[] = [ | ||
27 | label: EmailProtocolNameEnum[value], | 30 | label: EmailProtocolNameEnum[value], |
28 | value, | 31 | value, |
29 | })), | 32 | })), |
30 | - placeholder: `请选择${SendEmailFieldsNameEnum.SMTP_PROTOCOL}`, | 33 | + placeholder: `请选择${t(SendEmailFieldsNameEnum.SMTP_PROTOCOL)}`, |
31 | getPopupContainer: () => document.body, | 34 | getPopupContainer: () => document.body, |
32 | }, | 35 | }, |
33 | }, | 36 | }, |
34 | { | 37 | { |
35 | field: SendEmailFieldsEnum.SMTP_HOST, | 38 | field: SendEmailFieldsEnum.SMTP_HOST, |
36 | - label: SendEmailFieldsNameEnum.SMTP_HOST, | 39 | + label: t(SendEmailFieldsNameEnum.SMTP_HOST), |
37 | component: 'Input', | 40 | component: 'Input', |
38 | required: true, | 41 | required: true, |
39 | colProps: { span: 12 }, | 42 | colProps: { span: 12 }, |
40 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 43 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
41 | componentProps: { | 44 | componentProps: { |
42 | - placeholder: `请输入${SendEmailFieldsNameEnum.SMTP_HOST}`, | 45 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.SMTP_HOST)}`, |
43 | }, | 46 | }, |
44 | }, | 47 | }, |
45 | { | 48 | { |
46 | field: SendEmailFieldsEnum.SMTP_PORT, | 49 | field: SendEmailFieldsEnum.SMTP_PORT, |
47 | - label: SendEmailFieldsNameEnum.SMTP_PORT, | 50 | + label: t(SendEmailFieldsNameEnum.SMTP_PORT), |
48 | component: 'InputNumber', | 51 | component: 'InputNumber', |
49 | required: true, | 52 | required: true, |
50 | colProps: { span: 12 }, | 53 | colProps: { span: 12 }, |
51 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 54 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
52 | componentProps: { | 55 | componentProps: { |
53 | min: 0, | 56 | min: 0, |
54 | - placeholder: `请输入${SendEmailFieldsNameEnum.SMTP_PORT}`, | 57 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.SMTP_PORT)}`, |
55 | }, | 58 | }, |
56 | }, | 59 | }, |
57 | { | 60 | { |
58 | field: SendEmailFieldsEnum.TIMEOUT, | 61 | field: SendEmailFieldsEnum.TIMEOUT, |
59 | - label: SendEmailFieldsNameEnum.TIMEOUT, | 62 | + label: t(SendEmailFieldsNameEnum.TIMEOUT), |
60 | component: 'InputNumber', | 63 | component: 'InputNumber', |
61 | required: true, | 64 | required: true, |
62 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 65 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
63 | componentProps: { | 66 | componentProps: { |
64 | min: 0, | 67 | min: 0, |
65 | - placeholder: `请输入${SendEmailFieldsNameEnum.TIMEOUT}`, | 68 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.TIMEOUT)}`, |
66 | }, | 69 | }, |
67 | }, | 70 | }, |
68 | { | 71 | { |
@@ -71,12 +74,12 @@ export const formSchemas: FormSchema[] = [ | @@ -71,12 +74,12 @@ export const formSchemas: FormSchema[] = [ | ||
71 | component: 'Checkbox', | 74 | component: 'Checkbox', |
72 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 75 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
73 | renderComponentContent: () => ({ | 76 | renderComponentContent: () => ({ |
74 | - default: () => SendEmailFieldsNameEnum.ENABLE_TLS, | 77 | + default: () => t(SendEmailFieldsNameEnum.ENABLE_TLS), |
75 | }), | 78 | }), |
76 | }, | 79 | }, |
77 | { | 80 | { |
78 | field: SendEmailFieldsEnum.TLS_VERSION, | 81 | field: SendEmailFieldsEnum.TLS_VERSION, |
79 | - label: SendEmailFieldsNameEnum.TLS_VERSION, | 82 | + label: t(SendEmailFieldsNameEnum.TLS_VERSION), |
80 | component: 'Select', | 83 | component: 'Select', |
81 | required: true, | 84 | required: true, |
82 | ifShow: ({ model }) => | 85 | ifShow: ({ model }) => |
@@ -86,7 +89,7 @@ export const formSchemas: FormSchema[] = [ | @@ -86,7 +89,7 @@ export const formSchemas: FormSchema[] = [ | ||
86 | label: TSLVersionNameEnum[value], | 89 | label: TSLVersionNameEnum[value], |
87 | value, | 90 | value, |
88 | })), | 91 | })), |
89 | - placeholder: `请选择${SendEmailFieldsNameEnum.TLS_VERSION}`, | 92 | + placeholder: `请选择${t(SendEmailFieldsNameEnum.TLS_VERSION)}`, |
90 | getPopupContainer: () => document.body, | 93 | getPopupContainer: () => document.body, |
91 | }, | 94 | }, |
92 | }, | 95 | }, |
@@ -96,12 +99,12 @@ export const formSchemas: FormSchema[] = [ | @@ -96,12 +99,12 @@ export const formSchemas: FormSchema[] = [ | ||
96 | component: 'Checkbox', | 99 | component: 'Checkbox', |
97 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 100 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
98 | renderComponentContent: () => ({ | 101 | renderComponentContent: () => ({ |
99 | - default: () => SendEmailFieldsNameEnum.ENABLE_PROXY, | 102 | + default: () => t(SendEmailFieldsNameEnum.ENABLE_PROXY), |
100 | }), | 103 | }), |
101 | }, | 104 | }, |
102 | { | 105 | { |
103 | field: SendEmailFieldsEnum.PROXY_HOST, | 106 | field: SendEmailFieldsEnum.PROXY_HOST, |
104 | - label: SendEmailFieldsNameEnum.PROXY_HOST, | 107 | + label: t(SendEmailFieldsNameEnum.PROXY_HOST), |
105 | component: 'Input', | 108 | component: 'Input', |
106 | required: true, | 109 | required: true, |
107 | colProps: { span: 12 }, | 110 | colProps: { span: 12 }, |
@@ -109,12 +112,12 @@ export const formSchemas: FormSchema[] = [ | @@ -109,12 +112,12 @@ export const formSchemas: FormSchema[] = [ | ||
109 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 112 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
110 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 113 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
111 | componentProps: { | 114 | componentProps: { |
112 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_HOST}`, | 115 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_HOST)}`, |
113 | }, | 116 | }, |
114 | }, | 117 | }, |
115 | { | 118 | { |
116 | field: SendEmailFieldsEnum.PROXY_PORT, | 119 | field: SendEmailFieldsEnum.PROXY_PORT, |
117 | - label: SendEmailFieldsNameEnum.PROXY_PORT, | 120 | + label: t(SendEmailFieldsNameEnum.PROXY_PORT), |
118 | component: 'Input', | 121 | component: 'Input', |
119 | required: true, | 122 | required: true, |
120 | colProps: { span: 12 }, | 123 | colProps: { span: 12 }, |
@@ -122,47 +125,47 @@ export const formSchemas: FormSchema[] = [ | @@ -122,47 +125,47 @@ export const formSchemas: FormSchema[] = [ | ||
122 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 125 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
123 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 126 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
124 | componentProps: { | 127 | componentProps: { |
125 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_PORT}`, | 128 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_PORT)}`, |
126 | }, | 129 | }, |
127 | }, | 130 | }, |
128 | { | 131 | { |
129 | field: SendEmailFieldsEnum.PROXY_USER, | 132 | field: SendEmailFieldsEnum.PROXY_USER, |
130 | - label: SendEmailFieldsNameEnum.PROXY_USER, | 133 | + label: t(SendEmailFieldsNameEnum.PROXY_USER), |
131 | component: 'Input', | 134 | component: 'Input', |
132 | ifShow: ({ model }) => | 135 | ifShow: ({ model }) => |
133 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 136 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
134 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 137 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
135 | componentProps: { | 138 | componentProps: { |
136 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_USER}`, | 139 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_USER)}`, |
137 | }, | 140 | }, |
138 | }, | 141 | }, |
139 | { | 142 | { |
140 | field: SendEmailFieldsEnum.PROXY_PASSWORD, | 143 | field: SendEmailFieldsEnum.PROXY_PASSWORD, |
141 | - label: SendEmailFieldsNameEnum.PROXY_PASSWORD, | 144 | + label: t(SendEmailFieldsNameEnum.PROXY_PASSWORD), |
142 | component: 'Input', | 145 | component: 'Input', |
143 | ifShow: ({ model }) => | 146 | ifShow: ({ model }) => |
144 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && | 147 | !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS] && |
145 | model[SendEmailFieldsEnum.ENABLE_PROXY], | 148 | model[SendEmailFieldsEnum.ENABLE_PROXY], |
146 | componentProps: { | 149 | componentProps: { |
147 | - placeholder: `请输入${SendEmailFieldsNameEnum.PROXY_PASSWORD}`, | 150 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PROXY_PASSWORD)}`, |
148 | }, | 151 | }, |
149 | }, | 152 | }, |
150 | { | 153 | { |
151 | field: SendEmailFieldsEnum.USERNAME, | 154 | field: SendEmailFieldsEnum.USERNAME, |
152 | - label: SendEmailFieldsNameEnum.USERNAME, | 155 | + label: t(SendEmailFieldsNameEnum.USERNAME), |
153 | component: 'Input', | 156 | component: 'Input', |
154 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 157 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
155 | componentProps: { | 158 | componentProps: { |
156 | - placeholder: `请输入${SendEmailFieldsNameEnum.USERNAME}`, | 159 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.USERNAME)}`, |
157 | }, | 160 | }, |
158 | }, | 161 | }, |
159 | { | 162 | { |
160 | field: SendEmailFieldsEnum.PASSWORD, | 163 | field: SendEmailFieldsEnum.PASSWORD, |
161 | - label: SendEmailFieldsNameEnum.PASSWORD, | 164 | + label: t(SendEmailFieldsNameEnum.PASSWORD), |
162 | component: 'InputPassword', | 165 | component: 'InputPassword', |
163 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], | 166 | ifShow: ({ model }) => !model[SendEmailFieldsEnum.USE_SYSTEM_SMTP_SETTINGS], |
164 | componentProps: { | 167 | componentProps: { |
165 | - placeholder: `请输入${SendEmailFieldsNameEnum.PASSWORD}`, | 168 | + placeholder: `请输入${t(SendEmailFieldsNameEnum.PASSWORD)}`, |
166 | }, | 169 | }, |
167 | }, | 170 | }, |
168 | ]; | 171 | ]; |
@@ -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 { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; | 1 | import { SMSServiceProviderEnum, SMSServiceProviderNameEnum } from '../../../enum/form'; |
2 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; | 2 | import { SendSMSFieldsEnum, SendSMSFieldsNameEnum } from '../../../enum/formField/external'; |
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 | { |
7 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, | 10 | field: SendSMSFieldsEnum.NUMBERS_TO_TEMPLATE, |
8 | - label: SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE, | 11 | + label: t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE), |
9 | component: 'Input', | 12 | component: 'Input', |
10 | required: true, | 13 | required: true, |
11 | helpMessage: | 14 | helpMessage: |
12 | 'Comma separated Phone Numbers, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 15 | 'Comma separated Phone Numbers, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
13 | componentProps: { | 16 | componentProps: { |
14 | - placeholder: `请输入${SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE}`, | 17 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE)}`, |
15 | }, | 18 | }, |
16 | }, | 19 | }, |
17 | { | 20 | { |
18 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, | 21 | field: SendSMSFieldsEnum.SMS_MESSAGE_TEMPLATE, |
19 | - label: SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE, | 22 | + label: t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE), |
20 | component: 'InputTextArea', | 23 | component: 'InputTextArea', |
21 | required: true, | 24 | required: true, |
22 | helpMessage: | 25 | helpMessage: |
23 | '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', |
24 | componentProps: { | 27 | componentProps: { |
25 | - placeholder: `请输入${SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE}`, | 28 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE)}`, |
26 | }, | 29 | }, |
27 | }, | 30 | }, |
28 | { | 31 | { |
@@ -30,12 +33,12 @@ export const formSchemas: FormSchema[] = [ | @@ -30,12 +33,12 @@ export const formSchemas: FormSchema[] = [ | ||
30 | label: '', | 33 | label: '', |
31 | component: 'Checkbox', | 34 | component: 'Checkbox', |
32 | renderComponentContent: () => ({ | 35 | renderComponentContent: () => ({ |
33 | - default: () => SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS, | 36 | + default: () => t(SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS), |
34 | }), | 37 | }), |
35 | }, | 38 | }, |
36 | { | 39 | { |
37 | field: SendSMSFieldsEnum.TYPE, | 40 | field: SendSMSFieldsEnum.TYPE, |
38 | - label: SendSMSFieldsNameEnum.TYPE, | 41 | + label: t(SendSMSFieldsNameEnum.TYPE), |
39 | component: 'Select', | 42 | component: 'Select', |
40 | required: true, | 43 | required: true, |
41 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], | 44 | ifShow: ({ model }) => !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS], |
@@ -45,12 +48,12 @@ export const formSchemas: FormSchema[] = [ | @@ -45,12 +48,12 @@ export const formSchemas: FormSchema[] = [ | ||
45 | value, | 48 | value, |
46 | })), | 49 | })), |
47 | getPopupContainer: () => document.body, | 50 | getPopupContainer: () => document.body, |
48 | - placeholder: `请选择${SendSMSFieldsNameEnum.TYPE}`, | 51 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.TYPE)}`, |
49 | }, | 52 | }, |
50 | }, | 53 | }, |
51 | { | 54 | { |
52 | field: SendSMSFieldsEnum.NUMBER_FROM, | 55 | field: SendSMSFieldsEnum.NUMBER_FROM, |
53 | - label: SendSMSFieldsNameEnum.NUMBER_FROM, | 56 | + label: t(SendSMSFieldsNameEnum.NUMBER_FROM), |
54 | component: 'Input', | 57 | component: 'Input', |
55 | required: true, | 58 | required: true, |
56 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, | 59 | helpMessage: `Phone Number in E.164 format/Phone Number's SID/Messaging Service SID, ex. +19995550123/PNXXX/MGXXX`, |
@@ -58,67 +61,67 @@ export const formSchemas: FormSchema[] = [ | @@ -58,67 +61,67 @@ export const formSchemas: FormSchema[] = [ | ||
58 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 61 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
59 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 62 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
60 | componentProps: { | 63 | componentProps: { |
61 | - placeholder: `请输入${SendSMSFieldsNameEnum.NUMBER_FROM}`, | 64 | + placeholder: `请输入${t(SendSMSFieldsNameEnum.NUMBER_FROM)}`, |
62 | }, | 65 | }, |
63 | }, | 66 | }, |
64 | { | 67 | { |
65 | field: SendSMSFieldsEnum.ACCOUNT_SID, | 68 | field: SendSMSFieldsEnum.ACCOUNT_SID, |
66 | - label: SendSMSFieldsNameEnum.ACCOUNT_SID, | 69 | + label: t(SendSMSFieldsNameEnum.ACCOUNT_SID), |
67 | component: 'Input', | 70 | component: 'Input', |
68 | required: true, | 71 | required: true, |
69 | ifShow: ({ model }) => | 72 | ifShow: ({ model }) => |
70 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 73 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
71 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 74 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
72 | componentProps: { | 75 | componentProps: { |
73 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCOUNT_SID}`, | 76 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCOUNT_SID)}`, |
74 | }, | 77 | }, |
75 | }, | 78 | }, |
76 | { | 79 | { |
77 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, | 80 | field: SendSMSFieldsEnum.ACCOUNT_TOKEN, |
78 | - label: SendSMSFieldsNameEnum.ACCOUNT_TOKEN, | 81 | + label: t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN), |
79 | component: 'Input', | 82 | component: 'Input', |
80 | required: true, | 83 | required: true, |
81 | ifShow: ({ model }) => | 84 | ifShow: ({ model }) => |
82 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 85 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
83 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, | 86 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.TWILIO, |
84 | componentProps: { | 87 | componentProps: { |
85 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCOUNT_TOKEN}`, | 88 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCOUNT_TOKEN)}`, |
86 | }, | 89 | }, |
87 | }, | 90 | }, |
88 | { | 91 | { |
89 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, | 92 | field: SendSMSFieldsEnum.ACCESS_KEY_ID, |
90 | - label: SendSMSFieldsNameEnum.ACCESS_KEY_ID, | 93 | + label: t(SendSMSFieldsNameEnum.ACCESS_KEY_ID), |
91 | component: 'Input', | 94 | component: 'Input', |
92 | required: true, | 95 | required: true, |
93 | ifShow: ({ model }) => | 96 | ifShow: ({ model }) => |
94 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 97 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
95 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 98 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
96 | componentProps: { | 99 | componentProps: { |
97 | - placeholder: `请选择${SendSMSFieldsNameEnum.ACCESS_KEY_ID}`, | 100 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.ACCESS_KEY_ID)}`, |
98 | }, | 101 | }, |
99 | }, | 102 | }, |
100 | { | 103 | { |
101 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, | 104 | field: SendSMSFieldsEnum.SECRET_ACCESS_KEY, |
102 | - label: SendSMSFieldsNameEnum.SECRET_ACCESS_KEY, | 105 | + label: t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY), |
103 | component: 'InputPassword', | 106 | component: 'InputPassword', |
104 | required: true, | 107 | required: true, |
105 | ifShow: ({ model }) => | 108 | ifShow: ({ model }) => |
106 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 109 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
107 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 110 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
108 | componentProps: { | 111 | componentProps: { |
109 | - placeholder: `请选择${SendSMSFieldsNameEnum.SECRET_ACCESS_KEY}`, | 112 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.SECRET_ACCESS_KEY)}`, |
110 | }, | 113 | }, |
111 | }, | 114 | }, |
112 | { | 115 | { |
113 | field: SendSMSFieldsEnum.REGION, | 116 | field: SendSMSFieldsEnum.REGION, |
114 | - label: SendSMSFieldsNameEnum.REGION, | 117 | + label: t(SendSMSFieldsNameEnum.REGION), |
115 | component: 'InputPassword', | 118 | component: 'InputPassword', |
116 | required: true, | 119 | required: true, |
117 | ifShow: ({ model }) => | 120 | ifShow: ({ model }) => |
118 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && | 121 | !model[SendSMSFieldsEnum.USE_SYSTEM_SMS_SETTINGS] && |
119 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, | 122 | model[SendSMSFieldsEnum.TYPE] === SMSServiceProviderEnum.AWS_SNS, |
120 | componentProps: { | 123 | componentProps: { |
121 | - placeholder: `请选择${SendSMSFieldsNameEnum.REGION}`, | 124 | + placeholder: `请选择${t(SendSMSFieldsNameEnum.REGION)}`, |
122 | }, | 125 | }, |
123 | }, | 126 | }, |
124 | ]; | 127 | ]; |
@@ -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,27 @@ import { | @@ -3,18 +3,27 @@ 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'; |
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, | 13 | field: CheckAlarmStatusFieldEnum.ALARM_STATUS_LIST, |
11 | component: 'Select', | 14 | component: 'Select', |
12 | - label: CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST, | ||
13 | - required: true, | 15 | + label: t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST), |
16 | + rules: [ | ||
17 | + { | ||
18 | + required: true, | ||
19 | + message: `请选择${t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)}`, | ||
20 | + type: 'array', | ||
21 | + }, | ||
22 | + ], | ||
14 | componentProps: { | 23 | componentProps: { |
15 | mode: 'multiple', | 24 | mode: 'multiple', |
16 | getPopupContainer: () => document.body, | 25 | getPopupContainer: () => document.body, |
17 | - placeholder: `请选择${CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST}`, | 26 | + placeholder: `请选择${t(CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST)}`, |
18 | options: [ | 27 | options: [ |
19 | { | 28 | { |
20 | label: AlarmStatusMean[AlarmStatus.CLEARED_UN_ACK], | 29 | 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 | } |
@@ -3,30 +3,45 @@ import { | @@ -3,30 +3,45 @@ import { | ||
3 | CheckExistenceFieldsNameEnum, | 3 | CheckExistenceFieldsNameEnum, |
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 | 9 | ||
7 | export const formSchemas: FormSchema[] = [ | 10 | export const formSchemas: FormSchema[] = [ |
8 | { | 11 | { |
9 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, | 12 | field: CheckExistenceFieldsEnum.MESSAGE_NAMES, |
10 | component: 'Select', | 13 | component: 'Select', |
11 | - label: CheckExistenceFieldsNameEnum.MESSAGE_NAMES, | ||
12 | - rules: [{ required: true, type: 'array' }], | 14 | + label: t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES), |
15 | + rules: [ | ||
16 | + { | ||
17 | + required: true, | ||
18 | + type: 'array', | ||
19 | + message: `请选择${t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)}`, | ||
20 | + }, | ||
21 | + ], | ||
13 | componentProps: { | 22 | componentProps: { |
14 | mode: 'tags', | 23 | mode: 'tags', |
15 | open: false, | 24 | open: false, |
16 | getPopupContainer: () => document.body, | 25 | getPopupContainer: () => document.body, |
17 | - placeholder: `请选择${CheckExistenceFieldsNameEnum.MESSAGE_NAMES}`, | 26 | + placeholder: `请选择${t(CheckExistenceFieldsNameEnum.MESSAGE_NAMES)}`, |
18 | }, | 27 | }, |
19 | }, | 28 | }, |
20 | { | 29 | { |
21 | field: CheckExistenceFieldsEnum.METADATA_NAMES, | 30 | field: CheckExistenceFieldsEnum.METADATA_NAMES, |
22 | component: 'Select', | 31 | component: 'Select', |
23 | - label: CheckExistenceFieldsNameEnum.METADATA_NAMES, | ||
24 | - rules: [{ required: true, type: 'array' }], | 32 | + label: t(CheckExistenceFieldsNameEnum.METADATA_NAMES), |
33 | + rules: [ | ||
34 | + { | ||
35 | + required: true, | ||
36 | + type: 'array', | ||
37 | + message: `请选择${t(CheckExistenceFieldsNameEnum.METADATA_NAMES)}`, | ||
38 | + }, | ||
39 | + ], | ||
25 | componentProps: { | 40 | componentProps: { |
26 | mode: 'tags', | 41 | mode: 'tags', |
27 | open: false, | 42 | open: false, |
28 | getPopupContainer: () => document.body, | 43 | getPopupContainer: () => document.body, |
29 | - placeholder: `请选择${CheckExistenceFieldsNameEnum.METADATA_NAMES}`, | 44 | + placeholder: `请选择${t(CheckExistenceFieldsNameEnum.METADATA_NAMES)}`, |
30 | }, | 45 | }, |
31 | }, | 46 | }, |
32 | { | 47 | { |
@@ -34,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | @@ -34,7 +49,7 @@ export const formSchemas: FormSchema[] = [ | ||
34 | component: 'Checkbox', | 49 | component: 'Checkbox', |
35 | label: '', | 50 | label: '', |
36 | renderComponentContent: () => ({ | 51 | renderComponentContent: () => ({ |
37 | - default: () => CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS, | 52 | + default: () => t(CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS), |
38 | }), | 53 | }), |
39 | }, | 54 | }, |
40 | ]; | 55 | ]; |
@@ -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, |
@@ -46,7 +50,7 @@ export const getEntityIdSelect = (type: EntityTypeEnum) => { | @@ -46,7 +50,7 @@ export const getEntityIdSelect = (type: EntityTypeEnum) => { | ||
46 | }; | 50 | }; |
47 | 51 | ||
48 | return { | 52 | return { |
49 | - placeholder: `请选择${EntityTypeNameEnum[type] ?? ''}`, | 53 | + placeholder: `请选择${t(EntityTypeNameEnum[type] ?? '')}`, |
50 | resultField: 'data', | 54 | resultField: 'data', |
51 | labelField: 'name', | 55 | labelField: 'name', |
52 | valueField: 'id.id', | 56 | valueField: 'id.id', |
@@ -63,26 +67,26 @@ export const formSchemas: FormSchema[] = [ | @@ -63,26 +67,26 @@ export const formSchemas: FormSchema[] = [ | ||
63 | component: 'Checkbox', | 67 | component: 'Checkbox', |
64 | label: '', | 68 | label: '', |
65 | renderComponentContent: () => ({ | 69 | renderComponentContent: () => ({ |
66 | - default: () => CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY, | 70 | + default: () => t(CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY), |
67 | }), | 71 | }), |
68 | }, | 72 | }, |
69 | { | 73 | { |
70 | field: CheckRelationFieldsEnum.DIRECTION, | 74 | field: CheckRelationFieldsEnum.DIRECTION, |
71 | component: 'Select', | 75 | component: 'Select', |
72 | - label: CheckRelationFieldsNameEnum.DIRECTION, | 76 | + label: t(CheckRelationFieldsNameEnum.DIRECTION), |
73 | componentProps: { | 77 | componentProps: { |
74 | options: [ | 78 | options: [ |
75 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, | 79 | { label: DirectionNameEnum.FROM, value: DirectionEnum.FROM }, |
76 | { label: DirectionNameEnum.TO, value: DirectionEnum.TO }, | 80 | { label: DirectionNameEnum.TO, value: DirectionEnum.TO }, |
77 | ], | 81 | ], |
78 | - placeholder: `请选择${CheckRelationFieldsNameEnum.DIRECTION}`, | 82 | + placeholder: `请选择${t(CheckRelationFieldsNameEnum.DIRECTION)}`, |
79 | getPopupContainer: () => document.body, | 83 | getPopupContainer: () => document.body, |
80 | }, | 84 | }, |
81 | }, | 85 | }, |
82 | { | 86 | { |
83 | field: CheckRelationFieldsEnum.ENTITY_TYPE, | 87 | field: CheckRelationFieldsEnum.ENTITY_TYPE, |
84 | component: 'Select', | 88 | component: 'Select', |
85 | - label: CheckRelationFieldsNameEnum.ENTITY_TYPE, | 89 | + label: t(CheckRelationFieldsNameEnum.ENTITY_TYPE), |
86 | colProps: { span: 8 }, | 90 | colProps: { span: 8 }, |
87 | componentProps: ({ formActionType }) => { | 91 | componentProps: ({ formActionType }) => { |
88 | const { setFieldsValue } = formActionType; | 92 | const { setFieldsValue } = formActionType; |
@@ -91,7 +95,7 @@ export const formSchemas: FormSchema[] = [ | @@ -91,7 +95,7 @@ export const formSchemas: FormSchema[] = [ | ||
91 | label: EntityTypeNameEnum[key], | 95 | label: EntityTypeNameEnum[key], |
92 | value: key, | 96 | value: key, |
93 | })), | 97 | })), |
94 | - placeholder: `请选择${CheckRelationFieldsNameEnum.ENTITY_TYPE}`, | 98 | + placeholder: `请选择${t(CheckRelationFieldsNameEnum.ENTITY_TYPE)}`, |
95 | getPopupContainer: () => document.body, | 99 | getPopupContainer: () => document.body, |
96 | onChange: () => { | 100 | onChange: () => { |
97 | setFieldsValue({ [CheckRelationFieldsEnum.ENTITY_ID]: null }); | 101 | setFieldsValue({ [CheckRelationFieldsEnum.ENTITY_ID]: null }); |
@@ -108,7 +112,6 @@ export const formSchemas: FormSchema[] = [ | @@ -108,7 +112,6 @@ export const formSchemas: FormSchema[] = [ | ||
108 | show: ({ model }) => model[CheckRelationFieldsEnum.ENTITY_TYPE], | 112 | show: ({ model }) => model[CheckRelationFieldsEnum.ENTITY_TYPE], |
109 | componentProps: ({ formModel }) => { | 113 | componentProps: ({ formModel }) => { |
110 | const entityType = formModel[CheckRelationFieldsEnum.ENTITY_TYPE]; | 114 | const entityType = formModel[CheckRelationFieldsEnum.ENTITY_TYPE]; |
111 | - | ||
112 | return getEntityIdSelect(entityType); | 115 | return getEntityIdSelect(entityType); |
113 | }, | 116 | }, |
114 | ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY], | 117 | ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY], |
@@ -116,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | @@ -116,7 +119,7 @@ export const formSchemas: FormSchema[] = [ | ||
116 | { | 119 | { |
117 | field: CheckRelationFieldsEnum.RELEATION_TYPE, | 120 | field: CheckRelationFieldsEnum.RELEATION_TYPE, |
118 | component: 'Select', | 121 | component: 'Select', |
119 | - label: CheckRelationFieldsNameEnum.RELEATION_TYPE, | 122 | + label: t(CheckRelationFieldsNameEnum.RELEATION_TYPE), |
120 | defaultValue: RelationTypeEnum.CONTAINS, | 123 | defaultValue: RelationTypeEnum.CONTAINS, |
121 | componentProps: { | 124 | componentProps: { |
122 | options: Object.keys(RelationTypeEnum).map((value) => ({ | 125 | options: Object.keys(RelationTypeEnum).map((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(FilterCategoryComponentEnum.CHECK_RELATION); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_RELATION); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface CheckRelationDataType { | 11 | export interface CheckRelationDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
@@ -4,24 +4,34 @@ import { | @@ -4,24 +4,34 @@ import { | ||
4 | GpsGeofencingFilterFieldsNameEnum, | 4 | GpsGeofencingFilterFieldsNameEnum, |
5 | } from '../../../enum/formField/filter'; | 5 | } from '../../../enum/formField/filter'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | 10 | ||
8 | export const formSchemas: FormSchema[] = [ | 11 | export const formSchemas: FormSchema[] = [ |
9 | { | 12 | { |
10 | field: GpsGeofencingFilterFieldsEnum.LATITUDE_KEY_NAME, | 13 | field: GpsGeofencingFilterFieldsEnum.LATITUDE_KEY_NAME, |
11 | component: 'Input', | 14 | component: 'Input', |
12 | - label: GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME, | 15 | + label: t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME), |
16 | + componentProps: { | ||
17 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME)}`, | ||
18 | + }, | ||
13 | }, | 19 | }, |
14 | { | 20 | { |
15 | field: GpsGeofencingFilterFieldsEnum.LONGITUDE_KEY_NAME, | 21 | field: GpsGeofencingFilterFieldsEnum.LONGITUDE_KEY_NAME, |
16 | component: 'Input', | 22 | component: 'Input', |
17 | - label: GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME, | 23 | + label: t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME), |
24 | + componentProps: { | ||
25 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME)}`, | ||
26 | + }, | ||
18 | }, | 27 | }, |
19 | { | 28 | { |
20 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE, | 29 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE, |
21 | component: 'Select', | 30 | component: 'Select', |
22 | - label: GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE, | 31 | + label: t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE), |
23 | componentProps: { | 32 | componentProps: { |
24 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), | 33 | options: Object.keys(PerimeterTypeEnum).map((value) => ({ label: value, value })), |
34 | + placeholder: `请选择${t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE)}`, | ||
25 | }, | 35 | }, |
26 | }, | 36 | }, |
27 | { | 37 | { |
@@ -29,57 +39,73 @@ export const formSchemas: FormSchema[] = [ | @@ -29,57 +39,73 @@ export const formSchemas: FormSchema[] = [ | ||
29 | component: 'Checkbox', | 39 | component: 'Checkbox', |
30 | label: '', | 40 | label: '', |
31 | renderComponentContent: () => ({ | 41 | renderComponentContent: () => ({ |
32 | - default: () => GpsGeofencingFilterFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA, | 42 | + default: () => |
43 | + t(GpsGeofencingFilterFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA), | ||
33 | }), | 44 | }), |
34 | }, | 45 | }, |
35 | { | 46 | { |
36 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_KEY_NAME, | 47 | field: GpsGeofencingFilterFieldsEnum.PERIMETER_KEY_NAME, |
37 | component: 'Input', | 48 | component: 'Input', |
38 | - label: GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME, | 49 | + label: t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME), |
39 | show: ({ model }) => | 50 | show: ({ model }) => |
40 | model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 51 | model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
52 | + componentProps: { | ||
53 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME)}`, | ||
54 | + }, | ||
41 | }, | 55 | }, |
42 | { | 56 | { |
43 | field: GpsGeofencingFilterFieldsEnum.POLYGONS_DEFINITION, | 57 | field: GpsGeofencingFilterFieldsEnum.POLYGONS_DEFINITION, |
44 | component: 'Input', | 58 | component: 'Input', |
45 | - label: GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION, | 59 | + label: t(GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION), |
46 | helpMessage: | 60 | helpMessage: |
47 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', | 61 | 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].', |
48 | show: ({ model }) => | 62 | show: ({ model }) => |
49 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA] && | 63 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA] && |
50 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON, | 64 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.POLYGON, |
65 | + componentProps: { | ||
66 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION)}`, | ||
67 | + }, | ||
51 | }, | 68 | }, |
52 | { | 69 | { |
53 | field: GpsGeofencingFilterFieldsEnum.CENTER_LATITUDE, | 70 | field: GpsGeofencingFilterFieldsEnum.CENTER_LATITUDE, |
54 | component: 'InputNumber', | 71 | component: 'InputNumber', |
55 | - label: GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE, | 72 | + label: t(GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE), |
56 | colProps: { span: 12 }, | 73 | colProps: { span: 12 }, |
57 | show: ({ model }) => | 74 | show: ({ model }) => |
58 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 75 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
59 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 76 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
77 | + componentProps: { | ||
78 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE)}`, | ||
79 | + }, | ||
60 | }, | 80 | }, |
61 | { | 81 | { |
62 | field: GpsGeofencingFilterFieldsEnum.CENTER_LONGITUDE, | 82 | field: GpsGeofencingFilterFieldsEnum.CENTER_LONGITUDE, |
63 | component: 'InputNumber', | 83 | component: 'InputNumber', |
64 | - label: GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE, | 84 | + label: t(GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE), |
65 | colProps: { span: 12 }, | 85 | colProps: { span: 12 }, |
66 | show: ({ model }) => | 86 | show: ({ model }) => |
67 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 87 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
68 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 88 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
89 | + componentProps: { | ||
90 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE)}`, | ||
91 | + }, | ||
69 | }, | 92 | }, |
70 | { | 93 | { |
71 | field: GpsGeofencingFilterFieldsEnum.RANGE, | 94 | field: GpsGeofencingFilterFieldsEnum.RANGE, |
72 | component: 'InputNumber', | 95 | component: 'InputNumber', |
73 | - label: GpsGeofencingFilterFieldsNameEnum.RANGE, | 96 | + label: t(GpsGeofencingFilterFieldsNameEnum.RANGE), |
74 | colProps: { span: 12 }, | 97 | colProps: { span: 12 }, |
75 | show: ({ model }) => | 98 | show: ({ model }) => |
76 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 99 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
77 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], | 100 | !model[GpsGeofencingFilterFieldsEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA], |
101 | + componentProps: { | ||
102 | + placeholder: `请输入${t(GpsGeofencingFilterFieldsNameEnum.RANGE)}`, | ||
103 | + }, | ||
78 | }, | 104 | }, |
79 | { | 105 | { |
80 | field: GpsGeofencingFilterFieldsEnum.RANGE_UNIT, | 106 | field: GpsGeofencingFilterFieldsEnum.RANGE_UNIT, |
81 | component: 'Select', | 107 | component: 'Select', |
82 | - label: GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT, | 108 | + label: t(GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT), |
83 | colProps: { span: 12 }, | 109 | colProps: { span: 12 }, |
84 | show: ({ model }) => | 110 | show: ({ model }) => |
85 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && | 111 | model[GpsGeofencingFilterFieldsEnum.PERIMETER_TYPE] === PerimeterTypeEnum.CIRCLE && |
@@ -89,6 +115,7 @@ export const formSchemas: FormSchema[] = [ | @@ -89,6 +115,7 @@ export const formSchemas: FormSchema[] = [ | ||
89 | label: RangeUtilNameEnum[value], | 115 | label: RangeUtilNameEnum[value], |
90 | value, | 116 | value, |
91 | })), | 117 | })), |
118 | + placeholder: `请选择${t(GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT)}`, | ||
92 | }, | 119 | }, |
93 | }, | 120 | }, |
94 | ]; | 121 | ]; |
@@ -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.GPS_GEOFENCING_FILTER); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.GPS_GEOFENCING_FILTER); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface GpsGeofencingFilterDataType { | 10 | export interface GpsGeofencingFilterDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { MessageTypesEnum, MessageTypesNameEnum } from '../../../enum/form'; | 1 | import { MessageTypesEnum, MessageTypesNameEnum } from '../../../enum/form'; |
2 | import { MessageTypeFieldsEnum, MessageTypeFieldsNameEnum } from '../../../enum/formField/filter'; | 2 | import { MessageTypeFieldsEnum, MessageTypeFieldsNameEnum } from '../../../enum/formField/filter'; |
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 | { |
7 | field: MessageTypeFieldsEnum.MESSAGE_TYPES, | 10 | field: MessageTypeFieldsEnum.MESSAGE_TYPES, |
8 | component: 'Select', | 11 | component: 'Select', |
9 | - label: MessageTypeFieldsNameEnum.MESSAGE_TYPES, | 12 | + label: t(MessageTypeFieldsNameEnum.MESSAGE_TYPES), |
10 | componentProps: { | 13 | componentProps: { |
11 | options: Object.keys(MessageTypesEnum).map((value) => ({ | 14 | options: Object.keys(MessageTypesEnum).map((value) => ({ |
12 | label: MessageTypesNameEnum[value], | 15 | label: MessageTypesNameEnum[value], |
13 | value, | 16 | value, |
14 | })), | 17 | })), |
15 | mode: 'multiple', | 18 | mode: 'multiple', |
16 | - placeholder: `请选择${MessageTypeFieldsNameEnum.MESSAGE_TYPES}`, | 19 | + placeholder: `请选择${t(MessageTypeFieldsNameEnum.MESSAGE_TYPES)}`, |
17 | getPopupContainer: () => document.body, | 20 | getPopupContainer: () => document.body, |
18 | }, | 21 | }, |
19 | }, | 22 | }, |
@@ -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.MESSAGE_TYPE); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface MessageTypeDataType { | 11 | export interface MessageTypeDataType { |
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(FilterCategoryComponentEnum.MESSAGE_TYPE_SWITCH); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE_SWITCH); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface MessageTypeSwitchDataType { | 10 | export interface MessageTypeSwitchDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -4,13 +4,16 @@ import { | @@ -4,13 +4,16 @@ import { | ||
4 | } from '../../../enum/formField/filter'; | 4 | } from '../../../enum/formField/filter'; |
5 | import { findDictItemByCode } from '/@/api/system/dict'; | 5 | import { findDictItemByCode } from '/@/api/system/dict'; |
6 | import { FormSchema } from '/@/components/Form'; | 6 | import { FormSchema } from '/@/components/Form'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
8 | + | ||
9 | +const { t } = useI18n(); | ||
7 | import { DictEnum } from '/@/enums/dictEnum'; | 10 | import { DictEnum } from '/@/enums/dictEnum'; |
8 | 11 | ||
9 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
10 | { | 13 | { |
11 | field: OriginatorTypeFieldsEnum.ORIGINATOR_TYPES, | 14 | field: OriginatorTypeFieldsEnum.ORIGINATOR_TYPES, |
12 | component: 'ApiSelect', | 15 | component: 'ApiSelect', |
13 | - label: OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES, | 16 | + label: t(OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES), |
14 | componentProps: { | 17 | componentProps: { |
15 | api: findDictItemByCode, | 18 | api: findDictItemByCode, |
16 | params: { | 19 | params: { |
@@ -20,6 +23,7 @@ export const formSchemas: FormSchema[] = [ | @@ -20,6 +23,7 @@ export const formSchemas: FormSchema[] = [ | ||
20 | labelField: 'itemText', | 23 | labelField: 'itemText', |
21 | valueField: 'itemValue', | 24 | valueField: 'itemValue', |
22 | getPopupContainer: () => document.body, | 25 | getPopupContainer: () => document.body, |
26 | + placeholder: `请选择${t(OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES)}`, | ||
23 | }, | 27 | }, |
24 | }, | 28 | }, |
25 | ]; | 29 | ]; |
@@ -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.ORIGINATOR_TYPE); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OriginatorTypeDataType { | 10 | export interface OriginatorTypeDataType { |
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(FilterCategoryComponentEnum.ORIGINATOR_TYPE_SWITCH); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE_SWITCH); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OriginatorTypeSwitchDataType { | 10 | export interface OriginatorTypeSwitchDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { FormSchema } from '/@/components/Form'; | 1 | import { FormSchema } from '/@/components/Form'; |
2 | + | ||
2 | import { isObject } from '/@/utils/is'; | 3 | import { isObject } from '/@/utils/is'; |
3 | 4 | ||
4 | export const validateJSON = (value: string): { value: Recordable | string; flag: boolean } => { | 5 | export const validateJSON = (value: string): { value: Recordable | string; flag: boolean } => { |
@@ -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.SCENE_REACT); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCENE_REACT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SceneReactDataType { | 10 | export interface SceneReactDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | -import { h } from 'vue'; | ||
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 1 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import HelpMessage from './HelpMessage.vue'; | 2 | import HelpMessage from './HelpMessage.vue'; |
4 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; |
5 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/filter'; | 4 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/filter'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
6 | 8 | ||
7 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); | 9 | useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal); |
8 | 10 | ||
@@ -10,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | @@ -10,7 +12,7 @@ export const formSchemas: FormSchema[] = [ | ||
10 | { | 12 | { |
11 | field: ScriptFieldsEnum.JS_SCRIPT, | 13 | field: ScriptFieldsEnum.JS_SCRIPT, |
12 | component: 'JavascriptEditorWithTestModal', | 14 | component: 'JavascriptEditorWithTestModal', |
13 | - label: ScriptFieldsNameEnum.JS_SCRIPT, | 15 | + label: t(ScriptFieldsNameEnum.JS_SCRIPT), |
14 | changeEvent: 'update:value', | 16 | changeEvent: 'update:value', |
15 | valueField: 'value', | 17 | valueField: 'value', |
16 | renderComponentContent: () => { | 18 | renderComponentContent: () => { |
@@ -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.SCRIPT); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCRIPT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface ScriptDataType { | 10 | export interface ScriptDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { SwitchFieldsEnum, SwitchFieldsNameEnum } from '../../../enum/formField/filter'; | 1 | import { SwitchFieldsEnum, SwitchFieldsNameEnum } from '../../../enum/formField/filter'; |
2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 2 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
3 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; | 3 | import { JavascriptEditorWithTestModal } from '/@/views/rule/designer/src/components/JavaScriptFilterModal'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
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: SwitchFieldsEnum.JS_SCRIPT, | 12 | field: SwitchFieldsEnum.JS_SCRIPT, |
10 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
11 | - label: SwitchFieldsNameEnum.JS_SCRIPT, | 14 | + label: t(SwitchFieldsNameEnum.JS_SCRIPT), |
12 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
13 | valueField: 'value', | 16 | valueField: '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(FilterCategoryComponentEnum.SWITCH); | 7 | const keys = useCreateNodeKey(FilterCategoryComponentEnum.SWITCH); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface SwitchDataType { | 10 | export interface SwitchDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -13,7 +13,7 @@ import { GpsGeofencingFilterConfig } from './GpsGeofencingFilter'; | @@ -13,7 +13,7 @@ import { GpsGeofencingFilterConfig } from './GpsGeofencingFilter'; | ||
13 | import { CheckAlarmStatusConfig } from './CheckAlarmStatus'; | 13 | import { CheckAlarmStatusConfig } from './CheckAlarmStatus'; |
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 FilterCategoryConfig: CategoryConfigType = { | 17 | export const FilterCategoryConfig: CategoryConfigType = { |
18 | category: RuleNodeTypeEnum.FILTER, | 18 | category: RuleNodeTypeEnum.FILTER, |
19 | title: t('designer_config.filters.index.title'), | 19 | title: t('designer_config.filters.index.title'), |
@@ -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(FlowCategoryComponentEnum.ACKNOWLEDGE); | 7 | const keys = useCreateNodeKey(FlowCategoryComponentEnum.ACKNOWLEDGE); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface AcknowledgeDataType { | 10 | export interface AcknowledgeDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -3,12 +3,16 @@ import { FormSchema, useComponentRegister } from '/@/components/Form'; | @@ -3,12 +3,16 @@ import { FormSchema, useComponentRegister } from '/@/components/Form'; | ||
3 | import ApiComplete from './ApiComplete.vue'; | 3 | import ApiComplete from './ApiComplete.vue'; |
4 | import { getTenantQueue } from '/@/api/ruleChainDesigner'; | 4 | import { getTenantQueue } from '/@/api/ruleChainDesigner'; |
5 | 5 | ||
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
7 | + | ||
8 | +const { t } = useI18n(); | ||
9 | + | ||
6 | useComponentRegister('ApiComplete', ApiComplete); | 10 | useComponentRegister('ApiComplete', ApiComplete); |
7 | 11 | ||
8 | export const formSchemas: FormSchema[] = [ | 12 | export const formSchemas: FormSchema[] = [ |
9 | { | 13 | { |
10 | field: CheckPointFieldsEnum.QUEUE_NAME, | 14 | field: CheckPointFieldsEnum.QUEUE_NAME, |
11 | - label: CheckPointFieldsNameEnum.QUEUE_NAME, | 15 | + label: t(CheckPointFieldsNameEnum.QUEUE_NAME), |
12 | component: 'ApiComplete', | 16 | component: 'ApiComplete', |
13 | required: true, | 17 | required: true, |
14 | helpMessage: ['从下拉列表中选择或自定义名称'], | 18 | helpMessage: ['从下拉列表中选择或自定义名称'], |
@@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | @@ -16,7 +20,7 @@ export const formSchemas: FormSchema[] = [ | ||
16 | changeEvent: 'update:value', | 20 | changeEvent: 'update:value', |
17 | componentProps: () => { | 21 | componentProps: () => { |
18 | return { | 22 | return { |
19 | - placeholder: `请选择${CheckPointFieldsNameEnum.QUEUE_NAME}`, | 23 | + placeholder: `请选择${t(CheckPointFieldsNameEnum.QUEUE_NAME)}`, |
20 | getPopupContainer: () => document.body, | 24 | getPopupContainer: () => document.body, |
21 | api: async (params: Recordable) => { | 25 | api: async (params: Recordable) => { |
22 | const options = await getTenantQueue(params); | 26 | const options = await getTenantQueue(params); |
@@ -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(FlowCategoryComponentEnum.CHECKPOINT); | 7 | const keys = useCreateNodeKey(FlowCategoryComponentEnum.CHECKPOINT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface CheckpointDataType { | 10 | export interface CheckpointDataType { |
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(FlowCategoryComponentEnum.OUTPUT); | 7 | const keys = useCreateNodeKey(FlowCategoryComponentEnum.OUTPUT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface OutputDataType { | 10 | export interface OutputDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -2,6 +2,9 @@ import { RouteLocationNormalizedLoaded } from 'vue-router'; | @@ -2,6 +2,9 @@ import { RouteLocationNormalizedLoaded } from 'vue-router'; | ||
2 | import { RuleChainFieldsEnum, RuleChainFieldsNameEnum } from '../../../enum/formField/flow'; | 2 | import { RuleChainFieldsEnum, RuleChainFieldsNameEnum } from '../../../enum/formField/flow'; |
3 | import { getRuleChains } from '/@/api/ruleDesigner'; | 3 | import { getRuleChains } from '/@/api/ruleDesigner'; |
4 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
5 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
6 | + | ||
7 | +const { t } = useI18n(); | ||
5 | 8 | ||
6 | const fetch = async (params: Recordable, ruleChainId: string) => { | 9 | const fetch = async (params: Recordable, ruleChainId: string) => { |
7 | try { | 10 | try { |
@@ -11,6 +14,7 @@ const fetch = async (params: Recordable, ruleChainId: string) => { | @@ -11,6 +14,7 @@ const fetch = async (params: Recordable, ruleChainId: string) => { | ||
11 | .filter((item) => item.value !== ruleChainId); | 14 | .filter((item) => item.value !== ruleChainId); |
12 | return data; | 15 | return data; |
13 | } catch (err) { | 16 | } catch (err) { |
17 | + // eslint-disable-next-line no-console | ||
14 | console.error(err); | 18 | console.error(err); |
15 | return []; | 19 | return []; |
16 | } | 20 | } |
@@ -21,7 +25,7 @@ export const getFormSchemas = (route: RouteLocationNormalizedLoaded): FormSchema | @@ -21,7 +25,7 @@ export const getFormSchemas = (route: RouteLocationNormalizedLoaded): FormSchema | ||
21 | return [ | 25 | return [ |
22 | { | 26 | { |
23 | field: RuleChainFieldsEnum.RULE_CHAIN_ID, | 27 | field: RuleChainFieldsEnum.RULE_CHAIN_ID, |
24 | - label: RuleChainFieldsNameEnum.RULE_CHAIN_ID, | 28 | + label: t(RuleChainFieldsNameEnum.RULE_CHAIN_ID), |
25 | component: 'ApiSearchSelect', | 29 | component: 'ApiSearchSelect', |
26 | componentProps: () => { | 30 | componentProps: () => { |
27 | return { | 31 | return { |
@@ -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(FlowCategoryComponentEnum.RULE_CHAIN); | 7 | const keys = useCreateNodeKey(FlowCategoryComponentEnum.RULE_CHAIN); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface RuleChainDataType { | 10 | export interface RuleChainDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -6,7 +6,7 @@ import { RuleChainConfig } from './RuleChain'; | @@ -6,7 +6,7 @@ import { RuleChainConfig } from './RuleChain'; | ||
6 | import { OutputConfig } from './Output'; | 6 | import { OutputConfig } from './Output'; |
7 | import { useI18n } from '/@/hooks/web/useI18n'; | 7 | import { useI18n } from '/@/hooks/web/useI18n'; |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export const FlowCategoryConfig: CategoryConfigType = { | 10 | export const FlowCategoryConfig: CategoryConfigType = { |
11 | category: RuleNodeTypeEnum.FLOW, | 11 | category: RuleNodeTypeEnum.FLOW, |
12 | title: t('designer_config.flows.index.title'), | 12 | title: t('designer_config.flows.index.title'), |
@@ -5,6 +5,9 @@ import { | @@ -5,6 +5,9 @@ import { | ||
5 | } from '../../../enum/formField/transformation'; | 5 | } from '../../../enum/formField/transformation'; |
6 | import { RelationsQuery } from '../../../src/components/RelationsQuery'; | 6 | import { RelationsQuery } from '../../../src/components/RelationsQuery'; |
7 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 7 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
8 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
9 | + | ||
10 | +const { t } = useI18n(); | ||
8 | 11 | ||
9 | useComponentRegister('RelationsQuery', RelationsQuery); | 12 | useComponentRegister('RelationsQuery', RelationsQuery); |
10 | 13 | ||
@@ -12,21 +15,23 @@ export const formSchemas: FormSchema[] = [ | @@ -12,21 +15,23 @@ export const formSchemas: FormSchema[] = [ | ||
12 | { | 15 | { |
13 | field: ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE, | 16 | field: ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE, |
14 | component: 'Select', | 17 | component: 'Select', |
15 | - label: ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE, | ||
16 | - required: true, | 18 | + label: t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE), |
19 | + rules: [ | ||
20 | + { required: true, message: `请选择${t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE)}` }, | ||
21 | + ], | ||
17 | componentProps: { | 22 | componentProps: { |
18 | options: Object.keys(OriginatorSourceEnum).map((value) => ({ | 23 | options: Object.keys(OriginatorSourceEnum).map((value) => ({ |
19 | label: OriginatorSourceNameEnum[value], | 24 | label: OriginatorSourceNameEnum[value], |
20 | value, | 25 | value, |
21 | })), | 26 | })), |
22 | getPopupContainer: () => document.body, | 27 | getPopupContainer: () => document.body, |
23 | - placeholder: `请选择${ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE}`, | 28 | + placeholder: `请选择${t(ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE)}`, |
24 | }, | 29 | }, |
25 | }, | 30 | }, |
26 | { | 31 | { |
27 | field: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, | 32 | field: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, |
28 | component: 'RelationsQuery', | 33 | component: 'RelationsQuery', |
29 | - label: ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY, | 34 | + label: t(ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY), |
30 | slot: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, | 35 | slot: ChangeOriginatorFieldsEnum.RELATIONS_QUERY, |
31 | ifShow: ({ model }) => | 36 | ifShow: ({ model }) => |
32 | model[ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE] === OriginatorSourceEnum.RELATED, | 37 | model[ChangeOriginatorFieldsEnum.ORIGINATOR_SOURCE] === OriginatorSourceEnum.RELATED, |
@@ -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(TransformationCategoryComponentEnum.CHANGE_ORIGINATOR); | 7 | const keys = useCreateNodeKey(TransformationCategoryComponentEnum.CHANGE_ORIGINATOR); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface ChangeOriginatorDataType { | 10 | export interface ChangeOriginatorDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
1 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/transformation'; | 1 | import { ScriptFieldsEnum, ScriptFieldsNameEnum } from '../../../enum/formField/transformation'; |
2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; | 2 | import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal'; |
3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; | 3 | import { FormSchema, useComponentRegister } from '/@/components/Form'; |
4 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
5 | + | ||
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: ScriptFieldsEnum.JS_SCRIPT, | 12 | field: ScriptFieldsEnum.JS_SCRIPT, |
10 | component: 'JavascriptEditorWithTestModal', | 13 | component: 'JavascriptEditorWithTestModal', |
11 | - label: ScriptFieldsNameEnum.JS_SCRIPT, | 14 | + label: t(ScriptFieldsNameEnum.JS_SCRIPT), |
12 | changeEvent: 'update:value', | 15 | changeEvent: 'update:value', |
13 | valueField: 'value', | 16 | valueField: '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(TransformationCategoryComponentEnum.SCRIPT); | 7 | const keys = useCreateNodeKey(TransformationCategoryComponentEnum.SCRIPT); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | 10 | ||
11 | export interface ScriptDataType { | 11 | export interface ScriptDataType { |
12 | someConfiguration?: Recordable; | 12 | someConfiguration?: Recordable; |
1 | import { MailBodyTypeEnum, MailBodyTypeNameEnum } from '../../../enum/form'; | 1 | import { MailBodyTypeEnum, MailBodyTypeNameEnum } from '../../../enum/form'; |
2 | import { ToEmailFieldsEnum, ToEmailFieldsNameEnum } from '../../../enum/formField/transformation'; | 2 | import { ToEmailFieldsEnum, ToEmailFieldsNameEnum } from '../../../enum/formField/transformation'; |
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 | { |
7 | field: ToEmailFieldsEnum.FROM_TEMPLATE, | 10 | field: ToEmailFieldsEnum.FROM_TEMPLATE, |
8 | component: 'Input', | 11 | component: 'Input', |
9 | - label: ToEmailFieldsNameEnum.FROM_TEMPLATE, | 12 | + label: t(ToEmailFieldsNameEnum.FROM_TEMPLATE), |
10 | helpMessage: [ | 13 | helpMessage: [ |
11 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 14 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
12 | ], | 15 | ], |
13 | componentProps: { | 16 | componentProps: { |
14 | - placeholder: `请输入${ToEmailFieldsNameEnum.FROM_TEMPLATE}`, | 17 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.FROM_TEMPLATE)}`, |
15 | }, | 18 | }, |
16 | }, | 19 | }, |
17 | { | 20 | { |
18 | field: ToEmailFieldsEnum.TO_TEMPLATE, | 21 | field: ToEmailFieldsEnum.TO_TEMPLATE, |
19 | component: 'Input', | 22 | component: 'Input', |
20 | - label: ToEmailFieldsNameEnum.TO_TEMPLATE, | 23 | + label: t(ToEmailFieldsNameEnum.TO_TEMPLATE), |
21 | helpMessage: [ | 24 | helpMessage: [ |
22 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 25 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
23 | ], | 26 | ], |
24 | componentProps: { | 27 | componentProps: { |
25 | - placeholder: `请输入${ToEmailFieldsNameEnum.FROM_TEMPLATE}`, | 28 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.FROM_TEMPLATE)}`, |
26 | }, | 29 | }, |
27 | }, | 30 | }, |
28 | { | 31 | { |
29 | field: ToEmailFieldsEnum.CC_TEMPLATE, | 32 | field: ToEmailFieldsEnum.CC_TEMPLATE, |
30 | component: 'Input', | 33 | component: 'Input', |
31 | - label: ToEmailFieldsNameEnum.CC_TEMPLATE, | 34 | + label: t(ToEmailFieldsNameEnum.CC_TEMPLATE), |
32 | helpMessage: [ | 35 | helpMessage: [ |
33 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 36 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
34 | ], | 37 | ], |
35 | componentProps: { | 38 | componentProps: { |
36 | - placeholder: `请输入${ToEmailFieldsNameEnum.FROM_TEMPLATE}`, | 39 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.FROM_TEMPLATE)}`, |
37 | }, | 40 | }, |
38 | }, | 41 | }, |
39 | { | 42 | { |
40 | field: ToEmailFieldsEnum.BCC_TEMPLATE, | 43 | field: ToEmailFieldsEnum.BCC_TEMPLATE, |
41 | component: 'Input', | 44 | component: 'Input', |
42 | - label: ToEmailFieldsNameEnum.BCC_TEMPLATE, | 45 | + label: t(ToEmailFieldsNameEnum.BCC_TEMPLATE), |
43 | helpMessage: [ | 46 | helpMessage: [ |
44 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 47 | 'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
45 | ], | 48 | ], |
46 | componentProps: { | 49 | componentProps: { |
47 | - placeholder: `请输入${ToEmailFieldsNameEnum.FROM_TEMPLATE}`, | 50 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.FROM_TEMPLATE)}`, |
48 | }, | 51 | }, |
49 | }, | 52 | }, |
50 | { | 53 | { |
51 | field: ToEmailFieldsEnum.SUBJECT_TEMPLATE, | 54 | field: ToEmailFieldsEnum.SUBJECT_TEMPLATE, |
52 | component: 'Input', | 55 | component: 'Input', |
53 | - label: ToEmailFieldsNameEnum.SUBJECT_TEMPLATE, | 56 | + label: t(ToEmailFieldsNameEnum.SUBJECT_TEMPLATE), |
54 | helpMessage: [ | 57 | helpMessage: [ |
55 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 58 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
56 | ], | 59 | ], |
57 | componentProps: { | 60 | componentProps: { |
58 | - placeholder: `请输入${ToEmailFieldsNameEnum.FROM_TEMPLATE}`, | 61 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.FROM_TEMPLATE)}`, |
59 | }, | 62 | }, |
60 | }, | 63 | }, |
61 | { | 64 | { |
62 | field: ToEmailFieldsEnum.MAIL_BODY_TYPE, | 65 | field: ToEmailFieldsEnum.MAIL_BODY_TYPE, |
63 | component: 'Select', | 66 | component: 'Select', |
64 | - label: ToEmailFieldsNameEnum.MAIL_BODY_TYPE, | 67 | + label: t(ToEmailFieldsNameEnum.MAIL_BODY_TYPE), |
65 | componentProps: ({ formActionType }) => { | 68 | componentProps: ({ formActionType }) => { |
66 | const { setFieldsValue } = formActionType; | 69 | const { setFieldsValue } = formActionType; |
67 | return { | 70 | return { |
@@ -70,7 +73,7 @@ export const formSchemas: FormSchema[] = [ | @@ -70,7 +73,7 @@ export const formSchemas: FormSchema[] = [ | ||
70 | { label: MailBodyTypeNameEnum.HTML, value: MailBodyTypeEnum.HTML }, | 73 | { label: MailBodyTypeNameEnum.HTML, value: MailBodyTypeEnum.HTML }, |
71 | { label: MailBodyTypeNameEnum.DYNAMIC, value: MailBodyTypeEnum.DYNAMIC }, | 74 | { label: MailBodyTypeNameEnum.DYNAMIC, value: MailBodyTypeEnum.DYNAMIC }, |
72 | ], | 75 | ], |
73 | - placeholder: `请选择${ToEmailFieldsNameEnum.MAIL_BODY_TYPE}`, | 76 | + placeholder: `请选择${t(ToEmailFieldsNameEnum.MAIL_BODY_TYPE)}`, |
74 | getPopupContainer: () => document.body, | 77 | getPopupContainer: () => document.body, |
75 | onChange: () => { | 78 | onChange: () => { |
76 | setFieldsValue({ [ToEmailFieldsEnum.IS_HTML_TEMPLATE]: null }); | 79 | setFieldsValue({ [ToEmailFieldsEnum.IS_HTML_TEMPLATE]: null }); |
@@ -81,21 +84,21 @@ export const formSchemas: FormSchema[] = [ | @@ -81,21 +84,21 @@ export const formSchemas: FormSchema[] = [ | ||
81 | { | 84 | { |
82 | field: ToEmailFieldsEnum.IS_HTML_TEMPLATE, | 85 | field: ToEmailFieldsEnum.IS_HTML_TEMPLATE, |
83 | component: 'Input', | 86 | component: 'Input', |
84 | - label: ToEmailFieldsNameEnum.IS_HTML_TEMPLATE, | 87 | + label: t(ToEmailFieldsNameEnum.IS_HTML_TEMPLATE), |
85 | show: ({ model }) => model[ToEmailFieldsEnum.MAIL_BODY_TYPE] === MailBodyTypeEnum.DYNAMIC, | 88 | show: ({ model }) => model[ToEmailFieldsEnum.MAIL_BODY_TYPE] === MailBodyTypeEnum.DYNAMIC, |
86 | helpMessage: [ | 89 | helpMessage: [ |
87 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', | 90 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body', |
88 | ], | 91 | ], |
89 | componentProps: { | 92 | componentProps: { |
90 | - placeholder: `请输入${ToEmailFieldsNameEnum.IS_HTML_TEMPLATE}`, | 93 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.IS_HTML_TEMPLATE)}`, |
91 | }, | 94 | }, |
92 | }, | 95 | }, |
93 | { | 96 | { |
94 | field: ToEmailFieldsEnum.BODY_TEMPLATE, | 97 | field: ToEmailFieldsEnum.BODY_TEMPLATE, |
95 | component: 'InputTextArea', | 98 | component: 'InputTextArea', |
96 | - label: ToEmailFieldsEnum.BODY_TEMPLATE, | 99 | + label: t(ToEmailFieldsEnum.BODY_TEMPLATE), |
97 | componentProps: { | 100 | componentProps: { |
98 | - placeholder: `请输入${ToEmailFieldsNameEnum.BODY_TEMPLATE}`, | 101 | + placeholder: `请输入${t(ToEmailFieldsNameEnum.BODY_TEMPLATE)}`, |
99 | autoSize: { minRows: 3 }, | 102 | autoSize: { minRows: 3 }, |
100 | }, | 103 | }, |
101 | }, | 104 | }, |
@@ -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(TransformationCategoryComponentEnum.TO_EMAIL); | 7 | const keys = useCreateNodeKey(TransformationCategoryComponentEnum.TO_EMAIL); |
8 | 8 | ||
9 | -const { t } = useI18n(); //加载国际化 | 9 | +const { t } = useI18n(); // 加载国际化 |
10 | export interface ToEmailDataType { | 10 | export interface ToEmailDataType { |
11 | someConfiguration?: Recordable; | 11 | someConfiguration?: Recordable; |
12 | } | 12 | } |
@@ -5,7 +5,7 @@ import { ScriptConfig } from './Script'; | @@ -5,7 +5,7 @@ import { ScriptConfig } from './Script'; | ||
5 | import { ToEmailConfig } from './ToEmail'; | 5 | import { ToEmailConfig } from './ToEmail'; |
6 | import { useI18n } from '/@/hooks/web/useI18n'; | 6 | import { useI18n } from '/@/hooks/web/useI18n'; |
7 | 7 | ||
8 | -const { t } = useI18n(); //加载国际化 | 8 | +const { t } = useI18n(); // 加载国际化 |
9 | export const TransformationCategoryConfig: CategoryConfigType = { | 9 | export const TransformationCategoryConfig: CategoryConfigType = { |
10 | category: RuleNodeTypeEnum.TRANSFORMATION, | 10 | category: RuleNodeTypeEnum.TRANSFORMATION, |
11 | title: t('designer_config.transformations.index.title'), | 11 | title: t('designer_config.transformations.index.title'), |
1 | import { NodeBindDataFieldEnum, NodeBindDataFieldNameEnum } from '../../../enum/node'; | 1 | import { NodeBindDataFieldEnum, NodeBindDataFieldNameEnum } from '../../../enum/node'; |
2 | import { FormSchema } from '/@/components/Form'; | 2 | import { FormSchema } from '/@/components/Form'; |
3 | +import { useI18n } from '/@/hooks/web/useI18n'; | ||
4 | + | ||
5 | +const { t } = useI18n(); | ||
3 | 6 | ||
4 | export const TopFormSchemas: FormSchema[] = [ | 7 | export const TopFormSchemas: FormSchema[] = [ |
5 | { | 8 | { |
6 | field: NodeBindDataFieldEnum.NAME, | 9 | field: NodeBindDataFieldEnum.NAME, |
7 | component: 'Input', | 10 | component: 'Input', |
8 | - label: NodeBindDataFieldNameEnum.NAME, | ||
9 | - required: true, | 11 | + label: t(NodeBindDataFieldNameEnum.NAME), |
10 | colProps: { | 12 | colProps: { |
11 | span: 16, | 13 | span: 16, |
12 | }, | 14 | }, |
15 | + rules: [{ required: true, message: `请输入${t(NodeBindDataFieldNameEnum.NAME)}` }], | ||
13 | componentProps: { | 16 | componentProps: { |
14 | - placeholder: `请输入${NodeBindDataFieldNameEnum.NAME}`, | 17 | + placeholder: `请输入${t(NodeBindDataFieldNameEnum.NAME)}`, |
15 | }, | 18 | }, |
16 | }, | 19 | }, |
17 | { | 20 | { |
18 | field: NodeBindDataFieldEnum.DEBUG_MODE, | 21 | field: NodeBindDataFieldEnum.DEBUG_MODE, |
19 | component: 'Switch', | 22 | component: 'Switch', |
20 | - label: NodeBindDataFieldNameEnum.DEBUG_MODE, | 23 | + label: t(NodeBindDataFieldNameEnum.DEBUG_MODE), |
21 | colProps: { | 24 | colProps: { |
22 | offset: 2, | 25 | offset: 2, |
23 | span: 6, | 26 | span: 6, |
24 | }, | 27 | }, |
25 | componentProps: { | 28 | componentProps: { |
26 | - placeholder: `请输入${NodeBindDataFieldNameEnum.NAME}`, | 29 | + placeholder: `请输入${t(NodeBindDataFieldNameEnum.NAME)}`, |
27 | }, | 30 | }, |
28 | renderComponentContent: () => { | 31 | renderComponentContent: () => { |
29 | return { | 32 | return { |
30 | - default: () => NodeBindDataFieldNameEnum.DEBUG_MODE, | 33 | + default: () => t(NodeBindDataFieldNameEnum.DEBUG_MODE), |
31 | }; | 34 | }; |
32 | }, | 35 | }, |
33 | }, | 36 | }, |
@@ -37,9 +40,9 @@ export const BottomFormSchemas: FormSchema[] = [ | @@ -37,9 +40,9 @@ export const BottomFormSchemas: FormSchema[] = [ | ||
37 | { | 40 | { |
38 | field: NodeBindDataFieldEnum.DESCRIPTION, | 41 | field: NodeBindDataFieldEnum.DESCRIPTION, |
39 | component: 'InputTextArea', | 42 | component: 'InputTextArea', |
40 | - label: NodeBindDataFieldNameEnum.DESCRIPTION, | 43 | + label: t(NodeBindDataFieldNameEnum.DESCRIPTION), |
41 | componentProps: { | 44 | componentProps: { |
42 | - placeholder: `请输入${NodeBindDataFieldNameEnum.DESCRIPTION}`, | 45 | + placeholder: `请输入${t(NodeBindDataFieldNameEnum.DESCRIPTION)}`, |
43 | autoSize: true, | 46 | autoSize: true, |
44 | }, | 47 | }, |
45 | }, | 48 | }, |
@@ -67,6 +67,7 @@ | @@ -67,6 +67,7 @@ | ||
67 | <BasicModal | 67 | <BasicModal |
68 | v-model:visible="visible" | 68 | v-model:visible="visible" |
69 | :title="`添加规则节点: ${nodeData?.config?.name}`" | 69 | :title="`添加规则节点: ${nodeData?.config?.name}`" |
70 | + width="50%" | ||
70 | :get-container="getContainer" | 71 | :get-container="getContainer" |
71 | @ok="handleModalOk" | 72 | @ok="handleModalOk" |
72 | @cancel="handleCancel" | 73 | @cancel="handleCancel" |
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | showActionButtonGroup: false, | 39 | showActionButtonGroup: false, |
40 | baseColProps: { lg: 12, md: 24 }, | 40 | baseColProps: { lg: 12, md: 24 }, |
41 | }); | 41 | }); |
42 | - const { t } = useI18n(); //加载国际化 | 42 | + const { t } = useI18n(); // 加载国际化 |
43 | 43 | ||
44 | //默认传递页面数据 | 44 | //默认传递页面数据 |
45 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { | 45 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | components: { BasicTable, MenuDrawer, TableAction, Button }, | 64 | components: { BasicTable, MenuDrawer, TableAction, Button }, |
65 | setup() { | 65 | setup() { |
66 | const [registerDrawer, { openDrawer }] = useDrawer(); //使用右侧弹出框 | 66 | const [registerDrawer, { openDrawer }] = useDrawer(); //使用右侧弹出框 |
67 | - const { t } = useI18n(); //加载国际化 | 67 | + const { t } = useI18n(); // 加载国际化 |
68 | // 新增菜单 | 68 | // 新增菜单 |
69 | const getI18nCreateMenu = computed(() => t('routes.common.system.pageSystemTitleCreateMenu')); | 69 | const getI18nCreateMenu = computed(() => t('routes.common.system.pageSystemTitleCreateMenu')); |
70 | 70 |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | schemas: formSchema, | 34 | schemas: formSchema, |
35 | showActionButtonGroup: false, | 35 | showActionButtonGroup: false, |
36 | }); | 36 | }); |
37 | - const { t } = useI18n(); //加载国际化 | 37 | + const { t } = useI18n(); // 加载国际化 |
38 | 38 | ||
39 | //默认传递页面数据 | 39 | //默认传递页面数据 |
40 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { | 40 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | components: { BasicTable, DeptDrawer, TableAction, Authority, Popconfirm }, | 62 | components: { BasicTable, DeptDrawer, TableAction, Authority, Popconfirm }, |
63 | setup() { | 63 | setup() { |
64 | const [registerModal, { openDrawer }] = useDrawer(); | 64 | const [registerModal, { openDrawer }] = useDrawer(); |
65 | - const { t } = useI18n(); //加载国际化 | 65 | + const { t } = useI18n(); // 加载国际化 |
66 | const getI18n = computed(() => t('routes.common.organization.toolCreateOrganization')); | 66 | const getI18n = computed(() => t('routes.common.organization.toolCreateOrganization')); |
67 | 67 | ||
68 | const [registerTable, { reload, expandAll, setProps }] = useTable({ | 68 | const [registerTable, { reload, expandAll, setProps }] = useTable({ |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 33 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
34 | import { BasicTree, TreeActionType, TreeItem } from '/@/components/Tree'; | 34 | import { BasicTree, TreeActionType, TreeItem } from '/@/components/Tree'; |
35 | import { useMessage } from '/@/hooks/web/useMessage'; | 35 | import { useMessage } from '/@/hooks/web/useMessage'; |
36 | - const { t } = useI18n(); //加载国际化 | 36 | + const { t } = useI18n(); // 加载国际化 |
37 | // 加载菜单数据 | 37 | // 加载菜单数据 |
38 | import { getMeMenuList, getMenusIdsByRoleId } from '/@/api/sys/menu'; | 38 | import { getMeMenuList, getMenusIdsByRoleId } from '/@/api/sys/menu'; |
39 | import { useI18n } from '/@/hooks/web/useI18n'; | 39 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | showActionButtonGroup: false, | 40 | showActionButtonGroup: false, |
41 | baseColProps: { lg: 24, md: 24 }, | 41 | baseColProps: { lg: 24, md: 24 }, |
42 | }); | 42 | }); |
43 | - const { t } = useI18n(); //加载国际化 | 43 | + const { t } = useI18n(); // 加载国际化 |
44 | 44 | ||
45 | //默认传递页面数据 | 45 | //默认传递页面数据 |
46 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { | 46 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
@@ -58,8 +58,7 @@ | @@ -58,8 +58,7 @@ | ||
58 | }); | 58 | }); |
59 | } | 59 | } |
60 | getTenantRoles(data.record.tenantId).then((result) => { | 60 | getTenantRoles(data.record.tenantId).then((result) => { |
61 | - const { icon, ...params } = data.record; | ||
62 | - console.log(icon); | 61 | + const { ...params } = data.record; |
63 | //为表单赋值 | 62 | //为表单赋值 |
64 | setFieldsValue({ | 63 | setFieldsValue({ |
65 | ...params, | 64 | ...params, |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | import { formSchema } from './role.data'; | 33 | import { formSchema } from './role.data'; |
34 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 34 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
35 | import { BasicTree, CheckEvent, TreeActionType, TreeItem, CheckKeys } from '/@/components/Tree'; | 35 | import { BasicTree, CheckEvent, TreeActionType, TreeItem, CheckKeys } from '/@/components/Tree'; |
36 | - const { t } = useI18n(); //加载国际化 | 36 | + const { t } = useI18n(); // 加载国际化 |
37 | // 加载菜单数据 | 37 | // 加载菜单数据 |
38 | import { getAdminMenuList, getMenuList, getMenusIdsByRoleId } from '/@/api/sys/menu'; | 38 | import { getAdminMenuList, getMenuList, getMenusIdsByRoleId } from '/@/api/sys/menu'; |
39 | import { useI18n } from '/@/hooks/web/useI18n'; | 39 | import { useI18n } from '/@/hooks/web/useI18n'; |