@flexem/fc-gui 3.0.0-alpha.123 → 3.0.0-alpha.124
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/bundles/@flexem/fc-gui.umd.js +2027 -1221
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/config/alarm/get-alarms-args.d.ts +4 -1
- package/config/alarm/get-alarms-args.js +5 -1
- package/config/alarm/get-alarms-args.metadata.json +1 -1
- package/config/history-data/get-history-data-args.d.ts +14 -3
- package/config/history-data/get-history-data-args.js +5 -3
- package/config/history-data/get-history-data-args.metadata.json +1 -1
- package/elements/alarm/alarm-element.d.ts +13 -3
- package/elements/alarm/alarm-element.js +56 -14
- package/elements/alarm/alarm-element.metadata.json +1 -1
- package/elements/historical-curve/historical-curve.element.d.ts +9 -2
- package/elements/historical-curve/historical-curve.element.js +120 -34
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.js +10 -6
- package/elements/main-element.metadata.json +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +54 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +517 -0
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
- package/elements/shared/graph/graph-state-element.d.ts +0 -1
- package/elements/shared/graph/graph-state-element.js +1 -30
- package/elements/shared/graph/graph-state-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +12 -1
- package/elements/shared/text/text-state-element.js +40 -2
- package/elements/shared/text/text-state-element.metadata.json +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +10 -2
- package/elements/static-elements/hyperlink-element.js +41 -2
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +10 -2
- package/elements/static-elements/text-element.js +41 -2
- package/elements/static-elements/text-element.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +4 -4
- package/elements/switch-indicator-light/switch-indicator-light-element.js +5 -27
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/gui/gui-context.d.ts +4 -1
- package/model/base/font-setting-model.d.ts +6 -0
- package/model/base/font-setting-model.metadata.json +1 -1
- package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
- package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
- package/model/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/switch-indicator-light.d.ts +2 -0
- package/package.json +1 -1
- package/public_api.js +1 -0
- package/service/index.d.ts +3 -0
- package/service/index.js +1 -0
- package/service/index.metadata.json +1 -1
- package/service/language.service.d.ts +37 -0
- package/service/language.service.js +0 -0
- package/service/language.service.metadata.json +1 -0
- package/service/system-text-library.service.d.ts +76 -0
- package/service/system-text-library.service.js +28 -0
- package/service/system-text-library.service.metadata.json +1 -0
- package/service/text-library.service.d.ts +49 -0
- package/service/text-library.service.js +0 -0
- package/service/text-library.service.metadata.json +1 -0
- package/shared/gui-consts.d.ts +1 -0
- package/shared/gui-consts.js +2 -1
- package/shared/gui-consts.metadata.json +1 -1
|
@@ -5,5 +5,8 @@ export declare class GetAlarmsArgs {
|
|
|
5
5
|
readonly triggeredEndTime: moment.Moment;
|
|
6
6
|
readonly maxResultCount: number;
|
|
7
7
|
readonly skipCount: number;
|
|
8
|
-
|
|
8
|
+
readonly state?: number[];
|
|
9
|
+
readonly sorting?: string;
|
|
10
|
+
constructor(alarmNames: string[], triggeredStartTime: moment.Moment, triggeredEndTime: moment.Moment, maxResultCount: number, skipCount: number, state?: number[], // 告警状态数组 (0=触发/未确认, 1=触发/已确认, 2=恢复/未确认, 3=恢复/已确认)
|
|
11
|
+
sorting?: string);
|
|
9
12
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export class GetAlarmsArgs {
|
|
2
|
-
constructor(alarmNames, triggeredStartTime, triggeredEndTime, maxResultCount, skipCount)
|
|
2
|
+
constructor(alarmNames, triggeredStartTime, triggeredEndTime, maxResultCount, skipCount, state, // 告警状态数组 (0=触发/未确认, 1=触发/已确认, 2=恢复/未确认, 3=恢复/已确认)
|
|
3
|
+
sorting // 排序字段 (如: "TriggeredTime DESC" 或 "TriggeredTime ASC")
|
|
4
|
+
) {
|
|
3
5
|
this.alarmNames = alarmNames;
|
|
4
6
|
this.triggeredStartTime = triggeredStartTime;
|
|
5
7
|
this.triggeredEndTime = triggeredEndTime;
|
|
6
8
|
this.maxResultCount = maxResultCount;
|
|
7
9
|
this.skipCount = skipCount;
|
|
10
|
+
this.state = state;
|
|
11
|
+
this.sorting = sorting;
|
|
8
12
|
}
|
|
9
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GetAlarmsArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"string"}]},{"__symbolic":"reference","module":"moment","name":"Moment","line":5,"character":37},{"__symbolic":"reference","module":"moment","name":"Moment","line":6,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"}]}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GetAlarmsArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"string"}]},{"__symbolic":"reference","module":"moment","name":"Moment","line":5,"character":37},{"__symbolic":"reference","module":"moment","name":"Moment","line":6,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"number"}]},{"__symbolic":"reference","name":"string"}]}]}}}}]
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import * as moment from 'moment';
|
|
2
2
|
import { HistoricalCurveTimeRange } from './historical-curve.time-range';
|
|
3
|
+
/**
|
|
4
|
+
* 单个历史数据条目查询参数
|
|
5
|
+
*/
|
|
6
|
+
export interface HistoryDataItemArgs {
|
|
7
|
+
/** 历史数据条目名称 */
|
|
8
|
+
dataItemName: string;
|
|
9
|
+
/** 该条目下的通道名称列表 */
|
|
10
|
+
channelNames: Array<string>;
|
|
11
|
+
}
|
|
3
12
|
export declare class GetHistoryDataArgs {
|
|
4
13
|
readonly dataSourceCode: number;
|
|
5
14
|
readonly dataItemName: string;
|
|
@@ -8,15 +17,17 @@ export declare class GetHistoryDataArgs {
|
|
|
8
17
|
readonly endTime: moment.Moment;
|
|
9
18
|
readonly limit: number;
|
|
10
19
|
readonly rangeType: HistoricalCurveTimeRange;
|
|
20
|
+
readonly historyDataItems?: Array<HistoryDataItemArgs>;
|
|
11
21
|
/**
|
|
12
22
|
* 获取历史数据参数
|
|
13
23
|
* @param dataSourceCode 数据源编码
|
|
14
|
-
* @param dataItemName
|
|
15
|
-
* @param channelNames
|
|
24
|
+
* @param dataItemName 历史数据条目名称(单条目模式,兼容旧版)
|
|
25
|
+
* @param channelNames 通道名称(单条目模式,兼容旧版)
|
|
16
26
|
* @param startTime 开始时间
|
|
17
27
|
* @param endTime 结束时间
|
|
18
28
|
* @param limit 获取数据数量,为负数则倒叙
|
|
19
29
|
* @param rangeType 区间类型
|
|
30
|
+
* @param historyDataItems 多条目模式:多个历史数据条目及其通道配置
|
|
20
31
|
*/
|
|
21
|
-
constructor(dataSourceCode: number, dataItemName: string, channelNames: Array<string>, startTime: moment.Moment, endTime: moment.Moment, limit: number, rangeType: HistoricalCurveTimeRange);
|
|
32
|
+
constructor(dataSourceCode: number, dataItemName: string, channelNames: Array<string>, startTime: moment.Moment, endTime: moment.Moment, limit: number, rangeType: HistoricalCurveTimeRange, historyDataItems?: Array<HistoryDataItemArgs>);
|
|
22
33
|
}
|
|
@@ -2,14 +2,15 @@ export class GetHistoryDataArgs {
|
|
|
2
2
|
/**
|
|
3
3
|
* 获取历史数据参数
|
|
4
4
|
* @param dataSourceCode 数据源编码
|
|
5
|
-
* @param dataItemName
|
|
6
|
-
* @param channelNames
|
|
5
|
+
* @param dataItemName 历史数据条目名称(单条目模式,兼容旧版)
|
|
6
|
+
* @param channelNames 通道名称(单条目模式,兼容旧版)
|
|
7
7
|
* @param startTime 开始时间
|
|
8
8
|
* @param endTime 结束时间
|
|
9
9
|
* @param limit 获取数据数量,为负数则倒叙
|
|
10
10
|
* @param rangeType 区间类型
|
|
11
|
+
* @param historyDataItems 多条目模式:多个历史数据条目及其通道配置
|
|
11
12
|
*/
|
|
12
|
-
constructor(dataSourceCode, dataItemName, channelNames, startTime, endTime, limit, rangeType) {
|
|
13
|
+
constructor(dataSourceCode, dataItemName, channelNames, startTime, endTime, limit, rangeType, historyDataItems) {
|
|
13
14
|
this.dataSourceCode = dataSourceCode;
|
|
14
15
|
this.dataItemName = dataItemName;
|
|
15
16
|
this.channelNames = channelNames;
|
|
@@ -17,5 +18,6 @@ export class GetHistoryDataArgs {
|
|
|
17
18
|
this.endTime = endTime;
|
|
18
19
|
this.limit = limit;
|
|
19
20
|
this.rangeType = rangeType;
|
|
21
|
+
this.historyDataItems = historyDataItems;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GetHistoryDataArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoryDataItemArgs":{"__symbolic":"interface"},"GetHistoryDataArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"moment","name":"Moment","line":28,"character":28},{"__symbolic":"reference","module":"moment","name":"Moment","line":29,"character":26},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"./historical-curve.time-range","name":"HistoricalCurveTimeRange","line":31,"character":28},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}}}}]
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import { PermissionChecker } from '../../service';
|
|
2
|
+
import { PermissionChecker, SystemTextLibraryService, LanguageService } from '../../service';
|
|
3
3
|
import { VariableCommunicator } from '../../communication';
|
|
4
4
|
import { ConditionalDisplayElement } from '../base/conditional-display-element';
|
|
5
5
|
import { AlarmModel } from '../../model/alarm/alarm.model';
|
|
6
6
|
import { AlarmsStore, VariableStore } from '../../config';
|
|
7
7
|
export declare class AlarmElement extends ConditionalDisplayElement {
|
|
8
8
|
private readonly alarmsStore;
|
|
9
|
+
private readonly systemTextLibraryService?;
|
|
10
|
+
private readonly languageService?;
|
|
9
11
|
readonly model: AlarmModel;
|
|
10
12
|
private readonly logger;
|
|
11
13
|
readonly variableCommunicator: VariableCommunicator;
|
|
12
|
-
private readonly localization;
|
|
13
14
|
private readonly timePeriods;
|
|
14
15
|
private elementStatus;
|
|
15
16
|
private element;
|
|
@@ -25,9 +26,18 @@ export declare class AlarmElement extends ConditionalDisplayElement {
|
|
|
25
26
|
private totalCount;
|
|
26
27
|
private pageSize;
|
|
27
28
|
private getAlarmDataId;
|
|
28
|
-
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, alarmsStore: AlarmsStore, signalRAppId: string);
|
|
29
|
+
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, alarmsStore: AlarmsStore, signalRAppId: string, systemTextLibraryService?: SystemTextLibraryService, languageService?: LanguageService);
|
|
29
30
|
dispose(): void;
|
|
31
|
+
/**
|
|
32
|
+
* 根据列索引获取表头翻译(从系统文本库获取多语种翻译)
|
|
33
|
+
* 固定4项表头,按列索引顺序:告警名称、告警内容、告警等级、时间
|
|
34
|
+
*/
|
|
35
|
+
private getHeaderTextByColumn;
|
|
30
36
|
private getValidTimePeriods;
|
|
37
|
+
/**
|
|
38
|
+
* 获取时间段文案(从系统文本库获取多语种翻译,fallback 使用 localization)
|
|
39
|
+
*/
|
|
40
|
+
private getTimePeriodText;
|
|
31
41
|
private getAlarmData;
|
|
32
42
|
private renderElement;
|
|
33
43
|
private renderOperationArea;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import * as d3 from 'd3';
|
|
2
|
+
import { SYSTEM_TEXT_LIBRARY_TYPES, ALARM_TABLE_HEADER_KEYS, TIME_PERIOD_KEYS } from '../../service';
|
|
2
3
|
import { ConditionalDisplayElement } from '../base/conditional-display-element';
|
|
3
4
|
import { GetAlarmsArgs } from '../../config';
|
|
4
5
|
import * as moment from 'moment';
|
|
5
6
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
6
|
-
import { LOCALIZATION } from '../../localization';
|
|
7
7
|
var AlaertElementStatus;
|
|
8
8
|
(function (AlaertElementStatus) {
|
|
9
9
|
AlaertElementStatus[AlaertElementStatus["Normal"] = 0] = "Normal";
|
|
10
10
|
AlaertElementStatus[AlaertElementStatus["Loading"] = 1] = "Loading"; // 加载中
|
|
11
11
|
})(AlaertElementStatus || (AlaertElementStatus = {}));
|
|
12
12
|
export class AlarmElement extends ConditionalDisplayElement {
|
|
13
|
-
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
|
|
13
|
+
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId, systemTextLibraryService, languageService) {
|
|
14
14
|
var _a;
|
|
15
15
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
16
16
|
this.alarmsStore = alarmsStore;
|
|
17
|
+
this.systemTextLibraryService = systemTextLibraryService;
|
|
18
|
+
this.languageService = languageService;
|
|
17
19
|
this.elementStatus = AlaertElementStatus.Loading;
|
|
18
20
|
this.displayOption = {
|
|
19
21
|
dataLimit: 500,
|
|
@@ -37,7 +39,6 @@ export class AlarmElement extends ConditionalDisplayElement {
|
|
|
37
39
|
this.rootElement.selectAll('*').remove();
|
|
38
40
|
this.setStatusAsLoading();
|
|
39
41
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
40
|
-
this.localization = injector.get(LOCALIZATION);
|
|
41
42
|
this.variableCommunicator = variableCommunicator;
|
|
42
43
|
this.timePeriods = this.getValidTimePeriods();
|
|
43
44
|
this.pageSize = this.model.generalSetting.pageSize;
|
|
@@ -77,17 +78,58 @@ export class AlarmElement extends ConditionalDisplayElement {
|
|
|
77
78
|
}
|
|
78
79
|
this.logger.debug(`[GUI]Dispose Alarm Table Refresh Interval:${d3.time.format('%x %X')(new Date())}`);
|
|
79
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* 根据列索引获取表头翻译(从系统文本库获取多语种翻译)
|
|
83
|
+
* 固定4项表头,按列索引顺序:告警名称、告警内容、告警等级、时间
|
|
84
|
+
*/
|
|
85
|
+
getHeaderTextByColumn(columnIndex) {
|
|
86
|
+
var _a;
|
|
87
|
+
if (columnIndex < 0 || columnIndex > 3) {
|
|
88
|
+
return '';
|
|
89
|
+
}
|
|
90
|
+
const currentCulture = ((_a = this.languageService) === null || _a === void 0 ? void 0 : _a.getDefaultLanguage()) || 'zh-CN';
|
|
91
|
+
const systemType = SYSTEM_TEXT_LIBRARY_TYPES.COMPONENT_BUILTIN;
|
|
92
|
+
const headerKeys = [
|
|
93
|
+
ALARM_TABLE_HEADER_KEYS.ALARM_NAME,
|
|
94
|
+
ALARM_TABLE_HEADER_KEYS.ALARM_MESSAGE,
|
|
95
|
+
ALARM_TABLE_HEADER_KEYS.ALARM_LEVEL,
|
|
96
|
+
ALARM_TABLE_HEADER_KEYS.TIME
|
|
97
|
+
];
|
|
98
|
+
// 尝试从系统文本库获取翻译
|
|
99
|
+
if (this.systemTextLibraryService) {
|
|
100
|
+
const translation = this.systemTextLibraryService.getSystemTextValue(systemType, headerKeys[columnIndex], currentCulture);
|
|
101
|
+
if (translation) {
|
|
102
|
+
return translation;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
80
107
|
getValidTimePeriods() {
|
|
81
108
|
const timePeriods = new Array();
|
|
82
|
-
timePeriods.push({ key: 6, name: this.
|
|
83
|
-
timePeriods.push({ key: 1, name: this.
|
|
84
|
-
timePeriods.push({ key: 7, name: this.
|
|
85
|
-
timePeriods.push({ key: 2, name: this.
|
|
86
|
-
timePeriods.push({ key: 3, name: this.
|
|
87
|
-
timePeriods.push({ key: 4, name: this.
|
|
88
|
-
timePeriods.push({ key: 5, name: this.
|
|
109
|
+
timePeriods.push({ key: 6, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_THIRTY_MINUTES) });
|
|
110
|
+
timePeriods.push({ key: 1, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_ONE_HOUR) });
|
|
111
|
+
timePeriods.push({ key: 7, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_EIGHT_HOURS) });
|
|
112
|
+
timePeriods.push({ key: 2, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_TWENTY_FOUR_HOURS) });
|
|
113
|
+
timePeriods.push({ key: 3, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_SEVEN_DAYS) });
|
|
114
|
+
timePeriods.push({ key: 4, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_THIRTY_DAYS) });
|
|
115
|
+
timePeriods.push({ key: 5, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_ONE_YEAR) });
|
|
89
116
|
return timePeriods;
|
|
90
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* 获取时间段文案(从系统文本库获取多语种翻译,fallback 使用 localization)
|
|
120
|
+
*/
|
|
121
|
+
getTimePeriodText(textKey) {
|
|
122
|
+
var _a;
|
|
123
|
+
const currentCulture = ((_a = this.languageService) === null || _a === void 0 ? void 0 : _a.getDefaultLanguage()) || 'zh-CN';
|
|
124
|
+
const systemType = SYSTEM_TEXT_LIBRARY_TYPES.COMPONENT_BUILTIN;
|
|
125
|
+
if (this.systemTextLibraryService) {
|
|
126
|
+
const translation = this.systemTextLibraryService.getSystemTextValue(systemType, textKey, currentCulture);
|
|
127
|
+
if (translation) {
|
|
128
|
+
return translation;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return '';
|
|
132
|
+
}
|
|
91
133
|
getAlarmData() {
|
|
92
134
|
this.rootElement.selectAll('*').remove();
|
|
93
135
|
this.setStatusAsLoading();
|
|
@@ -157,13 +199,13 @@ export class AlarmElement extends ConditionalDisplayElement {
|
|
|
157
199
|
text-align: ${this.model.generalSetting.headerFont.textAlign};
|
|
158
200
|
${this.model.generalSetting.headerFont.isUnderline ? 'text-decoration: underline' : ''};
|
|
159
201
|
vertical-align: middle;`;
|
|
160
|
-
for (let
|
|
202
|
+
for (let col = 0; col < 4; col++) {
|
|
161
203
|
const th = document.createElement('th');
|
|
162
|
-
th.innerHTML = this.
|
|
163
|
-
th.style.cssText = `width: ${this.model.widths[
|
|
204
|
+
th.innerHTML = this.getHeaderTextByColumn(col);
|
|
205
|
+
th.style.cssText = `width: ${this.model.widths[col] / this.model.size.width * 100}%;
|
|
164
206
|
border-style: solid;
|
|
165
207
|
border-color: ${this.model.generalSetting.splitLine};
|
|
166
|
-
border-left-width: ${!
|
|
208
|
+
border-left-width: ${!col || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
|
|
167
209
|
tr.appendChild(th);
|
|
168
210
|
}
|
|
169
211
|
table.appendChild(tr);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"AlarmElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AlarmElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":19,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":52,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":53,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":54,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":55,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":56,"character":23},{"__symbolic":"reference","module":"../../config","name":"AlarmsStore","line":57,"character":38},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"SystemTextLibraryService","line":59,"character":52},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":60,"character":43}]}],"dispose":[{"__symbolic":"method"}],"getHeaderTextByColumn":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"getTimePeriodText":[{"__symbolic":"method"}],"getAlarmData":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}],"setStatusAsNormal":[{"__symbolic":"method"}],"setStatusAsLoading":[{"__symbolic":"method"}],"renderStatus":[{"__symbolic":"method"}],"clearStatus":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { VariableCommunicator } from '../../communication';
|
|
2
2
|
import { HistoryDataStore, VariableStore } from '../../config';
|
|
3
3
|
import { HistoricalCurveModel } from '../../model/historical-curve/historical-curve.model';
|
|
4
|
-
import { PermissionChecker } from '../../service';
|
|
4
|
+
import { PermissionChecker, SystemTextLibraryService, LanguageService } from '../../service';
|
|
5
5
|
import { ConditionalDisplayElement } from '../base/conditional-display-element';
|
|
6
6
|
import { Injector } from '@angular/core';
|
|
7
7
|
export declare class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
8
8
|
private readonly historyDataStore;
|
|
9
|
+
private readonly systemTextLibraryService?;
|
|
10
|
+
private readonly languageService?;
|
|
9
11
|
readonly model: HistoricalCurveModel;
|
|
10
12
|
private readonly logger;
|
|
11
13
|
private readonly localization;
|
|
@@ -37,15 +39,20 @@ export declare class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
37
39
|
private resizeEventListener;
|
|
38
40
|
private isAndroid;
|
|
39
41
|
private needResize;
|
|
40
|
-
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, historyDataStore: HistoryDataStore, signalRAppId: string);
|
|
42
|
+
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, historyDataStore: HistoryDataStore, signalRAppId: string, systemTextLibraryService?: SystemTextLibraryService, languageService?: LanguageService);
|
|
41
43
|
dispose(): void;
|
|
42
44
|
private initKeyboardListener;
|
|
43
45
|
private setNeedResize;
|
|
44
46
|
private getValidTimePeriods;
|
|
47
|
+
/**
|
|
48
|
+
* 获取时间段文案(从系统文本库获取多语种翻译,fallback 使用 localization)
|
|
49
|
+
*/
|
|
50
|
+
private getTimePeriodText;
|
|
45
51
|
private updateTimeRange;
|
|
46
52
|
private updateQueryTimeRange;
|
|
47
53
|
private reRenderElement;
|
|
48
54
|
private renderElement;
|
|
55
|
+
private handleQueryResult;
|
|
49
56
|
setupTooltipAutoHide(chart: any): void;
|
|
50
57
|
private renderChart;
|
|
51
58
|
initPoint(): void;
|
|
@@ -5,6 +5,7 @@ import * as nv from 'nvd3';
|
|
|
5
5
|
import { GetHistoryDataArgs } from '../../config';
|
|
6
6
|
import { HistoricalCurveTimeRange } from '../../config/history-data/historical-curve.time-range';
|
|
7
7
|
import { LOCALIZATION } from '../../localization';
|
|
8
|
+
import { SYSTEM_TEXT_LIBRARY_TYPES, TIME_PERIOD_KEYS } from '../../service';
|
|
8
9
|
import { ConditionalDisplayElement } from '../base/conditional-display-element';
|
|
9
10
|
import { HistoricalCurveElementStatus } from './historical-curve-element-status';
|
|
10
11
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
@@ -12,9 +13,11 @@ import { GlobalSettings, DisplayMode } from '../../settings';
|
|
|
12
13
|
import { CurveType } from '../../model/historical-curve/curve-type';
|
|
13
14
|
import { AxisRangeType } from '../../model/historical-curve/historical-curve-axis-settings';
|
|
14
15
|
export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
15
|
-
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId) {
|
|
16
|
+
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId, systemTextLibraryService, languageService) {
|
|
16
17
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
17
18
|
this.historyDataStore = historyDataStore;
|
|
19
|
+
this.systemTextLibraryService = systemTextLibraryService;
|
|
20
|
+
this.languageService = languageService;
|
|
18
21
|
this.displayOption = {
|
|
19
22
|
dataLimit: 500,
|
|
20
23
|
dataZoomHeight: 32,
|
|
@@ -80,15 +83,30 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
80
83
|
}
|
|
81
84
|
getValidTimePeriods() {
|
|
82
85
|
const timePeriods = new Array();
|
|
83
|
-
timePeriods.push({ key: 6, name: this.
|
|
84
|
-
timePeriods.push({ key: 1, name: this.
|
|
85
|
-
timePeriods.push({ key: 7, name: this.
|
|
86
|
-
timePeriods.push({ key: 2, name: this.
|
|
87
|
-
timePeriods.push({ key: 3, name: this.
|
|
88
|
-
timePeriods.push({ key: 4, name: this.
|
|
89
|
-
timePeriods.push({ key: 5, name: this.
|
|
86
|
+
timePeriods.push({ key: 6, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_THIRTY_MINUTES) });
|
|
87
|
+
timePeriods.push({ key: 1, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_ONE_HOUR) });
|
|
88
|
+
timePeriods.push({ key: 7, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_EIGHT_HOURS) });
|
|
89
|
+
timePeriods.push({ key: 2, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_TWENTY_FOUR_HOURS) });
|
|
90
|
+
timePeriods.push({ key: 3, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_SEVEN_DAYS) });
|
|
91
|
+
timePeriods.push({ key: 4, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_THIRTY_DAYS) });
|
|
92
|
+
timePeriods.push({ key: 5, name: this.getTimePeriodText(TIME_PERIOD_KEYS.LAST_ONE_YEAR) });
|
|
90
93
|
return timePeriods;
|
|
91
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* 获取时间段文案(从系统文本库获取多语种翻译,fallback 使用 localization)
|
|
97
|
+
*/
|
|
98
|
+
getTimePeriodText(textKey) {
|
|
99
|
+
var _a;
|
|
100
|
+
const currentCulture = ((_a = this.languageService) === null || _a === void 0 ? void 0 : _a.getDefaultLanguage()) || 'zh-CN';
|
|
101
|
+
const systemType = SYSTEM_TEXT_LIBRARY_TYPES.COMPONENT_BUILTIN;
|
|
102
|
+
if (this.systemTextLibraryService) {
|
|
103
|
+
const translation = this.systemTextLibraryService.getSystemTextValue(systemType, textKey, currentCulture);
|
|
104
|
+
if (translation) {
|
|
105
|
+
return translation;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return '';
|
|
109
|
+
}
|
|
92
110
|
updateTimeRange(timePeriodType) {
|
|
93
111
|
this.currentTimePeriod = +timePeriodType;
|
|
94
112
|
this.updateQueryTimeRange();
|
|
@@ -127,30 +145,50 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
127
145
|
if (!this.model.dataSetting) {
|
|
128
146
|
return;
|
|
129
147
|
}
|
|
130
|
-
const dataItemName = this.model.dataSetting.dataName;
|
|
131
148
|
const dataSourceCode = this.model.dataSetting.dataSourceCode;
|
|
132
|
-
const channelNames = this.model.dataSetting.channels.map(c => c.name);
|
|
133
149
|
this.updateElementStatus(HistoricalCurveElementStatus.Loading);
|
|
134
|
-
|
|
135
|
-
this.
|
|
136
|
-
|
|
137
|
-
|
|
150
|
+
// 【新格式】如果有多条目配置,使用多条目查询
|
|
151
|
+
if (this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length > 0) {
|
|
152
|
+
const historyDataItems = this.model.dataSetting.dataItems.map(item => ({
|
|
153
|
+
dataItemName: item.dataName,
|
|
154
|
+
channelNames: item.channels.map(c => c.name)
|
|
155
|
+
}));
|
|
156
|
+
// 使用第一个条目的信息作为兼容参数
|
|
157
|
+
const firstItem = this.model.dataSetting.dataItems[0];
|
|
158
|
+
const input = new GetHistoryDataArgs(dataSourceCode, firstItem.dataName, firstItem.channels.map(c => c.name), startTime, endTime, limit, rangeType, historyDataItems // 传递多条目参数
|
|
159
|
+
);
|
|
160
|
+
this.historyDataStore.getHistoryData(input).subscribe(result => {
|
|
161
|
+
this.handleQueryResult(result);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// 【旧格式】单条目模式
|
|
165
|
+
else {
|
|
166
|
+
const dataItemName = this.model.dataSetting.dataName;
|
|
167
|
+
const channelNames = this.model.dataSetting.channels.map(c => c.name);
|
|
168
|
+
const input = new GetHistoryDataArgs(dataSourceCode, dataItemName, channelNames, startTime, endTime, limit, rangeType);
|
|
169
|
+
this.historyDataStore.getHistoryData(input).subscribe(result => {
|
|
170
|
+
this.handleQueryResult(result);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
handleQueryResult(result) {
|
|
175
|
+
if (result.error) {
|
|
176
|
+
this.updateElementStatus(HistoricalCurveElementStatus.LoadFailed, result.error);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.clearStatus();
|
|
180
|
+
if (result.isUnbind) {
|
|
181
|
+
this.updateElementStatus(HistoricalCurveElementStatus.Unbound);
|
|
138
182
|
}
|
|
139
183
|
else {
|
|
140
|
-
this.
|
|
141
|
-
if (result.isUnbind) {
|
|
142
|
-
this.updateElementStatus(HistoricalCurveElementStatus.Unbound);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
this.updateElementStatus(HistoricalCurveElementStatus.Normal);
|
|
146
|
-
}
|
|
147
|
-
if (result.values.length) {
|
|
148
|
-
this.currentStartTime = moment(first(result.values).time);
|
|
149
|
-
this.currentEndTime = moment(last(result.values).time);
|
|
150
|
-
}
|
|
151
|
-
this.chartElement = this.renderChart(result.values);
|
|
184
|
+
this.updateElementStatus(HistoricalCurveElementStatus.Normal);
|
|
152
185
|
}
|
|
153
|
-
|
|
186
|
+
if (result.values.length) {
|
|
187
|
+
this.currentStartTime = moment(first(result.values).time);
|
|
188
|
+
this.currentEndTime = moment(last(result.values).time);
|
|
189
|
+
}
|
|
190
|
+
this.chartElement = this.renderChart(result.values);
|
|
191
|
+
}
|
|
154
192
|
}
|
|
155
193
|
setupTooltipAutoHide(chart) {
|
|
156
194
|
const chartContainer = this.rootElement.select('.nv-focus').node();
|
|
@@ -178,11 +216,31 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
178
216
|
const chartWidth = this.model.displaySetting.size.width;
|
|
179
217
|
const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
|
|
180
218
|
const data = new Array();
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
219
|
+
// 【新格式】多条目模式:曲线名称使用"条目名-通道名"格式
|
|
220
|
+
if (this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length > 0) {
|
|
221
|
+
let channelIndex = 0;
|
|
222
|
+
each(this.model.dataSetting.dataItems, dataItem => {
|
|
223
|
+
each(dataItem.channels, channel => {
|
|
224
|
+
const values = new Array();
|
|
225
|
+
each(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[channelIndex] }));
|
|
226
|
+
// 使用"条目名-通道名"格式
|
|
227
|
+
const displayName = `${dataItem.dataName}-${channel.name}`;
|
|
228
|
+
data.push({ key: displayName, area: channel.projectEnabled, values: values });
|
|
229
|
+
channelIndex++;
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
// 【旧格式】单条目模式:同样使用"条目名-通道名"格式
|
|
234
|
+
else {
|
|
235
|
+
const dataItemName = this.model.dataSetting.dataName;
|
|
236
|
+
each(this.model.dataSetting.channels, (channel, key) => {
|
|
237
|
+
const values = new Array();
|
|
238
|
+
each(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[key] }));
|
|
239
|
+
// 使用"条目名-通道名"格式
|
|
240
|
+
const displayName = `${dataItemName}-${channel.name}`;
|
|
241
|
+
data.push({ key: displayName, area: channel.projectEnabled, values: values });
|
|
242
|
+
});
|
|
243
|
+
}
|
|
186
244
|
this.data = data;
|
|
187
245
|
nv.addGraph(() => {
|
|
188
246
|
let chart;
|
|
@@ -203,8 +261,22 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
203
261
|
.find('.nv-legend')
|
|
204
262
|
.find('.nv-series');
|
|
205
263
|
let hiddenCount = 0;
|
|
264
|
+
// 获取所有通道(支持多条目和单条目模式)
|
|
265
|
+
const allChannels = [];
|
|
266
|
+
if (this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length > 0) {
|
|
267
|
+
// 【新格式】多条目模式:收集所有条目的所有通道
|
|
268
|
+
each(this.model.dataSetting.dataItems, dataItem => {
|
|
269
|
+
each(dataItem.channels, channel => {
|
|
270
|
+
allChannels.push(channel);
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
// 【旧格式】单条目模式
|
|
276
|
+
allChannels.push(...this.model.dataSetting.channels);
|
|
277
|
+
}
|
|
206
278
|
for (let i = 0; i < this.data.length; i++) {
|
|
207
|
-
const channel =
|
|
279
|
+
const channel = allChannels[i];
|
|
208
280
|
if (legendList.eq(i).children().eq(0).css('fill-opacity') === '1') {
|
|
209
281
|
const pointList = this.$element
|
|
210
282
|
.find('.nv-scatterWrap')
|
|
@@ -346,7 +418,21 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
346
418
|
}
|
|
347
419
|
chart.width(chartWidth);
|
|
348
420
|
chart.height(chartHeight);
|
|
349
|
-
|
|
421
|
+
// 获取所有通道的颜色(支持多条目和单条目模式)
|
|
422
|
+
let channelColors = [];
|
|
423
|
+
if (this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length > 0) {
|
|
424
|
+
// 【新格式】多条目模式:收集所有条目的所有通道颜色
|
|
425
|
+
each(this.model.dataSetting.dataItems, dataItem => {
|
|
426
|
+
each(dataItem.channels, channel => {
|
|
427
|
+
channelColors.push(channel.connectorColor);
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
// 【旧格式】单条目模式
|
|
433
|
+
channelColors = this.model.dataSetting.channels.map(c => c.connectorColor);
|
|
434
|
+
}
|
|
435
|
+
chart.color(channelColors);
|
|
350
436
|
this.rootElement.append('g').datum(data).call(chart);
|
|
351
437
|
this.rootElement.selectAll('.nv-noData').attr('x', chartWidth / 2).attr('y', chartHeight / 2 + this.displayOption.operationAreaHeight);
|
|
352
438
|
this.resizeEventListener = nv.utils.windowResize(() => {
|
|
@@ -1 +1 @@
|
|
|
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"}]}}}}]
|
|
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"},{"__symbolic":"reference","module":"../../service","name":"SystemTextLibraryService","line":75,"character":52},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":76,"character":43}]}],"dispose":[{"__symbolic":"method"}],"initKeyboardListener":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"getTimePeriodText":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"reRenderElement":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"handleQueryResult":[{"__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"}]}}}}]
|
package/elements/main-element.js
CHANGED
|
@@ -29,6 +29,7 @@ import { VideoElement } from './video/video-element';
|
|
|
29
29
|
import { WeatherElement } from './weather/weater-element';
|
|
30
30
|
import { AirQualityElement } from './air-quality/air-quality-element';
|
|
31
31
|
import { AlarmElement } from './alarm/alarm-element';
|
|
32
|
+
import { ScrollAlarmElement } from './scroll-alarm/scroll-alarm-element';
|
|
32
33
|
export class MainElement {
|
|
33
34
|
constructor(injector, bsModalService, context, variableCommunicator, popupViewService, signalRAppId) {
|
|
34
35
|
this.injector = injector;
|
|
@@ -73,7 +74,7 @@ export class MainElement {
|
|
|
73
74
|
this.elements.push(new PipeElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
74
75
|
break;
|
|
75
76
|
case GuiConsts.components.switchIndicatorLightKey:
|
|
76
|
-
this.elements.push(new SwitchIndicatorLightElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
77
|
+
this.elements.push(new SwitchIndicatorLightElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId, this.context.textLibraryService, this.context.languageService));
|
|
77
78
|
break;
|
|
78
79
|
case GuiConsts.components.barGraphKey:
|
|
79
80
|
this.elements.push(new BarGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
@@ -86,10 +87,10 @@ export class MainElement {
|
|
|
86
87
|
this.elements.push(new CharacterDisplayElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
87
88
|
break;
|
|
88
89
|
case GuiConsts.components.textKey:
|
|
89
|
-
this.elements.push(new TextElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
90
|
+
this.elements.push(new TextElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId, this.context.textLibraryService, this.context.languageService));
|
|
90
91
|
break;
|
|
91
92
|
case GuiConsts.components.hyperlinkKey:
|
|
92
|
-
this.elements.push(new HyperlinkElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
93
|
+
this.elements.push(new HyperlinkElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId, this.context.textLibraryService, this.context.languageService));
|
|
93
94
|
break;
|
|
94
95
|
case GuiConsts.components.straightLineKey:
|
|
95
96
|
this.elements.push(new StraightLineElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.signalRAppId));
|
|
@@ -110,7 +111,7 @@ export class MainElement {
|
|
|
110
111
|
this.elements.push(new DatetimeDisplayElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
|
|
111
112
|
break;
|
|
112
113
|
case GuiConsts.components.historicalCurveKey:
|
|
113
|
-
this.elements.push(new HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId));
|
|
114
|
+
this.elements.push(new HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService));
|
|
114
115
|
break;
|
|
115
116
|
case GuiConsts.components.ringGraphKey:
|
|
116
117
|
this.elements.push(new RingGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(LOCALIZATION), this.signalRAppId));
|
|
@@ -131,7 +132,10 @@ export class MainElement {
|
|
|
131
132
|
this.elements.push(new AirQualityElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.weatherService, this.signalRAppId));
|
|
132
133
|
break;
|
|
133
134
|
case GuiConsts.components.alarmKey:
|
|
134
|
-
this.elements.push(new AlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
|
|
135
|
+
this.elements.push(new AlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService));
|
|
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));
|
|
135
139
|
break;
|
|
136
140
|
}
|
|
137
141
|
});
|
|
@@ -298,7 +302,7 @@ export class MainElement {
|
|
|
298
302
|
each(this.elements, e => {
|
|
299
303
|
if (e instanceof HistoricalCurveElement || e instanceof VideoElement
|
|
300
304
|
|| e instanceof WeatherElement || e instanceof NumericalDisplayElement || e instanceof TextElement
|
|
301
|
-
|| e instanceof AirQualityElement || e instanceof
|
|
305
|
+
|| e instanceof AirQualityElement || e instanceof ScrollAlarmElement) {
|
|
302
306
|
e.dispose();
|
|
303
307
|
}
|
|
304
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"}]}}}}]
|