<template>
  <div>
    <saleClue v-if="salClueShow" @changeApplication="onChange"></saleClue>
    <projectChange v-if="projectChangeShow" @changeApplication="onChange"></projectChange>
    <quotedPrice v-if="quotedPriceShow" @changeApplication="onChange"></quotedPrice>
    <contract v-if="contractShow" @changeApplication="onChange"></contract>
    <customer v-if="customerShow" @changeApplication="onChange"></customer>
  </div>
</template>

<script>
import saleClue from '@/HManagement/ecycle/saleClue/index'
import projectChange from './projectChange/index'
import quotedPrice from './quotedPrice/index'
import contract from './contract/index'
import customer from './customer/index'
export default {
  name: "index",
  components:{saleClue,projectChange,quotedPrice,contract,customer},
  data(){
    return {
      salClueShow:true,
      projectChangeShow:false,
      quotedPriceShow:false,
      contractShow:false,
      customerShow:false
    }
  },
  methods:{
    onChange(val){
      console.log(this.projectChangeShow,this.salClueShow)
      if (val === '1'){
        this.salClueShow = true
        this.projectChangeShow = false
        this.quotedPriceShow = false
        this.contractShow = false
        this.customerShow = false
      }else if (val === '2') {
        this.customerShow = true
        this.salClueShow = false
        this.projectChangeShow = false
        this.quotedPriceShow = false
        this.contractShow = false
      }else if (val === '3'){
        this.contractShow = true
        this.quotedPriceShow = false
        this.salClueShow = false
        this.projectChangeShow = false
        this.customerShow = false
      }else if (val === '4'){
        this.projectChangeShow = true
        this.quotedPriceShow = false
        this.salClueShow = false
        this.contractShow = false
        this.customerShow = false
      }else if (val === '5'){
        this.quotedPriceShow = true
        this.customerShow = false
        this.contractShow = false
        this.salClueShow = false
        this.projectChangeShow = false
      }
      console.log(this.projectChangeShow,this.salClueShow)
    }
  }
}
</script>

<style scoped>

</style>