

<template>
  <!-- 我的足迹 -->
  <el-card>
    <div class="main_title">
      <div class="title_txt">我的足迹</div>
      <div class="timePiker">
        <el-date-picker v-model="date" value-format="YYYY-MM-DD" type="date" @change="getListData" placeholder="选择日期"></el-date-picker>
      </div>
    </div>
    <div class="timeLine_warp">

      <div class="range_footprint">
        <div class="timeLine_list" v-for="(item,index) in listData" :key="index">
          <div class="timeLine_date">{{item.date.date_char}} {{item.date.week}}</div>
          <div class="timeLine_con">
            <div class="leftDash"></div>
            <div class="footPrint_listWarp">
              <div class="v_ifelse" v-if="item.foot.length>0">
                <div class="single_foot" v-for="(d,index) in item.foot" :key="index">
                  <div class="single_foot_icon">
                    <img src="" alt="">
                  </div>
                  <div class="single_foot_txt">{{d.data_format.desc}}</div>
                  <div class="single_foot_time">{{d.data_format.time}}</div>
                </div>
              </div>

              <div class="no_footprint" v-else>暂无足迹数据</div>
            </div>
          </div>
        </div>

      </div>
    </div>
  </el-card>
</template>

<script>

import { zj_list } from "./api";
export default {
  data() {
    return {
      listData: [],
      date: ""
    };
  },

  methods: {
    //返回
    goBack() {
      this.history.go(-1);
    },
    getListData() {
      let data = {
        // date_start: this.date_start,
        // date_end: this.date_end,
        date: this.date
      };

      zj_list(data).then((res) => {
        this.listData = res.data;

        console.log(this.listData, 123);

      });
    },

  },

  mounted() {
    this.getListData();
  },
}
</script>

<style lang="scss" scoped>
::v-deep .timePiker .el-input__inner {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 8px 0px rgb(0 0 0 / 8%);
  border-radius: 27px;
}
.main_title {
  height: 50px;
  line-height: 50px;
  overflow: hidden;
  margin: 20px 0;
}
.title_txt {
  width: 50%;
  display: inline-block;
  float: left;
  font-size: 22px;
  font-weight: 400;
  color: rgba(0, 0, 0, 1);
}
.timePiker {
  width: 266px;
  display: inline-block;
  float: right;
}
.timePiker .el-input__inner {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
  border-radius: 27px;
}
.timePiker div {
  width: 100% !important;
}
.el-input__inner::-webkit-input-placeholder {
  /*Webkit browsers*/
  color: #999;
  font-size: 14px;
}
.el-input__inner:-moz-placeholder {
  /*Mozilla Firefox 4 to 8*/
  color: #999;
  font-size: 14px;
}
.el-input__inner::moz-placeholder {
  /*Mozilla Firefox 19+*/
  color: #999;
  font-size: 14px;
}
.el-input__inner:-ms-input-placeholder {
  /*Internet Explorer 10+*/
  color: #999;
  font-size: 14px;
}
.timeLine_warp {
  width: 100%;
}
.timeLine_list {
  margin-top: 12px;
}
.timeLine_date {
  display: inline-block;
  height: 30px;
  line-height: 30px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding: 0 10px;
}
.timeLine_con {
  width: 100%;
  overflow: hidden;
}
.timeLine_con {
  margin-top: 13px;
}
.timeLine_con .leftDash {
  width: 22px;
  height: 142px;
  float: left;
}
.timeLine_con .footPrint_listWarp {
  width: 1177px;
  height: 100%;
  display: inline-block;
  float: left;
  border-left: 1px dashed #b3b3b3;
  box-sizing: border-box;
  padding: 6px 0 0 24px;
}
.single_foot {
  width: 280px;
  height: 44px;
  line-height: 44px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  box-sizing: border-box;
  margin-right: 10px;
  display: inline-block;
  margin-top: 8px;
  overflow: hidden;
}
.single_foot:nth-child(4n) {
  margin-right: 0;
}
.single_foot_icon {
  width: 15%;
  display: inline-block;
  text-align: center;
  float: left;
}
.single_foot_icon img {
  width: 22px;
  display: inline;
  text-align: center;
  vertical-align: middle;
}
.single_foot_txt {
  width: 55%;
  height: 44px;
  line-height: 44px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 0, 0, 1);
  display: inline-block;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  white-space: nowrap;
  float: left;
}
.single_foot_time {
  width: 20%;
  height: 44px;
  line-height: 44px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  display: inline-block;
  float: left;
}
.expandMore {
  height: 17px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 125, 255, 1);
  line-height: 17px;
  margin-top: 18px;
  cursor: pointer;
}
.footprint_pagination {
  text-align: center;
  margin: 28px 0;
}
</style>
