<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="待办工单" name="first">
        <stay-order ref="stay"></stay-order>
      </el-tab-pane>
      <el-tab-pane label="办结工单" name="second">
        <junction-order ref="junction"></junction-order>
      </el-tab-pane>
      <el-tab-pane label="逾期工单" name="third">
        <overdue-order ref="overdue"></overdue-order>
      </el-tab-pane>
      <el-tab-pane label="我的工单" name="fourth">
        <my-order ref="my"></my-order>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import stayOrder from './stay/index';
import junctionOrder from './junction/index';
import overdueOrder from './overdue/index';
import myOrder from './my/index';
export default {
  name: 'Index',
  components: {
    stayOrder,
    junctionOrder,
    overdueOrder,
    myOrder,
  },
  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>
