common.ts
10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
export default {
okText: 'OK',
closeText: 'Close',
cancelText: 'Cancel',
loadingText: 'Loading...',
saveText: 'Save',
delText: 'Delete ',
resetText: 'Reset',
searchText: 'Search',
queryText: 'Search',
viewText: 'View',
createText: 'Create ',
appendText: 'Append',
copyText: 'Copy ',
editText: 'Edit ',
sendText: 'Sending',
detailText: 'Detail ',
setupText: 'Set up',
exportText: 'Export',
downloadText: 'Download',
isExport: 'Do you need to export',
batchDeleteText: 'Batch deletion',
batchingText: 'Batch Processing',
handleText: 'Handle',
clearText: 'Clean up',
batchClearText: 'Batch Clearing',
cardModeText: 'Card mode',
listModeText: 'List mode',
successText: 'success',
failText: 'Fail',
progressText: 'In progress',
sendSuccessText: 'Successfully sent',
deleteSuccessText: 'Delete success',
deleteFailedText: 'Delete failed',
createSuccessText: 'Create success',
createFailedText: 'Create Failed',
editSuccessText: 'Update success',
editFailedText: 'Update Failed',
importSuccessText: 'Import success',
importJSONFailed: 'JSON parsing failed. Please import the correct JSON',
deleteConfirmText: 'Do you confirm the deletion operation?',
batchDeleteConfirmText: 'Do you confirm the batch deletion operation?',
inputText: 'Please enter ',
chooseText: 'Please choose ',
redo: 'Refresh',
back: 'Back',
light: 'Light',
dark: 'Dark',
customText: 'Custom',
moreText: 'More',
platformText: 'Platform',
pcText: 'PC',
phoneText: 'Phone',
remarkText: 'Remark',
openText: 'open',
shareText: 'Share',
releaseText: 'Release',
batchText: 'Batch',
cancelReleaseText: 'Cancel Release',
isDelete: 'Are you sure you want to delete it ?',
publishedText: 'Published',
unpublishedText: 'Unpublished',
enabledText: 'Enabled',
notEnabledText: 'not enabled',
normalText: 'Normal',
disabledText: 'Disabled',
deactivatedText: 'Deactivated',
deactivateText: 'Deactivate',
expiredText: 'Expired',
designText: 'Design',
previewText: 'Preview',
batchdelText: 'Batch Delete',
accessText: 'Access',
linkText: 'Link',
promptText: 'Prompt',
increaseOkText: 'Added successfully',
editOkText: 'Modified successfully',
successfullyOkText: 'Successfully processed',
disabledSuccessOkText: 'Successfully disabled',
enabledSuccessOkText: 'Successfully enabled',
releaseOkText: 'Release OK',
cancelReleaseOkText: 'Cancel release ok',
alarmLevelText: 'Alarm level',
alarmLevel1Text: 'Alarm level',
alarmScenarioText: 'Alarm scene',
operateTable: 'operate',
requestType: 'Request type',
interfaceAddress: 'Interface Address',
formatButton: 'Format',
clickCopyLink: 'Click to copy the connection',
copyOk: 'Copy successful!',
copyFail: 'Copy fail!',
timeText: 'Time',
createTimeText: 'Create time',
updateTimeText: 'Update time',
actionText: 'Action',
yesText: 'Yes',
noText: 'No',
listText: 'List',
lastStepText: 'Last step',
nextStepText: 'Next step',
descText: 'Description',
onText: 'On',
offText: 'Off',
enableText: 'Enable',
disableText: 'Disable',
cycle: 'Cycle',
monthly: 'Monthly',
monthlyPlace: '@:common.inputText month',
weekly: 'Weekly',
daily: 'Daily',
operationSuccessText: 'Successful operation',
private: 'Private',
public: 'Public',
markRead: 'Mark read',
permissionConfiguration: 'Permission configuration',
status: 'Status',
limitTextLengthIs: 'The word count should not exceed 255 words',
limitUploadText1:
'support. PNG,. JPG format, recommended size is 32 * 32px, size should not exceed 5M',
limitUploadText2: 'Support ICO format, recommended size is 16 * 16px',
limitUploadText3:
'support. PNG and. JPG formats are recommended, with a size of 1920 * 1080px or more and a size not exceeding 5M',
limitUploadText4:
'support. PNG,. JPG format, recommended size is 800 * 600px, size should not exceed 5M',
limitUploadText5:
'support. PNG,. JPG format, recommended size is 300 * 300px, size should not exceed 5M',
uploadText: 'Upload',
reUploadText: 'Re-upload',
saveInfo: 'Save',
reset: 'Reset',
uploadingProgress: 'Uploading in progress',
province: 'Province',
city: 'City',
district: 'District/County',
town: 'Town/Street',
organizationList: 'Organization List',
default: 'DEFAULT',
deviceType: {
gateway: 'GATEWAY',
direct: 'DIRECT_CONNECTION',
sensor: 'SENSOR',
},
messageFormat: 'Message Format',
select: 'Select',
selected: 'Selected',
deviceTypeText: 'Device Type',
organizationId: 'organizationId',
device: 'Device',
assignDevices: 'Assign devices to the edge',
assign: 'Assign',
assignSuccessful: 'Assign Successful',
sort: 'Sort',
handleRecordText: 'Handling online and offline records',
edgeFlag: 'Edge',
edgeDeviceOperationConfirm: 'This product comes from the side, please handle with caution',
handleRecordDetailText: 'Record details of online and offline activities',
requestTypeAndUrl: 'Please fill in the request type and url',
interfaceContent: 'Interface content',
template: 'Template',
ruleErrors: {
r1: 'The email format is incorrect',
r2: 'The format of the phone number is incorrect',
},
fullName: 'Full name',
resetSystem: 'Restore factory settings',
streamingConfig: 'Streaming config',
currentPassword: 'Current password',
newPassword: 'New password',
confirmPassword: 'Confirm password',
publicSuccess: 'Public success',
publicError: 'Public error',
privateSuccess: 'Private success',
privateError: 'Private error',
regValidateError: 'The input content cannot be in Chinese',
enabled: 'ENABLED',
notEnabled: 'Not enabled',
sortOperation: {
isTop: 'Top up',
moveUp: 'Move up',
moveDown: 'Move down',
isBottom: 'Top down',
},
createParams: 'Create params',
placeSelectOrg: 'Please select an organization first',
jsonEditorOperationIconText: {
neat: 'Neat',
mini: 'Mini',
fullScreen: 'Full screen',
},
placeInputRealName: 'Please enter your real name',
disabled: 'Disable',
example: 'Example',
accessToken: 'Access token',
placeInputAccessToken: 'Please enter access token',
selectProduct: 'Select product',
selectDevice: 'Please Select device',
selectDeviceModal: {
title: 'Device select',
close: 'Close',
pendingDevice: 'Pending device',
selectDevice: 'Select Device:',
okSelect: 'Ok select',
cancelSelect: 'Cancel select',
selectedDevice: 'Selected device',
},
pleaseInputServiceCommand: 'Please enter the service command',
serviceCommand: 'Service command',
requiredField: 'Required field',
commonText: 'Common',
commonTotalText: 'Article data',
belongingProducts: 'Belonging products',
belongingOrganization: 'Belonging organization',
deviceName: 'Device name',
javascriptText: `
var params = msg['params'];
/*Gateway uplink script*/
var teleData = {'{}'};
/*Model data (optional): Raw data*/
teleData.source = params;
/*Gateway device:slaveDevice It is the "device identifier" of the gateway sub device*/
var slaveDevice = params.substr(0, 2);
teleData[slaveDevice] = params;
msg.datas = teleData;
msg.telemetry = true;
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
delete msg.params;
return {'{msg: msg}'};
`,
tbelText: `
var params = msg['params'];
/*Gateway uplink script*/
var teleData = {'{}'};
/*Model data (optional): Raw data*/
teleData.source = params;
/*Gateway device:slaveDevice It is the "device identifier" of the gateway sub device*/
var slaveDevice = params.substring(0, 2);
teleData[slaveDevice] = params;
msg.datas = teleData;
msg.telemetry = true;
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
msg.remove('params');
return {'{msg: msg}'};
`,
directWithSensorJavascript: `
var teleData = {'{}'};
var params = msg['params'];
/*Model data (optional): Raw data*/
teleData.source = params;
/*Direct connected device: tempVal is the identifier for the attribute defined in the product model*/
var tempVal = params;
/*Object model temperature identifier*/
teleData.temp = (parseInt('0x'+tempVal.substr(10, 4))*0.1).toFixed(2);
/*Model humidity identifier*/
teleData.wet = (parseInt('0x'+tempVal.substr(6, 4))*0.1).toFixed(2);
/*物模型开关标识符*/
teleData.switch = parseInt('0x'+tempVal.substr(7, 1));
msg.datas = teleData;
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
msg.telemetry = true;
delete msg.params
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
return {msg: msg};`,
directWithSensorTbel: `
var teleData = {'{}'};
var params = msg['params'];
/*Model data (optional): Raw data*/
teleData.source = params;
/*Direct connected device: tempVal is the identifier for the attribute defined in the product model*/
var tempVal = params;
/*The value obtained from the temperature identifier of the physical model is 136 divided by 10*/
teleData.temp = parseFloat(Integer.parseInt(tempVal.substring(10, 14), 16))/10;
/*Model humidity identifier*/
teleData.wet = parseFloat(Integer.parseInt(tempVal.substring(6, 10), 16))/10;
/*Object model switch identifier*/
teleData.switch = Integer.parseInt(tempVal.substring(7, 8), 16);
msg.datas = teleData;
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
msg.telemetry = true;
msg.remove('params');
/*Required: true represents telemetry data reported by the device, false represents response data issued by the command*/
return {'{msg: msg}'};`,
placeSelectChannelNumber: 'Please select the channel number',
placeSelectDeviceChannelNumber: 'Please select the device channel number',
selectAll: 'Select all',
batchAdditionSuccessful: 'Batch addition successful',
documentUrl: 'Interface address',
modifiedDeviceCredentials: 'Successfully modified device credentials',
channelSynchronizedMessageText:
'The channel has been synchronized. Please refresh later to view the results',
stopped: 'Stopped',
specialCharactersError: 'Cannot input special characters',
};