<template>
  <div class="m-core">
    <div class="tableWrap">
      <el-table
        style="width: 100%"
        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
        :data="processList"
      >
        <el-table-column
          align="center"
          prop="userId"
          label="操作人"
          width="150px"
        >
          <template slot-scope="scope">
            <copy-text>{{ scope.row.realName }}</copy-text>
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          prop="userId"
          label="操作时间"
          width="180px"
        >
          <template slot-scope="scope">
         {{ scope.row.createTime }}
          </template>
        </el-table-column>
               <el-table-column

          prop="userId"
          label="操作内容"

        >
          <template slot-scope="scope">

           {{ scope.row.event }}
           <span style="color:red">{{getMemo(scope.row)}}</span>
          </template>
        </el-table-column>
      </el-table>
      <!--      sync -->
      <!-- <pagination
        :total.sync="pageInfo.total"
        :page.sync="pageInfo.page"
        :limit.sync="pageInfo.limit"
        :page-sizes="pageInfo.page_size"
        @pagination="getList"
      /> -->
    </div>
  </div>
</template>
<script>
import { getMusicGroupProcess } from '@/api/buildTeam'
export default {
  data() {
    return {
      processList: [],
      pageInfo: {
        // 分页规则
        limit: 10, // 限制显示条数
        page: 1, // 当前页
        total: 0, // 总条数
        page_size: [10, 20, 40, 50], // 选择限制显示条数
      },
      teamid:''
    };
  },
  mounted(){
      this.teamid = this.$route.query.id;
      this.getProcess()
  },
  methods:{
    getProcess () {
      getMusicGroupProcess({
        musicGroupId: this.teamid
      }).then(res => {
        if (res.code == 200) {
          this.processList = res.data;
        }
      })
    },
    getMemo(row){
      if(row.memo && !row.memo.includes("{")){
        return row.memo
      }else{
        return ''
      }
    }
  }
};
</script>
