From deb5961757c3f3cb1551cc3812264464336ff51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Mon, 20 Mar 2023 18:13:47 +0800 Subject: [PATCH] 3/20 --- src/components/MultiTab/MultiTab.vue | 8 +- src/config/router.config.js | 8 +- src/mock/services/user.js | 1345 ++++++++++++++------------ 3 files changed, 730 insertions(+), 631 deletions(-) diff --git a/src/components/MultiTab/MultiTab.vue b/src/components/MultiTab/MultiTab.vue index fb591a3..06f15b5 100644 --- a/src/components/MultiTab/MultiTab.vue +++ b/src/components/MultiTab/MultiTab.vue @@ -48,7 +48,10 @@ export default { onEdit(targetKey, action) { const _that = this if (targetKey.includes('BookingDetail')) { - if (Object.keys(this.needSavePages).includes(targetKey) && (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)) { + if ( + Object.keys(this.needSavePages).includes(targetKey) && + (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) + ) { this.$confirm({ title: '请确认无未保存数据!', content: '当点击确定按钮时,此页面 将会关闭。', @@ -207,12 +210,13 @@ export default { $data: { pages } } = this const panes = pages.map(page => { + console.log(pages) return ( 1} + closable={pages.length > 1 && page.meta.title != '首页'} > ) }) diff --git a/src/config/router.config.js b/src/config/router.config.js index d6f4616..35dfe5a 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -3,7 +3,6 @@ import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/lay import { bxAnaalyse } from '@/core/icons' export const asyncRouterMap = [ - { path: '/', name: 'MenuIndex.vue', @@ -32,14 +31,16 @@ export const asyncRouterMap = [ name: 'Workplace', component: () => import('@/views/system/dashboard/Workplace'), // eslint-disable-next-line standard/object-curly-even-spacing - meta: { title: '工作台', keepAlive: false/*, permission: [ 'dashboard' ] */ } + meta: { title: '工作台', keepAlive: false /*, permission: [ 'dashboard' ] */ } } ] } ] }, { - path: '*', redirect: '/404', hidden: true + path: '*', + redirect: '/404', + hidden: true } ] @@ -80,5 +81,4 @@ export const constantRouterMap = [ path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404') } - ] diff --git a/src/mock/services/user.js b/src/mock/services/user.js index 8666a1b..4af8d6f 100644 --- a/src/mock/services/user.js +++ b/src/mock/services/user.js @@ -1,764 +1,859 @@ import Mock from 'mockjs2' import { builder } from '../util' -const info = (options) => { +const info = options => { console.log('options', options) const userInfo = { - 'id': '4291d7da9005377ec9aec4a71ea837f', - 'name': '天野远子', - 'username': 'admin', - 'password': '', - 'avatar': '/avatar2.jpg', - 'status': 1, - 'telephone': '', - 'lastLoginIp': '27.154.74.117', - 'lastLoginTime': 1534837621348, - 'creatorId': 'admin', - 'createTime': 1497160610259, - 'merchantCode': 'TLif2btpzg079h15bk', - 'deleted': 0, - 'roleId': 'admin', - 'role': {} + id: '4291d7da9005377ec9aec4a71ea837f', + name: '天野远子', + username: 'admin', + password: '', + avatar: '/avatar2.jpg', + status: 1, + telephone: '', + lastLoginIp: '27.154.74.117', + lastLoginTime: 1534837621348, + creatorId: 'admin', + createTime: 1497160610259, + merchantCode: 'TLif2btpzg079h15bk', + deleted: 0, + roleId: 'admin', + role: {} } // role const roleObj = { - 'id': 'admin', - 'name': '管理员', - 'describe': '拥有所有权限', - 'status': 1, - 'creatorId': 'system', - 'createTime': 1497160610259, - 'deleted': 0, - 'permissions': [{ - 'roleId': 'admin', - 'permissionId': 'dashboard', - 'permissionName': '仪表盘', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'exception', - 'permissionName': '异常页面权限', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'result', - 'permissionName': '结果权限', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'profile', - 'permissionName': '详细页权限', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'table', - 'permissionName': '表格权限', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'import', - 'describe': '导入', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'form.vue', - 'permissionName': '表单权限', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'order', - 'permissionName': '订单管理', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'permission', - 'permissionName': '权限管理', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'role', - 'permissionName': '角色管理', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'table', - 'permissionName': '桌子管理', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'query', - 'describe': '查询', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }, { - 'roleId': 'admin', - 'permissionId': 'user', - 'permissionName': '用户管理', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"},{"action":"export","defaultCheck":false,"describe":"导出"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'import', - 'describe': '导入', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }, { - 'action': 'export', - 'describe': '导出', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null - }] + id: 'admin', + name: '管理员', + describe: '拥有所有权限', + status: 1, + creatorId: 'system', + createTime: 1497160610259, + deleted: 0, + permissions: [ + { + roleId: 'admin', + permissionId: 'dashboard', + permissionName: '仪表盘', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'exception', + permissionName: '异常页面权限', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'result', + permissionName: '结果权限', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'profile', + permissionName: '详细页权限', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'table', + permissionName: '表格权限', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'import', + describe: '导入', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'form.vue', + permissionName: '表单权限', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'order', + permissionName: '订单管理', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'permission', + permissionName: '权限管理', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'role', + permissionName: '角色管理', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'table', + permissionName: '桌子管理', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"query","defaultCheck":false,"describe":"查询"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'query', + describe: '查询', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + }, + { + roleId: 'admin', + permissionId: 'user', + permissionName: '用户管理', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"},{"action":"export","defaultCheck":false,"describe":"导出"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'import', + describe: '导入', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + }, + { + action: 'export', + describe: '导出', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null + } + ] } roleObj.permissions.push({ - 'roleId': 'admin', - 'permissionId': 'support', - 'permissionName': '超级模块', - 'actions': '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"},{"action":"export","defaultCheck":false,"describe":"导出"}]', - 'actionEntitySet': [{ - 'action': 'add', - 'describe': '新增', - 'defaultCheck': false - }, { - 'action': 'import', - 'describe': '导入', - 'defaultCheck': false - }, { - 'action': 'get', - 'describe': '详情', - 'defaultCheck': false - }, { - 'action': 'update', - 'describe': '修改', - 'defaultCheck': false - }, { - 'action': 'delete', - 'describe': '删除', - 'defaultCheck': false - }, { - 'action': 'export', - 'describe': '导出', - 'defaultCheck': false - }], - 'actionList': null, - 'dataAccess': null + roleId: 'admin', + permissionId: 'support', + permissionName: '超级模块', + actions: + '[{"action":"add","defaultCheck":false,"describe":"新增"},{"action":"import","defaultCheck":false,"describe":"导入"},{"action":"get","defaultCheck":false,"describe":"详情"},{"action":"update","defaultCheck":false,"describe":"修改"},{"action":"delete","defaultCheck":false,"describe":"删除"},{"action":"export","defaultCheck":false,"describe":"导出"}]', + actionEntitySet: [ + { + action: 'add', + describe: '新增', + defaultCheck: false + }, + { + action: 'import', + describe: '导入', + defaultCheck: false + }, + { + action: 'get', + describe: '详情', + defaultCheck: false + }, + { + action: 'update', + describe: '修改', + defaultCheck: false + }, + { + action: 'delete', + describe: '删除', + defaultCheck: false + }, + { + action: 'export', + describe: '导出', + defaultCheck: false + } + ], + actionList: null, + dataAccess: null }) userInfo.role = roleObj return builder(userInfo) } -const userNav = (options) => { +const userNav = options => { const nav = [ // dashboard { - 'name': 'dashboard', - 'parentId': 0, - 'id': 1, - 'meta': { - 'icon': 'dashboard', - 'title': '仪表盘77', - 'show': true + name: 'dashboard', + parentId: 0, + id: 1, + meta: { + icon: 'dashboard', + title: '仪表盘77', + show: true }, - 'component': 'RouteView', - 'redirect': '/dashboard/workplace' + component: 'RouteView', + redirect: '/dashboard/workplace' }, { - 'name': 'workplace', - 'parentId': 1, - 'id': 7, - 'meta': { - 'title': '工作台', - 'show': true + name: 'workplace', + parentId: 1, + id: 7, + meta: { + title: '工作台', + show: true }, - 'component': 'Workplace' + component: 'Workplace' }, { - 'name': 'monitor', - 'path': 'https://www.baidu.com/', - 'parentId': 1, - 'id': 3, - 'meta': { - 'title': '监控页(外部)', - 'target': '_blank', - 'show': true + name: 'monitor', + path: 'https://www.baidu.com/', + parentId: 1, + id: 3, + meta: { + title: '监控页(外部)', + target: '_blank', + show: true } }, { - 'name': 'Analysis', - 'parentId': 1, - 'id': 2, - 'meta': { - 'title': '分析页', - 'show': true + name: 'Analysis', + parentId: 1, + id: 2, + meta: { + title: '分析页', + show: true }, - 'component': 'Analysis', - 'path': '/dashboard/analysis' + component: 'Analysis', + path: '/dashboard/analysis' }, { - 'name': 'tests', - 'parentId': 1, - 'id': 8, - 'meta': { - 'title': '测试功能', - 'show': true + name: 'tests', + parentId: 1, + id: 8, + meta: { + title: '测试功能', + show: true }, - 'component': 'TestWork' + component: 'TestWork' }, // form { - 'name': 'form.vue', - 'parentId': 0, - 'id': 10, - 'meta': { - 'icon': 'form.vue', - 'title': '表单页' + name: 'form.vue', + parentId: 0, + id: 10, + meta: { + icon: 'form.vue', + title: '表单页' }, - 'redirect': '/form/base-form', - 'component': 'PageView' + redirect: '/form/base-form', + component: 'PageView' }, { - 'name': 'basic-form', - 'parentId': 10, - 'id': 6, - 'meta': { - 'title': '基础表单' + name: 'basic-form', + parentId: 10, + id: 6, + meta: { + title: '基础表单' }, - 'component': 'BasicForm' + component: 'BasicForm' }, { - 'name': 'step-form', - 'parentId': 10, - 'id': 5, - 'meta': { - 'title': '分步表单' + name: 'step-form', + parentId: 10, + id: 5, + meta: { + title: '分步表单' }, - 'component': 'StepForm' + component: 'StepForm' }, { - 'name': 'advanced-form', - 'parentId': 10, - 'id': 4, - 'meta': { - 'title': '高级表单' + name: 'advanced-form', + parentId: 10, + id: 4, + meta: { + title: '高级表单' }, - 'component': 'AdvanceForm' + component: 'AdvanceForm' }, // list { - 'name': 'list', - 'parentId': 0, - 'id': 10010, - 'meta': { - 'icon': 'table', - 'title': '列表页', - 'show': true + name: 'list', + parentId: 0, + id: 10010, + meta: { + icon: 'table', + title: '列表页', + show: true }, - 'redirect': '/list/table-list', - 'component': 'PageView' + redirect: '/list/table-list', + component: 'PageView' }, { - 'name': 'table-list', - 'parentId': 10010, - 'id': 10011, - 'path': '/list/table-list/:pageNo([1-9]\\d*)?', - 'meta': { - 'title': '查询表格', - 'show': true + name: 'table-list', + parentId: 10010, + id: 10011, + path: '/list/table-list/:pageNo([1-9]\\d*)?', + meta: { + title: '查询表格', + show: true }, - 'component': 'TableList' + component: 'TableList' }, { - 'name': 'basic-list', - 'parentId': 10010, - 'id': 10012, - 'meta': { - 'title': '标准列表', - 'show': true + name: 'basic-list', + parentId: 10010, + id: 10012, + meta: { + title: '标准列表', + show: true }, - 'component': 'StandardList' + component: 'StandardList' }, { - 'name': 'card', - 'parentId': 10010, - 'id': 10013, - 'meta': { - 'title': '卡片列表', - 'show': true + name: 'card', + parentId: 10010, + id: 10013, + meta: { + title: '卡片列表', + show: true }, - 'component': 'CardList' + component: 'CardList' }, { - 'name': 'search', - 'parentId': 10010, - 'id': 10014, - 'meta': { - 'title': '搜索列表', - 'show': true + name: 'search', + parentId: 10010, + id: 10014, + meta: { + title: '搜索列表', + show: true }, - 'redirect': '/list/search/article', - 'component': 'SearchLayout' + redirect: '/list/search/article', + component: 'SearchLayout' }, { - 'name': 'article', - 'parentId': 10014, - 'id': 10015, - 'meta': { - 'title': '搜索列表(文章)', - 'show': true + name: 'article', + parentId: 10014, + id: 10015, + meta: { + title: '搜索列表(文章)', + show: true }, - 'component': 'SearchArticles' + component: 'SearchArticles' }, { - 'name': 'project', - 'parentId': 10014, - 'id': 10016, - 'meta': { - 'title': '搜索列表(项目)', - 'show': true + name: 'project', + parentId: 10014, + id: 10016, + meta: { + title: '搜索列表(项目)', + show: true }, - 'component': 'SearchProjects' + component: 'SearchProjects' }, { - 'name': 'application', - 'parentId': 10014, - 'id': 10017, - 'meta': { - 'title': '搜索列表(应用)', - 'show': true + name: 'application', + parentId: 10014, + id: 10017, + meta: { + title: '搜索列表(应用)', + show: true }, - 'component': 'SearchApplications' + component: 'SearchApplications' }, // profile { - 'name': 'profile', - 'parentId': 0, - 'id': 10018, - 'meta': { - 'title': '详情页', - 'icon': 'profile', - 'show': true + name: 'profile', + parentId: 0, + id: 10018, + meta: { + title: '详情页', + icon: 'profile', + show: true }, - 'redirect': '/profile/basic', - 'component': 'RouteView' + redirect: '/profile/basic', + component: 'RouteView' }, { - 'name': 'basic', - 'parentId': 10018, - 'id': 10019, - 'meta': { - 'title': '基础详情页', - 'show': true + name: 'basic', + parentId: 10018, + id: 10019, + meta: { + title: '基础详情页', + show: true }, - 'component': 'ProfileBasic' + component: 'ProfileBasic' }, { - 'name': 'advanced', - 'parentId': 10018, - 'id': 10020, - 'meta': { - 'title': '高级详情页', - 'show': true + name: 'advanced', + parentId: 10018, + id: 10020, + meta: { + title: '高级详情页', + show: true }, - 'component': 'ProfileAdvanced' + component: 'ProfileAdvanced' }, // result { - 'name': 'result', - 'parentId': 0, - 'id': 10021, - 'meta': { - 'title': '结果页', - 'icon': 'check-circle-o', - 'show': true + name: 'result', + parentId: 0, + id: 10021, + meta: { + title: '结果页', + icon: 'check-circle-o', + show: true }, - 'redirect': '/result/success', - 'component': 'PageView' + redirect: '/result/success', + component: 'PageView' }, { - 'name': 'success', - 'parentId': 10021, - 'id': 10022, - 'meta': { - 'title': '成功', - 'hiddenHeaderContent': true, - 'show': true + name: 'success', + parentId: 10021, + id: 10022, + meta: { + title: '成功', + hiddenHeaderContent: true, + show: true }, - 'component': 'ResultSuccess' + component: 'ResultSuccess' }, { - 'name': 'fail', - 'parentId': 10021, - 'id': 10023, - 'meta': { - 'title': '失败', - 'hiddenHeaderContent': true, - 'show': true + name: 'fail', + parentId: 10021, + id: 10023, + meta: { + title: '失败', + hiddenHeaderContent: true, + show: true }, - 'component': 'ResultFail' + component: 'ResultFail' }, // Exception { - 'name': 'exception', - 'parentId': 0, - 'id': 10024, - 'meta': { - 'title': '异常页', - 'icon': 'warning', - 'show': true + name: 'exception', + parentId: 0, + id: 10024, + meta: { + title: '异常页', + icon: 'warning', + show: true }, - 'redirect': '/exception/403', - 'component': 'RouteView' + redirect: '/exception/403', + component: 'RouteView' }, { - 'name': '403', - 'parentId': 10024, - 'id': 10025, - 'meta': { - 'title': '403', - 'show': true + name: '403', + parentId: 10024, + id: 10025, + meta: { + title: '403', + show: true }, - 'component': 'Exception403' + component: 'Exception403' }, { - 'name': '404', - 'parentId': 10024, - 'id': 10026, - 'meta': { - 'title': '404', - 'show': true + name: '404', + parentId: 10024, + id: 10026, + meta: { + title: '404', + show: true }, - 'component': 'Exception404' + component: 'Exception404' }, { - 'name': '500', - 'parentId': 10024, - 'id': 10027, - 'meta': { - 'title': '500', - 'show': true + name: '500', + parentId: 10024, + id: 10027, + meta: { + title: '500', + show: true }, - 'component': 'Exception500' + component: 'Exception500' }, // account { - 'name': 'account', - 'parentId': 0, - 'id': 10028, - 'meta': { - 'title': '个人页', - 'icon': 'user', - 'show': true + name: 'account', + parentId: 0, + id: 10028, + meta: { + title: '个人页', + icon: 'user', + show: true }, - 'redirect': '/account/center', - 'component': 'RouteView' + redirect: '/account/center', + component: 'RouteView' }, { - 'name': 'center', - 'parentId': 10028, - 'id': 10029, - 'meta': { - 'title': '个人中心', - 'show': true + name: 'center', + parentId: 10028, + id: 10029, + meta: { + title: '个人中心', + show: true }, - 'component': 'AccountCenter' + component: 'AccountCenter' }, // 特殊三级菜单 { - 'name': 'settings', - 'parentId': 10028, - 'id': 10030, - 'meta': { - 'title': '个人设置', - 'hideHeader': true, - 'hideChildren': true, - 'show': true + name: 'settings', + parentId: 10028, + id: 10030, + meta: { + title: '个人设置', + hideHeader: true, + hideChildren: true, + show: true }, - 'redirect': '/account/settings/base', - 'component': 'AccountSettings' + redirect: '/account/settings/base', + component: 'AccountSettings' }, { - 'name': 'BaseSettings', - 'path': '/account/settings/base', - 'parentId': 10030, - 'id': 10031, - 'meta': { - 'title': '基本设置', - 'show': false + name: 'BaseSettings', + path: '/account/settings/base', + parentId: 10030, + id: 10031, + meta: { + title: '基本设置', + show: false }, - 'component': 'BaseSettings' + component: 'BaseSettings' }, { - 'name': 'SecuritySettings', - 'path': '/account/settings/security', - 'parentId': 10030, - 'id': 10032, - 'meta': { - 'title': '安全设置', - 'show': false + name: 'SecuritySettings', + path: '/account/settings/security', + parentId: 10030, + id: 10032, + meta: { + title: '安全设置', + show: false }, - 'component': 'SecuritySettings' + component: 'SecuritySettings' }, { - 'name': 'CustomSettings', - 'path': '/account/settings/custom', - 'parentId': 10030, - 'id': 10033, - 'meta': { - 'title': '个性化设置', - 'show': false + name: 'CustomSettings', + path: '/account/settings/custom', + parentId: 10030, + id: 10033, + meta: { + title: '个性化设置', + show: false }, - 'component': 'CustomSettings' + component: 'CustomSettings' }, { - 'name': 'BindingSettings', - 'path': '/account/settings/binding', - 'parentId': 10030, - 'id': 10034, - 'meta': { - 'title': '账户绑定', - 'show': false + name: 'BindingSettings', + path: '/account/settings/binding', + parentId: 10030, + id: 10034, + meta: { + title: '账户绑定', + show: false }, - 'component': 'BindingSettings' + component: 'BindingSettings' }, { - 'name': 'NotificationSettings', - 'path': '/account/settings/notification', - 'parentId': 10030, - 'id': 10034, - 'meta': { - 'title': '新消息通知', - 'show': false + name: 'NotificationSettings', + path: '/account/settings/notification', + parentId: 10030, + id: 10034, + meta: { + title: '新消息通知', + show: false }, - 'component': 'NotificationSettings' + component: 'NotificationSettings' } ] const json = builder(nav)