@flexem/fc-gui 3.0.0-alpha.165 → 3.0.0-alpha.167

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.
@@ -22355,7 +22355,7 @@ const Localization_zh_CN = {
22355
22355
  lastTwentyFourHours: '最近24小时',
22356
22356
  lastSevenDays: '最近7天',
22357
22357
  lastThirtyDays: '最近30天',
22358
- lastOneYear: '最近1年',
22358
+ lastOneYear: '最近半年',
22359
22359
  customTimeRange: '自定义',
22360
22360
  startTime: '开始时间',
22361
22361
  endTime: '结束时间',
@@ -32555,7 +32555,7 @@ const DefaultLocalization = {
32555
32555
  lastTwentyFourHours: 'Last 24 hours',
32556
32556
  lastSevenDays: 'Last 7 days',
32557
32557
  lastThirtyDays: 'Last 30 days',
32558
- lastOneYear: 'Last 1 year',
32558
+ lastOneYear: 'Last 6 months',
32559
32559
  customTimeRange: 'Custom',
32560
32560
  startTime: 'Start Time',
32561
32561
  endTime: 'End Time',
@@ -35106,22 +35106,19 @@ class state_control_element_StateControlElement extends conditional_dynamic_disp
35106
35106
  }
35107
35107
  changeState(state) {
35108
35108
  switch (state) {
35109
+ case _tmp_model["State"].InvalidMonitor:
35110
+ this.state = _tmp_model["State"].InvalidMonitor;
35111
+ break;
35109
35112
  case _tmp_model["State"].Unbind:
35110
- // Unbind 优先级最高,可覆盖任何状态
35111
- this.state = _tmp_model["State"].Unbind;
35113
+ if (this.state !== _tmp_model["State"].InvalidMonitor) {
35114
+ this.state = _tmp_model["State"].Unbind;
35115
+ }
35112
35116
  break;
35113
35117
  case _tmp_model["State"].Offline:
35114
- // Offline 优先级次于 Unbind
35115
- if (this.state !== _tmp_model["State"].Unbind) {
35118
+ if (this.state !== _tmp_model["State"].Unbind && this.state !== _tmp_model["State"].InvalidMonitor) {
35116
35119
  this.state = _tmp_model["State"].Offline;
35117
35120
  }
35118
35121
  break;
35119
- case _tmp_model["State"].InvalidMonitor:
35120
- // InvalidMonitor 优先级低于 Offline/Unbind
35121
- if (this.state !== _tmp_model["State"].Unbind && this.state !== _tmp_model["State"].Offline) {
35122
- this.state = _tmp_model["State"].InvalidMonitor;
35123
- }
35124
- break;
35125
35122
  case _tmp_model["State"].Loading:
35126
35123
  if (this.state !== _tmp_model["State"].Unbind && this.state !== _tmp_model["State"].Offline && this.state !== _tmp_model["State"].InvalidMonitor) {
35127
35124
  this.state = _tmp_model["State"].Loading;
@@ -36177,7 +36174,7 @@ class character_display_element_CharacterDisplayElement extends readable_element
36177
36174
  }
36178
36175
  const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, this.model.charCount, this.displayValue);
36179
36176
  const modalRef = this.modalService.show(write_character_modal_component["a" /* WriteCharacterModalComponent */], {
36180
- initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
36177
+ initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position gui-modal-write', animated: false
36181
36178
  });
36182
36179
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
36183
36180
  modalRef.hide();
@@ -37165,12 +37162,13 @@ var AxisRangeType;
37165
37162
 
37166
37163
 
37167
37164
  class historical_curve_element_HistoricalCurveElement extends conditional_display_element_ConditionalDisplayElement {
37168
- constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId, systemTextLibraryService, languageService, guiContext) {
37165
+ constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId, systemTextLibraryService, languageService, guiContext, releasedVariableService) {
37169
37166
  super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
37170
37167
  this.historyDataStore = historyDataStore;
37171
37168
  this.systemTextLibraryService = systemTextLibraryService;
37172
37169
  this.languageService = languageService;
37173
37170
  this.guiContext = guiContext;
37171
+ this.releasedVariableService = releasedVariableService;
37174
37172
  this.displayOption = {
37175
37173
  dataLimit: 500,
37176
37174
  dataZoomHeight: 32,
@@ -37346,13 +37344,13 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37346
37344
  timePeriods.push({ key: 3, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_SEVEN_DAYS) });
37347
37345
  timePeriods.push({ key: 4, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_THIRTY_DAYS) });
37348
37346
  timePeriods.push({ key: 5, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_ONE_YEAR) });
37349
- timePeriods.push({ key: 8, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM, this.localization.customTimeRange) });
37347
+ timePeriods.push({ key: 8, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM) });
37350
37348
  return timePeriods;
