<template>
  <div class="main-data alarm-device">
    <div class="title-area">楼宇中当前告警设备情况</div>

    <div class="close-btn" @click="close"></div>
    <div class="content-area">
      <div class="content">
        <div class="data-list">
          <div class="table-cont">
              <div class="table-top">
                <div class="flo">抽屉柜编号</div>
                <div class="pot">设备名称</div>
                <div class="spa">类别</div>
              </div>
              <div class="table-bot">
                <div class="table-list" v-for="(item,index) in floorDataList" :key="index">
                  <div class="fir">{{item.alertEquipment}}</div>
                  <div class="snd">{{item.alertPosition}}</div>
                  <div class="thr">{{item.alertName}}</div>
                </div>
              </div>
            </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { abnormalPoint } from "@/api/screen/service";
import pinyin from "../data/pinyin.js";

export default {
  name: "AlarmDevice",
  props: {
      power: {  // 保持驼峰命名（在模板中会自动匹配 kebab-case）
    type: String,
    default: ""  // 默认值改为空字符串
  }
  },
  data() {
    return {
      floorDataList: [],
      dataList: [],
      weeks: ["周一", "周二", "周三", "周四", "周五"],
      list: [],
      foodsList: [],

      food: "早餐",
      foods: ["早餐", "中餐", "晚餐"],
      lists: [],
      appOrgs:['10001','1D001','1K003','1J001','1E001','1J003','1K002','1J002','1K001','1A001']
    };
  },
  created() {
    this.abnormalPoint()
  
  },
  destroyed() {},
  beforeDestroy() {},
  mounted() {},
  methods: {
    abnormalPoint() {
          // alert(this.IntionList)
          abnormalPoint(this.$props.power).then((res) => {   
        if (Number(res.code) === 200) {
          this.floorDataList=res.data;
        }
      }
    );
    },
     

    close() {
      this.$emit("closeFoods");
    },
  },
};
</script>

<style lang="scss">

.alarm-device {
  position: relative;
  width: 890px;
  height: 620px;
  background: url("../../../assets/images/main/dialog-bg-high.png") no-repeat;
  background-size: cover;
  .close-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    cursor: pointer;
  }
  .choose-area {
    position: absolute;
    right: 100px;
    top: 7px;
    width: 80.05px;
    height: 30px;
    line-height: 30px;
    padding-left: 15px;
    font-size: 14px;
    color: #00ffff;
    background: url("../../../assets/images/main/choose_short.png") no-repeat;
    cursor: pointer;
  }
  .choose-area.choose-week{
    right: 200px;
  }
  .content-area {
    display: flex;
    flex-direction: column;
    padding: 15px 20px 0 15px;
  }

  .content-title {
    width: 515px;
    height: 26px;
    background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
    background-size: 100% 100%;
    font-family: "PingFangSC";
    font-size: 16px;
    font-weight: bold;
    color: #00ffff;
    padding-left: 17px;
    .title {
      display: block;
    }
  }

  .content {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    .data-list {
      background: radial-gradient(
        190% 71% at 50% 49%,
        rgba(21, 105, 107, 0.54) 0%,
        rgba(27, 95, 97, 0) 100%
      );
      width: 100%;
      height: 600px;
      padding: 10px;
      // overflow: auto;
      white-space: pre-wrap;
      .table-cont{
  width:100%;

  .table-top{
    width:100%;
    height: 50px;
    background-color: #092B2C;
    padding:0 25px 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size:18px;
    color:#00FFFF;
      .flo{
    width:50%;
    text-align: center;
  }
  .pot{
    width:25%;
    text-align: center;
  }
  .spa{
    width:25%;
    text-align: center;
  }

  }
  .table-bot{
    width:100%;
    height: 525px;
    overflow: auto;

    .table-list{
      width:100%;
      height:45px;
      padding:15px 25px 15px 0px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size:16px;
      color:#FFFFFF;
      font-weight: 500;
      //border: 1px dotted #14302F;
    }
    
  .fir{
    width:50%;
    text-align: center;
    border-left: 1px solid #40E5F2;
  }
  .snd{
    width:25%;
    text-align: center;
  }
  .thr{
      width:25%;
      text-align: center;
  }
  }



  // .color{
  //   color:#FF8C00;
  // }
}
    }
  }

  .title-format {
    display: flex;
    flex-direction: row;
    align-items: center;
    img {
      width: 6px;
      height: 24px;
      margin-right: 6px;
    }
    .title-info {
      display: flex;
      flex-direction: column;
      font-size: 12px;
      color: #ffffff;
      .title-en {
        font-size: 8px;
        color: #ffffff;
        opacity: 0.4;
      }
    }
  }

  .choose-area {
    .el-select {
      width: 90%;
    }
    .el-input {
      input {
        background: rgba(255, 255, 255, 0);
        color: #00ffff;
        border: none;
        padding: 0;
        width: 30px;
      }
    }
  }

  .no-data{
    text-align: center;
    color: #62ffe5;
    font-size: 25px;
    margin-top: 150px;
  }

  ::-webkit-scrollbar {
    width: 3px;
    height: 3px;
  }

  ::-webkit-scrollbar-thumb {
    //滑块部分
    // border-radius: 5px;
    background-color: #58cbbb;
  }

  ::-webkit-scrollbar-track {
    //轨道部分
    // box-shadow: inset 0 0 5px #ddd;
    background: #ddd;
    // border-radius: 5px;
  }
}
</style>

