@flexem/fc-gui 3.0.0-alpha.12 → 3.0.0-alpha.120
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 +444 -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 +19506 -17220
- 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 +2 -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 +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 +386 -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 +55 -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 +9 -0
- package/elements/historical-curve/historical-curve.element.js +252 -13
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.d.ts +1 -0
- package/elements/main-element.js +50 -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 +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/shared/graph/graph-state-element.js +0 -3
- package/elements/shared/text/text-element.js +13 -2
- package/elements/shared/text/text-state-element.d.ts +0 -1
- package/elements/shared/text/text-state-element.js +39 -61
- package/elements/shared/text/text-state-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 +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 +81 -21
- 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-view.d.ts +2 -0
- package/gui/gui-view.js +20 -0
- 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 +3 -1
- package/modal/write-value/write-value-modal-args.js +2 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +8 -7
- package/modal/write-value/write-value-modal.component.html +9 -4
- package/modal/write-value/write-value-modal.component.js +42 -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/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/meter/meter.d.ts +4 -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 +7 -0
- package/remote/communication/variable/remote-variable-communicator.js +47 -1
- 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 +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/fbox-data-type.service.js +40 -0
|
@@ -170,6 +170,9 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
170
170
|
const viewIndex = this.model.viewIndex;
|
|
171
171
|
if (null != viewIndex) {
|
|
172
172
|
this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
|
|
173
|
+
$(`#${this.hostContainerId} video`)
|
|
174
|
+
.addClass('video-hidden')
|
|
175
|
+
.css('visibility', 'hidden');
|
|
173
176
|
}
|
|
174
177
|
else {
|
|
175
178
|
this.logger.error('[GUI]Toggle View:invalid view index');
|
|
@@ -177,6 +180,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
177
180
|
}
|
|
178
181
|
closeView() {
|
|
179
182
|
this.popupViewService.closeView();
|
|
183
|
+
if ($(`#${this.hostContainerId} > svg > svg`).length === 0) {
|
|
184
|
+
$(`#${this.hostContainerId} .video-hidden`)
|
|
185
|
+
.removeClass('video-hidden')
|
|
186
|
+
.css('visibility', 'visible');
|
|
187
|
+
}
|
|
180
188
|
this.recordViewOperation();
|
|
181
189
|
}
|
|
182
190
|
moveView(movementX, movementY) {
|
|
@@ -45,7 +45,6 @@ export class WeatherElement extends ConditionalDisplayElement {
|
|
|
45
45
|
}
|
|
46
46
|
handleGettingAddress() {
|
|
47
47
|
this.handleUnusualCommon(this.localization.weatherNotAvailable);
|
|
48
|
-
setTimeout(() => this.initWeatherInfo(), 1000 * 60);
|
|
49
48
|
}
|
|
50
49
|
handleNoAddress() {
|
|
51
50
|
this.handleUnusualCommon(this.localization.weatherNotAddress);
|
package/gui/gui-context.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ConfigStore } from '../config';
|
|
2
2
|
import { VariableCommunicator } from '../communication';
|
|
3
3
|
import { SecurityChecker } from '../security';
|
|
4
|
-
import { VideoService, WeatherService, PermissionChecker, OperationRecordService } from '../service';
|
|
4
|
+
import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService } from '../service';
|
|
5
5
|
export interface GuiContext {
|
|
6
6
|
readonly configStore: ConfigStore;
|
|
7
7
|
readonly variableCommunicator: VariableCommunicator;
|
|
8
8
|
readonly permissionChecker: PermissionChecker;
|
|
9
9
|
readonly operationRecordService: OperationRecordService;
|
|
10
|
+
readonly releasedVariableService: ReleasedVariableService;
|
|
10
11
|
readonly securityChecker: SecurityChecker;
|
|
11
12
|
readonly videoService: VideoService;
|
|
12
13
|
readonly weatherService: WeatherService;
|
package/gui/gui-host.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class GuiHost implements Disposable {
|
|
|
13
13
|
readonly el: ElementRef;
|
|
14
14
|
private isLoaded;
|
|
15
15
|
private currentView;
|
|
16
|
-
|
|
16
|
+
currentViewIndex: number;
|
|
17
17
|
private containerEl;
|
|
18
18
|
private currentViewSize;
|
|
19
19
|
private currentViewReiszeMode;
|
package/gui/gui-view.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare class GuiView implements PopupViewService {
|
|
|
21
21
|
private mainElement;
|
|
22
22
|
private muskElement;
|
|
23
23
|
private openVariableStatesSubscription;
|
|
24
|
+
private requestVirtualDeviceState;
|
|
25
|
+
private virtualDeviceStatesChanged;
|
|
24
26
|
private openVariablesSubscription;
|
|
25
27
|
private openedVariableNames;
|
|
26
28
|
private perViewVariableCommunicator;
|
package/gui/gui-view.js
CHANGED
|
@@ -72,6 +72,20 @@ export class GuiView {
|
|
|
72
72
|
this.openVariableStatesSubscription.unsubscribe();
|
|
73
73
|
}
|
|
74
74
|
this.openedVariableNames = this.mainElement.getVariableNames();
|
|
75
|
+
if (this.openedVariableNames.indexOf('设备状态') !== -1) {
|
|
76
|
+
if (this.requestVirtualDeviceState) {
|
|
77
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
78
|
+
}
|
|
79
|
+
if (this.requestVirtualDeviceState) {
|
|
80
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
81
|
+
}
|
|
82
|
+
this.normalOpenedVariableNames(['设备状态']);
|
|
83
|
+
this.requestVirtualDeviceState =
|
|
84
|
+
this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
|
|
85
|
+
complete: () => { }
|
|
86
|
+
});
|
|
87
|
+
this.openedVariableNames = this.openedVariableNames.filter(name => name !== '设备状态');
|
|
88
|
+
}
|
|
75
89
|
if (this.openedVariableNames.length === 0) {
|
|
76
90
|
return;
|
|
77
91
|
}
|
|
@@ -181,6 +195,12 @@ export class GuiView {
|
|
|
181
195
|
if (this.openVariableStatesSubscription) {
|
|
182
196
|
this.openVariableStatesSubscription.unsubscribe();
|
|
183
197
|
}
|
|
198
|
+
if (this.requestVirtualDeviceState) {
|
|
199
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
200
|
+
}
|
|
201
|
+
if (this.virtualDeviceStatesChanged) {
|
|
202
|
+
this.virtualDeviceStatesChanged.unsubscribe();
|
|
203
|
+
}
|
|
184
204
|
if (this.openVariablesSubscription) {
|
|
185
205
|
this.openVariablesSubscription.unsubscribe();
|
|
186
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":49,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":50,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":51,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]}}}}]
|
package/gui/gui.component.d.ts
CHANGED
|
@@ -24,10 +24,12 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
24
24
|
initHeight: number;
|
|
25
25
|
lastScale: number;
|
|
26
26
|
isMobileMode: boolean;
|
|
27
|
+
hostContainerId: string;
|
|
27
28
|
private $svg;
|
|
28
29
|
private host;
|
|
29
30
|
private get viewResizeMode();
|
|
30
31
|
private readonly globalSettings;
|
|
32
|
+
private readonly viewService;
|
|
31
33
|
constructor(el: ElementRef, localization: Localization, injector: Injector, bsModalService: BsModalService);
|
|
32
34
|
ngOnChanges(changes: {
|
|
33
35
|
[propKey: string]: SimpleChange;
|
|
@@ -39,4 +41,5 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
39
41
|
private onSizeChanged;
|
|
40
42
|
private onResizeModeChanged;
|
|
41
43
|
private onDisplayModeChanged;
|
|
44
|
+
refreshCurrentPage(): boolean;
|
|
42
45
|
}
|
package/gui/gui.component.js
CHANGED
|
@@ -18,6 +18,7 @@ import { Size } from '../model';
|
|
|
18
18
|
import { DisplayMode, GlobalSettings, ViewResizeMode } from '../settings';
|
|
19
19
|
import { GuiHost } from './gui-host';
|
|
20
20
|
import { Guid } from '../utils/guid';
|
|
21
|
+
import { ViewService } from '../view/view.service';
|
|
21
22
|
let GuiComponent = class GuiComponent {
|
|
22
23
|
constructor(el, localization, injector, bsModalService) {
|
|
23
24
|
this.el = el;
|
|
@@ -29,6 +30,7 @@ let GuiComponent = class GuiComponent {
|
|
|
29
30
|
this.lastScale = 1;
|
|
30
31
|
this.isMobileMode = false;
|
|
31
32
|
this.globalSettings = this.injector.get(GlobalSettings);
|
|
33
|
+
this.viewService = injector.get(ViewService);
|
|
32
34
|
}
|
|
33
35
|
get viewResizeMode() {
|
|
34
36
|
switch (this.resizeMode) {
|
|
@@ -131,11 +133,11 @@ let GuiComponent = class GuiComponent {
|
|
|
131
133
|
this.$svg = $(this.el.nativeElement).find('div.svgView').first();
|
|
132
134
|
this.$svg.empty();
|
|
133
135
|
const svgRootClass = 'S' + Guid.newGuid().toString('n');
|
|
134
|
-
|
|
136
|
+
this.hostContainerId = 'H' + Guid.newGuid().toString('n');
|
|
135
137
|
this.$svg.addClass(svgRootClass);
|
|
136
138
|
const guiOptions = {
|
|
137
139
|
svgRootClass: svgRootClass,
|
|
138
|
-
hostContainerId: hostContainerId,
|
|
140
|
+
hostContainerId: this.hostContainerId,
|
|
139
141
|
el: this.el
|
|
140
142
|
};
|
|
141
143
|
const host = new GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
|
|
@@ -190,6 +192,17 @@ let GuiComponent = class GuiComponent {
|
|
|
190
192
|
this.isMobileMode = this.displayMode === 'Mobile';
|
|
191
193
|
this.globalSettings.displayMode = this.isMobileMode ? DisplayMode.Mobile : DisplayMode.Web;
|
|
192
194
|
}
|
|
195
|
+
refreshCurrentPage() {
|
|
196
|
+
if (this.host.currentViewIndex === undefined) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
const toggleView = this.viewService.toggleViews.get(this.el);
|
|
200
|
+
if (!toggleView) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
193
206
|
};
|
|
194
207
|
__decorate([
|
|
195
208
|
Input(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":50,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}],"refreshCurrentPage":[{"__symbolic":"method"}]}}}}]
|
|
@@ -4,8 +4,10 @@ export interface Localization {
|
|
|
4
4
|
loadFailed: any;
|
|
5
5
|
setting: any;
|
|
6
6
|
submit: any;
|
|
7
|
+
submitting: any;
|
|
7
8
|
numericalValueRequired: any;
|
|
8
9
|
invalidNumericalValue: any;
|
|
10
|
+
writeValueTimeout: any;
|
|
9
11
|
binaryType: any;
|
|
10
12
|
decimalType: any;
|
|
11
13
|
hexadecimalType: any;
|
|
@@ -30,7 +32,9 @@ export interface Localization {
|
|
|
30
32
|
permissiontip: any;
|
|
31
33
|
conditionIsNotMetTip: any;
|
|
32
34
|
chartNoData: any;
|
|
35
|
+
lastThirtyMinutes: any;
|
|
33
36
|
lastOneHour: any;
|
|
37
|
+
lastEightHour: any;
|
|
34
38
|
lastTwentyFourHours: any;
|
|
35
39
|
lastSevenDays: any;
|
|
36
40
|
lastThirtyDays: any;
|
|
@@ -47,5 +51,8 @@ export interface Localization {
|
|
|
47
51
|
weatherNotSupport: any;
|
|
48
52
|
weatherNotAddress: any;
|
|
49
53
|
weatherNotAvailable: any;
|
|
54
|
+
airQualityNotSupport: any;
|
|
55
|
+
airQualityNotAddress: any;
|
|
56
|
+
airQualityNotAvailable: any;
|
|
50
57
|
}
|
|
51
58
|
export declare const DefaultLocalization: Localization;
|
|
@@ -4,8 +4,10 @@ export const DefaultLocalization = {
|
|
|
4
4
|
loadFailed: 'Load failed.',
|
|
5
5
|
setting: 'Setting',
|
|
6
6
|
submit: 'Submit',
|
|
7
|
+
submitting: 'Submitting···',
|
|
7
8
|
numericalValueRequired: 'Numerical value can\'t be emtpy',
|
|
8
9
|
invalidNumericalValue: 'Numerical value is not valid',
|
|
10
|
+
writeValueTimeout: 'Write value error: Timeout',
|
|
9
11
|
binaryType: 'Binary',
|
|
10
12
|
decimalType: 'Decimal',
|
|
11
13
|
hexadecimalType: 'Hexadecimal',
|
|
@@ -15,7 +17,7 @@ export const DefaultLocalization = {
|
|
|
15
17
|
canNotBeNegative: 'Can not be negative',
|
|
16
18
|
valueOutOfRange: 'Numerical value is out of range',
|
|
17
19
|
timeout: 'timeout',
|
|
18
|
-
confirmOperationPrompt: '
|
|
20
|
+
confirmOperationPrompt: 'Are you sure you want to perform this operation?',
|
|
19
21
|
confirm: 'Yes',
|
|
20
22
|
cancel: 'Cancel',
|
|
21
23
|
characterInputRequired: 'Character input can\'t be empty',
|
|
@@ -28,9 +30,11 @@ export const DefaultLocalization = {
|
|
|
28
30
|
abnormal: 'Data abnormal',
|
|
29
31
|
disable: 'Disable',
|
|
30
32
|
permissiontip: 'You have no permission to operate.',
|
|
31
|
-
conditionIsNotMetTip: '
|
|
33
|
+
conditionIsNotMetTip: 'Operation conditions not met or variable anomalies.',
|
|
32
34
|
chartNoData: 'No Data Available',
|
|
35
|
+
lastThirtyMinutes: 'Last thirty minutes',
|
|
33
36
|
lastOneHour: 'Last one hour',
|
|
37
|
+
lastEightHour: 'Last eight hours',
|
|
34
38
|
lastTwentyFourHours: 'Last 24 hours',
|
|
35
39
|
lastSevenDays: 'Last 7 days',
|
|
36
40
|
lastThirtyDays: 'Last 30 days',
|
|
@@ -46,5 +50,8 @@ export const DefaultLocalization = {
|
|
|
46
50
|
unconfiguredVideoAddress: 'Unconfigured Video Address',
|
|
47
51
|
weatherNotSupport: 'Location not supported',
|
|
48
52
|
weatherNotAddress: 'Address not configured',
|
|
49
|
-
weatherNotAvailable: 'Address not yet available'
|
|
53
|
+
weatherNotAvailable: 'Address not yet available',
|
|
54
|
+
airQualityNotSupport: 'Location not supported',
|
|
55
|
+
airQualityNotAddress: 'Address not configured',
|
|
56
|
+
airQualityNotAvailable: 'Address not yet available'
|
|
50
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"LOCALIZATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["fc.gui.loc"]},"Localization":{"__symbolic":"interface"},"DefaultLocalization":{"loadFailed":"Load failed.","setting":"Setting","submit":"Submit","numericalValueRequired":"Numerical value can't be emtpy","invalidNumericalValue":"Numerical value is not valid","binaryType":"Binary","decimalType":"Decimal","hexadecimalType":"Hexadecimal","stringType":"String","numericalValueTooLong":"Numerical value too long","fractionDigitsMustLessThan":"Fraction digits must be less than ","canNotBeNegative":"Can not be negative","valueOutOfRange":"Numerical value is out of range","timeout":"timeout","confirmOperationPrompt":"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"LOCALIZATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["fc.gui.loc"]},"Localization":{"__symbolic":"interface"},"DefaultLocalization":{"loadFailed":"Load failed.","setting":"Setting","submit":"Submit","submitting":"Submitting···","numericalValueRequired":"Numerical value can't be emtpy","invalidNumericalValue":"Numerical value is not valid","writeValueTimeout":"Write value error: Timeout","binaryType":"Binary","decimalType":"Decimal","hexadecimalType":"Hexadecimal","stringType":"String","numericalValueTooLong":"Numerical value too long","fractionDigitsMustLessThan":"Fraction digits must be less than ","canNotBeNegative":"Can not be negative","valueOutOfRange":"Numerical value is out of range","timeout":"timeout","confirmOperationPrompt":"Are you sure you want to perform this operation?","confirm":"Yes","cancel":"Cancel","characterInputRequired":"Character input can't be empty","character":"(Character)","characterOutofRange":"Character length is out of range","writeValueRange":"Write value range","loading":"Loading","unbind":"Unbind","offline":"Offline","abnormal":"Data abnormal","disable":"Disable","permissiontip":"You have no permission to operate.","conditionIsNotMetTip":"Operation conditions not met or variable anomalies.","chartNoData":"No Data Available","lastThirtyMinutes":"Last thirty minutes","lastOneHour":"Last one hour","lastEightHour":"Last eight hours","lastTwentyFourHours":"Last 24 hours","lastSevenDays":"Last 7 days","lastThirtyDays":"Last 30 days","lastOneYear":"Last 1 year","grouped":"Grouped","stacked":"Stacked","passwordVerify":"Password verifiers","passwordError":"Password error","password":"Password","passwordToolTip":"Password error, please re-enter","passwordRequired":"Password can't be empty","invalidVideoAddress":"Invalid video address","unconfiguredVideoAddress":"Unconfigured Video Address","weatherNotSupport":"Location not supported","weatherNotAddress":"Address not configured","weatherNotAvailable":"Address not yet available","airQualityNotSupport":"Location not supported","airQualityNotAddress":"Address not configured","airQualityNotAvailable":"Address not yet available"}}}]
|
|
@@ -2,8 +2,10 @@ export const Localization_zh_CN = {
|
|
|
2
2
|
loadFailed: '加载失败.',
|
|
3
3
|
setting: '设置',
|
|
4
4
|
submit: '提交',
|
|
5
|
+
submitting: '提交中···',
|
|
5
6
|
numericalValueRequired: '数值不能为空',
|
|
6
7
|
invalidNumericalValue: '数值格式不正确',
|
|
8
|
+
writeValueTimeout: '写值错误:超时',
|
|
7
9
|
binaryType: '二进制',
|
|
8
10
|
decimalType: '十进制',
|
|
9
11
|
hexadecimalType: '十六进制',
|
|
@@ -28,7 +30,9 @@ export const Localization_zh_CN = {
|
|
|
28
30
|
permissiontip: '您无权限执行此操作',
|
|
29
31
|
conditionIsNotMetTip: '操作条件不满足或逻辑控制变量异常',
|
|
30
32
|
chartNoData: '无数据',
|
|
33
|
+
lastThirtyMinutes: '最近30分钟',
|
|
31
34
|
lastOneHour: '最近1小时',
|
|
35
|
+
lastEightHour: '最近8小时',
|
|
32
36
|
lastTwentyFourHours: '最近24小时',
|
|
33
37
|
lastSevenDays: '最近7天',
|
|
34
38
|
lastThirtyDays: '最近30天',
|
|
@@ -44,5 +48,8 @@ export const Localization_zh_CN = {
|
|
|
44
48
|
unconfiguredVideoAddress: '未配置视频地址',
|
|
45
49
|
weatherNotSupport: '当前位置暂不支持',
|
|
46
50
|
weatherNotAddress: '当前设备未设置地址',
|
|
47
|
-
weatherNotAvailable: '暂未获取设备地址'
|
|
51
|
+
weatherNotAvailable: '暂未获取设备地址',
|
|
52
|
+
airQualityNotSupport: '当前位置暂不支持',
|
|
53
|
+
airQualityNotAddress: '当前设备未设置地址',
|
|
54
|
+
airQualityNotAvailable: '暂未获取设备地址'
|
|
48
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"Localization_zh_CN":{"loadFailed":"加载失败.","setting":"设置","submit":"提交","numericalValueRequired":"数值不能为空","invalidNumericalValue":"数值格式不正确","binaryType":"二进制","decimalType":"十进制","hexadecimalType":"十六进制","stringType":"字符串","numericalValueTooLong":"数值超长","fractionDigitsMustLessThan":"小数位不能超过","canNotBeNegative":"不能为负数","valueOutOfRange":"数值超出范围","timeout":"超时","confirmOperationPrompt":"是否确认要执行此操作?","confirm":"确定","cancel":"取消","characterInputRequired":"请输入至少一个字符","character":"(字符串)","characterOutofRange":"字符长度超限","writeValueRange":"写值范围","loading":"加载中","unbind":"未绑定","offline":"离线","abnormal":"数据异常","disable":"禁用","permissiontip":"您无权限执行此操作","conditionIsNotMetTip":"操作条件不满足或逻辑控制变量异常","chartNoData":"无数据","lastOneHour":"最近1小时","lastTwentyFourHours":"最近24小时","lastSevenDays":"最近7天","lastThirtyDays":"最近30天","lastOneYear":"最近1年","grouped":"分组","stacked":"叠加","passwordVerify":"密码校验","passwordError":"密码错误","password":"密码","passwordToolTip":"密码错误,请重新输入","passwordRequired":"密码不能为空","invalidVideoAddress":"无效的视频地址","unconfiguredVideoAddress":"未配置视频地址","weatherNotSupport":"当前位置暂不支持","weatherNotAddress":"当前设备未设置地址","weatherNotAvailable":"暂未获取设备地址"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"Localization_zh_CN":{"loadFailed":"加载失败.","setting":"设置","submit":"提交","submitting":"提交中···","numericalValueRequired":"数值不能为空","invalidNumericalValue":"数值格式不正确","writeValueTimeout":"写值错误:超时","binaryType":"二进制","decimalType":"十进制","hexadecimalType":"十六进制","stringType":"字符串","numericalValueTooLong":"数值超长","fractionDigitsMustLessThan":"小数位不能超过","canNotBeNegative":"不能为负数","valueOutOfRange":"数值超出范围","timeout":"超时","confirmOperationPrompt":"是否确认要执行此操作?","confirm":"确定","cancel":"取消","characterInputRequired":"请输入至少一个字符","character":"(字符串)","characterOutofRange":"字符长度超限","writeValueRange":"写值范围","loading":"加载中","unbind":"未绑定","offline":"离线","abnormal":"数据异常","disable":"禁用","permissiontip":"您无权限执行此操作","conditionIsNotMetTip":"操作条件不满足或逻辑控制变量异常","chartNoData":"无数据","lastThirtyMinutes":"最近30分钟","lastOneHour":"最近1小时","lastEightHour":"最近8小时","lastTwentyFourHours":"最近24小时","lastSevenDays":"最近7天","lastThirtyDays":"最近30天","lastOneYear":"最近1年","grouped":"分组","stacked":"叠加","passwordVerify":"密码校验","passwordError":"密码错误","password":"密码","passwordToolTip":"密码错误,请重新输入","passwordRequired":"密码不能为空","invalidVideoAddress":"无效的视频地址","unconfiguredVideoAddress":"未配置视频地址","weatherNotSupport":"当前位置暂不支持","weatherNotAddress":"当前设备未设置地址","weatherNotAvailable":"暂未获取设备地址","airQualityNotSupport":"当前位置暂不支持","airQualityNotAddress":"当前设备未设置地址","airQualityNotAvailable":"暂未获取设备地址"}}}]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NumericalOperation } from '../../model';
|
|
2
|
+
import { ReleasedVariableService } from '../../service';
|
|
2
3
|
export declare class WriteValueModalArgs {
|
|
3
4
|
variableName: string;
|
|
4
5
|
dataType: number;
|
|
@@ -8,5 +9,6 @@ export declare class WriteValueModalArgs {
|
|
|
8
9
|
numericalOperation: NumericalOperation;
|
|
9
10
|
version: number;
|
|
10
11
|
enableDataParsed: boolean;
|
|
11
|
-
|
|
12
|
+
releasedVariableService: ReleasedVariableService;
|
|
13
|
+
constructor(variableName: string, dataType: number, fBoxDataType: number, integerDigits: number, fractionDigits: number, numericalOperation: NumericalOperation, version: number, enableDataParsed: boolean, releasedVariableService: ReleasedVariableService);
|
|
12
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class WriteValueModalArgs {
|
|
2
|
-
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed) {
|
|
2
|
+
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed, releasedVariableService) {
|
|
3
3
|
this.variableName = variableName;
|
|
4
4
|
this.dataType = dataType;
|
|
5
5
|
this.fBoxDataType = fBoxDataType;
|
|
@@ -8,5 +8,6 @@ export class WriteValueModalArgs {
|
|
|
8
8
|
this.numericalOperation = numericalOperation;
|
|
9
9
|
this.version = version;
|
|
10
10
|
this.enableDataParsed = enableDataParsed;
|
|
11
|
+
this.releasedVariableService = releasedVariableService;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":10,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":13,"character":40}]}]}}}}]
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
2
|
import { Localization } from '../../localization';
|
|
4
3
|
import { NumericalOperation } from '../../model/numerical-display/numerical-operation';
|
|
5
4
|
import { DataTypeService } from '../../utils/data-type/data-type.service';
|
|
6
5
|
import { FractionDigitService } from '../../utils/fraction-digit.service';
|
|
7
6
|
import { NumericalOperationService } from '../../utils/numerical-operation.service';
|
|
8
7
|
import { WriteValueModalArgs } from './write-value-modal-args';
|
|
9
|
-
import {
|
|
8
|
+
import { BsModalRef } from 'ngx-bootstrap/modal';
|
|
10
9
|
export declare class WriteValueModalComponent implements OnInit {
|
|
11
10
|
localization: Localization;
|
|
12
11
|
private readonly dataTypeService;
|
|
13
12
|
private readonly fractionDigitService;
|
|
14
13
|
private readonly numericalOperationService;
|
|
15
|
-
private
|
|
16
|
-
|
|
14
|
+
private readonly bsModalRef;
|
|
15
|
+
onClosed: any;
|
|
17
16
|
args: WriteValueModalArgs;
|
|
18
17
|
private dataType;
|
|
19
18
|
private fBoxDataType;
|
|
@@ -28,21 +27,23 @@ export declare class WriteValueModalComponent implements OnInit {
|
|
|
28
27
|
valueType: string;
|
|
29
28
|
variableName: string;
|
|
30
29
|
enableNumericalOperation: boolean;
|
|
30
|
+
isNumericalOperation: boolean;
|
|
31
31
|
numericalOperation: NumericalOperation;
|
|
32
32
|
validationError: boolean;
|
|
33
33
|
validationErrorText: string;
|
|
34
34
|
writeMinValue: number;
|
|
35
35
|
writeMaxValue: number;
|
|
36
36
|
writeValueRangeText: string;
|
|
37
|
+
isSubmitting: boolean;
|
|
37
38
|
get invalidErrorText(): string;
|
|
38
|
-
constructor(localization: Localization, dataTypeService: DataTypeService, fractionDigitService: FractionDigitService, numericalOperationService: NumericalOperationService);
|
|
39
|
+
constructor(localization: Localization, dataTypeService: DataTypeService, fractionDigitService: FractionDigitService, numericalOperationService: NumericalOperationService, bsModalRef: BsModalRef);
|
|
39
40
|
ngOnInit(): void;
|
|
40
41
|
initData(option: WriteValueModalArgs): void;
|
|
41
42
|
private setValueRangeAccordToDataParsed;
|
|
42
43
|
getWriteValueRangeText(): string;
|
|
43
44
|
save(): void;
|
|
44
|
-
close(
|
|
45
|
-
validate(): void;
|
|
45
|
+
close(): void;
|
|
46
|
+
validate(event?: any): void;
|
|
46
47
|
private showValidationErrorInfo;
|
|
47
48
|
private hideValidationErrorInfo;
|
|
48
49
|
private getFractionDigits;
|
|
@@ -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,49 @@ 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
|
+
if (!this.args.releasedVariableService) {
|
|
114
|
+
this.onClosed({
|
|
115
|
+
value: value,
|
|
116
|
+
showValue: showValue,
|
|
117
|
+
enableNumericalOperation: false,
|
|
118
|
+
isNumericalOperation: this.isNumericalOperation,
|
|
119
|
+
variableRwType: 6
|
|
120
|
+
});
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
|
|
124
|
+
const valueTransform = JSON.parse(result.valueTransform);
|
|
125
|
+
if ((valueTransform === null || valueTransform === void 0 ? void 0 : valueTransform.Type) !== 0) {
|
|
126
|
+
this.isNumericalOperation = true;
|
|
127
|
+
}
|
|
128
|
+
this.onClosed({
|
|
129
|
+
value: value,
|
|
130
|
+
showValue: showValue,
|
|
131
|
+
enableNumericalOperation: this.enableNumericalOperation,
|
|
132
|
+
isNumericalOperation: this.isNumericalOperation,
|
|
133
|
+
variableRwType: result.variableRwType
|
|
134
|
+
});
|
|
135
|
+
});
|
|
113
136
|
}
|
|
114
|
-
close(
|
|
115
|
-
this.
|
|
116
|
-
this._onClosed.complete();
|
|
137
|
+
close() {
|
|
138
|
+
this.bsModalRef.hide();
|
|
117
139
|
}
|
|
118
|
-
validate() {
|
|
140
|
+
validate(event = null) {
|
|
141
|
+
if (event && event.keyCode === 13 && !this.validationError) {
|
|
142
|
+
this.save();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
119
145
|
// 校验数值必填
|
|
120
146
|
if (null == this.value || '' === this.value.trim()) {
|
|
121
147
|
return this.showValidationErrorInfo(this.localization.numericalValueRequired);
|
|
@@ -193,12 +219,13 @@ __decorate([
|
|
|
193
219
|
WriteValueModalComponent = __decorate([
|
|
194
220
|
Component({
|
|
195
221
|
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}}
|
|
222
|
+
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
223
|
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
224
|
}),
|
|
199
225
|
__param(0, Inject(LOCALIZATION)),
|
|
200
226
|
__metadata("design:paramtypes", [Object, DataTypeService,
|
|
201
227
|
FractionDigitService,
|
|
202
|
-
NumericalOperationService
|
|
228
|
+
NumericalOperationService,
|
|
229
|
+
BsModalRef])
|
|
203
230
|
], WriteValueModalComponent);
|
|
204
231
|
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"}}}]
|