747 lines
13 KiB
JavaScript
747 lines
13 KiB
JavaScript
// 静态路由配置
|
||
// 书写格式与动态路由格式一致,全部经由框架统一转换
|
||
// 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
|
||
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
|
||
// 示例如下
|
||
|
||
const routes = [
|
||
{
|
||
name: "view-search",
|
||
path:"/view-search",
|
||
component:"home/search/index",
|
||
meta: {
|
||
code:"",
|
||
icon: "sc-icon-Home",
|
||
title: "搜索",
|
||
},
|
||
},
|
||
|
||
{
|
||
name: "home",
|
||
path: "/home",
|
||
meta: {
|
||
icon: "sc-icon-Home",
|
||
title: "首页",
|
||
hidden: true
|
||
},
|
||
children: [{
|
||
name: "dashboard",
|
||
path: "/dashboard",
|
||
component: "home/console",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "控制台",
|
||
}
|
||
},{
|
||
name: "userCenter",
|
||
path: "/user-center",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "个人信息",
|
||
}
|
||
},{
|
||
name: "document",
|
||
path: "/document",
|
||
component: "docsManager/index",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "文档管理",
|
||
}
|
||
},{
|
||
name: "earlyWarning",
|
||
path: "/early-warning",
|
||
component: "earlyManager/index",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "预警管理",
|
||
}
|
||
},{
|
||
name: "mail",
|
||
path: "/mail",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "我的邮件",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "order",
|
||
path: "/order",
|
||
meta: {
|
||
icon: "sc-icon-order",
|
||
title: "维保工单",
|
||
hidden: true
|
||
},
|
||
children: [{
|
||
name: "order",
|
||
path: "/order",
|
||
component: "order/workOrder",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "维保工单",
|
||
}
|
||
},{
|
||
name: "plan",
|
||
path: "/plan",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "维保计划",
|
||
}
|
||
},{
|
||
name: "dataConfirm",
|
||
path: "/data-confirm",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "数据确认",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "stock",
|
||
path: "/stock",
|
||
meta: {
|
||
icon: "sc-icon-Stock",
|
||
title: "库存管理",
|
||
hidden:true
|
||
},
|
||
children: [{
|
||
name: "stock",
|
||
path: "/stock",
|
||
component: "home",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "库存列表",
|
||
}
|
||
},{
|
||
name: "statistics",
|
||
path: "/statistics",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "库存统计",
|
||
}
|
||
},{
|
||
name: "accessForm",
|
||
path: "/access-form",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "出入记录",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "sell",
|
||
path: "/sell",
|
||
meta: {
|
||
icon: "sc-icon-Shipment",
|
||
title: "出货管理",
|
||
hidden:true
|
||
},
|
||
children: [{
|
||
name: "shipment",
|
||
path: "/shipment",
|
||
component: "home",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "出货清单",
|
||
}
|
||
},{
|
||
name: "shipmentStatistics",
|
||
path: "/shipment-statistics",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "出货统计",
|
||
}
|
||
},{
|
||
name: "shipmentConfirm",
|
||
path: "/shipment-confirm",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "数据确认",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "finance",
|
||
path: "/finance",
|
||
meta: {
|
||
icon: "sc-icon-Finance",
|
||
title: "财务管理",
|
||
hidden:true
|
||
},
|
||
children: [{
|
||
name: "finance",
|
||
path: "/finance",
|
||
component: "home",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "费用成本",
|
||
}
|
||
},{
|
||
name: "financeSummary",
|
||
path: "/finance-summary",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "成本汇总",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "report",
|
||
path: "/report",
|
||
meta: {
|
||
icon: "sc-icon-ReportForms",
|
||
title: "报表统计",
|
||
hidden:true
|
||
},
|
||
children: [{
|
||
name: "report",
|
||
path: "/report",
|
||
component: "home",
|
||
meta: {
|
||
icon: "sc-icon-Console",
|
||
title: "维保报表",
|
||
}
|
||
},{
|
||
name: "outReport",
|
||
path: "/out-report",
|
||
component: "userCenter",
|
||
meta: {
|
||
icon: "sc-icon-UserInfo",
|
||
title: "出货报表",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "setting",
|
||
path: "/setting",
|
||
meta: {
|
||
icon: "sc-icon-Setup",
|
||
title: "系统设置",
|
||
hidden: true
|
||
},
|
||
children: [{
|
||
name: "system",
|
||
path: "/setting/system",
|
||
component: "setting/system",
|
||
meta: {
|
||
icon: "sc-icon-System",
|
||
title: "系统设置",
|
||
}
|
||
},{
|
||
name: "userManage",
|
||
path: "/setting/user",
|
||
component: "setting/user",
|
||
meta: {
|
||
icon: "sc-icon-UserManage",
|
||
title: "用户管理",
|
||
}
|
||
},{
|
||
name: "role",
|
||
path: "/setting/role",
|
||
component: "setting/role",
|
||
meta: {
|
||
icon: "sc-icon-RoleManage",
|
||
title: "角色管理",
|
||
}
|
||
},{
|
||
name: "dept",
|
||
path: "/setting/dept",
|
||
component: "setting/dept",
|
||
meta: {
|
||
icon: "sc-icon-DeptManage",
|
||
title: "部门管理",
|
||
}
|
||
},{
|
||
name: "log",
|
||
path: "/setting/log",
|
||
component: "setting/log",
|
||
meta: {
|
||
icon: "sc-icon-Log",
|
||
title: "系统日志",
|
||
}
|
||
},{
|
||
name: "client",
|
||
path: "/setting/client",
|
||
component: "setting/client",
|
||
meta: {
|
||
icon: "sc-icon-Application",
|
||
title: "应用管理",
|
||
}
|
||
},{
|
||
name: "dic",
|
||
path: "/setting/dic",
|
||
component: "setting/dic",
|
||
meta: {
|
||
icon: "sc-icon-Dictionary",
|
||
title: "字典管理",
|
||
}
|
||
},{
|
||
name: "menu",
|
||
path: "/setting/menu",
|
||
component: "setting/menu",
|
||
meta: {
|
||
icon: "sc-icon-MenuManage",
|
||
title: "菜单管理",
|
||
}
|
||
},{
|
||
name: "table",
|
||
path: "/setting/table",
|
||
component: "setting/table",
|
||
meta: {
|
||
icon: "sc-icon-TableManage",
|
||
title: "表格管理",
|
||
}
|
||
},{
|
||
name: "task",
|
||
path: "/setting/task",
|
||
component: "setting/task",
|
||
meta: {
|
||
icon: "sc-icon-TaskManage",
|
||
title: "任务管理",
|
||
}
|
||
}]
|
||
},
|
||
{
|
||
name: "other",
|
||
path: "/other",
|
||
meta: {
|
||
icon: "sc-icon-Other",
|
||
title: "其他",
|
||
hidden:true
|
||
},
|
||
children: [
|
||
{
|
||
name: "about",
|
||
path: "/other/about",
|
||
component: "other/about",
|
||
meta: {
|
||
icon: "sc-icon-AboutSet",
|
||
title: "关于设置",
|
||
}
|
||
},
|
||
{
|
||
name: "directive",
|
||
path: "/other/directive",
|
||
component: "other/directive",
|
||
meta: {
|
||
icon: "sc-icon-Instruct",
|
||
title: "指令设置",
|
||
}
|
||
},
|
||
{
|
||
name: "fullpage",
|
||
path: "/other/fullpage",
|
||
component: "other/fullpage",
|
||
meta: {
|
||
icon: "sc-icon-Page",
|
||
title: "页面设置",
|
||
}
|
||
},
|
||
{
|
||
name: "loadJS",
|
||
path: "/other/loadJS",
|
||
component: "other/loadJS",
|
||
meta: {
|
||
icon: "sc-icon-Loading",
|
||
title: "加载设置",
|
||
}
|
||
},
|
||
{
|
||
name: "verificate",
|
||
path: "/other/verificate",
|
||
component: "other/verificate",
|
||
meta: {
|
||
icon: "sc-icon-Authentication",
|
||
title: "认证设置",
|
||
}
|
||
},
|
||
{
|
||
name: "viewTags",
|
||
path: "/other/viewTags",
|
||
component: "other/viewTags",
|
||
meta: {
|
||
icon: "sc-icon-Tags",
|
||
title: "切换设置",
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
name: "template",
|
||
path: "/template",
|
||
meta: {
|
||
icon: "sc-icon-TemplateTest",
|
||
title: "模版",
|
||
hidden:true
|
||
},
|
||
children: [
|
||
{
|
||
name: "son",
|
||
path: "/template/list/son",
|
||
component: "template/list/son",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "列表管理",
|
||
}
|
||
},
|
||
{
|
||
name: "tab",
|
||
path: "/template/list/tab",
|
||
component: "template/list/tab",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "模块管理",
|
||
}
|
||
},
|
||
{
|
||
name: "tree",
|
||
path: "/template/list/tree",
|
||
component: "template/list/tree",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "树块管理",
|
||
}
|
||
},
|
||
{
|
||
name: "width",
|
||
path: "/template/list/width",
|
||
component: "template/list/width",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "宽度管理",
|
||
}
|
||
},
|
||
{
|
||
name: "other",
|
||
path: "/template/other/stepform",
|
||
component: "template/other/stepform",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "步骤管理",
|
||
}
|
||
},
|
||
{
|
||
name: "blank",
|
||
path: "/template/layout/blank",
|
||
component: "template/layout/blank",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "空白管理",
|
||
}
|
||
},
|
||
{
|
||
name: "layoutLCR",
|
||
path: "/template/layout/layout-lcr",
|
||
component: "template/layout/layoutLCR",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "模块lcr管理",
|
||
}
|
||
},
|
||
{
|
||
name: "layoutTCB",
|
||
path: "/template/layout/layout-tcb",
|
||
component: "template/layout/layoutTCB",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "模块tcb管理",
|
||
}
|
||
},
|
||
]
|
||
},
|
||
{
|
||
name: "vab",
|
||
path: "/vab",
|
||
meta: {
|
||
icon: "sc-icon-Function",
|
||
title: "功能",
|
||
hidden:true
|
||
},
|
||
children: [
|
||
{
|
||
name:"chart",
|
||
path: "/vab/chart",
|
||
component: "vab/chart",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "图表管理",
|
||
}
|
||
},
|
||
{
|
||
name:"codeeditor",
|
||
path: "/vab/codeeditor",
|
||
component: "vab/codeeditor",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "编辑管理",
|
||
}
|
||
},
|
||
{
|
||
name:"contextmenu",
|
||
path: "/vab/contextmenu",
|
||
component: "vab/contextmenu",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "菜单管理",
|
||
}
|
||
},
|
||
{
|
||
name:"cron",
|
||
path: "/vab/cron",
|
||
component: "vab/cron",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "时间规则",
|
||
}
|
||
},
|
||
{
|
||
name:"cropper",
|
||
path: "/vab/cropper",
|
||
component: "vab/cropper",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "图片裁剪",
|
||
}
|
||
},
|
||
{
|
||
name:"drag",
|
||
path: "/vab/drag",
|
||
component: "vab/drag",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "拖拽管理",
|
||
}
|
||
},
|
||
{
|
||
name:"editor",
|
||
path: "/vab/editor",
|
||
component: "vab/editor",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "编辑器",
|
||
}
|
||
},
|
||
{
|
||
name:"fileselect",
|
||
path: "/vab/fileselect",
|
||
component: "vab/fileselect",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "文件选择器",
|
||
}
|
||
},
|
||
{
|
||
name:"filterBar",
|
||
path: "/vab/filterBar",
|
||
component: "vab/filterBar",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "过滤器",
|
||
}
|
||
},
|
||
{
|
||
name:"form",
|
||
path: "/vab/form",
|
||
component: "vab/form",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "提交表格",
|
||
}
|
||
},
|
||
{
|
||
name:"formtable",
|
||
path: "/vab/formtable",
|
||
component: "vab/formtable",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "表格切换",
|
||
}
|
||
},
|
||
{
|
||
name:"iconfont",
|
||
path: "/vab/iconfont",
|
||
component: "vab/iconfont",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "图标",
|
||
}
|
||
},
|
||
{
|
||
name:"iconselect",
|
||
path: "/vab/iconselect",
|
||
component: "vab/iconselect",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "图标选择",
|
||
}
|
||
},
|
||
{
|
||
name:"importexport",
|
||
path: "/vab/importexport",
|
||
component: "vab/importexport",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "导入管理",
|
||
}
|
||
},
|
||
{
|
||
name:"mini",
|
||
path: "/vab/mini",
|
||
component: "vab/mini",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "迷你器",
|
||
}
|
||
},
|
||
{
|
||
name:"print",
|
||
path: "/vab/print",
|
||
component: "vab/print",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "打印管理",
|
||
}
|
||
},
|
||
{
|
||
name:"qrcode",
|
||
path: "/vab/qrcode",
|
||
component: "vab/qrcode",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "二维码",
|
||
}
|
||
},
|
||
{
|
||
name:"select",
|
||
path: "/vab/select",
|
||
component: "vab/select",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "选择器",
|
||
}
|
||
},
|
||
{
|
||
name:"selectFilter",
|
||
path: "/vab/selectFilter",
|
||
component: "vab/selectFilter",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "选择过滤器",
|
||
}
|
||
},
|
||
{
|
||
name:"statistic",
|
||
path: "/vab/statistic",
|
||
component: "vab/statistic",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "合计卡片",
|
||
}
|
||
},
|
||
{
|
||
name:"tableselect",
|
||
path: "/vab/tableselect",
|
||
component: "vab/tableselect",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "表格选择器",
|
||
}
|
||
},
|
||
{
|
||
name:"upload",
|
||
path: "/vab/upload",
|
||
component: "vab/upload",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "上传器",
|
||
}
|
||
},
|
||
{
|
||
name:"video",
|
||
path: "/vab/video",
|
||
component: "vab/video",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "视频器",
|
||
}
|
||
},
|
||
{
|
||
name:"watermark",
|
||
path: "/vab/watermark",
|
||
component: "vab/watermark",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "水印",
|
||
}
|
||
},
|
||
{
|
||
name:"workflow",
|
||
path: "/vab/workflow",
|
||
component: "vab/workflow",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "审核流程",
|
||
}
|
||
},
|
||
{
|
||
name: "dialog",
|
||
path: "/vab/dialog/index",
|
||
component: "vab/dialog/index",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "弹窗管理",
|
||
}
|
||
},
|
||
{
|
||
name: "base",
|
||
path: "/vab/table/base",
|
||
component: "vab/table/base",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "表格管理",
|
||
}
|
||
},
|
||
{
|
||
name: "column",
|
||
path: "/vab/table/column",
|
||
component: "vab/table/column",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "列配置",
|
||
}
|
||
},
|
||
{
|
||
name: "remote",
|
||
path: "/vab/table/remote",
|
||
component: "vab/table/remote",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "远程配置",
|
||
}
|
||
},
|
||
{
|
||
name: "thead",
|
||
path: "/vab/table/thead",
|
||
component: "vab/table/thead",
|
||
meta: {
|
||
icon: "el-icon-menu",
|
||
title: "表头配置",
|
||
}
|
||
},
|
||
]
|
||
}
|
||
]
|
||
|
||
// const routes = []
|
||
|
||
export default routes;
|