<template>
  <div class="app-container">
    <table-list
      :data="tableData2"
      :columns="listConfig"
      :current-page="currentPage"
      :page-size="pageSize"
      :total-records="totalRecords"
      @currentChange="pageHandle"
      @sizeChange="sizeChange"
    />
  </div>
</template>

<script>
import baseTable from '_m/baseTable.js'
export default {
  name: 'sale',
  components: {
  },
  provide() {
    return {
      parentData: this
    }
  },
  mixins: [baseTable],
  data() {
    return {
      apiStr: 'house.admestatebrokeragelog',
      searchForm: {},
      isDtlShow: false,
      // noCreated: true,
      curObj: {},
      cTitle: '',
    }
  },
  computed: {
    tableData2() {
      const arr = [...this.tableData]
      arr.map(item => {
        item.cTitle = this.cTitle
        item.createBy = item.create_user.nickname
      })
      return arr
    }
  },
  created() {
    const query = this.$route.query
    this.searchForm.estate_id = query.id || ''
    this.cTitle = query.t || ''
    console.log(this.cTitle)
  },
  mounted() {
    this.listConfig = {
      rows: [
        { label: '楼盘', prop: 'cTitle'},
        { label: '佣金', prop: 'brokerage', minWidth: 300},
        { label: '更新人', prop: 'createBy' },
        { label: '更新时间', prop: 'create_at' },
        // { label: '操作', width: 120, type: 'handle2', operations:
        //   [
        //     // { label: '编辑', func: this.openPopup, btnType: 'primary' },
        //     // { label: '删除', func: this.delHandle, btnType: 'danger' },
        //   ]
        // }
      ]
    }
  },
  methods: {
  }
}
</script>
