<template>
  <div>
    <el-drawer
      :show-close="false"
      :title="curObj.nickname + '的助力人'"
      :wrapper-closable="false"
      :close-on-press-escape="false"
      :visible.sync="isShow"
      size="960px"
      custom-class="xl-drawer"
      direction="rtl"
    >
      <table-list
        :list-loading="listLoading"
        :data="tableData"
        :columns="listConfig"
        :current-page="currentPage"
        :page-size="-1"
      />
      <div class="xl-form">
        <div class="xl-form-footer fixed" style="width:960px;padding-top: 20px;border-top: 1px solid #dcdcdc;right:0;">
          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
        </div>
      </div>
    </el-drawer>
  </div>
</template>
<script>
import baseTable from '_m/baseTable.js'
export default {
  components: {
  },
  mixins: [baseTable],
  props: {
    isShow: Boolean,
    curObj: Object
  },
  inject: ['parentData'],
  data() {
    return {
      apiStr: 'other.admactivitybuyingjoinlist',
      searchForm: {},
      noCreated: true,
      isLEShow: false,
      cObj: {},
    }
  },
  computed: {
    tableData2() {
      const arr = [...this.tableData]
      arr.map(item => {
      })
      return arr
    }
  },
  mounted() {
    this.listConfig = {
      rows: [
        { label: '助力人', prop: 'avatar', type: 'img' },
        { label: '昵称', prop: 'nickname'},
        { label: '手机号', prop: 'phone' },
        { label: '助力时间', prop: 'create_at' },
        // { label: '操作', width: 120, type: 'handle2', operations:
        //   [
        //     // { label: '编辑', func: this.openLEPopup, btnType: 'primary' },
        //     // { label: '删除', func: this.delHandle, btnType: 'danger' },
        //   ]
        // }
      ]
    }
  },
  watch: {
    isShow: function(val) {
      if (val) {
        this.$api.other.admactivitybuyingjoinlist({hash: this.curObj.hash}).then(res => {
          this.tableData = res || []
        })
      }
    },
  },
  methods: {
    // delHandle(row) {
    //   this.$msg(`您确定要删除该楼盘吗？`, 'confirm', () => {
    //     this.$api.house.admpricedel({
    //       id: row.id,
    //     }).then(data => {
    //       this.$msgs(`已删除！`)
    //       this.fetchData()
    //     })
    //   }, null, true)
    // },
    close(str) {
      this.$emit('close')
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
