<template>
  <div id="menus">
    <el-menu :default-active="thisRouter()" class="el-menu-vertical-demo" :router="false" :default-openeds="defalutMenu" @select="to">
      <!-- <el-submenu index="4">
        <template v-slot:title>
          <i class="el-icon-office-building"></i>
          <span>测试</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/list-normal">列表1</el-menu-item>
          <el-menu-item index="/list-tab">列表2</el-menu-item>
          <el-menu-item index="/test-detail">详情</el-menu-item>
        </el-menu-item-group>
      </el-submenu> -->
      <el-menu-item index="/"> <i class="el-icon-s-grid"></i>首页 </el-menu-item>
      <el-submenu index="1">
        <template v-slot:title>
          <i class="el-icon-files"></i>
          <span>校园招聘</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/jobs/school/index">入驻学校</el-menu-item>
          <el-menu-item index="/jobs/profile/index">招聘简章</el-menu-item>
          <el-menu-item index="/manager/jobs/index">职位管理</el-menu-item>
          <el-menu-item index="/jobs/talk/index">宣讲会</el-menu-item>
          <el-menu-item index="/jobs/jobfair/index">招聘会</el-menu-item>
          <el-menu-item index="/jobs/jobinfo/index">在线招聘</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template v-slot:title>
          <i class="el-icon-document-copy"></i>
          <span>招聘管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/manager/resume/index">简历管理</el-menu-item>
          <!-- <el-menu-item index="/manager/invite/index">人才邀约</el-menu-item>
          <el-menu-item index="/manager/record/index">邀约记录</el-menu-item> -->
          <!-- <el-menu-item index="/manager/deliver/index">最近投递</el-menu-item> -->
          <!-- <el-menu-item index="/manager/plan/index">面试安排</el-menu-item> -->
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template v-slot:title>
          <i class="el-icon-office-building"></i>
          <span>公司信息</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/info/base/index">基本资料</el-menu-item>
          <el-menu-item index="/info/hr/index">HR成员</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: 'menus',
  props: {},
  components: {},
  data: () => ({
    defalutMenu: ['1', '2', '3'],
    defalutPage: '',
  }),
  created() {},
  computed: {},
  methods: {
    thisRouter() {
      return this.$route.path;
    },
    to(index) {
      if (this.$isBindWx()) {
        this.$router.push({ path: index });
      }
    },
  },
};
</script>

<style lang="less" scoped></style>
