fix: 优化多余菜单显示
This commit is contained in:
parent
2feafcb017
commit
58183fa597
|
@ -2,7 +2,7 @@ export const LoginPath = '/user/login'
|
|||
export const InitHomePath = '/init-home'
|
||||
export const AccountCenterBindPath = '/account/center/bind'
|
||||
export const InitLicense = '/init-license'
|
||||
export const NotificationSubscriptionCode = 'account/NotificationSubscription'
|
||||
export const NotificationSubscriptionCode = 'message-subscribe'
|
||||
export const NotificationRecordCode = 'account/NotificationRecord'
|
||||
export const OauthPath = '/oauth'
|
||||
|
||||
|
|
|
@ -220,7 +220,6 @@ watch(
|
|||
watchEffect(() => {
|
||||
const time = data.value.time.time
|
||||
if (time && Array.isArray(time) && time.length === 2 && time[0] && props.serviceId) {
|
||||
console.log(data.value)
|
||||
getNetworkEcharts(data.value);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -112,6 +112,7 @@ import {
|
|||
} from '@/utils/consts'
|
||||
import { isNoCommunity } from '@/utils/utils'
|
||||
import {permissionsGranted, useIndirectMenusMap} from "@/views/system/Role/Detail/components/util";
|
||||
import {NotificationSubscriptionCode} from "@/router/menu";
|
||||
|
||||
const emits = defineEmits(['update:selectItems']);
|
||||
const route = useRoute();
|
||||
|
@ -279,12 +280,8 @@ function getAllPermiss() {
|
|||
getPrimissTree_api(id).then((resp) => {
|
||||
const _result = resp.result
|
||||
// 默认选中个人中心相关设置
|
||||
tableData.value = _result.map((item: { code: string , buttons: any[], granted: boolean}) => {
|
||||
// if (item.code === USER_CENTER_MENU_CODE) {
|
||||
// item.granted = true
|
||||
// item.buttons = item.buttons.map( b => ({...b, granted: true, enabled: true}))
|
||||
// }
|
||||
return item
|
||||
tableData.value = _result.filter((item: { code: string , buttons: any[], granted: boolean}) => {
|
||||
return (item.code !== NotificationSubscriptionCode)
|
||||
});
|
||||
|
||||
treeToSimple(tableData.value); // 表格数据扁平化
|
||||
|
|
Loading…
Reference in New Issue