<template>
    <div>
        <el-tabs v-model="componentName" type="card" @tab-click="changeTab">
            <el-tab-pane :label="$t('traceMgr.serviceJob')" name="businessTaskList">
            </el-tab-pane>
            <el-tab-pane :label="$t('traceMgr.uploadPerformanceDoc')" name="uploadPerformanceFile">
            </el-tab-pane>
<!--            <el-tab-pane :label="$t('traceMgr.noticeOfSealAndUploadOfConfirmationDocuments')" name="three">-->
<!--                <taskDialog></taskDialog>-->
<!--            </el-tab-pane>-->
            <el-tab-pane :label="$t('traceMgr.originalMailing')" name="OriginalPost">
            </el-tab-pane>
            <el-tab-pane :label="$t('traceMgr.customerInformationMaintenance')" name="CustomerInfo">
            </el-tab-pane>
          <keep-alive>
            <component :is="componentName" :menuId="menuId" ref="taskComponent"></component>
          </keep-alive>
        </el-tabs>
    </div>
</template>

<script>
import BasePage from '@/pages/basePage'
import * as format from '@/filters/index'
import mixin from '@/pages/mixin'
import { DataTable, searchForm, upDownLayout } from 'newepoch-components'
import DatePicker from '@/components/element/DatePick.vue'
import tracemgrApi from '@/api/tracemgrApi'
import SelectFlag from '@/components/tracemgr/common/SelectFlag'
import SelectUsers from '@/components/element/SelectUsers'
import businessTaskList from './businessTaskList'
/* 履约文件上传任务办理页面 */
import uploadPerformanceFile from '@/components/tracemgr/regionalCommissioner/TaskTable/uploadPerformanceFile/taskDialog.vue'
/* 线上审核反馈处理 */
import onlineTaskDialog from '@/components/tracemgr/regionalCommissioner/TaskTable/onlineAudit/taskDialog.vue'
/* 项目公司资料补寄 */
import supplementFileInPool from '@/components/tracemgr/regionalCommissioner/TaskTable/supplemenFileInPool/taskDialog.vue'
/* 律所反馈 */
import lawFirmTaskDialog from '@/components/tracemgr/factoringCommissioner/taskTable/lawFirm/taskDialog.vue'
/* 原件补寄 */
import OriginalPost from '@/components/tracemgr/regionalCommissioner/TaskTable/originalSupplementaryMail/taskDialog'
/* 客户信息 */
import CustomerInfo from '@/components/tracemgr/regionalCommissioner/TaskTable/customerInfoMainte/taskDialog'
/* 确权文件通知 */
import taskDialog from '@/components/tracemgr/regionalCommissioner/TaskTable/confirmRightSealNotice/taskDialog'
/* 补出账审核任务 */
import supplementaryAccountAudit from '@/components/tracemgr/regionalCommissioner/TaskTable/supplementaryAccountAudit/taskDialog'
import supplementaryAccountInfo from '@/components/tracemgr/factoringCommissioner/taskTable/supplementaryAccountInfo/taskDialog'
import generateTheSituation from '@/components/tracemgr/regionalCommissioner/TaskTable/generateTheSituation/taskDialog.vue'
export default {
  extends: new BasePage(),
  name: 'regionalCommissionerTaskList',
  mixins: [mixin],
  components: {
    businessTaskList,
    searchForm,
    DatePicker,
    format,
    DataTable,
    lawFirmTaskDialog,
    taskDialog,
    CustomerInfo,
    OriginalPost,
    uploadPerformanceFile,
    upDownLayout,
    generateTheSituation,
    onlineTaskDialog,
    supplementFileInPool,
    tracemgrApi,
    SelectFlag,
    SelectUsers,
    supplementaryAccountAudit,
    supplementaryAccountInfo
  },
  data: function () {
    return {
      componentName: 'businessTaskList'
    }
  },
  methods: {
    initStyle: function () {
      this.$refs['taskComponent'].initLayout()
    },
    changeTab (tab, event) {
      this.$nextTick(function () {
        this.initStyle()
        this.$refs['taskComponent'].$refs['taskListUpDownLayout'].upHeight = this.$refs['taskComponent'].$refs['taskListUpDownLayout'].getHeight()
      })
    }
  },
  watch: {
    'componentName': function (val) {
      this.$refs['taskComponent'].initLayout()
    }
  }
}
</script>

<style lang="scss" scoped>
    @import './src/styles/tracemgr/regionalCommissioner/taskTable/taskList.scss';
</style>
