1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927 |
- import { defineMock } from './base'
- export default defineMock([
- {
- url: 'menus/routes',
- method: ['GET'],
- body: {
- code: '200',
- data: [
- {
- path: '/myTest',
- component: 'Layout',
- redirect: '/myTest/test',
- name: 'MyTest',
- meta: {
- title: '我的训练',
- icon: 'train',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'test',
- component: 'myTest/test/index',
- name: 'Test',
- meta: {
- title: '我的训练',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'achievement/:id',
- component: 'myTest/achievement/index',
- name: 'Achievement',
- meta: {
- title: '我的成绩',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/evaluate',
- component: 'Layout',
- redirect: '/evaluate/rehabilitation',
- name: 'Evaluate',
- meta: {
- title: '我的评定',
- icon: 'reh-evaluation',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'rehabilitation',
- component: 'evaluate/rehabilitation/index',
- name: 'EvaluateRehabilitation',
- meta: {
- title: '我的康复评定',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'device',
- component: 'evaluate/device/index',
- name: 'EvaluateDevice',
- meta: {
- title: '设备授权',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'content',
- component: 'evaluate/content/index',
- name: 'EvaluateContent',
- meta: {
- title: '开始康复评定',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/doctor',
- component: 'Layout',
- redirect: '/doctor/chat',
- name: 'Doctor',
- meta: {
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'chat',
- component: 'doctor/chat/index',
- name: 'DoctorChat',
- meta: {
- title: '我的医生',
- icon: 'chat',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/doctor',
- name: 'Doctor',
- component: 'Layout',
- redirect: '/doctor/chat',
- children: [
- {
- path: 'chat',
- component: 'doctor/chat/index',
- name: 'DoctorChat',
- meta: {
- title: '我的医生',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/information',
- component: 'Layout',
- redirect: '/information/manage',
- name: 'Information',
- meta: {
- title: '我的信息',
- icon: 'info',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'manage',
- component: 'information/manage/index',
- name: 'InformationManage',
- meta: {
- title: '我的信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'updatePsw',
- component: 'information/updatePsw/index',
- name: 'InformationUpdatePsw',
- meta: {
- title: '修改密码',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/tester-manage',
- component: 'Layout',
- redirect: '/tester-manage/manage',
- name: 'TesterManage',
- meta: {
- title: '受试者信息管理',
- icon: 'info-mr',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'manage',
- component: 'tester/manage/manage/index',
- name: 'TesterManageIndex',
- meta: {
- title: '受试者管理',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'add',
- component: 'tester/manage/add/index',
- name: 'TesterManageAdd',
- meta: {
- title: '新增受试者账号',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'rehabilitationGoals',
- component: 'tester/manage/rehabilitationGoals/index',
- name: 'TesterManageRehabilitationGoals',
- meta: {
- title: '康复目标',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'userInfo',
- component: 'information/manage/index',
- name: 'TesterManageUserInfo',
- meta: {
- title: '自然信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'medicalRecordInformation',
- component: 'tester/manage/medicalRecordInformation/index',
- name: 'TesterManageMedicalRecordInformation',
- meta: {
- title: '病例信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'rehabilitationTraining',
- component: 'tester/manage/rehabilitationTraining/index',
- redirect: '/rehabilitationTraining/training',
- name: 'TesterManageRehabilitationTraining',
- meta: {
- title: '康复训练',
- icon: '',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'training',
- component: 'tester/manage/rehabilitationTraining/training/index',
- name: 'TesterManageRehabilitationTrainingIndex',
- meta: {
- title: '康复训练',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'add',
- component: 'tester/manage/rehabilitationTraining/add/index',
- name: 'TesterManageRehabilitationTrainingAdd',
- meta: {
- title: '增加训练',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'scoreList/:id',
- component: 'myTest/achievement/index',
- name: 'TesterManageRehabilitationTrainingScoreList',
- meta: {
- title: '康复训练成绩',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- }
- ]
- },
- {
- path: '/tester-scheduling',
- component: 'Layout',
- redirect: '/tester-scheduling/scheduling',
- name: 'TesterScheduling',
- meta: {
- title: '受试者训练排期',
- icon: 'arrange',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'scheduling',
- component: 'tester/scheduling/scheduling/index',
- name: 'TesterSchedulingIndex',
- meta: {
- title: '训练排期',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'deviceMgr',
- component: 'tester/scheduling/deviceMgr/index',
- name: 'TesterSchedulingDeviceMgr',
- meta: {
- title: '设备管理',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/tester-evaluation',
- component: 'Layout',
- name: 'TesterEvaluation',
- meta: {
- title: '受试者康复评定',
- icon: 'reh-evaluation',
- hidden: false,
- roles: ['ADMIN'],
- alwaysShow: true
- },
- children: [
- {
- path: 'infos',
- component: 'tester/evaluation/infos/index',
- name: 'TesterEvaluationInfos',
- meta: {
- title: '受试者信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'log/:id',
- component: 'tester/evaluation/log/index',
- name: 'TesterEvaluationLog',
- meta: {
- title: '评定记录',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: false
- }
- },
- {
- path: 'evaluation/:id',
- component: 'tester/evaluation/evaluation/index',
- name: 'TesterEvaluationEvaluation',
- meta: {
- title: '开始康复评定',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: false
- }
- },
- {
- path: 'scoreList/:id',
- component: 'myTest/achievement/index',
- name: 'TesterEvaluationScoreList',
- meta: {
- title: '康复评定成绩',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: false
- }
- },
- {
- path: 'report/:id',
- component: 'tester/evaluation/report/index',
- name: 'TesterEvaluationReport',
- meta: {
- title: '评定报告',
- icon: '',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: false
- }
- }
- ]
- },
- {
- path: '/doc-information',
- component: 'Layout',
- redirect: '/doc-information/manage',
- name: 'DocInformation',
- meta: {
- title: '医生信息管理',
- icon: 'info-mr-d',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'manage',
- component: 'information/manage/doc',
- name: 'DocInformationManage',
- meta: {
- title: '个人信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'updatePsw',
- component: 'information/updatePsw/index',
- name: 'DocInformationUpdatePsw',
- meta: {
- title: '修改密码',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'chat-list',
- component: 'information/chatList/index',
- name: 'DocInformationChatList',
- meta: {
- title: '留言信息',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/game-center',
- component: 'Layout',
- redirect: '/game-center/manage',
- name: 'GameCenter',
- meta: {
- title: '游戏中心',
- icon: 'game',
- hidden: false,
- roles: ['ADMIN'],
- alwaysShow: true
- },
- children: [
- {
- path: 'manage',
- component: 'gameCenter/manage/index',
- name: 'GameCenterManage',
- meta: {
- title: '游戏管理',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/system',
- component: 'Layout',
- redirect: '/system/user',
- name: '/system',
- meta: {
- title: '系统管理',
- icon: 'system',
- hidden: true,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'user',
- component: 'system/user/index',
- name: 'User',
- meta: {
- title: '用户管理',
- icon: 'user',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'role',
- component: 'system/role/index',
- name: 'Role',
- meta: {
- title: '角色管理',
- icon: 'role',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'menu',
- component: 'system/menu/index',
- name: 'Menu',
- meta: {
- title: '菜单管理',
- icon: 'menu',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'dept',
- component: 'system/dept/index',
- name: 'Dept',
- meta: {
- title: '部门管理',
- icon: 'tree',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'dict',
- component: 'system/dict/index',
- name: 'Dict',
- meta: {
- title: '字典管理',
- icon: 'dict',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/api',
- component: 'Layout',
- name: '/api',
- meta: {
- title: '接口文档',
- icon: 'api',
- hidden: true,
- roles: ['ADMIN'],
- alwaysShow: true
- },
- children: [
- {
- path: 'apifox',
- component: 'demo/api/apifox',
- name: 'Apifox',
- meta: {
- title: 'Apifox',
- icon: 'api',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'swagger',
- component: 'demo/api/swagger',
- name: 'Swagger',
- meta: {
- title: 'Swagger',
- icon: 'api',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'knife4j',
- component: 'demo/api/knife4j',
- name: 'Knife4j',
- meta: {
- title: 'Knife4j',
- icon: 'api',
- hidden: true,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/doc',
- component: 'Layout',
- name: '/doc',
- meta: {
- title: '平台文档',
- icon: 'document',
- hidden: true,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'internal-doc',
- component: 'demo/internal-doc',
- name: 'InternalDoc',
- meta: {
- title: '平台文档(内嵌)',
- icon: 'document',
- hidden: false,
- roles: ['ADMIN']
- }
- },
- {
- path: 'https://juejin.cn/post/7228990409909108793',
- name: 'Https://juejin.cn/post/7228990409909108793',
- meta: {
- title: '平台文档(外链)',
- icon: 'link',
- hidden: false,
- roles: ['ADMIN']
- }
- }
- ]
- },
- {
- path: '/multi-level',
- component: 'Layout',
- redirect: '/multi-level/multi-level1',
- name: '/multiLevel',
- meta: {
- title: '多级菜单',
- icon: 'cascader',
- hidden: true,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'multi-level1',
- component: 'demo/multi-level/level1',
- redirect: '/multi-level/multi-level2',
- name: 'MultiLevel1',
- meta: {
- title: '菜单一级',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- },
- children: [
- {
- path: 'multi-level2',
- component: 'demo/multi-level/children/level2',
- redirect: '/multi-level/multi-level2/multi-level3-1',
- name: 'MultiLevel2',
- meta: {
- title: '菜单二级',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- },
- children: [
- {
- path: 'multi-level3-1',
- component: 'demo/multi-level/children/children/level3-1',
- name: 'MultiLevel31',
- meta: {
- title: '菜单三级-1',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'multi-level3-2',
- component: 'demo/multi-level/children/children/level3-2',
- name: 'MultiLevel32',
- meta: {
- title: '菜单三级-2',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- path: '/component',
- component: 'Layout',
- name: '/component',
- meta: {
- title: '组件封装',
- icon: 'menu',
- hidden: true,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'wang-editor',
- component: 'demo/wang-editor',
- name: 'WangEditor',
- meta: {
- title: '富文本编辑器',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'upload',
- component: 'demo/upload',
- name: 'Upload',
- meta: {
- title: '图片上传',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'icon-selector',
- component: 'demo/icon-selector',
- name: 'IconSelector',
- meta: {
- title: '图标选择器',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'dict-demo',
- component: 'demo/dict',
- name: 'DictDemo',
- meta: {
- title: '字典组件',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'signature',
- component: 'demo/signature',
- name: 'Signature',
- meta: {
- title: '签名',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'table',
- component: 'demo/table',
- name: 'Table',
- meta: {
- title: '表格',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- }
- ]
- },
- {
- path: '/function',
- component: 'Layout',
- name: '/function',
- meta: {
- title: '功能演示',
- icon: 'menu',
- hidden: false,
- roles: ['ADMIN']
- },
- children: [
- {
- path: 'icon-demo',
- component: 'demo/icons',
- name: 'IconDemo',
- meta: {
- title: 'Icons',
- icon: 'el-icon-edit',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: '/function/websocket',
- component: 'demo/websocket',
- name: '/function/websocket',
- meta: {
- title: 'Websocket',
- icon: '',
- hidden: false,
- roles: ['ADMIN'],
- keepAlive: true
- }
- },
- {
- path: 'other',
- component: 'demo/other',
- name: 'Other',
- meta: {
- title: '敬请期待...',
- icon: '',
- hidden: false,
- roles: ['ADMIN']
- }
- }
- ]
- }
- ],
- message: '一切ok'
- }
- },
- {
- url: 'menus',
- method: ['GET'],
- body: {
- code: '200',
- data: [
- {
- id: 1,
- parentId: 0,
- name: '系统管理',
- type: 'CATALOG',
- path: '/system',
- component: 'Layout',
- sort: 1,
- visible: 1,
- icon: 'system',
- redirect: '/system/user',
- perm: null,
- children: [
- {
- id: 2,
- parentId: 1,
- name: '用户管理',
- type: 'MENU',
- path: 'user',
- component: 'system/user/index',
- sort: 1,
- visible: 1,
- icon: 'user',
- redirect: null,
- perm: null,
- children: [
- {
- id: 31,
- parentId: 2,
- name: '用户新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 1,
- visible: 1,
- icon: '',
- redirect: '',
- perm: 'sys:user:add',
- children: []
- },
- {
- id: 32,
- parentId: 2,
- name: '用户编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 2,
- visible: 1,
- icon: '',
- redirect: '',
- perm: 'sys:user:edit',
- children: []
- },
- {
- id: 33,
- parentId: 2,
- name: '用户删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: '',
- perm: 'sys:user:delete',
- children: []
- },
- {
- id: 88,
- parentId: 2,
- name: '重置密码',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 4,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:user:reset_pwd',
- children: []
- }
- ]
- },
- {
- id: 3,
- parentId: 1,
- name: '角色管理',
- type: 'MENU',
- path: 'role',
- component: 'system/role/index',
- sort: 2,
- visible: 1,
- icon: 'role',
- redirect: null,
- perm: null,
- children: [
- {
- id: 70,
- parentId: 3,
- name: '角色新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 1,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:role:add',
- children: []
- },
- {
- id: 71,
- parentId: 3,
- name: '角色编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 2,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:role:edit',
- children: []
- },
- {
- id: 72,
- parentId: 3,
- name: '角色删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:role:delete',
- children: []
- }
- ]
- },
- {
- id: 4,
- parentId: 1,
- name: '菜单管理',
- type: 'MENU',
- path: 'menu',
- component: 'system/menu/index',
- sort: 3,
- visible: 1,
- icon: 'menu',
- redirect: null,
- perm: null,
- children: [
- {
- id: 73,
- parentId: 4,
- name: '菜单新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 1,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:menu:add',
- children: []
- },
- {
- id: 74,
- parentId: 4,
- name: '菜单编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:menu:edit',
- children: []
- },
- {
- id: 75,
- parentId: 4,
- name: '菜单删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:menu:delete',
- children: []
- }
- ]
- },
- {
- id: 5,
- parentId: 1,
- name: '部门管理',
- type: 'MENU',
- path: 'dept',
- component: 'system/dept/index',
- sort: 4,
- visible: 1,
- icon: 'tree',
- redirect: null,
- perm: null,
- children: [
- {
- id: 76,
- parentId: 5,
- name: '部门新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 1,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dept:add',
- children: []
- },
- {
- id: 77,
- parentId: 5,
- name: '部门编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 2,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dept:edit',
- children: []
- },
- {
- id: 78,
- parentId: 5,
- name: '部门删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dept:delete',
- children: []
- }
- ]
- },
- {
- id: 6,
- parentId: 1,
- name: '字典管理',
- type: 'MENU',
- path: 'dict',
- component: 'system/dict/index',
- sort: 5,
- visible: 1,
- icon: 'dict',
- redirect: null,
- perm: null,
- children: [
- {
- id: 79,
- parentId: 6,
- name: '字典类型新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 1,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict_type:add',
- children: []
- },
- {
- id: 81,
- parentId: 6,
- name: '字典类型编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 2,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict_type:edit',
- children: []
- },
- {
- id: 84,
- parentId: 6,
- name: '字典类型删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 3,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict_type:delete',
- children: []
- },
- {
- id: 85,
- parentId: 6,
- name: '字典数据新增',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 4,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict:add',
- children: []
- },
- {
- id: 86,
- parentId: 6,
- name: '字典数据编辑',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 5,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict:edit',
- children: []
- },
- {
- id: 87,
- parentId: 6,
- name: '字典数据删除',
- type: 'BUTTON',
- path: '',
- component: null,
- sort: 6,
- visible: 1,
- icon: '',
- redirect: null,
- perm: 'sys:dict:delete',
- children: []
- }
- ]
- }
- ]
- },
- {
- id: 40,
- parentId: 0,
- name: '接口文档',
- type: 'CATALOG',
- path: '/api',
- component: 'Layout',
- sort: 7,
- visible: 1,
- icon: 'api',
- redirect: '',
- perm: null,
- children: [
- {
- id: 41,
- parentId: 40,
- name: 'Apifox',
- type: 'MENU',
- path: 'apifox',
- component: 'demo/api/apifox',
- sort: 1,
- visible: 1,
- icon: 'api',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 103,
- parentId: 40,
- name: 'Swagger',
- type: 'MENU',
- path: 'swagger',
- component: 'demo/api/swagger',
- sort: 2,
- visible: 0,
- icon: 'api',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 104,
- parentId: 40,
- name: 'Knife4j',
- type: 'MENU',
- path: 'knife4j',
- component: 'demo/api/knife4j',
- sort: 3,
- visible: 0,
- icon: 'api',
- redirect: '',
- perm: null,
- children: []
- }
- ]
- },
- {
- id: 26,
- parentId: 0,
- name: '平台文档',
- type: 'CATALOG',
- path: '/doc',
- component: 'Layout',
- sort: 8,
- visible: 1,
- icon: 'document',
- redirect: null,
- perm: null,
- children: [
- {
- id: 102,
- parentId: 26,
- name: '平台文档(内嵌)',
- type: 'EXTLINK',
- path: 'internal-doc',
- component: 'demo/internal-doc',
- sort: 1,
- visible: 1,
- icon: 'document',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 30,
- parentId: 26,
- name: '平台文档(外链)',
- type: 'EXTLINK',
- path: 'https://juejin.cn/post/7228990409909108793',
- component: '',
- sort: 2,
- visible: 1,
- icon: 'link',
- redirect: '',
- perm: null,
- children: []
- }
- ]
- },
- {
- id: 20,
- parentId: 0,
- name: '多级菜单',
- type: 'CATALOG',
- path: '/multi-level',
- component: 'Layout',
- sort: 9,
- visible: 1,
- icon: 'cascader',
- redirect: '/multi-level/multi-level1',
- perm: null,
- children: [
- {
- id: 21,
- parentId: 20,
- name: '菜单一级',
- type: 'MENU',
- path: 'multi-level1',
- component: 'demo/multi-level/level1',
- sort: 1,
- visible: 1,
- icon: '',
- redirect: '/multi-level/multi-level2',
- perm: null,
- children: [
- {
- id: 22,
- parentId: 21,
- name: '菜单二级',
- type: 'MENU',
- path: 'multi-level2',
- component: 'demo/multi-level/children/level2',
- sort: 1,
- visible: 1,
- icon: '',
- redirect: '/multi-level/multi-level2/multi-level3-1',
- perm: null,
- children: [
- {
- id: 23,
- parentId: 22,
- name: '菜单三级-1',
- type: 'MENU',
- path: 'multi-level3-1',
- component: 'demo/multi-level/children/children/level3-1',
- sort: 1,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 24,
- parentId: 22,
- name: '菜单三级-2',
- type: 'MENU',
- path: 'multi-level3-2',
- component: 'demo/multi-level/children/children/level3-2',
- sort: 2,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- }
- ]
- }
- ]
- }
- ]
- },
- {
- id: 36,
- parentId: 0,
- name: '组件封装',
- type: 'CATALOG',
- path: '/component',
- component: 'Layout',
- sort: 10,
- visible: 1,
- icon: 'menu',
- redirect: '',
- perm: null,
- children: [
- {
- id: 37,
- parentId: 36,
- name: '富文本编辑器',
- type: 'MENU',
- path: 'wang-editor',
- component: 'demo/wang-editor',
- sort: 1,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 38,
- parentId: 36,
- name: '图片上传',
- type: 'MENU',
- path: 'upload',
- component: 'demo/upload',
- sort: 2,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 39,
- parentId: 36,
- name: '图标选择器',
- type: 'MENU',
- path: 'icon-selector',
- component: 'demo/icon-selector',
- sort: 3,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 95,
- parentId: 36,
- name: '字典组件',
- type: 'MENU',
- path: 'dict-demo',
- component: 'demo/dict',
- sort: 4,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 93,
- parentId: 36,
- name: '签名',
- type: 'MENU',
- path: 'signature',
- component: 'demo/signature',
- sort: 6,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 94,
- parentId: 36,
- name: '表格',
- type: 'MENU',
- path: 'table',
- component: 'demo/table',
- sort: 7,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- }
- ]
- },
- {
- id: 89,
- parentId: 0,
- name: '功能演示',
- type: 'CATALOG',
- path: '/function',
- component: 'Layout',
- sort: 11,
- visible: 1,
- icon: 'menu',
- redirect: '',
- perm: null,
- children: [
- {
- id: 97,
- parentId: 89,
- name: 'Icons',
- type: 'MENU',
- path: 'icon-demo',
- component: 'demo/icons',
- sort: 2,
- visible: 1,
- icon: 'el-icon-edit',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 90,
- parentId: 89,
- name: 'Websocket',
- type: 'MENU',
- path: '/function/websocket',
- component: 'demo/websocket',
- sort: 3,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- },
- {
- id: 91,
- parentId: 89,
- name: '敬请期待...',
- type: 'CATALOG',
- path: 'other',
- component: 'demo/other',
- sort: 4,
- visible: 1,
- icon: '',
- redirect: '',
- perm: null,
- children: []
- }
- ]
- }
- ],
- message: '一切ok'
- }
- },
- {
- url: 'menus/options',
- method: ['GET'],
- body: {
- code: '200',
- data: [
- {
- value: 1,
- label: '系统管理',
- children: [
- {
- value: 2,
- label: '用户管理',
- children: [
- {
- value: 31,
- label: '用户新增'
- },
- {
- value: 32,
- label: '用户编辑'
- },
- {
- value: 33,
- label: '用户删除'
- },
- {
- value: 88,
- label: '重置密码'
- }
- ]
- },
- {
- value: 3,
- label: '角色管理',
- children: [
- {
- value: 70,
- label: '角色新增'
- },
- {
- value: 71,
- label: '角色编辑'
- },
- {
- value: 72,
- label: '角色删除'
- }
- ]
- },
- {
- value: 4,
- label: '菜单管理',
- children: [
- {
- value: 73,
- label: '菜单新增'
- },
- {
- value: 74,
- label: '菜单编辑'
- },
- {
- value: 75,
- label: '菜单删除'
- }
- ]
- },
- {
- value: 5,
- label: '部门管理',
- children: [
- {
- value: 76,
- label: '部门新增'
- },
- {
- value: 77,
- label: '部门编辑'
- },
- {
- value: 78,
- label: '部门删除'
- }
- ]
- },
- {
- value: 6,
- label: '字典管理',
- children: [
- {
- value: 79,
- label: '字典类型新增'
- },
- {
- value: 81,
- label: '字典类型编辑'
- },
- {
- value: 84,
- label: '字典类型删除'
- },
- {
- value: 85,
- label: '字典数据新增'
- },
- {
- value: 86,
- label: '字典数据编辑'
- },
- {
- value: 87,
- label: '字典数据删除'
- }
- ]
- }
- ]
- },
- {
- value: 40,
- label: '接口文档',
- children: [
- {
- value: 41,
- label: 'Apifox'
- },
- {
- value: 103,
- label: 'Swagger'
- },
- {
- value: 104,
- label: 'Knife4j'
- }
- ]
- },
- {
- value: 26,
- label: '平台文档',
- children: [
- {
- value: 102,
- label: '平台文档(内嵌)'
- },
- {
- value: 30,
- label: '平台文档(外链)'
- }
- ]
- },
- {
- value: 20,
- label: '多级菜单',
- children: [
- {
- value: 21,
- label: '菜单一级',
- children: [
- {
- value: 22,
- label: '菜单二级',
- children: [
- {
- value: 23,
- label: '菜单三级-1'
- },
- {
- value: 24,
- label: '菜单三级-2'
- }
- ]
- }
- ]
- }
- ]
- },
- {
- value: 36,
- label: '组件封装',
- children: [
- {
- value: 37,
- label: '富文本编辑器'
- },
- {
- value: 38,
- label: '图片上传'
- },
- {
- value: 39,
- label: '图标选择器'
- },
- {
- value: 95,
- label: '字典组件'
- },
- {
- value: 93,
- label: '签名'
- },
- {
- value: 94,
- label: '表格'
- }
- ]
- },
- {
- value: 89,
- label: '功能演示',
- children: [
- {
- value: 97,
- label: 'Icons'
- },
- {
- value: 90,
- label: 'Websocket'
- },
- {
- value: 91,
- label: '敬请期待...'
- }
- ]
- }
- ],
- message: '一切ok'
- }
- },
- // 新增菜单
- {
- url: 'menus',
- method: ['POST'],
- body({ body }) {
- return {
- code: '200',
- data: null,
- message: '新增菜单' + body.name + '成功'
- }
- }
- },
- // 获取菜单表单数据
- {
- url: 'menus/:id/form',
- method: ['GET'],
- body: ({ params }) => {
- return {
- code: '200',
- data: menuMap[params.id],
- message: '一切ok'
- }
- }
- },
- // 修改菜单
- {
- url: 'menus/:id',
- method: ['PUT'],
- body({ body }) {
- return {
- code: '200',
- data: null,
- message: '修改菜单' + body.name + '成功'
- }
- }
- },
- // 删除菜单
- {
- url: 'menus/:id',
- method: ['DELETE'],
- body({ params }) {
- return {
- code: '200',
- data: null,
- message: '删除菜单' + params.id + '成功'
- }
- }
- }
- ])
- // 菜单映射表数据
- const menuMap: Record<string, any> = {
- 1: {
- id: 1,
- parentId: 0,
- name: '系统管理',
- type: 'CATALOG',
- path: '/system',
- component: 'Layout',
- perm: null,
- visible: 1,
- sort: 1,
- icon: 'system',
- redirect: '/system/user',
- keepAlive: null,
- alwaysShow: null
- },
- 2: {
- id: 2,
- parentId: 1,
- name: '用户管理',
- type: 'MENU',
- path: 'user',
- component: 'system/user/index',
- perm: null,
- visible: 1,
- sort: 1,
- icon: 'user',
- redirect: null,
- keepAlive: 1,
- alwaysShow: null
- },
- 3: {
- id: 3,
- parentId: 1,
- name: '角色管理',
- type: 'MENU',
- path: 'role',
- component: 'system/role/index',
- perm: null,
- visible: 1,
- sort: 2,
- icon: 'role',
- redirect: null,
- keepAlive: 1,
- alwaysShow: null
- },
- 4: {
- id: 4,
- parentId: 1,
- name: '菜单管理',
- type: 'MENU',
- path: 'menu',
- component: 'system/menu/index',
- perm: null,
- visible: 1,
- sort: 3,
- icon: 'menu',
- redirect: null,
- keepAlive: 1,
- alwaysShow: null
- },
- 5: {
- id: 5,
- parentId: 1,
- name: '部门管理',
- type: 'MENU',
- path: 'dept',
- component: 'system/dept/index',
- perm: null,
- visible: 1,
- sort: 4,
- icon: 'tree',
- redirect: null,
- keepAlive: 1,
- alwaysShow: null
- },
- 6: {
- id: 6,
- parentId: 1,
- name: '字典管理',
- type: 'MENU',
- path: 'dict',
- component: 'system/dict/index',
- perm: null,
- visible: 1,
- sort: 5,
- icon: 'dict',
- redirect: null,
- keepAlive: 1,
- alwaysShow: null
- }
- }
|