<template>
  <div class='sidebar'>
    <div class="sidebar-title">招投标</div>
    <el-col :span="12">
      <el-menu :default-active="this.$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
        router>
        <el-menu-item index="/notice/all/">
          <i class="el-icon-menu"></i>
          <span slot="title">全部公告</span>
        </el-menu-item>
        <el-menu-item index="/notice/inquiry/">
          <i class="el-icon-menu"></i>
          <span slot="title">询价公告</span>
        </el-menu-item>
        <el-menu-item index="/notice/bid/">
          <i class="el-icon-menu"></i>
          <span slot="title">招标公告</span>
        </el-menu-item>
        <el-menu-item index="/notice/cadidate/">
         <i class="el-icon-menu"></i>
          <span slot="title">中标候选人公示</span>
        </el-menu-item>
        <el-menu-item index="/notice/biding/">
          <i class="el-icon-menu"></i>
          <span slot="title">中标公告</span>
        </el-menu-item>
        <el-menu-item index="/notice/change/">
          <i class="el-icon-menu"></i>
          <span slot="title">变更公告</span>
        </el-menu-item> 
        <el-menu-item index="/notice/clarifies/">
          <i class="el-icon-menu"></i>
          <span slot="title">补遗答疑</span>
        </el-menu-item> 
        <el-menu-item index="/notice/abortive/">
          <i class="el-icon-menu"></i>
          <span slot="title">流标公告</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </div>
</template>

<script>
  export default {
    data() {
      return {

      }
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      getindex() {
        let path = this.$route.path;
        switch (path) {
          case '/':
            this.activeIndex = '0'
            break
          case '/notice/inquiry/':
            this.activeIndex = "1";
            break;
          case "/notice/bid/":
            this.activeIndex = "2";
            break;
          case "/notice/candidate/":
            this.activeIndex = "3";
            break;
          case "/notice/biding/":
            this.activeIndex = "4";
            break;
        }
      }
    },
  }
</script>

<style scoped>
.el-menu-item{
  cursor: pointer;
}
  .sidebar {
    width: 2.4rem;
    border: 1px solid rgba(219, 219, 219, 1);
  }

  .el-menu {
    border-right: none;
  }

  .sidebar>.sidebar-title {
    width: 2.4rem;
    height: .60rem;
    line-height: .6rem;
    background: rgba(245, 246, 247, 1);
    text-align: center;
    font-size: .20rem;
    color: rgba(0, 0, 0, 1);
    font-weight: bold;
  }

  .el-col-12 {
    width: 100%;
  }
  .el-menu-item.is-active {
    /* background: #FF5203; */
    color:#FF5203
  }
</style>
