@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
|
@@ -36,6 +36,33 @@ export class ReadableElement extends ConditionalEnableElement {
|
|
|
36
36
|
return VariableUtil.getConvertedVariableName(this.variableStore, variable);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
get minVariableName() {
|
|
40
|
+
if (!this.model.minValueType) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return this.getVariableName(this.model.minVariable);
|
|
44
|
+
}
|
|
45
|
+
get minValueType() {
|
|
46
|
+
return this.model.minValueType;
|
|
47
|
+
}
|
|
48
|
+
get maxVariableName() {
|
|
49
|
+
if (!this.model.maxValueType) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return this.getVariableName(this.model.maxVariable);
|
|
53
|
+
}
|
|
54
|
+
get maxValueType() {
|
|
55
|
+
return this.model.maxValueType;
|
|
56
|
+
}
|
|
57
|
+
getVariableName(variable) {
|
|
58
|
+
if (!this.model) {
|
|
59
|
+
throw new Error('Model cannot be null');
|
|
60
|
+
}
|
|
61
|
+
if (!variable) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return VariableUtil.getConvertedVariableName(this.variableStore, variable);
|
|
65
|
+
}
|
|
39
66
|
reportStateChanged(variableState) {
|
|
40
67
|
forEach(this.elementStates, elementState => {
|
|
41
68
|
if (elementState.variableName === variableState.variableName) {
|
|
@@ -45,14 +72,40 @@ export class ReadableElement extends ConditionalEnableElement {
|
|
|
45
72
|
});
|
|
46
73
|
}
|
|
47
74
|
reportValueChanged(value) {
|
|
75
|
+
var _a, _b, _c, _d;
|
|
48
76
|
forEach(this.elementStates, elementState => {
|
|
49
77
|
if (elementState.variableName === value.variableName) {
|
|
50
78
|
elementState.state = value.state;
|
|
51
79
|
this.changeStates();
|
|
52
80
|
}
|
|
53
81
|
});
|
|
54
|
-
if (this.state === State.Normal || this.state === State.Disable
|
|
55
|
-
this.
|
|
82
|
+
if (value.systemName !== '设备状态' && (this.state === State.Normal || this.state === State.Disable
|
|
83
|
+
|| value.variableName === this.minVariableName
|
|
84
|
+
|| value.variableName === this.maxVariableName)) {
|
|
85
|
+
this.updateVariableValue(value.value, value.variableName);
|
|
86
|
+
}
|
|
87
|
+
if (value.systemName === '设备状态') {
|
|
88
|
+
let name = value.customStatus;
|
|
89
|
+
const language = ((_b = (_a = window.abp.localization) === null || _a === void 0 ? void 0 : _a.currentLanguage) === null || _b === void 0 ? void 0 : _b.name) || ((_d = (_c = this.localization.localizationService) === null || _c === void 0 ? void 0 : _c.translate) === null || _d === void 0 ? void 0 : _d.currentLang);
|
|
90
|
+
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
91
|
+
if (!name) {
|
|
92
|
+
switch (value.state) {
|
|
93
|
+
case 1:
|
|
94
|
+
name = isChinese ? '在线' : 'Online';
|
|
95
|
+
break;
|
|
96
|
+
case 3:
|
|
97
|
+
name = isChinese ? '离线' : 'Offline';
|
|
98
|
+
break;
|
|
99
|
+
case 4:
|
|
100
|
+
name = isChinese ? '告警' : 'Alarming';
|
|
101
|
+
break;
|
|
102
|
+
case 5:
|
|
103
|
+
name = isChinese ? '未绑定' : 'Unbound';
|
|
104
|
+
break;
|
|
105
|
+
default:
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
this.updateVariableValue(name, '设备状态');
|
|
56
109
|
}
|
|
57
110
|
}
|
|
58
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ReadableElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./conditional-enable-element","name":"ConditionalEnableElement","line":9,"character":46},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":13,"character":57},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":13,"character":98},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":14,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":14,"character":52},{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"reportStateChanged":[{"__symbolic":"method"}],"reportValueChanged":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ReadableElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./conditional-enable-element","name":"ConditionalEnableElement","line":9,"character":46},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":13,"character":57},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":13,"character":98},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":14,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":14,"character":52},{"__symbolic":"reference","name":"string"}]}],"init":[{"__symbolic":"method"}],"getVariableName":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"reportStateChanged":[{"__symbolic":"method"}],"reportValueChanged":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
/// <reference types="jqueryui" />
|
|
1
3
|
import { PermissionChecker } from '../../service';
|
|
2
4
|
import { Localization } from '../../localization';
|
|
3
5
|
import { VariableCommunicator, VariableState } from '../../communication';
|
|
@@ -9,7 +11,7 @@ export declare abstract class StateControlElement extends ConditionalDynamicDisp
|
|
|
9
11
|
isEnable: boolean;
|
|
10
12
|
elementStates: VariableState[];
|
|
11
13
|
state: State;
|
|
12
|
-
|
|
14
|
+
currentRect: JQuery;
|
|
13
15
|
preState: State;
|
|
14
16
|
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
15
17
|
initState(): void;
|
|
@@ -139,6 +139,9 @@ export class StateControlElement extends ConditionalDynamicDisplayElement {
|
|
|
139
139
|
if (!this.currentRect.length) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
|
+
// 元件绑定设备状态时不需要在右上角显示状态
|
|
143
|
+
if (this.$element[0].dataset.model.includes('设备状态'))
|
|
144
|
+
return;
|
|
142
145
|
const document = this.$element[0].ownerDocument;
|
|
143
146
|
const imgObj = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
|
144
147
|
if (imgObj) {
|
|
@@ -13,6 +13,7 @@ export declare class DatetimeDisplayElement extends ConditionalDisplayElement {
|
|
|
13
13
|
protected readonly model: DatetimeDisplay;
|
|
14
14
|
protected readonly logger: LoggerService;
|
|
15
15
|
private readonly $dateTimeText;
|
|
16
|
+
private timeZoneMap;
|
|
16
17
|
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, signalRAppId: string);
|
|
17
18
|
private getAndSetCurrentTime;
|
|
18
19
|
private getDatetimeFormat;
|
|
@@ -5,6 +5,7 @@ import { TimeFormatType } from '../../model/datetime-display/time-format-type';
|
|
|
5
5
|
import { ConditionalDisplayElement } from '../base/conditional-display-element';
|
|
6
6
|
import { GraphStateElement } from '../shared/graph/graph-state-element';
|
|
7
7
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
8
|
+
import timeZoneOptions from './time-zone-select-json';
|
|
8
9
|
export class DatetimeDisplayElement extends ConditionalDisplayElement {
|
|
9
10
|
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, graphStore, signalRAppId) {
|
|
10
11
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
@@ -12,7 +13,12 @@ export class DatetimeDisplayElement extends ConditionalDisplayElement {
|
|
|
12
13
|
this.variableCommunicator = variableCommunicator;
|
|
13
14
|
this.variableStore = variableStore;
|
|
14
15
|
this.graphStore = graphStore;
|
|
16
|
+
this.timeZoneMap = new Map();
|
|
15
17
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
18
|
+
// 初始化时区
|
|
19
|
+
timeZoneOptions.forEach((item) => {
|
|
20
|
+
this.timeZoneMap.set(item.key, item.utcoffset);
|
|
21
|
+
});
|
|
16
22
|
if (this.model.size && this.model.useGraph) {
|
|
17
23
|
this.initGraph(this.model.size.width, this.model.size.height);
|
|
18
24
|
}
|
|
@@ -22,11 +28,13 @@ export class DatetimeDisplayElement extends ConditionalDisplayElement {
|
|
|
22
28
|
this.getAndSetCurrentTime(format);
|
|
23
29
|
setInterval(() => {
|
|
24
30
|
this.getAndSetCurrentTime(format);
|
|
25
|
-
},
|
|
31
|
+
}, 100);
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
getAndSetCurrentTime(format) {
|
|
29
|
-
|
|
35
|
+
var _a;
|
|
36
|
+
const currentTimeZone = this.timeZoneMap.get((_a = this.model.timeZone) !== null && _a !== void 0 ? _a : '');
|
|
37
|
+
const content = moment().utcOffset(currentTimeZone !== null && currentTimeZone !== void 0 ? currentTimeZone : this.timeZoneMap.get('')).format(format);
|
|
30
38
|
this.$dateTimeText.text(content);
|
|
31
39
|
let fontF = this.$dateTimeText.css('font-family');
|
|
32
40
|
if (fontF && fontF.lastIndexOf('msyh') === -1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"DatetimeDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"DatetimeDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":15,"character":44},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":24,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":24,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":25,"character":46},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":26,"character":49},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":27,"character":42},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":28,"character":37},{"__symbolic":"reference","name":"string"}]}],"getAndSetCurrentTime":[{"__symbolic":"method"}],"getDatetimeFormat":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"getFormat":[{"__symbolic":"method"}]}}}}]
|