| | |
| | | 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"> |
| | | |
| | | <el-submenu v-for="item in menus" :key="item.id" :index="item.id"> |
| | | <template slot="title"> |
| | | <i class="el-icon-s-grid icon"></i> |
| | | <span>产品</span> |
| | | <span>{{ item.title }}</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="/operate/inventoryAdjustment">库存调整</el-menu-item> |
| | | <el-menu-item index="/operate/allot">库存调拨</el-menu-item> |
| | | <el-menu-item index="/operate/scrap">库存报废</el-menu-item> |
| | | <el-menu-item index="/operate/orderPoint">补货</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="/warehouseManage/warehouse">仓库</el-menu-item> |
| | | <el-menu-item index="/warehouseManage/position">位置</el-menu-item> |
| | | <el-menu-item index="/warehouseManage/bussinessType">业务类型</el-menu-item> |
| | | <el-menu-item index="/warehouseManage/listingRules">上架规则</el-menu-item> |
| | | <el-menu-item index="/productManage/reorderRules">重订货规则</el-menu-item> |
| | | </el-submenu> |
| | | <el-submenu index="5"> |
| | | <template slot="title"> |
| | | <i class="el-icon-box icon"></i> |
| | | <span>报表</span> |
| | | </template> |
| | | <el-menu-item index="/reportForm/inventoryReport">库存报表</el-menu-item> |
| | | <el-menu-item index="/reportForm/locationReport">位置报表</el-menu-item> |
| | | <!-- <el-menu-item index="/warehouseManage/bussinessType">某日库存</el-menu-item> --> |
| | | <el-menu-item index="/reportForm/inboundOutboundDetail">入库明细报表</el-menu-item> |
| | | <el-menu-item index="/reportForm/outboundDetail">出库明细报表</el-menu-item> |
| | | <el-menu-item v-for="itm in item.children" :key="itm.id" :index="itm.path">{{ itm.title }}</el-menu-item> |
| | | |
| | | </el-submenu> |
| | | </el-menu> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getMenuTreeByRole} from "@/api/menus/index" |
| | | import { mapMutations } from 'vuex'; |
| | | export default { |
| | | name: "AppSidebar", |
| | | props: {}, |
| | | data() { |
| | | return {} |
| | | return { |
| | | menus:[] |
| | | } |
| | | }, |
| | | watch: {}, |
| | | created() { |
| | | this.initNavMenu() |
| | | this.getMenuTreeByRole() |
| | | }, |
| | | computed:{ |
| | | // ...mapState(['menus']), |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['setMenus']), |
| | | getMenuTreeByRole(){ |
| | | getMenuTreeByRole().then((res)=>{ |
| | | res.data.list.map((item)=>{ |
| | | if(item.systemType===3){ |
| | | this.menus=item.menus |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 监听路由 |
| | | initNavMenu() { |
| | | // console.log(this.$route.name) |
| | | }, |
| | | handleOpen(index) { |
| | | console.log(index) |
| | | console.log(index,"menuIndex") |
| | | }, |
| | | handleClose() {} |
| | | } |