@flexem/fc-gui 3.0.0-alpha.9 → 3.0.0-alpha.90
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 +381 -0
- package/bundles/@flexem/fc-gui.umd.js +17578 -16210
- 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 +1 -0
- 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 +44 -0
- package/elements/alarm/alarm-element.js +382 -0
- package/elements/alarm/alarm-element.metadata.json +1 -0
- package/elements/bar-graph-element.d.ts +7 -1
- package/elements/bar-graph-element.js +70 -4
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/base/readable-element.d.ts +6 -1
- package/elements/base/readable-element.js +31 -2
- package/elements/base/readable-element.metadata.json +1 -1
- package/elements/historical-curve/historical-curve.element.js +116 -13
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.js +25 -4
- package/elements/main-element.metadata.json +1 -1
- package/elements/meter-element.d.ts +7 -1
- package/elements/meter-element.js +76 -7
- 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 +55 -11
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/per-view-variable-communicator.d.ts +2 -0
- package/elements/per-view-variable-communicator.js +8 -0
- package/elements/per-view-variable-communicator.metadata.json +1 -1
- package/elements/ring-graph/ring-graph-element.d.ts +10 -1
- package/elements/ring-graph/ring-graph-element.js +106 -3
- 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/switch-indicator-light/bit-switch-operator.d.ts +1 -0
- package/elements/switch-indicator-light/bit-switch-operator.js +19 -0
- package/elements/switch-indicator-light/bit-switch-operator.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +8 -0
- package/elements/switch-indicator-light/switch-indicator-light-element.js +93 -23
- 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-switch-operator.d.ts +1 -0
- package/elements/switch-indicator-light/word-switch-operator.js +6 -0
- package/elements/switch-indicator-light/word-switch-operator.metadata.json +1 -1
- package/elements/video/video-element.d.ts +4 -0
- package/elements/video/video-element.js +69 -20
- package/elements/video/video-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.js +8 -0
- package/elements/weather/weater-element.js +0 -1
- package/gui/gui-context.d.ts +2 -1
- package/gui/gui-host.d.ts +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 +9 -4
- 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 +10 -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/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 +4 -0
- package/remote/communication/variable/remote-variable-communicator.js +23 -1
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/remote/communication/variable/remote-variable-protocol.d.ts +3 -0
- 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/data-type/fbox-data-type.service.js +40 -0
- package/utils/numerical-operation.service.js +2 -2
|
@@ -11,23 +11,21 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { Component, Inject, Output } from '@angular/core';
|
|
14
|
-
import { Subject } from 'rxjs';
|
|
15
14
|
import { LOCALIZATION } from '../../localization';
|
|
16
15
|
import { DataTypeService } from '../../utils/data-type/data-type.service';
|
|
17
16
|
import { FractionDigitService } from '../../utils/fraction-digit.service';
|
|
18
17
|
import { NumericalOperationService } from '../../utils/numerical-operation.service';
|
|
19
18
|
import { isNil } from 'lodash';
|
|
19
|
+
import { BsModalRef } from 'ngx-bootstrap/modal';
|
|
20
20
|
let WriteValueModalComponent = class WriteValueModalComponent {
|
|
21
|
-
constructor(localization, dataTypeService, fractionDigitService, numericalOperationService) {
|
|
21
|
+
constructor(localization, dataTypeService, fractionDigitService, numericalOperationService, bsModalRef) {
|
|
22
22
|
this.localization = localization;
|
|
23
23
|
this.dataTypeService = dataTypeService;
|
|
24
24
|
this.fractionDigitService = fractionDigitService;
|
|
25
25
|
this.numericalOperationService = numericalOperationService;
|
|
26
|
-
this.
|
|
26
|
+
this.bsModalRef = bsModalRef;
|
|
27
27
|
this.writeValueRangeText = '';
|
|
28
|
-
|
|
29
|
-
get onClosed() {
|
|
30
|
-
return this._onClosed;
|
|
28
|
+
this.isSubmitting = false;
|
|
31
29
|
}
|
|
32
30
|
get invalidErrorText() {
|
|
33
31
|
return this.localization.loadFailed;
|
|
@@ -39,6 +37,7 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
39
37
|
initData(option) {
|
|
40
38
|
this.variableName = option.variableName;
|
|
41
39
|
this.dataType = option.dataType;
|
|
40
|
+
this.fBoxDataType = option.fBoxDataType;
|
|
42
41
|
this.integerDigits = option.integerDigits ? option.integerDigits : 0;
|
|
43
42
|
this.fractionDigits = option.fractionDigits ? option.fractionDigits : 0;
|
|
44
43
|
this.valueType = this.dataTypeService.getValueType(option.version, option.dataType);
|
|
@@ -51,21 +50,21 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
51
50
|
this.setValueRangeAccordToDataParsed(option);
|
|
52
51
|
}
|
|
53
52
|
else {
|
|
54
|
-
this.writeMaxValue = this.dataTypeService.getMaxValue(option.version, this.dataType);
|
|
55
|
-
this.writeMinValue = this.dataTypeService.getMinValue(option.version, this.dataType);
|
|
53
|
+
this.writeMaxValue = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
|
|
54
|
+
this.writeMinValue = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
|
|
56
55
|
}
|
|
57
56
|
this.writeValueRangeText = this.getWriteValueRangeText();
|
|
58
57
|
}
|
|
59
58
|
setValueRangeAccordToDataParsed(option) {
|
|
60
59
|
if (this.dataTypeService.isFloat(option.version, this.dataType) || this.enableNumericalOperation) {
|
|
61
|
-
this.maxValueLimit = this.dataTypeService.getMaxValue(option.version, this.dataType);
|
|
62
|
-
this.minValueLimit = this.dataTypeService.getMinValue(option.version, this.dataType);
|
|
60
|
+
this.maxValueLimit = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
|
|
61
|
+
this.minValueLimit = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
|
|
63
62
|
this.numericalLowerLimit = this.numericalOperation.numericalLowerLimit;
|
|
64
63
|
this.numericalUpperLimit = this.numericalOperation.numericalUpperLimit;
|
|
65
64
|
}
|
|
66
65
|
else {
|
|
67
|
-
this.maxValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMaxValue(option.version, this.dataType), -this.fractionDigits);
|
|
68
|
-
this.minValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMinValue(option.version, this.dataType), -this.fractionDigits);
|
|
66
|
+
this.maxValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
|
|
67
|
+
this.minValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
|
|
69
68
|
this.numericalLowerLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalLowerLimit, -this.fractionDigits);
|
|
70
69
|
this.numericalUpperLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalUpperLimit, -this.fractionDigits);
|
|
71
70
|
}
|
|
@@ -100,21 +99,38 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
100
99
|
return minValue + '~' + maxValue;
|
|
101
100
|
}
|
|
102
101
|
save() {
|
|
102
|
+
this.isSubmitting = true;
|
|
103
|
+
let value = this.value;
|
|
104
|
+
const showValue = this.value;
|
|
103
105
|
if (this.args.enableDataParsed) {
|
|
104
106
|
if (this.enableNumericalOperation) {
|
|
105
|
-
|
|
107
|
+
value = this.numericalOperationService.getWriteValue(this.args.version, this.value, this.numericalOperation, this.dataType, this.fractionDigits);
|
|
106
108
|
}
|
|
107
109
|
else {
|
|
108
|
-
|
|
110
|
+
value = this.formatWriteValue();
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
|
-
this.
|
|
113
|
+
this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
|
|
114
|
+
const valueTransform = JSON.parse(result.valueTransform);
|
|
115
|
+
if (valueTransform.Type !== 0) {
|
|
116
|
+
this.isNumericalOperation = true;
|
|
117
|
+
}
|
|
118
|
+
this.onClosed({
|
|
119
|
+
value, showValue,
|
|
120
|
+
enableNumericalOperation: this.enableNumericalOperation,
|
|
121
|
+
isNumericalOperation: this.isNumericalOperation,
|
|
122
|
+
variableRwType: result.variableRwType
|
|
123
|
+
});
|
|
124
|
+
});
|
|
112
125
|
}
|
|
113
|
-
close(
|
|
114
|
-
this.
|
|
115
|
-
this._onClosed.complete();
|
|
126
|
+
close() {
|
|
127
|
+
this.bsModalRef.hide();
|
|
116
128
|
}
|
|
117
|
-
validate() {
|
|
129
|
+
validate(event = null) {
|
|
130
|
+
if (event && event.keyCode === 13 && !this.validationError) {
|
|
131
|
+
this.save();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
118
134
|
// 校验数值必填
|
|
119
135
|
if (null == this.value || '' === this.value.trim()) {
|
|
120
136
|
return this.showValidationErrorInfo(this.localization.numericalValueRequired);
|
|
@@ -136,7 +152,7 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
136
152
|
}
|
|
137
153
|
if (this.dataTypeService.isBinaryType(this.args.version, this.dataType) || this.dataTypeService.isHexType(this.args.version, this.dataType)) {
|
|
138
154
|
// 校验数值最大长度
|
|
139
|
-
const valueMaxLength = this.dataTypeService.getValueMaxLength(this.args.version, this.dataType);
|
|
155
|
+
const valueMaxLength = this.dataTypeService.getValueMaxLength(this.args.version, this.dataType, this.fBoxDataType);
|
|
140
156
|
const maxLength = this.integerDigits ? Math.min(this.integerDigits, valueMaxLength) : valueMaxLength;
|
|
141
157
|
if (this.value.length > maxLength) {
|
|
142
158
|
return this.showValidationErrorInfo(this.localization.numericalValueTooLong);
|
|
@@ -192,12 +208,13 @@ __decorate([
|
|
|
192
208
|
WriteValueModalComponent = __decorate([
|
|
193
209
|
Component({
|
|
194
210
|
selector: 'writeValueModal',
|
|
195
|
-
template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}
|
|
211
|
+
template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
|
|
196
212
|
styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
|
|
197
213
|
}),
|
|
198
214
|
__param(0, Inject(LOCALIZATION)),
|
|
199
215
|
__metadata("design:paramtypes", [Object, DataTypeService,
|
|
200
216
|
FractionDigitService,
|
|
201
|
-
NumericalOperationService
|
|
217
|
+
NumericalOperationService,
|
|
218
|
+
BsModalRef])
|
|
202
219
|
], WriteValueModalComponent);
|
|
203
220
|
export { WriteValueModalComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"writeValueModal","template":"<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ","styles":[".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]}]}],"members":{"invalidErrorText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","module":"../../localization","name":"Localization","line":50,"character":51},{"__symbolic":"reference","module":"../../utils/data-type/data-type.service","name":"DataTypeService","line":51,"character":42},{"__symbolic":"reference","module":"../../utils/fraction-digit.service","name":"FractionDigitService","line":52,"character":47},{"__symbolic":"reference","module":"../../utils/numerical-operation.service","name":"NumericalOperationService","line":53,"character":52},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalRef","line":54,"character":37}]}],"ngOnInit":[{"__symbolic":"method"}],"initData":[{"__symbolic":"method"}],"setValueRangeAccordToDataParsed":[{"__symbolic":"method"}],"getWriteValueRangeText":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"showValidationErrorInfo":[{"__symbolic":"method"}],"hideValidationErrorInfo":[{"__symbolic":"method"}],"getFractionDigits":[{"__symbolic":"method"}],"formatWriteValue":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as moment from 'moment';
|
|
2
|
+
export declare class AirQualityInfo {
|
|
3
|
+
/** 有无地址 */
|
|
4
|
+
hasAddress: boolean | undefined;
|
|
5
|
+
/** 是否获取地址中 */
|
|
6
|
+
gettingAddress: boolean | undefined;
|
|
7
|
+
/** 是否支持 */
|
|
8
|
+
supported: boolean | undefined;
|
|
9
|
+
airQuality: AirQuality | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare class AirQuality {
|
|
12
|
+
city: string | undefined;
|
|
13
|
+
aqi: string | undefined;
|
|
14
|
+
level: number | undefined;
|
|
15
|
+
category: string | undefined;
|
|
16
|
+
pm10: string | undefined;
|
|
17
|
+
pm25: string | undefined;
|
|
18
|
+
no2: string | undefined;
|
|
19
|
+
so2: string | undefined;
|
|
20
|
+
co: string | undefined;
|
|
21
|
+
o3: string | undefined;
|
|
22
|
+
reportTime: moment.Moment | undefined;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AirQualityInfo":{"__symbolic":"class"},"AirQuality":{"__symbolic":"class"}}}]
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AirQualityModel":{"__symbolic":"interface"}}}]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConditionalDisplayModel } from '../base/conditional-display-model';
|
|
2
|
+
import { Point, Size } from '../shared';
|
|
3
|
+
export interface AlarmModel extends ConditionalDisplayModel {
|
|
4
|
+
readonly version: number;
|
|
5
|
+
readonly size: Size;
|
|
6
|
+
readonly location: Point;
|
|
7
|
+
readonly generalSetting?: any;
|
|
8
|
+
readonly filterSetting?: any;
|
|
9
|
+
readonly widths: number[];
|
|
10
|
+
readonly heights: number[];
|
|
11
|
+
readonly columLabels: string[];
|
|
12
|
+
readonly levelText: string[];
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AlarmModel":{"__symbolic":"interface"}}}]
|
|
@@ -19,4 +19,8 @@ export interface BarGraph extends ReadableModel {
|
|
|
19
19
|
readonly upperLimitColor?: string;
|
|
20
20
|
readonly lowerLimitColor?: string;
|
|
21
21
|
readonly percentageFont?: FontStyleData;
|
|
22
|
+
readonly masterDivisionNumber: number;
|
|
23
|
+
readonly subDivisionNumber: number;
|
|
24
|
+
readonly integerDigits: number;
|
|
25
|
+
readonly fractionDigits: number;
|
|
22
26
|
}
|
|
@@ -7,4 +7,8 @@ export interface ReadableModel extends ConditionalEnableModel {
|
|
|
7
7
|
readonly version?: number;
|
|
8
8
|
readonly variableName?: string;
|
|
9
9
|
readonly readVariable?: VariableDefinition;
|
|
10
|
+
readonly minVariable?: any;
|
|
11
|
+
readonly maxVariable?: any;
|
|
12
|
+
readonly minValueType?: any;
|
|
13
|
+
readonly maxValueType?: any;
|
|
10
14
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { Font } from '../shared/text/font';
|
|
2
2
|
export interface HistoricalCurveAxisSettings {
|
|
3
|
+
readonly yAxisRangeType: AxisRangeType;
|
|
4
|
+
readonly yAxisMax?: number;
|
|
5
|
+
readonly yAxisMin?: number;
|
|
3
6
|
readonly axisColor: string;
|
|
4
7
|
readonly showAxisLabel: boolean;
|
|
5
8
|
readonly axisLabelFont: Font;
|
|
9
|
+
readonly showTick?: boolean;
|
|
10
|
+
readonly xAxisTickColor?: string;
|
|
11
|
+
readonly yAxisTickColor?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare enum AxisRangeType {
|
|
14
|
+
Auto = 0,
|
|
15
|
+
Custom = 1
|
|
6
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveAxisSettings":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveAxisSettings":{"__symbolic":"interface"},"AxisRangeType":{"Auto":0,"Custom":1}}}]
|
package/model/meter/meter.d.ts
CHANGED
|
@@ -10,4 +10,8 @@ export interface Meter extends ReadableModel {
|
|
|
10
10
|
readonly radius: number;
|
|
11
11
|
readonly min: number;
|
|
12
12
|
readonly max: number;
|
|
13
|
+
readonly masterDivisionNumber: number;
|
|
14
|
+
readonly subDivisionNumber: number;
|
|
15
|
+
readonly integerDigits: number;
|
|
16
|
+
readonly fractionDigits: number;
|
|
13
17
|
}
|
|
@@ -12,6 +12,7 @@ export interface NumericalDisplay extends ReadableModel, SecurityModel {
|
|
|
12
12
|
readonly textAlign: string;
|
|
13
13
|
readonly accessPermission: any;
|
|
14
14
|
dataType: number;
|
|
15
|
+
fBoxDataType: number;
|
|
15
16
|
readonly integerDigits: number;
|
|
16
17
|
readonly fractionDigits: number;
|
|
17
18
|
readonly enableNumericalOperation: boolean;
|
|
@@ -22,4 +22,12 @@ export interface RingGraphModel extends ConditionalDisplayModel {
|
|
|
22
22
|
readonly alarmRange?: AlarmRangeModel;
|
|
23
23
|
readonly showPercentage: boolean;
|
|
24
24
|
readonly percentageFont?: Font;
|
|
25
|
+
readonly minVariable?: any;
|
|
26
|
+
readonly maxVariable?: any;
|
|
27
|
+
readonly minValueType?: any;
|
|
28
|
+
readonly maxValueType?: any;
|
|
29
|
+
readonly masterDivisionNumber: number;
|
|
30
|
+
readonly subDivisionNumber: number;
|
|
31
|
+
readonly integerDigits: number;
|
|
32
|
+
readonly fractionDigits: number;
|
|
25
33
|
}
|
|
@@ -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
|
@@ -17,7 +17,10 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
17
17
|
private variableStateCache;
|
|
18
18
|
private variableStatesToBeOpened;
|
|
19
19
|
private variableStatesToBeClosed;
|
|
20
|
+
private alarmObservers;
|
|
21
|
+
private alarmChangedSubscription;
|
|
20
22
|
constructor(remoteVariableProtocol: RemoteVariableProtocol, logger: LoggerService);
|
|
23
|
+
private doAlarmChanged;
|
|
21
24
|
private doVariableValuesChanged;
|
|
22
25
|
private doVariableStatesChanged;
|
|
23
26
|
subscribeVariableStates(variableNames: string[]): Observable<VariableState[]>;
|
|
@@ -26,5 +29,6 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
26
29
|
openVariable(variableName: string, appId?: string): Observable<VariableValue>;
|
|
27
30
|
write(variableName: string, value: any): Observable<VariableValue>;
|
|
28
31
|
writeWordByBit(variableName: string, index: number, value: number): Observable<VariableValue>;
|
|
32
|
+
subscribeUserDeviceAlarms(appId?: string): Observable<any[]>;
|
|
29
33
|
dispose(): void;
|
|
30
34
|
}
|
|
@@ -10,6 +10,7 @@ export class RemoteVariableCommunicator {
|
|
|
10
10
|
this.appIdVariablesMap = new Map();
|
|
11
11
|
this.variableStateObservers = new Map();
|
|
12
12
|
this.variableStateCache = new Map();
|
|
13
|
+
this.alarmObservers = [];
|
|
13
14
|
this.variableValueCache = new StringifyingMap(k => JSON.stringify(k));
|
|
14
15
|
this.connectedSubscription = this.remoteVariableProtocol.connected.subscribe(() => {
|
|
15
16
|
const variableNamesToStart = [];
|
|
@@ -23,6 +24,17 @@ export class RemoteVariableCommunicator {
|
|
|
23
24
|
});
|
|
24
25
|
this.doVariableStatesChanged();
|
|
25
26
|
this.doVariableValuesChanged();
|
|
27
|
+
this.doAlarmChanged();
|
|
28
|
+
}
|
|
29
|
+
doAlarmChanged() {
|
|
30
|
+
if (this.alarmChangedSubscription !== undefined) {
|
|
31
|
+
this.alarmChangedSubscription.unsubscribe();
|
|
32
|
+
}
|
|
33
|
+
this.alarmChangedSubscription = this.remoteVariableProtocol.virtualDeviceAlarmsChanged.subscribe((alarms) => {
|
|
34
|
+
each(this.alarmObservers, ob => {
|
|
35
|
+
ob.next(alarms);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
26
38
|
}
|
|
27
39
|
doVariableValuesChanged() {
|
|
28
40
|
if (this.variableValuesChangedSubscription !== undefined) {
|
|
@@ -135,7 +147,7 @@ export class RemoteVariableCommunicator {
|
|
|
135
147
|
}
|
|
136
148
|
else {
|
|
137
149
|
if (this.appIdVariablesMap.get(appId).indexOf(variableName) === -1) {
|
|
138
|
-
this.appIdVariablesMap.get(appId).push();
|
|
150
|
+
this.appIdVariablesMap.get(appId).push(variableName);
|
|
139
151
|
}
|
|
140
152
|
}
|
|
141
153
|
}
|
|
@@ -203,11 +215,21 @@ export class RemoteVariableCommunicator {
|
|
|
203
215
|
observer.next(new VariableValue(variable, VariableStateEnum.DataNormal, value))*/
|
|
204
216
|
});
|
|
205
217
|
}
|
|
218
|
+
subscribeUserDeviceAlarms(appId = '') {
|
|
219
|
+
return new Observable(observer => {
|
|
220
|
+
this.alarmObservers.push(observer);
|
|
221
|
+
this.remoteVariableProtocol.subscribeVirtualDeviceAlarms(appId);
|
|
222
|
+
return () => {
|
|
223
|
+
this.remoteVariableProtocol.unsubscribeVirtualDeviceAlarms(appId);
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
}
|
|
206
227
|
dispose() {
|
|
207
228
|
// TODO调用所有的ob.complete()。
|
|
208
229
|
this.connectedSubscription.unsubscribe();
|
|
209
230
|
this.variableStatesChangedSubscription.unsubscribe();
|
|
210
231
|
this.variableValuesChangedSubscription.unsubscribe();
|
|
232
|
+
this.alarmChangedSubscription.unsubscribe();
|
|
211
233
|
if (this.logger && this.logger.isDebugEnabled()) {
|
|
212
234
|
this.logger.debug('[VariableCommunicator] RemoteVariableCommunicator disposed.');
|
|
213
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
|
+
virtualDeviceAlarmsChanged: Observable<any>;
|
|
7
8
|
tryOpenVariables(variableNames: string[], appId: string): Observable<void>;
|
|
8
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
|
+
subscribeVirtualDeviceAlarms(appId: string): any;
|
|
15
|
+
unsubscribeVirtualDeviceAlarms(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
|
}
|