<template>
  <transition
    appear
    name="animate__animated animate__move"
    enter-active-class="animate__slideInLeft"
    leave-active-class="animate__slideOutLeft"
  >
    <div class="widget-FocusOnWarning">
      <div class="head">
        <div class="title">
          <div class="icon"></div>
          <span class="site-info">重点关注预警</span>
        </div>
      </div>
      <div class="content-info">
        <div class="warningStaWrap">
          <div class="warningSta">
            <div class="ws-item">
              <div class="pic"><img :src="require('@/views/groupPage/images/模块图标/智慧预警/报警.png')" /></div>
              <div class="txt">
                <div class="txt-value">7个</div>
                <div class="txt-title">报警</div>
              </div>
            </div>
            <div class="ws-item radar">
              <img :src="require('@/views/groupPage/images/模块图标/智慧预警/radar.png')" />
              <div class="txt">
                <div class="txt-value early-value">9个</div>
                <div class="txt-title early-title">预警</div>
              </div>
            </div>
            <div class="ws-item">
              <div class="pic"><img :src="require('@/views/groupPage/images/模块图标/智慧预警/推测.png')" /></div>
              <div class="txt">
                <div class="txt-value">2个</div>
                <div class="txt-title">推测</div>
              </div>
            </div>
          </div>
        </div>
        <div class="rankList">
          <div class="title">
            <div class="icon"></div>
            <span class="item-name">重点关注排行榜</span>
          </div>
          <div class="rankListContent">
            <ComTriangleBarChart />
          </div>
        </div>
      </div>
    </div>
  </transition>
</template>

<script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
import ComDynamicRingChart from '@/views/groupPage/components/OthersChart/ComDynamicRingChart.vue'
import ComTriangleBarChart from '@/views/groupPage/components/BarChart/ComTriangleBarChart.vue'
//重点关注预警
@Component({ name: 'FocusOnWarning', components: { ComDynamicRingChart, ComTriangleBarChart } })
export default class FocusOnWarning extends Vue {}
</script>

<style lang="scss" scoped>
.animate__slideInLeft,
.animate__slideOutLeft {
  animation-duration: 3s; //动画持续时间
  animation-delay: 0s; //动画延迟时间
}
.widget-FocusOnWarning {
  $size20: 0.104167rem /* 20/192 */;
  z-index: 2;
  //position
  top: 0.505208rem /* 97/192 */;
  margin-left: $size20 /* 20/192 */;
  position: absolute;
  //size
  height: 2.223958rem /* 427/192 */;
  width: 2.083333rem /* 400/192 */;
  color: #eee;
  .head {
    height: 0.166667rem /* 32/192 */;
    width: 100%;
    background: linear-gradient(-90deg, rgba(43, 167, 255, 0.2) 0%, rgba(43, 167, 255, 0.08) 100%);
    font-family: Source Han Sans CN-HEAVY;
    .title {
      width: 100%;
      height: 100%;
      display: flex;
      font-weight: 400;
      align-items: center;
      .icon {
        height: 0.166667rem /* 32/192 */;
        width: 0.34375rem /* 66/192 */;
        background: url('~@/views/groupPage/images/模块图标/智慧预警/重点关注.png') no-repeat center center;
        background-size: 100% 100%;
      }
      span {
        flex: 1;
        font-weight: bold;
        font-size: 0.083333rem /* 16/192 */;
        color: #ffffff;
        padding: 0.041667rem /* 8/192 */;
        background: linear-gradient(0deg, #9bd2fa 0%, #ffffff 100%);
        background-clip: text;
        -webkit-text-fill-color: transparent;
      }
    }
  }
  .content-info {
    width: 100%;
    height: calc(100% - 0.166667rem);
    display: inline-block;
    font-family: Source Han Sans CN;
    background: linear-gradient(0deg, rgba(14, 167, 255, 0.16) 0%, rgba(14, 167, 255, 0.02) 100%);
    .title {
      width: 100%;
      display: flex;
      .icon {
        height: 0.072917rem /* 14/192 */;
        width: 0.078125rem /* 15/192 */;
        margin-right: 0.046875rem /* 9/192 */;
        background: url('~@/views/groupPage/images/三角.png') no-repeat center center;
        background-size: 100% 100%;
      }
      .item-name {
        font-family: Source Han Sans CN;
        color: #0ea7ff;
        font-size: 0.072917rem /* 14/192 */;
        font-weight: 500;
      }
    }
    @mixin contentCenter() {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .warningStaWrap {
      width: 100%;
      height: 0.807292rem /* 155/192 */;
      @include contentCenter();
      overflow: hidden;
      .warningSta {
        width: 100%;
        height: 0.625rem /* 120/192 */;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        .ws-item {
          @include contentCenter();
          height: 100%;
          width: 100%;
          justify-content: flex-start;
          background: #062239;
        }
        .pic {
          width: 0.46875rem /* 90/192 */;
          height: 0.453125rem /* 87/192 */;
          img {
            height: 100%;
            width: 100%;
            object-fit: contain;
          }
        }
        .txt {
          z-index: 10;
          font-family: Source Han Sans CN;
          color: #ffffff;
          height: 0.3125rem /* 60/192 */;
          display: flex;
          flex-flow: column;
          justify-content: space-evenly;
          .txt-value {
            font-size: 0.104167rem /* 20/192 */;
            font-weight: 500;
            white-space: nowrap;
          }
          .txt-title {
            font-size: 0.072917rem /* 14/192 */;
            font-weight: 400;
          }
          .early-value {
            color: #ffffff;
            font-size: 0.125rem /* 24/192 */;
            font-family: Source Han Sans CN-HEAVY;
            background: linear-gradient(0deg, #03e8d5 0%, #ffea77 100%);
            background-clip: text;
            -webkit-text-fill-color: transparent;
          }
          .early-title {
            font-size: 0.083333rem /* 16/192 */;
            font-weight: 500;
            font-family: Source Han Sans CN-MEDIUM;
          }
        }
        .radar {
          justify-content: center;
          flex-flow: column;
          position: relative;
          img {
            position: absolute;
            height: .703125rem /* 135/192 */;
            width: .703125rem /* 135/192 */;
          }
        }
        .radar::after {
          content: ' ';
          display: block;
          background-image: linear-gradient(44deg, rgba(0, 255, 51, 0) 50%, #35fff5 100%);
          width: 0.333333rem /* 64/192 */;
          height: 0.333333rem /* 64/192 */;
          position: absolute;
          top: -0.015625rem /* 3/192 */;
          left: 0.015625rem /* 3/192 */;
          animation: radar-beam 4s infinite;
          animation-timing-function: linear;
          transform-origin: bottom right;
          border-radius: 100% 0 0 0;
        }
        @keyframes radar-beam {
          0% {
            transform: rotate(0deg);
          }
          100% {
            transform: rotate(360deg);
          }
        }
      }
    }
    .rankList {
      width: 100%;
      height: calc(100% - 0.807292rem /* 155/192 */);
      .rankListContent {
        width: 100%;
        height: calc(100% - 0.072917rem /* 14/192 */);
      }
    }
  }
}
</style>