Compare commits
5 Commits
screen-dev
...
55b7fba021
| Author | SHA1 | Date | |
|---|---|---|---|
| 55b7fba021 | |||
| da4ecc4792 | |||
| 498dc117f2 | |||
| 4d29de93a1 | |||
| 445e9dfc9f |
BIN
src/assets/images/ems/bigData-1.png
Normal file
BIN
src/assets/images/ems/bigData-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 MiB |
BIN
src/assets/images/ems/bigData-2.png
Normal file
BIN
src/assets/images/ems/bigData-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
@ -1,7 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :fullscreen="true" :append-to-body="true" :visible.sync="show" :show-close="false" top="0"
|
<el-dialog
|
||||||
custom-class="big-data-dialog">
|
:fullscreen="true"
|
||||||
<img src="@/assets/images/ems/bigData.png" alt="">
|
:append-to-body="true"
|
||||||
|
:visible.sync="show"
|
||||||
|
:show-close="false"
|
||||||
|
top="0"
|
||||||
|
custom-class="big-data-dialog"
|
||||||
|
>
|
||||||
|
<div class="swiper-container">
|
||||||
|
<div class="swiper-icon left-icon" v-show="imgIndex > 0">
|
||||||
|
<i class="el-icon-d-arrow-left icon" @click="toLeft"></i>
|
||||||
|
</div>
|
||||||
|
<div v-show="showRightIcon" class="swiper-icon right-icon">
|
||||||
|
<i class="el-icon-d-arrow-right icon" @click="toRight"></i>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="img-container"
|
||||||
|
:style="{ transform: 'translateX(' + imgIndex * -100 + 'vw)' }"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-for="index in maxImgNumber"
|
||||||
|
:key="'swiperImg' + index"
|
||||||
|
:src="require(`@/assets/images/ems/bigData-${index}.png`)"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="close-btn" @click="show = false">
|
<div class="close-btn" @click="show = false">
|
||||||
<i class="el-icon-close"></i>
|
<i class="el-icon-close"></i>
|
||||||
</div>
|
</div>
|
||||||
@ -14,15 +38,54 @@
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
font-size: 23px;
|
font-size: 23px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: rgba(176, 228, 255, 0.7);
|
color: rgba(217, 242, 255, 1);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.swiper-container {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
.swiper-icon {
|
||||||
|
color: rgba(217, 242, 255, 1);
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 20;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 30px;
|
||||||
|
padding: 20px;
|
||||||
|
background: transparent;
|
||||||
|
&.left-icon {
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
&.right-icon {
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
.icon {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
transition: all 0.6s;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.img-container {
|
||||||
|
height: 100%;
|
||||||
|
transition: all 1s;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
z-index: 0;
|
||||||
img {
|
img {
|
||||||
height: 100vh;
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@ -42,8 +105,33 @@ img {
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false
|
show: false,
|
||||||
}
|
imgIndex: 0,
|
||||||
}
|
maxImgNumber: 3,
|
||||||
}
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
showRightIcon() {
|
||||||
|
return this.imgIndex < this.maxImgNumber - 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
show: {
|
||||||
|
handler(newValue) {
|
||||||
|
if (!newValue) this.imgIndex = 0;
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toLeft() {
|
||||||
|
if (this.imgIndex === 0) return;
|
||||||
|
this.imgIndex -= 1;
|
||||||
|
},
|
||||||
|
toRight() {
|
||||||
|
if (this.imgIndex >= this.maxImgNumber - 1) return;
|
||||||
|
this.imgIndex += 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -41,6 +41,7 @@
|
|||||||
<svg-icon icon-class="more-up"/>
|
<svg-icon icon-class="more-up"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<BigDataPopup ref="bigDataPopup"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ import Hamburger from '@/components/Hamburger'
|
|||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
|
import BigDataPopup from '@/components/BigDataPopup'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
emits: ['setLayout'],
|
emits: ['setLayout'],
|
||||||
@ -61,7 +63,8 @@ export default {
|
|||||||
Hamburger,
|
Hamburger,
|
||||||
Screenfull,
|
Screenfull,
|
||||||
SizeSelect,
|
SizeSelect,
|
||||||
Search
|
Search,
|
||||||
|
BigDataPopup
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
@ -83,10 +86,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showBigDataImg() {
|
showBigDataImg() {
|
||||||
const routeUrl = this.$router.resolve({
|
this.$refs.bigDataPopup.show = true
|
||||||
path: '/screen'
|
|
||||||
})
|
|
||||||
window.open(routeUrl.href, '_blank')
|
|
||||||
},
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
|
|||||||
@ -52,11 +52,6 @@ export const constantRoutes = [
|
|||||||
component: () => import('@/views/register'),
|
component: () => import('@/views/register'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/screen',
|
|
||||||
component: () => import('@/views/screen/index'),
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB |
@ -1,418 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="big-screen-container">
|
|
||||||
<!-- 背景容器 -->
|
|
||||||
<div class="bg-wrapper">
|
|
||||||
<!-- 右侧功率曲线图表 -->
|
|
||||||
<div class="chart-box power-chart">
|
|
||||||
<div ref="powerChart" class="chart-content"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 底部中间电力需求曲线图表(width:980px, bottom:26px) -->
|
|
||||||
<div class="chart-box demand-chart">
|
|
||||||
<div ref="demandChart" class="chart-content"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
import { getPointData } from '@/api/ems/dzjk'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'PowerCurveScreen',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
powerChartInstance: null, // 功率曲线实例
|
|
||||||
demandChartInstance: null, // 电力需求曲线实例
|
|
||||||
timer: null,
|
|
||||||
siteId: '021_DDS_01',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initPowerChart() // 初始化功率曲线
|
|
||||||
this.initDemandChart() // 初始化电力需求曲线
|
|
||||||
|
|
||||||
// Initial fetch
|
|
||||||
this.fetchData()
|
|
||||||
// Polling every 5 seconds
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
this.fetchData()
|
|
||||||
}, 5000)
|
|
||||||
|
|
||||||
window.addEventListener('resize', this.resizeAllCharts)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
if (this.timer) {
|
|
||||||
clearInterval(this.timer)
|
|
||||||
this.timer = null
|
|
||||||
}
|
|
||||||
// 销毁两个图表实例
|
|
||||||
if (this.powerChartInstance) {
|
|
||||||
this.powerChartInstance.dispose()
|
|
||||||
this.powerChartInstance = null
|
|
||||||
}
|
|
||||||
if (this.demandChartInstance) {
|
|
||||||
this.demandChartInstance.dispose()
|
|
||||||
this.demandChartInstance = null
|
|
||||||
}
|
|
||||||
window.removeEventListener('resize', this.resizeAllCharts)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getTodayDate() {
|
|
||||||
const now = new Date()
|
|
||||||
const year = now.getFullYear()
|
|
||||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
|
||||||
const day = String(now.getDate()).padStart(2, '0')
|
|
||||||
return `${year}-${month}-${day}`
|
|
||||||
},
|
|
||||||
fetchData() {
|
|
||||||
const today = this.getTodayDate()
|
|
||||||
getPointData({
|
|
||||||
siteId: this.siteId,
|
|
||||||
startDate: today,
|
|
||||||
endDate: today
|
|
||||||
}).then(response => {
|
|
||||||
if (response.code === 200 && response.data) {
|
|
||||||
this.updateCharts(response.data)
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.error('Failed to fetch point data:', error)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateCharts(data) {
|
|
||||||
if (!data || !Array.isArray(data)) return
|
|
||||||
const source = [['日期', '电网功率', '负载功率', '储能功率', '光伏功率']];
|
|
||||||
const demandSource = [['日期', '电网功率', '负载功率']]
|
|
||||||
|
|
||||||
data.forEach(item => {
|
|
||||||
source.push([
|
|
||||||
item.statisDate,
|
|
||||||
item.gridPower,
|
|
||||||
item.loadPower,
|
|
||||||
item.storagePower,
|
|
||||||
item.pvPower
|
|
||||||
]);
|
|
||||||
demandSource.push([
|
|
||||||
item.statisDate,
|
|
||||||
item.gridPower, // Mapping Grid Power to Plan Demand (or just as 2nd series)
|
|
||||||
item.loadPower, // Mapping Load Power to Actual Demand
|
|
||||||
])
|
|
||||||
})
|
|
||||||
|
|
||||||
if (this.powerChartInstance) {
|
|
||||||
this.powerChartInstance.setOption({
|
|
||||||
dataset: {
|
|
||||||
source: source
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.demandChartInstance) {
|
|
||||||
this.demandChartInstance.setOption({
|
|
||||||
dataset: {
|
|
||||||
source: demandSource
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 初始化右侧功率曲线
|
|
||||||
initPowerChart() {
|
|
||||||
this.powerChartInstance = echarts.init(this.$refs.powerChart)
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
backgroundColor: 'transparent',
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
confine: true,
|
|
||||||
backgroundColor: 'rgba(0, 30, 60, 0.9)',
|
|
||||||
borderColor: '#00ccff',
|
|
||||||
textStyle: { color: '#fff' },
|
|
||||||
axisPointer: {
|
|
||||||
type: 'line',
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(0, 204, 255, 0.5)',
|
|
||||||
type: 'dashed'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
textStyle: { color: '#00ccff', fontSize: 10 },
|
|
||||||
bottom: 0,
|
|
||||||
left: 'center',
|
|
||||||
itemWidth: 9,
|
|
||||||
itemHeight: 9,
|
|
||||||
itemGap: 8,
|
|
||||||
padding: [0, 0, 0, 0]
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '2%',
|
|
||||||
right: '2%',
|
|
||||||
top: '15%',
|
|
||||||
bottom: '12%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
dataset: {
|
|
||||||
source: [] // Initial empty source
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: false,
|
|
||||||
axisLabel: {
|
|
||||||
color: '#00ccff',
|
|
||||||
fontSize: 10,
|
|
||||||
rotate: 0, // 取消旋转,因为标签较少
|
|
||||||
margin: 10,
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: { color: '#006699', width: 1.5 }
|
|
||||||
},
|
|
||||||
splitLine: { show: false },
|
|
||||||
axisTick: { show: true }
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
min: 0, // Remove fixed min/max to let it auto-scale
|
|
||||||
max: 350,
|
|
||||||
interval: 50,
|
|
||||||
axisLabel: {
|
|
||||||
color: '#00ccff',
|
|
||||||
fontSize: 12,
|
|
||||||
margin: 10,
|
|
||||||
fontWeight: 'bold'
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false,
|
|
||||||
lineStyle: { color: '#006699', width: 1.5 }
|
|
||||||
},
|
|
||||||
splitLine: { lineStyle: { color: 'rgba(0, 100, 150, 0.2)' } },
|
|
||||||
axisTick: { show: false }
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
// name: '电网功率', // Removed, auto-matched from dataset header
|
|
||||||
type: 'line',
|
|
||||||
// data: [], // Removed
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { color: '#0099ff', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(0, 153, 255, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(0, 153, 255, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name: '负载功率',
|
|
||||||
type: 'line',
|
|
||||||
// data: [],
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { color: '#00cc66', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(0, 204, 102, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(0, 204, 102, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name: '储能功率',
|
|
||||||
type: 'line',
|
|
||||||
// data: [],
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { color: '#ffcc00', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(255, 204, 0, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(255, 204, 0, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name: '光伏功率',
|
|
||||||
type: 'line',
|
|
||||||
// data: [],
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { color: '#ff3333', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(255, 51, 51, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(255, 51, 51, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
this.powerChartInstance.setOption(option)
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化底部中间电力需求曲线(适配980px宽度+130px高度+bottom:26px,两条曲线区分配色)
|
|
||||||
initDemandChart() {
|
|
||||||
this.demandChartInstance = echarts.init(this.$refs.demandChart)
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
backgroundColor: 'transparent', // 透明背景
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
backgroundColor: 'rgba(0, 30, 60, 0.9)',
|
|
||||||
borderColor: '#00ccff', // 匹配图片主色
|
|
||||||
textStyle: { color: '#fff' },
|
|
||||||
axisPointer: { type: 'shadow' },
|
|
||||||
confine: true,
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '2%',
|
|
||||||
right: '2%',
|
|
||||||
top: '5%',
|
|
||||||
bottom: '8%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
dataset: {
|
|
||||||
source: [] // Initial empty
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: false,
|
|
||||||
// data: [], // Handled by dataset
|
|
||||||
axisLabel: {
|
|
||||||
color: '#00ccff', // 匹配图片主色
|
|
||||||
fontSize: 10,
|
|
||||||
margin: 10,
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: { color: '#006699', width: 1.5 }
|
|
||||||
},
|
|
||||||
splitLine: { show: false },
|
|
||||||
axisTick: { show: true }
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
min: 0,
|
|
||||||
max: 300,
|
|
||||||
interval: 50,
|
|
||||||
axisLabel: {
|
|
||||||
color: '#00ccff', // 匹配图片主色
|
|
||||||
fontSize: 12,
|
|
||||||
margin: 10,
|
|
||||||
fontWeight: 'bold'
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false,
|
|
||||||
// lineStyle: { color: '#006699', width: 1.5 }
|
|
||||||
},
|
|
||||||
splitLine: { lineStyle: { color: 'rgba(0, 100, 150, 0.2)' } },
|
|
||||||
axisTick: { show: false }
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
type: 'line',
|
|
||||||
// data: [],
|
|
||||||
smooth: true, // 平滑曲线
|
|
||||||
symbol: 'none', // 无数据点
|
|
||||||
// lineStyle: { color: '#00F2FF', width: 2.5 }, // 匹配图片主题色
|
|
||||||
// areaStyle: {
|
|
||||||
// // 匹配图片的线性渐变:#00F2FF 从100%不透明到0%不透明
|
|
||||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
// { offset: 0, color: 'rgba(0, 242, 255, 1)' }, // 0%位置:#00F2FF 100%不透明
|
|
||||||
// { offset: 1, color: 'rgba(0, 242, 255, 0)' } // 100%位置:#00F2FF 0%不透明
|
|
||||||
// ])
|
|
||||||
// }
|
|
||||||
lineStyle: { color: '#0099ff', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(0, 153, 255, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(0, 153, 255, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name: '负载功率',
|
|
||||||
type: 'line',
|
|
||||||
// data: [],
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { color: '#00cc66', width: 2 },
|
|
||||||
areaStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(0, 204, 102, 0.4)' },
|
|
||||||
{ offset: 1, color: 'rgba(0, 204, 102, 0.05)' }
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
this.demandChartInstance.setOption(option)
|
|
||||||
},
|
|
||||||
|
|
||||||
// 统一处理窗口缩放(适配两个图表)
|
|
||||||
resizeAllCharts() {
|
|
||||||
if (this.powerChartInstance) this.powerChartInstance.resize()
|
|
||||||
if (this.demandChartInstance) this.demandChartInstance.resize()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
/* 大屏容器:固定1920x1080尺寸 */
|
|
||||||
.big-screen-container {
|
|
||||||
width: 1920px;
|
|
||||||
height: 1080px;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 背景容器:相对路径 ./background.png */
|
|
||||||
.bg-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url("./background.png");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 通用图表容器样式 */
|
|
||||||
.chart-box {
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
border-radius: 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 右侧功率曲线图表定位+尺寸 */
|
|
||||||
.power-chart {
|
|
||||||
position: absolute;
|
|
||||||
top: 143px;
|
|
||||||
right: 40px;
|
|
||||||
width: 380px;
|
|
||||||
height: 270px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 底部中间电力需求曲线图表(核心修改:width:980px, bottom:26px, height:130px) */
|
|
||||||
.demand-chart {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 26px; /* 修改为26px底部间距 */
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
width: 980px; /* 修改为980px宽度 */
|
|
||||||
height: 130px; /* 保持130px高度不变 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 图表内容区:填满容器 */
|
|
||||||
.chart-content {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user