| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- 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: '登录',
- },
- },
- ];
- /**
- * 管理后台的路由
- *
- * 菜单分组说明:
- * 信息总览 — 首页仪表盘
- * 站点管理 — 站点清单、设备、站点账户、故障订阅
- * 用户管理 — 用户列表、用户资金流
- * 订单管理 — 订单记录
- * 财务管理 — 充值、退款、提现、结算、分账、线下充值
- * 营销管理 — 横幅广告、专属优惠活动
- * 平台配置 — 平台费率、设备配置、充值配置
- * 系统管理 — 运维用户、角色权限、数据字典、操作日志
- * 运营管理 — 公告、消息、模板、FAQ、反馈
- */
- export const adminRoutes: Array<RouteRecordRaw> = [
- {
- path: '/',
- name: 'admin',
- component: () => import('/@/layout/index.vue'),
- redirect: '/home',
- meta: {
- isKeepAlive: true,
- title: 'Yeswash管理后台'
- },
- children: [
- // ==================== 1. 信息总览 ====================
- {
- path: '/home',
- name: 'adminHome1',
- component: () => import('/@/views/admin/index.vue'),
- meta: {
- title: '信息总览',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Monitor',
- }
- },
- // ==================== 2. 站点管理 ====================
- {
- 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: "washDevice.list,washStation.list,faultSubscriber.list,faultRecord.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: "washStation.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: "washDevice.list",
- icon: 'ele-Cpu',
- },
- },
- {
- path: '/station/account',
- name: 'adminStationAccount',
- component: () => import('/@/views/admin/station/account/index.vue'),
- meta: {
- title: '站点账户',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "washDevice.list",
- icon: 'ele-Wallet',
- },
- },
- {
- path: '/station/fault',
- name: 'adminStationFault',
- component: () => import('/@/views/admin/station/fault/index.vue'),
- meta: {
- title: '故障订阅',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "faultSubscriber.list",
- icon: 'ele-Bell',
- },
- },
- ]
- },
- // ==================== 3. 用户管理 ====================
- {
- path: '/user',
- name: 'adminUser',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/account',
- meta: {
- title: '用户管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-User',
- perm: "account.list",
- },
- children: [
- {
- path: '/account',
- name: 'adminAccount',
- component: () => import('/@/views/admin/account/index.vue'),
- meta: {
- title: '用户列表',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-List',
- perm: "account.list",
- }
- },
- {
- path: '/walletFlow',
- name: 'adminFinanceWalletFlow',
- component: () => import('/@/views/admin/finance/wallet-flow.vue'),
- meta: {
- title: '用户资金流',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Money',
- perm: "",
- },
- },
- ]
- },
- // ==================== 4. 订单管理 ====================
- {
- path: '/ordering',
- name: 'adminOrdering',
- component: () => import('/@/views/admin/ordering/index.vue'),
- meta: {
- title: '订单管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Document',
- perm: "washOrder.list",
- }
- },
- // ==================== 5. 财务管理 ====================
- {
- path: '/finance',
- name: 'adminFinance',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/finance/recharge',
- meta: {
- title: '财务管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Money',
- perm: "recharge.list,refundLog.list,withdrawnRecord.list,settlement.list,offlineRecharge",
- },
- children: [
- {
- path: '/finance/recharge',
- name: 'adminFinanceRecharge',
- component: () => import('/@/views/admin/finance/index.vue'),
- meta: {
- title: '充值记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Finished',
- perm: "recharge.list",
- },
- },
- {
- path: '/offlineRecharge',
- name: 'adminOfflineRecharge',
- component: () => import('/@/views/admin/finance/offline-recharge.vue'),
- meta: {
- title: '线下充值',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Sell',
- perm: "offlineRecharge",
- },
- },
- {
- path: '/refund',
- name: 'adminFinanceRefund',
- component: () => import('/@/views/admin/finance/refund.vue'),
- meta: {
- title: '退款清单',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Warning',
- perm: "refundLog.list",
- },
- },
- {
- path: '/withdraw',
- name: 'adminFinanceWithdraw',
- component: () => import('/@/views/admin/finance/withdraw.vue'),
- meta: {
- title: '提现记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Wallet',
- perm: "withdrawnRecord.list",
- },
- },
- {
- path: '/finance/settlement',
- name: 'adminFinanceSettlement',
- component: () => import('/@/views/admin/finance/settlement.vue'),
- meta: {
- title: '结算记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Calendar',
- perm: "settlement.list",
- },
- },
- {
- path: '/financeSR',
- name: 'adminSplitRecord',
- component: () => import('/@/views/admin/finance/splitRecord.vue'),
- meta: {
- title: '分账记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Connection',
- perm: "recharge.list",
- },
- },
- ]
- },
- // ==================== 6. 数据统计 ====================
- {
- path: '/statistics',
- name: 'adminStatistics',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/statistics/dailyStat',
- meta: {
- title: '数据统计',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-DataAnalysis',
- perm: "dailyStat.list,monthStat.list",
- },
- children: [
- {
- path: '/statistics/dailyStat',
- name: 'adminStatisticsDailyStat',
- component: () => import('/@/views/admin/statistics/daily-stat.vue'),
- meta: {
- title: '日统计',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-DataLine',
- perm: "dailyStat.list",
- },
- },
- {
- path: '/statistics/monthStat',
- name: 'adminStatisticsMonthStat',
- component: () => import('/@/views/admin/statistics/month-stat.vue'),
- meta: {
- title: '月统计',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-PieChart',
- perm: "monthStat.list",
- },
- },
- ]
- },
- // ==================== 7. 营销管理 ====================
- {
- path: '/marketing',
- name: 'adminMarketing',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/banner',
- meta: {
- title: '营销管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Promotion',
- perm: "banner.list,promotion.list,parkingCouponRecord.list",
- },
- children: [
- {
- 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: '/platform/rechargePromotion',
- name: 'adminPlatformRechargePromotion',
- component: () => import('/@/views/admin/platform/rechargePromotion/index.vue'),
- meta: {
- title: '专属优惠活动',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "promotion.list",
- icon: 'ele-Present',
- },
- },
- {
- path: '/marketing/parkingCouponRecord',
- name: 'adminParkingCouponRecord',
- component: () => import('/@/views/admin/parking-coupon-record/index.vue'),
- meta: {
- title: '停车券发放记录',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "parkingCouponRecord.list",
- icon: 'ele-Tickets',
- },
- },
- ]
- },
- // ==================== 7. 平台配置 ====================
- {
- path: '/platform',
- name: 'adminPlatform',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/platform/rate',
- meta: {
- title: '平台配置',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Setting',
- perm: "platformFeeRate.list,rechargeConfig.list",
- },
- children: [
- {
- path: '/platform/rate',
- name: 'adminPlatformRate',
- component: () => import('/@/views/admin/platform/rate/index.vue'),
- meta: {
- title: '平台费率',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "platformFeeRate.list",
- icon: 'ele-Money',
- },
- },
- {
- path: '/platform/deviceConfig',
- name: 'adminPlatformDeviceConfig',
- component: () => import('/@/views/admin/platform/deviceConfig/index.vue'),
- meta: {
- title: '设备配置',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "platformFeeRate.list",
- icon: 'ele-Cpu',
- },
- },
- {
- path: '/platform/rechargeConfig',
- name: 'adminPlatformRechargeConfig',
- component: () => import('/@/views/admin/platform/rechargeConfig/index.vue'),
- meta: {
- title: '充值配置',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- perm: "rechargeConfig.list",
- icon: 'ele-Tickets',
- },
- },
- ]
- },
- // ==================== 8. 系统管理 ====================
- {
- path: '/system',
- name: 'adminSystem',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/org/user',
- 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/log',
- name: 'adminLog',
- component: () => import('/@/views/admin/log/opt/index.vue'),
- meta: {
- title: '操作日志',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Document',
- perm: "",
- },
- },
- ]
- },
- // ==================== 9. 运营管理 ====================
- {
- path: '/operation',
- name: 'adminOperation',
- component: () => import('/@/layout/routerView/parent.vue'),
- redirect: '/org/notice',
- meta: {
- title: '运营管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Notification',
- perm: "",
- },
- children: [
- {
- path: '/org/notice',
- name: 'adminNotice',
- component: () => import('/@/views/admin/notice/index.vue'),
- meta: {
- title: '系统公告',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Bell',
- perm: "",
- },
- },
- {
- path: '/org/message',
- name: 'adminMessage',
- component: () => import('/@/views/admin/message/index.vue'),
- meta: {
- title: '消息管理',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Message',
- perm: "",
- },
- },
- {
- path: '/org/template',
- name: 'adminTemplate',
- component: () => import('/@/views/admin/template/index.vue'),
- meta: {
- title: '消息模板',
- isLink: '',
- isHide: false,
- isKeepAlive: true,
- isAffix: false,
- isIframe: false,
- icon: 'ele-Files',
- perm: "",
- },
- },
- {
- 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-ChatLineSquare',
- perm: "",
- },
- },
- ]
- },
- ],
- },
- ]
|