@flexem/fc-gui 3.0.0-alpha.177 → 3.0.0-alpha.178
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/bundles/@flexem/fc-gui.umd.js +16 -14
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +1 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +16 -14
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -42884,6 +42884,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
42884
42884
|
|
|
42885
42885
|
|
|
42886
42886
|
|
|
42887
|
+
|
|
42887
42888
|
var ScrollAlarmElementStatus;
|
|
42888
42889
|
(function (ScrollAlarmElementStatus) {
|
|
42889
42890
|
ScrollAlarmElementStatus[ScrollAlarmElementStatus["Normal"] = 0] = "Normal";
|
|
@@ -42916,6 +42917,7 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
42916
42917
|
this.rootElement.selectAll('*').remove();
|
|
42917
42918
|
this.setStatusAsLoading();
|
|
42918
42919
|
this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
|
|
42920
|
+
this.localization = injector.get(_tmp_localization["b" /* LOCALIZATION */]);
|
|
42919
42921
|
this.variableCommunicator = variableCommunicator;
|
|
42920
42922
|
this.autoCycle = (_b = (_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.autoCycle) !== null && _b !== void 0 ? _b : true;
|
|
42921
42923
|
this.maxResultCount = (_d = (_c = this.model.generalSetting) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 500;
|
|
@@ -43246,24 +43248,24 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43246
43248
|
// 新页的起始 x = 已有总宽度 + gap(如果已有内容)
|
|
43247
43249
|
let xOffset = this.totalWidth > 0 ? this.totalWidth + GAP : 0;
|
|
43248
43250
|
pageData.forEach((alarm) => {
|
|
43249
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
43251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43250
43252
|
const contentParts = [];
|
|
43251
43253
|
if (((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.showTriggerTime) && alarm.triggeredTime) {
|
|
43252
43254
|
contentParts.push(moment(alarm.triggeredTime).format('YYYY/MM/DD HH:mm:ss'));
|
|
43253
43255
|
}
|
|
43254
|
-
const language = ((_d = (_c = (_b = window.abp) === null || _b === void 0 ? void 0 : _b.localization) === null || _c === void 0 ? void 0 : _c.currentLanguage) === null || _d === void 0 ? void 0 : _d.name) ||
|
|
43256
|
+
const language = ((_d = (_c = (_b = window.abp) === null || _b === void 0 ? void 0 : _b.localization) === null || _c === void 0 ? void 0 : _c.currentLanguage) === null || _d === void 0 ? void 0 : _d.name) || ((_f = (_e = this.localization.localizationService) === null || _e === void 0 ? void 0 : _e.translate) === null || _f === void 0 ? void 0 : _f.currentLang);
|
|
43255
43257
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43256
|
-
if (((
|
|
43258
|
+
if (((_g = this.model.generalSetting) === null || _g === void 0 ? void 0 : _g.showAlarmLevel) && alarm.alarmLevel !== undefined) {
|
|
43257
43259
|
const levelMap = isChinese ? ['警告', '次要', '主要', '严重'] : ['Warning', 'Minor', 'Major', 'Critical'];
|
|
43258
43260
|
contentParts.push(levelMap[alarm.alarmLevel] || (isChinese ? '警告' : 'Warning'));
|
|
43259
43261
|
}
|
|
43260
|
-
if (((
|
|
43262
|
+
if (((_h = this.model.generalSetting) === null || _h === void 0 ? void 0 : _h.showAlarmName) && alarm.name) {
|
|
43261
43263
|
contentParts.push(alarm.name);
|
|
43262
43264
|
}
|
|
43263
|
-
if (((
|
|
43265
|
+
if (((_j = this.model.generalSetting) === null || _j === void 0 ? void 0 : _j.showAlarmContent) && alarm.message) {
|
|
43264
43266
|
contentParts.push(alarm.message);
|
|
43265
43267
|
}
|
|
43266
|
-
if (((
|
|
43268
|
+
if (((_k = this.model.generalSetting) === null || _k === void 0 ? void 0 : _k.showAlarmState) && alarm.state !== undefined) {
|
|
43267
43269
|
const stateMap = isChinese
|
|
43268
43270
|
? ['触发/未确认', '触发/已确认', '恢复/未确认', '恢复/已确认']
|
|
43269
43271
|
: ['Triggered/Unconfirmed', 'Triggered/Confirmed', 'Restored/Unconfirmed', 'Restored/Confirmed'];
|
|
@@ -43488,7 +43490,7 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43488
43490
|
* 模拟运行时的静态显示逻辑:只显示字段标签,不查询数据
|
|
43489
43491
|
*/
|
|
43490
43492
|
renderStaticDisplay() {
|
|
43491
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
43493
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
43492
43494
|
// 根据配置构建显示的字段标签
|
|
43493
43495
|
const textParts = [];
|
|
43494
43496
|
if (((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.showTriggerTime) !== false) {
|
|
@@ -43498,25 +43500,25 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43498
43500
|
}
|
|
43499
43501
|
if (((_b = this.model.generalSetting) === null || _b === void 0 ? void 0 : _b.showAlarmLevel) !== false) {
|
|
43500
43502
|
// 获取当前语言环境
|
|
43501
|
-
const language = ((_e = (_d = (_c = window.abp) === null || _c === void 0 ? void 0 : _c.localization) === null || _d === void 0 ? void 0 : _d.currentLanguage) === null || _e === void 0 ? void 0 : _e.name) ||
|
|
43503
|
+
const language = ((_e = (_d = (_c = window.abp) === null || _c === void 0 ? void 0 : _c.localization) === null || _d === void 0 ? void 0 : _d.currentLanguage) === null || _e === void 0 ? void 0 : _e.name) || ((_g = (_f = this.localization.localizationService) === null || _f === void 0 ? void 0 : _f.translate) === null || _g === void 0 ? void 0 : _g.currentLang);
|
|
43502
43504
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43503
43505
|
textParts.push(isChinese ? '严重' : 'Critical');
|
|
43504
43506
|
}
|
|
43505
|
-
if (((
|
|
43507
|
+
if (((_h = this.model.generalSetting) === null || _h === void 0 ? void 0 : _h.showAlarmName) === true) {
|
|
43506
43508
|
// 获取当前语言环境
|
|
43507
|
-
const language = ((
|
|
43509
|
+
const language = ((_l = (_k = (_j = window.abp) === null || _j === void 0 ? void 0 : _j.localization) === null || _k === void 0 ? void 0 : _k.currentLanguage) === null || _l === void 0 ? void 0 : _l.name) || ((_o = (_m = this.localization.localizationService) === null || _m === void 0 ? void 0 : _m.translate) === null || _o === void 0 ? void 0 : _o.currentLang);
|
|
43508
43510
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43509
43511
|
textParts.push(isChinese ? '室内温度' : 'Indoor Temperature');
|
|
43510
43512
|
}
|
|
43511
|
-
if (((
|
|
43513
|
+
if (((_p = this.model.generalSetting) === null || _p === void 0 ? void 0 : _p.showAlarmContent) !== false) {
|
|
43512
43514
|
// 获取当前语言环境
|
|
43513
|
-
const language = ((
|
|
43515
|
+
const language = ((_s = (_r = (_q = window.abp) === null || _q === void 0 ? void 0 : _q.localization) === null || _r === void 0 ? void 0 : _r.currentLanguage) === null || _s === void 0 ? void 0 : _s.name) || ((_u = (_t = this.localization.localizationService) === null || _t === void 0 ? void 0 : _t.translate) === null || _u === void 0 ? void 0 : _u.currentLang);
|
|
43514
43516
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43515
43517
|
textParts.push(isChinese ? '室内温度高于30°C或小于10°C' : 'Indoor temperature is higher than 30℃ or lower than 10℃');
|
|
43516
43518
|
}
|
|
43517
|
-
if (((
|
|
43519
|
+
if (((_v = this.model.generalSetting) === null || _v === void 0 ? void 0 : _v.showAlarmState) === true) {
|
|
43518
43520
|
// 获取当前语言环境
|
|
43519
|
-
const language = ((
|
|
43521
|
+
const language = ((_y = (_x = (_w = window.abp) === null || _w === void 0 ? void 0 : _w.localization) === null || _x === void 0 ? void 0 : _x.currentLanguage) === null || _y === void 0 ? void 0 : _y.name) || ((_0 = (_z = this.localization.localizationService) === null || _z === void 0 ? void 0 : _z.translate) === null || _0 === void 0 ? void 0 : _0.currentLang);
|
|
43520
43522
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43521
43523
|
textParts.push(isChinese ? '触发/未确认' : 'Triggered/Unconfirmed');
|
|
43522
43524
|
}
|