@flexem/fc-gui 3.0.0-alpha.27 → 3.0.0-alpha.30
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/CHANGELOG.md +17 -1
- package/bundles/@flexem/fc-gui.umd.js +73 -60
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +2 -2
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/bar-graph-element.js +20 -21
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/base/readable-element.js +3 -1
- package/elements/historical-curve/historical-curve.element.js +8 -0
- package/elements/meter-element.js +19 -19
- package/elements/numerical-display/numerical-display-element.js +1 -1
- package/elements/ring-graph/ring-graph-element.js +19 -19
- package/localization/localization.service.d.ts +2 -0
- package/localization/localization.service.js +2 -0
- package/localization/localization.service.metadata.json +1 -1
- package/localization/localization.service.zh_CN.js +2 -0
- package/localization/localization.service.zh_CN.metadata.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -112,4 +112,20 @@
|
|
|
112
112
|
## 3.0.0-alpha.27(2021-10-12)
|
|
113
113
|
### Web端
|
|
114
114
|
#### Bug Fix
|
|
115
|
-
1. FLEXCLOUD-1817 组件更改其中一变量,其余变量应不生效,模板中删除、更改变量,删除与更改变量应不生效
|
|
115
|
+
1. FLEXCLOUD-1817 组件更改其中一变量,其余变量应不生效,模板中删除、更改变量,删除与更改变量应不生效
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 3.0.0-alpha.28(2021-10-29)
|
|
119
|
+
### Web端
|
|
120
|
+
#### Bug Fix
|
|
121
|
+
1. FLEXCLOUD-1851 无数据时,默认应展示0值
|
|
122
|
+
|
|
123
|
+
## 3.0.0-alpha.29(2021-11-04)
|
|
124
|
+
### Web端
|
|
125
|
+
#### Bug Fix
|
|
126
|
+
1. FLEXCLOUD-1851 无数据时,默认应展示0值
|
|
127
|
+
|
|
128
|
+
## 3.0.0-alpha.30(2021-12-03)
|
|
129
|
+
### Web端
|
|
130
|
+
#### Bug Fix
|
|
131
|
+
1. FLEXCLOUD-1969: 天津亿晟:组态中的历史曲线增加时间筛选刻度
|
|
@@ -22164,7 +22164,9 @@ const Localization_zh_CN = {
|
|
|
22164
22164
|
permissiontip: '您无权限执行此操作',
|
|
22165
22165
|
conditionIsNotMetTip: '操作条件不满足或逻辑控制变量异常',
|
|
22166
22166
|
chartNoData: '无数据',
|
|
22167
|
+
lastThirtyMinutes: '最近30分钟',
|
|
22167
22168
|
lastOneHour: '最近1小时',
|
|
22169
|
+
lastEightHour: '最近8小时',
|
|
22168
22170
|
lastTwentyFourHours: '最近24小时',
|
|
22169
22171
|
lastSevenDays: '最近7天',
|
|
22170
22172
|
lastThirtyDays: '最近30天',
|
|
@@ -22890,7 +22892,9 @@ const DefaultLocalization = {
|
|
|
22890
22892
|
permissiontip: 'You have no permission to operate.',
|
|
22891
22893
|
conditionIsNotMetTip: 'Unsatisfied operating conditions or variable abnorma.',
|
|
22892
22894
|
chartNoData: 'No Data Available',
|
|
22895
|
+
lastThirtyMinutes: 'Last thirty minutes',
|
|
22893
22896
|
lastOneHour: 'Last one hour',
|
|
22897
|
+
lastEightHour: 'Last eight hours',
|
|
22894
22898
|
lastTwentyFourHours: 'Last 24 hours',
|
|
22895
22899
|
lastSevenDays: 'Last 7 days',
|
|
22896
22900
|
lastThirtyDays: 'Last 30 days',
|
|
@@ -25699,7 +25703,9 @@ class readable_element_ReadableElement extends conditional_enable_element_Condit
|
|
|
25699
25703
|
this.changeStates();
|
|
25700
25704
|
}
|
|
25701
25705
|
});
|
|
25702
|
-
if (this.state === _tmp_model["State"].Normal || this.state === _tmp_model["State"].Disable
|
|
25706
|
+
if (this.state === _tmp_model["State"].Normal || this.state === _tmp_model["State"].Disable
|
|
25707
|
+
|| value.variableName === this.minVariableName
|
|
25708
|
+
|| value.variableName === this.maxVariableName) {
|
|
25703
25709
|
this.updateVariableValue(value.value, value.variableName);
|
|
25704
25710
|
}
|
|
25705
25711
|
}
|
|
@@ -25730,7 +25736,6 @@ var variable_value_type = __webpack_require__(15);
|
|
|
25730
25736
|
|
|
25731
25737
|
|
|
25732
25738
|
|
|
25733
|
-
|
|
25734
25739
|
class bar_graph_element_BarGraphElement extends readable_element_ReadableElement {
|
|
25735
25740
|
constructor(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId) {
|
|
25736
25741
|
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
@@ -25780,21 +25785,17 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
25780
25785
|
}
|
|
25781
25786
|
updateValueObj(value, variableName) {
|
|
25782
25787
|
var _a, _b, _c;
|
|
25783
|
-
|
|
25784
|
-
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
|
|
25791
|
-
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
this.valueObj.max = value;
|
|
25795
|
-
break;
|
|
25796
|
-
default:
|
|
25797
|
-
break;
|
|
25788
|
+
if (((_a = this.model.readVariable) === null || _a === void 0 ? void 0 : _a.name) === variableName) {
|
|
25789
|
+
this.isNeedUpdateScale = false;
|
|
25790
|
+
this.valueObj.value = value;
|
|
25791
|
+
}
|
|
25792
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.name) === variableName) {
|
|
25793
|
+
this.isNeedUpdateScale = true;
|
|
25794
|
+
this.valueObj.min = value;
|
|
25795
|
+
}
|
|
25796
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.name) === variableName) {
|
|
25797
|
+
this.isNeedUpdateScale = true;
|
|
25798
|
+
this.valueObj.max = value;
|
|
25798
25799
|
}
|
|
25799
25800
|
}
|
|
25800
25801
|
updateScale() {
|
|
@@ -25804,11 +25805,13 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
25804
25805
|
const textElements = this.$element.find('g:first > text');
|
|
25805
25806
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
25806
25807
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
25807
|
-
|
|
25808
|
+
min = Number(min);
|
|
25809
|
+
max = Number(max);
|
|
25810
|
+
if (isNaN(min) || isNaN(max)) {
|
|
25808
25811
|
min = bar_graph_element_BarGraphElement.DEFAULT_MIN_VALUE;
|
|
25809
25812
|
max = bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE;
|
|
25810
25813
|
}
|
|
25811
|
-
const avgSacle = ((
|
|
25814
|
+
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
25812
25815
|
for (let i = 0; i < textElements.length; i++) {
|
|
25813
25816
|
const text = textElements[i];
|
|
25814
25817
|
if (!text.innerHTML) {
|
|
@@ -25827,14 +25830,16 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
25827
25830
|
updateVariableValue(value, variableName) {
|
|
25828
25831
|
this.updateValueObj(value, variableName);
|
|
25829
25832
|
this.updateScale();
|
|
25830
|
-
const variableValue = this.valueObj.value;
|
|
25833
|
+
const variableValue = Number(this.valueObj.value);
|
|
25831
25834
|
let maxValue = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
25832
25835
|
let minValue = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
25833
|
-
|
|
25836
|
+
minValue = Number(minValue);
|
|
25837
|
+
maxValue = Number(maxValue);
|
|
25838
|
+
if (isNaN(minValue) || isNaN(maxValue)) {
|
|
25834
25839
|
minValue = bar_graph_element_BarGraphElement.DEFAULT_MIN_VALUE;
|
|
25835
25840
|
maxValue = bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE;
|
|
25836
25841
|
}
|
|
25837
|
-
if (
|
|
25842
|
+
if (isNaN(variableValue)) {
|
|
25838
25843
|
return;
|
|
25839
25844
|
}
|
|
25840
25845
|
const useAlarmLimit = this.model.useAlarmLimit;
|
|
@@ -26760,7 +26765,9 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26760
26765
|
}
|
|
26761
26766
|
getValidTimePeriods() {
|
|
26762
26767
|
const timePeriods = new Array();
|
|
26768
|
+
timePeriods.push({ key: 6, name: this.localization.lastThirtyMinutes });
|
|
26763
26769
|
timePeriods.push({ key: 1, name: this.localization.lastOneHour });
|
|
26770
|
+
timePeriods.push({ key: 7, name: this.localization.lastEightHour });
|
|
26764
26771
|
timePeriods.push({ key: 2, name: this.localization.lastTwentyFourHours });
|
|
26765
26772
|
timePeriods.push({ key: 3, name: this.localization.lastSevenDays });
|
|
26766
26773
|
timePeriods.push({ key: 4, name: this.localization.lastThirtyDays });
|
|
@@ -26786,6 +26793,12 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26786
26793
|
case 5:
|
|
26787
26794
|
this.startTime = moment().subtract(1, 'years');
|
|
26788
26795
|
break;
|
|
26796
|
+
case 6:
|
|
26797
|
+
this.startTime = moment().subtract(30, 'minutes');
|
|
26798
|
+
break;
|
|
26799
|
+
case 7:
|
|
26800
|
+
this.startTime = moment().subtract(8, 'hours');
|
|
26801
|
+
break;
|
|
26789
26802
|
default:
|
|
26790
26803
|
this.startTime = moment().subtract(1, 'days');
|
|
26791
26804
|
}
|
|
@@ -27111,21 +27124,17 @@ class meter_element_MeterElement extends readable_element_ReadableElement {
|
|
|
27111
27124
|
}
|
|
27112
27125
|
updateValueObj(value, variableName) {
|
|
27113
27126
|
var _a, _b, _c;
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27117
|
-
|
|
27118
|
-
|
|
27119
|
-
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
this.valueObj.max = value;
|
|
27126
|
-
break;
|
|
27127
|
-
default:
|
|
27128
|
-
break;
|
|
27127
|
+
if (((_a = this.model.readVariable) === null || _a === void 0 ? void 0 : _a.name) === variableName) {
|
|
27128
|
+
this.isNeedUpdateScale = false;
|
|
27129
|
+
this.valueObj.value = value;
|
|
27130
|
+
}
|
|
27131
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.name) === variableName) {
|
|
27132
|
+
this.isNeedUpdateScale = true;
|
|
27133
|
+
this.valueObj.min = value;
|
|
27134
|
+
}
|
|
27135
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.name) === variableName) {
|
|
27136
|
+
this.isNeedUpdateScale = true;
|
|
27137
|
+
this.valueObj.max = value;
|
|
27129
27138
|
}
|
|
27130
27139
|
}
|
|
27131
27140
|
updateVariableValue(value, variableName) {
|
|
@@ -27146,11 +27155,13 @@ class meter_element_MeterElement extends readable_element_ReadableElement {
|
|
|
27146
27155
|
}
|
|
27147
27156
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
27148
27157
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
27149
|
-
|
|
27158
|
+
min = Number(min);
|
|
27159
|
+
max = Number(max);
|
|
27160
|
+
if (isNaN(min) || isNaN(max)) {
|
|
27150
27161
|
min = meter_element_MeterElement.DEFAULT_MIN_VALUE;
|
|
27151
27162
|
max = meter_element_MeterElement.DEFAULT_MAX_VALUE;
|
|
27152
27163
|
}
|
|
27153
|
-
const avgSacle = ((
|
|
27164
|
+
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
27154
27165
|
const textElements = this.$element.find('g:first > text');
|
|
27155
27166
|
for (let i = 0; i < textElements.length; i++) {
|
|
27156
27167
|
const text = textElements[i];
|
|
@@ -27170,11 +27181,13 @@ class meter_element_MeterElement extends readable_element_ReadableElement {
|
|
|
27170
27181
|
getAngle() {
|
|
27171
27182
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
27172
27183
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
27173
|
-
|
|
27184
|
+
min = Number(min);
|
|
27185
|
+
max = Number(max);
|
|
27186
|
+
if (isNaN(min) || isNaN(max)) {
|
|
27174
27187
|
min = meter_element_MeterElement.DEFAULT_MIN_VALUE;
|
|
27175
27188
|
max = meter_element_MeterElement.DEFAULT_MAX_VALUE;
|
|
27176
27189
|
}
|
|
27177
|
-
if (!this.valueObj.value &&
|
|
27190
|
+
if (!this.valueObj.value && isNaN(Number(this.valueObj.value))) {
|
|
27178
27191
|
return undefined;
|
|
27179
27192
|
}
|
|
27180
27193
|
const value = Math.min(Math.max(this.valueObj.value || 0, min), max);
|
|
@@ -27583,7 +27596,7 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
|
|
|
27583
27596
|
}
|
|
27584
27597
|
formatDisplayTextUnit(displayText) {
|
|
27585
27598
|
if (this.model.showUnit !== false && this.model.unit) {
|
|
27586
|
-
return `${displayText} ${this.model.unit}`;
|
|
27599
|
+
return `${displayText || 0} ${this.model.unit}`;
|
|
27587
27600
|
}
|
|
27588
27601
|
return displayText;
|
|
27589
27602
|
}
|
|
@@ -28032,21 +28045,17 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28032
28045
|
}
|
|
28033
28046
|
updateValueObj(value, variableName) {
|
|
28034
28047
|
var _a, _b, _c;
|
|
28035
|
-
|
|
28036
|
-
|
|
28037
|
-
|
|
28038
|
-
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
|
|
28042
|
-
|
|
28043
|
-
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
this.valueObj.max = value;
|
|
28047
|
-
break;
|
|
28048
|
-
default:
|
|
28049
|
-
break;
|
|
28048
|
+
if (((_a = this.model.variableId) === null || _a === void 0 ? void 0 : _a.variableName.name) === variableName) {
|
|
28049
|
+
this.isNeedUpdateScale = false;
|
|
28050
|
+
this.valueObj.value = value;
|
|
28051
|
+
}
|
|
28052
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.variableName.name) === variableName) {
|
|
28053
|
+
this.isNeedUpdateScale = true;
|
|
28054
|
+
this.valueObj.min = value;
|
|
28055
|
+
}
|
|
28056
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.variableName.name) === variableName) {
|
|
28057
|
+
this.isNeedUpdateScale = true;
|
|
28058
|
+
this.valueObj.max = value;
|
|
28050
28059
|
}
|
|
28051
28060
|
}
|
|
28052
28061
|
updateScale() {
|
|
@@ -28056,11 +28065,13 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28056
28065
|
const textElements = this.$element.find('g:first > text');
|
|
28057
28066
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
28058
28067
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
28059
|
-
|
|
28068
|
+
min = Number(min);
|
|
28069
|
+
max = Number(max);
|
|
28070
|
+
if (isNaN(min) || isNaN(max)) {
|
|
28060
28071
|
min = ring_graph_element_RingGraphElement.DEFAULT_MIN_VALUE;
|
|
28061
28072
|
max = ring_graph_element_RingGraphElement.DEFAULT_MAX_VALUE;
|
|
28062
28073
|
}
|
|
28063
|
-
const avgSacle = ((
|
|
28074
|
+
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
28064
28075
|
for (let i = 0; i < textElements.length; i++) {
|
|
28065
28076
|
const text = textElements[i];
|
|
28066
28077
|
if (!text.innerHTML) {
|
|
@@ -28081,7 +28092,9 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28081
28092
|
this.updateScale();
|
|
28082
28093
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
28083
28094
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
28084
|
-
|
|
28095
|
+
min = Number(min);
|
|
28096
|
+
max = Number(max);
|
|
28097
|
+
if (isNaN(min) || isNaN(max)) {
|
|
28085
28098
|
min = ring_graph_element_RingGraphElement.DEFAULT_MIN_VALUE;
|
|
28086
28099
|
max = ring_graph_element_RingGraphElement.DEFAULT_MAX_VALUE;
|
|
28087
28100
|
}
|