@flexem/fc-gui 3.0.0-alpha.128 → 3.0.0-alpha.129

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.
@@ -13,7 +13,7 @@ export declare class AlarmElement extends ConditionalDisplayElement {
13
13
  readonly model: AlarmModel;
14
14
  private readonly logger;
15
15
  readonly variableCommunicator: VariableCommunicator;
16
- private readonly timePeriods;
16
+ private timePeriods;
17
17
  private languageChangeSubscription?;
18
18
  private elementStatus;
19
19
  private element;
@@ -41,7 +41,6 @@ export class AlarmElement extends ConditionalDisplayElement {
41
41
  this.setStatusAsLoading();
42
42
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
43
43
  this.variableCommunicator = variableCommunicator;
44
- this.timePeriods = this.getValidTimePeriods();
45
44
  this.pageSize = this.model.generalSetting.pageSize;
46
45
  localStorage.setItem('simulate-time', moment().valueOf() + '');
47
46
  // 订阅语种变化事件
@@ -113,6 +112,7 @@ export class AlarmElement extends ConditionalDisplayElement {
113
112
  if (!selectElement.empty()) {
114
113
  // 重新生成时间段数据
115
114
  const updatedTimePeriods = this.getValidTimePeriods();
115
+ this.timePeriods = updatedTimePeriods;
116
116
  // 更新选项文本
117
117
  const options = selectElement.selectAll('option');
118
118
  options.each(function (_d, i) {
@@ -203,6 +203,7 @@ export class AlarmElement extends ConditionalDisplayElement {
203
203
  this.setStatusAsLoading();
204
204
  clearTimeout(this.getAlarmDataId);
205
205
  this.getAlarmDataId = setTimeout(() => {
206
+ this.timePeriods = this.getValidTimePeriods();
206
207
  if (this.model.filterSetting.alarmType) {
207
208
  this.updateQueryTimeRange();
208
209
  const input = new GetAlarmsArgs(this.alarmNames, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
@@ -13,7 +13,7 @@ export declare class HistoricalCurveElement extends ConditionalDisplayElement {
13
13
  readonly model: HistoricalCurveModel;
14
14
  private readonly logger;
15
15
  private readonly localization;
16
- private readonly timePeriods;
16
+ private timePeriods;
17
17
  private languageChangeSubscription?;
18
18
  private readonly displayOption;
19
19
  /**
@@ -41,7 +41,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
41
41
  };
42
42
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
43
43
  this.localization = injector.get(LOCALIZATION);
44
- this.timePeriods = this.getValidTimePeriods();
45
44
  this.updateTimeRange(this.model.displaySetting.displayTimePeriod);
46
45
  this.refreshIntervalId = setInterval(() => {
47
46
  this.loadFirstPage();
@@ -108,6 +107,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
108
107
  if (!selectElement.empty()) {
109
108
  // 重新生成时间段数据
110
109
  const updatedTimePeriods = this.getValidTimePeriods();
110
+ this.timePeriods = updatedTimePeriods;
111
111
  // 更新选项文本
112
112
  const options = selectElement.selectAll('option');
113
113
  options.each(function (_d, i) {
@@ -232,6 +232,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
232
232
  }
233
233
  }
234
234
  handleQueryResult(result) {
235
+ this.timePeriods = this.getValidTimePeriods();
235
236
  // 【新格式】多条目模式下的错误处理
236
237
  if (result.historyDataItems && result.historyDataItems.length > 0) {
237
238
  // 只要有条目正常返回(即使没有数据),就走正常逻辑
@@ -213,6 +213,14 @@ export class NumericalDisplayElement extends ReadableElement {
213
213
  this.recordValue = result.value;
214
214
  const writeValue = this.dataTypeService.formatToDecimal(this.model.version, result.value, this.model.dataType);
215
215
  this.showValue = result.showValue;
216
+ // 如果是系统变量"当前语种ID",只更新显示,不执行变量写入和操作记录
217
+ if (this.writeVariableName === '当前语种ID') {
218
+ // 直接更新显示值
219
+ this.displayText = this.showValue;
220
+ this.updateDisplayText(this.formatDisplayTextUnit(this.displayText));
221
+ this.writeValueMmodalRef.hide();
222
+ return;
223
+ }
216
224
  if (this.displayText !== this.showValue || result.variableRwType === variableRwTypeEnum.witer) {
217
225
  if (this.numericalOperation || result.enableNumericalOperation || result.isNumericalOperation || result.variableRwType === variableRwTypeEnum.witer) {
218
226
  this.recordOperation(result.value);
@@ -229,10 +237,7 @@ export class NumericalDisplayElement extends ReadableElement {
229
237
  }
230
238
  }, 30000);
231
239
  }
232
- // 如果是系统变量"当前语种ID",跳过写值操作(已在 handleCurrentLanguageIdSave 中处理)
233
- if (this.writeVariableName !== '当前语种ID') {
234
- this.variableCommunicator.write(this.writeVariableName, writeValue).subscribe();
235
- }
240
+ this.variableCommunicator.write(this.writeVariableName, writeValue).subscribe();
236
241
  }
237
242
  else {
238
243
  this.writeValueMmodalRef.hide();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.128",
3
+ "version": "3.0.0-alpha.129",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",