<template>
  <div class="left-chart-1">
    <div class="left-list">
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/SOS.svg" alt="" />
          <div class="word">SOS告警</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmSOSSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmSOSSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/weilan.svg" alt="" />
          <div class="word">围栏告警</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmRailSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmRailSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/xinlv.svg" alt="" />
          <div class="word">心率告警</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmHeartSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmHeartSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/diedao.svg" alt="" />
          <div class="word">跌倒告警</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmFallSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmFallSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/didian.svg" alt="" />
          <div class="word">低电提醒</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmLowSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmLowSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
      <div class="left-container">
        <div class="container-topdown">
          <img src="./img/shebei.svg" alt="" />
          <div class="word">设备状态</div>
        </div>
        <div class="container-topdown">
          <div class="number">{{ data.un_alarmStatusSolve }}</div>
          <div class="word">未处理</div>
        </div>
        <div class="container-topdown">
          <div class="number color">{{ data.alarmStatusSolve }}</div>
          <div class="word">已处理</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { alarm } from "@/api/system/datav";
export default {
  name: "LeftChart1",
  data() {
    return {
      config: {
        colors: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
        unit: "件",
      },
      number: null,
      data: {},
    };
  },
  mounted() {
    this.initData();
  },
  methods: {
    initData() {
      alarm().then((res) => {
        console.log(res, 444);
        this.data = res.data;
      });
    },
  },
};
</script>

<style lang="scss">
.left-chart-1 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-grow: 0;
  flex-direction: column;
  // border:1px solid green;

  .lc1-details {
    // width: 250px;
    height: 90px;
    font-size: 14px;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    // border: 1px solid red;
    background-color: #062961;

    span {
      color: #096dd9;
      font-weight: bold;
      font-size: 35px;
      margin-left: 20px;
    }
  }
  .left-list {
    height: 100%;
    .left-container {
      // width: 100%;
      height: 15.4%;
      text-align: center;
      border-radius: 5px;
      border: 1px solid #1ae1e6;
      // height: 50px;
      // background-color: green;
      margin-top: 10px;
      display: flex;
      background-color: #5d6986;
      // color:red;
      .container-topdown {
        width: 100%;
        // height: 57px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        img {
          width: 30px;
          height: 30px;
        }
        .word {
          margin-top: 5px;
          font-size: 18px;
          font-weight: bold;
        }
        .number {
          color: #fcca00;
          font-size: 30px;
          font-weight: bold;
        }
        .color {
          color: #fff;
        }
      }
    }
  }
}
</style>
