|
|
@@ -1,5 +1,24 @@
|
|
|
<template>
|
|
|
<div class="forecast-panel">
|
|
|
+ <div class="top-timeline">
|
|
|
+ <div class="timeline-container">
|
|
|
+ <div class="timeline-controls">
|
|
|
+ <button class="control-btn" @click="togglePlay">
|
|
|
+ {{ isPlaying ? '⏸' : '▶' }}
|
|
|
+ </button>
|
|
|
+ <button class="control-btn" @click="resetTimeline">↺</button>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-progress">
|
|
|
+ <div class="timeline-track">
|
|
|
+ <div class="timeline-fill" :style="{ width: timelineProgress + '%' }"></div>
|
|
|
+ <div class="timeline-marker" :style="{ left: timelineProgress + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-time">
|
|
|
+ <span>{{ currentTimeLabel }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="left-sidebar">
|
|
|
<div class="data-card">
|
|
|
<div class="card-header" @click="toggleDistrictRainfall">
|
|
|
@@ -145,7 +164,7 @@
|
|
|
<div class="sidebar-wrapper">
|
|
|
<div class="time-range-dropdown">
|
|
|
<div class="dropdown-toggle" @click="toggleTimeRangeDropdown">
|
|
|
- <span class="selected-text">{{ selectedTimeRange === '24h' ? '24h' : '72h' }}</span>
|
|
|
+ <span class="selected-text">{{ selectedTimeRange === '24h' ? '24h' : (selectedTimeRange === '48h' ? '48h' : '72h') }}</span>
|
|
|
<span class="dropdown-arrow">{{ timeRangeDropdownOpen ? '▲' : '▼' }}</span>
|
|
|
</div>
|
|
|
<div v-if="timeRangeDropdownOpen" class="dropdown-menu" @click.stop>
|
|
|
@@ -156,6 +175,13 @@
|
|
|
>
|
|
|
24h
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ class="dropdown-item"
|
|
|
+ :class="{ active: selectedTimeRange === '48h' }"
|
|
|
+ @click="selectTimeRange('48h')"
|
|
|
+ >
|
|
|
+ 48h
|
|
|
+ </div>
|
|
|
<div
|
|
|
class="dropdown-item"
|
|
|
:class="{ active: selectedTimeRange === '72h' }"
|
|
|
@@ -193,7 +219,7 @@
|
|
|
<canvas id="capacityPieChart" width="300" height="180"></canvas>
|
|
|
</div>
|
|
|
<div class="forecast-info">
|
|
|
- 预报 {{ selectedTimeRange === '24h' ? '24h' : '72h' }} 后蓄水量 {{ selectedTimeRange === '24h' ? '235' : '242' }} 万 m³,占用库容 {{ selectedTimeRange === '24h' ? '78' : '81' }}%
|
|
|
+ 预报 {{ selectedTimeRange === '24h' ? '24h' : (selectedTimeRange === '48h' ? '48h' : '72h') }} 后蓄水量 {{ selectedTimeRange === '24h' ? '235' : (selectedTimeRange === '48h' ? '238' : '242') }} 万 m³,占用库容 {{ selectedTimeRange === '24h' ? '78' : (selectedTimeRange === '48h' ? '79' : '81') }}%
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -233,6 +259,10 @@ export default {
|
|
|
storageCapacityChart: null,
|
|
|
capacityPieChart: null,
|
|
|
rainfallMapImage: rainfallMapImage,
|
|
|
+ isPlaying: false,
|
|
|
+ playInterval: null,
|
|
|
+ currentTimeIndex: 0,
|
|
|
+ timelineProgress: 0,
|
|
|
stationData: {
|
|
|
heilin: {
|
|
|
data: [2.5, 2.8, 3.5, 4.2, 3.8],
|
|
|
@@ -261,6 +291,17 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ currentTimeLabel() {
|
|
|
+ const hours = this.selectedTimeRange === '24h' ? 24 : (this.selectedTimeRange === '48h' ? 48 : 72)
|
|
|
+ const timePoints = this.getTimePoints()
|
|
|
+ return timePoints[this.currentTimeIndex] || timePoints[0]
|
|
|
+ },
|
|
|
+ totalTimePoints() {
|
|
|
+ const hours = this.selectedTimeRange === '24h' ? 24 : (this.selectedTimeRange === '48h' ? 48 : 72)
|
|
|
+ return Math.floor(hours / 6) + 1
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
const now = new Date()
|
|
|
const month = now.getMonth() + 1
|
|
|
@@ -274,10 +315,56 @@ export default {
|
|
|
document.addEventListener('click', this.handleOutsideClick)
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
+ this.stopPlayback()
|
|
|
this.destroyCharts()
|
|
|
document.removeEventListener('click', this.handleOutsideClick)
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTimePoints() {
|
|
|
+ const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
+ if (is24h) {
|
|
|
+ return ['00:00', '06:00', '12:00', '18:00', '次日00:00']
|
|
|
+ } else if (is48h) {
|
|
|
+ return ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
+ } else {
|
|
|
+ return ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
+ }
|
|
|
+ },
|
|
|
+ togglePlay() {
|
|
|
+ if (this.isPlaying) {
|
|
|
+ this.stopPlayback()
|
|
|
+ } else {
|
|
|
+ this.startPlayback()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ startPlayback() {
|
|
|
+ this.isPlaying = true
|
|
|
+ this.playInterval = setInterval(() => {
|
|
|
+ this.currentTimeIndex++
|
|
|
+ if (this.currentTimeIndex >= this.totalTimePoints) {
|
|
|
+ this.currentTimeIndex = 0
|
|
|
+ }
|
|
|
+ this.timelineProgress = (this.currentTimeIndex / (this.totalTimePoints - 1)) * 100
|
|
|
+ this.updateChartsForTime()
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ stopPlayback() {
|
|
|
+ this.isPlaying = false
|
|
|
+ if (this.playInterval) {
|
|
|
+ clearInterval(this.playInterval)
|
|
|
+ this.playInterval = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resetTimeline() {
|
|
|
+ this.stopPlayback()
|
|
|
+ this.currentTimeIndex = 0
|
|
|
+ this.timelineProgress = 0
|
|
|
+ this.updateChartsForTime()
|
|
|
+ },
|
|
|
+ updateChartsForTime() {
|
|
|
+ this.initCharts()
|
|
|
+ },
|
|
|
toggleHydrologyForecast() {
|
|
|
this.hydrologyForecastExpanded = !this.hydrologyForecastExpanded
|
|
|
if (this.hydrologyForecastExpanded) {
|
|
|
@@ -321,6 +408,7 @@ export default {
|
|
|
selectTimeRange(timeRange) {
|
|
|
this.selectedTimeRange = timeRange
|
|
|
this.timeRangeDropdownOpen = false
|
|
|
+ this.resetTimeline()
|
|
|
setTimeout(() => {
|
|
|
this.initForecastWaterLevelChart()
|
|
|
this.initForecastFlowChart()
|
|
|
@@ -374,26 +462,30 @@ export default {
|
|
|
const currentData = this.stationData[this.selectedStation]
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const xAxisData24h = ['00:00', '06:00', '12:00', '18:00', '次日00:00']
|
|
|
+ const xAxisData48h = ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
const xAxisData72h = ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
|
|
|
const heilinData24h = [2.5, 2.8, 3.5, 4.2, 3.8]
|
|
|
+ const heilinData48h = [2.5, 2.8, 3.5, 4.2, 3.9]
|
|
|
const heilinData72h = [2.5, 2.8, 3.5, 4.2, 3.9, 3.5, 3.2]
|
|
|
|
|
|
const xiaotaishanData24h = [18.2, 18.3, 18.5, 18.8, 18.6]
|
|
|
+ const xiaotaishanData48h = [18.2, 18.3, 18.5, 18.8, 18.7]
|
|
|
const xiaotaishanData72h = [18.2, 18.3, 18.5, 18.8, 18.7, 18.5, 18.4]
|
|
|
|
|
|
let waterLevelData
|
|
|
if (this.selectedStation === 'heilin') {
|
|
|
- waterLevelData = is24h ? heilinData24h : heilinData72h
|
|
|
+ waterLevelData = is24h ? heilinData24h : (is48h ? heilinData48h : heilinData72h)
|
|
|
} else {
|
|
|
- waterLevelData = is24h ? xiaotaishanData24h : xiaotaishanData72h
|
|
|
+ waterLevelData = is24h ? xiaotaishanData24h : (is48h ? xiaotaishanData48h : xiaotaishanData72h)
|
|
|
}
|
|
|
|
|
|
const warningLevelData = is24h
|
|
|
? [currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel]
|
|
|
- : [currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel]
|
|
|
+ : (is48h ? [currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel] : [currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel, currentData.warningLevel])
|
|
|
|
|
|
const option = {
|
|
|
animation: false,
|
|
|
@@ -410,7 +502,7 @@ export default {
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
- data: is24h ? xAxisData24h : xAxisData72h,
|
|
|
+ data: is24h ? xAxisData24h : (is48h ? xAxisData48h : xAxisData72h),
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#7bbef6'
|
|
|
@@ -482,11 +574,14 @@ export default {
|
|
|
this.forecastFlowChart = echarts.init(document.getElementById('forecastFlowChart'))
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const xAxisData24h = ['00:00', '06:00', '12:00', '18:00', '次日00:00']
|
|
|
+ const xAxisData48h = ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
const xAxisData72h = ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
|
|
|
const flowData24h = [45.2, 52.8, 68.5, 62.3, 58.0]
|
|
|
+ const flowData48h = [45.2, 52.8, 68.5, 62.3, 56.5]
|
|
|
const flowData72h = [45.2, 52.8, 68.5, 62.3, 55.7, 48.2, 42.5]
|
|
|
|
|
|
const option = {
|
|
|
@@ -504,7 +599,7 @@ export default {
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
- data: is24h ? xAxisData24h : xAxisData72h,
|
|
|
+ data: is24h ? xAxisData24h : (is48h ? xAxisData48h : xAxisData72h),
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#7bbef6'
|
|
|
@@ -540,7 +635,7 @@ export default {
|
|
|
{
|
|
|
name: '预报流量',
|
|
|
type: 'line',
|
|
|
- data: is24h ? flowData24h : flowData72h,
|
|
|
+ data: is24h ? flowData24h : (is48h ? flowData48h : flowData72h),
|
|
|
lineStyle: {
|
|
|
color: '#00d4ff',
|
|
|
width: 2
|
|
|
@@ -565,20 +660,26 @@ export default {
|
|
|
this.inflowForecastChart = echarts.init(document.getElementById('inflowForecastChart'))
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const xAxisData24h = ['00:00', '06:00', '12:00', '18:00']
|
|
|
+ const xAxisData48h = ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
const xAxisData72h = ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
|
|
|
const totalInflowData24h = [45.2, 52.8, 68.5, 62.3]
|
|
|
+ const totalInflowData48h = [45.2, 52.8, 68.5, 62.3, 58.4]
|
|
|
const totalInflowData72h = [45.2, 52.8, 68.5, 62.3, 58.4, 52.1, 46.8]
|
|
|
|
|
|
const rainfallRunoff24h = [25, 30, 40, 36]
|
|
|
+ const rainfallRunoff48h = [25, 30, 40, 36, 34]
|
|
|
const rainfallRunoff72h = [25, 30, 40, 36, 34, 30, 27]
|
|
|
|
|
|
const undergroundRunoff24h = [12, 14, 16, 14]
|
|
|
+ const undergroundRunoff48h = [12, 14, 16, 14, 15]
|
|
|
const undergroundRunoff72h = [12, 14, 16, 14, 15, 14, 13]
|
|
|
|
|
|
const intervalRunoff24h = [8.2, 8.8, 12.5, 12.3]
|
|
|
+ const intervalRunoff48h = [8.2, 8.8, 12.5, 12.3, 9.4]
|
|
|
const intervalRunoff72h = [8.2, 8.8, 12.5, 12.3, 9.4, 8.1, 6.8]
|
|
|
|
|
|
const option = {
|
|
|
@@ -616,7 +717,7 @@ export default {
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: true,
|
|
|
- data: is24h ? xAxisData24h : xAxisData72h,
|
|
|
+ data: is24h ? xAxisData24h : (is48h ? xAxisData48h : xAxisData72h),
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#7bbef6'
|
|
|
@@ -650,7 +751,7 @@ export default {
|
|
|
{
|
|
|
name: '总入库',
|
|
|
type: 'line',
|
|
|
- data: is24h ? totalInflowData24h : totalInflowData72h,
|
|
|
+ data: is24h ? totalInflowData24h : (is48h ? totalInflowData48h : totalInflowData72h),
|
|
|
lineStyle: {
|
|
|
color: '#62f6fb',
|
|
|
width: 2
|
|
|
@@ -667,7 +768,7 @@ export default {
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? rainfallRunoff24h : rainfallRunoff72h,
|
|
|
+ data: is24h ? rainfallRunoff24h : (is48h ? rainfallRunoff48h : rainfallRunoff72h),
|
|
|
itemStyle: {
|
|
|
color: '#62f6fb'
|
|
|
}
|
|
|
@@ -677,7 +778,7 @@ export default {
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? undergroundRunoff24h : undergroundRunoff72h,
|
|
|
+ data: is24h ? undergroundRunoff24h : (is48h ? undergroundRunoff48h : undergroundRunoff72h),
|
|
|
itemStyle: {
|
|
|
color: '#38bdf8'
|
|
|
}
|
|
|
@@ -687,7 +788,7 @@ export default {
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? intervalRunoff24h : intervalRunoff72h,
|
|
|
+ data: is24h ? intervalRunoff24h : (is48h ? intervalRunoff48h : intervalRunoff72h),
|
|
|
itemStyle: {
|
|
|
color: '#3b82f6'
|
|
|
}
|
|
|
@@ -705,23 +806,26 @@ export default {
|
|
|
this.outflowCombinedChart = echarts.init(document.getElementById('outflowCombinedChart'))
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const xAxisData24h = ['00:00', '06:00', '12:00', '18:00']
|
|
|
+ const xAxisData48h = ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
const xAxisData72h = ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
|
|
|
const totalOutflowData24h = [38.5, 45.2, 55.8, 50.3]
|
|
|
+ const totalOutflowData48h = [38.5, 45.2, 55.8, 50.3, 46.2]
|
|
|
const totalOutflowData72h = [38.5, 45.2, 55.8, 50.3, 46.2, 42.1, 38.5]
|
|
|
|
|
|
- const powerGen24h = [12, 15, 18, 16]
|
|
|
- const powerGen72h = [12, 15, 18, 16, 15, 14, 12]
|
|
|
-
|
|
|
- const irrigation24h = [18, 20, 22, 20]
|
|
|
- const irrigation72h = [18, 20, 22, 20, 19, 18, 18]
|
|
|
+ const domesticWater24h = [8, 10, 12, 11]
|
|
|
+ const domesticWater48h = [8, 10, 12, 11, 10]
|
|
|
+ const domesticWater72h = [8, 10, 12, 11, 10, 9, 8]
|
|
|
|
|
|
- const ecology24h = [5, 6, 7, 6]
|
|
|
- const ecology72h = [5, 6, 7, 6, 6, 6, 5]
|
|
|
+ const agriculturalIrrigation24h = [15, 18, 20, 18]
|
|
|
+ const agriculturalIrrigation48h = [15, 18, 20, 18, 17]
|
|
|
+ const agriculturalIrrigation72h = [15, 18, 20, 18, 17, 16, 15]
|
|
|
|
|
|
const floodDischarge24h = [3.5, 4.2, 8.8, 8.3]
|
|
|
+ const floodDischarge48h = [3.5, 4.2, 8.8, 8.3, 6.2]
|
|
|
const floodDischarge72h = [3.5, 4.2, 8.8, 8.3, 6.2, 4.1, 3.5]
|
|
|
|
|
|
const option = {
|
|
|
@@ -742,7 +846,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
legend: {
|
|
|
- data: ['总出库', '发电', '灌溉', '生态', '泄洪'],
|
|
|
+ data: ['总出库', '生活供水', '农业灌溉', '泄洪'],
|
|
|
textStyle: {
|
|
|
color: '#7bbef6',
|
|
|
fontSize: 9
|
|
|
@@ -759,7 +863,7 @@ export default {
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: true,
|
|
|
- data: is24h ? xAxisData24h : xAxisData72h,
|
|
|
+ data: is24h ? xAxisData24h : (is48h ? xAxisData48h : xAxisData72h),
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#7bbef6'
|
|
|
@@ -793,7 +897,7 @@ export default {
|
|
|
{
|
|
|
name: '总出库',
|
|
|
type: 'line',
|
|
|
- data: is24h ? totalOutflowData24h : totalOutflowData72h,
|
|
|
+ data: is24h ? totalOutflowData24h : (is48h ? totalOutflowData48h : totalOutflowData72h),
|
|
|
lineStyle: {
|
|
|
color: '#00d4ff',
|
|
|
width: 2
|
|
|
@@ -806,41 +910,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- name: '发电',
|
|
|
+ name: '生活供水',
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? powerGen24h : powerGen72h,
|
|
|
+ data: is24h ? domesticWater24h : (is48h ? domesticWater48h : domesticWater72h),
|
|
|
itemStyle: {
|
|
|
color: '#62f6fb'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- name: '灌溉',
|
|
|
+ name: '农业灌溉',
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? irrigation24h : irrigation72h,
|
|
|
+ data: is24h ? agriculturalIrrigation24h : (is48h ? agriculturalIrrigation48h : agriculturalIrrigation72h),
|
|
|
itemStyle: {
|
|
|
color: '#38bdf8'
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- name: '生态',
|
|
|
- type: 'bar',
|
|
|
- stack: 'total',
|
|
|
- barWidth: '35%',
|
|
|
- data: is24h ? ecology24h : ecology72h,
|
|
|
- itemStyle: {
|
|
|
- color: '#3b82f6'
|
|
|
- }
|
|
|
- },
|
|
|
{
|
|
|
name: '泄洪',
|
|
|
type: 'bar',
|
|
|
stack: 'total',
|
|
|
barWidth: '35%',
|
|
|
- data: is24h ? floodDischarge24h : floodDischarge72h,
|
|
|
+ data: is24h ? floodDischarge24h : (is48h ? floodDischarge48h : floodDischarge72h),
|
|
|
itemStyle: {
|
|
|
color: '#f97316'
|
|
|
}
|
|
|
@@ -858,14 +952,18 @@ export default {
|
|
|
this.storageCapacityChart = echarts.init(document.getElementById('storageCapacityChart'))
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const xAxisData24h = ['00:00', '06:00', '12:00', '18:00', '次日00:00']
|
|
|
+ const xAxisData48h = ['00:00', '12:00', '24:00', '36:00', '48:00']
|
|
|
const xAxisData72h = ['00:00', '12:00', '24:00', '36:00', '48:00', '60:00', '72:00']
|
|
|
|
|
|
const waterLevelData24h = [18.2, 18.3, 18.5, 18.8, 18.6]
|
|
|
+ const waterLevelData48h = [18.2, 18.3, 18.5, 18.8, 18.7]
|
|
|
const waterLevelData72h = [18.2, 18.3, 18.5, 18.8, 18.7, 18.5, 18.4]
|
|
|
|
|
|
const storageData24h = [220, 225, 230, 235, 232]
|
|
|
+ const storageData48h = [220, 225, 230, 235, 238]
|
|
|
const storageData72h = [220, 225, 230, 235, 242, 240, 238]
|
|
|
|
|
|
const option = {
|
|
|
@@ -911,7 +1009,7 @@ export default {
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
- data: is24h ? xAxisData24h : xAxisData72h,
|
|
|
+ data: is24h ? xAxisData24h : (is48h ? xAxisData48h : xAxisData72h),
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#7bbef6'
|
|
|
@@ -966,7 +1064,7 @@ export default {
|
|
|
name: '水位',
|
|
|
type: 'line',
|
|
|
yAxisIndex: 0,
|
|
|
- data: is24h ? waterLevelData24h : waterLevelData72h,
|
|
|
+ data: is24h ? waterLevelData24h : (is48h ? waterLevelData48h : waterLevelData72h),
|
|
|
lineStyle: {
|
|
|
color: '#ffd93d',
|
|
|
width: 2
|
|
|
@@ -979,7 +1077,7 @@ export default {
|
|
|
name: '蓄水量',
|
|
|
type: 'line',
|
|
|
yAxisIndex: 1,
|
|
|
- data: is24h ? storageData24h : storageData72h,
|
|
|
+ data: is24h ? storageData24h : (is48h ? storageData48h : storageData72h),
|
|
|
lineStyle: {
|
|
|
color: '#62f6fb',
|
|
|
width: 2
|
|
|
@@ -1001,8 +1099,10 @@ export default {
|
|
|
this.capacityPieChart = echarts.init(document.getElementById('capacityPieChart'))
|
|
|
|
|
|
const is24h = this.selectedTimeRange === '24h'
|
|
|
+ const is48h = this.selectedTimeRange === '48h'
|
|
|
|
|
|
const forecastStorage24h = 235
|
|
|
+ const forecastStorage48h = 238
|
|
|
const forecastStorage72h = 242
|
|
|
|
|
|
const option = {
|
|
|
@@ -1012,6 +1112,7 @@ export default {
|
|
|
formatter: '{b}: {c}万m³ ({d}%)'
|
|
|
},
|
|
|
legend: {
|
|
|
+ data: ['已蓄水量', '剩余库容'],
|
|
|
orient: 'vertical',
|
|
|
right: 5,
|
|
|
top: 'center',
|
|
|
@@ -1053,31 +1154,17 @@ export default {
|
|
|
},
|
|
|
data: [
|
|
|
{
|
|
|
- value: 50,
|
|
|
- name: '死库容',
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(123, 190, 246, 0.3)'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- value: is24h ? forecastStorage24h : forecastStorage72h,
|
|
|
- name: '已预报蓄水量',
|
|
|
+ value: is24h ? forecastStorage24h : (is48h ? forecastStorage48h : forecastStorage72h),
|
|
|
+ name: '已蓄水量',
|
|
|
itemStyle: {
|
|
|
color: '#62f6fb'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- value: is24h ? 80 : 73,
|
|
|
- name: '兴利库容剩余',
|
|
|
- itemStyle: {
|
|
|
- color: '#38bdf8'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- value: is24h ? 35 : 30,
|
|
|
- name: '防洪库容剩余',
|
|
|
+ value: is24h ? 165 : (is48h ? 162 : 158),
|
|
|
+ name: '剩余库容',
|
|
|
itemStyle: {
|
|
|
- color: '#f97316'
|
|
|
+ color: 'rgba(123, 190, 246, 0.3)'
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
@@ -1097,6 +1184,93 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
+.top-timeline {
|
|
|
+ position: absolute;
|
|
|
+ top: 120px;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ width: 50%;
|
|
|
+ z-index: 10;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-container {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10px;
|
|
|
+ padding: 6px 15px;
|
|
|
+ background: rgba(0, 20, 40, 0.8);
|
|
|
+ border: 1px solid rgba(0, 212, 255, 0.3);
|
|
|
+ border-radius: 6px;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-controls {
|
|
|
+ display: flex;
|
|
|
+ gap: 6px;
|
|
|
+}
|
|
|
+
|
|
|
+.control-btn {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ background: rgba(0, 212, 255, 0.2);
|
|
|
+ border: 1px solid rgba(0, 212, 255, 0.5);
|
|
|
+ border-radius: 4px;
|
|
|
+ color: #62f6fb;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.control-btn:hover {
|
|
|
+ background: rgba(0, 212, 255, 0.3);
|
|
|
+ border-color: #62f6fb;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-progress {
|
|
|
+ flex: 1;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-track {
|
|
|
+ width: 100%;
|
|
|
+ height: 6px;
|
|
|
+ background: rgba(0, 50, 80, 0.5);
|
|
|
+ border-radius: 3px;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-fill {
|
|
|
+ height: 100%;
|
|
|
+ background: linear-gradient(90deg, #3b82f6, #62f6fb);
|
|
|
+ border-radius: 3px;
|
|
|
+ transition: width 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-marker {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ width: 12px;
|
|
|
+ height: 12px;
|
|
|
+ background: #62f6fb;
|
|
|
+ border-radius: 50%;
|
|
|
+ box-shadow: 0 0 8px rgba(98, 246, 251, 0.5);
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-time {
|
|
|
+ min-width: 80px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-time span {
|
|
|
+ color: #62f6fb;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bold;
|
|
|
+ font-family: monospace;
|
|
|
+}
|
|
|
+
|
|
|
.left-sidebar {
|
|
|
position: absolute;
|
|
|
left: 20px;
|
|
|
@@ -1598,7 +1772,7 @@ export default {
|
|
|
|
|
|
.time-range-dropdown {
|
|
|
position: absolute;
|
|
|
- top: 0;
|
|
|
+ top: 50px;
|
|
|
left: -70px;
|
|
|
z-index: 10;
|
|
|
}
|