<template>
  <div>
    <FireControlRoom v-if="parentObj.activeName === 'FireControlRoom'"/>
    <FirePumpRoom v-if="parentObj.activeName === 'FirePumpRoom'"/>
    <FireResources v-if="parentObj.activeName === 'FireResources'"/>
    <List v-show="parentObj.activeName === 'List'"/>
  </div>
</template>
<script>
import List from './components/list'
import FirePumpRoom from './components/firePumpRoom'
import FireResources from './components/fireResources.vue'
import FireControlRoom from './components/fireControlRoom.vue'
export default {
  components: {
    List, FirePumpRoom, FireResources, FireControlRoom
  },
  data() {
    return {
      parentObj: {
        activeName: 'List',
        CORPINFO_ID: ''
      },
      info: {}
    }
  },
  methods: {
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    getInfo() {
      return this.info
    },
    setInfo(e) {
      this.info = e
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setActiveName: this.setActiveName,
      getInfo: this.getInfo,
      setInfo: this.setInfo
    }
  }
}
</script>

<style scoped>

</style>
