@flexem/fc-gui 3.0.0-alpha.80 → 3.0.0-alpha.82

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
@@ -356,3 +356,13 @@
356
356
  #### Bug Fix
357
357
  1. FLEXCLOUD-2576 【APP】android无极光推送
358
358
  2. FLEXCLOUD-2582 【氚云20230421001239】安卓手机端设备云助手视频监控无法全屏,苹果手机点击可进入全屏
359
+
360
+ ## 3.0.0-alpha.81(2023-04-25)
361
+ ### Web端
362
+ #### Bug Fix
363
+ 1. FLEXCLOUD-2583 模拟时点击刷新按钮告警表删闪跳
364
+
365
+ ## 3.0.0-alpha.82(2023-04-26)
366
+ ### Web端
367
+ #### Bug Fix
368
+ 1. FLEXCLOUD-2473 【web端】组态设计:历史曲线组件网格显示设置
@@ -36573,6 +36573,20 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
36573
36573
  this.rootElement.selectAll('.nv-axisMaxMin').select('text').style('font-size', fontSize);
36574
36574
  }
36575
36575
  }
36576
+ let strokeWidth = 0;
36577
+ if (this.model.displaySetting.axisSetting.showTick !== false) {
36578
+ strokeWidth = 1;
36579
+ }
36580
+ this.rootElement
36581
+ .selectAll('.nv-x')
36582
+ .selectAll('.tick')
36583
+ .selectAll('line')
36584
+ .attr('style', `stroke:${this.model.displaySetting.axisSetting.xAxisTickColor || 'rgb(127, 147, 159)'};stroke-width:${strokeWidth};`);
36585
+ this.rootElement
36586
+ .selectAll('.nv-y')
36587
+ .selectAll('.tick')
36588
+ .selectAll('line')
36589
+ .attr('style', `stroke:${this.model.displaySetting.axisSetting.yAxisTickColor || 'rgb(127, 147, 159)'};stroke-width:${strokeWidth};`);
36576
36590
  if (fontSize && this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
36577
36591
  const self = this;
36578
36592
  this.rootElement
@@ -40047,11 +40061,17 @@ 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
40047
40061
 
40048
40062
 
40049
40063
 
40064
+ var AlaertElementStatus;
40065
+ (function (AlaertElementStatus) {
40066
+ AlaertElementStatus[AlaertElementStatus["Normal"] = 0] = "Normal";
40067
+ AlaertElementStatus[AlaertElementStatus["Loading"] = 1] = "Loading"; // 加载中
40068
+ })(AlaertElementStatus || (AlaertElementStatus = {}));
40050
40069
  class alarm_element_AlarmElement extends conditional_display_element_ConditionalDisplayElement {
40051
40070
  constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
40052
40071
  var _a;
40053
40072
  super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
40054
40073
  this.alarmsStore = alarmsStore;
40074
+ this.elementStatus = AlaertElementStatus.Loading;
40055
40075
  this.displayOption = {
40056
40076
  dataLimit: 500,
40057
40077
  dataZoomHeight: 32,
@@ -40072,6 +40092,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40072
40092
  this.totalCount = 0;
40073
40093
  this.pageSize = 5;
40074
40094
  this.rootElement.selectAll('*').remove();
40095
+ this.setStatusAsLoading();
40075
40096
  this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
40076
40097
  this.localization = injector.get(_tmp_localization["b" /* LOCALIZATION */]);
40077
40098
  this.variableCommunicator = variableCommunicator;
@@ -40092,13 +40113,13 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40092
40113
  variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarms => {
40093
40114
  alarms.forEach(alarm => {
40094
40115
  if (this.alarmNames.indexOf(alarm.name) !== -1) {
40095
- this.init();
40116
+ this.getAlarmData();
40096
40117
  return;
40097
40118
  }
40098
40119
  });
40099
40120
  });
40100
40121
  }
40101
- this.init();
40122
+ this.getAlarmData();
40102
40123
  }
40103
40124
  else {
40104
40125
  this.totalCount = 0;
@@ -40124,7 +40145,9 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40124
40145
  timePeriods.push({ key: 5, name: this.localization.lastOneYear });
40125
40146
  return timePeriods;
40126
40147
  }
