<template>
  <div>
    <List v-show="activeName=='List'" ref="list" />
    <Edit v-if="activeName=='Edit'" />
    <Add v-if="activeName=='Add'" />
    <ViewData v-if="activeName=='ViewData'" />
  </div>
</template>

<script>
import List from './components/list'
import Edit from './components/edit'
import Add from './components/add'
import ViewData from './components/view'
export default {
  components: {
    List: List,
    Edit: Edit,
    Add: Add,
    ViewData: ViewData
  },
  data() {
    return {
      activeName: 'List',
      USER_ID: '',
      CORPINFO_ID: ''
    }
  },
  watch: {
    activeName(val) {
      if (val == 'List') {
        this.$refs.list.getList()
      }
    }
  }
}
</script>

<style scoped>

</style>
