@flexem/fc-gui 3.0.0-alpha.13 → 3.0.0-alpha.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +439 -1
  2. package/assets/img/black_first_page.png +0 -0
  3. package/assets/img/black_last_page.png +0 -0
  4. package/assets/img/black_next_page.png +0 -0
  5. package/assets/img/black_previous_page.png +0 -0
  6. package/bundles/@flexem/fc-gui.umd.js +23330 -19502
  7. package/bundles/@flexem/fc-gui.umd.js.map +1 -1
  8. package/bundles/@flexem/fc-gui.umd.min.js +5 -5
  9. package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
  10. package/communication/variable/variable-communicator.d.ts +4 -0
  11. package/communication/variable/variable-value.d.ts +4 -1
  12. package/communication/variable/variable-value.js +4 -1
  13. package/communication/variable/variable-value.metadata.json +1 -1
  14. package/config/alarm/alarm.store.d.ts +6 -0
  15. package/config/alarm/alarm.store.js +0 -0
  16. package/config/alarm/alarm.store.metadata.json +1 -0
  17. package/config/alarm/get-alarms-args.d.ts +12 -0
  18. package/config/alarm/get-alarms-args.js +13 -0
  19. package/config/alarm/get-alarms-args.metadata.json +1 -0
  20. package/config/alarm/index.d.ts +2 -0
  21. package/config/alarm/index.js +1 -0
  22. package/config/alarm/index.metadata.json +1 -0
  23. package/config/config-store.d.ts +2 -0
  24. package/config/history-data/get-history-data-args.d.ts +14 -3
  25. package/config/history-data/get-history-data-args.js +5 -3
  26. package/config/history-data/get-history-data-args.metadata.json +1 -1
  27. package/config/history-data/history-data.model.d.ts +7 -1
  28. package/config/history-data/history-data.model.js +9 -1
  29. package/config/history-data/history-data.model.metadata.json +1 -1
  30. package/config/history-data/index.d.ts +1 -1
  31. package/config/history-data/index.js +1 -1
  32. package/config/history-data/index.metadata.json +1 -1
  33. package/config/index.d.ts +1 -0
  34. package/config/index.js +1 -0
  35. package/config/index.metadata.json +1 -1
  36. package/elements/air-quality/air-quality-element.d.ts +31 -0
  37. package/elements/air-quality/air-quality-element.js +194 -0
  38. package/elements/air-quality/air-quality-element.metadata.json +1 -0
  39. package/elements/alarm/alarm-element.d.ts +69 -0
  40. package/elements/alarm/alarm-element.js +497 -0
  41. package/elements/alarm/alarm-element.metadata.json +1 -0
  42. package/elements/bar-graph-element.d.ts +10 -2
  43. package/elements/bar-graph-element.js +135 -5
  44. package/elements/bar-graph-element.metadata.json +1 -1
  45. package/elements/base/readable-element.d.ts +6 -1
  46. package/elements/base/readable-element.js +64 -2
  47. package/elements/base/readable-element.metadata.json +1 -1
  48. package/elements/base/state-control-element.d.ts +3 -1
  49. package/elements/base/state-control-element.js +3 -0
  50. package/elements/datetime-display/datetime-display-element.d.ts +1 -0
  51. package/elements/datetime-display/datetime-display-element.js +10 -2
  52. package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
  53. package/elements/datetime-display/time-zone-select-json.d.ts +8 -0
  54. package/elements/datetime-display/time-zone-select-json.js +558 -0
  55. package/elements/historical-curve/historical-curve.element.d.ts +39 -3
  56. package/elements/historical-curve/historical-curve.element.js +499 -39
  57. package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
  58. package/elements/main-element.d.ts +1 -0
  59. package/elements/main-element.js +59 -9
  60. package/elements/main-element.metadata.json +1 -1
  61. package/elements/meter-element.d.ts +7 -1
  62. package/elements/meter-element.js +76 -7
  63. package/elements/meter-element.metadata.json +1 -1
  64. package/elements/numerical-display/numerical-display-element.d.ts +16 -3
  65. package/elements/numerical-display/numerical-display-element.js +83 -11
  66. package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
  67. package/elements/per-view-variable-communicator.d.ts +3 -0
  68. package/elements/per-view-variable-communicator.js +11 -0
  69. package/elements/per-view-variable-communicator.metadata.json +1 -1
  70. package/elements/ring-graph/ring-graph-element.d.ts +13 -1
  71. package/elements/ring-graph/ring-graph-element.js +164 -3
  72. package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
  73. package/elements/scroll-alarm/scroll-alarm-element.d.ts +54 -0
  74. package/elements/scroll-alarm/scroll-alarm-element.js +517 -0
  75. package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
  76. package/elements/shared/graph/graph-state-element.js +0 -3
  77. package/elements/shared/text/text-element.d.ts +9 -0
  78. package/elements/shared/text/text-element.js +33 -2
  79. package/elements/shared/text/text-element.metadata.json +1 -1
  80. package/elements/shared/text/text-state-element.d.ts +25 -2
  81. package/elements/shared/text/text-state-element.js +138 -63
  82. package/elements/shared/text/text-state-element.metadata.json +1 -1
  83. package/elements/static-elements/hyperlink-element.d.ts +24 -2
  84. package/elements/static-elements/hyperlink-element.js +101 -3
  85. package/elements/static-elements/hyperlink-element.metadata.json +1 -1
  86. package/elements/static-elements/text-element.d.ts +23 -2
  87. package/elements/static-elements/text-element.js +96 -3
  88. package/elements/static-elements/text-element.metadata.json +1 -1
  89. package/elements/switch-indicator-light/bit-switch-operator.d.ts +1 -0
  90. package/elements/switch-indicator-light/bit-switch-operator.js +19 -0
  91. package/elements/switch-indicator-light/bit-switch-operator.metadata.json +1 -1
  92. package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +18 -2
  93. package/elements/switch-indicator-light/switch-indicator-light-element.js +120 -25
  94. package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
  95. package/elements/switch-indicator-light/switch-operator.d.ts +1 -0
  96. package/elements/switch-indicator-light/word-switch-operator.d.ts +1 -0
  97. package/elements/switch-indicator-light/word-switch-operator.js +6 -0
  98. package/elements/switch-indicator-light/word-switch-operator.metadata.json +1 -1
  99. package/elements/video/video-element.d.ts +4 -0
  100. package/elements/video/video-element.js +81 -21
  101. package/elements/video/video-element.metadata.json +1 -1
  102. package/elements/view-operation/view-operation.element.d.ts +23 -2
  103. package/elements/view-operation/view-operation.element.js +103 -1
  104. package/elements/view-operation/view-operation.element.metadata.json +1 -1
  105. package/elements/weather/weater-element.js +0 -1
  106. package/gui/gui-context.d.ts +12 -2
  107. package/gui/gui-host.d.ts +1 -1
  108. package/gui/gui-view.d.ts +2 -0
  109. package/gui/gui-view.js +38 -2
  110. package/gui/gui-view.metadata.json +1 -1
  111. package/gui/gui.component.d.ts +3 -0
  112. package/gui/gui.component.js +15 -2
  113. package/gui/gui.component.metadata.json +1 -1
  114. package/localization/localization.service.d.ts +7 -0
  115. package/localization/localization.service.js +10 -3
  116. package/localization/localization.service.metadata.json +1 -1
  117. package/localization/localization.service.zh_CN.js +8 -1
  118. package/localization/localization.service.zh_CN.metadata.json +1 -1
  119. package/modal/write-value/write-value-modal-args.d.ts +5 -1
  120. package/modal/write-value/write-value-modal-args.js +3 -1
  121. package/modal/write-value/write-value-modal-args.metadata.json +1 -1
  122. package/modal/write-value/write-value-modal.component.d.ts +12 -7
  123. package/modal/write-value/write-value-modal.component.html +9 -4
  124. package/modal/write-value/write-value-modal.component.js +73 -15
  125. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  126. package/model/air-quality/air-quality-info.d.ts +23 -0
  127. package/model/air-quality/air-quality-info.js +4 -0
  128. package/model/air-quality/air-quality-info.metadata.json +1 -0
  129. package/model/air-quality/air-quality.model.d.ts +7 -0
  130. package/model/air-quality/air-quality.model.js +0 -0
  131. package/model/air-quality/air-quality.model.metadata.json +1 -0
  132. package/model/alarm/alarm.model.d.ts +13 -0
  133. package/model/alarm/alarm.model.js +0 -0
  134. package/model/alarm/alarm.model.metadata.json +1 -0
  135. package/model/bar-graph/bar-graph.d.ts +4 -0
  136. package/model/base/font-setting-model.d.ts +6 -0
  137. package/model/base/font-setting-model.metadata.json +1 -1
  138. package/model/base/readable-model.d.ts +4 -0
  139. package/model/datetime-display/datetime-display.d.ts +1 -0
  140. package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -0
  141. package/model/historical-curve/historical-curve-axis-settings.js +5 -0
  142. package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
  143. package/model/historical-curve/historical-curve-chanel.model.d.ts +8 -0
  144. package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
  145. package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
  146. package/model/meter/meter.d.ts +4 -0
  147. package/model/ring-graph/ring-graph.model.d.ts +8 -0
  148. package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
  149. package/model/scroll-alarm/scroll-alarm.model.js +0 -0
  150. package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
  151. package/model/switch-indicator-light/bit-switch-operation.d.ts +2 -1
  152. package/model/switch-indicator-light/bit-switch-operation.js +1 -0
  153. package/model/switch-indicator-light/bit-switch-operation.metadata.json +1 -1
  154. package/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
  155. package/model/view-operation/view-operation-element.model.d.ts +7 -1
  156. package/package.json +1 -1
  157. package/public_api.js +1 -0
  158. package/remote/communication/variable/remote-variable-communicator.d.ts +22 -0
  159. package/remote/communication/variable/remote-variable-communicator.js +122 -2
  160. package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
  161. package/remote/communication/variable/remote-variable-protocol.d.ts +5 -0
  162. package/service/index.d.ts +4 -0
  163. package/service/index.js +1 -0
  164. package/service/index.metadata.json +1 -1
  165. package/service/language.service.d.ts +37 -0
  166. package/service/language.service.js +0 -0
  167. package/service/language.service.metadata.json +1 -0
  168. package/service/released-variable/index.d.ts +1 -0
  169. package/service/released-variable/index.js +0 -0
  170. package/service/released-variable/index.metadata.json +1 -0
  171. package/service/released-variable/released-variable.service.d.ts +4 -0
  172. package/service/released-variable/released-variable.service.js +0 -0
  173. package/service/released-variable/released-variable.service.metadata.json +1 -0
  174. package/service/system-text-library.service.d.ts +76 -0
  175. package/service/system-text-library.service.js +28 -0
  176. package/service/system-text-library.service.metadata.json +1 -0
  177. package/service/text-library.service.d.ts +49 -0
  178. package/service/text-library.service.js +0 -0
  179. package/service/text-library.service.metadata.json +1 -0
  180. package/service/weather.service.d.ts +1 -0
  181. package/shared/gui-consts.d.ts +3 -0
  182. package/shared/gui-consts.js +3 -0
  183. package/shared/gui-consts.metadata.json +1 -1
  184. package/utils/data-type/fbox-data-type.service.js +40 -0
