123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- /*
- * @Author: 半生瓜 1515706227@qq.com
- * @Date: 2024-04-21 17:20:21
- * @LastEditors: 半生瓜 1515706227@qq.com
- * @LastEditTime: 2024-05-07 15:55:12
- * @FilePath: \vue-element-plus-admin-mini\mock\role\index.mock.ts
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
- import { MockMethod } from 'vite-plugin-mock'
- import { SUCCESS_CODE } from '@/constants'
- const timeout = 1000
- const adminList = [
- {
- path: '/Template',
- component: '#',
- redirect: '/Template/TemplateManage',
- name: 'Template',
- meta: {
- title: 'router.level',
- },
- children: [
- {
- path: 'TemplateManage',
- name: 'TemplateManage',
- component: 'views/Template/TemplateManage',
- meta: {
- title: '区域管理',
- icon: 'ant-design:dashboard-filled',
- }
- }
- ]
- },
- {
- path: '/Resource',
- component: '#',
- redirect: '/Resource/ResourceManage',
- name: 'Resource',
- meta: {
- title: 'router.level'
- },
- children: [
- {
- path: 'ResourceManage',
- name: 'ResourceManage',
- component: 'views/Resource/ResourceManage',
- meta: {
- title: '资源管理',
- icon: 'carbon:skill-level-advanced'
- }
- }
- ]
- },
- {
- path: '/Audit',
- component: '#',
- redirect: '/Audit/AuditManage',
- name: 'Audit',
- meta: {
- title: '审核管理',
- },
- children: [
- {
- path: 'AuditManage',
- name: 'AuditManage',
- component: 'views/Audit/AuditManage',
- meta: {
- icon: 'ri:function-fill',
- title: '审核管理'
- }
- }
- ]
- },
- {
- path: '/Authority',
- component: '#',
- redirect: '/Authority/AuditManage',
- name: 'Authority',
- meta: {
- title: '权限管理',
- icon: 'eos-icons:role-binding',
- },
- children: [
- {
- path: 'User',
- name: 'User',
- component: 'views/Authority/User',
- meta: {
- title: '用户管理'
- }
- },
- {
- path: 'Role',
- name: 'Role',
- component: 'views/Authority/Role',
- meta: {
- title: '角色管理'
- }
- },
- ]
- },
- // {
- // path: '/System',
- // component: '#',
- // redirect: '/System/SystemSetting',
- // name: 'System',
- // meta: {
- // title: '系统设置',
- // },
- // children: [
- // {
- // path: 'SystemSetting',
- // name: 'SystemSetting',
- // component: 'views/System/SystemSetting',
- // meta: {
- // icon: 'ic:outline-webhook',
- // title: '系统设置'
- // }
- // }
- // ]
- // }
- ]
- const testList: string[] = [
- '/level',
- '/zy',
- '/zy/Menu12',
- '/level/menu1',
- '/level/menu1/menu1-1',
- '/level/menu1/menu1-1/menu1-1-1',
- '/level/menu1/menu1-2',
- '/level/menu2'
- ]
- export default [
- // 列表接口
- {
- url: '/mock/role/list',
- method: 'get',
- timeout,
- response: ({ query }) => {
- const { roleName } = query
- return {
- code: SUCCESS_CODE,
- data: roleName === 'admin' ? adminList : testList
- }
- }
- }
- ] as MockMethod[]
|