<template>
  <div class="process">
    <el-timeline :reverse="true">
      <el-timeline-item v-for="(activity, index) in processList"
                        :key="index">
        <el-card>
          <div>{{activity.realName}}</div>
          <div>{{activity.createTime}}</div>
          <div>{{activity.event}}</div>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>
<script>
import { getMusicGroupProcess } from '@/api/buildTeam'
import dayjs from 'dayjs'
export default {
  props: ['activeId'],
  data () {
    return {
      processList: []
    }
  },
  mounted () {
    this.getProcess()
  },
  methods: {
    getProcess () {
      getMusicGroupProcess({
        musicGroupId: this.activeId
      }).then(res => {
        if (res.code == 200) {
          this.processList = res.data;
        }
      })
    }
  },
  watch: {
    activeId (val) {
      if (val) {
        this.getProcess()
      }

    }
  }
}
</script>
<style lang="scss" scoped>
.process {
  padding: 10px;
  max-height: 600px;
  overflow-y: auto;
}
</style>