40127
- init() {
40148
+ getAlarmData() {
40149
+ this.rootElement.selectAll('*').remove();
40150
+ this.setStatusAsLoading();
40128
40151
  clearTimeout(this.getAlarmDataId);
40129
40152
  this.getAlarmDataId = setTimeout(() => {
40130
40153
  if (this.model.filterSetting.alarmType) {
@@ -40151,7 +40174,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40151
40174
  this.currentAlarmList = result.items;
40152
40175
  if (!result.items.length && result.totalCount) {
40153
40176
  this.page = 0;
40154
- this.init();
40177
+ this.getAlarmData();
40155
40178
  return;
40156
40179
  }
40157
40180
  this.alarmList = this.currentAlarmList.map(item => [
@@ -40167,7 +40190,6 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40167
40190
  }, 500);
40168
40191
  }
40169
40192
  renderElement() {
40170
- this.rootElement.selectAll('*').remove();
40171
40193
  const elementHeight = this.model.size.height;
40172
40194
  this.element = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
40173
40195
  this.element.setAttribute('width', this.model.size.width.toString());
@@ -40279,7 +40301,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40279
40301
  .style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
40280
40302
  const displayTimePeriod = this.rootElement.select('select').property('value');
40281
40303
  this.updateTimeRange(displayTimePeriod);
40282
- this.init();
40304
+ this.getAlarmData();
40283
40305
  });
40284
40306
  const options = selectElement.selectAll('option').data(this.timePeriods).enter().append('option');
40285
40307
  options.text(d => d.name).attr('value', d => d.key).property('selected', d => d.key === Number(this.currentTimePeriod));
@@ -40300,6 +40322,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40300
40322
  .style('float', 'right').style('background', 'white').style('background-image', 'url(assets/img/first_page.svg)')
40301
40323
  .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
40302
40324
  .on('click', () => { this.loadFirstPage(); });
40325
+ this.setStatusAsNormal();
40303
40326
  }
40304
40327
  updateTimeRange(timePeriodType) {
40305
40328
  this.currentTimePeriod = +timePeriodType;
@@ -40333,7 +40356,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40333
40356
  loadFirstPage() {
40334
40357
  if (this.page > 0) {
40335
40358
  this.page = 0;
40336
- this.init();
40359
+ this.getAlarmData();
40337
40360
  }
40338
40361
  }
40339
40362
  loadNextPage() {
@@ -40342,13 +40365,13 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40342
40365
  last_page--;
40343
40366
  if (this.page < last_page) {
40344
40367
  this.page++;
40345
- this.init();
40368
+ this.getAlarmData();
40346
40369
  }
40347
40370
  }
40348
40371
  loadPreviousPage() {
40349
40372
  if (this.page > 0) {
40350
40373
  this.page--;
40351
- this.init();
40374
+ this.getAlarmData();
40352
40375
  }
40353
40376
  }
40354
40377
  loadLastPage() {
@@ -40357,8 +40380,61 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
40357
40380
  last_page--;
40358
40381
  if (this.page !== last_page) {
40359
40382
  this.page = last_page;
40360
- this.init();
40383
+ this.getAlarmData();
40384
+ }
40385
+ }
40386
+ setStatusAsNormal() {
40387
+ this.elementStatus = AlaertElementStatus.Normal;
40388
+ this.clearStatus();
40389
+ }
40390
+ setStatusAsLoading() {
40391
+ this.elementStatus = AlaertElementStatus.Loading;
40392
+ this.renderStatus('assets/img/loading.svg', '#226abc');
40393
+ }
40394
+ renderStatus(icon, stroke) {
40395
+ if (this.elementStatus === AlaertElementStatus.Normal) {
40396
+ this.clearStatus();
40397
+ return;
40398
+ }
40399
+ this.rootElement.append('rect').attr('id', 'StateFrame').attr('fill', 'transparent')
40400
+ .attr('width', this.model.size.width)
40401
+ .attr('height', this.model.size.height);
40402
+ const document = this.$element[0].ownerDocument;
40403
+ const currentRect = this.$element.find('rect#StateFrame').first();
40404
+ if (!currentRect.length) {
40405
+ return;
40406
+ }
40407
+ this.$element.find('image#StateImage').remove();
40408
+ const imgObj = document.createElementNS('http://www.w3.org/2000/svg', 'image');
40409
+ if (imgObj) {
40410
+ let x = Number(currentRect[0].getAttribute('width')) - 20;
40411
+ const currentRectX = currentRect[0].getAttribute('x');
40412
+ if (currentRectX !== null) {
40413
+ x += Number(currentRectX);
40414
+ }
40415
+ currentRect[0].setAttribute('stroke', stroke);
40416
+ currentRect[0].setAttribute('stroke-opacity', '0.5');
40417
+ imgObj.href.baseVal = icon;
40418
+ imgObj.setAttributeNS(null, 'id', 'StateImage');
40419
+ imgObj.setAttributeNS(null, 'x', x.toString());
40420
+ imgObj.setAttributeNS(null, 'y', '0');
40421
+ imgObj.setAttributeNS(null, 'height', '20px');
40422
+ imgObj.setAttributeNS(null, 'width', '20px');
40423
+ const titleElement = document.createElementNS('http://www.w3.org/2000/svg', 'title');
40424
+ imgObj.appendChild(titleElement);
40425
+ this.$element.append(imgObj);
40426
+ }
40427
+ }
40428
+ clearStatus() {
40429
+ const currentRect = this.$element.find('rect#StateFrame').first();
40430
+ if (!currentRect.length) {
40431
+ return;
40432
+ }
40433
+ const stroke = currentRect[0].getAttribute('stroke');
40434
+ if (stroke) {
40435
+ currentRect[0].removeAttribute('stroke');
40361
40436
  }
40437
+ this.$element.find('image#StateImage').remove();
40362
40438
  }
40363
40439
  }
40364
40440