/*各个路由模块的建立*/ import Home from "@/views/Home/Home"; import GlobalLayout from "@/layout/GlobalLayout"; import Login from "@/views/login/Login"; import Check from "@/views/login/Check"; const SYSTEM_MANAGEMENT = "系统管理"; const SETTLEMENT_MANAGEMENT = "结算管理"; const DATAANALYSIS_MANAGEMENT = "数据分析"; const Task_MANAGEMENT = "任务管理"; /*定义路径的数值 自定义路径的值*/ export const LOGIN_PATH = "/login"; export const HOME_PATH = "/"; export const LOGIN_CHECK = "/login/check/:uuid"; /** * 菜单配置 * * 参数例子: * { * path: 路径, * name: 组件名称, * meta: { * text: 左侧菜单栏显示文字, * icon: 左侧菜单栏显示图标, * pName: 父级菜单名称 * }, * hidden: 是否在菜单栏中隐藏, * component: 组件(按需引入) * } */ /*进行路由设置处理*/ export const staticRoutes = [ { path: HOME_PATH, name: "Home", meta: { text: "首页", icon: "el-icon-price-tag" }, component: Home }, { path: "/order", name: "Order", meta: { text: "订单管理", icon: "el-icon-tickets" }, component: () => import("@/views/order/Order") }, { path: "/task", name: "Task", meta: { text: "任务列表", icon: "el-icon-bank-card", pName: Task_MANAGEMENT }, component: () => import("@/views/task/task/Task") }, { path: "/Arrange", name: "Arrange", meta: { text: "任务编排单", icon: "el-icon-bank-card", pName: Task_MANAGEMENT }, component: () => import("@/views/task/arrange/Arrange") }, { path: "/content", name: "Content", meta: { text: "内容管理", icon: "el-icon-document-copy" }, component: () => import("@/views/content/Content") }, { path: "/settlement", name: "Settlement", meta: { text: "任务结算", icon: "el-icon-coin", pName: SETTLEMENT_MANAGEMENT }, component: () => import("@/views/settlement/settlement/Settlement") }, { path: "/transaction", name: "Transaction", meta: { text: "交易记录", icon: "el-icon-coin", pName: SETTLEMENT_MANAGEMENT }, component: () => import("@/views/settlement/transaction/Transaction") }, { path: "/list", name: "list", meta: { text: "数据列表", icon: "el-icon-data-line", pName: DATAANALYSIS_MANAGEMENT }, component: () => import("@/views/Detaildata/DetailList/List") }, { path: "/list/analysis/:id", name: "Analysis", meta: { text: "数据详情页", pName: "数据列表页", icon: "el-icon-data-line", }, props: true, hidden: true, component: () => import("@/views/Detaildata/DetailEmpty/Empty") }, { path: "/app", name: "app", meta: { text: "营销端数据", icon: "el-icon-data-line", pName: DATAANALYSIS_MANAGEMENT }, component: () => import("@/views/Detaildata/DetailApp/App") }, { path: "/pc", name: "pc", meta: { text: "业务端数据", icon: "el-icon-data-line", pName: DATAANALYSIS_MANAGEMENT }, component: () => import("@/views/Detaildata/DetailPc/Pc") }, { path: "/account", name: "Account", meta: { text: "账号管理", icon: "el-icon-user", pName: SYSTEM_MANAGEMENT }, component: () => import("@/views/system/account/Account.vue") }, { path: "/user", name: "User", meta: { text: "用户管理", icon: "el-icon-user", pName: SYSTEM_MANAGEMENT }, component: () => import("@/views/system/user/UserList") }, { path: "/department", name: "Department", meta: { text: "部门管理", icon: "el-icon-user", pName: SYSTEM_MANAGEMENT }, component: () => import("@/views/system/department/Department.vue") }, { path: "/dictionary", name: "Dictionary", meta: { text: "数据字典", pName: SYSTEM_MANAGEMENT }, component: () => import("@/views/system/dictionary/Dictionary") } ]; /** * 一级路由 */ export const routes = [ { path: "/", component: GlobalLayout, children: staticRoutes }, { path: LOGIN_PATH, name: "Login", component: Login }, { path: LOGIN_CHECK, name: "Check", props: true, component: Check }, { path: "/404", name: "404", hidden: true, component: () => import("@/views/404") }, { path: "*", redirect: "/404", hidden: true } ]; /** * 非路由菜单项图标 */ export const iconMap = { [SYSTEM_MANAGEMENT]: "el-icon-user", [SETTLEMENT_MANAGEMENT]: "el-icon-coin", [DATAANALYSIS_MANAGEMENT]: "el-icon-data-line", [Task_MANAGEMENT]: "el-icon-bank-card" };