@flexem/fc-gui 3.0.0-alpha.12 → 3.0.0-alpha.121
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 +16071 -13357
- 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 +54 -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/scroll-alarm/scroll-alarm-element.d.ts +50 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +421 -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.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/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/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 +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
|
@@ -10,6 +10,7 @@ import { HistoricalCurveElementStatus } from './historical-curve-element-status'
|
|
|
10
10
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
11
11
|
import { GlobalSettings, DisplayMode } from '../../settings';
|
|
12
12
|
import { CurveType } from '../../model/historical-curve/curve-type';
|
|
13
|
+
import { AxisRangeType } from '../../model/historical-curve/historical-curve-axis-settings';
|
|
13
14
|
export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
14
15
|
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId) {
|
|
15
16
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
@@ -21,13 +22,19 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
21
22
|
marginRight: 20,
|
|
22
23
|
mobileMinWidth: 450,
|
|
23
24
|
operationAreaHeight: 32,
|
|
24
|
-
operationAreaMarginTop:
|
|
25
|
+
operationAreaMarginTop: 25,
|
|
25
26
|
operationSelectFontSize: '16px',
|
|
26
27
|
operationButtonWidth: 24,
|
|
27
28
|
operationButtonHeight: 24,
|
|
28
29
|
operationButtonMargin: 4
|
|
29
30
|
};
|
|
30
31
|
this.elementStatus = HistoricalCurveElementStatus.Loading;
|
|
32
|
+
this.data = [];
|
|
33
|
+
this.needResize = true;
|
|
34
|
+
this.setNeedResize = () => {
|
|
35
|
+
this.needResize = false;
|
|
36
|
+
setTimeout(() => this.needResize = true, 500);
|
|
37
|
+
};
|
|
31
38
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
32
39
|
this.localization = injector.get(LOCALIZATION);
|
|
33
40
|
this.timePeriods = this.getValidTimePeriods();
|
|
@@ -38,7 +45,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
38
45
|
}, this.model.displaySetting.refreshInterval * 1000);
|
|
39
46
|
this.isMobileMode = DisplayMode.Mobile === injector.get(GlobalSettings).displayMode;
|
|
40
47
|
if (this.isMobileMode) {
|
|
41
|
-
this.displayOption.operationAreaMarginTop =
|
|
48
|
+
this.displayOption.operationAreaMarginTop = 35;
|
|
42
49
|
if (this.model.displaySetting.size.width >= this.displayOption.mobileMinWidth) {
|
|
43
50
|
this.displayOption.operationAreaHeight = 68;
|
|
44
51
|
this.displayOption.operationSelectFontSize = '24px';
|
|
@@ -48,17 +55,34 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
this.loadFirstPage();
|
|
58
|
+
this.initKeyboardListener();
|
|
51
59
|
}
|
|
52
60
|
dispose() {
|
|
53
61
|
clearInterval(this.refreshIntervalId);
|
|
54
62
|
if (this.chartElement) {
|
|
55
63
|
this.chartElement.tooltip.hidden(true);
|
|
56
64
|
}
|
|
65
|
+
if (this.resizeEventListener) {
|
|
66
|
+
this.resizeEventListener.clear();
|
|
67
|
+
}
|
|
68
|
+
if (this.isAndroid) {
|
|
69
|
+
window.removeEventListener('native.keyboardshow', this.setNeedResize);
|
|
70
|
+
window.removeEventListener('native.keyboardhide', this.setNeedResize);
|
|
71
|
+
}
|
|
57
72
|
this.logger.debug(`[GUI]Dispose Histoical Curve Refresh Interval:${d3.time.format('%x %X')(new Date())}`);
|
|
58
73
|
}
|
|
74
|
+
initKeyboardListener() {
|
|
75
|
+
this.isAndroid = !!navigator.userAgent.match(/(Android)/i);
|
|
76
|
+
if (this.isAndroid) {
|
|
77
|
+
window.addEventListener('native.keyboardshow', this.setNeedResize);
|
|
78
|
+
window.addEventListener('native.keyboardhide', this.setNeedResize);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
59
81
|
getValidTimePeriods() {
|
|
60
82
|
const timePeriods = new Array();
|
|
83
|
+
timePeriods.push({ key: 6, name: this.localization.lastThirtyMinutes });
|
|
61
84
|
timePeriods.push({ key: 1, name: this.localization.lastOneHour });
|
|
85
|
+
timePeriods.push({ key: 7, name: this.localization.lastEightHour });
|
|
62
86
|
timePeriods.push({ key: 2, name: this.localization.lastTwentyFourHours });
|
|
63
87
|
timePeriods.push({ key: 3, name: this.localization.lastSevenDays });
|
|
64
88
|
timePeriods.push({ key: 4, name: this.localization.lastThirtyDays });
|
|
@@ -84,6 +108,12 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
84
108
|
case 5:
|
|
85
109
|
this.startTime = moment().subtract(1, 'years');
|
|
86
110
|
break;
|
|
111
|
+
case 6:
|
|
112
|
+
this.startTime = moment().subtract(30, 'minutes');
|
|
113
|
+
break;
|
|
114
|
+
case 7:
|
|
115
|
+
this.startTime = moment().subtract(8, 'hours');
|
|
116
|
+
break;
|
|
87
117
|
default:
|
|
88
118
|
this.startTime = moment().subtract(1, 'days');
|
|
89
119
|
}
|
|
@@ -122,6 +152,28 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
122
152
|
}
|
|
123
153
|
});
|
|
124
154
|
}
|
|
155
|
+
setupTooltipAutoHide(chart) {
|
|
156
|
+
const chartContainer = this.rootElement.select('.nv-focus').node();
|
|
157
|
+
if (!chartContainer || !chart)
|
|
158
|
+
return;
|
|
159
|
+
let timeoutId;
|
|
160
|
+
// 鼠标移入图表时显示 tooltip
|
|
161
|
+
chartContainer.addEventListener('mouseover', () => {
|
|
162
|
+
hideTooltipAfterDelay();
|
|
163
|
+
});
|
|
164
|
+
const clearTooltipTimeout = () => {
|
|
165
|
+
if (timeoutId) {
|
|
166
|
+
clearTimeout(timeoutId);
|
|
167
|
+
timeoutId = null;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const hideTooltipAfterDelay = () => {
|
|
171
|
+
clearTooltipTimeout();
|
|
172
|
+
timeoutId = setTimeout(() => {
|
|
173
|
+
chart.tooltip.hidden(true);
|
|
174
|
+
}, 2000); // 2秒延迟
|
|
175
|
+
};
|
|
176
|
+
}
|
|
125
177
|
renderChart(result) {
|
|
126
178
|
const chartWidth = this.model.displaySetting.size.width;
|
|
127
179
|
const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
|
|
@@ -131,19 +183,71 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
131
183
|
each(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[key] }));
|
|
132
184
|
data.push({ key: channel.name, area: channel.projectEnabled, values: values });
|
|
133
185
|
});
|
|
186
|
+
this.data = data;
|
|
134
187
|
nv.addGraph(() => {
|
|
188
|
+
let chart;
|
|
135
189
|
if (this.model.displaySetting.curveType === CurveType.BarGroup || this.model.displaySetting.curveType === CurveType.BarStack) {
|
|
136
|
-
|
|
190
|
+
chart = this.getMultiBarWithFocusChart(chartWidth, chartHeight, data);
|
|
137
191
|
}
|
|
138
192
|
else {
|
|
139
|
-
|
|
193
|
+
chart = this.getLineChart(chartWidth, chartHeight, data);
|
|
140
194
|
}
|
|
195
|
+
// 设置 tooltip 自动隐藏逻辑
|
|
196
|
+
this.setupTooltipAutoHide(chart);
|
|
197
|
+
return chart;
|
|
141
198
|
});
|
|
142
199
|
}
|
|
200
|
+
initPoint() {
|
|
201
|
+
try {
|
|
202
|
+
const legendList = this.$element
|
|
203
|
+
.find('.nv-legend')
|
|
204
|
+
.find('.nv-series');
|
|
205
|
+
let hiddenCount = 0;
|
|
206
|
+
for (let i = 0; i < this.data.length; i++) {
|
|
207
|
+
const channel = this.model.dataSetting.channels[i];
|
|
208
|
+
if (legendList.eq(i).children().eq(0).css('fill-opacity') === '1') {
|
|
209
|
+
const pointList = this.$element
|
|
210
|
+
.find('.nv-scatterWrap')
|
|
211
|
+
.find('.nv-series-' + (i - hiddenCount))
|
|
212
|
+
.find('.nv-point');
|
|
213
|
+
if (pointList && pointList.length) {
|
|
214
|
+
for (let j = 0; j < pointList.length; j++) {
|
|
215
|
+
const point = pointList.eq(j);
|
|
216
|
+
const previousPoint = pointList.eq(j - 1);
|
|
217
|
+
if (j && point.attr('transform').split(',')[1] !== previousPoint.attr('transform').split(',')[1]) {
|
|
218
|
+
if (channel.enablePoint && channel.pointColor) {
|
|
219
|
+
const pointStyle = {
|
|
220
|
+
'stroke-opacity': 1,
|
|
221
|
+
'stroke-width': '2px',
|
|
222
|
+
'stroke': channel.pointColor,
|
|
223
|
+
'fill-opacity': 1,
|
|
224
|
+
'fill': channel.pointColor
|
|
225
|
+
};
|
|
226
|
+
point.addClass('nv-mark-point');
|
|
227
|
+
point.css(pointStyle);
|
|
228
|
+
previousPoint.addClass('nv-mark-point');
|
|
229
|
+
previousPoint.css(pointStyle);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
hiddenCount++;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
catch (e) {
|
|
241
|
+
console.log(e);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
143
244
|
getLineChart(chartWidth, chartHeight, data) {
|
|
144
245
|
const chart = nv.models.lineChart().showLegend(true)
|
|
145
246
|
.margin({ top: 0, bottom: 0, left: this.displayOption.marginLeft, right: this.displayOption.marginRight })
|
|
146
247
|
.noData(this.localization.chartNoData);
|
|
248
|
+
if (this.model.displaySetting.axisSetting.yAxisRangeType === AxisRangeType.Custom) {
|
|
249
|
+
chart.yDomain([this.model.displaySetting.axisSetting.yAxisMin, this.model.displaySetting.axisSetting.yAxisMax]);
|
|
250
|
+
}
|
|
147
251
|
if (!this.isMobileMode) {
|
|
148
252
|
chart.focusEnable(true);
|
|
149
253
|
chart.focus.margin({ top: 10, right: 0, bottom: 0, left: 0 });
|
|
@@ -152,6 +256,19 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
152
256
|
}
|
|
153
257
|
this.renderCommonProperty(chart, chartWidth, chartHeight, data);
|
|
154
258
|
this.renderOperationArea(chartWidth, chartHeight);
|
|
259
|
+
this.initPoint();
|
|
260
|
+
chart.legend.dispatch.on('legendClick', () => {
|
|
261
|
+
setTimeout(() => {
|
|
262
|
+
this.$element.find('.nv-mark-point').css({
|
|
263
|
+
'stroke-opacity': 0,
|
|
264
|
+
'stroke-width': 0,
|
|
265
|
+
'stroke': 'unset',
|
|
266
|
+
'fill-opacity': 0,
|
|
267
|
+
'fill': 'unset'
|
|
268
|
+
}).removeClass('nv-mark-point');
|
|
269
|
+
this.initPoint();
|
|
270
|
+
}, 1);
|
|
271
|
+
});
|
|
155
272
|
return chart;
|
|
156
273
|
}
|
|
157
274
|
getMultiBarWithFocusChart(chartWidth, chartHeight, data) {
|
|
@@ -168,6 +285,9 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
168
285
|
chart.multibar.stacked(true);
|
|
169
286
|
chart.multibar2.stacked(true);
|
|
170
287
|
}
|
|
288
|
+
if (this.model.displaySetting.axisSetting.yAxisRangeType === AxisRangeType.Custom) {
|
|
289
|
+
chart.yDomain([this.model.displaySetting.axisSetting.yAxisMin, this.model.displaySetting.axisSetting.yAxisMax]);
|
|
290
|
+
}
|
|
171
291
|
if (!this.isMobileMode) {
|
|
172
292
|
chart.focusEnable(true);
|
|
173
293
|
chart.focusShowAxisX(false);
|
|
@@ -188,9 +308,27 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
188
308
|
return chart;
|
|
189
309
|
}
|
|
190
310
|
renderCommonProperty(chart, chartWidth, chartHeight, data) {
|
|
311
|
+
var _a, _b;
|
|
191
312
|
chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
|
|
192
313
|
if (this.model.displaySetting.showAxis) {
|
|
193
|
-
chart.xAxis.showMaxMin(true).tickFormat(d =>
|
|
314
|
+
chart.xAxis.showMaxMin(true).tickFormat(d => {
|
|
315
|
+
this.$element.find('.nv-mark-point').css({
|
|
316
|
+
'stroke-opacity': 0,
|
|
317
|
+
'stroke-width': 0,
|
|
318
|
+
'stroke': 'unset',
|
|
319
|
+
'fill-opacity': 0,
|
|
320
|
+
'fill': 'unset'
|
|
321
|
+
}).removeClass('nv-mark-point');
|
|
322
|
+
clearTimeout(this.timer);
|
|
323
|
+
this.timer = undefined;
|
|
324
|
+
this.timer = setTimeout(() => {
|
|
325
|
+
this.initPoint();
|
|
326
|
+
}, 100);
|
|
327
|
+
if (this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
|
|
328
|
+
return this.timeFormat(d, '%y-%m-%d');
|
|
329
|
+
}
|
|
330
|
+
return this.timeFormat(Number(d), '%X');
|
|
331
|
+
});
|
|
194
332
|
if (this.model.displaySetting.axisSetting) {
|
|
195
333
|
if (this.model.displaySetting.axisSetting.showAxisLabel && this.model.displaySetting.axisSetting.axisLabelFont) {
|
|
196
334
|
chart.xAxis.fontSize(this.model.displaySetting.axisSetting.axisLabelFont.fontSize);
|
|
@@ -211,47 +349,148 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
211
349
|
chart.color(this.model.dataSetting.channels.map(c => c.connectorColor));
|
|
212
350
|
this.rootElement.append('g').datum(data).call(chart);
|
|
213
351
|
this.rootElement.selectAll('.nv-noData').attr('x', chartWidth / 2).attr('y', chartHeight / 2 + this.displayOption.operationAreaHeight);
|
|
214
|
-
nv.utils.windowResize(() => {
|
|
352
|
+
this.resizeEventListener = nv.utils.windowResize(() => {
|
|
353
|
+
if (!this.needResize)
|
|
354
|
+
return;
|
|
215
355
|
chart.update();
|
|
216
356
|
this.rootElement.selectAll('.nv-noData').attr('x', chartWidth / 2).attr('y', chartHeight / 2 + this.displayOption.operationAreaHeight);
|
|
217
357
|
});
|
|
358
|
+
const fontSize = (_b = (_a = this.model.displaySetting.axisSetting) === null || _a === void 0 ? void 0 : _a.axisLabelFont) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
218
359
|
this.rootElement.selectAll('.domain').style('stroke-opacity', 1);
|
|
219
360
|
if (this.model.displaySetting.showAxis && this.model.displaySetting.axisSetting) {
|
|
220
361
|
const axisColor = this.model.displaySetting.axisSetting.axisColor;
|
|
221
362
|
this.rootElement.selectAll('.domain').style('stroke', axisColor);
|
|
222
|
-
if (this.model.displaySetting.axisSetting.showAxisLabel) {
|
|
223
|
-
const fontSize = this.model.displaySetting.axisSetting.axisLabelFont.fontSize;
|
|
363
|
+
if (fontSize && this.model.displaySetting.axisSetting.showAxisLabel) {
|
|
224
364
|
this.rootElement.selectAll('.nv-axisMaxMin').select('text').style('font-size', fontSize);
|
|
225
365
|
}
|
|
226
366
|
}
|
|
367
|
+
let strokeWidth = 0;
|
|
368
|
+
if (this.model.displaySetting.axisSetting.showTick !== false) {
|
|
369
|
+
strokeWidth = 1;
|
|
370
|
+
}
|
|
371
|
+
this.rootElement
|
|
372
|
+
.selectAll('.nv-x')
|
|
373
|
+
.selectAll('.tick')
|
|
374
|
+
.selectAll('line')
|
|
375
|
+
.attr('style', `stroke:${this.model.displaySetting.axisSetting.xAxisTickColor || 'rgb(127, 147, 159)'};stroke-width:${strokeWidth};`);
|
|
376
|
+
this.rootElement
|
|
377
|
+
.selectAll('.nv-y')
|
|
378
|
+
.selectAll('.tick')
|
|
379
|
+
.selectAll('line')
|
|
380
|
+
.attr('style', `stroke:${this.model.displaySetting.axisSetting.yAxisTickColor || 'rgb(127, 147, 159)'};stroke-width:${strokeWidth};`);
|
|
381
|
+
if (fontSize && this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
|
|
382
|
+
const self = this;
|
|
383
|
+
this.rootElement
|
|
384
|
+
.selectAll('.nv-x')
|
|
385
|
+
.selectAll('.tick')
|
|
386
|
+
.selectAll('text')
|
|
387
|
+
.data(function (d) {
|
|
388
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
389
|
+
})
|
|
390
|
+
.enter()
|
|
391
|
+
.append('text')
|
|
392
|
+
.attr('class', 'full-date')
|
|
393
|
+
.attr('x', 0)
|
|
394
|
+
.attr('y', 0)
|
|
395
|
+
.attr('dy', '2.3em')
|
|
396
|
+
.style('text-anchor', 'middle')
|
|
397
|
+
.style('font-size', fontSize)
|
|
398
|
+
.text((d) => d);
|
|
399
|
+
this.rootElement
|
|
400
|
+
.selectAll('.nv-axisMaxMin-x')
|
|
401
|
+
.selectAll('text')
|
|
402
|
+
.data(function (d) {
|
|
403
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
404
|
+
})
|
|
405
|
+
.enter()
|
|
406
|
+
.append('text')
|
|
407
|
+
.attr('class', 'full-date')
|
|
408
|
+
.attr('x', 0)
|
|
409
|
+
.attr('y', 0)
|
|
410
|
+
.attr('dy', '2.3em')
|
|
411
|
+
.style('text-anchor', 'middle')
|
|
412
|
+
.style('font-size', fontSize)
|
|
413
|
+
.text((d) => d);
|
|
414
|
+
const focusWrap = this.rootElement.selectAll('.nv-focusWrap');
|
|
415
|
+
if (focusWrap.size()) {
|
|
416
|
+
let h = focusWrap.attr('transform');
|
|
417
|
+
if (h && h.length && h.indexOf(',') !== -1) {
|
|
418
|
+
h = h.slice(0, -1).split(',')[1];
|
|
419
|
+
this.rootElement
|
|
420
|
+
.selectAll('.nv-focusWrap')
|
|
421
|
+
.attr('transform', `translate(0,${Number(h) + 15})`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
const resizeObserver = new window.MutationObserver(() => {
|
|
425
|
+
this.rootElement
|
|
426
|
+
.selectAll('.nv-x')
|
|
427
|
+
.selectAll('.tick')
|
|
428
|
+
.selectAll('.full-date')
|
|
429
|
+
.remove();
|
|
430
|
+
this.rootElement
|
|
431
|
+
.selectAll('.nv-x')
|
|
432
|
+
.selectAll('.tick')
|
|
433
|
+
.selectAll('text')
|
|
434
|
+
.data(function (d) {
|
|
435
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
436
|
+
})
|
|
437
|
+
.enter()
|
|
438
|
+
.append('text')
|
|
439
|
+
.attr('class', 'full-date')
|
|
440
|
+
.attr('x', 0)
|
|
441
|
+
.attr('y', 0)
|
|
442
|
+
.attr('dy', '2.3em')
|
|
443
|
+
.style('text-anchor', 'middle')
|
|
444
|
+
.style('font-size', fontSize)
|
|
445
|
+
.text((d) => d);
|
|
446
|
+
});
|
|
447
|
+
const extent = document.getElementsByClassName('extent');
|
|
448
|
+
if (extent.length) {
|
|
449
|
+
resizeObserver.observe(extent[0], { attributes: true });
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
this.rootElement
|
|
454
|
+
.selectAll('.full-date')
|
|
455
|
+
.remove();
|
|
456
|
+
}
|
|
227
457
|
}
|
|
228
458
|
renderOperationArea(chartWidth, chartHeight) {
|
|
459
|
+
const backgroundColor = this.model.displaySetting.axisSetting.filterBackgroudColor || 'inherit';
|
|
229
460
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
230
461
|
.append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
|
|
231
462
|
.append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
|
|
232
463
|
const selectElement = operationArea.append('select').style('margin-left', this.displayOption.marginLeft + 'px')
|
|
464
|
+
.style('background-color', backgroundColor)
|
|
233
465
|
.style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
|
|
234
466
|
const displayTimePeriod = this.rootElement.select('select').property('value');
|
|
235
467
|
this.updateTimeRange(displayTimePeriod);
|
|
236
468
|
this.reRenderElement(this.startTime, this.endTime, this.displayOption.dataLimit, HistoricalCurveTimeRange.BeginOpenEndOpen);
|
|
237
469
|
});
|
|
470
|
+
const rect = this.$element.parent().parent().find('rect');
|
|
471
|
+
const fillColor = rect.attr('fill');
|
|
238
472
|
const options = selectElement.selectAll('option').data(this.timePeriods).enter().append('option');
|
|
239
|
-
options.text(d => d.name).attr('value', d => d.key).property('selected', d => d.key === Number(this.currentTimePeriod))
|
|
473
|
+
options.text(d => d.name).attr('value', d => d.key).property('selected', d => d.key === Number(this.currentTimePeriod))
|
|
474
|
+
.style('background-color', this.model.displaySetting.axisSetting.filterBackgroudColor || fillColor);
|
|
240
475
|
const buttonWidth = this.displayOption.operationButtonWidth + 'px', buttonHeight = this.displayOption.operationButtonHeight + 'px';
|
|
241
476
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
242
|
-
.style('float', 'right').style('background
|
|
477
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_last_page.png)')
|
|
478
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
243
479
|
.on('click', () => { this.loadLastPage(); });
|
|
244
480
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
245
|
-
.style('float', 'right').style('background
|
|
481
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_next_page.png)')
|
|
246
482
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
483
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
247
484
|
.on('click', () => { this.loadNextPage(); });
|
|
248
485
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
249
|
-
.style('float', 'right').style('background
|
|
486
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_previous_page.png)')
|
|
250
487
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
488
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
251
489
|
.on('click', () => { this.loadPreviousPage(); });
|
|
252
490
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
253
|
-
.style('float', 'right').style('background
|
|
491
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_first_page.png)')
|
|
254
492
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
493
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
255
494
|
.on('click', () => { this.loadFirstPage(); });
|
|
256
495
|
}
|
|
257
496
|
timeFormat(datetime, specifier) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":21,"character":44},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":68,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":69,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":70,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":71,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":72,"character":23},{"__symbolic":"reference","module":"../../config","name":"HistoryDataStore","line":73,"character":43},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"initKeyboardListener":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"reRenderElement":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"setupTooltipAutoHide":[{"__symbolic":"method"}],"renderChart":[{"__symbolic":"method"}],"initPoint":[{"__symbolic":"method"}],"getLineChart":[{"__symbolic":"method"}],"getMultiBarWithFocusChart":[{"__symbolic":"method"}],"renderCommonProperty":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"timeFormat":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}],"initElementStatus":[{"__symbolic":"method"}],"updateElementStatus":[{"__symbolic":"method"}],"setStatusAsUnbound":[{"__symbolic":"method"}],"setStatusAsLoading":[{"__symbolic":"method"}],"setStatusAsLoadFailed":[{"__symbolic":"method"}],"renderStatus":[{"__symbolic":"method"}],"clearStatus":[{"__symbolic":"method"}]}}}}]
|
|
@@ -37,6 +37,7 @@ export declare class MainElement {
|
|
|
37
37
|
initElementState(): void;
|
|
38
38
|
getVariableNames(): Array<string>;
|
|
39
39
|
reportVariableStates(states: VariableState[]): void;
|
|
40
|
+
getVirtualDeviceIdFromRect(rectElement: any): any;
|
|
40
41
|
reportVariableValues(values: VariableValue[]): void;
|
|
41
42
|
dispose(): void;
|
|
42
43
|
private checkIsLoaded;
|
package/elements/main-element.js
CHANGED
|
@@ -27,6 +27,9 @@ import { PolygonElement } from './vector-graphics/polygon-element';
|
|
|
27
27
|
import { HyperlinkElement } from './static-elements/hyperlink-element';
|
|
28
28
|
import { VideoElement } from './video/video-element';
|
|
29
29
|
import { WeatherElement } from './weather/weater-element';
|
|
30
|
+
import { AirQualityElement } from './air-quality/air-quality-element';
|
|
31
|
+
import { AlarmElement } from './alarm/alarm-element';
|
|
32
|
+
import { ScrollAlarmElement } from './scroll-alarm/scroll-alarm-element';
|
|
30
33
|
export class MainElement {
|
|
31
34
|
constructor(injector, bsModalService, context, variableCommunicator, popupViewService, signalRAppId) {
|
|
32
35
|
this.injector = injector;
|
|
@@ -58,7 +61,7 @@ export class MainElement {
|
|
|
58
61
|
const category = $(element).data('model').category;
|
|
59
62
|
switch (category) {
|
|
60
63
|
case GuiConsts.components.numericalDisplayKey:
|
|
61
|
-
const numericalDisplayElement = new NumericalDisplayElement(element, this.injector, this.bsModalService, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.graphStore, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId);
|
|
64
|
+
const numericalDisplayElement = new NumericalDisplayElement(element, this.injector, this.bsModalService, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.graphStore, this.context.operationRecordService, this.context.releasedVariableService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId);
|
|
62
65
|
this.elements.push(numericalDisplayElement);
|
|
63
66
|
break;
|
|
64
67
|
case GuiConsts.components.imageKey:
|
|
@@ -125,6 +128,15 @@ export class MainElement {
|
|
|
125
128
|
case GuiConsts.components.weatherKey:
|
|
126
129
|
this.elements.push(new WeatherElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService, this.signalRAppId));
|
|
127
130
|
break;
|
|
131
|
+
case GuiConsts.components.airQualityKey:
|
|
132
|
+
this.elements.push(new AirQualityElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService, this.signalRAppId));
|
|
133
|
+
break;
|
|
134
|
+
case GuiConsts.components.alarmKey:
|
|
135
|
+
this.elements.push(new AlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
|
|
136
|
+
break;
|
|
137
|
+
case GuiConsts.components.scrollAlarmKey:
|
|
138
|
+
this.elements.push(new ScrollAlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
|
|
139
|
+
break;
|
|
128
140
|
}
|
|
129
141
|
});
|
|
130
142
|
this.initBackground();
|
|
@@ -204,7 +216,7 @@ export class MainElement {
|
|
|
204
216
|
initElementState() {
|
|
205
217
|
forEach(this.elements, element => {
|
|
206
218
|
if (element instanceof ReadableElement) {
|
|
207
|
-
element.init(element.readVariableName);
|
|
219
|
+
element.init(element.readVariableName || element.maxVariableName || element.minVariableName);
|
|
208
220
|
}
|
|
209
221
|
else if (element instanceof HistoricalCurveElement) {
|
|
210
222
|
element.initElementStatus();
|
|
@@ -215,8 +227,20 @@ export class MainElement {
|
|
|
215
227
|
getVariableNames() {
|
|
216
228
|
const variableNames = new Array();
|
|
217
229
|
forEach(this.elements, element => {
|
|
230
|
+
var _a, _b;
|
|
218
231
|
if (element instanceof ReadableElement) {
|
|
232
|
+
const maxVariableName = (_a = element) === null || _a === void 0 ? void 0 : _a.maxVariableName;
|
|
233
|
+
const maxValueType = element.maxValueType;
|
|
234
|
+
const minVariableName = (_b = element) === null || _b === void 0 ? void 0 : _b.minVariableName;
|
|
235
|
+
const minValueType = element.minValueType;
|
|
219
236
|
const variableName = element.readVariableName;
|
|
237
|
+
// 最大最小值选择变量类型时,其中一个未绑定变量不进行开点操作 - FLEXCLOUD-1817
|
|
238
|
+
if (maxValueType && maxVariableName && !variableNames.find(v => isEqual(maxVariableName, v))) {
|
|
239
|
+
variableNames.push(maxVariableName);
|
|
240
|
+
}
|
|
241
|
+
if (minValueType && minVariableName && !variableNames.find(v => isEqual(minVariableName, v))) {
|
|
242
|
+
variableNames.push(minVariableName);
|
|
243
|
+
}
|
|
220
244
|
if (variableName && !variableNames.find(v => isEqual(variableName, v))) {
|
|
221
245
|
variableNames.push(element.readVariableName);
|
|
222
246
|
}
|
|
@@ -237,14 +261,39 @@ export class MainElement {
|
|
|
237
261
|
});
|
|
238
262
|
});
|
|
239
263
|
}
|
|
264
|
+
getVirtualDeviceIdFromRect(rectElement) {
|
|
265
|
+
let current = rectElement;
|
|
266
|
+
while (current) {
|
|
267
|
+
if (current.tagName === 'FC-GUI') {
|
|
268
|
+
const virtualDeviceId = current.getAttribute('data-virtual-device-id');
|
|
269
|
+
return virtualDeviceId || null;
|
|
270
|
+
}
|
|
271
|
+
current = current.parentElement;
|
|
272
|
+
}
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
240
275
|
reportVariableValues(values) {
|
|
241
276
|
this.checkIsLoaded();
|
|
242
277
|
each(values, value => {
|
|
243
278
|
each(this.elements, e => {
|
|
279
|
+
var _a;
|
|
244
280
|
if (e instanceof ReadableElement) {
|
|
245
|
-
if (e.readVariableName === value.variableName
|
|
281
|
+
if ((value.variableName && (e.readVariableName === value.variableName ||
|
|
282
|
+
e.minVariableName === value.variableName || e.maxVariableName === value.variableName))) {
|
|
246
283
|
e.reportValueChanged(value);
|
|
247
284
|
}
|
|
285
|
+
if (e.readVariableName === value.systemName) {
|
|
286
|
+
const rect = (_a = e.currentRect) === null || _a === void 0 ? void 0 : _a[0];
|
|
287
|
+
const deviceId = this.getVirtualDeviceIdFromRect(rect);
|
|
288
|
+
if (deviceId) {
|
|
289
|
+
if (+deviceId === value.virtualDeviceId) {
|
|
290
|
+
e.reportValueChanged(value);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
e.reportValueChanged(value);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
248
297
|
}
|
|
249
298
|
});
|
|
250
299
|
});
|
|
@@ -252,7 +301,8 @@ export class MainElement {
|
|
|
252
301
|
dispose() {
|
|
253
302
|
each(this.elements, e => {
|
|
254
303
|
if (e instanceof HistoricalCurveElement || e instanceof VideoElement
|
|
255
|
-
|| e instanceof WeatherElement || e instanceof NumericalDisplayElement || e instanceof TextElement
|
|
304
|
+
|| e instanceof WeatherElement || e instanceof NumericalDisplayElement || e instanceof TextElement
|
|
305
|
+
|| e instanceof AirQualityElement || e instanceof ScrollAlarmElement) {
|
|
256
306
|
e.dispose();
|
|
257
307
|
}
|
|
258
308
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MainElement":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MainElement":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":56,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":57,"character":41},{"__symbolic":"reference","module":"../gui/gui-context","name":"GuiContext","line":58,"character":34},{"__symbolic":"reference","module":"../communication","name":"VariableCommunicator","line":59,"character":47},{"__symbolic":"reference","module":"../view/popup-view.service","name":"PopupViewService","line":60,"character":43},null]}],"load":[{"__symbolic":"method"}],"uniformStretch":[{"__symbolic":"method"}],"changeVideoStyle":[{"__symbolic":"method"}],"horizontalStretch":[{"__symbolic":"method"}],"initElementState":[{"__symbolic":"method"}],"getVariableNames":[{"__symbolic":"method"}],"reportVariableStates":[{"__symbolic":"method"}],"getVirtualDeviceIdFromRect":[{"__symbolic":"method"}],"reportVariableValues":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"checkIsLoaded":[{"__symbolic":"method"}],"initBackground":[{"__symbolic":"method"}],"getImageEl":[{"__symbolic":"method"}]}}}}]
|
|
@@ -5,16 +5,22 @@ import { ReadableElement } from './base';
|
|
|
5
5
|
import { VariableStore } from '../config';
|
|
6
6
|
import { PermissionChecker } from '../service';
|
|
7
7
|
export declare class MeterElement extends ReadableElement {
|
|
8
|
+
private static DEFAULT_MIN_VALUE;
|
|
9
|
+
private static DEFAULT_MAX_VALUE;
|
|
8
10
|
private readonly $handEl;
|
|
9
11
|
private readonly arcPath$;
|
|
10
12
|
private cx;
|
|
11
13
|
private cy;
|
|
12
14
|
private offsetY;
|
|
13
15
|
private mainElementTransform;
|
|
16
|
+
private valueObj;
|
|
17
|
+
private isNeedUpdateScale;
|
|
14
18
|
readonly model: Meter;
|
|
15
19
|
constructor(element: HTMLElement, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
16
|
-
|
|
20
|
+
private updateValueObj;
|
|
21
|
+
updateVariableValue(value: number, variableName: any): void;
|
|
17
22
|
private initFrameNode;
|
|
23
|
+
private updateScale;
|
|
18
24
|
private getAngle;
|
|
19
25
|
private directionPoint;
|
|
20
26
|
}
|