【修改】修改bug

This commit is contained in:
zhoulingpo
2023-05-16 15:13:47 +08:00
parent aeaad5b86d
commit 2393f8e41e
2 changed files with 41 additions and 19 deletions
@@ -212,5 +212,7 @@ export default {
overflow: hidden; overflow: hidden;
height: 23px; height: 23px;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: keep-all;
line-height: 23px;
} }
</style> </style>
+22 -2
View File
@@ -86,7 +86,7 @@ export default {
data = [] data = []
} }
data = data.sort((a, b) => a.sort - b.sort) data = data.sort((a, b) => a.sort - b.sort)
const menu = data.filter(item => item.belong) const menu = data.filter(item => item.belong && !item.isButton)
let menuData = [] let menuData = []
const menuFun = (menu) => { const menuFun = (menu) => {
menuData = [...menuData, ...menu] menuData = [...menuData, ...menu]
@@ -96,7 +96,23 @@ export default {
} }
} }
menuFun(menu) menuFun(menu)
if(menuData.length==0){
this.$api.login.logout().then(_ => {
this.$message.warning('暂无权限,请联系管理员授权')
this.$store.commit('saveUserInfo', null)
this.$store.commit('setHandleProcess', null)
this.$store.commit('savePathUrl', null)
this.$store.commit('removeDicts', null)
// var sevice = "http://"+window.location.host+"/";
// var serviceUrl = encodeURIComponent(sevice);
// 正式
// window.open("https://caddmuat.changan.com.cn/cas/logout?service=http://10.64.23.30:7766/home", '_self');
// 测试
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
this.$router.push('/login')
})
return
}else{
const treeData = menuData.map(item => ({ const treeData = menuData.map(item => ({
id: item.id, id: item.id,
parentId: item.parentId, parentId: item.parentId,
@@ -115,6 +131,10 @@ export default {
this.$store.commit('saveMenuData', Object.values(obj)) this.$store.commit('saveMenuData', Object.values(obj))
this.menuAllDate = Object.values(obj) this.menuAllDate = Object.values(obj)
this.getMenu() this.getMenu()
}
}) })
} }
}, },