| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- import {RouteRecordRaw} from 'vue-router';
- /**
- * 建议:路由 path 路径与文件夹名称相同,找文件可浏览器地址找,方便定位文件位置
- *
- * 路由meta对象参数说明
- * meta: {
- * title: 菜单栏及 tagsView 栏、菜单搜索名称(国际化)
- * isLink: 是否超链接菜单,开启外链条件,`1、isLink: 链接地址不为空 2、isIframe:false`
- * isHide: 是否隐藏此路由
- * isKeepAlive: 是否缓存组件状态
- * isAffix: 是否固定在 tagsView 栏上
- * isIframe: 是否内嵌窗口,开启条件,`1、isIframe:true 2、isLink:链接地址不为空`
- * roles: 当前路由权限标识,取角色管理。控制路由显示、隐藏。超级管理员:admin 普通角色:common
- * icon: 菜单、tagsView 图标,阿里:加 `iconfont xxx`,fontawesome:加 `fa xxx`
- * }
- */
- // 扩展 RouteMeta 接口
- declare module 'vue-router' {
- interface RouteMeta {
- title?: string;
- isLink?: string;
- isHide?: boolean;
- isKeepAlive?: boolean;
- isAffix?: boolean;
- isIframe?: boolean;
- roles?: string[];
- icon?: string;
- }
- }
- /**
- * 定义404、401界面
- * @link 参考:https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
- */
- export const notFoundAndNoPower = [
- {
- path: '/:path(.*)*',
- name: 'notFound',
- component: () => import('/@/views/error/404.vue'),
- meta: {
- title: 'message.staticRoutes.notFound',
- isHide: true,
- },
- },
- {
- path: '/401',
- name: 'noPower',
- component: () => import('/@/views/error/401.vue'),
- meta: {
- title: 'message.staticRoutes.noPower',
- isHide: true,
- },
- },
- ];
- /**
- * 前端路由
- * 此路由不要动,前端添加路由的话,请在 `dynamicRoutes 数组` 中添加
- * @description 前端控制直接改 dynamicRoutes 中的路由,后端控制不需要修改,请求接口路由数据时,会覆盖 dynamicRoutes 第一个顶级 children 的内容(全屏,不包含 layout 中的路由出口)
- * @returns 返回路由菜单数据
- */
- export const staticRoutes: Array<RouteRecordRaw> = [
- {
- path: '/login',
- name: 'login',
- component: () => import('/@/views/login/index.vue'),
- meta: {
- title: '登录',
- },
- },
- ];
- /**
- * 管理后台的路由 },
- */
- export const adminRoutes: Array<RouteRecordRaw> = [
- {
- path: '/',
- name: 'admin',
- component: () => import('/@/layout/index.vue'),
- redirect: '/home',
- meta: {
- isKeepAlive: true,
- title: 'iWash管理后台'
- },
- children: [
- {
- path: '/home',
- name: 'adminHome1',
- component: () => import('/@/views/admin/index.vue'),
- meta: {
- title: '信息总览',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Monitor',
- color: 'yellow'
- // perm:'admin'
- }
- },
- // {
- // path: '/kanban',
- // name: 'adminKanban',
- // component: () => import('/@/views/admin/kanban/index.vue'),
- // meta: {
- // title: '数据看板',
- // isLink: '',
- // isHide: false,
- // isKeepAlive: true,
- // isAffix: false,
- // isIframe: false,
- // icon: 'ele-PictureRounded',
- // perm:"kanban.list",
- // }
- // },
- {
- path: '/station',
- name: 'adminStation',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/station/list',
- meta: {
- title: '洗车站',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-MapLocation',
- perm:"equipment.list,station.list,stationStatMonth.list,statement.list",
- },
- children: [
- {
- path: '/station/list',
- name: 'adminStationList',
- component: () => import('/@/views/admin/station/list/index.vue'),
- meta: {
- title: '网点清单',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm:"station.list",
- icon: 'ele-OfficeBuilding',
- },
- },
- {
- path: '/station/device/:id',
- name: 'adminStationDevice',
- component: () => import('/@/views/admin/station/device/index.vue'),
- meta: {
- title: '洗车机',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm:"equipment.list",
- icon: 'ele-User',
- },
- },
- // {
- // path: '/station/statMonth',
- // name: 'adminStationStatMonth',
- // component: () => import('/@/views/admin/station/stat/index.vue'),
- // meta: {
- // title: '站点月表',
- // isLink: '',
- // isHide: false,
- // isKeepAlive: true,
- // isAffix: false,
- // isIframe: false,
- // perm:"stationStatMonth.list",
- // icon: 'ele-Histogram',
- // },
- // },
- // {
- // path: '/station/statement',
- // name: 'adminStatement',
- // component: () => import('/@/views/admin/station/statment/index.vue'),
- // meta: {
- // title: '对账单',
- // isLink: '',
- // isHide: false,
- // isKeepAlive: true,
- // isAffix: false,
- // isIframe: false,
- // perm:"statement.list",
- // icon: 'ele-CreditCard',
- // },
- // },
- ]
- },
- // {
- // path: '/investor',
- // name: 'adminInvestor',
- // component: () => import('/@/views/admin/investor/index.vue'),
- // meta: {
- // title: '投资者/物业',
- // isLink: '',
- // isHide: false,
- // isKeepAlive: true,
- // isAffix: false,
- // isIframe: false,
- // icon: 'ele-Avatar',
- // perm:"investor.list",
- // }
- // },
- {
- path: '/banner',
- name: 'adminBanner',
- component: () => import('/@/views/admin/banner/index.vue'),
- meta: {
- title: '横幅广告',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-PictureRounded',
- perm:"banner.list",
- }
- },
- {
- path: '/ordering',
- name: 'adminOrdering',
- component: () => import('/@/views/admin/ordering/index.vue'),
- meta: {
- title: '订单管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Money',
- perm:"order.list",
- }
- },
- {
- path: '/account',
- name: 'adminAccount',
- component: () => import('/@/views/admin/account/index.vue'),
- meta: {
- title: '用户列表',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-User',
- perm:"account.list",
- }
- },
- {
- path: '/finance',
- name: 'adminFinance',
- component: () => import('/@/views/admin/finance/index.vue'),
- meta: {
- title: '充值记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Wallet',
- perm:"recharge.list",
- },
- },
- {
- path: '/org',
- name: 'adminOrg',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/admin/org/department',
- meta: {
- title: '系统配置',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Tools',
- perm:"user.list,role.list,dict.list",
- },
- children: [
- {
- path: '/org/user',
- name: 'orgUser',
- component: () => import('/@/views/admin/user/index.vue'),
- meta: {
- title: '运维用户',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm:"user.list",
- icon: 'ele-User',
- },
- },
- {
- path: '/org/role',
- name: 'orgRole',
- component: () => import('/@/views/admin/role/index.vue'),
- meta: {
- title: '角色权限',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm:"role.list",
- icon: 'ele-Compass',
- },
- },
- {
- path: '/org/dict',
- name: 'orgDict',
- component: () => import('/@/views/admin/dict/index.vue'),
- meta: {
- title: '数据字典',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm:"dict.list",
- icon: 'ele-Collection',
- },
- },
- {
- path: '/org/faq',
- name: 'adminFaq',
- component: () => import('/@/views/admin/faq/index.vue'),
- meta: {
- title: '常见问题',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Tickets',
- perm:"",
- },
- },
- {
- path: '/org/feedback',
- name: 'adminFeedback',
- component: () => import('/@/views/admin/feedback/index.vue'),
- meta: {
- title: '反馈上报',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Tickets',
- perm:"",
- },
- },
- ]
- },
- /* {
- path: '/optList',
- name: 'adminOptList',
- component: () => import('/@/views/admin/log/opt/index.vue'),
- meta: {
- title: '操作日志',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Cpu',
- }
- },*/
- ],
- },
- ]
|