<template>
  <el-timeline>
    <el-timeline-item
      v-for="(record, index) in trackRecordList"
      :key="index"
      :timestamp="record.operateDate">
      <div v-if="record.processesName == '0'">
        <div>气瓶充装</div>
        <div style="margin: 15px 0px">{{ record.messageInfo }}</div>
      </div>
      <div v-if="record.processesName == '1'">
        <div>气瓶配送</div>
        <div style="margin: 15px 0px">{{ record.messageInfo }}</div>
      </div>
      <div v-if="record.processesName == '2'">
        <div>气瓶回收</div>
        <div style="margin: 15px 0px">{{ record.messageInfo }}</div>
      </div>
    </el-timeline-item>
  </el-timeline>
</template>

<script>
  import { bottleTrackRecordList } from "@/api/gasBottleTrack/bottleTrackRecord";
  export default {
    name: "processes",
    props: {
        bottleId: {
          type:Number
        }
    },
    data(){
      return{
        trackRecordList: []
      }
    },
    created(){
      this.getTrackRecordInfo();
    },
    methods:{
      getTrackRecordInfo(){
        bottleTrackRecordList({bottleId : this.bottleId}).then(res =>{
          if(res.code == 200){
            this.trackRecordList = res.data;
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
