<template>
  <div>
    <div v-if="list.length === 0">
      <el-empty description="暂无记录"></el-empty>
    </div>
    <div v-else style="height:calc(100vh - 250px);overflow-y:scroll">
      <el-timeline>
        <el-timeline-item
          v-for="(activity, index) in list"
          :key="index"
          :timestamp="activity.actiondate">
          {{activity.actionby}}&nbsp;-&nbsp;{{activity.action}}&nbsp;-&nbsp;{{activity.remarks}}
        </el-timeline-item>
      </el-timeline>
    </div>
  </div>
</template>

<script>
export default {
  props:['ownertable','editData','idname'],
  data () {
    return {
      list:[]
    }
  },
  methods:{
    async queryLogData () {
      const res = await this.$api.requested({
        "id": 20221114125401,
        "content": { 
          "pageNumber": 1,
          "pageSize": 100,
          "ownertable":this.ownertable,
          "ownerid":this.$route.query.id?this.$route.query.id:this.editData[this.idname]
        }
      })
      this.list = res.data
    }
  },
  mounted () {
    this.queryLogData()
  }
}

</script>
<style>
</style>