| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>供水运营专题大屏</title>
- <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
- <script src="https://unpkg.com/echarts@5.5.0/dist/echarts.min.js"></script>
- <script src="https://unpkg.com/echarts-liquidfill@3.0.0/dist/echarts-liquidfill.min.js"></script>
- <link rel="stylesheet" href="https://unpkg.com/element-plus@2.8.0/dist/index.css">
- <script src="https://unpkg.com/element-plus@2.8.0/dist/index.full.js"></script>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
-
- body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- overflow: hidden;
- }
-
- .operation-dashboard {
- padding: 20px;
- background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
- color: #fff;
- min-height: 100vh;
- }
-
- .dashboard-header {
- text-align: center;
- margin-bottom: 30px;
- }
-
- .dashboard-header h1 {
- font-size: 36px;
- margin-bottom: 10px;
- text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
- }
-
- .header-info {
- font-size: 16px;
- opacity: 0.9;
- }
-
- .status-normal {
- color: #67c23a;
- font-weight: bold;
- }
-
- .core-metrics {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- gap: 20px;
- margin-bottom: 30px;
- }
-
- .metric-card {
- background: rgba(255,255,255,0.1);
- border-radius: 12px;
- padding: 20px;
- backdrop-filter: blur(10px);
- border: 1px solid rgba(255,255,255,0.2);
- display: flex;
- align-items: center;
- transition: all 0.3s;
- }
-
- .metric-card:hover {
- transform: translateY(-2px);
- background: rgba(255,255,255,0.15);
- }
-
- .metric-icon {
- width: 50px;
- height: 50px;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 15px;
- color: white;
- font-size: 24px;
- }
-
- .metric-content {
- flex: 1;
- }
-
- .metric-value {
- font-size: 24px;
- font-weight: bold;
- margin-bottom: 5px;
- }
-
- .metric-unit {
- font-size: 14px;
- opacity: 0.8;
- margin-left: 4px;
- }
-
- .metric-title {
- font-size: 14px;
- opacity: 0.9;
- margin-bottom: 5px;
- }
-
- .metric-trend {
- font-size: 12px;
- display: flex;
- align-items: center;
- gap: 4px;
- }
-
- .trend-up {
- color: #67c23a;
- }
-
- .trend-down {
- color: #f56c6c;
- }
-
- .charts-grid {
- display: grid;
- grid-template-columns: 1fr 1.5fr 1fr;
- gap: 20px;
- margin-bottom: 30px;
- }
-
- .chart-panel {
- background: rgba(255,255,255,0.1);
- border-radius: 12px;
- padding: 20px;
- backdrop-filter: blur(10px);
- border: 1px solid rgba(255,255,255,0.2);
- display: flex;
- flex-direction: column;
- }
-
- .chart-panel.large-panel {
- grid-row: span 2;
- }
-
- .panel-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
-
- .panel-header h3 {
- font-size: 18px;
- font-weight: 600;
- margin: 0;
- }
-
- .chart-container {
- flex: 1;
- min-height: 200px;
- }
-
- .map-container {
- flex: 1;
- min-height: 300px;
- background: rgba(0,0,0,0.2);
- border-radius: 8px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(255,255,255,0.7);
- }
-
- .alarm-list {
- flex: 1;
- overflow-y: auto;
- }
-
- .alarm-item {
- background: rgba(255,255,255,0.1);
- border-radius: 8px;
- padding: 12px;
- margin-bottom: 10px;
- border-left: 4px solid;
- }
-
- .alarm-item.warning {
- border-left-color: #e6a23c;
- background: rgba(230, 162, 60, 0.1);
- }
-
- .alarm-item.danger {
- border-left-color: #f56c6c;
- background: rgba(245, 108, 108, 0.1);
- }
-
- .alarm-item.info {
- border-left-color: #909399;
- background: rgba(144, 147, 153, 0.1);
- }
-
- .alarm-time {
- font-size: 12px;
- opacity: 0.8;
- margin-bottom: 4px;
- }
-
- .alarm-title {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 4px;
- }
-
- .alarm-location {
- font-size: 12px;
- opacity: 0.8;
- margin-bottom: 2px;
- }
-
- .alarm-status {
- font-size: 12px;
- opacity: 0.7;
- }
-
- .bottom-stats {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 20px;
- }
-
- .stat-item {
- background: rgba(255,255,255,0.1);
- border-radius: 12px;
- padding: 20px;
- text-align: center;
- backdrop-filter: blur(10px);
- border: 1px solid rgba(255,255,255,0.2);
- }
-
- .stat-label {
- font-size: 14px;
- opacity: 0.9;
- margin-bottom: 8px;
- }
-
- .stat-value {
- font-size: 28px;
- font-weight: bold;
- margin-bottom: 8px;
- }
-
- .time-selector {
- display: flex;
- gap: 10px;
- }
-
- .time-selector .el-radio {
- margin-right: 0;
- }
-
- .time-selector .el-radio__label {
- padding: 0 8px;
- }
-
- /* 响应式设计 */
- @media (max-width: 1400px) {
- .core-metrics {
- grid-template-columns: repeat(3, 1fr);
- }
-
- .charts-grid {
- grid-template-columns: 1fr;
- }
-
- .bottom-stats {
- grid-template-columns: repeat(2, 1fr);
- }
- }
-
- @media (max-width: 768px) {
- .core-metrics {
- grid-template-columns: 1fr;
- }
-
- .bottom-stats {
- grid-template-columns: 1fr;
- }
-
- .metric-card, .chart-panel, .stat-item {
- padding: 15px;
- }
- }
-
- .map-placeholder {
- text-align: center;
- }
-
- .map-placeholder .el-icon {
- font-size: 48px;
- margin-bottom: 10px;
- }
- </style>
- </head>
- <body>
- <div id="app">
- <div class="operation-dashboard">
- <div class="dashboard-header">
- <h1>供水运营专题大屏</h1>
- <div class="header-info">
- <span>{{ currentTime }}</span>
- <span>•</span>
- <span>在线设备: {{ onlineDevices }}/{{ totalDevices }}</span>
- <span>•</span>
- <span>系统状态: <span class="status-normal">正常运行</span></span>
- </div>
- </div>
-
- <!-- 核心指标行 -->
- <div class="core-metrics">
- <div class="metric-card" v-for="metric in coreMetrics" :key="metric.name">
- <div class="metric-icon" :style="{ backgroundColor: metric.color }">
- <el-icon><component :is="metric.icon" /></el-icon>
- </div>
- <div class="metric-content">
- <div class="metric-value">{{ metric.value }} <span class="metric-unit">{{ metric.unit }}</span></div>
- <div class="metric-title">{{ metric.title }}</div>
- <div class="metric-trend" :class="metric.trend">
- <el-icon><trend-arrow /></el-icon>
- {{ metric.change }}
- </div>
- </div>
- </div>
- </div>
-
- <!-- 主要图表区域 -->
- <div class="charts-grid">
- <!-- 左侧图表区域 -->
- <div class="left-charts">
- <!-- 供水趋势图 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>供水趋势分析</h3>
- <div class="time-selector">
- <el-radio-group v-model="timeRange" size="small">
- <el-radio-button label="day">今日</el-radio-button>
- <el-radio-button label="week">本周</el-radio-button>
- <el-radio-button label="month">本月</el-radio-button>
- </el-radio-group>
- </div>
- </div>
- <div class="chart-container" ref="supplyTrendChart" style="width: 100%; height: 300px;"></div>
- </div>
-
- <!-- 水质分布 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>水质监测分布</h3>
- </div>
- <div class="chart-container" ref="waterQualityChart" style="width: 100%; height: 300px;"></div>
- </div>
-
- <!-- 报警统计 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>报警统计</h3>
- </div>
- <div class="chart-container" ref="alarmChart" style="width: 100%; height: 300px;"></div>
- </div>
- </div>
-
- <!-- 中间图表区域 -->
- <div class="center-charts">
- <!-- 空间分布 -->
- <div class="chart-panel large-panel">
- <div class="panel-header">
- <h3>管网空间分布</h3>
- </div>
- <div class="map-container" ref="spatialMap">
- <div class="map-placeholder">
- <el-icon><map-location /></el-icon>
- <p>GIS地图集成区域</p>
- </div>
- </div>
- </div>
-
- <!-- 设备状态 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>设备运行状态</h3>
- </div>
- <div class="chart-container" ref="deviceStatusChart" style="width: 100%; height: 300px;"></div>
- </div>
- </div>
-
- <!-- 右侧图表区域 -->
- <div class="right-charts">
- <!-- 营收分析 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>营收指标分析</h3>
- </div>
- <div class="chart-container" ref="revenueChart" style="width: 100%; height: 300px;"></div>
- </div>
-
- <!-- 实时报警 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>实时报警监控</h3>
- </div>
- <div class="alarm-list">
- <div v-for="alarm in realTimeAlarms" :key="alarm.id" class="alarm-item" :class="alarm.level">
- <div class="alarm-time">{{ alarm.time }}</div>
- <div class="alarm-title">{{ alarm.title }}</div>
- <div class="alarm-location">{{ alarm.location }}</div>
- <div class="alarm-status">{{ alarm.status }}</div>
- </div>
- </div>
- </div>
-
- <!-- 能耗分析 -->
- <div class="chart-panel">
- <div class="panel-header">
- <h3>能耗分析</h3>
- </div>
- <div class="chart-container" ref="energyChart" style="width: 100%; height: 300px;"></div>
- </div>
- </div>
- </div>
-
- <!-- 底部统计 -->
- <div class="bottom-stats">
- <div class="stat-item" v-for="stat in bottomStats" :key="stat.name">
- <div class="stat-label">{{ stat.label }}</div>
- <div class="stat-value">{{ stat.value }}</div>
- <div class="stat-trend" :class="stat.trend">
- <el-icon><trend-arrow /></el-icon>
- {{ stat.change }}
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <script>
- const { createApp } = Vue;
-
- createApp({
- data() {
- return {
- currentTime: '',
- onlineDevices: 156,
- totalDevices: 178,
- coreMetrics: [
- {
- title: '进水总量',
- value: '12,580',
- unit: 'm³',
- icon: 'WaterFilled',
- color: '#409eff',
- change: '+5.2%',
- trend: 'trend-up'
- },
- {
- title: '出水总量',
- value: '11,230',
- unit: 'm³',
- icon: 'WaterFilled',
- color: '#67c23a',
- change: '+3.8%',
- trend: 'trend-up'
- },
- {
- title: '产销差率',
- value: '10.8',
- unit: '%',
- icon: 'TrendCharts',
- color: '#e6a23c',
- change: '-2.1%',
- trend: 'trend-down'
- },
- {
- title: '营收额',
- value: '85.2',
- unit: '万元',
- icon: 'Money',
- color: '#67c23a',
- change: '+12.5%',
- trend: 'trend-up'
- },
- {
- title: '平均水质',
- value: '98.5',
- unit: '分',
- icon: 'DataLine',
- color: '#409eff',
- change: '+1.2',
- trend: 'trend-up'
- },
- {
- title: '报警次数',
- value: '3',
- unit: '次',
- icon: 'WarningFilled',
- color: '#f56c6c',
- change: '-15.8%',
- trend: 'trend-down'
- }
- ],
- timeRange: 'day',
- realTimeAlarms: [
- {
- id: 1,
- time: '08:23:45',
- title: '压力异常波动',
- location: '精芒片区',
- level: 'warning',
- status: '处理中'
- },
- {
- id: 2,
- time: '08:15:32',
- title: '浊度超标',
- location: '一体化水厂',
- level: 'danger',
- status: '紧急处理'
- },
- {
- id: 3,
- time: '07:58:21',
- title: '设备离线',
- location: '托里片区',
- level: 'info',
- status: '已恢复'
- },
- {
- id: 4,
- time: '07:45:18',
- title: '流量异常',
- location: '八家户片区',
- level: 'warning',
- status: '监控中'
- }
- ],
- bottomStats: [
- {
- label: '覆盖率',
- value: '98.2%',
- change: '+0.5%',
- trend: 'trend-up'
- },
- {
- label: '漏损率',
- value: '5.8%',
- change: '-1.2%',
- trend: 'trend-down'
- },
- {
- label: '投诉率',
- value: '0.3%',
- change: '-0.1%',
- trend: 'trend-down'
- },
- {
- label: '设备完好率',
- value: '95.6%',
- change: '+1.8%',
- trend: 'trend-up'
- }
- ],
- charts: {}
- }
- },
- methods: {
- updateTime() {
- const now = new Date();
- this.currentTime = now.toLocaleString('zh-CN', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- hour: '2-digit',
- minute: '2-digit',
- second: '2-digit'
- });
- },
- initCharts() {
- // 供水趋势图
- const trendChart = echarts.init(document.getElementById('supplyTrendChart'));
- trendChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'axis',
- backgroundColor: 'rgba(255,255,255,0.9)',
- borderColor: '#ddd',
- textStyle: { color: '#333' }
- },
- grid: {
- top: '60px',
- right: '20px',
- bottom: '40px',
- left: '60px',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00'],
- axisLine: { lineStyle: { color: '#ddd' } },
- axisLabel: { color: '#666' }
- },
- yAxis: {
- type: 'value',
- name: '流量(m³/h)',
- nameTextStyle: { color: '#666' },
- axisLine: { show: false },
- splitLine: { lineStyle: { type: 'dashed', color: '#eee' } }
- },
- series: [{
- name: '进水',
- type: 'line',
- smooth: true,
- data: [320, 280, 450, 520, 480, 380],
- itemStyle: { color: '#409eff' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(64, 158, 255, 0.3)' },
- { offset: 1, color: 'rgba(64, 158, 255, 0.05)' }
- ])
- }
- }, {
- name: '出水',
- type: 'line',
- smooth: true,
- data: [300, 260, 420, 480, 450, 350],
- itemStyle: { color: '#67c23a' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(103, 194, 58, 0.3)' },
- { offset: 1, color: 'rgba(103, 194, 58, 0.05)' }
- ])
- }
- }]
- });
-
- // 水质监测分布
- const qualityChart = echarts.init(document.getElementById('waterQualityChart'));
- qualityChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- backgroundColor: 'rgba(255,255,255,0.9)',
- borderColor: '#ddd',
- textStyle: { color: '#333' }
- },
- radar: {
- indicator: [
- { name: '浊度', max: 5 },
- { name: 'pH值', max: 14 },
- { name: '余氯', max: 1 },
- { name: '菌落', max: 100 },
- { name: '色度', max: 15 },
- { name: '嗅味', max: 3 }
- ],
- radius: '60%',
- splitNumber: 4,
- axisLine: { lineStyle: { color: '#ddd' } },
- splitLine: { lineStyle: { color: '#eee' } },
- name: { textStyle: { color: '#666' } }
- },
- series: [{
- type: 'radar',
- data: [{
- value: [1.2, 7.2, 0.3, 25, 3, 1],
- name: '当前水质',
- areaStyle: { color: 'rgba(64, 158, 255, 0.3)' },
- lineStyle: { color: '#409eff', width: 2 }
- }]
- }]
- });
-
- // 报警统计
- const alarmChart = echarts.init(document.getElementById('alarmChart'));
- alarmChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'axis',
- axisPointer: { type: 'shadow' }
- },
- grid: {
- top: '60px',
- right: '20px',
- bottom: '40px',
- left: '60px',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: ['压力报警', '水质报警', '设备报警', '漏损报警', '通讯报警'],
- axisLabel: { color: '#666' }
- },
- yAxis: {
- type: 'value',
- axisLabel: { color: '#666' },
- splitLine: { lineStyle: { type: 'dashed', color: '#eee' } }
- },
- series: [{
- type: 'bar',
- data: [12, 8, 15, 5, 3],
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#f56c6c' },
- { offset: 1, color: '#e6a23c' }
- ])
- }
- }]
- });
-
- // 设备状态
- const deviceChart = echarts.init(document.getElementById('deviceStatusChart'));
- deviceChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- formatter: '{a}<br/>{b}: {c} ({d}%)'
- },
- series: [{
- name: '设备状态',
- type: 'pie',
- radius: ['50%', '70%'],
- center: ['50%', '50%'],
- data: [
- { value: 142, name: '正常运行', itemStyle: { color: '#67c23a' } },
- { value: 10, name: '维护中', itemStyle: { color: '#e6a23c' } },
- { value: 4, name: '故障', itemStyle: { color: '#f56c6c' } },
- { value: 22, name: '离线', itemStyle: { color: '#909399' } }
- ],
- label: {
- show: true,
- formatter: '{b}\n{c}',
- color: '#666'
- }
- }]
- });
-
- // 营收分析
- const revenueChart = echarts.init(document.getElementById('revenueChart'));
- revenueChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'axis'
- },
- grid: {
- top: '60px',
- right: '20px',
- bottom: '40px',
- left: '60px',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月'],
- axisLabel: { color: '#666' }
- },
- yAxis: {
- type: 'value',
- name: '营收(万元)',
- axisLabel: { color: '#666' },
- splitLine: { lineStyle: { type: 'dashed', color: '#eee' } }
- },
- series: [{
- name: '营收',
- type: 'line',
- smooth: true,
- data: [850, 920, 980, 1050, 1120, 1200],
- itemStyle: { color: '#67c23a' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(103, 194, 58, 0.3)' },
- { offset: 1, color: 'rgba(103, 194, 58, 0.05)' }
- ])
- }
- }]
- });
-
- // 能耗分析
- const energyChart = echarts.init(document.getElementById('energyChart'));
- energyChart.setOption({
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'axis'
- },
- grid: {
- top: '60px',
- right: '20px',
- bottom: '40px',
- left: '60px',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00'],
- axisLabel: { color: '#666' }
- },
- yAxis: {
- type: 'value',
- name: '能耗(kWh)',
- axisLabel: { color: '#666' },
- splitLine: { lineStyle: { type: 'dashed', color: '#eee' } }
- },
- series: [{
- name: '能耗',
- type: 'line',
- smooth: true,
- data: [120, 80, 200, 180, 160, 100],
- itemStyle: { color: '#e6a23c' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(230, 162, 60, 0.3)' },
- { offset: 1, color: 'rgba(230, 162, 60, 0.05)' }
- ])
- }
- }]
- });
-
- this.charts = {
- trend: trendChart,
- quality: qualityChart,
- alarm: alarmChart,
- device: deviceChart,
- revenue: revenueChart,
- energy: energyChart
- };
- }
- },
- mounted() {
- this.updateTime();
- setInterval(this.updateTime, 1000);
-
- this.$nextTick(() => {
- this.initCharts();
- window.addEventListener('resize', () => {
- Object.values(this.charts).forEach(chart => {
- chart && chart.resize();
- });
- });
- });
- }
- }).use(ElementPlus).mount('#app');
- </script>
- </body>
- </html>
|