37351
37349
  }
37352
37350
  /**
37353
- * 获取时间段文案(从系统文本库获取多语种翻译,fallback 到 localization)
37351
+ * 获取时间段文案(从系统文本库获取多语种翻译)
37354
37352
  */
37355
- getTimePeriodText(textKey, fallback = '') {
37353
+ getTimePeriodText(textKey) {
37356
37354
  const currentCulture = this.getCurrentCulture();
37357
37355
  const systemType = service["SYSTEM_TEXT_LIBRARY_TYPES"].COMPONENT_BUILTIN;
37358
37356
  if (this.systemTextLibraryService) {
@@ -37361,7 +37359,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37361
37359
  return translation;
37362
37360
  }
37363
37361
  }
37364
- return fallback;
37362
+ return '';
37365
37363
  }
37366
37364
  updateTimeRange(timePeriodType) {
37367
37365
  this.currentTimePeriod = +timePeriodType;
@@ -37834,7 +37832,10 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37834
37832
  .style('background', '#1890ff')
37835
37833
  .style('color', '#fff');
37836
37834
  if (tp.key === 8) {
37837
- this.showCustomTimeRangeModal();
37835
+ const isSimulation = !this.releasedVariableService;
37836
+ if (!isSimulation) {
37837
+ this.showCustomTimeRangeModal();
37838
+ }
37838
37839
  return;
37839
37840
  }
37840
37841
  this.updateTimeRange(tp.key);
@@ -37953,7 +37954,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37953
37954
  header.style.cssText = 'display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e8e8e8;';
37954
37955
  const title = document.createElement('span');
37955
37956
  title.style.cssText = 'font-size:16px;font-weight:500;color:#333;';
37956
- title.textContent = this.localization.customTimeRange || '自定义';
37957
+ title.textContent = this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM);
37957
37958
  const closeBtn = document.createElement('span');
37958
37959
  closeBtn.style.cssText = 'cursor:pointer;font-size:18px;color:#999;line-height:1;';
37959
37960
  closeBtn.textContent = '×';
@@ -38390,16 +38391,22 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38390
38391
  */
