<template>
  <div class="ruoyiUiExecutable">
    <dv-decoration-11 class="dv11">双重预防机制</dv-decoration-11>
    <div class="chartBox">
      <div class="item" @click="seeDanger(0)">
        <p class="one">{{ countObj.smallCount || 0 }}</p>
        <div>一般隐患</div>
        <use xlink:href="#donghuozuoye"></use>
      </div>
      <div class="item" @click="seeDanger(1)">
        <p class="significant">{{ countObj.bigCount || 0 }}</p>
        <div>重大隐患</div>
      </div>
      <div class="item" @click="seeDanger(2)">
        <p class="rectify">{{ countObj.expireCount || 0 }}</p>
        <div>整改逾期</div>
      </div>
    </div>
  </div>
</template>

<script>
import { dangerStatistics } from '@/api/home'
export default {
  name: 'RuoyiUiExecutable',

  data() {
    return {
      countObj: {}

    }
  },

  mounted() {
    dangerStatistics().then(res => {
      if (res.code === 200) {
        console.log(res)
        this.countObj = res.data
      }
    })
  },

  methods: {
    seeDanger(value) {
      this.$emit('seeDanger', value)
    }
  },
};
</script>

<style lang="scss" scoped>
.dv11{
  width:200px;
  height:50px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 10px 0 0 10px;
}
.one{
  background: radial-gradient(at left bottom,rgba(255,204,46,.4) 40%,rgba(255,204,46,0));
  border: 0.005208rem solid #ffcc2e;
    box-shadow: inset 0.09375rem -0.046875rem 0.104167rem 0.010417rem #ffcc2e;
}
.significant{
  border: 0.005208rem solid #fe6143;
    box-shadow: inset 0.09375rem -0.046875rem 0.104167rem 0.010417rem #fe6143;
    background-image: radial-gradient(at left bottom,rgba(254,97,67,.4) 40%,rgba(254,97,67,0));
}
.rectify{
  border: 0.005208rem solid #33d3bf;
    box-shadow: inset 0.09375rem -0.046875rem 0.104167rem 0.010417rem #33d3bf;
    background-image: radial-gradient(at left bottom,rgba(51,211,191,.4) 40%,rgba(51,211,191,0));
}
.item{
  width: 30%;
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  cursor: pointer;
  p{
    border-radius: 50%;
    height: 60px;
    width: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 16px;
    font-weight: 600;
  }
}
.chartBox{
  /* margin-top: -30px; */
  display: flex;
  justify-content: space-around;
}
.dvChart{
  width: 270px;
  height: 270px;
}
.first{
  margin-left: 30px;
}
.last{
  margin-top: -80px;
}
.dv9{
  width: 130px;
  height: 130px;
  color: green;
  font-weight: 900;
  font-size: 20px;

}
.ruoyiUiExecutable{
  padding-top: 5px;
}
</style>
