<template> <!-- 典型项目分析 --> <div class="projectFXPage"> <!-- 分析结果建议 --> <div class="suggest"> <div class="center">{{ rainDate }} 降雨起止时间1:15-3:45,24小时累计降雨量20.4mm,降雨等级 <span class="green">中雨</span></div> <div class="cont"> <span class="numBg">1</span> 项目设计最大控制容积 <span class="green">3796.52m³</span> </div> <div class="cont"> <span class="numBg">2</span> 项目设计标准达标情况(降雨量≤54.62mm时,径流总量控制率≥90%):本场降雨径流总量控制率 <span class="green">92%</span>, <span class="green">达标</span> </div> <div class="cont"> <span class="numBg">3</span> 雨水管网产流开始时间1:45,结束时间4:45,累计流量 <span class="green">843.5m³</span>, 最大水深<span class="green"> 0.5m</span> </div> </div> <!-- 降雨效果 --> <CanvasRainP :width="1600" :height="800"></CanvasRainP> <!-- 水深 --> <img src="@/assets/newImgs/pumpGY/water.png" alt="左" class="waterFlow" :style="{ height: (120 * (nameToData(station1.propertyMonitorList, '水位')[0] || 0.2)) / 1.1 + 'px', left: '73px', width: '846px' }" /> <img src="@/assets/newImgs/pumpGY/water.png" alt="右" class="waterFlow" :style="{ height: (120 * (nameToData(station5.propertyMonitorList, '水位')[0] || 0.2)) / 1.8 + 'px', right: '75px', width: '555px' }" /> <!-- 实时数据 --> <div class="realData"> <p style="left: 290px; bottom: 175px">实时水深:{{ nameToData(station1.propertyMonitorList, '水位')[0] || '--' }}米</p> <p style="right: 260px; bottom: 175px">实时水深:{{ nameToData(station5.propertyMonitorList, '水位')[0] || '--' }}米</p> </div> <!-- 监测数据 --> <div style="left: 170px; bottom: 335px" class="tipsM"> <span>水深:{{ nameToData(station1.propertyMonitorList, '水位')[0] || '--' }} m</span> <span>流速:{{ nameToData(station1.propertyMonitorList, '流速')[0] || '--' }} m/s</span> <span>SS:{{ nameToData(station1.propertyMonitorList, 'SS')[0] || '--' }} mg/L</span> <span>管径:2.4*1.1m</span> </div> <div style="left: 600px; bottom: 335px" class="tipsM"> <span>水深:{{ nameToData(station2.propertyMonitorList, '水位')[0] || '--' }} m</span> <span>流速:{{ nameToData(station2.propertyMonitorList, '流速')[0] || '--' }} m/s</span> <span>SS:{{ nameToData(station2.propertyMonitorList, 'SS')[0] || '--' }} mg/L</span> <span>管径:2.4*1.1m</span> </div> <div style="left: 800px; bottom: 335px" class="tipsM"> <span>水深:{{ nameToData(station3.propertyMonitorList, '水位')[0] || '--' }} m</span> <span>流速:{{ nameToData(station3.propertyMonitorList, '流速')[0] || '--' }} m/s</span> <span>SS:{{ nameToData(station3.propertyMonitorList, 'SS')[0] || '--' }} mg/L</span> <span>管径:DN500</span> </div> <div style="left: 960px; bottom: 335px" class="tipsM"> <span>水深:{{ '--' }} m</span> <span>流速:{{ '--' }} m/s</span> <span>SS:{{ '--' }} mg/L</span> <span>管径:3*1.8m</span> </div> <div style="right: 140px; bottom: 335px" class="tipsM"> <span>水深:{{ nameToData(station5.propertyMonitorList, '水位')[0] || '--' }} m</span> <span>流速:{{ nameToData(station5.propertyMonitorList, '流速')[0] || '--' }} m/s</span> <span>SS:{{ nameToData(station5.propertyMonitorList, 'SS')[0] || '--' }} mg/L</span> <span>管径:3*1.8m</span> </div> <!-- 海绵设施 --> <img src="@/assets/newImgs/pumpGY/hmSS.png" alt="海绵设施" style="left: 530px; bottom: 385px; width: 63px; height: 63px; cursor: pointer" @click="checkHmSS" class="equipM" /> <!-- 监测设备 --> <img src="@/assets/newImgs/pumpGY/equipL.png" alt="设备左1" style="left: 130px; bottom: 75px" class="equipM" /> <img src="@/assets/newImgs/pumpGY/equipL.png" alt="设备左1" style="left: 540px; bottom: 75px" class="equipM" /> <img src="@/assets/newImgs/pumpGY/equipL.png" alt="设备左1" style="left: 780px; bottom: 75px" class="equipM" /> <img src="@/assets/newImgs/pumpGY/equipL.png" alt="设备右1" style="right: 490px; bottom: 75px; transform: rotateY(180deg)" class="equipM" /> <img src="@/assets/newImgs/pumpGY/equipL.png" alt="设备右1" style="right: 175px; bottom: 75px; transform: rotateY(180deg)" class="equipM" /> <!-- 汽车 --> <img src="@/assets/newImgs/pumpGY/car1.png" alt="车1" style="bottom: 525px; width: 148px; height: 70px" class="carFX animate1" /> <img src="@/assets/newImgs/pumpGY/car2.png" alt="车2" style="bottom: 495px; width: 134px; height: 57px" class="carFX animate2" /> <img src="@/assets/newImgs/pumpGY/car4.png" alt="车4" style="bottom: 455px; width: 137px; height: 50px" class="carFX animate3" /> <img src="@/assets/newImgs/pumpGY/car5.png" alt="车5" style="bottom: 425px; width: 142px; height: 51px" class="carFX animate4" /> <img src="@/assets/newImgs/pumpGY/car3.png" alt="车3" style="bottom: 415px; width: 48px; height: 46px" class="carFX animate3" /> </div> </template> <script setup> import CanvasRainP from '@/views/sponeScreen/projectHM/canvasRainP.vue'; import bus from '@/bus'; import { graphicReport } from '@/api/dataAnalysis/syntherticData'; const rainDate = ref(''); const { proxy } = getCurrentInstance(); const timer = ref(null); const station1 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }] }); const station2 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }] }); const station3 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }] }); const station4 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }] }); const station5 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }] }); // 获取实时数据 function getRealData() { // 从左到右,共5个 let params = { startTime: localStorage.getItem('setRainDateKF'), endTime: localStorage.getItem('setRainDateKF'), stCode: '', }; params.stCode = '0371000037'; graphicReport(params).then(res => { if (res.data.propertyMonitorList.length > 0) { station1.value = res.data; } }); params.stCode = '0371000038'; graphicReport(params).then(res => { if (res.data.propertyMonitorList.length > 0) { station2.value = res.data; } }); params.stCode = '0371000039'; graphicReport(params).then(res => { if (res.data.propertyMonitorList.length > 0) { station3.value = res.data; } }); station4.value = {}; //暂未安装,无数据 params.stCode = '0371000044'; graphicReport(params).then(res => { if (res.data.propertyMonitorList.length > 0) { station5.value = res.data; } }); } // 公共方法,根据监测名称来匹配对应的数值 function nameToData(data, name) { let arr = data.filter(item => item.monitorPropertyName == name); return arr[0] ? arr[0].ylist : []; } // 海绵设施点击 function checkHmSS() { bus.emit('checkSSFX', {}); } onMounted(() => { rainDate.value = localStorage.getItem('setRainDateKF'); getRealData(); // 5分钟刷新一次数据 timer.value = setInterval(() => { getRealData(); }, 5 * 60 * 1000); }); onBeforeUnmount(() => { if (timer.value) clearInterval(timer.value); }); </script> <style lang="scss"> // prettier-ignore .projectFXPage { width: 1600PX; height: 800PX; margin-bottom:20PX; background: url('@/assets/newImgs/pumpGY/projectBg.jpg') no-repeat; background-size: 100% 100%; position:relative; .equipM{ position: absolute; z-index: 30; width:71PX; height:329PX; } .carFX{ position: absolute; z-index: 10; } .animate1{ animation: carAni1 linear 10s infinite; @keyframes carAni1 { 0%{right:5%;} 100%{right:92%} } } .animate2{ animation: carAni2 ease-in-out 8s infinite; @keyframes carAni2 { 0%{right:5%;} 100%{right:90%} } } .animate3{ animation: carAni3 ease-in-out 8s infinite; @keyframes carAni3 { 0%{left:5%;} 100%{left:90%} } } .animate4{ animation: carAni4 linear 10s infinite; @keyframes carAni4 { 0%{left:5%;} 100%{left:90%} } } .animate3{ animation: carAni5 linear 20s infinite; @keyframes carAni5 { 0%{left:0%;} 100%{left:93%} } } .suggest{ position:absolute; z-index: 20; right:155PX; top:-10PX; width:421PX; height:251PX; background: url('@/assets/newImgs/pumpGY/tipsBg.png') no-repeat; background-size: 100% 100%; font-size:14PX; padding:20PX; font-family: Source Han Sans CN; font-weight: 400; color: #C1E8FF; line-height: 24PX; .iconSug{ cursor: pointer; position:absolute; top:20PX; right:20PX; width: 25PX; height: 25PX; svg{ width: 25PX; height: 25PX; } } .center{ margin:10PX 30px 10PX 0px; text-align: center; font-size:15PX; color:#fff; } .cont{ padding-bottom:5PX; margin-bottom:5PX; border-bottom: 1px dashed #6A8CAE; .numBg{ width:24PX; height: 18PX; line-height: 18PX; display: inline-block; background: url('@/assets/newImgs/pumpGY/numBg.png') no-repeat; background-size: 100% 100%; text-align: center; color: #FFD200; } } span{ font-weight: bold; } } .waterFlow{ position:absolute; z-index: 10; bottom:60PX; } .tipsM{ position:absolute; z-index: 120; background: linear-gradient(0deg, #057AD4 0%, #015080 100%); border: 1px solid #057AD4; padding:10PX; color:#fff; font-size:16PX; width:150PX; span{ width:100%; display: inline-block; } } .realData{ color:#fff; p{ position:absolute; z-index: 10; width:160PX; height: 26PX; line-height: 26PX; text-align: center; background: #004DE0; border-radius: 13PX; font-size:16PX; } } .waterFX{ img{ position:absolute; z-index: 10; } } } </style>