<template>
    <!--    保理专员任务台：供应商信息维护列表  -->
    <el-dialog :before-close="close" :visible.sync="visible" :title="$t('traceMgr.needMaintainContactsTable')" :width="'70%'" :close-on-click-modal="true"  center>
        <!--    <component :is="currentComponentName" :ref="currentComponentName" :readonly="!needComplete"></component>-->
            <data-table :menuCode="menuId" :loadPage="loadPage" :border="true"  :stripe="true"
                        :menuFlag="true"
                        :api="api" :handleFlag.sync="handleFlag"
                        :queryParas="queryParas" :sourceData.sync="sourceData"
                        :loadCount.sync="loadCount" :columns="columns" :operateBtnLayout="operateBtnLayout">
                <template slot="headButton">
                    <el-row>
                        <el-col :span="24">
                            <el-col   class="text_left" :span="19">
                                <span  class="el-dialog__title">{{$t('traceMgr.contactsInfoTable')}}</span>
                            </el-col>
<!--                            <el-col :span="5">-->
<!--                                <div class="textRight">-->
<!-- <btn-batch-download :fileID="['2001031119322940001,2002281715317860001,2002281715317860001,2002281715317860001,2002281715317860001']" type="primary" size="small" :title="'批量下载'" downloadButtonMsg="批量下载" :classType="true"></btn-batch-download></div>-->
<!--                            </el-col>-->
                        </el-col>
                    </el-row>
                    <el-row>
                               <span>
              <el-divider class="el-divider--horizontal"></el-divider>
            </span>
                    </el-row>
                </template>
                <el-table-column  align="center">
                    <template slot-scope="scope">
                        <el-tooltip  class="item" effect="dark"  :content="$t('common.edit')" placement="top">
                            <el-button  class="iconfont iconbianji" circle   @click="edit(scope.row,scope)" size="mini"></el-button>
                        </el-tooltip>
                    </template>
                </el-table-column>
            </data-table>
        <div slot="footer" class="dialog-footer">
            <el-button @click="close" size="medium" type="button">{{$t('common.close')}}</el-button>
        </div>
    </el-dialog>
</template>
<script>
import { DataTable, btnBatchDownload } from 'newepoch-components'
import mixin from '@/pages/mixin'
import BaseEditPage from '@/pages/baseEditPage'
export default {
  extends: new BaseEditPage('taskDialog'),
  mixins: [mixin],
  components: {
    btnBatchDownload,
    BaseEditPage,
    DataTable
  },
  props: {
    visible: {
      type: Boolean
    },
    form: {
      type: Object
    },
    editModel: {
      type: String
    },
    // 想要正常弹窗请传这个方法给此组件
    // close () {
    //     this.visible = !this.visible
    // }
    close: {
      type: Function
    }
  },
  data () {
    return {
      loadPage: 'taskDialog',
      handleFlag: true,
      loadCount: 0,
      queryParas: {
        pageIndex: 1,
        pageSize: 10
      },
      operateBtnLayout: '',
      sourceData: [],
      columns: [
        {
          prop: 'contactsName',
          align: 'center',
          width: '150px',
          showOverflowTooltip: true,
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.contactsName
        }, {
          prop: 'contactsPhone',
          align: 'center',
          width: '150px',
          showOverflowTooltip: true,
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.contactsPhone
        },
        {
          prop: 'supplierName',
          align: 'center',
          showOverflowTooltip: true,
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.supplierName
        },
        {
          prop: 'status',
          align: 'center',
          showOverflowTooltip: true,
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.status
        },
        {
          prop: 'taskStartTime',
          align: 'center',
          showOverflowTooltip: true,
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.taskStartTime
        },
        {
          prop: 'taskEndTime',
          align: 'center',
          showOverflowTooltip: true,
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].traceMgr.taskEndTime
        }
      ],
      currentProcessParas: {},
      currentComponentName: null
    }
  },
  computed: {
    api () {
      // return authcenterApi['baseInfoHistory']
      return null
    }
  },
  created: function () {
    this.handleFilter()
  },
  methods: {
    edit: function () {
      // alert('修改正在做~~~~')
    },
    batchDownload: function () {
      // alert('批量下载正在做~~~~')
    }
  }
}
</script>
<style scoped lang="scss">
    @import '~@/styles/tracemgr/factoringCommissioner/taskTable/supplemenMaintain/taskDialog.scss';
</style>
