@flexem/fc-gui 3.0.0-alpha.65 → 3.0.0-alpha.67
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 +21 -1
- package/bundles/@flexem/fc-gui.umd.js +81 -69
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/air-quality/air-quality-element.d.ts +0 -1
- package/elements/air-quality/air-quality-element.js +0 -3
- package/elements/air-quality/air-quality-element.metadata.json +1 -1
- package/elements/alarm/alarm-element.js +81 -63
- package/elements/weather/weater-element.d.ts +0 -1
- package/elements/weather/weater-element.js +0 -3
- package/elements/weather/weater-element.metadata.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -268,4 +268,24 @@
|
|
|
268
268
|
### Web端
|
|
269
269
|
#### Bug Fix
|
|
270
270
|
1. FLEXCLOUD-2487: 【线上问题】数据库连接池占满导致无响应的问题
|
|
271
|
-
- 修改清除定时器的方法
|
|
271
|
+
- 修改清除定时器的方法
|
|
272
|
+
|
|
273
|
+
## 3.0.0-alpha.66(2023-03-01)
|
|
274
|
+
### Web端
|
|
275
|
+
#### Bug Fix
|
|
276
|
+
1. FLEXCLOUD-2487: 【线上问题】数据库连接池占满导致无响应的问题
|
|
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-2498 告警表线框中线条颜色较浅,可参考表格中颜色配置
|
|
287
|
+
6. FLEXCLOUD-2500 告警表配置当前报警,无数据时点击切换分页按钮,报错“您的请求无效!”
|
|
288
|
+
7. FLEXCLOUD-2501 模拟组态画面、刷新组态不应闪烁原型画面
|
|
289
|
+
8. FLEXCLOUD-2502 编辑告警表时,应保留上一次告警组与告警等级的选择
|
|
290
|
+
9. FLEXCLOUD-2503 切换告警类型报警勾选框应重置,让客户手动勾选告警监控点
|
|
291
|
+
10. FLEXCLOUD-2505 组态元件有a控制权限,用户有a组态权限,设备仪表盘中不显示告警元件
|
|
@@ -39607,7 +39607,6 @@ class weater_element_WeatherElement extends conditional_display_element_Conditio
|
|
|
39607
39607
|
}
|
|
39608
39608
|
dispose() {
|
|
39609
39609
|
clearInterval(this.timer);
|
|
39610
|
-
clearTimeout(this.gettingAddressTimer);
|
|
39611
39610
|
}
|
|
39612
39611
|
initWeatherInfo() {
|
|
39613
39612
|
this.clear();
|
|
@@ -39639,8 +39638,6 @@ class weater_element_WeatherElement extends conditional_display_element_Conditio
|
|
|
39639
39638
|
}
|
|
39640
39639
|
handleGettingAddress() {
|
|
39641
39640
|
this.handleUnusualCommon(this.localization.weatherNotAvailable);
|
|
39642
|
-
clearTimeout(this.gettingAddressTimer);
|
|
39643
|
-
this.gettingAddressTimer = setTimeout(() => this.initWeatherInfo(), 1000 * 60);
|
|
39644
39641
|
}
|
|
39645
39642
|
handleNoAddress() {
|
|
39646
39643
|
this.handleUnusualCommon(this.localization.weatherNotAddress);
|
|
@@ -39846,7 +39843,6 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
39846
39843
|
}
|
|
39847
39844
|
dispose() {
|
|
39848
39845
|
clearInterval(this.timer);
|
|
39849
|
-
clearTimeout(this.gettingAddressTimer);
|
|
39850
39846
|
}
|
|
39851
39847
|
initAirQualityInfo() {
|
|
39852
39848
|
this.clear();
|
|
@@ -39898,8 +39894,6 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
39898
39894
|
}
|
|
39899
39895
|
handleGettingAddress() {
|
|
39900
39896
|
this.handleUnusualCommon(this.localization.airQualityNotAvailable);
|
|
39901
|
-
clearTimeout(this.gettingAddressTimer);
|
|
39902
|
-
this.gettingAddressTimer = setTimeout(() => this.initAirQualityInfo(), 1000 * 60);
|
|
39903
39897
|
}
|
|
39904
39898
|
handleNoAddress() {
|
|
39905
39899
|
this.handleUnusualCommon(this.localization.airQualityNotAddress);
|
|
@@ -40049,6 +40043,7 @@ var AlarmState;
|
|
|
40049
40043
|
|
|
40050
40044
|
class alarm_element_AlarmElement extends conditional_display_element_ConditionalDisplayElement {
|
|
40051
40045
|
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
|
|
40046
|
+
var _a, _b;
|
|
40052
40047
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
40053
40048
|
this.alarmsStore = alarmsStore;
|
|
40054
40049
|
this.displayOption = {
|
|
@@ -40073,54 +40068,61 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40073
40068
|
this.localization = injector.get(_tmp_localization["b" /* LOCALIZATION */]);
|
|
40074
40069
|
this.variableCommunicator = variableCommunicator;
|
|
40075
40070
|
this.timePeriods = this.getValidTimePeriods();
|
|
40076
|
-
this.currentTimePeriod = this.model.filterSetting.refreshCycle;
|
|
40077
40071
|
this.pageSize = this.model.generalSetting.pageSize;
|
|
40078
|
-
|
|
40079
|
-
|
|
40080
|
-
|
|
40081
|
-
this.
|
|
40082
|
-
|
|
40083
|
-
this.
|
|
40084
|
-
|
|
40085
|
-
|
|
40086
|
-
|
|
40087
|
-
|
|
40088
|
-
|
|
40089
|
-
|
|
40090
|
-
|
|
40091
|
-
const alarm = alarmWithAppId.alarm;
|
|
40092
|
-
if (!Object(lodash["find"])(this.model.filterSetting.detailsData, alarmName => alarmName === alarm.name)) {
|
|
40093
|
-
return;
|
|
40094
|
-
}
|
|
40095
|
-
const currentAlarm = this.currentAlarmList.find(re => re.name === alarm.name);
|
|
40096
|
-
if (alarm.state === AlarmState.AlarmStateTriggered.valueOf()) {
|
|
40097
|
-
if (!Object(lodash["isNil"])(currentAlarm)) {
|
|
40072
|
+
if (this.model.filterSetting) {
|
|
40073
|
+
this.currentTimePeriod = (_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.refreshCycle;
|
|
40074
|
+
this.currentTimePeriod = (_b = this.model.filterSetting) === null || _b === void 0 ? void 0 : _b.displayPeriod;
|
|
40075
|
+
this.updateQueryTimeRange();
|
|
40076
|
+
if (this.model.filterSetting.alarmType) {
|
|
40077
|
+
this.refreshIntervalId = setInterval(() => {
|
|
40078
|
+
this.loadFirstPage();
|
|
40079
|
+
this.logger.debug(`[GUI]Refresh Alarm Table:${d3["time"].format('%x %X')(new Date())}`);
|
|
40080
|
+
}, this.model.filterSetting.refreshCycle * 60 * 1000);
|
|
40081
|
+
}
|
|
40082
|
+
else {
|
|
40083
|
+
variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarmWithAppId => {
|
|
40084
|
+
if (alarmWithAppId.appId !== this.signalRAppId) {
|
|
40098
40085
|
return;
|
|
40099
40086
|
}
|
|
40100
|
-
|
|
40101
|
-
this.
|
|
40102
|
-
this.totalCount += 1;
|
|
40103
|
-
}
|
|
40104
|
-
else {
|
|
40105
|
-
if (Object(lodash["isNil"])(currentAlarm)) {
|
|
40087
|
+
const alarm = alarmWithAppId.alarm;
|
|
40088
|
+
if (!Object(lodash["find"])(this.model.filterSetting.detailsData, alarmName => alarmName === alarm.name)) {
|
|
40106
40089
|
return;
|
|
40107
40090
|
}
|
|
40108
|
-
|
|
40109
|
-
|
|
40110
|
-
|
|
40111
|
-
|
|
40112
|
-
|
|
40113
|
-
|
|
40114
|
-
|
|
40115
|
-
|
|
40116
|
-
|
|
40117
|
-
|
|
40118
|
-
|
|
40091
|
+
const currentAlarm = this.currentAlarmList.find(re => re.name === alarm.name);
|
|
40092
|
+
if (alarm.state === AlarmState.AlarmStateTriggered.valueOf()) {
|
|
40093
|
+
if (!Object(lodash["isNil"])(currentAlarm)) {
|
|
40094
|
+
return;
|
|
40095
|
+
}
|
|
40096
|
+
Object(lodash["pull"])(this.currentAlarmList, this.currentAlarmList.find(record => alarm.name === record.name));
|
|
40097
|
+
this.currentAlarmList.unshift(alarm);
|
|
40098
|
+
this.totalCount += 1;
|
|
40099
|
+
}
|
|
40100
|
+
else {
|
|
40101
|
+
if (Object(lodash["isNil"])(currentAlarm)) {
|
|
40102
|
+
return;
|
|
40103
|
+
}
|
|
40104
|
+
Object(lodash["remove"])(this.currentAlarmList, currentAlarm);
|
|
40105
|
+
this.totalCount -= 1;
|
|
40106
|
+
}
|
|
40107
|
+
this.alarmList = [];
|
|
40108
|
+
this.currentAlarmList.forEach(item => {
|
|
40109
|
+
this.alarmList.push([
|
|
40110
|
+
item.name,
|
|
40111
|
+
item.message,
|
|
40112
|
+
item.alarmLevel,
|
|
40113
|
+
moment(item.triggeredTime).format('YYYY-MM-DD HH:mm:ss')
|
|
40114
|
+
]);
|
|
40115
|
+
});
|
|
40116
|
+
this.renderElement();
|
|
40119
40117
|
});
|
|
40120
|
-
|
|
40121
|
-
|
|
40118
|
+
}
|
|
40119
|
+
this.init();
|
|
40120
|
+
}
|
|
40121
|
+
else {
|
|
40122
|
+
this.totalCount = 0;
|
|
40123
|
+
this.alarmList = [];
|
|
40124
|
+
this.renderElement();
|
|
40122
40125
|
}
|
|
40123
|
-
this.init();
|
|
40124
40126
|
}
|
|
40125
40127
|
dispose() {
|
|
40126
40128
|
clearInterval(this.refreshIntervalId);
|
|
@@ -40141,40 +40143,45 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40141
40143
|
return timePeriods;
|
|
40142
40144
|
}
|
|
40143
40145
|
init() {
|
|
40146
|
+
this.rootElement.selectAll('*').remove();
|
|
40144
40147
|
if (this.model.filterSetting.alarmType) {
|
|
40145
40148
|
const input = new _tmp_config["c" /* GetAlarmsArgs */](this.model.filterSetting.detailsData, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
|
|
40146
40149
|
this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
item
|
|
40150
|
-
|
|
40151
|
-
|
|
40152
|
-
|
|
40153
|
-
|
|
40154
|
-
|
|
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
|
+
}
|
|
40155
40160
|
});
|
|
40156
40161
|
}
|
|
40157
40162
|
else {
|
|
40158
40163
|
const input = new _tmp_config["c" /* GetAlarmsArgs */](this.model.filterSetting.detailsData, undefined, undefined, this.pageSize, this.page * this.pageSize);
|
|
40159
40164
|
this.alarmsStore.getCurrentAlarms(input).subscribe(result => {
|
|
40160
|
-
|
|
40161
|
-
|
|
40162
|
-
|
|
40163
|
-
item
|
|
40164
|
-
|
|
40165
|
-
|
|
40166
|
-
|
|
40167
|
-
|
|
40168
|
-
|
|
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
|
+
}
|
|
40169
40176
|
});
|
|
40170
40177
|
}
|
|
40171
40178
|
}
|
|
40172
40179
|
renderElement() {
|
|
40173
|
-
this.rootElement.selectAll('*').remove();
|
|
40174
40180
|
const elementHeight = this.model.size.height;
|
|
40175
40181
|
this.element = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
|
|
40176
40182
|
this.element.setAttribute('width', this.model.size.width.toString());
|
|
40177
40183
|
this.element.setAttribute('height', elementHeight.toString());
|
|
40184
|
+
this.$element.append(this.element);
|
|
40178
40185
|
const table = document.createElement('table');
|
|
40179
40186
|
table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
|
|
40180
40187
|
height: ${elementHeight - 39}`;
|
|
@@ -40256,14 +40263,14 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40256
40263
|
table.appendChild(tr);
|
|
40257
40264
|
}
|
|
40258
40265
|
this.element.appendChild(table);
|
|
40259
|
-
this.$element.append(this.element);
|
|
40260
40266
|
this.renderOperationArea(this.model.size.width, elementHeight - 39);
|
|
40261
40267
|
}
|
|
40262
40268
|
renderOperationArea(chartWidth, chartHeight) {
|
|
40269
|
+
var _a;
|
|
40263
40270
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
40264
40271
|
.append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
|
|
40265
40272
|
.append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
|
|
40266
|
-
if (this.model.filterSetting.alarmType) {
|
|
40273
|
+
if ((_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.alarmType) {
|
|
40267
40274
|
const selectElement = operationArea.append('select').style('margin-left', this.displayOption.marginLeft + 'px')
|
|
40268
40275
|
.style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
|
|
40269
40276
|
const displayTimePeriod = this.rootElement.select('select').property('value');
|
|
@@ -40324,7 +40331,9 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40324
40331
|
this.init();
|
|
40325
40332
|
}
|
|
40326
40333
|
loadNextPage() {
|
|
40327
|
-
|
|
40334
|
+
let last_page = Math.ceil(this.totalCount / this.pageSize);
|
|
40335
|
+
if (last_page)
|
|
40336
|
+
last_page--;
|
|
40328
40337
|
if (this.page < last_page) {
|
|
40329
40338
|
this.page++;
|
|
40330
40339
|
}
|
|
@@ -40337,7 +40346,10 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
40337
40346
|
this.init();
|
|
40338
40347
|
}
|
|
40339
40348
|
loadLastPage() {
|
|
40340
|
-
|
|
40349
|
+
let last_page = Math.ceil(this.totalCount / this.pageSize);
|
|
40350
|
+
if (last_page)
|
|
40351
|
+
last_page--;
|
|
40352
|
+
this.page = last_page;
|
|
40341
40353
|
this.init();
|
|
40342
40354
|
}
|
|
40343
40355
|
}
|