<template>
  <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
    <el-table :data="list">
      <el-table-column prop="CREATE_TIME" label="日期"/>
      <el-table-column prop="CREATOR_NAME" label="姓名"/>
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="goBack">取 消</el-button>
    </div>
  </el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'

export default {
  components: { Pagination },
  directives: { waves },
  data() {
    return {
      visible: false,
      list: [],
      loading: false,
      id: ''
    }
  },
  methods: {
    init(e) {
      this.visible = true
      this.id = e.BUS_TEXT_LIBRARY_ID
      this.getList()
    },
    goBack() {
      this.list = []
      this.visible = false
    },
    getList() {
      this.loading = true
      requestFN(
        '/textLibrary/getUpdateLog',
        {
          BUS_TEXT_LIBRARY_ID: this.id
        }
      ).then((data) => {
        this.loading = false
        this.list = data.list
      }).catch((e) => {
        this.loading = false
      })
    }
  }
}

</script>
