<template>
  <div>
    <el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="用户列表" name="roleList">
        <user-manage-list :dataObj='dataObj' @status='isShow' @item='listObj'></user-manage-list>
      </el-tab-pane>
     <!-- <el-tab-pane label="新增用户" name="addrole">
        <user-manage-add @status='isShow' :dataObj='childObj'></user-manage-add>
      </el-tab-pane>-->
    </el-tabs>
  </div>
</template>

<script>
  import userManageList from './userManageList.vue'
  import userManageAdd from './userManageAdd.vue'

  export default {
    components: {
      userManageList: userManageList,
      userManageAdd: userManageAdd,
    },
    data() {
      return {
        activeName: 'roleList',
        editDialog: false,
        dataObj: {
          isShow: ''
        },
        childObj: {}
      };
    },
    mounted() {

    },
    methods: {
      handleClick(tab, event) {
        if (tab.name == 'addrole') {
          this.dialogTitle = '新增'
//        this.roleForm = Object.assign({}, this.formBackup)
        } else {
//					this.getroleOrgList()
        }
      },
      isShow(val) {
        if (!val) {
          this.activeName = 'roleList'
          this.dataObj.isShow = false
          this.dataObj.isShow = true
        } else {
          this.activeName = 'addrole'
        }
      },
      listObj(val) {
        this.childObj = val
      }
    }
  };
</script>

<style scoped="scoped">
  .my-tabs {
    margin-top: 10px;
  }
</style>
