|
@@ -18,6 +18,22 @@ const accountList = (() => {
|
|
return result;
|
|
return result;
|
|
})();
|
|
})();
|
|
|
|
|
|
|
|
+const roleList = (() => {
|
|
|
|
+ const result: any[] = [];
|
|
|
|
+ for (let index = 0; index < 4; index++) {
|
|
|
|
+ result.push({
|
|
|
|
+ id: `${index}`,
|
|
|
|
+ orderNo: `${index + 1}`,
|
|
|
|
+ roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index],
|
|
|
|
+ roleValue: '@first',
|
|
|
|
+ createTime: '@datetime',
|
|
|
|
+ remark: '@cword(10,20)',
|
|
|
|
+ 'status|1': ['0', '1'],
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+})();
|
|
|
|
+
|
|
const deptList = (() => {
|
|
const deptList = (() => {
|
|
const result: any[] = [];
|
|
const result: any[] = [];
|
|
for (let index = 0; index < 3; index++) {
|
|
for (let index = 0; index < 3; index++) {
|
|
@@ -49,6 +65,46 @@ const deptList = (() => {
|
|
return result;
|
|
return result;
|
|
})();
|
|
})();
|
|
|
|
|
|
|
|
+const menuList = (() => {
|
|
|
|
+ const result: any[] = [];
|
|
|
|
+ for (let index = 0; index < 3; index++) {
|
|
|
|
+ result.push({
|
|
|
|
+ id: `${index}`,
|
|
|
|
+ icon: ['ion:layers-outline', 'ion:git-compare-outline', 'ion:tv-outline'][index],
|
|
|
|
+ component: 'LAYOUT',
|
|
|
|
+ menuName: ['Dashboard', '权限管理', '功能'][index],
|
|
|
|
+ permission: '',
|
|
|
|
+ orderNo: index + 1,
|
|
|
|
+ createTime: '@datetime',
|
|
|
|
+ 'status|1': ['0', '0', '1'],
|
|
|
|
+ children: (() => {
|
|
|
|
+ const children: any[] = [];
|
|
|
|
+ for (let j = 0; j < 4; j++) {
|
|
|
|
+ children.push({
|
|
|
|
+ id: `${index}-${j}`,
|
|
|
|
+ menuName: ['菜单1', '菜单2', '菜单3', '菜单4'][j],
|
|
|
|
+ icon: 'ion:document',
|
|
|
|
+ permission: ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index],
|
|
|
|
+ component: [
|
|
|
|
+ '/dashboard/welcome/index',
|
|
|
|
+ '/dashboard/analysis/index',
|
|
|
|
+ '/dashboard/workbench/index',
|
|
|
|
+ '/dashboard/test/index',
|
|
|
|
+ ][j],
|
|
|
|
+ orderNo: j + 1,
|
|
|
|
+ createTime: '@datetime',
|
|
|
|
+ 'status|1': ['0', '1'],
|
|
|
|
+ parentMenu: `${index}`,
|
|
|
|
+ children: undefined,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return children;
|
|
|
|
+ })(),
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+})();
|
|
|
|
+
|
|
export default [
|
|
export default [
|
|
{
|
|
{
|
|
url: '/api/system/getAccountList',
|
|
url: '/api/system/getAccountList',
|
|
@@ -59,6 +115,15 @@ export default [
|
|
return resultPageSuccess(page, pageSize, accountList);
|
|
return resultPageSuccess(page, pageSize, accountList);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ url: '/api/system/getRoleList',
|
|
|
|
+ timeout: 100,
|
|
|
|
+ method: 'get',
|
|
|
|
+ response: ({ query }) => {
|
|
|
|
+ const { page = 1, pageSize = 20 } = query;
|
|
|
|
+ return resultPageSuccess(page, pageSize, roleList);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
{
|
|
{
|
|
url: '/api/system/getDeptList',
|
|
url: '/api/system/getDeptList',
|
|
timeout: 100,
|
|
timeout: 100,
|
|
@@ -67,4 +132,12 @@ export default [
|
|
return resultSuccess(deptList);
|
|
return resultSuccess(deptList);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ url: '/api/system/getMenuList',
|
|
|
|
+ timeout: 100,
|
|
|
|
+ method: 'get',
|
|
|
|
+ response: () => {
|
|
|
|
+ return resultSuccess(menuList);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
] as MockMethod[];
|
|
] as MockMethod[];
|