785 lines
18 KiB
JavaScript
785 lines
18 KiB
JavaScript
// 静态路由配置
|
||
// 书写格式与动态路由格式一致,全部经由框架统一转换
|
||
// 比较动态路由在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-home-filled",
|
||
"type": "menu",
|
||
"perms": ["home"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "dashboard",
|
||
"path": "/dashboard",
|
||
"meta": {
|
||
"title": "控制台",
|
||
"icon": "el-icon-monitor",
|
||
"affix": true,
|
||
"perms": ["dashboard"]
|
||
},
|
||
"component": "home"
|
||
},
|
||
{
|
||
"name": "bigScreen",
|
||
"path": "/bigScreen",
|
||
"meta": {
|
||
"title": "驾驶舱",
|
||
"icon": "el-icon-position",
|
||
"fullpage": true,
|
||
"perms": ["bigScreen"]
|
||
},
|
||
"component": "bigScreen"
|
||
},
|
||
{
|
||
"name": "userCenter",
|
||
"path": "/usercenter",
|
||
"meta": {
|
||
"title": "帐号信息",
|
||
"icon": "el-icon-user",
|
||
"perms": ["userCenter"]
|
||
},
|
||
"component": "userCenter"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"name": "ecm",
|
||
"path": "/ecm",
|
||
"meta": {
|
||
"title": "事件",
|
||
"icon": "el-icon-alarm-clock",
|
||
"type": "menu",
|
||
"perms": ["ecm"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "event",
|
||
"path": "/ecm/event",
|
||
"meta": {
|
||
"title": "事件列表",
|
||
"icon": "el-icon-alarm-clock",
|
||
"perms": ["event"]
|
||
},
|
||
"component": "ecm/event",
|
||
}
|
||
,
|
||
{
|
||
"name": "eventfrom",
|
||
"path": "/ecm/event_from",
|
||
"meta": {
|
||
"title": "事件详情",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
},
|
||
"component": "ecm/event_from"
|
||
}
|
||
,
|
||
{
|
||
"name": "eventhandlefrom",
|
||
"path": "/ecm/event_handlefrom",
|
||
"meta": {
|
||
"title": "处理事件",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
},
|
||
"component": "ecm/event_handlefrom"
|
||
},
|
||
{
|
||
"name": "myevent",
|
||
"path": "/ecm/myevent",
|
||
"meta": {
|
||
"title": "我的事件",
|
||
"icon": "el-icon-notification",
|
||
"perms": ["myevent"]
|
||
},
|
||
"component": "ecm/myevent"
|
||
},
|
||
{
|
||
"name": "notify_setting",
|
||
"path": "/ecm/notify_setting",
|
||
"meta": {
|
||
"title": "提醒配置",
|
||
"icon": "el-icon-setting",
|
||
"perms": ["notify_setting"]
|
||
},
|
||
"component": "ecm/notify_setting"
|
||
},
|
||
|
||
{
|
||
"name": "algo",
|
||
"path": "/ecm/algo",
|
||
"meta": {
|
||
"title": "算法布设",
|
||
"icon": "el-icon-set-up",
|
||
"perms": ["algo"]
|
||
},
|
||
"component": "ecm/algo"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"name": "opm",
|
||
"path": "/opm",
|
||
"meta": {
|
||
"title": "作业",
|
||
"icon": "el-icon-list",
|
||
"type": "menu",
|
||
"perms": ["opm"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "operation",
|
||
"path": "/opm/operation",
|
||
"meta": {
|
||
"title": "作业列表",
|
||
"icon": "el-icon-tickets",
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/operation"
|
||
},
|
||
{
|
||
"name": "oplcate",
|
||
"path": "/opm/oplcate",
|
||
"meta": {
|
||
"title": "许可证分类",
|
||
"icon": "el-icon-ticket",
|
||
"perms": ["oplcate"]
|
||
},
|
||
"component": "opm/oplcate"
|
||
},
|
||
{
|
||
"name": "opl",
|
||
"path": "/opm/opl",
|
||
"meta": {
|
||
"title": "作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/opl"
|
||
},
|
||
{
|
||
"name": "fire",
|
||
"path": "/opm/fire",
|
||
"meta": {
|
||
"title": "动火作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/fire"
|
||
},
|
||
{
|
||
"name": "space",
|
||
"path": "/opm/space",
|
||
"meta": {
|
||
"title": "有限空间作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/space"
|
||
},
|
||
{
|
||
"name": "clear",
|
||
"path": "/opm/clear",
|
||
"meta": {
|
||
"title": "清库作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/clear"
|
||
} ,
|
||
{
|
||
"name": "high",
|
||
"path": "/opm/high",
|
||
"meta": {
|
||
"title": "高处作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/high"
|
||
},
|
||
{
|
||
"name": "hoisting",
|
||
"path": "/opm/hoisting",
|
||
"meta": {
|
||
"title": "吊装作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/hoisting"
|
||
},
|
||
{
|
||
"name": "preheat",
|
||
"path": "/opm/preheat",
|
||
"meta": {
|
||
"title": "预热器清堵作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/preheat"
|
||
},
|
||
{
|
||
"name": "cooler",
|
||
"path": "/opm/cooler",
|
||
"meta": {
|
||
"title": "篦冷机清大块作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/cooler"
|
||
},
|
||
{
|
||
"name": "soil",
|
||
"path": "/opm/soil",
|
||
"meta": {
|
||
"title": "动土作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/soil"
|
||
},
|
||
{
|
||
"name": "usecl",
|
||
"path": "/opm/usecl",
|
||
"meta": {
|
||
"title": "临时用电作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["operation"]
|
||
},
|
||
"component": "opm/usecl"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"name": "rpm",
|
||
"path": "/rpm",
|
||
"meta": {
|
||
"title": "相关方",
|
||
"icon": "el-icon-avatar",
|
||
"type": "menu",
|
||
"perms": ["rpm"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "rparty",
|
||
"path": "/rpm/rparty",
|
||
"meta": {
|
||
"title": "相关方列表",
|
||
"icon": "el-icon-tickets",
|
||
"perms": ["rparty"]
|
||
},
|
||
"component": "rpm/rparty"
|
||
},
|
||
{
|
||
"name": "remployee",
|
||
"path": "/rpm/remployee",
|
||
"meta": {
|
||
"title": "我的人员",
|
||
"icon": "el-icon-user",
|
||
"perms": ["remployee"]
|
||
},
|
||
"component": "rpm/remployee"
|
||
},
|
||
{
|
||
"name": "rcertificate",
|
||
"path": "/rpm/rcertificate",
|
||
"meta": {
|
||
"title": "我的证书",
|
||
"icon": "el-icon-postcard",
|
||
"perms": ["rcertificate"]
|
||
},
|
||
"component": "rpm/rcertificate"
|
||
},
|
||
{
|
||
"name": "rfile",
|
||
"path": "/rpm/rfile",
|
||
"meta": {
|
||
"title": "我的资料",
|
||
"icon": "el-icon-shopping-bag",
|
||
"perms": ["rfile"]
|
||
},
|
||
"component": "rpm/rfile"
|
||
},
|
||
{
|
||
"name": "rpj",
|
||
"path": "/rpm/rpj",
|
||
"meta": {
|
||
"title": "入厂项目",
|
||
"icon": "el-icon-calendar",
|
||
"perms": ["rpj"]
|
||
},
|
||
"component": "rpm/rpj"
|
||
},
|
||
{
|
||
"name": "rpjadd",
|
||
"path": "/rpm/rpjadd",
|
||
"meta": {
|
||
"title": "入厂项目相关信息",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["rpj"]
|
||
},
|
||
"component": "rpm/rpjadd"
|
||
},
|
||
|
||
]
|
||
},
|
||
{
|
||
"name": "vm",
|
||
"path": "/vm",
|
||
"meta": {
|
||
"title": "访客",
|
||
"icon": "el-icon-user-filled",
|
||
"type": "menu",
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "visit",
|
||
"path": "/vm/visit",
|
||
"meta": {
|
||
"title": "来访项目",
|
||
"icon": "el-icon-tickets",
|
||
},
|
||
"component": "vm/visit"
|
||
},
|
||
{
|
||
"name": "visitor",
|
||
"path": "/vm/visitor",
|
||
"meta": {
|
||
"title": "我的访客",
|
||
"icon": "el-icon-user",
|
||
},
|
||
"component": "vm/visitor"
|
||
},{
|
||
"name": "people",
|
||
"path": "/vm/people",
|
||
"meta": {
|
||
"title": "访客人员",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
},
|
||
"component": "vm/people"
|
||
}
|
||
,{
|
||
"name": "vistoradd",
|
||
"path": "/vm/vistoradd",
|
||
"meta": {
|
||
"title": "项目信息",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
},
|
||
"component": "vm/vistoradd"
|
||
},
|
||
|
||
|
||
]
|
||
},
|
||
{
|
||
"name": "wf",
|
||
"path": "/wf",
|
||
"meta": {
|
||
"title": "审批",
|
||
"icon": "el-icon-circle-check-filled",
|
||
"type": "menu",
|
||
"perms": ["wf"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "workflow",
|
||
"path": "/wf/workflow",
|
||
"meta": {
|
||
"title": "工作流",
|
||
"icon": "el-icon-guide",
|
||
"perms": ["workflow"]
|
||
},
|
||
"component": "wf/workflow"
|
||
},
|
||
{
|
||
"name": "configuration",
|
||
"path": "/wf/configuration",
|
||
"meta": {
|
||
"title": "工作流配置",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["workflow"]
|
||
},
|
||
"component": "wf/configuration"
|
||
}
|
||
,
|
||
{
|
||
"name": "allwork",
|
||
"path": "/wf/allwork",
|
||
"meta": {
|
||
"title": "全部工单",
|
||
"icon": "el-icon-folder",
|
||
"perms": ["allwork"]
|
||
|
||
},
|
||
"component": "wf/allwork"
|
||
} ,
|
||
{
|
||
"name": "ownerwork",
|
||
"path": "/wf/ownerwork",
|
||
"meta": {
|
||
"title": "我创建的",
|
||
"icon": "el-icon-folder-add",
|
||
"perms": ["ownerwork"]
|
||
},
|
||
"component": "wf/ownerwork"
|
||
}
|
||
,
|
||
|
||
{
|
||
"name": "duty",
|
||
"path": "/wf/dutywork",
|
||
"meta": {
|
||
"title": "待办工单",
|
||
"icon": "el-icon-folder-opened",
|
||
"perms": ["duty"]
|
||
},
|
||
"component": "wf/dutywork"
|
||
},
|
||
{
|
||
"name": "worked",
|
||
"path": "/wf/worked",
|
||
"meta": {
|
||
"title": "我处理的",
|
||
"icon": "el-icon-expand",
|
||
"perms": ["worked"]
|
||
},
|
||
"component": "wf/worked"
|
||
},
|
||
{
|
||
"name": "ccwork",
|
||
"path": "/wf/ccwork",
|
||
"meta": {
|
||
"title": "抄送我的",
|
||
"icon": "el-icon-edit-pen",
|
||
"perms": ["ccwork"]
|
||
},
|
||
"component": "wf/ccwork"
|
||
},
|
||
{
|
||
"name": "ticketdetail",
|
||
"path": "/wf/ticketdetail",
|
||
"meta": {
|
||
"title": "工单详情",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
},
|
||
"component": "wf/ticketdetail"
|
||
},
|
||
]
|
||
},
|
||
{
|
||
"name": "am",
|
||
"path": "/am",
|
||
"meta": {
|
||
"title": "区域",
|
||
"icon": "el-icon-location-filled",
|
||
"type": "menu",
|
||
"perms": ["am"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "area",
|
||
"path": "/am/area",
|
||
"meta": {
|
||
"title": "区域列表",
|
||
"icon": "el-icon-tickets",
|
||
"perms": ["area"]
|
||
},
|
||
"component": "am/area"
|
||
},
|
||
{
|
||
"name": "eqm",
|
||
"path": "/am/eqm",
|
||
"meta": {
|
||
"title": "门禁通道",
|
||
"icon": "el-icon-phone",
|
||
"perms": ["eqm"]
|
||
},
|
||
"component": "am/em1"
|
||
},
|
||
{
|
||
"name": "monitor",
|
||
"path": "/am/monitor",
|
||
"meta": {
|
||
"title": "视频通道",
|
||
"icon": "el-icon-video-camera",
|
||
"perms": ["monitor"]
|
||
},
|
||
"component": "am/monitor"
|
||
},
|
||
{
|
||
"name": "audio",
|
||
"path": "/am/audio",
|
||
"meta": {
|
||
"title": "喇叭通道",
|
||
"icon": "el-icon-mic",
|
||
"perms": ["audio"]
|
||
},
|
||
"component": "am/audio"
|
||
},{
|
||
"name": "blt",
|
||
"path": "/am/blt",
|
||
"meta": {
|
||
"title": "定位标签",
|
||
"icon": "el-icon-map-location",
|
||
"perms": ["blt"]
|
||
},
|
||
"component": "am/blt"
|
||
},
|
||
]
|
||
},
|
||
{
|
||
"name": "hrm",
|
||
"path": "/hrm",
|
||
"meta": {
|
||
"title": "人事",
|
||
"icon": "el-icon-platform",
|
||
"type": "menu",
|
||
"perms": ["hrm"]
|
||
},
|
||
"children": [
|
||
|
||
{
|
||
"name": "employee",
|
||
"path": "/hrm/employee",
|
||
"meta": {
|
||
"title": "人员信息",
|
||
"icon": "el-icon-user",
|
||
"perms": ["employee"]
|
||
},
|
||
"component": "hrm/employee"
|
||
}
|
||
,
|
||
{
|
||
"name": "certificate",
|
||
"path": "/hrm/certificate",
|
||
"meta": {
|
||
"title": "证书列表",
|
||
"icon": "el-icon-tickets",
|
||
"perms": ["certificate"]
|
||
},
|
||
"component": "hrm/certificate"
|
||
}
|
||
,
|
||
{
|
||
"name": "clockRecord",
|
||
"path": "/hrm/clock_record",
|
||
"meta": {
|
||
"title": "打卡记录",
|
||
"icon": "el-icon-check",
|
||
"perms": ["clock_record"]
|
||
},
|
||
"component": "hrm/clock_record"
|
||
},
|
||
{
|
||
"name": "certificate",
|
||
"path": "/hrm/certificate",
|
||
"meta": {
|
||
"title": "相关证书",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true,
|
||
"perms": ["employee"]
|
||
|
||
},
|
||
"component": "hrm/certificate"
|
||
},
|
||
|
||
]
|
||
},
|
||
{
|
||
"name": "sys",
|
||
"path": "/sys",
|
||
"meta": {
|
||
"title": "系统",
|
||
"icon": "el-icon-tools",
|
||
"type": "menu",
|
||
"perms": ["sys"]
|
||
},
|
||
"children": [
|
||
{
|
||
"path": "/sys/user",
|
||
"name": "user",
|
||
"meta": {
|
||
"title": "账户管理",
|
||
"icon": "el-icon-user",
|
||
"type": "menu",
|
||
"perms": ["user"]
|
||
},
|
||
"component": "sys/user"
|
||
},
|
||
{
|
||
"path": "/sys/dept",
|
||
"name": "dept",
|
||
"meta": {
|
||
"title": "部门管理",
|
||
"icon": "sc-icon-organization",
|
||
"type": "menu",
|
||
"perms": ["dept"]
|
||
},
|
||
"component": "sys/dept"
|
||
},
|
||
{
|
||
"path": "/sys/post",
|
||
"name": "post",
|
||
"meta": {
|
||
"title": "岗位管理",
|
||
"icon": "el-icon-postcard",
|
||
"type": "menu",
|
||
"perms": ["post"]
|
||
},
|
||
"component": "sys/post"
|
||
},
|
||
{
|
||
"path": "/sys/role",
|
||
"name": "role",
|
||
"meta": {
|
||
"title": "角色管理",
|
||
"icon": "el-icon-notebook",
|
||
"type": "menu",
|
||
"perms": ["role"]
|
||
},
|
||
"component": "sys/role"
|
||
},
|
||
{
|
||
"path": "/sys/dict",
|
||
"name": "dict",
|
||
"meta": {
|
||
"title": "字典管理",
|
||
"icon": "el-icon-document",
|
||
"type": "menu",
|
||
"perms": ["dict"]
|
||
},
|
||
"component": "sys/dict"
|
||
},
|
||
{
|
||
"path": "/sys/task",
|
||
"name": "task",
|
||
"meta": {
|
||
"title": "计划任务",
|
||
"icon": "el-icon-alarm-clock",
|
||
"type": "menu",
|
||
"perms": ["task"]
|
||
},
|
||
"component": "sys/task"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"name": "ops",
|
||
"path": "/ops",
|
||
"meta": {
|
||
"title": "运维",
|
||
"icon": "el-icon-wallet-filled",
|
||
"type": "menu",
|
||
"perms": ["ops"]
|
||
},
|
||
"children": [
|
||
{
|
||
"name": "menu",
|
||
"path": "/ops/menu",
|
||
"meta": {
|
||
"title": "菜单管理",
|
||
"icon": "el-icon-fold",
|
||
"perms": ["menu"]
|
||
},
|
||
"component": "ops/menu"
|
||
},
|
||
{
|
||
"name": "log",
|
||
"path": "/ops/log",
|
||
"meta": {
|
||
"title": "请求日志",
|
||
"icon": "el-icon-document",
|
||
"perms": ["log"]
|
||
},
|
||
"component": "ops/log_request"
|
||
},
|
||
{
|
||
"name": "thirdLogs",
|
||
"path": "/ops/thirdLogs",
|
||
"meta": {
|
||
"title": "第三方日志",
|
||
"icon": "el-icon-document",
|
||
"perms": ["third_log"]
|
||
},
|
||
"component": "ops/thirdLogs"
|
||
},
|
||
{
|
||
"name": "fileLogs",
|
||
"path": "/ops/fileLogs",
|
||
"meta": {
|
||
"title": "文件日志",
|
||
"icon": "el-icon-document",
|
||
"perms": ["file_log"]
|
||
},
|
||
"component": "ops/fileLogs"
|
||
},
|
||
{
|
||
"name": "server",
|
||
"path": "/ops/server",
|
||
"meta": {
|
||
"title": "服务器",
|
||
"icon": "el-icon-document",
|
||
"perms": ["ops"]
|
||
},
|
||
"component": "ops/server"
|
||
},
|
||
{
|
||
"name": "setting",
|
||
"path": "/ops/setting",
|
||
"meta": {
|
||
"title": "配置",
|
||
"icon": "el-icon-document",
|
||
"perms": ["ops"]
|
||
},
|
||
"component": "ops/setting"
|
||
},
|
||
]
|
||
},
|
||
]
|
||
|
||
|
||
export default routes;
|