@flexem/fc-gui 3.0.0-alpha.66 → 3.0.0-alpha.68
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
CHANGED
|
@@ -274,4 +274,23 @@
|
|
|
274
274
|
### Web端
|
|
275
275
|
#### Bug Fix
|
|
276
276
|
1. FLEXCLOUD-2487: 【线上问题】数据库连接池占满导致无响应的问题
|
|
277
|
-
- 去掉没有位置信息时的定时器
|
|
277
|
+
- 去掉没有位置信息时的定时器
|
|
278
|
+
|
|
279
|
+
## 3.0.0-alpha.67(2023-03-06)
|
|
280
|
+
### Web端
|
|
281
|
+
#### Bug Fix
|
|
282
|
+
1. FLEXCLOUD-2484 告警等级提示应汉化
|
|
283
|
+
2. FLEXCLOUD-2493 首次打开模板,字体属性下拉框字被填充框遮挡
|
|
284
|
+
3. FLEXCLOUD-2495 模板中添加未关联告警的告警表元件,导致不显示组态中配置的画面
|
|
285
|
+
4. FLEXCLOUD-2497 报警表表头、表格内容向右对齐后格式错误,不显示表格内容
|
|
286
|
+
5. FLEXCLOUD-2500 告警表配置当前报警,无数据时点击切换分页按钮,报错“您的请求无效!”
|
|
287
|
+
6. FLEXCLOUD-2501 模拟组态画面、刷新组态不应闪烁原型画面
|
|
288
|
+
7. FLEXCLOUD-2502 编辑告警表时,应保留上一次告警组与告警等级的选择
|
|
289
|
+
8. FLEXCLOUD-2503 切换告警类型报警勾选框应重置,让客户手动勾选告警监控点
|
|
290
|
+
9. FLEXCLOUD-2505 组态元件有a控制权限,用户有a组态权限,设备仪表盘中不显示告警元件
|
|
291
|
+
|
|
292
|
+
## 3.0.0-alpha.68(2023-03-07)
|
|
293
|
+
### Web端
|
|
294
|
+
#### Bug Fix
|
|
295
|
+
1. FLEXCLOUD-2495 模板中添加未关联告警的告警表元件,导致不显示组态中配置的画面
|
|
296
|
+
2. FLEXCLOUD-2500 告警表配置当前报警,无数据时点击切换分页按钮,报错“您的请求无效!”
|
|
@@ -40043,6 +40043,7 @@ var AlarmState;
|
|
|
40043
40043
|
|
|
40044
40044
|
class alarm_element_AlarmElement extends conditional_display_element_ConditionalDisplayElement {
|
|
40045
40045
|
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
|
|
40046
|
+
var _a, _b;
|
|
40046
40047
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
40047
40048
|
this.alarmsStore = alarmsStore;
|
|
40048
40049
|
this.displayOption = {
|
|
@@ -40063,58 +40064,66 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40063
40064
|
this.page = 0;
|
|
40064
40065
|
this.totalCount = 0;
|
|
40065
40066
|
this.pageSize = 5;
|
|
40067
|
+
this.rootElement.selectAll('*').remove();
|
|
40066
40068
|
this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
|
|
40067
40069
|
this.localization = injector.get(_tmp_localization["b" /* LOCALIZATION */]);
|
|
40068
40070
|
this.variableCommunicator = variableCommunicator;
|
|
40069
40071
|
this.timePeriods = this.getValidTimePeriods();
|
|
40070
|
-
this.currentTimePeriod = this.model.filterSetting.refreshCycle;
|
|
40071
40072
|
this.pageSize = this.model.generalSetting.pageSize;
|
|
40072
|
-
|
|
40073
|
-
|
|
40074
|
-
|
|
40075
|
-
this.
|
|
40076
|
-
|
|
40077
|
-
this.
|
|
40078
|
-
|
|
40079
|
-
|
|
40080
|
-
|
|
40081
|
-
|
|
40082
|
-
|
|
40083
|
-
|
|
40084
|
-
|
|
40085
|
-
const alarm = alarmWithAppId.alarm;
|
|
40086
|
-
if (!Object(lodash["find"])(this.model.filterSetting.detailsData, alarmName => alarmName === alarm.name)) {
|
|
40087
|
-
return;
|
|
40088
|
-
}
|
|
40089
|
-
const currentAlarm = this.currentAlarmList.find(re => re.name === alarm.name);
|
|
40090
|
-
if (alarm.state === AlarmState.AlarmStateTriggered.valueOf()) {
|
|
40091
|
-
if (!Object(lodash["isNil"])(currentAlarm)) {
|
|
40073
|
+
if (this.model.filterSetting) {
|
|
40074
|
+
this.currentTimePeriod = (_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.refreshCycle;
|
|
40075
|
+
this.currentTimePeriod = (_b = this.model.filterSetting) === null || _b === void 0 ? void 0 : _b.displayPeriod;
|
|
40076
|
+
this.updateQueryTimeRange();
|
|
40077
|
+
if (this.model.filterSetting.alarmType) {
|
|
40078
|
+
this.refreshIntervalId = setInterval(() => {
|
|
40079
|
+
this.loadFirstPage();
|
|
40080
|
+
this.logger.debug(`[GUI]Refresh Alarm Table:${d3["time"].format('%x %X')(new Date())}`);
|
|
40081
|
+
}, this.model.filterSetting.refreshCycle * 60 * 1000);
|
|
40082
|
+
}
|
|
40083
|
+
else {
|
|
40084
|
+
variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarmWithAppId => {
|
|
40085
|
+
if (alarmWithAppId.appId !== this.signalRAppId) {
|
|
40092
40086
|
return;
|
|
40093
40087
|
}
|
|
40094
|
-
|
|
40095
|
-
this.
|
|
40096
|
-
this.totalCount += 1;
|
|
40097
|
-
}
|
|
40098
|
-
else {
|
|
40099
|
-
if (Object(lodash["isNil"])(currentAlarm)) {
|
|
40088
|
+
const alarm = alarmWithAppId.alarm;
|
|
40089
|
+
if (!Object(lodash["find"])(this.model.filterSetting.detailsData, alarmName => alarmName === alarm.name)) {
|
|
40100
40090
|
return;
|
|
40101
40091
|
}
|
|
40102
|
-
|
|
40103
|
-
|
|
40104
|
-
|
|
40105
|
-
|
|
40106
|
-
|
|
40107
|
-
|
|
40108
|
-
|
|
40109
|
-
|
|
40110
|
-
|
|
40111
|
-
|
|
40112
|
-
|
|
40092
|
+
const currentAlarm = this.currentAlarmList.find(re => re.name === alarm.name);
|
|
40093
|
+
if (alarm.state === AlarmState.AlarmStateTriggered.valueOf()) {
|
|
40094
|
+
if (!Object(lodash["isNil"])(currentAlarm)) {
|
|
40095
|
+
return;
|
|
40096
|
+
}
|
|
40097
|
+
Object(lodash["pull"])(this.currentAlarmList, this.currentAlarmList.find(record => alarm.name === record.name));
|
|
40098
|
+
this.currentAlarmList.unshift(alarm);
|
|
40099
|
+
this.totalCount += 1;
|
|
40100
|
+
}
|
|
40101
|
+
else {
|
|
40102
|
+
if (Object(lodash["isNil"])(currentAlarm)) {
|
|
40103
|
+
return;
|
|
40104
|
+
}
|
|
40105
|
+
Object(lodash["remove"])(this.currentAlarmList, currentAlarm);
|
|
40106
|
+
this.totalCount -= 1;
|
|
40107
|
+
}
|
|
40108
|
+
this.alarmList = [];
|
|
40109
|
+
this.currentAlarmList.forEach(item => {
|
|
40110
|
+
this.alarmList.push([
|
|
40111
|
+
item.name,
|
|
40112
|
+
item.message,
|
|
40113
|
+
item.alarmLevel,
|
|
40114
|
+
moment(item.triggeredTime).format('YYYY-MM-DD HH:mm:ss')
|
|
40115
|
+
]);
|
|
40116
|
+
});
|
|
40117
|
+
this.renderElement();
|
|
40113
40118
|
});
|
|
40114
|
-
|
|
40115
|
-
|
|
40119
|
+
}
|
|
40120
|
+
this.init();
|
|
40121
|
+
}
|
|
40122
|
+
else {
|
|
40123
|
+
this.totalCount = 0;
|
|
40124
|
+
this.alarmList = [];
|
|
40125
|
+
this.renderElement();
|
|
40116
40126
|
}
|
|
40117
|
-
this.init();
|
|
40118
40127
|
}
|
|
40119
40128
|
dispose() {
|
|
40120
40129
|
clearInterval(this.refreshIntervalId);
|
|
@@ -40138,37 +40147,41 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40138
40147
|
if (this.model.filterSetting.alarmType) {
|
|
40139
40148
|
const input = new _tmp_config["c" /* GetAlarmsArgs */](this.model.filterSetting.detailsData, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
|
|
40140
40149
|
this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
|
|
40141
|
-
|
|
40142
|
-
|
|
40143
|
-
item
|
|
40144
|
-
|
|
40145
|
-
|
|
40146
|
-
|
|
40147
|
-
|
|
40148
|
-
|
|
40150
|
+
if (!result.error) {
|
|
40151
|
+
this.totalCount = result.totalCount;
|
|
40152
|
+
this.alarmList = result.items.map(item => [
|
|
40153
|
+
item.name,
|
|
40154
|
+
item.message,
|
|
40155
|
+
item.alarmLevel,
|
|
40156
|
+
item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
|
|
40157
|
+
]);
|
|
40158
|
+
this.renderElement();
|
|
40159
|
+
}
|
|
40149
40160
|
});
|
|
40150
40161
|
}
|
|
40151
40162
|
else {
|
|
40152
40163
|
const input = new _tmp_config["c" /* GetAlarmsArgs */](this.model.filterSetting.detailsData, undefined, undefined, this.pageSize, this.page * this.pageSize);
|
|
40153
40164
|
this.alarmsStore.getCurrentAlarms(input).subscribe(result => {
|
|
40154
|
-
|
|
40155
|
-
|
|
40156
|
-
|
|
40157
|
-
item
|
|
40158
|
-
|
|
40159
|
-
|
|
40160
|
-
|
|
40161
|
-
|
|
40162
|
-
|
|
40165
|
+
if (!result.error) {
|
|
40166
|
+
this.totalCount = result.totalCount;
|
|
40167
|
+
this.currentAlarmList = result.items;
|
|
40168
|
+
this.alarmList = this.currentAlarmList.map(item => [
|
|
40169
|
+
item.name,
|
|
40170
|
+
item.message,
|
|
40171
|
+
item.alarmLevel,
|
|
40172
|
+
item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
|
|
40173
|
+
]);
|
|
40174
|
+
this.renderElement();
|
|
40175
|
+
}
|
|
40163
40176
|
});
|
|
40164
40177
|
}
|
|
40165
40178
|
}
|
|
40166
40179
|
renderElement() {
|
|
40167
|
-
this.rootElement.selectAll('*').remove();
|
|
40168
40180
|
const elementHeight = this.model.size.height;
|
|
40169
40181
|
this.element = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
|
|
40170
40182
|
this.element.setAttribute('width', this.model.size.width.toString());
|
|
40171
40183
|
this.element.setAttribute('height', elementHeight.toString());
|
|
40184
|
+
this.$element.append(this.element);
|
|
40172
40185
|
const table = document.createElement('table');
|
|
40173
40186
|
table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
|
|
40174
40187
|
height: ${elementHeight - 39}`;
|
|
@@ -40250,14 +40263,14 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40250
40263
|
table.appendChild(tr);
|
|
40251
40264
|
}
|
|
40252
40265
|
this.element.appendChild(table);
|
|
40253
|
-
this.$element.append(this.element);
|
|
40254
40266
|
this.renderOperationArea(this.model.size.width, elementHeight - 39);
|
|
40255
40267
|
}
|
|
40256
40268
|
renderOperationArea(chartWidth, chartHeight) {
|
|
40269
|
+
var _a;
|
|
40257
40270
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
40258
40271
|
.append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
|
|
40259
40272
|
.append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
|
|
40260
|
-
if (this.model.filterSetting.alarmType) {
|
|
40273
|
+
if ((_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.alarmType) {
|
|
40261
40274
|
const selectElement = operationArea.append('select').style('margin-left', this.displayOption.marginLeft + 'px')
|
|
40262
40275
|
.style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
|
|
40263
40276
|
const displayTimePeriod = this.rootElement.select('select').property('value');
|
|
@@ -40318,7 +40331,9 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40318
40331
|
this.init();
|
|
40319
40332
|
}
|
|
40320
40333
|
loadNextPage() {
|
|
40321
|
-
|
|
40334
|
+
let last_page = Math.ceil(this.totalCount / this.pageSize);
|
|
40335
|
+
if (last_page)
|
|
40336
|
+
last_page--;
|
|
40322
40337
|
if (this.page < last_page) {
|
|
40323
40338
|
this.page++;
|
|
40324
40339
|
}
|
|
@@ -40331,7 +40346,10 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40331
40346
|
this.init();
|
|
40332
40347
|
}
|
|
40333
40348
|
loadLastPage() {
|
|
40334
|
-
|
|
40349
|
+
let last_page = Math.ceil(this.totalCount / this.pageSize);
|
|
40350
|
+
if (last_page)
|
|
40351
|
+
last_page--;
|
|
40352
|
+
this.page = last_page;
|
|
40335
40353
|
this.init();
|
|
40336
40354
|
}
|
|
40337
40355
|
}
|