<template>
  <div>
    <div v-if="notesList.length>0">
      <ul class="notesList" v-for="(i, index) in notesList">
        <li>车牌号: <span>{{i.carNumber}}</span></li>
        <li>车牌颜色: <span>蓝色</span></li>
        <li>进场时间: <span>{{i.parkInTime}}</span></li>
        <li>出场时间: <span>{{i.parkOutTime}}</span></li>
        <li>停车时长: <span>{{i.parkDuration}}</span></li>
      </ul>
      <ul class="notesList">
        <li>车牌号: <span>蒙DMW169</span></li>
        <li>车牌颜色: <span>蓝色</span></li>
        <li>进场时间: <span>2020-12-19 12：59：18</span></li>
        <li>出场时间: <span>2020-12-19 12：59：18</span></li>
        <li>停车时长: <span>18分33秒</span></li>
      </ul>
    </div>


    <div class="noRecord" v-else>暂无记录</div>

  </div>
</template>

<script>
import {
  queryParkingRecordCarNumbers
} from "@/api/parkNotes/parkNotes";
export default {
  name: "parkRecord",
  data() {
    return {
      notesList: []
    };
  },
  mounted() {
    this.getRecord();
  },
  methods: {
    getRecord: function() {
      let jsondata = this.$utils.commonParams();
      console.log(jsondata);
      jsondata.parkState = "20";
      /**停车状态 10:在场 ,20:离场.*/
      jsondata.orderState = "40";
      /**订单状态[字典表:ORDER_STATE]:10:待核算,20：待支付,30:支付中,40：支付完成,52:欠费逃逸, 53:已补缴 60:退款中 70:退款成功*/
      jsondata.sign = this.$utils.signObject(jsondata);
      queryParkingRecordCarNumbers(jsondata).then(data => {
        console.log(data);
        this.notesList = data.data;
        console.log(this.notesList)
      });
    }
  }
};
</script>

<style scoped lang="scss">
  .notesList {
    background: #fff;
    padding: 10px;
    margin-bottom: 10px;
  }

  .noRecord {
    padding-top: 200px;
    background: url("../../../assets/images/parkPay/noRecord.png") no-repeat center 60px;
    background-size: 161px 124px;
    text-align: center;
  }
</style>
