<template>
  <div class="nav">
    <!-- <el-button v-if="!isCollapse" icon="el-icon-arrow-left" circle @click="open"></el-button>
    <el-button v-if="isCollapse" icon="el-icon-arrow-right" circle @click="open"></el-button> -->
    <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
      <el-button  v-if="!isCollapse" :label="false" icon="el-icon-arrow-left"></el-button>
      <el-button  v-if="isCollapse" :label="true" icon="el-icon-arrow-right"></el-button>
    </el-radio-group>
    <el-menu
      default-active="1-4-1"
      :collapse="isCollapse"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      :router="true"
      :default-active="$route.path"
    >
      <el-menu-item index="/manage/query">
        <i class="el-icon-search"></i>
        <span slot="title">经营数据查询</span>
      </el-menu-item>

      <el-menu-item index="/manage/cost">
        <i>成本</i>
        <span slot="title">经营数据成本</span>
      </el-menu-item>
      <el-menu-item index="/manage/index">
        <i>收入</i>
        <span slot="title">经营数据收入</span>
      </el-menu-item>
      <el-menu-item index="/team/index">
        <i>部门</i>
        <span slot="title">部门管理</span>
      </el-menu-item>
      <el-menu-item index="/project/index">
        <span slot="title">项目管理</span>
      </el-menu-item>
      <el-menu-item index="/product/index">
        <span slot="title">产品管理</span>
      </el-menu-item>
      <el-menu-item index="/costType/index">
        <span slot="title">成本类型管理</span>
      </el-menu-item>
      <!--
        <el-menu-item index="/costTeam/index">
            <span slot="title">成本部门/单位/人管理</span>
        </el-menu-item>
      -->
    </el-menu>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isCollapse: true
    };
  },
  methods: {
    open() {
      this.isCollapse = !this.isCollapse;
    }
  }
};
</script>
<style>
.nav {
  transition: width 0.28s;
  width: 180px !important;
  height: 100%;
  position: fixed;
  font-size: 0px;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;
}
.el-menu {
  height: 100%;
}
</style>