38391
38392
  reportValueChanged(value) {
38392
38393
  var _a, _b, _c;
38393
- // 拦截上下限变量推送,更新缓存值
38394
+ // 更新上下限变量缓存(不阻断后续处理)
38394
38395
  if (this.upperLimitVariableName && value.variableName === this.upperLimitVariableName) {
38395
38396
  const num = Number(value.value);
38396
38397
  this._resolvedUpperLimitValue = (value.value != null && !isNaN(num)) ? num : undefined;
38397
- return;
38398
+ // 如果上限变量不是主显示变量,直接返回
38399
+ if (value.variableName !== this.readVariableName) {
38400
+ return;
38401
+ }
38398
38402
  }
38399
38403
  if (this.lowerLimitVariableName && value.variableName === this.lowerLimitVariableName) {
38400
38404
  const num = Number(value.value);
38401
38405
  this._resolvedLowerLimitValue = (value.value != null && !isNaN(num)) ? num : undefined;
38402
- return;
38406
+ // 如果下限变量不是主显示变量,直接返回
38407
+ if (value.variableName !== this.readVariableName) {
38408
+ return;
38409
+ }
38403
38410
  }
38404
38411
  // 处理系统变量"当前语种ID"
38405
38412
  if (value.variableName === '当前语种ID') {
@@ -38540,15 +38547,27 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38540
38547
  // 获取数值操作配置,上下限变量类型已在 reportValueChanged 中实时更新到缓存
38541
38548
  const numericalOperation = this.numericalOperationService.getNumericalOperations(this.model);
38542
38549
  // 用缓存的实时值替换变量类型上下限
38550
+ // 模拟模式下(releasedVariableService 为空)变量无实时值,直接使用数据类型默认范围
38551
+ const isSimulation = !this.releasedVariableService;
38543
38552
  if (typeof numericalOperation.numericalUpperLimit === 'object' && numericalOperation.numericalUpperLimit.type === 1) {
38544
- numericalOperation.numericalUpperLimit = this._resolvedUpperLimitValue != null
38545
- ? this._resolvedUpperLimitValue
38546
- : (this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38553
+ if (isSimulation) {
38554
+ numericalOperation.numericalUpperLimit = this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0, this.model.integerDigits || undefined, this.model.fractionDigits || undefined);
38555
+ }
38556
+ else {
38557
+ numericalOperation.numericalUpperLimit = this._resolvedUpperLimitValue != null
38558
+ ? this._resolvedUpperLimitValue
38559
+ : (this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38560
+ }
38547
38561
  }
38548
38562
  if (typeof numericalOperation.numericalLowerLimit === 'object' && numericalOperation.numericalLowerLimit.type === 1) {
38549
- numericalOperation.numericalLowerLimit = this._resolvedLowerLimitValue != null
38550
- ? this._resolvedLowerLimitValue
38551
- : (this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38563
+ if (isSimulation) {
38564
+ numericalOperation.numericalUpperLimit = this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0, this.model.integerDigits || undefined, this.model.fractionDigits || undefined);
38565
+ }
38566
+ else {
38567
+ numericalOperation.numericalLowerLimit = this._resolvedLowerLimitValue != null
38568
+ ? this._resolvedLowerLimitValue
38569
+ : (this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38570
+ }
38552
38571
  }
38553
38572
  const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.fBoxDataType, this.model.integerDigits, this.model.fractionDigits, numericalOperation, this.model.version, this.enableDataParsed, this.releasedVariableService, this.guiContext);
38554
38573
  this.writeValueMmodalRef = this.modalService.show(write_value_modal_component["a" /* WriteValueModalComponent */], {
@@ -43695,7 +43714,7 @@ class main_element_MainElement {
43695
43714
  this.elements.push(new datetime_display_element_DatetimeDisplayElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
43696
43715
  break;
43697
43716
  case shared["d" /* GuiConsts */].components.historicalCurveKey:
43698
- this.elements.push(new historical_curve_element_HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService, this.context));
43717
+ this.elements.push(new historical_curve_element_HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService, this.context, this.context.releasedVariableService));
43699
43718
  break;
43700
43719
  case shared["d" /* GuiConsts */].components.ringGraphKey:
43701
43720
  this.elements.push(new ring_graph_element_RingGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(_tmp_localization["b" /* LOCALIZATION */]), this.signalRAppId));
@@ -45074,7 +45093,7 @@ WriteValueModalComponent = __decorate([
45074
45093
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45075
45094
  selector: 'writeValueModal',
45076
45095
  template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{displayVariableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <span> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control form-control-write write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer modal-footer-write\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-primary-write btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
45077
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .form-control-write { margin: 0 20px; width: 410px; } .modal-footer { padding: 10px 5px 20px 5px !important; text-align: right; border-color: transparent; } .modal-footer-write { padding: 10px 5px 20px 5px !important; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .btn-primary-write { width: 410px; margin: 0 15px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
45096
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .form-control-write { margin: 0 20px; width: 585px; } .modal-footer { padding: 10px 5px 20px 5px !important; text-align: right; border-color: transparent; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
45078
45097
  }),
45079
45098
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
45080
45099
  ], WriteValueModalComponent);
@@ -45153,8 +45172,8 @@ __decorate([
45153
45172
  WriteCharacterModalComponent = __decorate([
45154
45173
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45155
45174
  selector: 'writeCharacterModal',
45156
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45157
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } "]
45175
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control form-control-write write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control form-control-write write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer modal-footer-write\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-primary-write btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45176
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .form-control-write { margin: 0 16px; width: 585px; } "]
45158
45177
  }),
45159
45178
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
45160
45179
  ], WriteCharacterModalComponent);