@flexem/fc-gui 3.0.0-alpha.32 → 3.0.0-alpha.36
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 +10 -0
- package/bundles/@flexem/fc-gui.umd.js +83 -7
- 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/air-quality/air-quality-element.js +3 -3
- package/elements/historical-curve/historical-curve.element.js +80 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -140,3 +140,13 @@
|
|
|
140
140
|
#### Bug Fix
|
|
141
141
|
1. FLEXCLOUD-2100: 苏州水星:历史曲线组件支持Y轴自定义设定范围
|
|
142
142
|
|
|
143
|
+
|
|
144
|
+
## 3.0.0-alpha.33(2022-07-08)
|
|
145
|
+
### Web端
|
|
146
|
+
#### Bug Fix
|
|
147
|
+
1. FLEXCLOUD-2171: 设备仪表盘:空气质量指数元件数值展示优化
|
|
148
|
+
|
|
149
|
+
## 3.0.0-alpha.36(2022-09-02)
|
|
150
|
+
### Web端
|
|
151
|
+
#### Features
|
|
152
|
+
1. FLEXCLOUD-2218: 组态设计:历史曲线表,超过24小时,按天统计,X轴显示增加日期(年月日)
|
|
@@ -26736,7 +26736,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26736
26736
|
marginRight: 20,
|
|
26737
26737
|
mobileMinWidth: 450,
|
|
26738
26738
|
operationAreaHeight: 32,
|
|
26739
|
-
operationAreaMarginTop:
|
|
26739
|
+
operationAreaMarginTop: 25,
|
|
26740
26740
|
operationSelectFontSize: '16px',
|
|
26741
26741
|
operationButtonWidth: 24,
|
|
26742
26742
|
operationButtonHeight: 24,
|
|
@@ -26753,7 +26753,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26753
26753
|
}, this.model.displaySetting.refreshInterval * 1000);
|
|
26754
26754
|
this.isMobileMode = _tmp_settings["a" /* DisplayMode */].Mobile === injector.get(_tmp_settings["b" /* GlobalSettings */]).displayMode;
|
|
26755
26755
|
if (this.isMobileMode) {
|
|
26756
|
-
this.displayOption.operationAreaMarginTop =
|
|
26756
|
+
this.displayOption.operationAreaMarginTop = 35;
|
|
26757
26757
|
if (this.model.displaySetting.size.width >= this.displayOption.mobileMinWidth) {
|
|
26758
26758
|
this.displayOption.operationAreaHeight = 68;
|
|
26759
26759
|
this.displayOption.operationSelectFontSize = '24px';
|
|
@@ -26919,7 +26919,12 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26919
26919
|
renderCommonProperty(chart, chartWidth, chartHeight, data) {
|
|
26920
26920
|
chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
|
|
26921
26921
|
if (this.model.displaySetting.showAxis) {
|
|
26922
|
-
chart.xAxis.showMaxMin(true).tickFormat(d =>
|
|
26922
|
+
chart.xAxis.showMaxMin(true).tickFormat(d => {
|
|
26923
|
+
if (this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
|
|
26924
|
+
return this.timeFormat(d, '%y-%m-%d');
|
|
26925
|
+
}
|
|
26926
|
+
return this.timeFormat(Number(d), '%X');
|
|
26927
|
+
});
|
|
26923
26928
|
if (this.model.displaySetting.axisSetting) {
|
|
26924
26929
|
if (this.model.displaySetting.axisSetting.showAxisLabel && this.model.displaySetting.axisSetting.axisLabelFont) {
|
|
26925
26930
|
chart.xAxis.fontSize(this.model.displaySetting.axisSetting.axisLabelFont.fontSize);
|
|
@@ -26944,15 +26949,86 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26944
26949
|
chart.update();
|
|
26945
26950
|
this.rootElement.selectAll('.nv-noData').attr('x', chartWidth / 2).attr('y', chartHeight / 2 + this.displayOption.operationAreaHeight);
|
|
26946
26951
|
});
|
|
26952
|
+
const fontSize = this.model.displaySetting.axisSetting.axisLabelFont.fontSize;
|
|
26947
26953
|
this.rootElement.selectAll('.domain').style('stroke-opacity', 1);
|
|
26948
26954
|
if (this.model.displaySetting.showAxis && this.model.displaySetting.axisSetting) {
|
|
26949
26955
|
const axisColor = this.model.displaySetting.axisSetting.axisColor;
|
|
26950
26956
|
this.rootElement.selectAll('.domain').style('stroke', axisColor);
|
|
26951
26957
|
if (this.model.displaySetting.axisSetting.showAxisLabel) {
|
|
26952
|
-
const fontSize = this.model.displaySetting.axisSetting.axisLabelFont.fontSize;
|
|
26953
26958
|
this.rootElement.selectAll('.nv-axisMaxMin').select('text').style('font-size', fontSize);
|
|
26954
26959
|
}
|
|
26955
26960
|
}
|
|
26961
|
+
const self = this;
|
|
26962
|
+
if (self.currentTimePeriod === 3 || self.currentTimePeriod === 4 || self.currentTimePeriod === 5) {
|
|
26963
|
+
this.rootElement
|
|
26964
|
+
.selectAll('.nv-x')
|
|
26965
|
+
.selectAll('.tick')
|
|
26966
|
+
.selectAll('text')
|
|
26967
|
+
.data(function (d) {
|
|
26968
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
26969
|
+
})
|
|
26970
|
+
.enter()
|
|
26971
|
+
.append('text')
|
|
26972
|
+
.attr('class', 'full-date')
|
|
26973
|
+
.attr('x', 0)
|
|
26974
|
+
.attr('y', 0)
|
|
26975
|
+
.attr('dy', '2.3em')
|
|
26976
|
+
.style('text-anchor', 'middle')
|
|
26977
|
+
.style('font-size', fontSize)
|
|
26978
|
+
.text((d) => d);
|
|
26979
|
+
this.rootElement
|
|
26980
|
+
.selectAll('.nv-axisMaxMin-x')
|
|
26981
|
+
.selectAll('text')
|
|
26982
|
+
.data(function (d) {
|
|
26983
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
26984
|
+
})
|
|
26985
|
+
.enter()
|
|
26986
|
+
.append('text')
|
|
26987
|
+
.attr('class', 'full-date')
|
|
26988
|
+
.attr('x', 0)
|
|
26989
|
+
.attr('y', 0)
|
|
26990
|
+
.attr('dy', '2.3em')
|
|
26991
|
+
.style('text-anchor', 'middle')
|
|
26992
|
+
.style('font-size', fontSize)
|
|
26993
|
+
.text((d) => d);
|
|
26994
|
+
const h = this.rootElement
|
|
26995
|
+
.selectAll('.nv-focusWrap')
|
|
26996
|
+
.attr('transform')
|
|
26997
|
+
.slice(0, -1)
|
|
26998
|
+
.split(',')[1];
|
|
26999
|
+
this.rootElement
|
|
27000
|
+
.selectAll('.nv-focusWrap')
|
|
27001
|
+
.attr('transform', `translate(0,${Number(h) + 15})`);
|
|
27002
|
+
const resizeObserver = new window.MutationObserver(() => {
|
|
27003
|
+
this.rootElement
|
|
27004
|
+
.selectAll('.nv-x')
|
|
27005
|
+
.selectAll('.tick')
|
|
27006
|
+
.selectAll('.full-date')
|
|
27007
|
+
.remove();
|
|
27008
|
+
this.rootElement
|
|
27009
|
+
.selectAll('.nv-x')
|
|
27010
|
+
.selectAll('.tick')
|
|
27011
|
+
.selectAll('text')
|
|
27012
|
+
.data(function (d) {
|
|
27013
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
27014
|
+
})
|
|
27015
|
+
.enter()
|
|
27016
|
+
.append('text')
|
|
27017
|
+
.attr('class', 'full-date')
|
|
27018
|
+
.attr('x', 0)
|
|
27019
|
+
.attr('y', 0)
|
|
27020
|
+
.attr('dy', '2.3em')
|
|
27021
|
+
.style('text-anchor', 'middle')
|
|
27022
|
+
.style('font-size', fontSize)
|
|
27023
|
+
.text((d) => d);
|
|
27024
|
+
});
|
|
27025
|
+
resizeObserver.observe(document.getElementsByClassName('extent')[0], { attributes: true });
|
|
27026
|
+
}
|
|
27027
|
+
else {
|
|
27028
|
+
this.rootElement
|
|
27029
|
+
.selectAll('.full-date')
|
|
27030
|
+
.remove();
|
|
27031
|
+
}
|
|
26956
27032
|
}
|
|
26957
27033
|
renderOperationArea(chartWidth, chartHeight) {
|
|
26958
27034
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
@@ -30141,9 +30217,9 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
30141
30217
|
this.buildBackgroudRect(airQualitySvg, backgroundColor);
|
|
30142
30218
|
this.buildLocGroup(airQualitySvg, airQuality.city, fontColor);
|
|
30143
30219
|
this.buildAirQualityText(airQualitySvg, 130, 55, airQuality.aqi, fontColor, 53);
|
|
30144
|
-
this.buildAirQualityText(airQualitySvg,
|
|
30220
|
+
this.buildAirQualityText(airQualitySvg, 220, 28, '空气质量', fontColor);
|
|
30145
30221
|
this.buildRectBackgroundForAqi(airQualitySvg, airQuality.level);
|
|
30146
|
-
this.buildAirQualityText(airQualitySvg,
|
|
30222
|
+
this.buildAirQualityText(airQualitySvg, 220, 49, airQuality.category, fontColor);
|
|
30147
30223
|
this.buildAirQualityText(airQualitySvg, 30, 75, 'PM2.5', fontColor, 12, 0.8);
|
|
30148
30224
|
this.buildAirQualityText(airQualitySvg, 30, 95, airQuality.pm25, fontColor, 15);
|
|
30149
30225
|
this.buildAirQualityText(airQualitySvg, 80, 75, 'PM10', fontColor, 12, 0.8);
|
|
@@ -30206,7 +30282,7 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
30206
30282
|
backgroundColor = '#A10E0E';
|
|
30207
30283
|
}
|
|
30208
30284
|
airQualitySvg.append('rect')
|
|
30209
|
-
.attr('x', '
|
|
30285
|
+
.attr('x', '195')
|
|
30210
30286
|
.attr('y', '35')
|
|
30211
30287
|
.attr('rx', '5')
|
|
30212
30288
|
.attr('width', '50')
|