@@ -9,7 +9,7 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
9
9
  import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
10
10
  import { ViewService } from '../../view/view.service';
11
11
  export class ViewOperationElement extends ConditionalEnableElement {
12
- constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId) {
12
+ constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId, textLibraryService, languageService, guiContext) {
13
13
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
14
14
  this.modalService = modalService;
15
15
  this.graphStore = graphStore;
@@ -18,20 +18,27 @@ export class ViewOperationElement extends ConditionalEnableElement {
18
18
  this.popupViewService = popupViewService;
19
19
  this.hostContainerId = hostContainerId;
20
20
  this.el = el;
21
+ this.textLibraryService = textLibraryService;
22
+ this.languageService = languageService;
23
+ this.guiContext = guiContext;
21
24
  this.touchedScreenX = 0;
22
25
  this.touchedScreenY = 0;
23
26
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
24
27
  this.viewService = injector.get(ViewService);
25
28
  this.initElement();
29
+ this.subscribeLanguageChange();
26
30
  }
27
31
  initElement() {
28
32
  const width = this.model.size.width;
29
33
  const height = this.model.size.height;
30
34
  this.initGraph(width, height);
31
35
  this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', height).attr('fill', 'transparent');
36
+ // 初始化文本显示
32
37
  const $dateTimeText = this.$element.find('text').last();
33
38
  const fontStyle = this.model.label.font.fontStyle;
34
39
  $dateTimeText.css('font', fontStyle + ',msyh');
40
+ // 设置初始文本内容(支持文本库)
41
+ this.updateTextContent($dateTimeText);
35
42
  this.switchToState(0);
36
43
  this.rootElement.on('mousedown', () => {
37
44
  if (!this.isInitialized) {
@@ -170,6 +177,9 @@ export class ViewOperationElement extends ConditionalEnableElement {
170
177
  const viewIndex = this.model.viewIndex;
171
178
  if (null != viewIndex) {
172
179
  this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
180
+ $(`#${this.hostContainerId} video`)
181
+ .addClass('video-hidden')
182
+ .css('visibility', 'hidden');
173
183
  }
174
184
  else {
175
185
  this.logger.error('[GUI]Toggle View:invalid view index');
@@ -177,6 +187,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
177
187
  }
178
188
  closeView() {
179
189
  this.popupViewService.closeView();
190
+ if ($(`#${this.hostContainerId} > svg > svg`).length === 0) {
191
+ $(`#${this.hostContainerId} .video-hidden`)
192
+ .removeClass('video-hidden')
193
+ .css('visibility', 'visible');
194
+ }
180
195
  this.recordViewOperation();
181
196
  }
182
197
  moveView(movementX, movementY) {
@@ -191,4 +206,91 @@ export class ViewOperationElement extends ConditionalEnableElement {
191
206
  this.operationRecordService.record({ operationDescription: this.model.operationDescription });
192
207
  }
193
208
  }
209
+ /**
210
+ * 订阅语种变化事件
211
+ */
212
+ subscribeLanguageChange() {
213
+ // 只有使用文本库时才需要订阅语种变化
214
+ if (!this.model.textLibrary || this.model.textLibrary.labelType !== 'textLibrary') {
215
+ return;
216
+ }
217
+ if (this.guiContext && this.guiContext.languageChanged$) {
218
+ this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
219
+ // 更新文本内容
220
+ const $dateTimeText = this.$element.find('text').last();
221
+ this.updateTextContent($dateTimeText);
222
+ });
223
+ }
224
+ }
225
+ /**
226
+ * 更新文本内容(支持文本库和语种切换)
227
+ */
228
+ updateTextContent($textElement) {
229
+ const displayText = this.getDisplayText();
230
+ $textElement.text(displayText);
231
+ }
232
+ /**
233
+ * 获取显示文本
234
+ */
235
+ getDisplayText() {
236
+ var _a, _b, _c, _d, _e, _f;
237
+ // 检查是否使用文本库
238
+ if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
239
+ const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
240
+ const textItem = this.model.textLibrary.selectedTextItem;
241
+ if (textLibraryId && textItem && this.textLibraryService) {
242
+ // 获取文本库数据
243
+ const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
244
+ if (textLibraryData && textLibraryData.data) {
245
+ // 查找对应的文本条目
246
+ const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
247
+ if (textEntry) {
248
+ // 获取当前语种ID
249
+ const currentLanguageId = (_c = (_b = (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.getCurrentLanguageId) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
250
+ // 确定要使用的语种代码(culture)
251
+ let targetLanguage;
252
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
253
+ if (currentLanguageId === null || currentLanguageId === undefined) {
254
+ // 设备未设置当前语种,使用默认语种
255
+ targetLanguage = defaultLanguage;
256
+ }
257
+ else {
258
+ // 设备已设置当前语种,获取对应的语种代码
259
+ const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
260
+ if (currentLanguage) {
261
+ targetLanguage = currentLanguage;
262
+ }
263
+ else {
264
+ // 无法获取语种代码,使用默认语种
265
+ targetLanguage = defaultLanguage;
266
+ }
267
+ }
268
+ // 返回对应语种的文本
269
+ if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
270
+ return textEntry.cultures[targetLanguage];
271
+ }
272
+ // 如果没有对应语种,返回空字符串
273
+ return '';
274
+ }
275
+ }
276
+ }
277
+ // 文本库配置但未找到数据,返回空字符串
278
+ return '';
279
+ }
280
+ // 默认返回文本内容
281
+ return this.model.label.content || '';
282
+ }
283
+ /**
284
+ * 释放资源
285
+ */
286
+ dispose() {
287
+ // 取消语种变化订阅
288
+ if (this.languageChangeSubscription) {
289
+ this.languageChangeSubscription.unsubscribe();
290
+ this.languageChangeSubscription = undefined;
291
+ }
292
+ if (this.$element) {
293
+ this.$element.remove();
294
+ }
295
+ }
194
296
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":20,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":31,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":31,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":32,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":33,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":34,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":35,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":36,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":37,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":38,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":39,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":40,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":42,"character":29},{"__symbolic":"reference","name":"string"}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":22,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":34,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":35,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":36,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":37,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":38,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":39,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":40,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":41,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":42,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":43,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":29},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":47,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":48,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":49,"character":38}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"updateTextContent":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
@@ -45,7 +45,6 @@ export class WeatherElement extends ConditionalDisplayElement {
45
45
  }
46
46
  handleGettingAddress() {
47
47
  this.handleUnusualCommon(this.localization.weatherNotAvailable);
48
- setTimeout(() => this.initWeatherInfo(), 1000 * 60);
49
48
  }
50
49
  handleNoAddress() {
51
50
  this.handleUnusualCommon(this.localization.weatherNotAddress);
@@ -1,16 +1,26 @@
1
1
  import { ConfigStore } from '../config';
2
2
  import { VariableCommunicator } from '../communication';
3
3
  import { SecurityChecker } from '../security';
4
- import { VideoService, WeatherService, PermissionChecker, OperationRecordService } from '../service';
4
+ import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService, TextLibraryService, LanguageService, SystemTextLibraryService } from '../service';
5
+ import { Subject } from 'rxjs';
5
6
  export interface GuiContext {
6
7
  readonly configStore: ConfigStore;
7
8
  readonly variableCommunicator: VariableCommunicator;
8
9
  readonly permissionChecker: PermissionChecker;
9
10
  readonly operationRecordService: OperationRecordService;
11
+ readonly releasedVariableService: ReleasedVariableService;
10
12
  readonly securityChecker: SecurityChecker;
11
13
  readonly videoService: VideoService;
12
14
  readonly weatherService: WeatherService;
15
+ readonly textLibraryService?: TextLibraryService;
16
+ readonly languageService?: LanguageService;
17
+ readonly systemTextLibraryService?: SystemTextLibraryService;
13
18
  readonly configureViewId?: number;
14
19
  readonly configureViewCode?: string;
15
- dispose(): any;
20
+ readonly languageChanged$?: Subject<number | null>;
21
+ getCurrentLanguageId?(): number | null;
22
+ getDefaultLanguageId?(): number;
23
+ getLanguageCultureById?(languageId: number | null): string | null;
24
+ updateCurrentLanguageId?(languageId: number | null): Promise<void>;
25
+ dispose(): void;
16
26
  }
package/gui/gui-host.d.ts CHANGED
@@ -13,7 +13,7 @@ export declare class GuiHost implements Disposable {
13
13
  readonly el: ElementRef;
14
14
  private isLoaded;
15
15
  private currentView;
16
- private currentViewIndex;
16
+ currentViewIndex: number;
17
17
  private containerEl;
18
18
  private currentViewSize;
19
19
  private currentViewReiszeMode;
package/gui/gui-view.d.ts CHANGED
@@ -21,6 +21,8 @@ export declare class GuiView implements PopupViewService {
21
21
  private mainElement;
22
22
  private muskElement;
23
23
  private openVariableStatesSubscription;
24
+ private requestVirtualDeviceState;
25
+ private virtualDeviceStatesChanged;
24
26
  private openVariablesSubscription;
25
27
  private openedVariableNames;
26
28
  private perViewVariableCommunicator;
package/gui/gui-view.js CHANGED
@@ -72,11 +72,41 @@ export class GuiView {
72
72
  this.openVariableStatesSubscription.unsubscribe();
73
73
  }
74
74
  this.openedVariableNames = this.mainElement.getVariableNames();
75
- if (this.openedVariableNames.length === 0) {
75
+ // 分离系统变量和普通变量
76
+ const systemVariables = [];
77
+ const normalVariablesForState = [];
78
+ this.openedVariableNames.forEach(variableName => {
79
+ if (variableName === '当前语种ID') {
80
+ // 系统变量直接订阅,不需要等待状态
81
+ systemVariables.push(variableName);
82
+ }
83
+ else {
84
+ normalVariablesForState.push(variableName);
85
+ }
86
+ });
87
+ // 立即订阅系统变量
88
+ if (systemVariables.length > 0) {
89
+ this.normalOpenedVariableNames(systemVariables);
90
+ }
91
+ if (normalVariablesForState.indexOf('设备状态') !== -1) {
92
+ if (this.requestVirtualDeviceState) {
93
+ this.requestVirtualDeviceState.unsubscribe();
94
+ }
95
+ if (this.requestVirtualDeviceState) {
96
+ this.requestVirtualDeviceState.unsubscribe();
97
+ }
98
+ this.normalOpenedVariableNames(['设备状态']);
99
+ this.requestVirtualDeviceState =
100
+ this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
101
+ complete: () => { }
102
+ });
103
+ normalVariablesForState.splice(normalVariablesForState.indexOf('设备状态'), 1);
104
+ }
105
+ if (normalVariablesForState.length === 0) {
76
106
  return;
77
107
  }
78
108
  this.openVariableStatesSubscription =
79
- this.perViewVariableCommunicator.subscribeVariableStates(this.openedVariableNames).subscribe((states) => {
109
+ this.perViewVariableCommunicator.subscribeVariableStates(normalVariablesForState).subscribe((states) => {
80
110
  this.mainElement.reportVariableStates(states);
81
111
  const normalVariableNames = [];
82
112
  each(states, v => {
@@ -181,6 +211,12 @@ export class GuiView {
181
211
  if (this.openVariableStatesSubscription) {
182
212
  this.openVariableStatesSubscription.unsubscribe();
183
213
  }
214
+ if (this.requestVirtualDeviceState) {
215
+ this.requestVirtualDeviceState.unsubscribe();
216
+ }
217
+ if (this.virtualDeviceStatesChanged) {
218
+ this.virtualDeviceStatesChanged.unsubscribe();
219
+ }
184
220
  if (this.openVariablesSubscription) {
185
221
  this.openVariablesSubscription.unsubscribe();
186
222
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":48,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":49,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":49,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":50,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":51,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]}}}}]
@@ -24,10 +24,12 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
24
24
  initHeight: number;
25
25
  lastScale: number;
26
26
  isMobileMode: boolean;
27
+ hostContainerId: string;
27
28
  private $svg;
28
29
  private host;
29
30
  private get viewResizeMode();
30
31
  private readonly globalSettings;
32
+ private readonly viewService;
31
33
  constructor(el: ElementRef, localization: Localization, injector: Injector, bsModalService: BsModalService);
32
34
  ngOnChanges(changes: {
33
35
  [propKey: string]: SimpleChange;
@@ -39,4 +41,5 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
39
41
  private onSizeChanged;
40
42
  private onResizeModeChanged;
41
43
  private onDisplayModeChanged;
44
+ refreshCurrentPage(): boolean;
42
45
  }
@@ -18,6 +18,7 @@ import { Size } from '../model';
18
18
  import { DisplayMode, GlobalSettings, ViewResizeMode } from '../settings';
19
19
  import { GuiHost } from './gui-host';
20
20
  import { Guid } from '../utils/guid';
21
+ import { ViewService } from '../view/view.service';
21
22
  let GuiComponent = class GuiComponent {
22
23
  constructor(el, localization, injector, bsModalService) {
23
24
  this.el = el;
@@ -29,6 +30,7 @@ let GuiComponent = class GuiComponent {
29
30
  this.lastScale = 1;
30
31
  this.isMobileMode = false;
31
32
  this.globalSettings = this.injector.get(GlobalSettings);
33
+ this.viewService = injector.get(ViewService);
32
34
  }
33
35
  get viewResizeMode() {
34
36
  switch (this.resizeMode) {
@@ -131,11 +133,11 @@ let GuiComponent = class GuiComponent {
131
133
  this.$svg = $(this.el.nativeElement).find('div.svgView').first();
132
134
  this.$svg.empty();
133
135
  const svgRootClass = 'S' + Guid.newGuid().toString('n');
134
- const hostContainerId = 'H' + Guid.newGuid().toString('n');
136
+ this.hostContainerId = 'H' + Guid.newGuid().toString('n');
135
137
  this.$svg.addClass(svgRootClass);
136
138
  const guiOptions = {
137
139
  svgRootClass: svgRootClass,
138
- hostContainerId: hostContainerId,
140
+ hostContainerId: this.hostContainerId,
139
141
  el: this.el
140
142
  };
141
143
  const host = new GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
@@ -190,6 +192,17 @@ let GuiComponent = class GuiComponent {
190
192
  this.isMobileMode = this.displayMode === 'Mobile';
191
193
  this.globalSettings.displayMode = this.isMobileMode ? DisplayMode.Mobile : DisplayMode.Web;
192
194
  }
195
+ refreshCurrentPage() {
196
+ if (this.host.currentViewIndex === undefined) {
197
+ return false;
198
+ }
199
+ const toggleView = this.viewService.toggleViews.get(this.el);
200
+ if (!toggleView) {
201
+ return false;
202
+ }
203
+ toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
204
+ return true;
205
+ }
193
206
  };
194
207
  __decorate([
195
208
  Input(),
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":46,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":46,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":46,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":48,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":50,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}],"refreshCurrentPage":[{"__symbolic":"method"}]}}}}]
@@ -4,8 +4,10 @@ export interface Localization {
4
4
  loadFailed: any;
5
5
  setting: any;
6
6
  submit: any;
7
+ submitting: any;
7
8
  numericalValueRequired: any;
8
9
  invalidNumericalValue: any;
10
+ writeValueTimeout: any;
9
11
  binaryType: any;
10
12
  decimalType: any;
11
13
  hexadecimalType: any;
@@ -30,7 +32,9 @@ export interface Localization {
30
32
  permissiontip: any;
31
33
  conditionIsNotMetTip: any;
32
34
  chartNoData: any;
35
+ lastThirtyMinutes: any;
33
36
  lastOneHour: any;
37
+ lastEightHour: any;
34
38
  lastTwentyFourHours: any;
35
39
  lastSevenDays: any;
36
40
  lastThirtyDays: any;
@@ -47,5 +51,8 @@ export interface Localization {
47
51
  weatherNotSupport: any;
48
52
  weatherNotAddress: any;
49
53
  weatherNotAvailable: any;
54
+ airQualityNotSupport: any;
55
+ airQualityNotAddress: any;
56
+ airQualityNotAvailable: any;
50
57
  }
51
58
  export declare const DefaultLocalization: Localization;
@@ -4,8 +4,10 @@ export const DefaultLocalization = {
4
4
  loadFailed: 'Load failed.',
5
5
  setting: 'Setting',
6
6
  submit: 'Submit',
7
+ submitting: 'Submitting···',
7
8
  numericalValueRequired: 'Numerical value can\'t be emtpy',
8
9
  invalidNumericalValue: 'Numerical value is not valid',
10
+ writeValueTimeout: 'Write value error: Timeout',
9
11
  binaryType: 'Binary',
10
12
  decimalType: 'Decimal',
11
13
  hexadecimalType: 'Hexadecimal',
@@ -15,7 +17,7 @@ export const DefaultLocalization = {
15
17
  canNotBeNegative: 'Can not be negative',
16
18
  valueOutOfRange: 'Numerical value is out of range',
17
19
  timeout: 'timeout',
18
- confirmOperationPrompt: 'Sure to do this operation?',
20
+ confirmOperationPrompt: 'Are you sure you want to perform this operation?',
19
21
  confirm: 'Yes',
20
22
  cancel: 'Cancel',
21
23
  characterInputRequired: 'Character input can\'t be empty',
@@ -28,9 +30,11 @@ export const DefaultLocalization = {
28
30
  abnormal: 'Data abnormal',
29
31
  disable: 'Disable',
30
32
  permissiontip: 'You have no permission to operate.',
31
- conditionIsNotMetTip: 'Unsatisfied operating conditions or variable abnorma.',
33
+ conditionIsNotMetTip: 'Operation conditions not met or variable anomalies.',
32
34
  chartNoData: 'No Data Available',
35
+ lastThirtyMinutes: 'Last thirty minutes',
33
36
  lastOneHour: 'Last one hour',
37
+ lastEightHour: 'Last eight hours',
34
38
  lastTwentyFourHours: 'Last 24 hours',
35
39
  lastSevenDays: 'Last 7 days',
36
40
  lastThirtyDays: 'Last 30 days',
@@ -46,5 +50,8 @@ export const DefaultLocalization = {
46
50
  unconfiguredVideoAddress: 'Unconfigured Video Address',
47
51
  weatherNotSupport: 'Location not supported',
48
52
  weatherNotAddress: 'Address not configured',
49
- weatherNotAvailable: 'Address not yet available'
53
+ weatherNotAvailable: 'Address not yet available',
54
+ airQualityNotSupport: 'Location not supported',
55
+ airQualityNotAddress: 'Address not configured',
56
+ airQualityNotAvailable: 'Address not yet available'
50
57
  };
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"LOCALIZATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["fc.gui.loc"]},"Localization":{"__symbolic":"interface"},"DefaultLocalization":{"loadFailed":"Load failed.","setting":"Setting","submit":"Submit","numericalValueRequired":"Numerical value can't be emtpy","invalidNumericalValue":"Numerical value is not valid","binaryType":"Binary","decimalType":"Decimal","hexadecimalType":"Hexadecimal","stringType":"String","numericalValueTooLong":"Numerical value too long","fractionDigitsMustLessThan":"Fraction digits must be less than ","canNotBeNegative":"Can not be negative","valueOutOfRange":"Numerical value is out of range","timeout":"timeout","confirmOperationPrompt":"Sure to do this operation?","confirm":"Yes","cancel":"Cancel","characterInputRequired":"Character input can't be empty","character":"(Character)","characterOutofRange":"Character length is out of range","writeValueRange":"Write value range","loading":"Loading","unbind":"Unbind","offline":"Offline","abnormal":"Data abnormal","disable":"Disable","permissiontip":"You have no permission to operate.","conditionIsNotMetTip":"Unsatisfied operating conditions or variable abnorma.","chartNoData":"No Data Available","lastOneHour":"Last one hour","lastTwentyFourHours":"Last 24 hours","lastSevenDays":"Last 7 days","lastThirtyDays":"Last 30 days","lastOneYear":"Last 1 year","grouped":"Grouped","stacked":"Stacked","passwordVerify":"Password verifiers","passwordError":"Password error","password":"Password","passwordToolTip":"Password error, please re-enter","passwordRequired":"Password can't be empty","invalidVideoAddress":"Invalid video address","unconfiguredVideoAddress":"Unconfigured Video Address","weatherNotSupport":"Location not supported","weatherNotAddress":"Address not configured","weatherNotAvailable":"Address not yet available"}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"LOCALIZATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["fc.gui.loc"]},"Localization":{"__symbolic":"interface"},"DefaultLocalization":{"loadFailed":"Load failed.","setting":"Setting","submit":"Submit","submitting":"Submitting···","numericalValueRequired":"Numerical value can't be emtpy","invalidNumericalValue":"Numerical value is not valid","writeValueTimeout":"Write value error: Timeout","binaryType":"Binary","decimalType":"Decimal","hexadecimalType":"Hexadecimal","stringType":"String","numericalValueTooLong":"Numerical value too long","fractionDigitsMustLessThan":"Fraction digits must be less than ","canNotBeNegative":"Can not be negative","valueOutOfRange":"Numerical value is out of range","timeout":"timeout","confirmOperationPrompt":"Are you sure you want to perform this operation?","confirm":"Yes","cancel":"Cancel","characterInputRequired":"Character input can't be empty","character":"(Character)","characterOutofRange":"Character length is out of range","writeValueRange":"Write value range","loading":"Loading","unbind":"Unbind","offline":"Offline","abnormal":"Data abnormal","disable":"Disable","permissiontip":"You have no permission to operate.","conditionIsNotMetTip":"Operation conditions not met or variable anomalies.","chartNoData":"No Data Available","lastThirtyMinutes":"Last thirty minutes","lastOneHour":"Last one hour","lastEightHour":"Last eight hours","lastTwentyFourHours":"Last 24 hours","lastSevenDays":"Last 7 days","lastThirtyDays":"Last 30 days","lastOneYear":"Last 1 year","grouped":"Grouped","stacked":"Stacked","passwordVerify":"Password verifiers","passwordError":"Password error","password":"Password","passwordToolTip":"Password error, please re-enter","passwordRequired":"Password can't be empty","invalidVideoAddress":"Invalid video address","unconfiguredVideoAddress":"Unconfigured Video Address","weatherNotSupport":"Location not supported","weatherNotAddress":"Address not configured","weatherNotAvailable":"Address not yet available","airQualityNotSupport":"Location not supported","airQualityNotAddress":"Address not configured","airQualityNotAvailable":"Address not yet available"}}}]
@@ -2,8 +2,10 @@ export const Localization_zh_CN = {
2
2
  loadFailed: '加载失败.',
3
3
  setting: '设置',
4
4
  submit: '提交',
5
+ submitting: '提交中···',
5
6
  numericalValueRequired: '数值不能为空',
6
7
  invalidNumericalValue: '数值格式不正确',
8
+ writeValueTimeout: '写值错误:超时',
7
9
  binaryType: '二进制',
8
10
  decimalType: '十进制',
9
11
  hexadecimalType: '十六进制',
@@ -28,7 +30,9 @@ export const Localization_zh_CN = {
28
30
  permissiontip: '您无权限执行此操作',
29
31
  conditionIsNotMetTip: '操作条件不满足或逻辑控制变量异常',
30
32
  chartNoData: '无数据',
33
+ lastThirtyMinutes: '最近30分钟',
31
34
  lastOneHour: '最近1小时',
35
+ lastEightHour: '最近8小时',
32
36
  lastTwentyFourHours: '最近24小时',
33
37
  lastSevenDays: '最近7天',
34
38
  lastThirtyDays: '最近30天',
@@ -44,5 +48,8 @@ export const Localization_zh_CN = {
44
48
  unconfiguredVideoAddress: '未配置视频地址',
45
49
  weatherNotSupport: '当前位置暂不支持',
46
50
  weatherNotAddress: '当前设备未设置地址',
47
- weatherNotAvailable: '暂未获取设备地址'
51
+ weatherNotAvailable: '暂未获取设备地址',
52
+ airQualityNotSupport: '当前位置暂不支持',
53
+ airQualityNotAddress: '当前设备未设置地址',
54
+ airQualityNotAvailable: '暂未获取设备地址'
48
55
  };
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"Localization_zh_CN":{"loadFailed":"加载失败.","setting":"设置","submit":"提交","numericalValueRequired":"数值不能为空","invalidNumericalValue":"数值格式不正确","binaryType":"二进制","decimalType":"十进制","hexadecimalType":"十六进制","stringType":"字符串","numericalValueTooLong":"数值超长","fractionDigitsMustLessThan":"小数位不能超过","canNotBeNegative":"不能为负数","valueOutOfRange":"数值超出范围","timeout":"超时","confirmOperationPrompt":"是否确认要执行此操作?","confirm":"确定","cancel":"取消","characterInputRequired":"请输入至少一个字符","character":"(字符串)","characterOutofRange":"字符长度超限","writeValueRange":"写值范围","loading":"加载中","unbind":"未绑定","offline":"离线","abnormal":"数据异常","disable":"禁用","permissiontip":"您无权限执行此操作","conditionIsNotMetTip":"操作条件不满足或逻辑控制变量异常","chartNoData":"无数据","lastOneHour":"最近1小时","lastTwentyFourHours":"最近24小时","lastSevenDays":"最近7天","lastThirtyDays":"最近30天","lastOneYear":"最近1年","grouped":"分组","stacked":"叠加","passwordVerify":"密码校验","passwordError":"密码错误","password":"密码","passwordToolTip":"密码错误,请重新输入","passwordRequired":"密码不能为空","invalidVideoAddress":"无效的视频地址","unconfiguredVideoAddress":"未配置视频地址","weatherNotSupport":"当前位置暂不支持","weatherNotAddress":"当前设备未设置地址","weatherNotAvailable":"暂未获取设备地址"}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"Localization_zh_CN":{"loadFailed":"加载失败.","setting":"设置","submit":"提交","submitting":"提交中···","numericalValueRequired":"数值不能为空","invalidNumericalValue":"数值格式不正确","writeValueTimeout":"写值错误:超时","binaryType":"二进制","decimalType":"十进制","hexadecimalType":"十六进制","stringType":"字符串","numericalValueTooLong":"数值超长","fractionDigitsMustLessThan":"小数位不能超过","canNotBeNegative":"不能为负数","valueOutOfRange":"数值超出范围","timeout":"超时","confirmOperationPrompt":"是否确认要执行此操作?","confirm":"确定","cancel":"取消","characterInputRequired":"请输入至少一个字符","character":"(字符串)","characterOutofRange":"字符长度超限","writeValueRange":"写值范围","loading":"加载中","unbind":"未绑定","offline":"离线","abnormal":"数据异常","disable":"禁用","permissiontip":"您无权限执行此操作","conditionIsNotMetTip":"操作条件不满足或逻辑控制变量异常","chartNoData":"无数据","lastThirtyMinutes":"最近30分钟","lastOneHour":"最近1小时","lastEightHour":"最近8小时","lastTwentyFourHours":"最近24小时","lastSevenDays":"最近7天","lastThirtyDays":"最近30天","lastOneYear":"最近1年","grouped":"分组","stacked":"叠加","passwordVerify":"密码校验","passwordError":"密码错误","password":"密码","passwordToolTip":"密码错误,请重新输入","passwordRequired":"密码不能为空","invalidVideoAddress":"无效的视频地址","unconfiguredVideoAddress":"未配置视频地址","weatherNotSupport":"当前位置暂不支持","weatherNotAddress":"当前设备未设置地址","weatherNotAvailable":"暂未获取设备地址","airQualityNotSupport":"当前位置暂不支持","airQualityNotAddress":"当前设备未设置地址","airQualityNotAvailable":"暂未获取设备地址"}}}]
@@ -1,4 +1,6 @@
1
1
  import { NumericalOperation } from '../../model';
2
+ import { ReleasedVariableService } from '../../service';
3
+ import { GuiContext } from '../../gui/gui-context';
2
4
  export declare class WriteValueModalArgs {
3
5
  variableName: string;
4
6
  dataType: number;
@@ -8,5 +10,7 @@ export declare class WriteValueModalArgs {
8
10
  numericalOperation: NumericalOperation;
9
11
  version: number;
10
12
  enableDataParsed: boolean;
11
- constructor(variableName: string, dataType: number, fBoxDataType: number, integerDigits: number, fractionDigits: number, numericalOperation: NumericalOperation, version: number, enableDataParsed: boolean);
13
+ releasedVariableService: ReleasedVariableService;
14
+ guiContext?: GuiContext;
15
+ constructor(variableName: string, dataType: number, fBoxDataType: number, integerDigits: number, fractionDigits: number, numericalOperation: NumericalOperation, version: number, enableDataParsed: boolean, releasedVariableService: ReleasedVariableService, guiContext?: GuiContext);
12
16
  }
@@ -1,5 +1,5 @@
1
1
  export class WriteValueModalArgs {
2
- constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed) {
2
+ constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed, releasedVariableService, guiContext) {
3
3
  this.variableName = variableName;
4
4
  this.dataType = dataType;
5
5
  this.fBoxDataType = fBoxDataType;
@@ -8,5 +8,7 @@ export class WriteValueModalArgs {
8
8
  this.numericalOperation = numericalOperation;
9
9
  this.version = version;
10
10
  this.enableDataParsed = enableDataParsed;
11
+ this.releasedVariableService = releasedVariableService;
12
+ this.guiContext = guiContext;
11
13
  }
12
14
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":9,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"boolean"}]}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":11,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":14,"character":40},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":15,"character":28}]}]}}}}]
@@ -1,19 +1,18 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
2
  import { Localization } from '../../localization';
4
3
  import { NumericalOperation } from '../../model/numerical-display/numerical-operation';
5
4
  import { DataTypeService } from '../../utils/data-type/data-type.service';
6
5
  import { FractionDigitService } from '../../utils/fraction-digit.service';
7
6
  import { NumericalOperationService } from '../../utils/numerical-operation.service';
8
7
  import { WriteValueModalArgs } from './write-value-modal-args';
9
- import { WriteValueModelResult } from './write-value-model-result';
8
+ import { BsModalRef } from 'ngx-bootstrap/modal';
10
9
  export declare class WriteValueModalComponent implements OnInit {
11
10
  localization: Localization;
12
11
  private readonly dataTypeService;
13
12
  private readonly fractionDigitService;
14
13
  private readonly numericalOperationService;
15
- private _onClosed;
16
- get onClosed(): Observable<WriteValueModelResult>;
14
+ private readonly bsModalRef;
15
+ onClosed: any;
17
16
  args: WriteValueModalArgs;
18
17
  private dataType;
19
18
  private fBoxDataType;
@@ -28,21 +27,27 @@ export declare class WriteValueModalComponent implements OnInit {
28
27
  valueType: string;
29
28
  variableName: string;
30
29
  enableNumericalOperation: boolean;
30
+ isNumericalOperation: boolean;
31
31
  numericalOperation: NumericalOperation;
32
32
  validationError: boolean;
33
33
  validationErrorText: string;
34
34
  writeMinValue: number;
35
35
  writeMaxValue: number;
36
36
  writeValueRangeText: string;
37
+ isSubmitting: boolean;
37
38
  get invalidErrorText(): string;
38
- constructor(localization: Localization, dataTypeService: DataTypeService, fractionDigitService: FractionDigitService, numericalOperationService: NumericalOperationService);
39
+ constructor(localization: Localization, dataTypeService: DataTypeService, fractionDigitService: FractionDigitService, numericalOperationService: NumericalOperationService, bsModalRef: BsModalRef);
39
40
  ngOnInit(): void;
40
41
  initData(option: WriteValueModalArgs): void;
41
42
  private setValueRangeAccordToDataParsed;
42
43
  getWriteValueRangeText(): string;
43
44
  save(): void;
44
- close(modalResult?: WriteValueModelResult): void;
45
- validate(): void;
45
+ /**
46
+ * 处理"当前语种ID"系统变量的保存
47
+ */
48
+ private handleCurrentLanguageIdSave;
49
+ close(): void;
50
+ validate(event?: any): void;
46
51
  private showValidationErrorInfo;
47
52
  private hideValidationErrorInfo;
48
53
  private getFractionDigits;