<template>
  <div class="device">
    <div class="device-head">
      <div class="title">设备列表</div>
      <el-select class="select" size="large">
        <el-option label="全部" value="0" />
        <el-option label="常规模式" value="1" />
        <el-option label="户外押送" value="2" />
        <el-option label="审讯模式" value="3" />
      </el-select>
    </div>
    <div class="device-list noScrollbar">
      <el-popover class="box-item" title="Title" content="Top Left prompts info" placement="bottom" v-for="item in 4" :key="item">
        <template #reference>
          <div class="item">
            <div class="item-img">
              <img src="@/assets/img/handcuffs.png" alt="" srcset="" />
            </div>
            <div class="item-content">
              <div class="item-content-name">手铐-002</div>
              <div class="item-content-num">860116079430636</div>
            </div>
            <div class="item-right">
              <div class="battery">
                <div class="battery-icon">
                  <img src="@/assets/img/battery.png" alt="" srcset="" />
                </div>
                <div class="battery-num">98%</div>
              </div>
              <div class="user">admin</div>
            </div>
          </div>
        </template>
      </el-popover>
    </div>
  </div>
</template>
<script setup></script>
<style scoped lang="less">
.device {
  flex-shrink: 0;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;

  .device-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    margin-top: 14px;
    .title {
      color: #061451;
      font-size: 20px;
      &::before {
        display: inline-block;
        margin-right: 10px;
        content: "";
        width: 2px;
        height: 14px;
        border-radius: 20px;
        background: #061451;
      }
    }
    .select {
      width: 120px;
      margin-right: 20px;
    }
  }
  .device-list {
    overflow: auto;
    .item {
      height: 89px;
      background: #ffffff;
      display: flex;
      align-items: center;
      box-sizing: border-box;
      border-bottom: 1px solid #dedede;
      cursor: pointer;
      &:hover {
        background: #f5f5f5;
      }
      .item-img {
        width: 50px;
        height: 50px;
        margin-left: 20px;
        flex-shrink: 0;
        img {
          width: 100%;
          height: 100%;
        }
      }
      .item-content {
        flex: 1;
        margin: 0 15px;
        .item-content-name {
          color: #061451;
          font-size: 20px;
        }
        .item-content-num {
          color: #787878;
          font-size: 16px;
        }
      }
      .item-right {
        margin-right: 20px;
        .battery {
          display: flex;
          align-items: center;
          .battery-icon {
            width: 24px;
            height: 24px;
            margin-right: 5px;
            img {
              width: 100%;
              height: 100%;
            }
          }
          .battery-num {
            color: #787878;
            font-size: 16px;
          }
        }
        .user {
          color: #787878;
          font-size: 16px;
          text-align: right;
        }
      }
    }
  }
}
</style>
