@flexem/fc-gui 3.0.0-alpha.7 → 3.0.0-alpha.71
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.
- package/CHANGELOG.md +301 -0
- package/bundles/@flexem/fc-gui.umd.js +18503 -17019
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +5 -5
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/communication/variable/variable-communicator.d.ts +3 -2
- package/config/alarm/alarm.store.d.ts +6 -0
- package/config/alarm/alarm.store.js +0 -0
- package/config/alarm/alarm.store.metadata.json +1 -0
- package/config/alarm/get-alarms-args.d.ts +9 -0
- package/config/alarm/get-alarms-args.js +9 -0
- package/config/alarm/get-alarms-args.metadata.json +1 -0
- package/config/alarm/index.d.ts +2 -0
- package/config/alarm/index.js +1 -0
- package/config/alarm/index.metadata.json +1 -0
- package/config/config-store.d.ts +2 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +1 -0
- package/config/index.metadata.json +1 -1
- package/elements/air-quality/air-quality-element.d.ts +31 -0
- package/elements/air-quality/air-quality-element.js +194 -0
- package/elements/air-quality/air-quality-element.metadata.json +1 -0
- package/elements/alarm/alarm-element.d.ts +39 -0
- package/elements/alarm/alarm-element.js +300 -0
- package/elements/alarm/alarm-element.metadata.json +1 -0
- package/elements/alarm/alarm-state-enum.d.ts +4 -0
- package/elements/alarm/alarm-state-enum.js +5 -0
- package/elements/alarm/alarm-state-enum.metadata.json +1 -0
- package/elements/bar-graph-element.d.ts +8 -2
- package/elements/bar-graph-element.js +72 -6
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/base/base-element.d.ts +2 -1
- package/elements/base/base-element.js +2 -1
- package/elements/base/base-element.metadata.json +1 -1
- package/elements/base/conditional-control-element.d.ts +1 -1
- package/elements/base/conditional-control-element.js +3 -3
- package/elements/base/conditional-control-element.metadata.json +1 -1
- package/elements/base/conditional-display-element.d.ts +1 -1
- package/elements/base/conditional-display-element.js +4 -4
- package/elements/base/conditional-display-element.metadata.json +1 -1
- package/elements/base/conditional-dynamic-display-element.d.ts +1 -1
- package/elements/base/conditional-dynamic-display-element.js +3 -3
- package/elements/base/conditional-dynamic-display-element.metadata.json +1 -1
- package/elements/base/conditional-enable-element.d.ts +1 -1
- package/elements/base/conditional-enable-element.js +4 -4
- package/elements/base/conditional-enable-element.metadata.json +1 -1
- package/elements/base/readable-element.d.ts +7 -2
- package/elements/base/readable-element.js +33 -4
- package/elements/base/readable-element.metadata.json +1 -1
- package/elements/base/state-control-element.d.ts +1 -1
- package/elements/base/state-control-element.js +2 -2
- package/elements/base/state-control-element.metadata.json +1 -1
- package/elements/character-display/character-display-element.d.ts +1 -1
- package/elements/character-display/character-display-element.js +2 -2
- package/elements/character-display/character-display-element.metadata.json +1 -1
- package/elements/datetime-display/datetime-display-element.d.ts +1 -1
- package/elements/datetime-display/datetime-display-element.js +2 -2
- package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
- package/elements/historical-curve/historical-curve.element.d.ts +1 -1
- package/elements/historical-curve/historical-curve.element.js +104 -15
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.d.ts +2 -1
- package/elements/main-element.js +48 -26
- package/elements/main-element.metadata.json +1 -1
- package/elements/meter-element.d.ts +8 -2
- package/elements/meter-element.js +78 -9
- package/elements/meter-element.metadata.json +1 -1
- package/elements/numerical-display/numerical-display-element.d.ts +8 -2
- package/elements/numerical-display/numerical-display-element.js +47 -11
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/per-view-variable-communicator.d.ts +4 -2
- package/elements/per-view-variable-communicator.js +12 -4
- package/elements/per-view-variable-communicator.metadata.json +1 -1
- package/elements/pipe/pipe-element.d.ts +1 -1
- package/elements/pipe/pipe-element.js +2 -2
- package/elements/pipe/pipe-element.metadata.json +1 -1
- package/elements/ring-graph/ring-graph-element.d.ts +11 -2
- package/elements/ring-graph/ring-graph-element.js +108 -5
- package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
- package/elements/shared/graph/graph-state-element.js +0 -3
- package/elements/shared/text/text-element.js +13 -2
- package/elements/shared/text/text-state-element.js +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +1 -1
- package/elements/static-elements/hyperlink-element.js +2 -2
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/image-element.d.ts +1 -1
- package/elements/static-elements/image-element.js +2 -2
- package/elements/static-elements/image-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +1 -1
- package/elements/static-elements/text-element.js +2 -2
- package/elements/static-elements/text-element.metadata.json +1 -1
- package/elements/switch-indicator-light/bit-indicator-light-operator.d.ts +1 -1
- package/elements/switch-indicator-light/bit-indicator-light-operator.js +4 -4
- package/elements/switch-indicator-light/bit-switch-operator.d.ts +3 -1
- package/elements/switch-indicator-light/bit-switch-operator.js +22 -2
- package/elements/switch-indicator-light/bit-switch-operator.metadata.json +1 -1
- package/elements/switch-indicator-light/indicator-light-operator.d.ts +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +9 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.js +97 -28
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-operator.d.ts +1 -0
- package/elements/switch-indicator-light/word-indicator-light-operator.d.ts +1 -1
- package/elements/switch-indicator-light/word-indicator-light-operator.js +5 -5
- package/elements/switch-indicator-light/word-switch-operator.d.ts +3 -1
- package/elements/switch-indicator-light/word-switch-operator.js +9 -2
- package/elements/switch-indicator-light/word-switch-operator.metadata.json +1 -1
- package/elements/table/table-element.d.ts +1 -1
- package/elements/table/table-element.js +2 -2
- package/elements/table/table-element.metadata.json +1 -1
- package/elements/vector-graphics/ellipse-element.d.ts +1 -1
- package/elements/vector-graphics/ellipse-element.js +2 -2
- package/elements/vector-graphics/ellipse-element.metadata.json +1 -1
- package/elements/vector-graphics/poly-line-element.d.ts +1 -1
- package/elements/vector-graphics/poly-line-element.js +2 -2
- package/elements/vector-graphics/poly-line-element.metadata.json +1 -1
- package/elements/vector-graphics/polygon-element.d.ts +1 -1
- package/elements/vector-graphics/polygon-element.js +2 -2
- package/elements/vector-graphics/polygon-element.metadata.json +1 -1
- package/elements/vector-graphics/rectangle-element.d.ts +1 -1
- package/elements/vector-graphics/rectangle-element.js +2 -2
- package/elements/vector-graphics/rectangle-element.metadata.json +1 -1
- package/elements/vector-graphics/sector-element.d.ts +1 -1
- package/elements/vector-graphics/sector-element.js +2 -2
- package/elements/vector-graphics/sector-element.metadata.json +1 -1
- package/elements/vector-graphics/straight-line-element.d.ts +1 -1
- package/elements/vector-graphics/straight-line-element.js +2 -2
- package/elements/vector-graphics/straight-line-element.metadata.json +1 -1
- package/elements/video/video-element.d.ts +1 -2
- package/elements/video/video-element.js +53 -54
- package/elements/video/video-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +1 -1
- package/elements/view-operation/view-operation.element.js +2 -2
- package/elements/view-operation/view-operation.element.metadata.json +1 -1
- package/elements/weather/weater-element.d.ts +1 -1
- package/elements/weather/weater-element.js +2 -3
- package/elements/weather/weater-element.metadata.json +1 -1
- package/gui/gui-context.d.ts +2 -1
- package/gui/gui-host.d.ts +1 -1
- package/gui/gui-view.d.ts +1 -0
- package/gui/gui-view.js +3 -2
- package/gui/gui-view.metadata.json +1 -1
- package/gui/gui.component.d.ts +3 -0
- package/gui/gui.component.js +15 -2
- package/gui/gui.component.metadata.json +1 -1
- package/localization/localization.service.d.ts +7 -0
- package/localization/localization.service.js +8 -1
- package/localization/localization.service.metadata.json +1 -1
- package/localization/localization.service.zh_CN.js +8 -1
- package/localization/localization.service.zh_CN.metadata.json +1 -1
- package/modal/write-value/write-value-modal-args.d.ts +4 -1
- package/modal/write-value/write-value-modal-args.js +3 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +9 -7
- package/modal/write-value/write-value-modal.component.html +5 -2
- package/modal/write-value/write-value-modal.component.js +39 -22
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/model/air-quality/air-quality-info.d.ts +23 -0
- package/model/air-quality/air-quality-info.js +4 -0
- package/model/air-quality/air-quality-info.metadata.json +1 -0
- package/model/air-quality/air-quality.model.d.ts +7 -0
- package/model/air-quality/air-quality.model.js +0 -0
- package/model/air-quality/air-quality.model.metadata.json +1 -0
- package/model/alarm/alarm.model.d.ts +13 -0
- package/model/alarm/alarm.model.js +0 -0
- package/model/alarm/alarm.model.metadata.json +1 -0
- package/model/bar-graph/bar-graph.d.ts +4 -0
- package/model/base/readable-model.d.ts +4 -0
- package/model/historical-curve/historical-curve-axis-settings.d.ts +7 -0
- package/model/historical-curve/historical-curve-axis-settings.js +5 -0
- package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
- package/model/meter/meter.d.ts +4 -0
- package/model/numerical-display/numerical-display.d.ts +1 -0
- package/model/ring-graph/ring-graph.model.d.ts +8 -0
- package/model/shared/condition/bit-condition-item-observer.d.ts +1 -1
- package/model/shared/condition/bit-condition-item-observer.js +4 -4
- package/model/shared/condition/condition-items-result-observer.d.ts +1 -1
- package/model/shared/condition/condition-items-result-observer.js +22 -12
- package/model/shared/condition/condition-items-result-observer.metadata.json +1 -1
- package/model/shared/condition/convert-condition-model.d.ts +5 -0
- package/model/shared/condition/convert-condition-model.js +0 -0
- package/model/shared/condition/convert-condition-model.metadata.json +1 -0
- package/model/shared/condition/relation-condition-result.d.ts +2 -1
- package/model/shared/condition/relation-condition-result.js +2 -1
- package/model/shared/condition/relation-condition-result.metadata.json +1 -1
- package/model/shared/condition/word-condition-item-observer.d.ts +1 -1
- package/model/shared/condition/word-condition-item-observer.js +11 -11
- package/model/shared/dynamic-display/dynamic-display.d.ts +1 -1
- package/model/shared/dynamic-display/dynamic-display.js +4 -4
- package/model/shared/dynamic-display/dynamic-display.metadata.json +1 -1
- package/model/shared/rotation/rotation-behavior.d.ts +1 -1
- package/model/shared/rotation/rotation-behavior.js +2 -2
- package/model/shared/rotation/rotation-behavior.metadata.json +1 -1
- package/model/shared/rotation/rotation-observer.d.ts +2 -1
- package/model/shared/rotation/rotation-observer.js +3 -2
- package/model/shared/rotation/rotation-observer.metadata.json +1 -1
- package/model/shared/translation/translation-behavior.d.ts +1 -1
- package/model/shared/translation/translation-behavior.js +3 -3
- package/model/shared/translation/translation-behavior.metadata.json +1 -1
- package/model/shared/translation/translation-observer.d.ts +1 -1
- package/model/shared/translation/translation-observer.js +2 -2
- package/model/shared/translation/translation-observer.metadata.json +1 -1
- package/model/switch-indicator-light/bit-switch-operation.d.ts +2 -1
- package/model/switch-indicator-light/bit-switch-operation.js +1 -0
- package/model/switch-indicator-light/bit-switch-operation.metadata.json +1 -1
- package/package.json +1 -1
- package/remote/communication/variable/remote-variable-communicator.d.ts +7 -2
- package/remote/communication/variable/remote-variable-communicator.js +38 -9
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/remote/communication/variable/remote-variable-protocol.d.ts +5 -2
- package/service/index.d.ts +1 -0
- package/service/index.metadata.json +1 -1
- package/service/released-variable/index.d.ts +1 -0
- package/service/released-variable/index.js +0 -0
- package/service/released-variable/index.metadata.json +1 -0
- package/service/released-variable/released-variable.service.d.ts +4 -0
- package/service/released-variable/released-variable.service.js +0 -0
- package/service/released-variable/released-variable.service.metadata.json +1 -0
- package/service/weather.service.d.ts +1 -0
- package/shared/gui-consts.d.ts +2 -0
- package/shared/gui-consts.js +2 -0
- package/shared/gui-consts.metadata.json +1 -1
- package/utils/data-type/data-type.service.d.ts +4 -7
- package/utils/data-type/data-type.service.js +29 -17
- package/utils/numerical-operation.service.js +2 -2
- package/gui/scripts/config.js +0 -6
- package/gui/scripts/require.js +0 -2145
- package/libs/nvd3/build/nv.d3.min.js +0 -13
package/elements/main-element.js
CHANGED
|
@@ -27,13 +27,16 @@ import { PolygonElement } from './vector-graphics/polygon-element';
|
|
|
27
27
|
import { HyperlinkElement } from './static-elements/hyperlink-element';
|
|
28
28
|
import { VideoElement } from './video/video-element';
|
|
29
29
|
import { WeatherElement } from './weather/weater-element';
|
|
30
|
+
import { AirQualityElement } from './air-quality/air-quality-element';
|
|
31
|
+
import { AlarmElement } from './alarm/alarm-element';
|
|
30
32
|
export class MainElement {
|
|
31
|
-
constructor(injector, bsModalService, context, variableCommunicator, popupViewService) {
|
|
33
|
+
constructor(injector, bsModalService, context, variableCommunicator, popupViewService, signalRAppId) {
|
|
32
34
|
this.injector = injector;
|
|
33
35
|
this.bsModalService = bsModalService;
|
|
34
36
|
this.context = context;
|
|
35
37
|
this.variableCommunicator = variableCommunicator;
|
|
36
38
|
this.popupViewService = popupViewService;
|
|
39
|
+
this.signalRAppId = signalRAppId;
|
|
37
40
|
this.elements = new Array();
|
|
38
41
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
39
42
|
}
|
|
@@ -57,72 +60,78 @@ export class MainElement {
|
|
|
57
60
|
const category = $(element).data('model').category;
|
|
58
61
|
switch (category) {
|
|
59
62
|
case GuiConsts.components.numericalDisplayKey:
|
|
60
|
-
const numericalDisplayElement = new NumericalDisplayElement(element, this.injector, this.bsModalService, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.graphStore, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION));
|
|
63
|
+
const numericalDisplayElement = new NumericalDisplayElement(element, this.injector, this.bsModalService, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.graphStore, this.context.operationRecordService, this.context.releasedVariableService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId);
|
|
61
64
|
this.elements.push(numericalDisplayElement);
|
|
62
65
|
break;
|
|
63
66
|
case GuiConsts.components.imageKey:
|
|
64
|
-
this.elements.push(new ImageElement(element, this.injector, this.context.configStore.imageStore, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore));
|
|
67
|
+
this.elements.push(new ImageElement(element, this.injector, this.context.configStore.imageStore, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
65
68
|
break;
|
|
66
69
|
case GuiConsts.components.meterKey:
|
|
67
|
-
this.elements.push(new MeterElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
70
|
+
this.elements.push(new MeterElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
68
71
|
break;
|
|
69
72
|
case GuiConsts.components.pipeKey:
|
|
70
|
-
this.elements.push(new PipeElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
73
|
+
this.elements.push(new PipeElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
71
74
|
break;
|
|
72
75
|
case GuiConsts.components.switchIndicatorLightKey:
|
|
73
|
-
this.elements.push(new SwitchIndicatorLightElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
76
|
+
this.elements.push(new SwitchIndicatorLightElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
74
77
|
break;
|
|
75
78
|
case GuiConsts.components.barGraphKey:
|
|
76
|
-
this.elements.push(new BarGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
79
|
+
this.elements.push(new BarGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
77
80
|
break;
|
|
78
81
|
case GuiConsts.components.toggleViewKey:
|
|
79
82
|
case GuiConsts.components.viewOperationElement:
|
|
80
|
-
this.elements.push(new ViewOperationElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.injector.get(LOCALIZATION), this.popupViewService, guiOptions.hostContainerId, guiOptions.el));
|
|
83
|
+
this.elements.push(new ViewOperationElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.injector.get(LOCALIZATION), this.popupViewService, guiOptions.hostContainerId, guiOptions.el, this.signalRAppId));
|
|
81
84
|
break;
|
|
82
85
|
case GuiConsts.components.characterKey:
|
|
83
|
-
this.elements.push(new CharacterDisplayElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
86
|
+
this.elements.push(new CharacterDisplayElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
84
87
|
break;
|
|
85
88
|
case GuiConsts.components.textKey:
|
|
86
|
-
this.elements.push(new TextElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore));
|
|
89
|
+
this.elements.push(new TextElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
87
90
|
break;
|
|
88
91
|
case GuiConsts.components.hyperlinkKey:
|
|
89
|
-
this.elements.push(new HyperlinkElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore));
|
|
92
|
+
this.elements.push(new HyperlinkElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
90
93
|
break;
|
|
91
94
|
case GuiConsts.components.straightLineKey:
|
|
92
|
-
this.elements.push(new StraightLineElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
95
|
+
this.elements.push(new StraightLineElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
93
96
|
break;
|
|
94
97
|
case GuiConsts.components.polyLineKey:
|
|
95
|
-
this.elements.push(new PolyLineElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
98
|
+
this.elements.push(new PolyLineElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
96
99
|
break;
|
|
97
100
|
case GuiConsts.components.ellipseKey:
|
|
98
|
-
this.elements.push(new EllipseElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
101
|
+
this.elements.push(new EllipseElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
99
102
|
break;
|
|
100
103
|
case GuiConsts.components.rectangleKey:
|
|
101
|
-
this.elements.push(new RectangleElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
104
|
+
this.elements.push(new RectangleElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
102
105
|
break;
|
|
103
106
|
case GuiConsts.components.sectorkey:
|
|
104
|
-
this.elements.push(new SectorElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
107
|
+
this.elements.push(new SectorElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
105
108
|
break;
|
|
106
109
|
case GuiConsts.components.datetimeDisplayKey:
|
|
107
|
-
this.elements.push(new DatetimeDisplayElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore));
|
|
110
|
+
this.elements.push(new DatetimeDisplayElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
108
111
|
break;
|
|
109
112
|
case GuiConsts.components.historicalCurveKey:
|
|
110
|
-
this.elements.push(new HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore));
|
|
113
|
+
this.elements.push(new HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId));
|
|
111
114
|
break;
|
|
112
115
|
case GuiConsts.components.ringGraphKey:
|
|
113
|
-
this.elements.push(new RingGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION)));
|
|
116
|
+
this.elements.push(new RingGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
114
117
|
break;
|
|
115
118
|
case GuiConsts.components.polygonKey:
|
|
116
|
-
this.elements.push(new PolygonElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
119
|
+
this.elements.push(new PolygonElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
117
120
|
break;
|
|
118
121
|
case GuiConsts.components.videokey:
|
|
119
|
-
this.elements.push(new VideoElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.videoService, new Size(this.rawWidth, this.rawHeight), guiOptions.svgRootClass));
|
|
122
|
+
this.elements.push(new VideoElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.videoService, new Size(this.rawWidth, this.rawHeight), guiOptions.svgRootClass, this.signalRAppId));
|
|
120
123
|
break;
|
|
121
124
|
case GuiConsts.components.tableKey:
|
|
122
|
-
this.elements.push(new PolygonElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore));
|
|
125
|
+
this.elements.push(new PolygonElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
123
126
|
break;
|
|
124
127
|
case GuiConsts.components.weatherKey:
|
|
125
|
-
this.elements.push(new WeatherElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService));
|
|
128
|
+
this.elements.push(new WeatherElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService, this.signalRAppId));
|
|
129
|
+
break;
|
|
130
|
+
case GuiConsts.components.airQualityKey:
|
|
131
|
+
this.elements.push(new AirQualityElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService, this.signalRAppId));
|
|
132
|
+
break;
|
|
133
|
+
case GuiConsts.components.alarmKey:
|
|
134
|
+
this.elements.push(new AlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
|
|
126
135
|
break;
|
|
127
136
|
}
|
|
128
137
|
});
|
|
@@ -203,7 +212,7 @@ export class MainElement {
|
|
|
203
212
|
initElementState() {
|
|
204
213
|
forEach(this.elements, element => {
|
|
205
214
|
if (element instanceof ReadableElement) {
|
|
206
|
-
element.init(element.readVariableName);
|
|
215
|
+
element.init(element.readVariableName || element.maxVariableName || element.minVariableName);
|
|
207
216
|
}
|
|
208
217
|
else if (element instanceof HistoricalCurveElement) {
|
|
209
218
|
element.initElementStatus();
|
|
@@ -214,8 +223,20 @@ export class MainElement {
|
|
|
214
223
|
getVariableNames() {
|
|
215
224
|
const variableNames = new Array();
|
|
216
225
|
forEach(this.elements, element => {
|
|
226
|
+
var _a, _b;
|
|
217
227
|
if (element instanceof ReadableElement) {
|
|
228
|
+
const maxVariableName = (_a = element) === null || _a === void 0 ? void 0 : _a.maxVariableName;
|
|
229
|
+
const maxValueType = element.maxValueType;
|
|
230
|
+
const minVariableName = (_b = element) === null || _b === void 0 ? void 0 : _b.minVariableName;
|
|
231
|
+
const minValueType = element.minValueType;
|
|
218
232
|
const variableName = element.readVariableName;
|
|
233
|
+
// 最大最小值选择变量类型时,其中一个未绑定变量不进行开点操作 - FLEXCLOUD-1817
|
|
234
|
+
if (maxValueType && maxVariableName && !variableNames.find(v => isEqual(maxVariableName, v))) {
|
|
235
|
+
variableNames.push(maxVariableName);
|
|
236
|
+
}
|
|
237
|
+
if (minValueType && minVariableName && !variableNames.find(v => isEqual(minVariableName, v))) {
|
|
238
|
+
variableNames.push(minVariableName);
|
|
239
|
+
}
|
|
219
240
|
if (variableName && !variableNames.find(v => isEqual(variableName, v))) {
|
|
220
241
|
variableNames.push(element.readVariableName);
|
|
221
242
|
}
|
|
@@ -241,7 +262,7 @@ export class MainElement {
|
|
|
241
262
|
each(values, value => {
|
|
242
263
|
each(this.elements, e => {
|
|
243
264
|
if (e instanceof ReadableElement) {
|
|
244
|
-
if (e.readVariableName === value.variableName) {
|
|
265
|
+
if (e.readVariableName === value.variableName || e.minVariableName === value.variableName || e.maxVariableName === value.variableName) {
|
|
245
266
|
e.reportValueChanged(value);
|
|
246
267
|
}
|
|
247
268
|
}
|
|
@@ -251,7 +272,8 @@ export class MainElement {
|
|
|
251
272
|
dispose() {
|
|
252
273
|
each(this.elements, e => {
|
|
253
274
|
if (e instanceof HistoricalCurveElement || e instanceof VideoElement
|
|
254
|
-
|| e instanceof WeatherElement || e instanceof NumericalDisplayElement || e instanceof TextElement
|
|
275
|
+
|| e instanceof WeatherElement || e instanceof NumericalDisplayElement || e instanceof TextElement
|
|
276
|
+
|| e instanceof AirQualityElement) {
|
|
255
277
|
e.dispose();
|
|
256
278
|
}
|
|
257
279
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MainElement":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MainElement":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":55,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":56,"character":41},{"__symbolic":"reference","module":"../gui/gui-context","name":"GuiContext","line":57,"character":34},{"__symbolic":"reference","module":"../communication","name":"VariableCommunicator","line":58,"character":47},{"__symbolic":"reference","module":"../view/popup-view.service","name":"PopupViewService","line":59,"character":43},null]}],"load":[{"__symbolic":"method"}],"uniformStretch":[{"__symbolic":"method"}],"changeVideoStyle":[{"__symbolic":"method"}],"horizontalStretch":[{"__symbolic":"method"}],"initElementState":[{"__symbolic":"method"}],"getVariableNames":[{"__symbolic":"method"}],"reportVariableStates":[{"__symbolic":"method"}],"reportVariableValues":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"checkIsLoaded":[{"__symbolic":"method"}],"initBackground":[{"__symbolic":"method"}],"getImageEl":[{"__symbolic":"method"}]}}}}]
|
|
@@ -5,16 +5,22 @@ import { ReadableElement } from './base';
|
|
|
5
5
|
import { VariableStore } from '../config';
|
|
6
6
|
import { PermissionChecker } from '../service';
|
|
7
7
|
export declare class MeterElement extends ReadableElement {
|
|
8
|
+
private static DEFAULT_MIN_VALUE;
|
|
9
|
+
private static DEFAULT_MAX_VALUE;
|
|
8
10
|
private readonly $handEl;
|
|
9
11
|
private readonly arcPath$;
|
|
10
12
|
private cx;
|
|
11
13
|
private cy;
|
|
12
14
|
private offsetY;
|
|
13
15
|
private mainElementTransform;
|
|
16
|
+
private valueObj;
|
|
17
|
+
private isNeedUpdateScale;
|
|
14
18
|
readonly model: Meter;
|
|
15
|
-
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization);
|
|
16
|
-
|
|
19
|
+
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
20
|
+
private updateValueObj;
|
|
21
|
+
updateVariableValue(value: number, variableName: any): void;
|
|
17
22
|
private initFrameNode;
|
|
23
|
+
private updateScale;
|
|
18
24
|
private getAngle;
|
|
19
25
|
private directionPoint;
|
|
20
26
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { ReadableElement } from './base';
|
|
2
|
+
import { isNumber } from 'lodash';
|
|
3
|
+
import { VariableValueType } from '../model/shared/condition/variable-value-type';
|
|
2
4
|
export class MeterElement extends ReadableElement {
|
|
3
|
-
constructor(element, permissionChecker, variableCommunicator, variableStore, localization) {
|
|
4
|
-
super(element, permissionChecker, variableCommunicator, variableStore, localization);
|
|
5
|
+
constructor(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId) {
|
|
6
|
+
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
5
7
|
this.cx = 0;
|
|
6
8
|
this.cy = 0;
|
|
7
9
|
this.offsetY = 0;
|
|
10
|
+
this.valueObj = {};
|
|
11
|
+
this.isNeedUpdateScale = false;
|
|
12
|
+
if ((this.model.minValueType === VariableValueType.Constant && this.model.maxValueType === VariableValueType.Variable)
|
|
13
|
+
|| this.model.maxValueType === VariableValueType.Constant && this.model.minValueType === VariableValueType.Variable) {
|
|
14
|
+
this.isNeedUpdateScale = true;
|
|
15
|
+
this.updateScale();
|
|
16
|
+
this.isNeedUpdateScale = false;
|
|
17
|
+
}
|
|
8
18
|
let mainEl$;
|
|
9
19
|
if (this.model.version && this.model.version > 3) {
|
|
10
20
|
mainEl$ = this.$element.find('[data-id="main"]');
|
|
@@ -31,18 +41,75 @@ export class MeterElement extends ReadableElement {
|
|
|
31
41
|
this.changeStates();
|
|
32
42
|
});
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
updateValueObj(value, variableName) {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
if (((_a = this.model.readVariable) === null || _a === void 0 ? void 0 : _a.name) === variableName) {
|
|
47
|
+
this.isNeedUpdateScale = false;
|
|
48
|
+
this.valueObj.value = value;
|
|
49
|
+
}
|
|
50
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.name) === variableName) {
|
|
51
|
+
this.isNeedUpdateScale = true;
|
|
52
|
+
this.valueObj.min = value;
|
|
53
|
+
}
|
|
54
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.name) === variableName) {
|
|
55
|
+
this.isNeedUpdateScale = true;
|
|
56
|
+
this.valueObj.max = value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
updateVariableValue(value, variableName) {
|
|
60
|
+
this.updateValueObj(value, variableName);
|
|
61
|
+
this.updateScale();
|
|
62
|
+
const angle = this.getAngle();
|
|
63
|
+
if (isNumber(angle)) {
|
|
64
|
+
this.$handEl.attr('transform', this.mainElementTransform + ` translate(0,${this.offsetY}) rotate(${angle}, ${this.cx}, ${this.cy})`);
|
|
65
|
+
}
|
|
37
66
|
}
|
|
38
67
|
initFrameNode() {
|
|
39
68
|
const b = Snap(this.$element[0]).getBBox();
|
|
40
69
|
this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', b.width).attr('height', b.height).attr('fill', 'transparent');
|
|
41
70
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
71
|
+
updateScale() {
|
|
72
|
+
if (!this.isNeedUpdateScale) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
76
|
+
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
77
|
+
min = Number(min);
|
|
78
|
+
max = Number(max);
|
|
79
|
+
if (isNaN(min) || isNaN(max)) {
|
|
80
|
+
min = MeterElement.DEFAULT_MIN_VALUE;
|
|
81
|
+
max = MeterElement.DEFAULT_MAX_VALUE;
|
|
82
|
+
}
|
|
83
|
+
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
84
|
+
const textElements = this.$element.find('g:first > text');
|
|
85
|
+
for (let i = 0; i < textElements.length; i++) {
|
|
86
|
+
const text = textElements[i];
|
|
87
|
+
if (!text.innerHTML) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
let sacleValue = ((Number(avgSacle) * i) + min).toFixed(0);
|
|
91
|
+
// 整数位和小数位格式化;
|
|
92
|
+
if (this.model.fractionDigits > 0) {
|
|
93
|
+
sacleValue = (sacleValue / Math.pow(10, this.model.fractionDigits)).toFixed(this.model.fractionDigits);
|
|
94
|
+
}
|
|
95
|
+
if (!isNaN(sacleValue)) {
|
|
96
|
+
text.innerHTML = sacleValue;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
getAngle() {
|
|
101
|
+
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
102
|
+
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
103
|
+
min = Number(min);
|
|
104
|
+
max = Number(max);
|
|
105
|
+
if (isNaN(min) || isNaN(max)) {
|
|
106
|
+
min = MeterElement.DEFAULT_MIN_VALUE;
|
|
107
|
+
max = MeterElement.DEFAULT_MAX_VALUE;
|
|
108
|
+
}
|
|
109
|
+
if (!this.valueObj.value && isNaN(Number(this.valueObj.value))) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
const value = Math.min(Math.max(this.valueObj.value || 0, min), max);
|
|
46
113
|
const len = (value - min) / (max - min);
|
|
47
114
|
const arcPath = Snap(this.arcPath$[0]);
|
|
48
115
|
const b = arcPath.getBBox(true);
|
|
@@ -68,3 +135,5 @@ export class MeterElement extends ReadableElement {
|
|
|
68
135
|
return c;
|
|
69
136
|
}
|
|
70
137
|
}
|
|
138
|
+
MeterElement.DEFAULT_MIN_VALUE = 0;
|
|
139
|
+
MeterElement.DEFAULT_MAX_VALUE = 100;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MeterElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./base","name":"ReadableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MeterElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./base","name":"ReadableElement","line":9,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":25,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../service","name":"PermissionChecker","line":25,"character":57},{"__symbolic":"reference","module":"../communication","name":"VariableCommunicator","line":26,"character":30},{"__symbolic":"reference","module":"../config","name":"VariableStore","line":26,"character":67},{"__symbolic":"reference","module":"../localization","name":"Localization","line":26,"character":96},{"__symbolic":"reference","name":"string"}]}],"updateValueObj":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"initFrameNode":[{"__symbolic":"method"}],"updateScale":[{"__symbolic":"method"}],"getAngle":[{"__symbolic":"method"}],"directionPoint":[{"__symbolic":"method"}]},"statics":{"DEFAULT_MIN_VALUE":0,"DEFAULT_MAX_VALUE":100}}}}]
|
|
@@ -3,7 +3,7 @@ import { BsModalService } from 'ngx-bootstrap/modal';
|
|
|
3
3
|
import { GraphStore, VariableStore } from '../../config';
|
|
4
4
|
import { Localization } from '../../localization';
|
|
5
5
|
import { NumericalDisplay } from '../../model';
|
|
6
|
-
import { PermissionChecker, OperationRecordService } from '../../service';
|
|
6
|
+
import { PermissionChecker, OperationRecordService, ReleasedVariableService } from '../../service';
|
|
7
7
|
import { VariableCommunicator } from '../../communication';
|
|
8
8
|
import { ReadableElement } from '../base/readable-element';
|
|
9
9
|
import { SecurityChecker } from '../../security';
|
|
@@ -11,6 +11,7 @@ export declare class NumericalDisplayElement extends ReadableElement {
|
|
|
11
11
|
private readonly modalService;
|
|
12
12
|
private readonly graphStore;
|
|
13
13
|
private readonly operationRecordService;
|
|
14
|
+
private readonly releasedVariableService;
|
|
14
15
|
private readonly securityChecker;
|
|
15
16
|
private readonly dataTypeService;
|
|
16
17
|
private readonly fractionDigitService;
|
|
@@ -21,8 +22,13 @@ export declare class NumericalDisplayElement extends ReadableElement {
|
|
|
21
22
|
private readonly logger;
|
|
22
23
|
private displayForeignObject;
|
|
23
24
|
private enableDataParsed;
|
|
25
|
+
private writeValueMmodalRef;
|
|
26
|
+
private writeValue;
|
|
27
|
+
private showValue;
|
|
28
|
+
private numericalOperation;
|
|
29
|
+
private restorationTimer;
|
|
24
30
|
get writeVariableName(): string;
|
|
25
|
-
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, graphStore: GraphStore, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization);
|
|
31
|
+
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, graphStore: GraphStore, operationRecordService: OperationRecordService, releasedVariableService: ReleasedVariableService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
26
32
|
dispose(): void;
|
|
27
33
|
initElement(): any;
|
|
28
34
|
private checkElementPassword;
|
|
@@ -11,12 +11,19 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
|
|
|
11
11
|
import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
|
|
12
12
|
import { isNil } from 'lodash';
|
|
13
13
|
import { FCloudDataType } from '../../model/shared/data-type/fcloud-data-Type';
|
|
14
|
+
var variableRwTypeEnum;
|
|
15
|
+
(function (variableRwTypeEnum) {
|
|
16
|
+
variableRwTypeEnum[variableRwTypeEnum["read"] = 4] = "read";
|
|
17
|
+
variableRwTypeEnum[variableRwTypeEnum["witer"] = 2] = "witer";
|
|
18
|
+
variableRwTypeEnum[variableRwTypeEnum["readWiter"] = 6] = "readWiter";
|
|
19
|
+
})(variableRwTypeEnum || (variableRwTypeEnum = {}));
|
|
14
20
|
export class NumericalDisplayElement extends ReadableElement {
|
|
15
|
-
constructor(element, injector, modalService, permissionChecker, variableCommunicator, graphStore, operationRecordService, securityChecker, variableStore, localization) {
|
|
16
|
-
super(element, permissionChecker, variableCommunicator, variableStore, localization);
|
|
21
|
+
constructor(element, injector, modalService, permissionChecker, variableCommunicator, graphStore, operationRecordService, releasedVariableService, securityChecker, variableStore, localization, signalRAppId) {
|
|
22
|
+
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
17
23
|
this.modalService = modalService;
|
|
18
24
|
this.graphStore = graphStore;
|
|
19
25
|
this.operationRecordService = operationRecordService;
|
|
26
|
+
this.releasedVariableService = releasedVariableService;
|
|
20
27
|
this.securityChecker = securityChecker;
|
|
21
28
|
this.displayText = '';
|
|
22
29
|
this.enableDataParsed = false;
|
|
@@ -173,19 +180,38 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
173
180
|
if (null == this.writeVariableName) {
|
|
174
181
|
return;
|
|
175
182
|
}
|
|
176
|
-
const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.integerDigits, this.model.fractionDigits, this.numericalOperationService.getNumericalOperations(this.model), this.model.version, this.enableDataParsed);
|
|
177
|
-
|
|
183
|
+
const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.fBoxDataType, this.model.integerDigits, this.model.fractionDigits, this.numericalOperationService.getNumericalOperations(this.model), this.model.version, this.enableDataParsed, this.releasedVariableService);
|
|
184
|
+
this.writeValueMmodalRef = this.modalService.show(WriteValueModalComponent, {
|
|
178
185
|
initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
|
|
179
186
|
});
|
|
180
|
-
|
|
181
|
-
modalRef.hide();
|
|
182
|
-
onClosedSub.unsubscribe();
|
|
187
|
+
this.writeValueMmodalRef.content.onClosed = (result) => {
|
|
183
188
|
if (result) {
|
|
189
|
+
if (this.restorationTimer) {
|
|
190
|
+
clearTimeout(this.restorationTimer);
|
|
191
|
+
this.restorationTimer = undefined;
|
|
192
|
+
}
|
|
184
193
|
const writeValue = this.dataTypeService.formatToDecimal(this.model.version, result.value, this.model.dataType);
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
194
|
+
this.writeValue = writeValue;
|
|
195
|
+
this.showValue = result.showValue;
|
|
196
|
+
if (+this.displayText !== +this.showValue || result.variableRwType === variableRwTypeEnum.witer) {
|
|
197
|
+
if (this.numericalOperation || result.enableNumericalOperation || result.isNumericalOperation || result.variableRwType === variableRwTypeEnum.witer) {
|
|
198
|
+
this.writeValueMmodalRef.hide();
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this.restorationTimer = setTimeout(() => {
|
|
202
|
+
if (+this.displayText !== +this.showValue) {
|
|
203
|
+
this.writeValueMmodalRef.content.isSubmitting = false;
|
|
204
|
+
this.writeValueMmodalRef.content.showValidationErrorInfo(this.localization.writeValueTimeout);
|
|
205
|
+
}
|
|
206
|
+
}, 10000);
|
|
207
|
+
}
|
|
208
|
+
this.variableCommunicator.write(this.writeVariableName, writeValue).subscribe();
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
this.writeValueMmodalRef.hide();
|
|
212
|
+
}
|
|
187
213
|
}
|
|
188
|
-
}
|
|
214
|
+
};
|
|
189
215
|
}
|
|
190
216
|
recordOperation(newValue) {
|
|
191
217
|
if (this.model.isRecordOperation || this.model.isRecordOperation === undefined) {
|
|
@@ -211,8 +237,18 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
211
237
|
}
|
|
212
238
|
}
|
|
213
239
|
updateVariableValue(value) {
|
|
240
|
+
var _a;
|
|
214
241
|
this.displayText = this.formatNumericalDisplayText(this.model.dataType, this.model.fractionDigits, value);
|
|
215
242
|
this.updateDisplayText(this.formatDisplayTextUnit(this.displayText));
|
|
243
|
+
if (((_a = this.writeValueMmodalRef) === null || _a === void 0 ? void 0 : _a.content) && +this.displayText === +this.showValue) {
|
|
244
|
+
if (this.restorationTimer) {
|
|
245
|
+
clearTimeout(this.restorationTimer);
|
|
246
|
+
this.restorationTimer = undefined;
|
|
247
|
+
}
|
|
248
|
+
this.writeValueMmodalRef.hide();
|
|
249
|
+
this.writeValueMmodalRef.content.hideValidationErrorInfo();
|
|
250
|
+
this.recordOperation(this.writeValue);
|
|
251
|
+
}
|
|
216
252
|
}
|
|
217
253
|
updateDisplayText(text) {
|
|
218
254
|
if (!this.displayForeignObject) {
|
|
@@ -354,7 +390,7 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
354
390
|
}
|
|
355
391
|
formatDisplayTextUnit(displayText) {
|
|
356
392
|
if (this.model.showUnit !== false && this.model.unit) {
|
|
357
|
-
return `${displayText} ${this.model.unit}`;
|
|
393
|
+
return `${displayText || 0} ${this.model.unit}`;
|
|
358
394
|
}
|
|
359
395
|
return displayText;
|
|
360
396
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"NumericalDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"NumericalDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":28,"character":45},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":50,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":39},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":53,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":54,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":55,"character":37},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":56,"character":49},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":57,"character":50},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":58,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":59,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":60,"character":22},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"initElement":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"initVariableText":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"doWriteValue":[{"__symbolic":"method"}],"recordOperation":[{"__symbolic":"method"}],"changeStates":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"updateDisplayText":[{"__symbolic":"method"}],"rebuildTextElement":[{"__symbolic":"method"}],"formatNumericalDisplayText":[{"__symbolic":"method"}],"formatFloatDisplayText":[{"__symbolic":"method"}],"isNumeric":[{"__symbolic":"method"}],"formatDisplayTextUnit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -6,12 +6,14 @@ export declare class PerViewVariableCommunicator implements VariableCommunicator
|
|
|
6
6
|
private observers;
|
|
7
7
|
private variableValuesChangedSubscriptions;
|
|
8
8
|
private variableStatesChangedSubscription;
|
|
9
|
+
private alarmSubscription;
|
|
9
10
|
constructor(variableCommunicator: VariableCommunicator);
|
|
10
|
-
openVariable(variableName: string): Observable<VariableValue>;
|
|
11
|
-
openVariables(variableNames: Array<string
|
|
11
|
+
openVariable(variableName: string, appId: string): Observable<VariableValue>;
|
|
12
|
+
openVariables(variableNames: Array<string>, appId?: string): Observable<Array<VariableValue>>;
|
|
12
13
|
write(variableName: string, value: any): Observable<VariableValue>;
|
|
13
14
|
writeWordByBit(variableName: string, index: number, value: number): Observable<VariableValue>;
|
|
14
15
|
subscribeVariableState(variableName: string): Observable<VariableState>;
|
|
15
16
|
subscribeVariableStates(variableNames: string[]): Observable<Array<VariableState>>;
|
|
17
|
+
subscribeUserDeviceAlarms(appId?: string): Observable<VariableState[]>;
|
|
16
18
|
dispose(): void;
|
|
17
19
|
}
|
|
@@ -6,12 +6,13 @@ export class PerViewVariableCommunicator {
|
|
|
6
6
|
this.observers = new Map();
|
|
7
7
|
this.variableValuesChangedSubscriptions = new Array();
|
|
8
8
|
this.variableStatesChangedSubscription = new Array();
|
|
9
|
+
this.alarmSubscription = new Array();
|
|
9
10
|
this._rawVariableCommunicator = variableCommunicator;
|
|
10
11
|
}
|
|
11
|
-
openVariable(variableName) {
|
|
12
|
-
return this.openVariables([variableName]).pipe(map(values => values[0]));
|
|
12
|
+
openVariable(variableName, appId) {
|
|
13
|
+
return this.openVariables([variableName], appId).pipe(map(values => values[0]));
|
|
13
14
|
}
|
|
14
|
-
openVariables(variableNames) {
|
|
15
|
+
openVariables(variableNames, appId = '') {
|
|
15
16
|
return new Observable(subscriber => {
|
|
16
17
|
each(variableNames, variableName => {
|
|
17
18
|
if (!this.observers.has(variableName)) {
|
|
@@ -19,7 +20,7 @@ export class PerViewVariableCommunicator {
|
|
|
19
20
|
}
|
|
20
21
|
this.observers.get(variableName).push(subscriber);
|
|
21
22
|
});
|
|
22
|
-
const subscription = this._rawVariableCommunicator.openVariables(variableNames).subscribe(values => subscriber.next(values), error => subscriber.error(error), () => subscriber.complete());
|
|
23
|
+
const subscription = this._rawVariableCommunicator.openVariables(variableNames, appId).subscribe(values => subscriber.next(values), error => subscriber.error(error), () => subscriber.complete());
|
|
23
24
|
this.variableValuesChangedSubscriptions.push(subscription);
|
|
24
25
|
});
|
|
25
26
|
}
|
|
@@ -38,8 +39,15 @@ export class PerViewVariableCommunicator {
|
|
|
38
39
|
this.variableStatesChangedSubscription.push(subscription);
|
|
39
40
|
});
|
|
40
41
|
}
|
|
42
|
+
subscribeUserDeviceAlarms(appId = '') {
|
|
43
|
+
return new Observable(subscriber => {
|
|
44
|
+
const subscription = this._rawVariableCommunicator.subscribeUserDeviceAlarms(appId).subscribe(values => subscriber.next(values), error => subscriber.error(error), () => subscriber.complete());
|
|
45
|
+
this.alarmSubscription.push(subscription);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
41
48
|
dispose() {
|
|
42
49
|
forEach(this.variableValuesChangedSubscriptions, s => s.unsubscribe());
|
|
43
50
|
forEach(this.variableStatesChangedSubscription, s => s.unsubscribe());
|
|
51
|
+
forEach(this.alarmSubscription, s => s.unsubscribe());
|
|
44
52
|
}
|
|
45
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PerViewVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../communication","name":"VariableCommunicator","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PerViewVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../communication","name":"VariableCommunicator","line":15,"character":38}]}],"openVariable":[{"__symbolic":"method"}],"openVariables":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"writeWordByBit":[{"__symbolic":"method"}],"subscribeVariableState":[{"__symbolic":"method"}],"subscribeVariableStates":[{"__symbolic":"method"}],"subscribeUserDeviceAlarms":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
|
|
@@ -9,7 +9,7 @@ export declare class PipeElement extends ConditionalControlElement {
|
|
|
9
9
|
private readonly elePipeInnerwall;
|
|
10
10
|
private readonly elePipeFlowBlock;
|
|
11
11
|
private pathLength;
|
|
12
|
-
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization);
|
|
12
|
+
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
13
13
|
initDefaultData(model: any): void;
|
|
14
14
|
protected updateElement(result: ConditionControlResultValue): void;
|
|
15
15
|
private initFrameNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlowDirectionType } from '../../model';
|
|
2
2
|
import { ConditionalControlElement } from '../base/conditional-control-element';
|
|
3
3
|
export class PipeElement extends ConditionalControlElement {
|
|
4
|
-
constructor(element, permissionChecker, variableCommunicator, variableStore, localization) {
|
|
5
|
-
super(element, permissionChecker, variableCommunicator, variableStore, localization);
|
|
4
|
+
constructor(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId) {
|
|
5
|
+
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
6
6
|
this.initDefaultData(this.model);
|
|
7
7
|
const children = this.$element.children();
|
|
8
8
|
if (!children || !children.length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PipeElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-control-element","name":"ConditionalControlElement","line":7,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":15,"character":57},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":16,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":16,"character":67},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":17,"character":22}]}],"initDefaultData":[{"__symbolic":"method"}],"updateElement":[{"__symbolic":"method"}],"initFrameNode":[{"__symbolic":"method"}],"startOrStopPipeFlow":[{"__symbolic":"method"}],"getAnimate":[{"__symbolic":"method"}],"getAnimateElement":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PipeElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-control-element","name":"ConditionalControlElement","line":7,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":15,"character":57},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":16,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":16,"character":67},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":17,"character":22},{"__symbolic":"reference","name":"string"}]}],"initDefaultData":[{"__symbolic":"method"}],"updateElement":[{"__symbolic":"method"}],"initFrameNode":[{"__symbolic":"method"}],"startOrStopPipeFlow":[{"__symbolic":"method"}],"getAnimate":[{"__symbolic":"method"}],"getAnimateElement":[{"__symbolic":"method"}]}}}}]
|
|
@@ -5,13 +5,22 @@ import { ReadableElement } from '../base/readable-element';
|
|
|
5
5
|
import { VariableStore } from '../../config';
|
|
6
6
|
import { PermissionChecker } from '../../service';
|
|
7
7
|
export declare class RingGraphElement extends ReadableElement {
|
|
8
|
+
private static DEFAULT_MIN_VALUE;
|
|
9
|
+
private static DEFAULT_MAX_VALUE;
|
|
8
10
|
protected readonly model: RingGraphModel;
|
|
9
11
|
private _barElement$;
|
|
10
12
|
private _textElement$;
|
|
13
|
+
private valueObj;
|
|
14
|
+
private isNeedUpdateScale;
|
|
11
15
|
get readVariableName(): string;
|
|
12
|
-
|
|
16
|
+
get minVariableName(): string;
|
|
17
|
+
get maxVariableName(): string;
|
|
18
|
+
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
13
19
|
private initFrameNode;
|
|
14
|
-
|
|
20
|
+
init(variableName: string): void;
|
|
21
|
+
private updateValueObj;
|
|
22
|
+
private updateScale;
|
|
23
|
+
protected updateVariableValue(value: number, variableName: any): void;
|
|
15
24
|
private updateBar;
|
|
16
25
|
private getBarColor;
|
|
17
26
|
private drawClockWiseArc;
|