<template>
  <div>
    <div v-if="recordList.length>0">
      <ul class="notesList"  v-for="(i,index) in recordList" :key="i.orderId">
        <li>车牌号: <span>{{i.carNumber}}</span></li>
        <li>停车场: <span>{{i.parkName}}</span></li>
        <li>进场时间: <span>{{i.parkInTime}}</span></li>
        <li>出场时间: <span>{{i.parkOutTime}}</span></li>
        <li>停车时长: <span>{{i.parkDuration}}</span></li>
        <li>费用: <span>{{(i.totalFee/100).toFixed(2)}}</span></li>
      </ul>
    </div>


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

  </div>
</template>

<script>
import { parkRecordList } from "@/api/parkRecord/parkRecord.js";
export default {
  name: "parkRecord",
  data() {
    return {
      recordList: []
    };
  },
  created() {
    this.parkRecordList();
  },
  methods: {
    parkRecordList() {
      let jsondata = {
        pageNum: 1,
        pageSize: 10,
        parkState: 20,
        terminalSource: 3
      };
      jsondata.sign = this.$utils.signObject(jsondata);
      parkRecordList(jsondata).then(response => {
        console.log(response);
        this.recordList = data.data.dataList;
      });
    }
  }
};
</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>
