提交 3a776d6a authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改菜单

上级 2c83c129
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"@ezijing/ai-core": "^1.0.0", "@ezijing/ai-core": "^1.0.0",
"@ezijing/ai-vue": "^1.0.37", "@ezijing/ai-vue": "^1.0.37",
"@fortaine/fetch-event-source": "^3.0.6", "@fortaine/fetch-event-source": "^3.0.6",
"@remixicon/vue": "^4.7.0",
"@tinymce/tinymce-vue": "^5.0.1", "@tinymce/tinymce-vue": "^5.0.1",
"@vue-flow/controls": "^1.1.2", "@vue-flow/controls": "^1.1.2",
"@vue-flow/core": "^1.39.0", "@vue-flow/core": "^1.39.0",
...@@ -1247,6 +1248,15 @@ ...@@ -1247,6 +1248,15 @@
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
}, },
"node_modules/@remixicon/vue": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@remixicon/vue/-/vue-4.7.0.tgz",
"integrity": "sha512-kwl1BIEnNoZ5IZ4NJZPOQmA2PfxKlOmogWcJBStuDynoyYpsYSvU22ZkerpdofgjsLS/FiLKhJ/ddpP8U8znVw==",
"license": "Apache-2.0",
"peerDependencies": {
"vue": ">= 3"
}
},
"node_modules/@rolldown/pluginutils": { "node_modules/@rolldown/pluginutils": {
"version": "1.0.0-beta.29", "version": "1.0.0-beta.29",
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.29.tgz", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.29.tgz",
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"@ezijing/ai-core": "^1.0.0", "@ezijing/ai-core": "^1.0.0",
"@ezijing/ai-vue": "^1.0.37", "@ezijing/ai-vue": "^1.0.37",
"@fortaine/fetch-event-source": "^3.0.6", "@fortaine/fetch-event-source": "^3.0.6",
"@remixicon/vue": "^4.7.0",
"@tinymce/tinymce-vue": "^5.0.1", "@tinymce/tinymce-vue": "^5.0.1",
"@vue-flow/controls": "^1.1.2", "@vue-flow/controls": "^1.1.2",
"@vue-flow/core": "^1.39.0", "@vue-flow/core": "^1.39.0",
......
import type { IMenuItem } from '@/types' import type { IMenuItem } from '@/types'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
import { Document, DocumentChecked } from '@element-plus/icons-vue'
import IconMetadata from '@/components/icon/IconMetadata.vue' import IconMetadata from '@/components/icon/IconMetadata.vue'
import IconConnect from '@/components/icon/IconConnect.vue' import IconConnect from '@/components/icon/IconConnect.vue'
...@@ -23,12 +22,25 @@ import IconMiniProgram from '@/components/icon/IconMiniProgram.vue' ...@@ -23,12 +22,25 @@ import IconMiniProgram from '@/components/icon/IconMiniProgram.vue'
import IconCard from '@/components/icon/IconCard.vue' import IconCard from '@/components/icon/IconCard.vue'
import IconEvent from '@/components/icon/IconEvent.vue' import IconEvent from '@/components/icon/IconEvent.vue'
import IconMarket from '@/components/icon/IconMarket.vue' import IconMarket from '@/components/icon/IconMarket.vue'
import IconLive from '@/components/icon/IconLive.vue' import {
import IconLiveProductCategory from '@/components/icon/IconLiveProductCategory.vue' RiLiveLine,
import IconLiveProductAttr from '@/components/icon/IconLiveProductAttr.vue' RiFoldersLine,
import IconLiveProductManagement from '@/components/icon/IconLiveProductManagement.vue' RiPriceTag3Line,
import IconLiveTalk from '@/components/icon/IconLiveTalk.vue' RiShoppingBagLine,
import IconLiveTest from '@/components/icon/IconLiveTest.vue' RiMessage3Line,
RiVideoLine,
RiShoppingCartLine,
RiArticleLine,
RiFileChartLine,
RiGlobalLine,
RiLightbulbLine,
RiSoundModuleLine,
RiLineChartLine,
RiUserLine,
RiGroupLine,
RiCalendarEventLine,
RiBarChartLine,
} from '@remixicon/vue'
interface State { interface State {
studentMenus: IMenuItem[] studentMenus: IMenuItem[]
...@@ -164,16 +176,16 @@ const studentMenus: IMenuItem[] = [ ...@@ -164,16 +176,16 @@ const studentMenus: IMenuItem[] = [
id: 20, id: 20,
name: '直播', name: '直播',
path: '/live', path: '/live',
icon: markRaw(IconLive), icon: markRaw(RiLiveLine),
children: [ children: [
{ {
id: 23, id: 23,
name: '商品管理', name: '商品管理',
path: '/live/product/management', path: '/live/product/management',
icon: markRaw(IconLiveProductManagement), icon: markRaw(RiShoppingBagLine),
}, },
{ id: 24, name: '直播话术管理', path: '/live/talk', icon: markRaw(IconLiveTalk) }, { id: 24, name: '直播话术管理', path: '/live/talk', icon: markRaw(RiMessage3Line) },
{ id: 25, name: '直播', path: '/live/test', icon: markRaw(IconLiveTest) }, { id: 25, name: '直播', path: '/live/test', icon: markRaw(RiVideoLine) },
], ],
}, },
{ {
...@@ -182,10 +194,10 @@ const studentMenus: IMenuItem[] = [ ...@@ -182,10 +194,10 @@ const studentMenus: IMenuItem[] = [
path: '/analyze', path: '/analyze',
icon: markRaw(IconAnalyze), icon: markRaw(IconAnalyze),
children: [ children: [
{ id: 27, name: '用户分析', path: '/analyze/user' }, { id: 27, name: '用户分析', path: '/analyze/user', icon: markRaw(RiUserLine) },
{ id: 28, name: '标签群组分析', path: '/analyze/label' }, { id: 28, name: '标签群组分析', path: '/analyze/label', icon: markRaw(RiGroupLine) },
{ id: 29, name: '事件分析', path: '/analyze/event' }, { id: 29, name: '事件分析', path: '/analyze/event', icon: markRaw(RiCalendarEventLine) },
{ id: 30, name: '营销分析', path: '/analyze/marketing' }, { id: 30, name: '营销分析', path: '/analyze/marketing', icon: markRaw(RiBarChartLine) },
], ],
}, },
] ]
...@@ -258,7 +270,7 @@ const adminMenus: IMenuItem[] = [ ...@@ -258,7 +270,7 @@ const adminMenus: IMenuItem[] = [
id: 71, id: 71,
name: '运营策略管理', name: '运营策略管理',
path: '/strategy', path: '/strategy',
icon: markRaw(IconLiveTalk), icon: markRaw(RiMessage3Line),
// tag: 'experiment_groups', // tag: 'experiment_groups',
}, },
], ],
...@@ -348,39 +360,39 @@ const adminMenus: IMenuItem[] = [ ...@@ -348,39 +360,39 @@ const adminMenus: IMenuItem[] = [
id: 20, id: 20,
name: '直播', name: '直播',
path: '/live', path: '/live',
icon: markRaw(IconLive), icon: markRaw(RiLiveLine),
children: [ children: [
{ {
id: 21, id: 21,
name: '商品品类管理', name: '商品品类管理',
path: '/live/product/category', path: '/live/product/category',
icon: markRaw(IconLiveProductCategory), icon: markRaw(RiFoldersLine),
// role: [5, 6], // role: [5, 6],
}, },
{ {
id: 22, id: 22,
name: '商品属性管理', name: '商品属性管理',
path: '/live/product/attr', path: '/live/product/attr',
icon: markRaw(IconLiveProductAttr), icon: markRaw(RiPriceTag3Line),
// role: [5, 6] // role: [5, 6]
}, },
{ {
id: 23, id: 23,
name: '商品管理', name: '商品管理',
path: '/live/product/management', path: '/live/product/management',
icon: markRaw(IconLiveProductManagement), icon: markRaw(RiShoppingBagLine),
// role: [5, 6], // role: [5, 6],
}, },
{ id: 24, name: '直播话术管理', path: '/live/talk', icon: markRaw(IconLiveTalk) }, { id: 24, name: '直播话术管理', path: '/live/talk', icon: markRaw(RiMessage3Line) },
{ id: 25, name: '直播', path: '/live/test', icon: markRaw(IconLiveTest) }, { id: 25, name: '直播', path: '/live/test', icon: markRaw(RiVideoLine) },
{ id: 201, name: '订单管理', path: '/live/order', icon: markRaw(IconCard) }, { id: 201, name: '订单管理', path: '/live/order', icon: markRaw(RiShoppingCartLine) },
{ id: 202, name: '直播总结管理', path: '/live/reports', icon: markRaw(Document) }, { id: 202, name: '直播总结管理', path: '/live/reports', icon: markRaw(RiArticleLine) },
{ {
id: 203, id: 203,
name: '成绩管理', name: '成绩管理',
path: '/live/score', path: '/live/score',
icon: markRaw(DocumentChecked), icon: markRaw(RiFileChartLine),
role: [5, 6], role: [5, 6],
}, },
], ],
...@@ -391,21 +403,22 @@ const adminMenus: IMenuItem[] = [ ...@@ -391,21 +403,22 @@ const adminMenus: IMenuItem[] = [
path: '/analyze', path: '/analyze',
icon: markRaw(IconAnalyze), icon: markRaw(IconAnalyze),
children: [ children: [
{ id: 27, name: '用户分析', path: '/analyze/user' }, { id: 27, name: '用户分析', path: '/analyze/user', icon: markRaw(RiUserLine) },
{ id: 28, name: '标签群组分析', path: '/analyze/label' }, { id: 28, name: '标签群组分析', path: '/analyze/label', icon: markRaw(RiGroupLine) },
{ id: 29, name: '事件分析', path: '/analyze/event' }, { id: 29, name: '事件分析', path: '/analyze/event', icon: markRaw(RiCalendarEventLine) },
{ id: 30, name: '营销分析', path: '/analyze/marketing' }, { id: 30, name: '营销分析', path: '/analyze/marketing', icon: markRaw(RiBarChartLine) },
], ],
}, },
{ {
id: 40, id: 40,
name: '全媒体运营', name: '全媒体运营',
path: '/operations', path: '/operations',
icon: markRaw(IconMarket), icon: markRaw(RiGlobalLine),
children: [ children: [
{ id: 401, name: '创意策划方案', path: '/operations/plan' }, { id: 401, name: '创意策划方案', path: '/operations/plan', icon: markRaw(RiLightbulbLine) },
{ id: 402, name: '视听运营', path: '/operations/audiovisual' }, { id: 402, name: '视听运营', path: '/operations/audiovisual', icon: markRaw(RiSoundModuleLine) },
{ id: 403, name: '流量运营', path: '/operations/flow' }, { id: 403, name: '流量运营', path: '/operations/flow', icon: markRaw(RiLineChartLine) },
{ id: 204, name: '成绩管理', path: '/live/score', icon: markRaw(RiFileChartLine), role: [5, 6] },
], ],
}, },
] ]
...@@ -443,7 +456,8 @@ export const useMenuStore = defineStore({ ...@@ -443,7 +456,8 @@ export const useMenuStore = defineStore({
// 根据用户角色选择基础菜单 // 根据用户角色选择基础菜单
// const baseMenus = userRole === 1 ? state.studentMenus : state.adminMenus // const baseMenus = userRole === 1 ? state.studentMenus : state.adminMenus
return filterMenus(state.adminMenus) const filteredMenus = filterMenus(state.adminMenus)
return filteredMenus.length === 1 ? filteredMenus[0]?.children || [] : filteredMenus
}, },
}, },
}) })
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论