@flexem/fc-gui 3.0.0-alpha.28 → 3.0.0-alpha.31
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 +15 -0
- package/bundles/@flexem/fc-gui.umd.js +83 -61
- 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/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/ring-graph/ring-graph-element.js +30 -21
- package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
- 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
|
@@ -119,3 +119,18 @@
|
|
|
119
119
|
### Web端
|
|
120
120
|
#### Bug Fix
|
|
121
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: 天津亿晟:组态中的历史曲线增加时间筛选刻度
|
|
132
|
+
|
|
133
|
+
## 3.0.0-alpha.31(2021-12-16)
|
|
134
|
+
### Web端
|
|
135
|
+
#### Bug Fix
|
|
136
|
+
1. FLEXCLOUD-1817: 组件更改其中一变量,其余变量应不生效,模板中删除、更改变量,删除与更改变量应不生效
|
|
@@ -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);
|
|
@@ -27995,6 +28008,9 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
27995
28008
|
if (!this.model.variableId) {
|
|
27996
28009
|
return '';
|
|
27997
28010
|
}
|
|
28011
|
+
if (!this.model.variableId.variableName || !this.model.variableId.variableName.name) {
|
|
28012
|
+
return undefined;
|
|
28013
|
+
}
|
|
27998
28014
|
const variable = new variable_definition["a" /* VariableDefinition */](this.model.variableId.variableName.name, this.model.variableId.variableName.groupName, this.model.variableId.dataSourceCode, this.model.variableId.variableName.variableVersion);
|
|
27999
28015
|
return variable_util["a" /* VariableUtil */].getConvertedVariableName(this.variableStore, variable);
|
|
28000
28016
|
}
|
|
@@ -28002,14 +28018,20 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28002
28018
|
if (!this.model.minValueType) {
|
|
28003
28019
|
return undefined;
|
|
28004
28020
|
}
|
|
28005
|
-
|
|
28021
|
+
if (!this.model.minVariable || !this.model.minVariable.name) {
|
|
28022
|
+
return undefined;
|
|
28023
|
+
}
|
|
28024
|
+
const variable = new variable_definition["a" /* VariableDefinition */](this.model.minVariable.name, this.model.minVariable.groupName, this.model.minVariable.dataSourceCode, this.model.minVariable.variableVersion);
|
|
28006
28025
|
return variable_util["a" /* VariableUtil */].getConvertedVariableName(this.variableStore, variable);
|
|
28007
28026
|
}
|
|
28008
28027
|
get maxVariableName() {
|
|
28009
28028
|
if (!this.model.maxValueType) {
|
|
28010
28029
|
return undefined;
|
|
28011
28030
|
}
|
|
28012
|
-
|
|
28031
|
+
if (!this.model.maxVariable || !this.model.maxVariable.name) {
|
|
28032
|
+
return undefined;
|
|
28033
|
+
}
|
|
28034
|
+
const variable = new variable_definition["a" /* VariableDefinition */](this.model.maxVariable.name, this.model.maxVariable.groupName, this.model.maxVariable.dataSourceCode, this.model.maxVariable.variableVersion);
|
|
28013
28035
|
return variable_util["a" /* VariableUtil */].getConvertedVariableName(this.variableStore, variable);
|
|
28014
28036
|
}
|
|
28015
28037
|
initFrameNode() {
|
|
@@ -28032,21 +28054,17 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28032
28054
|
}
|
|
28033
28055
|
updateValueObj(value, variableName) {
|
|
28034
28056
|
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;
|
|
28057
|
+
if (((_a = this.model.variableId) === null || _a === void 0 ? void 0 : _a.variableName.name) === variableName) {
|
|
28058
|
+
this.isNeedUpdateScale = false;
|
|
28059
|
+
this.valueObj.value = value;
|
|
28060
|
+
}
|
|
28061
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.name) === variableName) {
|
|
28062
|
+
this.isNeedUpdateScale = true;
|
|
28063
|
+
this.valueObj.min = value;
|
|
28064
|
+
}
|
|
28065
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.name) === variableName) {
|
|
28066
|
+
this.isNeedUpdateScale = true;
|
|
28067
|
+
this.valueObj.max = value;
|
|
28050
28068
|
}
|
|
28051
28069
|
}
|
|
28052
28070
|
updateScale() {
|
|
@@ -28056,11 +28074,13 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28056
28074
|
const textElements = this.$element.find('g:first > text');
|
|
28057
28075
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
28058
28076
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
28059
|
-
|
|
28077
|
+
min = Number(min);
|
|
28078
|
+
max = Number(max);
|
|
28079
|
+
if (isNaN(min) || isNaN(max)) {
|
|
28060
28080
|
min = ring_graph_element_RingGraphElement.DEFAULT_MIN_VALUE;
|
|
28061
28081
|
max = ring_graph_element_RingGraphElement.DEFAULT_MAX_VALUE;
|
|
28062
28082
|
}
|
|
28063
|
-
const avgSacle = ((
|
|
28083
|
+
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
28064
28084
|
for (let i = 0; i < textElements.length; i++) {
|
|
28065
28085
|
const text = textElements[i];
|
|
28066
28086
|
if (!text.innerHTML) {
|
|
@@ -28081,7 +28101,9 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
|
|
|
28081
28101
|
this.updateScale();
|
|
28082
28102
|
let min = this.model.minValueType ? this.valueObj.min : this.model.min;
|
|
28083
28103
|
let max = this.model.maxValueType ? this.valueObj.max : this.model.max;
|
|
28084
|
-
|
|
28104
|
+
min = Number(min);
|
|
28105
|
+
max = Number(max);
|
|
28106
|
+
if (isNaN(min) || isNaN(max)) {
|
|
28085
28107
|
min = ring_graph_element_RingGraphElement.DEFAULT_MIN_VALUE;
|
|
28086
28108
|
max = ring_graph_element_RingGraphElement.DEFAULT_MAX_VALUE;
|
|
28087
28109
|
}
|