factory_web/src/config/route.js

377 lines
7.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 静态路由配置
// 书写格式与动态路由格式一致,全部经由框架统一转换
// 比较动态路由在meta中多加入了role角色权限为数组类型。一个菜单是否有权限显示取决于它以及后代菜单是否有权限。
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
// 示例如下
// const routes = [
// {
// name: "demo",
// path: "/demo",
// meta: {
// icon: "el-icon-eleme-filled",
// title: "演示",
// role: ["SA"]
// },
// children: [{
// name: "demopage",
// path: "/demopage",
// component: "test/autocode/index",
// meta: {
// icon: "el-icon-menu",
// title: "演示页面",
// role: ["SA"]
// }
// }]
// }
// ]
const routes = [
{
"name": "home",
"path": "/home",
"meta": {
"title": "首页",
"icon": "el-icon-house",
"type": "menu"
},
"children": [
{
"name": "dashboard",
"path": "/dashboard",
"meta": {
"title": "控制台",
"icon": "el-icon-menu",
"affix": true
},
"component": "home"
},
{
"name": "bigScreen",
"path": "/bigScreen",
"meta": {
"title": "驾驶舱",
"icon": "el-icon-platform",
"fullpage": true
},
"component": "bigScreen"
},
{
"name": "userCenter",
"path": "/usercenter",
"meta": {
"title": "帐号信息",
"icon": "el-icon-user"
},
"component": "userCenter"
}
]
},
{
"name": "ecm",
"path": "/ecm",
"meta": {
"title": "事件",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "event",
"path": "/ecm/event",
"meta": {
"title": "事件列表",
"icon": "el-icon-menu",
},
"component": "ecm/event"
},
{
"name": "notify_setting",
"path": "/ecm/notify_setting",
"meta": {
"title": "提醒配置",
"icon": "el-icon-menu",
},
"component": "ecm/notify_setting"
},
]
},
{
"name": "wf",
"path": "/wf",
"meta": {
"title": "工单",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "workflow",
"path": "/wf/workflow",
"meta": {
"title": "工作流",
"icon": "el-icon-menu",
},
"component": "wf/workflow"
},
{
"name": "ticket",
"path": "/wf/ticket",
"meta": {
"title": "工单",
"icon": "el-icon-menu",
},
"component": "wf/ticket"
},
]
},
{
"name": "opm",
"path": "/opm",
"meta": {
"title": "作业",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "operation",
"path": "/opm/operation",
"meta": {
"title": "作业列表",
"icon": "el-icon-menu",
},
"component": "opm/operation"
},
]
},
{
"name": "rpm",
"path": "/rpm",
"meta": {
"title": "相关方",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "rparty",
"path": "/rpm/rparty",
"meta": {
"title": "相关方列表",
"icon": "el-icon-menu",
},
"component": "rpm/rparty"
},
{
"name": "remployee",
"path": "/rpm/remployee",
"meta": {
"title": "相关方人员",
"icon": "el-icon-menu",
},
"component": "rpm/remployee"
},
{
"name": "rfile",
"path": "/rpm/rfile",
"meta": {
"title": "资料库",
"icon": "el-icon-menu",
},
"component": "rpm/rfile"
},
{
"name": "rpj",
"path": "/rpm/rpj",
"meta": {
"title": "入厂项目",
"icon": "el-icon-menu",
},
"component": "rpm/rpj"
},
]
},
{
"name": "vm",
"path": "/vm",
"meta": {
"title": "访客",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "visit",
"path": "/vm/visit",
"meta": {
"title": "来访项目",
"icon": "el-icon-menu",
},
"component": "vm/visit"
},
]
},
{
"name": "am",
"path": "/am",
"meta": {
"title": "区域",
"icon": "el-icon-goods",
"type": "menu"
},
"children": [
{
"name": "area",
"path": "/am/area",
"meta": {
"title": "区域列表",
"icon": "el-icon-menu",
},
"component": "am/area"
},
{
"name": "eqm",
"path": "/am/eqm",
"meta": {
"title": "门禁通道",
"icon": "el-icon-menu",
},
"component": "am/em1"
},
]
},
{
"name": "hrm",
"path": "/hrm",
"meta": {
"title": "人事",
"icon": "el-icon-user",
"type": "menu"
},
"children": [
{
"name": "employee",
"path": "/hrm/employee",
"meta": {
"title": "企业员工",
"icon": "el-icon-menu",
},
"component": "hrm/employee"
},
]
},
{
"name": "sys",
"path": "/sys",
"meta": {
"title": "系统",
"icon": "el-icon-setting",
"type": "menu"
},
"children": [
{
"path": "/sys/user",
"name": "user",
"meta": {
"title": "账户管理",
"icon": "el-icon-user-filled",
"type": "menu"
},
"component": "sys/user"
},
{
"path": "/sys/dept",
"name": "dept",
"meta": {
"title": "部门管理",
"icon": "sc-icon-organization",
"type": "menu"
},
"component": "sys/dept"
},
{
"path": "/sys/post",
"name": "post",
"meta": {
"title": "岗位管理",
"icon": "sc-icon-organization",
"type": "menu"
},
"component": "sys/post"
},
{
"path": "/sys/role",
"name": "role",
"meta": {
"title": "角色管理",
"icon": "el-icon-notebook",
"type": "menu"
},
"component": "sys/role"
},
{
"path": "/sys/dict",
"name": "dict",
"meta": {
"title": "字典管理",
"icon": "el-icon-document",
"type": "menu"
},
"component": "sys/dict"
},
{
"path": "/sys/task",
"name": "task",
"meta": {
"title": "计划任务",
"icon": "el-icon-alarm-clock",
"type": "menu"
},
"component": "sys/task"
}
]
},
{
"name": "ops",
"path": "/ops",
"meta": {
"title": "运维",
"icon": "el-icon-user",
"type": "menu"
},
"children": [
{
"name": "menu",
"path": "/ops/menu",
"meta": {
"title": "菜单管理",
"icon": "el-icon-fold",
},
"component": "ops/menu"
},
{
"name": "log",
"path": "/ops/log",
"meta": {
"title": "请求日志",
"icon": "el-icon-fold",
},
"component": "ops/log_request"
},
{
"name": "monitor",
"path": "/ops/monitor",
"meta": {
"title": "服务监控",
"icon": "el-icon-fold",
},
"component": "ops/monitor"
},
]
},
]
export default routes;