From 1a0e437bd073d428e276a804c6846e409d92a99e Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期四, 18 七月 2024 23:45:56 +0800
Subject: [PATCH] fix:与aps共享token
---
src/components/layout/components/appsidebar/index.vue | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index bf9aff6..89b72f6 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -36,12 +36,12 @@
<el-menu-item index="/backgroundConfig/rolePermssion">瑙掕壊鏉冮檺</el-menu-item>
</el-submenu> -->
</el-menu>
+ <el-empty v-if="this.menus===null||this.menus===undefined||this.menus.length===0" :image-size="130" description="娌℃湁渚ф爮鑿滃崟"></el-empty>
</div>
</div>
</template>
<script>
-import {getMenuTreeByRole} from "@/api/menus/index"
export default {
name: "AppSidebar",
props: {},
@@ -62,14 +62,22 @@
},
methods: {
getMenuTreeByRole(){
- getMenuTreeByRole().then((res)=>{
- console.log(res.data.list,"crm鑿滃崟")
- res.data.list.map((item)=>{
- if(item.systemType===2){
- this.menus=item.menus
- }
- })
- })
+ let newList=this.$store.state.menus
+ console.log(newList,"newList")
+ // 闅愯棌浜� 鐢熸垚璁″垝 鍜� 鏈嶅姟鏀惰垂绠$悊妯″潡
+ if(newList[1]){
+ const found = newList[1].children.find(obj => obj.title === "鐢熸垚璁″垝")
+ if(found){
+ newList[1].children=[...newList[1].children.slice(0, -1)];
+ }
+ }
+ if(newList[2]){
+ const found1 = newList[2].children.find(obj => obj.title === "鏈嶅姟鏀惰垂绠$悊")
+ if(found1){
+ newList[2].children=[...newList[2].children.slice(0, -1)];
+ }
+ }
+ this.menus=newList
},
// 鐩戝惉璺敱
initNavMenu() {
@@ -86,4 +94,11 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import "./index.scss";
+::v-deep .el-empty{
+ .el-empty__description{
+ p{
+ color: #dddd;
+ }
+ }
+}
</style>
--
Gitblit v1.8.0