|
@@ -4,7 +4,7 @@
|
|
|
:key="'comKey' + comKey"
|
|
|
class="container"
|
|
|
:style="{
|
|
|
- marginTop: marginTop + 'px',
|
|
|
+ marginTop: containerStyle.marginTop,
|
|
|
}"
|
|
|
>
|
|
|
<svg width="100%" height="100%"></svg>
|
|
@@ -693,6 +693,9 @@ export default {
|
|
|
},
|
|
|
legendStyle: {
|
|
|
marginTop: '476px'
|
|
|
+ },
|
|
|
+ containerStyle: {
|
|
|
+ marginTop: '-12px'
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -743,11 +746,12 @@ export default {
|
|
|
this.array42.push(i);
|
|
|
}
|
|
|
this.initData();
|
|
|
- const marginTop =
|
|
|
+ // 计算默认marginTop
|
|
|
+ const defaultMarginTop =
|
|
|
(Math.round(this.$refs.topTd[0].getBoundingClientRect().height) - 18) *
|
|
|
10 +
|
|
|
28;
|
|
|
- this.marginTop = marginTop;
|
|
|
+ this.marginTop = defaultMarginTop;
|
|
|
|
|
|
// 根据分辨率设置样式
|
|
|
this.setStyleByResolution();
|
|
@@ -1275,6 +1279,10 @@ export default {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
|
|
|
+ let containerStyle = {
|
|
|
+ marginTop: '-12px'
|
|
|
+ };
|
|
|
+
|
|
|
// 可以根据不同分辨率设置不同样式
|
|
|
// 例如:1920x1080
|
|
|
if (screenWidth === 1920 && screenHeight === 1080) {
|
|
@@ -1293,6 +1301,9 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: '22px'
|
|
|
+ };
|
|
|
}
|
|
|
// 例如:1366x768
|
|
|
else if (screenWidth === 1366 && screenHeight === 768) {
|
|
@@ -1311,6 +1322,9 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: '22px'
|
|
|
+ };
|
|
|
}
|
|
|
// 例如:1536x864
|
|
|
else if (screenWidth === 1536 && screenHeight === 864) {
|
|
@@ -1329,6 +1343,9 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: '23px'
|
|
|
+ };
|
|
|
|
|
|
}
|
|
|
// 例如:1360x768
|
|
@@ -1348,8 +1365,11 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: '22px'
|
|
|
+ };
|
|
|
}
|
|
|
- // 例如:1360x768
|
|
|
+ // 例如:1440x900
|
|
|
else if (screenWidth === 1440 && screenHeight === 900) {
|
|
|
pulseStyle = {
|
|
|
titleMarginTop: '0px',
|
|
@@ -1366,6 +1386,9 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: '22px'
|
|
|
+ };
|
|
|
}
|
|
|
// 其他分辨率使用默认样式
|
|
|
else {
|
|
@@ -1384,11 +1407,15 @@ export default {
|
|
|
legendStyle = {
|
|
|
marginTop: '476px'
|
|
|
};
|
|
|
+ containerStyle = {
|
|
|
+ marginTop: marginTop.value + 'px',
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
this.pulseScaleStyle = pulseStyle;
|
|
|
this.temperatureScaleStyle = temperatureStyle;
|
|
|
this.legendStyle = legendStyle;
|
|
|
+ this.containerStyle = containerStyle;
|
|
|
},
|
|
|
},
|
|
|
};
|