fix:完善相关页面
This commit is contained in:
309
src/mock/menu.ts
Normal file
309
src/mock/menu.ts
Normal file
@@ -0,0 +1,309 @@
|
||||
/**
|
||||
* 菜单路由 Mock 数据
|
||||
* 用于开发阶段模拟后端返回的菜单数据
|
||||
*/
|
||||
|
||||
export interface MockMenuRoute {
|
||||
path: string;
|
||||
name?: string;
|
||||
component?: string;
|
||||
meta?: {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
requiresAuth?: boolean;
|
||||
roles?: string[];
|
||||
[key: string]: any;
|
||||
};
|
||||
children?: MockMenuRoute[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Mock 菜单数据
|
||||
* 根据实际后端接口返回的数据格式进行配置
|
||||
*/
|
||||
export const mockMenuData: MockMenuRoute[] = [
|
||||
{
|
||||
path: "/home",
|
||||
name: "Home",
|
||||
component: "Home", // 对应 @/pages/Home/index.vue
|
||||
meta: {
|
||||
title: "首页",
|
||||
icon: "HomeFilled",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "business",
|
||||
path: "/business",
|
||||
meta: {
|
||||
title: "商机管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "clue",
|
||||
path: "clue",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "线索管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
name: "customer",
|
||||
path: "customer",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "客户管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "studio",
|
||||
path: "studio",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "游戏与工作室",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "businessmanage",
|
||||
path: "businessmanage",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "商机管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "contract",
|
||||
path: "/contract",
|
||||
meta: {
|
||||
title: "合同管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "income",
|
||||
path: "income",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "收入合同",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "project",
|
||||
path: "/project",
|
||||
meta:{
|
||||
title: "项目管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "requirement",
|
||||
path: "requirement",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "需求管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "projectmanage",
|
||||
path: "projectmanage",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "项目管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "task",
|
||||
path: "task",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "任务管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "work",
|
||||
path: "work",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "工时管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "team",
|
||||
path: "/team",
|
||||
meta:{
|
||||
title: "团队管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: "recruit",
|
||||
path: "/recruit",
|
||||
meta:{
|
||||
title: "招聘管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "resume",
|
||||
path: "resume",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "流程管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "push",
|
||||
path: "push",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "推送管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
name: "job",
|
||||
path: "job",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "主场岗位",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "dashboard",
|
||||
title: "dashboard",
|
||||
path: "/stage",
|
||||
meta: {
|
||||
title: "后台管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "flow",
|
||||
name: "flow",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "流程管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
path: "organization",
|
||||
meta: {
|
||||
title: "组织管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "personnel",
|
||||
path: "personnel",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "人员管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "permission",
|
||||
path: "permission",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "权限管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "dict",
|
||||
path: "dict",
|
||||
component: "@/pages/StageManage/organization/index.vue",
|
||||
meta: {
|
||||
title: "字典管理",
|
||||
icon: "",
|
||||
requiresAuth: true,
|
||||
roles: ["admin", "user"],
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 获取 Mock 菜单数据的响应格式
|
||||
* 模拟后端接口返回的数据结构
|
||||
*/
|
||||
export const getMockMenuResponse = () => {
|
||||
return {
|
||||
code: 0,
|
||||
data: mockMenuData,
|
||||
msg: "获取菜单成功",
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user