yangfeng
2023-09-15 b823a11d74b6623fadcfab27150cdbb0ad9766f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!--导航组件-->
<template>
  <div class="app-sidebar">
    <div class="box">
      <div class="logo-view">
        <el-image :src="require('@/assets/logo.png')"></el-image>
      </div>
      <el-menu
        router
        unique-opened
        :default-active="$route.path"
        class="el-menu-vertical-demo"
        @select="handleOpen"
        @close="handleClose"
        background-color="#314255"
        text-color="#bfcbd9"
        active-text-color="#fff"
      >
        <el-menu-item index="/overview">
          <template slot="title">
            <i class="el-icon-bank-card icon"></i>
            <span>概述</span>
          </template>
          <!-- <el-menu-item index="/supplierManage/supplier">供应商</el-menu-item> -->
        </el-menu-item>
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-s-grid icon"></i>
            <span>产品</span>
          </template>
          <el-menu-item index="/productManage/product">产品</el-menu-item>
          <el-menu-item index="/productManage/productCategory">产品类别</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-setting icon"></i>
            <span>操作</span>
          </template>
          <!-- <el-menu-item index="/productManage/product">补货</el-menu-item>
          <el-menu-item index="/productManage/product">库存调整</el-menu-item> -->
          <el-menu-item index="/operate/allot">调拨</el-menu-item>
          <el-menu-item index="/operate/scrap">报废</el-menu-item>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">
            <i class="el-icon-box icon"></i>
            <span>仓库管理</span>
          </template>
          <el-menu-item index="/productManage/product">仓库</el-menu-item>
          <el-menu-item index="/productManage/product">位置</el-menu-item>
          <el-menu-item index="/productManage/product">业务类型</el-menu-item>
          <!-- <el-menu-item index="/productManage/product">上架规则</el-menu-item> -->
        </el-submenu>
      </el-menu>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "AppSidebar",
  props: {},
  data() {
    return {}
  },
  watch: {},
  created() {
    this.initNavMenu()
  },
  methods: {
    // 监听路由
    initNavMenu() {
      // console.log(this.$route.name)
    },
    handleOpen(index) {
      console.log(index)
    },
    handleClose() {}
  }
}
</script>
 
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import "./index.scss";
</style>