<template>
  <div style="width: 413px; margin-top: -15px; margin-left: 20px; height: 400px; background: #fff; border-radius: 10px">
    <div class="key-pop">
      <div class="title-key">
        <div class="title-line">
          <span class="line"></span>
          <span class="info">在用车辆信息</span>
        </div>
      </div>
      <div>
        <div>
          <div class="row header">
            <span class="type" style="margin-left: -18px;">车牌号</span>
            <span class="count">用车人</span>
            <span class="time"> 申请时间</span>
            <span class="unit">归还时间</span>
            <span class="unit" style="margin-right: -10px;">操作</span>
          </div>
          <ul style="padding-left: 0" v-for="(item,index) in carList" :key="index">
            <li class="row" @click="MessageReminder(item.id)">
              <span class="type">{{ item.plateNumber }}</span>
              <span class="count">{{ item.applyUserName }}</span>
              <span class="time">{{ item.applicationTime }}</span>
              <span class="unit"> {{ item.returnTime }} </span>
              <span style="color: #076cf5">提醒归还</span>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getUsingCarList,Reminder } from '@/api/keys.js'
export default {
  data() {
    return {
      carList: [],
    }
  },
  methods: {
    funCarList() {
      getUsingCarList().then((res) => {
        this.carList=res.data
      })
    },
    MessageReminder(id){
      Reminder(id).then(res=>{
        if(res.code==200){
          this.$message.success('提醒成功')
        }
      })
    }
  },

  created() {
    this.funCarList()
  },
}
</script>

<style lang="less" scoped>
.key-pop {
  .title-key {
    width: 100%;
    // height: 350px;
    background: #fff;
    border-radius: 10px;
    padding: 20px 8px 5px 8px;
    .title-line {
      margin-left: 20px;
      // width: 140px;
      display: flex;
      align-items: center;
      .line {
        display: inline-block;
        width: 9px;
        height: 24px;
        background: #aacefc;
        border-radius: 3px;
        opacity: 1;
        margin-right: 18px;
      }
      .info {
        font-size: 20px;
        font-family: PingFang SC;
        color: #4d4d4d;
        opacity: 1;
        font-weight: 500;
      }
    }
  }
  .header {
    color: #4d4d4d;
    height: 31px;
    background: #f7f7f7;
    margin-top: 2px;
    letter-spacing: 1px;
    line-height: 38px;
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
    .is_notice {
      line-height: 19px;
      font-size: 10px;
    }
  }
  li.row > span {
    //   text-align: center;
    font-size: 12px;
    display: inline-block;
  }
  li.row.active {
    background-color: rgba(0, 213, 255, 0.2);
  }

  li.row {
    box-sizing: border-box;
    padding-left: 0 !important;
  }

  .row,
  li {
    display: block;
    height: 36px;
    // border-bottom: 1px dashed #1f2535;
    line-height: 36px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 14px;
    //   background-color: rgba(0, 0, 0, 0.2);
    color: #4d4d4d;
    margin-top: 5px;
    .type,
    .unit {
      // display: flex;
      // justify-content: center;
      // // align-items: center;
      // flex: 0.15;
      img {
        display: inline-block;
        width: 11px;
        height: 16px;
        //   margin-left: 5px;
      }
    }
  }
}
</style>
