fix: 修改菜单
This commit is contained in:
parent
e482e158f6
commit
9802069905
|
@ -12,7 +12,7 @@ import router from '@/router'
|
||||||
import { onlyMessage } from '@/utils/comm'
|
import { onlyMessage } from '@/utils/comm'
|
||||||
import { AccountMenu, NotificationRecordCode, NotificationSubscriptionCode } from '@/router/menu'
|
import { AccountMenu, NotificationRecordCode, NotificationSubscriptionCode } from '@/router/menu'
|
||||||
import { USER_CENTER_MENU_CODE } from '@/utils/consts'
|
import { USER_CENTER_MENU_CODE } from '@/utils/consts'
|
||||||
import {isNoCommunity} from "@/utils/utils";
|
import { isNoCommunity } from "@/utils/utils";
|
||||||
|
|
||||||
const defaultOwnParams = [
|
const defaultOwnParams = [
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,21 @@ const defaultOwnParams = [
|
||||||
termType: 'isnull',
|
termType: 'isnull',
|
||||||
value: '1',
|
value: '1',
|
||||||
type: 'or'
|
type: 'or'
|
||||||
|
}, {
|
||||||
|
column: 'options'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
terms: [
|
||||||
|
{
|
||||||
|
terms: [
|
||||||
|
{
|
||||||
|
value: "%show\":true%",
|
||||||
|
termType: "like",
|
||||||
|
column: "options"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -79,7 +94,7 @@ export const useMenuStore = defineStore({
|
||||||
jumpPage(name: string, params?: Record<string, any>, query?: Record<string, any>) {
|
jumpPage(name: string, params?: Record<string, any>, query?: Record<string, any>) {
|
||||||
const path = this.hasMenu(name)
|
const path = this.hasMenu(name)
|
||||||
if (path) {
|
if (path) {
|
||||||
this.params = { [name]: params || {}}
|
this.params = { [name]: params || {} }
|
||||||
router.push({
|
router.push({
|
||||||
name, params, query, state: { params }
|
name, params, query, state: { params }
|
||||||
})
|
})
|
||||||
|
@ -89,14 +104,14 @@ export const useMenuStore = defineStore({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
routerPush(name: string, params?: Record<string, any>, query?: Record<string, any>) {
|
routerPush(name: string, params?: Record<string, any>, query?: Record<string, any>) {
|
||||||
this.params = { [name]: params || {}}
|
this.params = { [name]: params || {} }
|
||||||
router.push({
|
router.push({
|
||||||
name, params, query, state: { params }
|
name, params, query, state: { params }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleMenusMapById(item: { code: string, path: string}) {
|
handleMenusMapById(item: { code: string, path: string }) {
|
||||||
const { name, path } = item
|
const { name, path } = item
|
||||||
this.menus[name] = {path}
|
this.menus[name] = { path }
|
||||||
},
|
},
|
||||||
queryMenuTree(isCommunity = false): Promise<any[]> {
|
queryMenuTree(isCommunity = false): Promise<any[]> {
|
||||||
return new Promise(async (res) => {
|
return new Promise(async (res) => {
|
||||||
|
|
Loading…
Reference in New Issue