@flexem/fc-gui 3.0.0-alpha.176 → 3.0.0-alpha.177

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.
@@ -22319,6 +22319,7 @@ const Localization_zh_CN = {
22319
22319
  loadFailed: '加载失败.',
22320
22320
  setting: '设置',
22321
22321
  submit: '提交',
22322
+ save: '保存',
22322
22323
  submitting: '提交中···',
22323
22324
  numericalValueRequired: '数值不能为空',
22324
22325
  invalidNumericalValue: '数值格式不正确',
@@ -32518,7 +32519,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function() {
32518
32519
  const LOCALIZATION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('fc.gui.loc');
32519
32520
  const DefaultLocalization = {
32520
32521
  loadFailed: 'Load failed.',
32521
- setting: 'Setting',
32522
+ setting: 'Setting ',
32523
+ save: 'Save',
32522
32524
  submit: 'Submit',
32523
32525
  submitting: 'Submitting···',
32524
32526
  numericalValueRequired: 'Numerical value can\'t be emtpy',
@@ -32563,7 +32565,7 @@ const DefaultLocalization = {
32563
32565
  endTime: 'End Time',
32564
32566
  grouped: 'Grouped',
32565
32567
  stacked: 'Stacked',
32566
- passwordVerify: 'Password verifiers',
32568
+ passwordVerify: 'Password Verification',
32567
32569
  passwordError: 'Password error',
32568
32570
  password: 'Password',
32569
32571
  passwordToolTip: 'Password error, please re-enter',
@@ -35433,7 +35435,7 @@ class readable_element_ReadableElement extends conditional_enable_element_Condit
35433
35435
  name = isTraditionalChinese ? '離線' : (isChinese ? '离线' : 'Offline');
35434
35436
  break;
35435
35437
  case 4:
35436
- name = isTraditionalChinese ? '告警' : (isChinese ? '告警' : 'Alarming');
35438
+ name = isTraditionalChinese ? '告警' : (isChinese ? '告警' : 'Alarm');
35437
35439
  break;
35438
35440
  case 5:
35439
35441
  name = isTraditionalChinese ? '未綁定' : (isChinese ? '未绑定' : 'Unbound');
@@ -35441,6 +35443,9 @@ class readable_element_ReadableElement extends conditional_enable_element_Condit
35441
35443
  default:
35442
35444
  }
35443
35445
  }
35446
+ if (value.state === 4) {
35447
+ name = isTraditionalChinese ? '告警' : (isChinese ? '告警' : 'Alarm');
35448
+ }
35444
35449
  this.updateVariableValue(name, '设备状态');
35445
35450
  return; // 处理完"设备状态"后直接返回
35446
35451
  }
@@ -37962,8 +37967,15 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37962
37967
  : new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0));
37963
37968
  const defaultEnd = this.fmtDatetimeLocal(this.customEndTime ? this.customEndTime.toDate()
37964
37969
  : new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59));
37970
+ // 临时将 <html lang> 切换为当前应用语言,使原生 datetime-local
37971
+ // 弹出日历的 UI(星期/月份文字等)跟随应用语种显示,关闭时还原
37972
+ const currentLang = this.getCurrentCulture();
37973
+ const prevDocLang = document.documentElement.lang;
37974
+ document.documentElement.lang = currentLang;
37965
37975
  const overlay = document.createElement('div');
37966
37976
  overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:9999;';
37977
+ // 部分浏览器可直接读取元素上的 lang 属性来本地化原生控件
37978
+ overlay.lang = currentLang;
37967
37979
  const modal = document.createElement('div');
37968
37980
  let modalCss = 'position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);'
37969
37981
  + 'background:#fff;border-radius:4px;';
@@ -37979,7 +37991,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37979
37991
  header.style.cssText = 'display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e8e8e8;';
37980
37992
  const title = document.createElement('span');
37981
37993
  title.style.cssText = 'font-size:16px;font-weight:500;color:#333;';
37982
- title.textContent = this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM);
37994
+ title.textContent = this.localization.customTimeRange;
37983
37995
  const closeBtn = document.createElement('span');
37984
37996
  closeBtn.style.cssText = 'cursor:pointer;font-size:18px;color:#999;line-height:1;';
37985
37997
  closeBtn.textContent = '×';
@@ -37994,6 +38006,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37994
38006
  const startInput = document.createElement('input');
37995
38007
  startInput.type = 'datetime-local';
37996
38008
  startInput.setAttribute('step', '1');
38009
+ startInput.setAttribute('lang', currentLang);
37997
38010
  startInput.value = defaultStart;
37998
38011
  startInput.style.cssText = inputStyle;
37999
38012
  const separator = document.createElement('span');
@@ -38002,6 +38015,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
38002
38015
  const endInput = document.createElement('input');
38003
38016
  endInput.type = 'datetime-local';
38004
38017
  endInput.setAttribute('step', '1');
38018
+ endInput.setAttribute('lang', currentLang);
38005
38019
  endInput.value = defaultEnd;
38006
38020
  endInput.style.cssText = inputStyle;
38007
38021
  body.appendChild(label);
@@ -38024,6 +38038,8 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
38024
38038
  overlay.appendChild(modal);
38025
38039
  document.body.appendChild(overlay);
38026
38040
  const close = (revert) => {
38041
+ // 还原弹窗打开前的 <html lang>,避免影响页面其他部分
38042
+ document.documentElement.lang = prevDocLang;
38027
38043
  document.body.removeChild(overlay);
38028
38044
  if (revert) {
38029
38045
  const selectEl = this.$element && this.$element.find('select');