@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
|
@@ -5,11 +5,11 @@ import { TranslationBehavior } from '../translation/translation-behavior';
|
|
|
5
5
|
import { DynamicDisplayResultModel } from './dynamic-display-result-model';
|
|
6
6
|
import { DynamicBehaviorType } from './dynamic-behavior-type';
|
|
7
7
|
export class DynamicDisplay {
|
|
8
|
-
constructor(dynamicDisplay, variableCommunicator, variableStore, location) {
|
|
8
|
+
constructor(dynamicDisplay, variableCommunicator, variableStore, location, signalRAppId) {
|
|
9
9
|
this.doBehavior = new EventEmitter();
|
|
10
10
|
if (dynamicDisplay.isHorizontalTranslation && dynamicDisplay.horizontalTranslation != null) {
|
|
11
11
|
// tslint:disable-next-line:max-line-length
|
|
12
|
-
const horizontalBehavior = new TranslationBehavior(dynamicDisplay.horizontalTranslation, variableCommunicator, variableStore, TranslationDirectionType.Horizontal, location);
|
|
12
|
+
const horizontalBehavior = new TranslationBehavior(dynamicDisplay.horizontalTranslation, variableCommunicator, variableStore, TranslationDirectionType.Horizontal, location, signalRAppId);
|
|
13
13
|
horizontalBehavior.doTranslation.subscribe(tanslation => {
|
|
14
14
|
// tslint:disable-next-line:max-line-length
|
|
15
15
|
const dynamicDisplayResult = new DynamicDisplayResultModel(tanslation, undefined, DynamicBehaviorType.HorizontalTranslation);
|
|
@@ -18,14 +18,14 @@ export class DynamicDisplay {
|
|
|
18
18
|
}
|
|
19
19
|
if (dynamicDisplay.isVerticalTranslation && dynamicDisplay.verticalTranslation != null) {
|
|
20
20
|
// tslint:disable-next-line:max-line-length
|
|
21
|
-
const verticalBehavior = new TranslationBehavior(dynamicDisplay.verticalTranslation, variableCommunicator, variableStore, TranslationDirectionType.Vertical, location);
|
|
21
|
+
const verticalBehavior = new TranslationBehavior(dynamicDisplay.verticalTranslation, variableCommunicator, variableStore, TranslationDirectionType.Vertical, location, signalRAppId);
|
|
22
22
|
verticalBehavior.doTranslation.subscribe(tanslation => {
|
|
23
23
|
const dynamicDisplayResult = new DynamicDisplayResultModel(tanslation, undefined, DynamicBehaviorType.VerticalTranslation);
|
|
24
24
|
this.doBehavior.emit(dynamicDisplayResult);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
if (dynamicDisplay.isRotation && dynamicDisplay.rotation != null) {
|
|
28
|
-
const rotationBehavior = new RotationBehavior(dynamicDisplay.rotation, variableCommunicator, variableStore);
|
|
28
|
+
const rotationBehavior = new RotationBehavior(dynamicDisplay.rotation, variableCommunicator, variableStore, signalRAppId);
|
|
29
29
|
rotationBehavior.doRotation.subscribe(angel => {
|
|
30
30
|
const dynamicDisplayResult = new DynamicDisplayResultModel(undefined, angel, DynamicBehaviorType.Rotation);
|
|
31
31
|
this.doBehavior.emit(dynamicDisplayResult);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"DynamicDisplay":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./dynamic-display-model","name":"DynamicDisplayModel","line":18,"character":32},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":18,"character":75},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":18,"character":112},{"__symbolic":"reference","module":"../point.model","name":"Point","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"DynamicDisplay":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./dynamic-display-model","name":"DynamicDisplayModel","line":18,"character":32},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":18,"character":75},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":18,"character":112},{"__symbolic":"reference","module":"../point.model","name":"Point","line":19,"character":18},{"__symbolic":"reference","name":"string"}]}]}}}}]
|
|
@@ -5,5 +5,5 @@ import { RotationModel } from './rotation-model';
|
|
|
5
5
|
import { VariableStore } from '../../../config';
|
|
6
6
|
export declare class RotationBehavior implements RotationBehaviorModel {
|
|
7
7
|
readonly doRotation: EventEmitter<number>;
|
|
8
|
-
constructor(rotationModel: RotationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore);
|
|
8
|
+
constructor(rotationModel: RotationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore, signalRAppId: string);
|
|
9
9
|
}
|
|
@@ -2,9 +2,9 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { RotationDirectionType } from './rotation-direction-type';
|
|
3
3
|
import { RotationObserver } from './rotation-observer';
|
|
4
4
|
export class RotationBehavior {
|
|
5
|
-
constructor(rotationModel, variableCommunicator, variableStore) {
|
|
5
|
+
constructor(rotationModel, variableCommunicator, variableStore, signalRAppId) {
|
|
6
6
|
this.doRotation = new EventEmitter();
|
|
7
|
-
const rotationObserver = new RotationObserver(rotationModel, variableCommunicator, variableStore);
|
|
7
|
+
const rotationObserver = new RotationObserver(rotationModel, variableCommunicator, variableStore, signalRAppId);
|
|
8
8
|
rotationObserver.rotationValueChanged.subscribe(rotationValue => {
|
|
9
9
|
if (+rotationModel.rotationDirection === RotationDirectionType.ClockWise) {
|
|
10
10
|
let newRotation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"RotationBehavior":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./rotation-model","name":"RotationModel","line":13,"character":31},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":13,"character":68},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":13,"character":105}]}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"RotationBehavior":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./rotation-model","name":"RotationModel","line":13,"character":31},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":13,"character":68},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":13,"character":105},{"__symbolic":"reference","name":"string"}]}]}}}}]
|
|
@@ -4,7 +4,8 @@ import { VariableCommunicator } from '../../../communication';
|
|
|
4
4
|
import { EventEmitter } from '@angular/core';
|
|
5
5
|
import { VariableStore } from '../../../config';
|
|
6
6
|
export declare class RotationObserver implements RotationObserverModel {
|
|
7
|
+
private readonly signalRAppId;
|
|
7
8
|
readonly rotationValueChanged: EventEmitter<number>;
|
|
8
9
|
private currentValue;
|
|
9
|
-
constructor(rotationModel: RotationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore);
|
|
10
|
+
constructor(rotationModel: RotationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore, signalRAppId: string);
|
|
10
11
|
}
|
|
@@ -3,7 +3,8 @@ import { EventEmitter } from '@angular/core';
|
|
|
3
3
|
import { VariableUtil } from '../../../utils/variable-util';
|
|
4
4
|
import { VariableDefinition } from '../../../communication/variable/variable-definition';
|
|
5
5
|
export class RotationObserver {
|
|
6
|
-
constructor(rotationModel, variableCommunicator, variableStore) {
|
|
6
|
+
constructor(rotationModel, variableCommunicator, variableStore, signalRAppId) {
|
|
7
|
+
this.signalRAppId = signalRAppId;
|
|
7
8
|
this.rotationValueChanged = new EventEmitter();
|
|
8
9
|
if (!rotationModel.variableName) {
|
|
9
10
|
return;
|
|
@@ -15,7 +16,7 @@ export class RotationObserver {
|
|
|
15
16
|
}
|
|
16
17
|
variableCommunicator.subscribeVariableState(variableName).subscribe(variableValue => {
|
|
17
18
|
if (variableValue.state === VariableStateEnum.Normal) {
|
|
18
|
-
variableCommunicator.openVariable(variableName).subscribe(value => {
|
|
19
|
+
variableCommunicator.openVariable(variableName, this.signalRAppId).subscribe(value => {
|
|
19
20
|
if (value.state === VariableStateEnum.DataNormal) {
|
|
20
21
|
this.currentValue = value;
|
|
21
22
|
this.rotationValueChanged.emit(this.currentValue.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"RotationObserver":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./rotation-model","name":"RotationModel","line":14,"character":31},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":14,"character":68},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":14,"character":105}]}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"RotationObserver":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./rotation-model","name":"RotationModel","line":14,"character":31},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":14,"character":68},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":14,"character":105},{"__symbolic":"reference","name":"string"}]}]}}}}]
|
|
@@ -7,6 +7,6 @@ import { Point } from '../point.model';
|
|
|
7
7
|
import { VariableStore } from '../../../config';
|
|
8
8
|
export declare class TranslationBehavior implements TranslationBehaviorModel {
|
|
9
9
|
readonly doTranslation: EventEmitter<number>;
|
|
10
|
-
constructor(translationModel: TranslationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore, translationDirection: TranslationDirectionType, location: Point);
|
|
10
|
+
constructor(translationModel: TranslationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore, translationDirection: TranslationDirectionType, location: Point, signalRAppId: string);
|
|
11
11
|
private getTranslationValue;
|
|
12
12
|
}
|
|
@@ -2,17 +2,17 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { TranslationObserver } from './translation-observer';
|
|
3
3
|
import { TranslationDirectionType } from './translation-direction-type';
|
|
4
4
|
export class TranslationBehavior {
|
|
5
|
-
constructor(translationModel, variableCommunicator, variableStore, translationDirection, location) {
|
|
5
|
+
constructor(translationModel, variableCommunicator, variableStore, translationDirection, location, signalRAppId) {
|
|
6
6
|
this.doTranslation = new EventEmitter();
|
|
7
7
|
if (translationDirection === TranslationDirectionType.Horizontal) {
|
|
8
|
-
const horizontalTranslation = new TranslationObserver(translationModel, variableCommunicator, variableStore);
|
|
8
|
+
const horizontalTranslation = new TranslationObserver(translationModel, variableCommunicator, variableStore, signalRAppId);
|
|
9
9
|
horizontalTranslation.translationValueChanged.subscribe(inputValue => {
|
|
10
10
|
const currentLocation = this.getTranslationValue(translationModel, (+inputValue), location.x);
|
|
11
11
|
this.doTranslation.emit(currentLocation);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
if (translationDirection === TranslationDirectionType.Vertical) {
|
|
15
|
-
const verticalTranslation = new TranslationObserver(translationModel, variableCommunicator, variableStore);
|
|
15
|
+
const verticalTranslation = new TranslationObserver(translationModel, variableCommunicator, variableStore, signalRAppId);
|
|
16
16
|
verticalTranslation.translationValueChanged.subscribe(inputValue => {
|
|
17
17
|
const currentLocation = this.getTranslationValue(translationModel, (+inputValue), location.y);
|
|
18
18
|
this.doTranslation.emit(currentLocation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TranslationBehavior":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./translation-model","name":"TranslationModel","line":13,"character":34},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":14,"character":30},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":15,"character":23},{"__symbolic":"reference","module":"./translation-direction-type","name":"TranslationDirectionType","line":16,"character":30},{"__symbolic":"reference","module":"../point.model","name":"Point","line":17,"character":18}]}],"getTranslationValue":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TranslationBehavior":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./translation-model","name":"TranslationModel","line":13,"character":34},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":14,"character":30},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":15,"character":23},{"__symbolic":"reference","module":"./translation-direction-type","name":"TranslationDirectionType","line":16,"character":30},{"__symbolic":"reference","module":"../point.model","name":"Point","line":17,"character":18},{"__symbolic":"reference","name":"string"}]}],"getTranslationValue":[{"__symbolic":"method"}]}}}}]
|
|
@@ -6,5 +6,5 @@ import { VariableStore } from '../../../config';
|
|
|
6
6
|
export declare class TranslationObserver implements TranslationObserverModel {
|
|
7
7
|
readonly translationValueChanged: EventEmitter<number>;
|
|
8
8
|
private currentValue;
|
|
9
|
-
constructor(model: TranslationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore);
|
|
9
|
+
constructor(model: TranslationModel, variableCommunicator: VariableCommunicator, variableStore: VariableStore, signalRAppId: string);
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ import { VariableStateEnum } from '../../../communication';
|
|
|
3
3
|
import { VariableUtil } from '../../../utils/variable-util';
|
|
4
4
|
import { VariableDefinition } from '../../../communication/variable/variable-definition';
|
|
5
5
|
export class TranslationObserver {
|
|
6
|
-
constructor(model, variableCommunicator, variableStore) {
|
|
6
|
+
constructor(model, variableCommunicator, variableStore, signalRAppId) {
|
|
7
7
|
this.translationValueChanged = new EventEmitter();
|
|
8
8
|
if (!model.variableName) {
|
|
9
9
|
return;
|
|
@@ -15,7 +15,7 @@ export class TranslationObserver {
|
|
|
15
15
|
}
|
|
16
16
|
variableCommunicator.subscribeVariableState(variableName).subscribe(variableValue => {
|
|
17
17
|
if (variableValue.state === VariableStateEnum.Normal) {
|
|
18
|
-
variableCommunicator.openVariable(variableName).subscribe(value => {
|
|
18
|
+
variableCommunicator.openVariable(variableName, signalRAppId).subscribe(value => {
|
|
19
19
|
if (value.state === VariableStateEnum.DataNormal) {
|
|
20
20
|
this.currentValue = value;
|
|
21
21
|
this.translationValueChanged.emit(this.currentValue.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TranslationObserver":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./translation-model","name":"TranslationModel","line":15,"character":23},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":15,"character":63},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":15,"character":100}]}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TranslationObserver":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./translation-model","name":"TranslationModel","line":15,"character":23},{"__symbolic":"reference","module":"../../../communication","name":"VariableCommunicator","line":15,"character":63},{"__symbolic":"reference","module":"../../../config","name":"VariableStore","line":15,"character":100},{"__symbolic":"reference","name":"string"}]}]}}}}]
|
|
@@ -3,4 +3,5 @@ export var BitSwitchOperation;
|
|
|
3
3
|
BitSwitchOperation[BitSwitchOperation["On"] = 0] = "On";
|
|
4
4
|
BitSwitchOperation[BitSwitchOperation["Off"] = 1] = "Off";
|
|
5
5
|
BitSwitchOperation[BitSwitchOperation["Inverse"] = 2] = "Inverse";
|
|
6
|
+
BitSwitchOperation[BitSwitchOperation["Restoration"] = 3] = "Restoration";
|
|
6
7
|
})(BitSwitchOperation || (BitSwitchOperation = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"BitSwitchOperation":{"On":0,"Off":1,"Inverse":2}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"BitSwitchOperation":{"On":0,"Off":1,"Inverse":2,"Restoration":3}}}]
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
6
6
|
private readonly remoteVariableProtocol;
|
|
7
7
|
private readonly logger;
|
|
8
8
|
private observers;
|
|
9
|
+
private appIdVariablesMap;
|
|
9
10
|
private connectedSubscription;
|
|
10
11
|
private variableValuesChangedSubscription;
|
|
11
12
|
private variablesToBeOpened;
|
|
@@ -16,14 +17,18 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
16
17
|
private variableStateCache;
|
|
17
18
|
private variableStatesToBeOpened;
|
|
18
19
|
private variableStatesToBeClosed;
|
|
20
|
+
private alarmObservers;
|
|
21
|
+
private alarmChangedSubscription;
|
|
19
22
|
constructor(remoteVariableProtocol: RemoteVariableProtocol, logger: LoggerService);
|
|
23
|
+
private doAlarmChanged;
|
|
20
24
|
private doVariableValuesChanged;
|
|
21
25
|
private doVariableStatesChanged;
|
|
22
26
|
subscribeVariableStates(variableNames: string[]): Observable<VariableState[]>;
|
|
23
27
|
subscribeVariableState(variableName: string): Observable<VariableState>;
|
|
24
|
-
openVariables(variableNames: string[]): Observable<VariableValue[]>;
|
|
25
|
-
openVariable(variableName: string): Observable<VariableValue>;
|
|
28
|
+
openVariables(variableNames: string[], appId?: string): Observable<VariableValue[]>;
|
|
29
|
+
openVariable(variableName: string, appId?: string): Observable<VariableValue>;
|
|
26
30
|
write(variableName: string, value: any): Observable<VariableValue>;
|
|
27
31
|
writeWordByBit(variableName: string, index: number, value: number): Observable<VariableValue>;
|
|
32
|
+
subscribeUserDeviceAlarms(appId?: string): Observable<any[]>;
|
|
28
33
|
dispose(): void;
|
|
29
34
|
}
|
|
@@ -7,8 +7,10 @@ export class RemoteVariableCommunicator {
|
|
|
7
7
|
this.remoteVariableProtocol = remoteVariableProtocol;
|
|
8
8
|
this.logger = logger;
|
|
9
9
|
this.observers = new Map();
|
|
10
|
+
this.appIdVariablesMap = new Map();
|
|
10
11
|
this.variableStateObservers = new Map();
|
|
11
12
|
this.variableStateCache = new Map();
|
|
13
|
+
this.alarmObservers = [];
|
|
12
14
|
this.variableValueCache = new StringifyingMap(k => JSON.stringify(k));
|
|
13
15
|
this.connectedSubscription = this.remoteVariableProtocol.connected.subscribe(() => {
|
|
14
16
|
const variableNamesToStart = [];
|
|
@@ -16,14 +18,23 @@ export class RemoteVariableCommunicator {
|
|
|
16
18
|
variableNamesToStart.push(variableName);
|
|
17
19
|
});
|
|
18
20
|
this.remoteVariableProtocol.subscribeVariableStates(variableNamesToStart);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
variablesToStart.push(variableName);
|
|
21
|
+
this.appIdVariablesMap.forEach((variableNames, appId) => {
|
|
22
|
+
this.remoteVariableProtocol.tryOpenVariables(variableNames, appId);
|
|
22
23
|
});
|
|
23
|
-
this.remoteVariableProtocol.tryOpenVariables(variablesToStart);
|
|
24
24
|
});
|
|
25
25
|
this.doVariableStatesChanged();
|
|
26
26
|
this.doVariableValuesChanged();
|
|
27
|
+
this.doAlarmChanged();
|
|
28
|
+
}
|
|
29
|
+
doAlarmChanged() {
|
|
30
|
+
if (this.alarmChangedSubscription !== undefined) {
|
|
31
|
+
this.alarmChangedSubscription.unsubscribe();
|
|
32
|
+
}
|
|
33
|
+
this.alarmChangedSubscription = this.remoteVariableProtocol.historyAlarmChanged.subscribe((alarmWithAppId) => {
|
|
34
|
+
each(this.alarmObservers, ob => {
|
|
35
|
+
ob.next(alarmWithAppId);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
27
38
|
}
|
|
28
39
|
doVariableValuesChanged() {
|
|
29
40
|
if (this.variableValuesChangedSubscription !== undefined) {
|
|
@@ -116,7 +127,7 @@ export class RemoteVariableCommunicator {
|
|
|
116
127
|
subscribeVariableState(variableName) {
|
|
117
128
|
return this.subscribeVariableStates([variableName]).pipe(map(values => values[0]));
|
|
118
129
|
}
|
|
119
|
-
openVariables(variableNames) {
|
|
130
|
+
openVariables(variableNames, appId = '') {
|
|
120
131
|
return new Observable(observer => {
|
|
121
132
|
let variablesToStart = [];
|
|
122
133
|
each(variableNames, variableName => {
|
|
@@ -131,6 +142,14 @@ export class RemoteVariableCommunicator {
|
|
|
131
142
|
}
|
|
132
143
|
}
|
|
133
144
|
this.observers.get(variableName).push(observer);
|
|
145
|
+
if (!this.appIdVariablesMap.get(appId)) {
|
|
146
|
+
this.appIdVariablesMap.set(appId, []);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
if (this.appIdVariablesMap.get(appId).indexOf(variableName) === -1) {
|
|
150
|
+
this.appIdVariablesMap.get(appId).push(variableName);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
134
153
|
}
|
|
135
154
|
});
|
|
136
155
|
variablesToStart = uniq(variablesToStart);
|
|
@@ -138,7 +157,7 @@ export class RemoteVariableCommunicator {
|
|
|
138
157
|
if (!this.variablesToBeOpened) {
|
|
139
158
|
this.variablesToBeOpened = [];
|
|
140
159
|
setTimeout(() => {
|
|
141
|
-
this.remoteVariableProtocol.tryOpenVariables(this.variablesToBeOpened);
|
|
160
|
+
this.remoteVariableProtocol.tryOpenVariables(this.variablesToBeOpened, appId);
|
|
142
161
|
delete this.variablesToBeOpened;
|
|
143
162
|
});
|
|
144
163
|
}
|
|
@@ -162,7 +181,7 @@ export class RemoteVariableCommunicator {
|
|
|
162
181
|
if (!this.variablesToBeClosed) {
|
|
163
182
|
this.variablesToBeClosed = [];
|
|
164
183
|
setTimeout(() => {
|
|
165
|
-
this.remoteVariableProtocol.tryStopVariables(this.variablesToBeClosed);
|
|
184
|
+
this.remoteVariableProtocol.tryStopVariables(this.variablesToBeClosed, appId);
|
|
166
185
|
delete this.variablesToBeClosed;
|
|
167
186
|
});
|
|
168
187
|
}
|
|
@@ -170,11 +189,11 @@ export class RemoteVariableCommunicator {
|
|
|
170
189
|
};
|
|
171
190
|
});
|
|
172
191
|
}
|
|
173
|
-
openVariable(variableName) {
|
|
192
|
+
openVariable(variableName, appId = '') {
|
|
174
193
|
if (!variableName) {
|
|
175
194
|
return;
|
|
176
195
|
}
|
|
177
|
-
return this.openVariables([variableName]).pipe(map(values => values[0]));
|
|
196
|
+
return this.openVariables([variableName], appId).pipe(map(values => values[0]));
|
|
178
197
|
}
|
|
179
198
|
write(variableName, value) {
|
|
180
199
|
if (!variableName) {
|
|
@@ -196,11 +215,21 @@ export class RemoteVariableCommunicator {
|
|
|
196
215
|
observer.next(new VariableValue(variable, VariableStateEnum.DataNormal, value))*/
|
|
197
216
|
});
|
|
198
217
|
}
|
|
218
|
+
subscribeUserDeviceAlarms(appId = '') {
|
|
219
|
+
return new Observable(observer => {
|
|
220
|
+
this.alarmObservers.push(observer);
|
|
221
|
+
this.remoteVariableProtocol.subscribeUserDeviceAlarms(appId);
|
|
222
|
+
return () => {
|
|
223
|
+
this.remoteVariableProtocol.unSubscribeUserDeviceAlarms(appId);
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
}
|
|
199
227
|
dispose() {
|
|
200
228
|
// TODO调用所有的ob.complete()。
|
|
201
229
|
this.connectedSubscription.unsubscribe();
|
|
202
230
|
this.variableStatesChangedSubscription.unsubscribe();
|
|
203
231
|
this.variableValuesChangedSubscription.unsubscribe();
|
|
232
|
+
this.alarmChangedSubscription.unsubscribe();
|
|
204
233
|
if (this.logger && this.logger.isDebugEnabled()) {
|
|
205
234
|
this.logger.debug('[VariableCommunicator] RemoteVariableCommunicator disposed.');
|
|
206
235
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"RemoteVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./remote-variable-protocol","name":"RemoteVariableProtocol","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"RemoteVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./remote-variable-protocol","name":"RemoteVariableProtocol","line":27,"character":57},{"__symbolic":"reference","module":"../../../logger","name":"LoggerService","line":27,"character":106}]}],"doAlarmChanged":[{"__symbolic":"method"}],"doVariableValuesChanged":[{"__symbolic":"method"}],"doVariableStatesChanged":[{"__symbolic":"method"}],"subscribeVariableStates":[{"__symbolic":"method"}],"subscribeVariableState":[{"__symbolic":"method"}],"openVariables":[{"__symbolic":"method"}],"openVariable":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"writeWordByBit":[{"__symbolic":"method"}],"subscribeUserDeviceAlarms":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
|
|
@@ -4,10 +4,13 @@ export interface RemoteVariableProtocol {
|
|
|
4
4
|
connected: Observable<void>;
|
|
5
5
|
variableStatesChanged: Observable<VariableValue[]>;
|
|
6
6
|
variableValuesChanged: Observable<VariableValue[]>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
historyAlarmChanged: Observable<any>;
|
|
8
|
+
tryOpenVariables(variableNames: string[], appId: string): Observable<void>;
|
|
9
|
+
tryStopVariables(variableNames: string[], appId: string): Observable<void>;
|
|
9
10
|
writeVariable(variableName: string, value: any): Observable<void>;
|
|
10
11
|
writeVariableWordByBit(variableName: string, index: number, value: number): Observable<void>;
|
|
11
12
|
subscribeVariableStates(variableNames: string[]): Observable<void>;
|
|
12
13
|
unsubscribeVariableStates(variableNames: string[]): Observable<void>;
|
|
14
|
+
subscribeUserDeviceAlarms(appId: string): any;
|
|
15
|
+
unSubscribeUserDeviceAlarms(appId: string): any;
|
|
13
16
|
}
|
package/service/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./weather.service","export":["WeatherService"]},{"from":"./permission-checker","export":["PermissionChecker"]},{"from":"./operation-record"},{"from":"./video"}]}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./weather.service","export":["WeatherService"]},{"from":"./permission-checker","export":["PermissionChecker"]},{"from":"./released-variable","export":["ReleasedVariableService"]},{"from":"./operation-record"},{"from":"./video"}]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReleasedVariableService } from './released-variable.service';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./released-variable.service","export":["ReleasedVariableService"]}]}]
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ReleasedVariableService":{"__symbolic":"interface"}}}]
|
package/shared/gui-consts.d.ts
CHANGED
package/shared/gui-consts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiConsts":{"__symbolic":"class","statics":{"components":{"imageKey":"Image","numericalDisplayKey":"NumericalDisplay","textKey":"Text","hyperlinkKey":"Hyperlink","meterKey":"Meter","pipeKey":"Pipe","switchIndicatorLightKey":"SwitchIndicatorLight","barGraphKey":"BarGraph","toggleViewKey":"ToggleView","characterKey":"Character","straightLineKey":"StraightLine","polyLineKey":"PolyLine","rectangleKey":"Rectangle","sectorkey":"Sector","ellipseKey":"Ellipse","datetimeDisplayKey":"DatetimeDisplay","historicalCurveKey":"HistoricalCurve","ringGraphKey":"RingGraph","viewOperationElement":"ViewOperation","polygonKey":"Polygon","videokey":"Video","tableKey":"Table","weatherKey":"Weather"}}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiConsts":{"__symbolic":"class","statics":{"components":{"imageKey":"Image","numericalDisplayKey":"NumericalDisplay","textKey":"Text","hyperlinkKey":"Hyperlink","meterKey":"Meter","pipeKey":"Pipe","switchIndicatorLightKey":"SwitchIndicatorLight","barGraphKey":"BarGraph","toggleViewKey":"ToggleView","characterKey":"Character","straightLineKey":"StraightLine","polyLineKey":"PolyLine","rectangleKey":"Rectangle","sectorkey":"Sector","ellipseKey":"Ellipse","datetimeDisplayKey":"DatetimeDisplay","historicalCurveKey":"HistoricalCurve","ringGraphKey":"RingGraph","viewOperationElement":"ViewOperation","polygonKey":"Polygon","videokey":"Video","tableKey":"Table","weatherKey":"Weather","airQualityKey":"AirQualityIndex","alarmKey":"Alarm"}}}}}]
|
|
@@ -12,10 +12,9 @@ export declare class DataTypeService {
|
|
|
12
12
|
isFloat(version: number, id: number): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* 获取数据型号最大长度
|
|
15
|
-
* @param
|
|
16
|
-
* @param id
|
|
15
|
+
* @param id fbox数据类型
|
|
17
16
|
*/
|
|
18
|
-
getValueMaxLength(version: number,
|
|
17
|
+
getValueMaxLength(version: number, dataType: number, fBoxDataType: number): number;
|
|
19
18
|
/**
|
|
20
19
|
* 是否支持小数位
|
|
21
20
|
* @param version
|
|
@@ -43,18 +42,16 @@ export declare class DataTypeService {
|
|
|
43
42
|
formatToDecimal(version: number, value: any, id: number): any;
|
|
44
43
|
/**
|
|
45
44
|
* 获取数据型号最小值
|
|
46
|
-
* @param version
|
|
47
45
|
* @param id
|
|
48
46
|
* @param? integerDigits
|
|
49
47
|
* @param? fractionDigits
|
|
50
48
|
*/
|
|
51
|
-
getMinValue(version: number,
|
|
49
|
+
getMinValue(version: number, dataType: number, fBoxDataType: number, integerDigits?: number, fractionDigits?: number): number;
|
|
52
50
|
/**
|
|
53
51
|
* 获取数据型号最大值
|
|
54
|
-
* @param version
|
|
55
52
|
* @param id
|
|
56
53
|
* @param? integerDigits
|
|
57
54
|
* @param? fractionDigits
|
|
58
55
|
*/
|
|
59
|
-
getMaxValue(version: number,
|
|
56
|
+
getMaxValue(version: number, dataType: number, fBoxDataType: number, integerDigits?: number, fractionDigits?: number): number;
|
|
60
57
|
}
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Injectable } from '@angular/core';
|
|
11
|
-
import { isNil } from 'lodash';
|
|
11
|
+
import { isNil, isNumber } from 'lodash';
|
|
12
12
|
import { FCloudDataTypeService } from './fcloud-data-type.service';
|
|
13
13
|
import { FBoxDataTypeService } from './fbox-data-type.service';
|
|
14
14
|
let DataTypeService = class DataTypeService {
|
|
@@ -54,14 +54,18 @@ let DataTypeService = class DataTypeService {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* 获取数据型号最大长度
|
|
57
|
-
* @param
|
|
58
|
-
* @param id
|
|
57
|
+
* @param id fbox数据类型
|
|
59
58
|
*/
|
|
60
|
-
getValueMaxLength(version,
|
|
61
|
-
if (
|
|
62
|
-
return this.
|
|
59
|
+
getValueMaxLength(version, dataType, fBoxDataType) {
|
|
60
|
+
if (isNumber(fBoxDataType)) {
|
|
61
|
+
return this.fboxDataTypeService.getValueMaxLength(fBoxDataType);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
if (!isNil(version) && version > 4) {
|
|
65
|
+
return this.fcloudDataTypeService.getValueMaxLength(dataType);
|
|
66
|
+
}
|
|
67
|
+
return this.fboxDataTypeService.getValueMaxLength(dataType);
|
|
63
68
|
}
|
|
64
|
-
return this.fboxDataTypeService.getValueMaxLength(id);
|
|
65
69
|
}
|
|
66
70
|
/**
|
|
67
71
|
* 是否支持小数位
|
|
@@ -110,29 +114,37 @@ let DataTypeService = class DataTypeService {
|
|
|
110
114
|
}
|
|
111
115
|
/**
|
|
112
116
|
* 获取数据型号最小值
|
|
113
|
-
* @param version
|
|
114
117
|
* @param id
|
|
115
118
|
* @param? integerDigits
|
|
116
119
|
* @param? fractionDigits
|
|
117
120
|
*/
|
|
118
|
-
getMinValue(version,
|
|
119
|
-
if (
|
|
120
|
-
return this.
|
|
121
|
+
getMinValue(version, dataType, fBoxDataType, integerDigits, fractionDigits) {
|
|
122
|
+
if (isNumber(fBoxDataType)) {
|
|
123
|
+
return this.fboxDataTypeService.getMinValue(fBoxDataType, integerDigits, fractionDigits);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
if (!isNil(version) && version > 4) {
|
|
127
|
+
return this.fcloudDataTypeService.getMinValue(dataType);
|
|
128
|
+
}
|
|
129
|
+
return this.fboxDataTypeService.getMinValue(dataType);
|
|
121
130
|
}
|
|
122
|
-
return this.fboxDataTypeService.getMinValue(id, integerDigits, fractionDigits);
|
|
123
131
|
}
|
|
124
132
|
/**
|
|
125
133
|
* 获取数据型号最大值
|
|
126
|
-
* @param version
|
|
127
134
|
* @param id
|
|
128
135
|
* @param? integerDigits
|
|
129
136
|
* @param? fractionDigits
|
|
130
137
|
*/
|
|
131
|
-
getMaxValue(version,
|
|
132
|
-
if (
|
|
133
|
-
return this.
|
|
138
|
+
getMaxValue(version, dataType, fBoxDataType, integerDigits, fractionDigits) {
|
|
139
|
+
if (isNumber(fBoxDataType)) {
|
|
140
|
+
return this.fboxDataTypeService.getMaxValue(fBoxDataType, integerDigits, fractionDigits);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
if (!isNil(version) && version > 4) {
|
|
144
|
+
return this.fcloudDataTypeService.getMaxValue(dataType);
|
|
145
|
+
}
|
|
146
|
+
return this.fboxDataTypeService.getMaxValue(dataType);
|
|
134
147
|
}
|
|
135
|
-
return this.fboxDataTypeService.getMaxValue(id, integerDigits, fractionDigits);
|
|
136
148
|
}
|
|
137
149
|
};
|
|
138
150
|
DataTypeService = __decorate([
|
|
@@ -44,9 +44,9 @@ let NumericalOperationService = class NumericalOperationService {
|
|
|
44
44
|
getNumericalOperations(model) {
|
|
45
45
|
const numericalOperation = {};
|
|
46
46
|
numericalOperation.numericalUpperLimit = (model.numericalUpperLimit || model.numericalUpperLimit === 0) ? +model.numericalUpperLimit
|
|
47
|
-
: this.dataTypeService.getMaxValue(model.version, model.dataType, model.integerDigits, model.fractionDigits);
|
|
47
|
+
: this.dataTypeService.getMaxValue(model.version, model.dataType, model.fBoxDataType, model.integerDigits, model.fractionDigits);
|
|
48
48
|
numericalOperation.numericalLowerLimit = (model.numericalLowerLimit || model.numericalLowerLimit === 0) ? +model.numericalLowerLimit
|
|
49
|
-
: this.dataTypeService.getMinValue(model.version, model.dataType, model.integerDigits, model.fractionDigits);
|
|
49
|
+
: this.dataTypeService.getMinValue(model.version, model.dataType, model.fBoxDataType, model.integerDigits, model.fractionDigits);
|
|
50
50
|
numericalOperation.enableNumericalOperation = model.enableNumericalOperation;
|
|
51
51
|
if (model.enableNumericalOperation) {
|
|
52
52
|
numericalOperation.type = model.numericalOperationSetting.type;
|