@flexem/fc-gui 3.0.0-alpha.116 → 3.0.0-alpha.117

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.
@@ -72,6 +72,7 @@ export class ReadableElement extends ConditionalEnableElement {
72
72
  });
73
73
  }
74
74
  reportValueChanged(value) {
75
+ var _a, _b, _c, _d;
75
76
  forEach(this.elementStates, elementState => {
76
77
  if (elementState.variableName === value.variableName || elementState.variableName === value.systemName) {
77
78
  elementState.state = value.state;
@@ -85,20 +86,21 @@ export class ReadableElement extends ConditionalEnableElement {
85
86
  }
86
87
  if (value.systemName === '设备状态') {
87
88
  let name = value.customStatus;
88
- const language = window.abp.localization.currentCulture.name;
89
+ const language = ((_b = (_a = window.abp.localization) === null || _a === void 0 ? void 0 : _a.currentCulture) === null || _b === void 0 ? void 0 : _b.name) || ((_d = (_c = this.localization.localizationService) === null || _c === void 0 ? void 0 : _c.translate) === null || _d === void 0 ? void 0 : _d.currentLang);
90
+ const isChinese = language === 'zh-Hans' || language === 'zh';
89
91
  if (!name) {
90
92
  switch (value.state) {
91
93
  case 1:
92
- name = language === 'zh-Hans' ? '在线' : 'Online';
94
+ name = isChinese ? '在线' : 'Online';
93
95
  break;
94
96
  case 3:
95
- name = language === 'zh-Hans' ? '离线' : 'Offline';
97
+ name = isChinese ? '离线' : 'Offline';
96
98
  break;
97
99
  case 4:
98
- name = language === 'zh-Hans' ? '告警' : 'Alarming';
100
+ name = isChinese ? '告警' : 'Alarming';
99
101
  break;
100
102
  case 5:
101
- name = language === 'zh-Hans' ? '未绑定' : 'Unbound';
103
+ name = isChinese ? '未绑定' : 'Unbound';
102
104
  break;
103
105
  default:
104
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.116",
3
+ "version": "3.0.0-alpha.117",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",