<template>
  <div id="app-container-ethylene">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span style="color:#5cd9e8">
          <icon name="chart-area"></icon>
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2">乙烯储罐</span>
          <div class="decoration2">
            <dv-decoration-2 :reverse="true" style="width:5px;height:2.4rem;" />
          </div>
        </div>
      </div>
      <div :style="transformdata ? 'transform: scale('+transformdata+') translate(0,0) !important;text-align: center; display: flex;justify-content: center;margin-top: 10px;align-items: center;height: 80%;' :'text-align: center; display: flex;justify-content: center;margin-top: 10px;align-items: center;height: 80%;'">
        <div style="position: relative;">
            <img src="@/assets/image/cylindrical1.png" style="width:40px;height: 170px;" v-if="0<=(dashboarddata.ehtOne) && (dashboarddata.ehtOne)<20">
            <img src="@/assets/image/cylindrical2.png" style="width:40px;height: 170px;" v-if="20<=(dashboarddata.ehtOne) && (dashboarddata.ehtOne)<40">
            <img src="@/assets/image/cylindrical3.png" style="width:40px;height: 170px;" v-if="40<=(dashboarddata.ehtOne) && (dashboarddata.ehtOne)<60">
            <img src="@/assets/image/cylindrical4.png" style="width:40px;height: 170px;" v-if="60<=(dashboarddata.ehtOne) && (dashboarddata.ehtOne)<80">
            <img src="@/assets/image/cylindrical5.png" style="width:40px;height: 170px;" v-if="80<=(dashboarddata.ehtOne) && (dashboarddata.ehtOne)<100">
            <span class="modelTop pos">STT1061</span>
            <span class="ModelFont">{{ dashboarddata.ehtOne }}%</span>
        </div>
        <div style="position: relative; margin-left: 8% ;">
          <img src="@/assets/image/cylindrical1.png" style="width:40px;height: 170px;" v-if="0<=(dashboarddata.ehtTwo) && (dashboarddata.ehtTwo)<20">
          <img src="@/assets/image/cylindrical2.png" style="width:40px;height: 170px;" v-if="20<=(dashboarddata.ehtTwo) && (dashboarddata.ehtTwo)<40">
          <img src="@/assets/image/cylindrical3.png" style="width:40px;height: 170px;" v-if="40<=(dashboarddata.ehtTwo) && (dashboarddata.ehtTwo)<60">
          <img src="@/assets/image/cylindrical4.png" style="width:40px;height: 170px;" v-if="60<=(dashboarddata.ehtTwo) && (dashboarddata.ehtTwo)<80">
          <img src="@/assets/image/cylindrical5.png" style="width:40px;height: 170px;" v-if="80<=(dashboarddata.ehtTwo) && (dashboarddata.ehtTwo)<100">
            <span class="modelTop pos">STT1062</span>
            <span class="ModelFont">{{ dashboarddata.ehtTwo }}%</span>
        </div>

        <div style="position: relative;margin-left: 8% ;">
          <img src="@/assets/image/cylindrical1.png" style="width:40px;height: 170px;" v-if="0<=(dashboarddata.ehtThree) && (dashboarddata.ehtThree)<20">
          <img src="@/assets/image/cylindrical2.png" style="width:40px;height: 170px;" v-if="20<=(dashboarddata.ehtThree) && (dashboarddata.ehtThree)<40">
          <img src="@/assets/image/cylindrical3.png" style="width:40px;height: 170px;" v-if="40<=(dashboarddata.ehtThree) && (dashboarddata.ehtThree)<60">
          <img src="@/assets/image/cylindrical4.png" style="width:40px;height: 170px;" v-if="60<=(dashboarddata.ehtThree) && (dashboarddata.ehtThree)<80">
          <img src="@/assets/image/cylindrical5.png" style="width:40px;height: 170px;" v-if="80<=(dashboarddata.ehtThree) && (dashboarddata.ehtThree)<100">
          <span class="modelTop pos">STT1063</span>
          <span class="ModelFont">{{ dashboarddata.ehtThree }}%</span>
        </div>
        <div style="position: relative;margin-left: 8% ;">
          <img src="@/assets/image/cylindrical1.png" style="width:40px;height: 170px;" v-if="0<=(dashboarddata.ehtFour) && (dashboarddata.ehtFour)<20">
          <img src="@/assets/image/cylindrical2.png" style="width:40px;height: 170px;" v-if="20<=(dashboarddata.ehtFour) && (dashboarddata.ehtFour)<40">
          <img src="@/assets/image/cylindrical3.png" style="width:40px;height: 170px;" v-if="40<=(dashboarddata.ehtFour) && (dashboarddata.ehtFour)<60">
          <img src="@/assets/image/cylindrical4.png" style="width:40px;height: 170px;" v-if="60<=(dashboarddata.ehtFour) && (dashboarddata.ehtFour)<80">
          <img src="@/assets/image/cylindrical5.png" style="width:40px;height: 170px;" v-if="80<=(dashboarddata.ehtFour) && (dashboarddata.ehtFour)<100">
          <span class="modelTop pos">STT1064</span>
          <span class="ModelFont">{{ dashboarddata.ehtFour }}%</span>
        </div>
        <div style="position: relative;margin-left: 8% ;">
          <img src="@/assets/image/cylindrical1.png" style="width:40px;height: 170px;" v-if="0<=(dashboarddata.ehtFive) && (dashboarddata.ehtFive)<20">
          <img src="@/assets/image/cylindrical2.png" style="width:40px;height: 170px;" v-if="20<=(dashboarddata.ehtFive) && (dashboarddata.ehtFive)<40">
          <img src="@/assets/image/cylindrical3.png" style="width:40px;height: 170px;" v-if="40<=(dashboarddata.ehtFive) && (dashboarddata.ehtFive)<60">
          <img src="@/assets/image/cylindrical4.png" style="width:40px;height: 170px;" v-if="60<=(dashboarddata.ehtFive) && (dashboarddata.ehtFive)<80">
          <img src="@/assets/image/cylindrical5.png" style="width:40px;height: 170px;" v-if="80<=(dashboarddata.ehtFive) && (dashboarddata.ehtFive)<100">
          <span class="modelTop pos">STT1065</span>
          <span class="ModelFont">{{ dashboarddata.ehtFive }}%</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['dashboarddata','transformdata'],
  data () {
    return {
      // 查询参数
      queryParams: {
      },
    }
  },
}
</script>

<style lang="scss">
  #app-container-ethylene {
    padding: 0.2rem 0.2rem 0;
    height: 100%;
    min-width: 3.75rem;
    border-radius: 0.0625rem;
    .bg-color-black {
      height: 100%;
      border-radius: 0.125rem;
      width: 90%;
      margin: auto;
    }
    .text {
      color: #c3cbde;
    } //下滑线动态
    .decoration2 {
      position: absolute;
      right: 0.125rem;
    }
    .chart-box {
      margin-top: 0.2rem;
      width: 2.125rem;
      height: 2.125rem;
      .active-ring-name {
        padding-top: 0.125rem;
      }
    }
    .ModelFont {
      position: absolute;
      bottom: -13px;
      left: 0;
    }

    .modelTop{
      position: absolute;
      width: 12px;
      display: block;
       word-break: break-all;
      top: 25%;

      &.pos{
        right: 8%;
        color: #5c5b15;
        font-weight: bold;
        font-size: 12px;
      }
    }
  }
</style>
