<template>
  <component :is="parentObj.activeName"/>
</template>

<script>
import ClassStrengthenDetailsList from './components/ClassStrengthenDetailsList'
import List from './components/list'
import StudentStrengthenDetailsList from './components/StudentStrengthenDetailsList'
import AllStrengthenDetailsList from './components/AllStrengthenDetailsList'
export default {
  components: {
    List,
    ClassStrengthenDetailsList,
    StudentStrengthenDetailsList,
    AllStrengthenDetailsList
  },
  data() {
    return {
      parentObj: {
        activeName: 'AllStrengthenDetailsList',
        CLASS_ID: '',
        ENTERPRISE_ID: '',
        CORPINFO_ID: ''
      }
    }
  },
  methods: {
    setCLASS_ID(CLASS_ID) {
      this.parentObj.CLASS_ID = CLASS_ID
    },
    setENTERPRISE_ID(ENTERPRISE_ID) {
      this.parentObj.ENTERPRISE_ID = ENTERPRISE_ID
    },
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    setCORPINFO_ID(CORPINFO_ID) {
      this.parentObj.CORPINFO_ID = CORPINFO_ID
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setCLASS_ID: this.setCLASS_ID,
      setENTERPRISE_ID: this.setENTERPRISE_ID,
      setActiveName: this.setActiveName,
      setCORPINFO_ID: this.setCORPINFO_ID
    }
  }
}
</script>

<style scoped>

</style>
