<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="班组管理" name="first">
        <group-index ref="group"></group-index>
      </el-tab-pane>
      <el-tab-pane label="车辆管理" name="second">
        <vehicle-index ref="vehicle"></vehicle-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import groupIndex from './group/index';
import vehicleIndex from './vehicle/index';
export default {
  name: 'Index',
  components: {
    groupIndex,
    vehicleIndex,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  mounted() {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
      if (tab.paneName == 'second') {
        this.$refs['menu'].showEdit();
      } else if (tab.paneName == 'first') {
        this.$refs['config'].showEdit();
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.manage-container {
  width: 100%;
  .el-form-item {
    width: 360px;
  }
}
</style>
