621 lines
13 KiB
JavaScript
621 lines
13 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-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": "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-menu",
|
||
},
|
||
"component": "ecm/myevent"
|
||
},
|
||
{
|
||
"name": "notify_setting",
|
||
"path": "/ecm/notify_setting",
|
||
"meta": {
|
||
"title": "提醒配置",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "ecm/notify_setting"
|
||
},
|
||
|
||
{
|
||
"name": "algo",
|
||
"path": "/ecm/algo",
|
||
"meta": {
|
||
"title": "算法配置",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "ecm/algo"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"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": "configuration",
|
||
"path": "/wf/configuration",
|
||
"meta": {
|
||
"title": "工单",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "wf/configuration"
|
||
},
|
||
]
|
||
},
|
||
{
|
||
"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": "oplcate",
|
||
"path": "/opm/oplcate",
|
||
"meta": {
|
||
"title": "许可证分类",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "opm/oplcate"
|
||
},
|
||
,
|
||
{
|
||
"name": "opl",
|
||
"path": "/opm/opl",
|
||
"meta": {
|
||
"title": "作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/opl"
|
||
},
|
||
,
|
||
{
|
||
"name": "fire",
|
||
"path": "/opm/fire",
|
||
"meta": {
|
||
"title": "动火作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/fire"
|
||
},
|
||
,
|
||
{
|
||
"name": "space",
|
||
"path": "/opm/space",
|
||
"meta": {
|
||
"title": "有限空间作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/space"
|
||
},
|
||
,
|
||
{
|
||
"name": "clear",
|
||
"path": "/opm/clear",
|
||
"meta": {
|
||
"title": "清库作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/clear"
|
||
} ,
|
||
{
|
||
"name": "high",
|
||
"path": "/opm/high",
|
||
"meta": {
|
||
"title": "高处作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/high"
|
||
},
|
||
{
|
||
"name": "hoisting",
|
||
"path": "/opm/hoisting",
|
||
"meta": {
|
||
"title": "吊装作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/hoisting"
|
||
},
|
||
{
|
||
"name": "preheat",
|
||
"path": "/opm/preheat",
|
||
"meta": {
|
||
"title": "预热器清堵作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/preheat"
|
||
},
|
||
{
|
||
"name": "cooler",
|
||
"path": "/opm/cooler",
|
||
"meta": {
|
||
"title": "篦冷机清大块作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/cooler"
|
||
},
|
||
,
|
||
{
|
||
"name": "soil",
|
||
"path": "/opm/soil",
|
||
"meta": {
|
||
"title": "动土作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/soil"
|
||
},
|
||
{
|
||
"name": "usecl",
|
||
"path": "/opm/usecl",
|
||
"meta": {
|
||
"title": "临时用电作业许可证",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "opm/usecl"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"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": "rcertificate",
|
||
"path": "/rpm/rcertificate",
|
||
"meta": {
|
||
"title": "人员证书",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "rpm/rcertificate"
|
||
},
|
||
{
|
||
"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": "rpjadd",
|
||
"path": "/rpm/rpjadd",
|
||
"meta": {
|
||
"title": "入厂项目相关信息",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "rpm/rpjadd"
|
||
},
|
||
|
||
]
|
||
},
|
||
{
|
||
"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": "visitor",
|
||
"path": "/vm/visitor",
|
||
"meta": {
|
||
"title": "来访人员",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "vm/visitor"
|
||
},{
|
||
"name": "people",
|
||
"path": "/vm/people",
|
||
"meta": {
|
||
"title": "访客人员",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "vm/people"
|
||
},
|
||
]
|
||
},
|
||
{
|
||
"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": "monitor",
|
||
"path": "/am/monitor",
|
||
"meta": {
|
||
"title": "视频通道",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "am/monitor"
|
||
},
|
||
{
|
||
"name": "audio",
|
||
"path": "/am/audio",
|
||
"meta": {
|
||
"title": "喇叭通道",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "am/audio"
|
||
},
|
||
]
|
||
},
|
||
{
|
||
"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": "certificates",
|
||
"path": "/hrm/certificates",
|
||
"meta": {
|
||
"title": "证书列表",
|
||
"icon": "el-icon-menu",
|
||
},
|
||
"component": "hrm/certificates"
|
||
}
|
||
,
|
||
{
|
||
"name": "certificate",
|
||
"path": "/hrm/certificate",
|
||
"meta": {
|
||
"title": "相关证书",
|
||
"icon": "el-icon-menu",
|
||
"hidden": true
|
||
},
|
||
"component": "hrm/certificate"
|
||
},
|
||
|
||
]
|
||
},
|
||
{
|
||
"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;
|