<template>
  <div >
    <el-timeline>
      <el-timeline-item
        v-for="(activity, index) in activities"
        :key="index"
        :color="color"
        :timestamp="activity.timestamp"
        placement="top">
        <span style="color: rgba(0, 0, 0, 0.85);font-size: 18px;font-family: PingFangSC-Medium;">{{activity.auditPerson}}</span>
        <span :style="(activity.status==='1'||activity.status==='3')?passStyle:refuseStyle">{{audit(activity.status)}}</span>
        <el-input style="margin-top: 10px" type="textarea" v-model="activity.content" disabled :autosize="{minRows:5,maxRows:10}"></el-input>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
export default {
  name: "auditRecord",
  props: {
    activities: {
      type: Array,
      default:null,
    },
  },
  data() {
    return {
      statusList:[
        {key:"一级审核通过",value:"1"},
        {key:"一级审核驳回",value:"2"},
        {key:"二级审核通过",value:"3"},
        {key:"二级审核驳回",value:"4"}
      ],
      color:"#0bbd87",
      passStyle:"float: right;color: rgba(65, 155, 7, 1);font-size: 18px;font-family: PingFangSC-Medium;",
      refuseStyle:"float: right;color: rgba(231, 74, 74, 1);font-size: 18px;font-family: PingFangSC-Medium;",
      dialogVisible: false
    };
  },
  methods:{
    audit(val){
      this.statusList.map((item)=>{
        if(item.value===val){
           val = item.key
        }
      })
      return val
    }
  }
}
</script>

<style scoped>

</style>
