You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.5 KiB
60 lines
1.5 KiB
import { useUserStore } from "@/stores/user"
|
|
|
|
const menuIcon = [{
|
|
id: 0,
|
|
name: '实验操作',
|
|
s_icon: '/src/assets/menuIcon/s_home.svg',
|
|
n_icon: '/src/assets/menuIcon/n_home.svg',
|
|
path: '/graphite',
|
|
},{
|
|
id: 1,
|
|
name: '日志记录',
|
|
s_icon: '/src/assets/menuIcon/s_log.svg',
|
|
n_icon: '/src/assets/menuIcon/n_log.svg',
|
|
path: '/logRecords',
|
|
},{
|
|
id: 2,
|
|
name: '实验记录',
|
|
s_icon: '/src/assets/menuIcon/s_expe.svg',
|
|
n_icon: '/src/assets/menuIcon/n_expe.svg',
|
|
path: '/expeRecords',
|
|
},{
|
|
id: 3,
|
|
name: '加液配置',
|
|
s_icon: '/src/assets/menuIcon/s_liquid.svg',
|
|
n_icon: '/src/assets/menuIcon/n_liquid.svg',
|
|
path: '/addLiquid',
|
|
},{
|
|
id: 4,
|
|
name: '溶液配置',
|
|
s_icon: '/src/assets/menuIcon/s_liquid_config.svg',
|
|
n_icon: '/src/assets/menuIcon/n_liquid_config.svg',
|
|
path: '/liquidConfig',
|
|
},{
|
|
id: 5,
|
|
name: '矿石管理',
|
|
s_icon: '/src/assets/menuIcon/s_ore.svg',
|
|
n_icon: '/src/assets/menuIcon/n_ore.svg',
|
|
path: '/oreManage',
|
|
},{
|
|
id: 6,
|
|
name: '用户管理',
|
|
s_icon: '/src/assets/menuIcon/s_user.svg',
|
|
n_icon: '/src/assets/menuIcon/n_user.svg',
|
|
path: '/userManage',
|
|
},{
|
|
id: 7,
|
|
name: '调试',
|
|
s_icon: '/src/assets/menuIcon/s_debug.svg',
|
|
n_icon: '/src/assets/menuIcon/n_debug.svg',
|
|
path: '/debug',
|
|
}]
|
|
|
|
const userStore = useUserStore()
|
|
export function getMenus() {
|
|
if (userStore.user && userStore.user.role === 1) {
|
|
return menuIcon
|
|
} else {
|
|
return menuIcon.filter(m => m.path !== '/userManage')
|
|
}
|
|
}
|