Newer
Older
KaiFengPC / src / views / sponeScreen / newPage / components / commonUnderGround.vue
@zhangdeliang zhangdeliang on 23 May 4 KB 初始化项目
<template>
  <!-- 监测监视--地下管廊运行监控 -->
  <div class="groundBox">
    <div class="ground-body">
      <div :style="'height:' + (50 + parseFloat(datas.waterLevel)) + '%'" class="imgbg"></div>
      <img :src="getImageUrl('ground-1.png', 'newImgs/HaiMianScreen')" alt="" class="groundImg" />
      <div class="body-center">
        <div class="groundElevation">地面标高{{ datas.dmgc }}m</div>
        <div class="dashed" :style="'bottom:' + (parseFloat(bgheight) + parseFloat(datas.yjzhb)) + '%'"></div>
        <div class="dashedSize" :style="'bottom:' + (parseFloat(bgheight) + parseFloat(datas.yjzhb)) + '%'">漫溢风险{{ datas.yjzhb }}m</div>
        <div class="current-triangle" :style="'bottom:' + (parseFloat(bgheight) + parseFloat(datas.waterLevel)) + '%'">
          <div class="current">当前水位{{ datas.waterLevel }}m</div>
          <div class="triangle">&#9660;</div>
        </div>
        <div class="ground-csc">沉沙池</div>
        <div class="ground-water">
          <div class="direction">水流方向</div>
          <div class="water"></div>
          <div class="water-gd">管底标高{{ datas.gdgc }}m</div>
          <div class="dashed1"></div>
          <div class="direction1">水流方向</div>
          <div class="water1"></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const datas = ref({});
const props = defineProps({
  groundparam: Object,
  refresh: Number,
});
const bgheight = ref(30);

watch(
  () => props.refresh,
  value => {
    datas.value = {
      dmgc: props.groundparam.dmgc,
      gdgc: props.groundparam.gdgc,
      waterLevel: props.groundparam.waterLevel,
      yjzhb: props.groundparam.yjzhb,
    };
    console.log(datas.value, 999);
  }
);
onMounted(() => {});
</script>

<style lang="scss" scoped>
@import '@/assets/styles/variables.module.scss';
.ground-body {
  position: relative;
  height: 230px;

  .imgbg {
    position: absolute;
    bottom: 0;
    background: url(@/assets/newImgs/HaiMianScreen/water-waves.gif) no-repeat;
    width: 100%;
  }

  img {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .body-center {
    width: 100%;
    height: 100%;
    position: relative;

    .groundElevation {
      position: absolute;
      transform: translateY(-50%);
      top: 20px;
      left: 30px;
      width: 85px;
      background: #dcdddc;
      color: #000;
      text-align: center;
      font-size: 13px;
    }
    .dashed {
      position: absolute;
      top: 45px;
      left: 52%;
      transform: translateX(-50%);
      width: 40%;
      border-bottom: 1px dashed red;
    }
    .dashedSize {
      position: absolute;
      transform: translateY(-50%);
      // top: 30px;
      right: 40px;
      width: 85px;
      background: #fff;
      color: red;
      text-align: center;
      font-size: 13px;
    }

    .current-triangle {
      position: absolute;
      left: 38%;
      color: #fff;
      text-align: center;
      transform: translateY(-50%);
      font-size: 13px;
    }

    // position: absolute;
    // bottom: 0;
    // background: #08a2ea;
    // height: 50px;
    // width: 100%;
    .ground-csc {
      position: absolute;
      bottom: 5px;
      left: 35%;
      transform: translateX(-50%);
      color: #fff;
      font-size: 13px;
    }
    .ground-water {
      position: absolute;
      bottom: 30px;
      left: 0;
      width: 100%;
      color: #fff;
      .water-gd {
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 13px;
      }
      .dashed1 {
        position: absolute;
        bottom: 1px;
        left: 49%;
        transform: translateX(-50%);
        width: 41%;
        border-bottom: 1px dashed #fff;
      }
      .water {
        position: absolute;
        left: 50px;
        bottom: 15px;
        width: 35px;
        height: 15px;
        background: url(@/assets/newImgs/HaiMianScreen/water-arrow.png) no-repeat;
      }
      .direction {
        position: absolute;
        left: 40px;
        bottom: 0;
        font-size: 13px;
      }
      .direction1 {
        position: absolute;
        right: 45px;
        bottom: 0;
        font-size: 13px;
      }
      .water1 {
        position: absolute;
        right: 50px;
        bottom: 15px;
        width: 35px;
        height: 15px;
        background: url(@/assets/newImgs/HaiMianScreen/water-arrow.png) no-repeat;
      }
    }

    .waterWavas {
      position: absolute;
      bottom: 70px;
      left: 135px;
      width: 34%;
      height: 30%;
    }
  }
}
</style>