<template>
  <div class="box boxMinHeight">
    <el-tabs v-model="name">
      <el-tab-pane :label="item.label" :name="item.name" v-for="(item,index) in tabs" :key="index">
        <EmployeeTable v-if="item.name=='EmployeeTable'" ref="EmployeeTable" ></EmployeeTable>
        <Post v-if="item.name=='Post'" ref="Post" ></Post>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import EmployeeTable from '@/components/organization/EmployeeTable';
import Post from '@/components/organization/Post';
export default {
  name:'system',
  components:{EmployeeTable,Post},
  data() {
    return {
      name:'EmployeeTable',
      tabs:[{ label: '组织架构', name: 'EmployeeTable'},{ label: '岗位职责', name: 'Post'}]
    };
  },
  beforeDestroy() {
     this.$store.dispatch('get_employee_map_all',true).then((res) => {}) // 获取部门树型结构列表
  }
};
</script>

<style  scoped>
.box {
  padding: 20px;
  font-size: 14px;
  background-color: #fff;
}
</style>
