|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="stationPowerContro" :class="!theme ? 'themeDark' : ''">
|
|
|
+ <div class="stationPowerContro">
|
|
|
<div class="main_top">
|
|
|
<!-- <div class="search-item" style="margin-left: 16px">
|
|
|
<span class="label">场站:</span>
|
|
@@ -51,7 +51,7 @@
|
|
|
v-loading="loading"
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
- :max-height="tableMainHeight"
|
|
|
+ :height="isFullScreen ? '75vh' : '87vh'"
|
|
|
ref="stationPowerTable"
|
|
|
element-loading-background="rgba(0,0,0,.5)"
|
|
|
:header-cell-style="{ 'text-align': 'center', 'font-size': '12px' }"
|
|
@@ -89,6 +89,7 @@ import { forIn } from "@antv/x6/lib/util/object/object";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ isFullScreen: false,
|
|
|
year: "",
|
|
|
stationId: "NX_FGS_HA_FDC_STA",
|
|
|
stationName: "",
|
|
@@ -152,10 +153,25 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ const clientHeight =
|
|
|
+ document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
+ if (clientHeight === 1080) {
|
|
|
+ this.isFullScreen = true;
|
|
|
+ } else {
|
|
|
+ this.isFullScreen = false;
|
|
|
+ }
|
|
|
+ window.onresize = () => {
|
|
|
+ const clientHeight =
|
|
|
+ document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
+ this.isFullScreen = window.screen.height == clientHeight;
|
|
|
+ };
|
|
|
// this.changeData(dataJson)
|
|
|
this.funGetStation();
|
|
|
this.year = dayjs().format("YYYY");
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ },
|
|
|
computed: {
|
|
|
tableHeight() {
|
|
|
let height = (document.documentElement.clientHeight - 190) / 2 + "px";
|
|
@@ -165,7 +181,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
tableMainHeight() {
|
|
|
- let height = document.documentElement.clientHeight - 180 + "px";
|
|
|
+ let height = document.documentElement.clientHeight - 130 + "px";
|
|
|
return height;
|
|
|
},
|
|
|
},
|