@flexem/fc-gui 3.0.0-alpha.71 → 3.0.0-alpha.73

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
@@ -309,4 +309,14 @@
309
309
  ## 3.0.0-alpha.71(2023-03-10)
310
310
  ### Web端
311
311
  #### Bug Fix
312
- 1. FLEXCLOUD-2525 告警表恢复第一页的告警,第二页的告警未更新到第一页
312
+ 1. FLEXCLOUD-2525 告警表恢复第一页的告警,第二页的告警未更新到第一页
313
+
314
+ ## 3.0.0-alpha.72(2023-03-13)
315
+ ### Web端
316
+ #### Bug Fix
317
+ 1. 修改设备告警的订阅事件
318
+
319
+ ## 3.0.0-alpha.73(2023-03-13)
320
+ ### Web端
321
+ #### Bug Fix
322
+ 1. 解决当前告警当第二页的报警恢复后,无告警时,翻页未自动翻到第一页的问题
@@ -40032,7 +40032,6 @@ C140,111.8,99.2,158.4,78,178.6z M78,40.4c-17.8,0-32.4,14.4-32.4,32.2s14.5,32.2,3
40032
40032
 
40033
40033
 
40034
40034
 
40035
-
40036
40035
  class alarm_element_AlarmElement extends conditional_display_element_ConditionalDisplayElement {
40037
40036
  constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
40038
40037
  var _a;
@@ -40074,15 +40073,13 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40074
40073
  }, this.model.filterSetting.refreshCycle * 60 * 1000);
40075
40074
  }
40076
40075
  else {
40077
- variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarmWithAppId => {
40078
- if (alarmWithAppId.appId !== this.signalRAppId) {
40079
- return;
40080
- }
40081
- const alarm = alarmWithAppId.alarm;
40082
- if (!Object(lodash["find"])(this.alarmNames, itemName => itemName === alarm.name)) {
40083
- return;
40084
- }
40085
- this.init();
40076
+ variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarms => {
40077
+ alarms.forEach(alarm => {
40078
+ if (this.alarmNames.indexOf(alarm.name) !== -1) {
40079
+ this.init();
40080
+ return;
40081
+ }
40082
+ });
40086
40083
  });
40087
40084
  }
40088
40085
  this.init();
@@ -40136,6 +40133,11 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40136
40133
  if (!result.error) {
40137
40134
  this.totalCount = result.totalCount;
40138
40135
  this.currentAlarmList = result.items;
40136
+ if (!result.items.length && result.totalCount) {
40137
+ this.page = 0;
40138
+ this.init();
40139
+ return;
40140
+ }
40139
40141
  this.alarmList = this.currentAlarmList.map(item => [
40140
40142
  item.name,
40141
40143
  item.message,
@@ -63173,9 +63175,9 @@ class remote_variable_communicator_RemoteVariableCommunicator {
63173
63175
  if (this.alarmChangedSubscription !== undefined) {
63174
63176
  this.alarmChangedSubscription.unsubscribe();
63175
63177
  }
63176
- this.alarmChangedSubscription = this.remoteVariableProtocol.historyAlarmChanged.subscribe((alarmWithAppId) => {
63178
+ this.alarmChangedSubscription = this.remoteVariableProtocol.virtualDeviceAlarmsChanged.subscribe((alarms) => {
63177
63179
  Object(lodash["each"])(this.alarmObservers, ob => {
63178
- ob.next(alarmWithAppId);
63180
+ ob.next(alarms);
63179
63181
  });
63180
63182
  });
63181
63183
  }
@@ -63361,9 +63363,9 @@ class remote_variable_communicator_RemoteVariableCommunicator {
63361
63363
  subscribeUserDeviceAlarms(appId = '') {
63362
63364
  return new Observable["a" /* Observable */](observer => {
63363
63365
  this.alarmObservers.push(observer);
63364
- this.remoteVariableProtocol.subscribeUserDeviceAlarms(appId);
63366
+ this.remoteVariableProtocol.subscribeVirtualDeviceAlarms(appId);
63365
63367
  return () => {
63366
- this.remoteVariableProtocol.unSubscribeUserDeviceAlarms(appId);
63368
+ this.remoteVariableProtocol.unsubscribeVirtualDeviceAlarms(appId);
63367
63369
  };
63368
63370
  });
63369
63371
  }