From b4b3cb3641ecdf56cdfdf3532e5acf4af46fbe48 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期二, 12 十二月 2023 18:33:45 +0800 Subject: [PATCH] 新增出入库明细页面,添加无权限展示页面,接口调整 --- src/components/layout/components/appsidebar/index.vue | 71 ++++++++++++----------------------- 1 files changed, 25 insertions(+), 46 deletions(-) diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue index 06522e8..f14c975 100644 --- a/src/components/layout/components/appsidebar/index.vue +++ b/src/components/layout/components/appsidebar/index.vue @@ -16,53 +16,14 @@ 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> @@ -70,23 +31,41 @@ </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() {} } -- Gitblit v1.8.0