<template>
  <div>
    <div >
      <!-- 客户列表页 -->
      <company-list  v-if="showType==='company'"
                     @goTaskList="showTaskList"/>
    </div>
    <div >
      <!-- 客户信息页 -->
      <company-task-list v-if="showType==='taskList'"
                          :taskInfo="taskInfo"
                         @goCheckCheck="showCheckCheck"
                          @goCompany="showCompany"/>
      <!-- 稽核详情 -->
<!--      <company-check-detail v-if="showType==='checkdetail'"
                            :taskInfo="taskInfo"
                            @goCheckCheck="showCheckCheck"
                            @goTaskList="showTaskList"/>-->
      <!--  稽核资料 -->
      <company-check-check v-if="showType==='checkcheck'"
                           :taskInfo="taskInfo"
                           @goTaskList="showTaskList"/>
    </div>
  </div>
</template>
<script>
  import CompanyList from "@views/company/CompanyList";
  import CompanyTaskList from "@views/company/CompanyTaskList";
  import CompanyCheckDetail from "@views/company/CompanyCheckDetail";
  import CompanyCheckCheck from "@views/company/CompanyCheckCheck";
  export default {
    name: 'CompanyMain',
    components: {
      CompanyList,
      CompanyTaskList,
      CompanyCheckDetail,
      CompanyCheckCheck
    },
    data () {
      return {
        description: '行短稽核客户',
        showType: 'company',
        taskInfo: {},
        checkInfo: {},
      }
    },
    methods:{
      showCompany(){
        this.showType="company";
      },
      showTaskList(taskInfo){
        this.showType = 'taskList';
        this.taskInfo = taskInfo;
      },
      showCheckDetail(taskInfo){
        this.showType = 'checkdetail'
        this.taskInfo = taskInfo;
      },
      showCheckCheck(taskInfo){
        this.showType = 'checkcheck';
        this.taskInfo = taskInfo;
      }
    }
  }
</script>