Newer
Older
KaiFengPC / src / views / sponeScreen / projectHM / projectFX.vue
@zhangdeliang zhangdeliang on 11 Oct 8 KB update
<template>
  <!-- 典型项目分析 -->
  <div class="projectFXPage">
    <!-- 分析结果建议 -->
    <div class="suggest">
      <div class="center">
        {{ props.projectParams.date }} 降雨起止时间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 * station1.z) / 1.1 + 'px', left: '73px', width: '846px' }"
    />
    <img
      src="@/assets/newImgs/pumpGY/water.png"
      alt="右"
      class="waterFlow"
      :style="{ height: (120 * station5.z) / 1.8 + 'px', right: '75px', width: '555px' }"
    />

    <!-- 实时数据 -->
    <div class="realData">
      <p style="left: 290px; bottom: 175px">实时水深:{{ station1.z }}米</p>
      <p style="right: 260px; bottom: 175px">实时水深:{{ station5.z }}米</p>
    </div>

    <!-- 监测数据 -->
    <div style="left: 170px; bottom: 335px" class="tipsM">
      <span>水深:{{ station1.z }} m</span>
      <span>流速:{{ station1.va }} m/s</span>
      <span>SS:{{ station1.turb }} mg/L</span>
      <span>管径:2.4*1.1m</span>
    </div>
    <div style="left: 600px; bottom: 335px" class="tipsM">
      <span>水深:{{ station2.z }} m</span>
      <span>流速:{{ station2.va }} m/s</span>
      <span>SS:{{ station2.turb }} mg/L</span>
      <span>管径:2.4*1.1m</span>
    </div>
    <div style="left: 800px; bottom: 335px" class="tipsM">
      <span>水深:{{ station3.z }} m</span>
      <span>流速:{{ station3.va }} m/s</span>
      <span>SS:{{ station3.turb }} mg/L</span>
      <span>管径:DN500</span>
    </div>
    <div style="left: 960px; bottom: 335px" class="tipsM">
      <span>水深:{{ station4.z || '--' }} m</span>
      <span>流速:{{ station4.va || '--' }} m/s</span>
      <span>SS:{{ station4.turb || '--' }} mg/L</span>
      <span>管径:3*1.8m</span>
    </div>
    <div style="right: 140px; bottom: 335px" class="tipsM">
      <span>水深:{{ station5.z }} m</span>
      <span>流速:{{ station5.va }} m/s</span>
      <span>SS:{{ station5.turb }} 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 { realtimeDataLatest } from '@/api/dataAnalysis/syntherticData';

const props = defineProps({
  projectParams: {
    type: Object,
  },
});
const { proxy } = getCurrentInstance();
const timer = ref(null);
const station1 = ref({});
const station2 = ref({});
const station3 = ref({});
const station4 = ref({});
const station5 = ref({});

// 获取实时数据
function getRealData() {
  // 从左到右,共5个
  realtimeDataLatest('0371000037').then(res => {
    station1.value = res.data;
  });
  realtimeDataLatest('0371000038').then(res => {
    station2.value = res.data;
  });
  realtimeDataLatest('0371000039').then(res => {
    station3.value = res.data;
  });
  station4.value = {}; //暂未安装,无数据
  realtimeDataLatest('0371000044').then(res => {
    station5.value = res.data;
  });
}

// 海绵设施点击
function checkHmSS() {
  bus.emit('checkSSFX', {});
}

onMounted(() => {
  console.log('典型项目接收参数--', props.projectParams);
  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>