@flexem/fc-gui 3.0.0-alpha.13 → 3.0.0-alpha.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +439 -1
- package/assets/img/black_first_page.png +0 -0
- package/assets/img/black_last_page.png +0 -0
- package/assets/img/black_next_page.png +0 -0
- package/assets/img/black_previous_page.png +0 -0
- package/bundles/@flexem/fc-gui.umd.js +23330 -19502
- 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 +4 -0
- package/communication/variable/variable-value.d.ts +4 -1
- package/communication/variable/variable-value.js +4 -1
- package/communication/variable/variable-value.metadata.json +1 -1
- 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 +12 -0
- package/config/alarm/get-alarms-args.js +13 -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/history-data/get-history-data-args.d.ts +14 -3
- package/config/history-data/get-history-data-args.js +5 -3
- package/config/history-data/get-history-data-args.metadata.json +1 -1
- package/config/history-data/history-data.model.d.ts +7 -1
- package/config/history-data/history-data.model.js +9 -1
- package/config/history-data/history-data.model.metadata.json +1 -1
- package/config/history-data/index.d.ts +1 -1
- package/config/history-data/index.js +1 -1
- package/config/history-data/index.metadata.json +1 -1
- 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 +69 -0
- package/elements/alarm/alarm-element.js +497 -0
- package/elements/alarm/alarm-element.metadata.json +1 -0
- package/elements/bar-graph-element.d.ts +10 -2
- package/elements/bar-graph-element.js +135 -5
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/base/readable-element.d.ts +6 -1
- package/elements/base/readable-element.js +64 -2
- package/elements/base/readable-element.metadata.json +1 -1
- package/elements/base/state-control-element.d.ts +3 -1
- package/elements/base/state-control-element.js +3 -0
- package/elements/datetime-display/datetime-display-element.d.ts +1 -0
- package/elements/datetime-display/datetime-display-element.js +10 -2
- package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
- package/elements/datetime-display/time-zone-select-json.d.ts +8 -0
- package/elements/datetime-display/time-zone-select-json.js +558 -0
- package/elements/historical-curve/historical-curve.element.d.ts +39 -3
- package/elements/historical-curve/historical-curve.element.js +499 -39
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.d.ts +1 -0
- package/elements/main-element.js +59 -9
- 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 +16 -3
- package/elements/numerical-display/numerical-display-element.js +83 -11
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/per-view-variable-communicator.d.ts +3 -0
- package/elements/per-view-variable-communicator.js +11 -0
- package/elements/per-view-variable-communicator.metadata.json +1 -1
- package/elements/ring-graph/ring-graph-element.d.ts +13 -1
- package/elements/ring-graph/ring-graph-element.js +164 -3
- package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +54 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +517 -0
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
- package/elements/shared/graph/graph-state-element.js +0 -3
- package/elements/shared/text/text-element.d.ts +9 -0
- package/elements/shared/text/text-element.js +33 -2
- package/elements/shared/text/text-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +25 -2
- package/elements/shared/text/text-state-element.js +138 -63
- package/elements/shared/text/text-state-element.metadata.json +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +24 -2
- package/elements/static-elements/hyperlink-element.js +101 -3
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +23 -2
- package/elements/static-elements/text-element.js +96 -3
- package/elements/static-elements/text-element.metadata.json +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 +18 -2
- package/elements/switch-indicator-light/switch-indicator-light-element.js +120 -25
- 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 +81 -21
- package/elements/video/video-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +23 -2
- package/elements/view-operation/view-operation.element.js +103 -1
- package/elements/view-operation/view-operation.element.metadata.json +1 -1
- package/elements/weather/weater-element.js +0 -1
- package/gui/gui-context.d.ts +12 -2
- package/gui/gui-host.d.ts +1 -1
- package/gui/gui-view.d.ts +2 -0
- package/gui/gui-view.js +38 -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 +10 -3
- 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 +5 -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 +12 -7
- package/modal/write-value/write-value-modal.component.html +9 -4
- package/modal/write-value/write-value-modal.component.js +73 -15
- 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/font-setting-model.d.ts +6 -0
- package/model/base/font-setting-model.metadata.json +1 -1
- package/model/base/readable-model.d.ts +4 -0
- package/model/datetime-display/datetime-display.d.ts +1 -0
- package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -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/historical-curve/historical-curve-chanel.model.d.ts +8 -0
- package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
- package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
- package/model/meter/meter.d.ts +4 -0
- package/model/ring-graph/ring-graph.model.d.ts +8 -0
- package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
- package/model/scroll-alarm/scroll-alarm.model.js +0 -0
- package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -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/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
- package/model/view-operation/view-operation-element.model.d.ts +7 -1
- package/package.json +1 -1
- package/public_api.js +1 -0
- package/remote/communication/variable/remote-variable-communicator.d.ts +22 -0
- package/remote/communication/variable/remote-variable-communicator.js +122 -2
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/remote/communication/variable/remote-variable-protocol.d.ts +5 -0
- package/service/index.d.ts +4 -0
- package/service/index.js +1 -0
- package/service/index.metadata.json +1 -1
- package/service/language.service.d.ts +37 -0
- package/service/language.service.js +0 -0
- package/service/language.service.metadata.json +1 -0
- 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/system-text-library.service.d.ts +76 -0
- package/service/system-text-library.service.js +28 -0
- package/service/system-text-library.service.metadata.json +1 -0
- package/service/text-library.service.d.ts +49 -0
- package/service/text-library.service.js +0 -0
- package/service/text-library.service.metadata.json +1 -0
- package/service/weather.service.d.ts +1 -0
- package/shared/gui-consts.d.ts +3 -0
- package/shared/gui-consts.js +3 -0
- package/shared/gui-consts.metadata.json +1 -1
- package/utils/data-type/fbox-data-type.service.js +40 -0
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
</button>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="modal-body">
|
|
12
|
-
<span class="write-value-range">{{localization.writeValueRange}}
|
|
12
|
+
<span class="write-value-range">{{localization.writeValueRange}}:</span>
|
|
13
|
+
<div class="write-value-range">
|
|
14
|
+
{{writeValueRangeText}}
|
|
13
15
|
<span *ngIf="valueType">({{valueType}})</span>
|
|
14
|
-
</
|
|
15
|
-
<input type="text" name="valueInput" autoFocus class="form-control write-value" [(ngModel)]="value" (keyup)="validate()" autocomplete="off">
|
|
16
|
+
</div>
|
|
17
|
+
<input type="text" name="valueInput" autoFocus class="form-control write-value" [(ngModel)]="value" (keyup)="validate($event)" autocomplete="off">
|
|
16
18
|
<span class="help-block text-danger" [hidden]="!validationError">{{validationErrorText}}</span>
|
|
17
19
|
</div>
|
|
18
20
|
<div class="modal-footer">
|
|
19
|
-
<button type="submit" class="btn md-skip btn-primary btn-block" [disabled]="validationError">
|
|
21
|
+
<button type="submit" class="btn md-skip btn-primary btn-block" [disabled]="validationError || isSubmitting">
|
|
22
|
+
<ng-container *ngIf="!isSubmitting">{{localization.submit}}</ng-container>
|
|
23
|
+
<ng-container *ngIf="isSubmitting">{{localization.submitting}}</ng-container>
|
|
24
|
+
</button>
|
|
20
25
|
</div>
|
|
21
26
|
</form>
|
|
@@ -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;
|
|
@@ -101,21 +99,80 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
101
99
|
return minValue + '~' + maxValue;
|
|
102
100
|
}
|
|
103
101
|
save() {
|
|
102
|
+
this.isSubmitting = true;
|
|
103
|
+
let value = this.value;
|
|
104
|
+
const showValue = this.value;
|
|
104
105
|
if (this.args.enableDataParsed) {
|
|
105
106
|
if (this.enableNumericalOperation) {
|
|
106
|
-
|
|
107
|
+
value = this.numericalOperationService.getWriteValue(this.args.version, this.value, this.numericalOperation, this.dataType, this.fractionDigits);
|
|
107
108
|
}
|
|
108
109
|
else {
|
|
109
|
-
|
|
110
|
+
value = this.formatWriteValue();
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
+
// 处理系统变量"当前语种ID"
|
|
114
|
+
if (this.variableName === '当前语种ID') {
|
|
115
|
+
this.handleCurrentLanguageIdSave(value);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (!this.args.releasedVariableService) {
|
|
119
|
+
this.onClosed({
|
|
120
|
+
value: value,
|
|
121
|
+
showValue: showValue,
|
|
122
|
+
enableNumericalOperation: false,
|
|
123
|
+
isNumericalOperation: this.isNumericalOperation,
|
|
124
|
+
variableRwType: 6
|
|
125
|
+
});
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
|
|
129
|
+
const valueTransform = JSON.parse(result.valueTransform);
|
|
130
|
+
if ((valueTransform === null || valueTransform === void 0 ? void 0 : valueTransform.Type) !== 0) {
|
|
131
|
+
this.isNumericalOperation = true;
|
|
132
|
+
}
|
|
133
|
+
this.onClosed({
|
|
134
|
+
value: value,
|
|
135
|
+
showValue: showValue,
|
|
136
|
+
enableNumericalOperation: this.enableNumericalOperation,
|
|
137
|
+
isNumericalOperation: this.isNumericalOperation,
|
|
138
|
+
variableRwType: result.variableRwType
|
|
139
|
+
});
|
|
140
|
+
});
|
|
113
141
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
/**
|
|
143
|
+
* 处理"当前语种ID"系统变量的保存
|
|
144
|
+
*/
|
|
145
|
+
handleCurrentLanguageIdSave(value) {
|
|
146
|
+
if (!this.args.guiContext || !this.args.guiContext.updateCurrentLanguageId) {
|
|
147
|
+
this.showValidationErrorInfo(this.localization.loadFailed);
|
|
148
|
+
this.isSubmitting = false;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// 转换为数字类型
|
|
152
|
+
const languageId = value === '' || value == null ? null : Number(value);
|
|
153
|
+
// 调用 GuiContext 的语种切换方法
|
|
154
|
+
this.args.guiContext.updateCurrentLanguageId(languageId).then(() => {
|
|
155
|
+
// 语种切换成功,调用 onClosed 回调,让数字显示元件也能更新
|
|
156
|
+
this.onClosed({
|
|
157
|
+
value: value,
|
|
158
|
+
showValue: value,
|
|
159
|
+
enableNumericalOperation: false,
|
|
160
|
+
isNumericalOperation: false,
|
|
161
|
+
variableRwType: 6
|
|
162
|
+
});
|
|
163
|
+
}).catch(() => {
|
|
164
|
+
this.showValidationErrorInfo(this.localization.loadFailed);
|
|
165
|
+
this.isSubmitting = false;
|
|
166
|
+
});
|
|
117
167
|
}
|
|
118
|
-
|
|
168
|
+
close() {
|
|
169
|
+
this.bsModalRef.hide();
|
|
170
|
+
}
|
|
171
|
+
validate(event = null) {
|
|
172
|
+
if (event && event.keyCode === 13 && !this.validationError) {
|
|
173
|
+
this.save();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
119
176
|
// 校验数值必填
|
|
120
177
|
if (null == this.value || '' === this.value.trim()) {
|
|
121
178
|
return this.showValidationErrorInfo(this.localization.numericalValueRequired);
|
|
@@ -193,12 +250,13 @@ __decorate([
|
|
|
193
250
|
WriteValueModalComponent = __decorate([
|
|
194
251
|
Component({
|
|
195
252
|
selector: 'writeValueModal',
|
|
196
|
-
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}}
|
|
253
|
+
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> ",
|
|
197
254
|
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; } "]
|
|
198
255
|
}),
|
|
199
256
|
__param(0, Inject(LOCALIZATION)),
|
|
200
257
|
__metadata("design:paramtypes", [Object, DataTypeService,
|
|
201
258
|
FractionDigitService,
|
|
202
|
-
NumericalOperationService
|
|
259
|
+
NumericalOperationService,
|
|
260
|
+
BsModalRef])
|
|
203
261
|
], WriteValueModalComponent);
|
|
204
262
|
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"}],"handleCurrentLanguageIdSave":[{"__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
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export interface TextLibrarySetting {
|
|
2
|
+
readonly labelType: 'text' | 'textLibrary';
|
|
3
|
+
readonly selectedTextLibraryItem?: string | number;
|
|
4
|
+
readonly selectedTextItem?: string | number;
|
|
5
|
+
}
|
|
1
6
|
export interface FontSettingModel {
|
|
2
7
|
readonly text: string;
|
|
3
8
|
readonly stroke: string;
|
|
@@ -5,4 +10,5 @@ export interface FontSettingModel {
|
|
|
5
10
|
readonly fontSize: string;
|
|
6
11
|
readonly isUnderline: boolean;
|
|
7
12
|
readonly textAlign: string;
|
|
13
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"FontSettingModel":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TextLibrarySetting":{"__symbolic":"interface"},"FontSettingModel":{"__symbolic":"interface"}}}]
|
|
@@ -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,17 @@
|
|
|
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
|
+
readonly filterBackgroudColor?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare enum AxisRangeType {
|
|
15
|
+
Auto = 0,
|
|
16
|
+
Custom = 1
|
|
6
17
|
}
|
|
@@ -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}}}]
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import { HistroicalCurveChannelModel } from './historical-curve-chanel.model';
|
|
2
|
+
/**
|
|
3
|
+
* 单个历史数据条目的运行时配置
|
|
4
|
+
*/
|
|
5
|
+
export interface HistoricalCurveDataItem {
|
|
6
|
+
/** 历史数据条目名称 */
|
|
7
|
+
readonly dataName: string;
|
|
8
|
+
/** 该条目的通道列表 */
|
|
9
|
+
readonly channels: Array<HistroicalCurveChannelModel>;
|
|
10
|
+
}
|
|
2
11
|
export interface HistoricalCurveDataSettings {
|
|
3
12
|
readonly dataSourceCode: number;
|
|
4
13
|
/**
|
|
5
|
-
*
|
|
14
|
+
* 【旧格式-兼容】历史数据名称,单条目模式
|
|
6
15
|
*/
|
|
7
16
|
readonly dataName: string;
|
|
17
|
+
/**
|
|
18
|
+
* 【旧格式-兼容】通道列表,单条目模式
|
|
19
|
+
*/
|
|
8
20
|
readonly channels: Array<HistroicalCurveChannelModel>;
|
|
21
|
+
/**
|
|
22
|
+
* 【新格式】多个历史数据条目配置
|
|
23
|
+
* 如果此字段有值,优先使用此字段
|
|
24
|
+
*/
|
|
25
|
+
readonly dataItems?: Array<HistoricalCurveDataItem>;
|
|
9
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveDataSettings":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveDataItem":{"__symbolic":"interface"},"HistoricalCurveDataSettings":{"__symbolic":"interface"}}}]
|
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
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConditionalDynamicDisplayModel } from '../base/conditional-dynamic-display-model';
|
|
2
|
+
import { Point, Size } from '../shared';
|
|
3
|
+
import { DynamicDisplayModel } from '../shared/dynamic-display/dynamic-display-model';
|
|
4
|
+
export interface ScrollAlarmModel extends ConditionalDynamicDisplayModel {
|
|
5
|
+
readonly version: number;
|
|
6
|
+
readonly size: Size;
|
|
7
|
+
readonly location: Point;
|
|
8
|
+
readonly generalSetting?: any;
|
|
9
|
+
readonly filterSetting?: any;
|
|
10
|
+
readonly widths: number[];
|
|
11
|
+
readonly heights: number[];
|
|
12
|
+
readonly columLabels: string[];
|
|
13
|
+
readonly levelText: string[];
|
|
14
|
+
readonly scrollSetting?: {
|
|
15
|
+
readonly scrollInterval?: number;
|
|
16
|
+
readonly scrollDirection?: 'vertical' | 'horizontal';
|
|
17
|
+
readonly pauseOnHover?: boolean;
|
|
18
|
+
readonly autoPlay?: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly dynamicSetting?: DynamicDisplayModel;
|
|
21
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ScrollAlarmModel":{"__symbolic":"interface"}}}]
|
|
@@ -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}}}]
|
|
@@ -5,6 +5,7 @@ import { ConditionalEnableModel } from '../base/conditional-enable-model';
|
|
|
5
5
|
import { ConditionItemModel, GraphSetting, Point, Size } from '../shared';
|
|
6
6
|
import { DynamicDisplayModel } from '../shared/dynamic-display/dynamic-display-model';
|
|
7
7
|
import { SecurityModel } from '../base/security-model';
|
|
8
|
+
import { TextLibrarySetting } from '../base/font-setting-model';
|
|
8
9
|
export interface SwitchIndicatorLight extends ConditionalEnableModel, SecurityModel {
|
|
9
10
|
/**
|
|
10
11
|
* @type {(number)}
|
|
@@ -30,4 +31,5 @@ export interface SwitchIndicatorLight extends ConditionalEnableModel, SecurityMo
|
|
|
30
31
|
readonly isAwaysEnable?: boolean;
|
|
31
32
|
readonly enableItems?: ConditionItemModel[];
|
|
32
33
|
readonly fixedPositionType?: number;
|
|
34
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
33
35
|
}
|
|
@@ -2,12 +2,14 @@ import { Size, Text, GraphSetting } from '../shared';
|
|
|
2
2
|
import { ConditionalEnableModel } from '../base/conditional-enable-model';
|
|
3
3
|
import { SecurityModel } from '../base';
|
|
4
4
|
import { ViewOperationType } from './view-operation-type';
|
|
5
|
+
import { TextLibrarySetting } from '../base/font-setting-model';
|
|
5
6
|
export interface ViewOperationElementModel extends ConditionalEnableModel, SecurityModel {
|
|
6
7
|
/**
|
|
7
8
|
* 版本 2 : 动态行为调整
|
|
8
9
|
* 版本 3 :使能控制调整
|
|
9
10
|
* 版本 4 :新增操作记录
|
|
10
|
-
* 版本 5
|
|
11
|
+
* 版本 5 :新增页面操作类型,之前类型都为"切换页面"
|
|
12
|
+
* 版本 6 :新增文本库支持
|
|
11
13
|
*/
|
|
12
14
|
readonly version?: number;
|
|
13
15
|
readonly viewIndex?: number;
|
|
@@ -16,4 +18,8 @@ export interface ViewOperationElementModel extends ConditionalEnableModel, Secur
|
|
|
16
18
|
readonly useGraph: boolean;
|
|
17
19
|
readonly graphSetting: GraphSetting;
|
|
18
20
|
readonly operationType: ViewOperationType;
|
|
21
|
+
/**
|
|
22
|
+
* 文本库配置(版本6新增)
|
|
23
|
+
*/
|
|
24
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
19
25
|
}
|
package/package.json
CHANGED
package/public_api.js
CHANGED
|
@@ -9,6 +9,7 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
9
9
|
private appIdVariablesMap;
|
|
10
10
|
private connectedSubscription;
|
|
11
11
|
private variableValuesChangedSubscription;
|
|
12
|
+
private virtualDeviceStatesChangedSubscription;
|
|
12
13
|
private variablesToBeOpened;
|
|
13
14
|
private variablesToBeClosed;
|
|
14
15
|
private variableValueCache;
|
|
@@ -17,14 +18,35 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
17
18
|
private variableStateCache;
|
|
18
19
|
private variableStatesToBeOpened;
|
|
19
20
|
private variableStatesToBeClosed;
|
|
21
|
+
private alarmObservers;
|
|
22
|
+
private alarmChangedSubscription;
|
|
23
|
+
private systemVariableHandlers;
|
|
20
24
|
constructor(remoteVariableProtocol: RemoteVariableProtocol, logger: LoggerService);
|
|
25
|
+
private doAlarmChanged;
|
|
21
26
|
private doVariableValuesChanged;
|
|
27
|
+
private doVirtualDeviceStatesChanged;
|
|
22
28
|
private doVariableStatesChanged;
|
|
23
29
|
subscribeVariableStates(variableNames: string[]): Observable<VariableState[]>;
|
|
24
30
|
subscribeVariableState(variableName: string): Observable<VariableState>;
|
|
31
|
+
requestVirtualDeviceState(): Observable<void>;
|
|
25
32
|
openVariables(variableNames: string[], appId?: string): Observable<VariableValue[]>;
|
|
26
33
|
openVariable(variableName: string, appId?: string): Observable<VariableValue>;
|
|
27
34
|
write(variableName: string, value: any): Observable<VariableValue>;
|
|
28
35
|
writeWordByBit(variableName: string, index: number, value: number): Observable<VariableValue>;
|
|
36
|
+
subscribeUserDeviceAlarms(appId?: string): Observable<any[]>;
|
|
37
|
+
/**
|
|
38
|
+
* 注册系统变量处理器
|
|
39
|
+
* @param variableName 变量名(如"当前语种ID")
|
|
40
|
+
* @param getValue 获取值的函数
|
|
41
|
+
* @param setValue 设置值的函数
|
|
42
|
+
*/
|
|
43
|
+
registerSystemVariableHandler(variableName: string, getValue: () => Promise<any>, setValue: (value: any) => Promise<void>): void;
|
|
44
|
+
/**
|
|
45
|
+
* 通知系统变量值变化
|
|
46
|
+
* 用于在系统变量值改变时通知所有订阅者
|
|
47
|
+
* @param variableName 变量名
|
|
48
|
+
* @param value 新值
|
|
49
|
+
*/
|
|
50
|
+
notifySystemVariableChange(variableName: string, value: any): void;
|
|
29
51
|
dispose(): void;
|
|
30
52
|
}
|