Skip to content

Commit a4e3f10

Browse files
committed
获取接口模块权限的元数据
1 parent db0ee01 commit a4e3f10

File tree

355 files changed

+997
-19958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+997
-19958
lines changed

browser/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ English | [简体中文](./README.zh-CN.md)
3030

3131
- [Documentation](https://panjiachen.github.io/vue-element-admin-site/#/)
3232

33+
- [Gitter](https://gitter.im/vue-element-admin/discuss)
34+
3335
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
3436

3537
- [Donate](https://panjiachen.github.io/vue-element-admin-site/#/donate)
@@ -86,6 +88,7 @@ You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) l
8688
- Form example
8789
- Two-step login
8890
- SplitPane
91+
- Drag Dialog
8992
- Dropzone
9093
- Sticky
9194
- CountTo

browser/README.zh-CN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
- [使用文档](https://panjiachen.github.io/vue-element-admin-site/#/zh-cn/)
3232

33+
- [Gitter讨论组](https://gitter.im/vue-element-admin/discuss)
34+
3335
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
3436

3537
- [Donate](https://panjiachen.github.io/vue-element-admin-site/#/zh-cn/donate)
@@ -52,7 +54,6 @@
5254
- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)
5355
- [手摸手,带你优雅的使用 icon](https://juejin.im/post/59bb864b5188257e7a427c09)
5456

55-
响应需求,开了一个qq群 `591724180` 方便大家交流
5657

5758
或者加入该群主 **[圈子](https://jianshiapp.com/circles/1209)** 楼主会经常分享一些技术相关的东西
5859

@@ -99,6 +100,7 @@
99100
- Form example
100101
- 二步登录
101102
- SplitPane
103+
- 拖拽 Dialog
102104
- Dropzone
103105
- Sticky
104106
- CountTo

browser/config/prod.env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
NODE_ENV: '"production"',
33
ENV_CONFIG: '"prod"',
4-
BASE_API: '"https://api-prod"'
4+
BASE_API: '"http://localhost:8888/api/v1"'
55
}

browser/config/sit.env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
NODE_ENV: '"production"',
33
ENV_CONFIG: '"sit"',
4-
BASE_API: '"https://api-sit"'
4+
BASE_API: '"http://localhost:8888/api/v1"'
55
}

browser/package.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
{
22
"name": "vue-element-admin",
3-
"version": "3.6.5",
3+
"version": "3.6.6",
44
"description": "A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features",
55
"author": "Pan <[email protected]>",
66
"license": "MIT",
7-
"private": true,
87
"scripts": {
98
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
109
"build:prod": "cross-env NODE_ENV=production env_config=prod node build/build.js",
1110
"build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
1211
"lint": "eslint --ext .js,.vue src",
1312
"test": "npm run lint"
1413
},
14+
"keywords": [
15+
"vue",
16+
"element-ui",
17+
"admin",
18+
"management-system",
19+
"admin-template"
20+
],
21+
"repository": {
22+
"type": "git",
23+
"url": "git+https://github.com/PanJiaChen/vue-element-admin.git"
24+
},
25+
"bugs": {
26+
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
27+
},
1528
"dependencies": {
1629
"axios": "0.17.1",
1730
"clipboard": "1.7.1",
@@ -33,14 +46,13 @@
3346
"sortablejs": "1.7.0",
3447
"vue": "2.5.10",
3548
"vue-count-to": "1.0.13",
36-
"vue-i18n": "7.3.2",
3749
"vue-multiselect": "2.0.8",
3850
"vue-router": "3.0.1",
3951
"vue-splitpane": "1.0.2",
40-
"vuedraggable": "2.15.0",
41-
"vue-json-pretty": "^1.3.4",
52+
"vuedraggable": "^2.16.0",
4253
"vuex": "3.0.1",
43-
"xlsx": "^0.11.16"
54+
"xlsx": "^0.11.16",
55+
"vue-json-pretty": "^1.3.4"
4456
},
4557
"devDependencies": {
4658
"autoprefixer": "7.2.3",

browser/src/api/login.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ export function testUserInfo() {
3333
method: 'get'
3434
})
3535
}
36+
File renamed without changes.

browser/src/api/perm.js

Lines changed: 97 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,105 @@
33
*/
44
import request from '@/utils/request'
55

6-
/**
7-
* 添加权限
8-
* @param data
9-
*/
10-
export function addPerm(data) {
11-
return request({
12-
url: '/perm',
13-
method: 'post',
14-
data
15-
})
16-
}
6+
export default{
7+
/**
8+
* 添加权限
9+
* @param data
10+
*/
11+
addPerm(data) {
12+
return request({
13+
url: '/sys_perm',
14+
method: 'post',
15+
data
16+
})
17+
},
1718

18-
/**
19-
* 删除权限
20-
* @param data
21-
*/
22-
export function deletePerm(data) {
23-
return request({
24-
url: '/perm',
25-
method: 'delete',
26-
data
27-
})
28-
}
19+
/**
20+
* 批量添加权限
21+
* @param data
22+
*/
23+
batchSavePerms(permArr) {
24+
return request({
25+
url: '/sys_perm/batch_save',
26+
method: 'post',
27+
data: permArr
28+
})
29+
},
2930

30-
/**
31-
* 查询权限
32-
* @param queryParam
33-
* @param pageParam
34-
*/
35-
export function queryPerm(queryParam,pageParam) {
36-
return request({
37-
url: '/perm/query',
38-
method: 'post',
39-
data: {
40-
...queryParam,
41-
current: pageParam.current,
42-
size: pageParam.size
43-
}
44-
})
45-
}
31+
/**
32+
* 删除权限
33+
* @param data
34+
*/
35+
deletePerm(data) {
36+
return request({
37+
url: '/sys_perm',
38+
method: 'delete',
39+
data
40+
})
41+
},
4642

47-
/**
48-
* 更新权限
49-
* @param data
50-
*/
51-
export function updatePerm(data) {
52-
return request({
53-
url: '/perm/info',
54-
method: 'patch',
55-
data
56-
})
57-
}
43+
/**
44+
* 查询权限
45+
* @param queryParam
46+
* @param pageParam
47+
*/
48+
queryPerm(queryParam,pageParam) {
49+
return request({
50+
url: '/sys_perm/query',
51+
method: 'post',
52+
data: {
53+
...queryParam,
54+
current: pageParam.current,
55+
size: pageParam.size
56+
}
57+
})
58+
},
59+
60+
/**
61+
* 更新权限
62+
* @param data
63+
*/
64+
updatePerm(data) {
65+
return request({
66+
url: '/sys_perm/info',
67+
method: 'patch',
68+
data
69+
})
70+
},
71+
72+
/**
73+
* 更新权限的权限
74+
* @param perm
75+
*/
76+
listApiPermMetadata() {
77+
return request({
78+
url: '/sys_perm/meta/api',
79+
method: 'get'
80+
})
81+
},
82+
83+
/**
84+
* 列出所有菜单、按钮、接口等权限
85+
* @param perm
86+
*/
87+
listAllPermissions() {
88+
return request({
89+
url: '/sys_perm/list/all',
90+
method: 'get'
91+
})
92+
},
93+
94+
/**
95+
* 列出所有菜单和按钮
96+
* @param perm
97+
*/
98+
listApiPermissions() {
99+
return request({
100+
url: '/sys_perm/list/api',
101+
method: 'get'
102+
})
103+
}
58104

59-
/**
60-
* 更新权限的权限
61-
* @param perm
62-
*/
63-
export function updatePermPerms(data) {
64-
return request({
65-
url: '/perm/perm',
66-
method: 'patch',
67-
data
68-
})
69105
}
106+
107+

browser/src/api/role.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import request from '@/utils/request'
99
*/
1010
export function addRole(data) {
1111
return request({
12-
url: '/role',
12+
url: '/sys_role',
1313
method: 'post',
1414
data
1515
})
@@ -21,7 +21,7 @@ export function addRole(data) {
2121
*/
2222
export function deleteRole(data) {
2323
return request({
24-
url: '/role',
24+
url: '/sys_role',
2525
method: 'delete',
2626
data
2727
})
@@ -34,7 +34,7 @@ export function deleteRole(data) {
3434
*/
3535
export function queryRole(queryParam,pageParam) {
3636
return request({
37-
url: '/role/query',
37+
url: '/sys_role/query',
3838
method: 'post',
3939
data: {
4040
...queryParam,
@@ -50,7 +50,7 @@ export function queryRole(queryParam,pageParam) {
5050
*/
5151
export function updateRole(data) {
5252
return request({
53-
url: '/role/info',
53+
url: '/sys_role/info',
5454
method: 'patch',
5555
data
5656
})
@@ -62,7 +62,7 @@ export function updateRole(data) {
6262
*/
6363
export function updateRolePerms(data) {
6464
return request({
65-
url: '/role/perm',
65+
url: '/sys_role/perm',
6666
method: 'patch',
6767
data
6868
})
@@ -74,7 +74,7 @@ export function updateRolePerms(data) {
7474
*/
7575
export function listRoles() {
7676
return request({
77-
url: '/role/list',
77+
url: '/sys_role/list',
7878
method: 'get'
7979
})
8080
}
@@ -85,7 +85,7 @@ export function listRoles() {
8585
*/
8686
export function findRolePvals(rid) {
8787
return request({
88-
url: '/role/'+rid+'/perms',
88+
url: '/sys_role/'+rid+'/perms',
8989
method: 'get'
9090
})
9191
}

browser/src/api/user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import request from '@/utils/request'
55

66
export function queryUser(queryParam,pageParam) {
77
return request({
8-
url: '/user/query',
8+
url: '/sys_user/query',
99
method: 'post',
1010
data: {
1111
...queryParam,
@@ -17,31 +17,31 @@ export function queryUser(queryParam,pageParam) {
1717

1818
export function updateUser(data) {
1919
return request({
20-
url: '/user/info',
20+
url: '/sys_user/info',
2121
method: 'patch',
2222
data
2323
})
2424
}
2525

2626
export function addUser(data) {
2727
return request({
28-
url: '/user',
28+
url: '/sys_user',
2929
method: 'post',
3030
data
3131
})
3232
}
3333

3434
export function deleteUser(data) {
3535
return request({
36-
url: '/user',
36+
url: '/sys_user',
3737
method: 'delete',
3838
data
3939
})
4040
}
4141

4242
export function findUserRoleIds(uid) {
4343
return request({
44-
url: '/user/'+uid+'/roles',
44+
url: '/sys_user/'+uid+'/roles',
4545
method: 'get'
4646
})
4747
}
@@ -52,7 +52,7 @@ export function findUserRoleIds(uid) {
5252
*/
5353
export function updateUserRoles(data) {
5454
return request({
55-
url: '/user/role',
55+
url: '/sys_user/role',
5656
method: 'patch',
5757
data
5858
})

0 commit comments

Comments
 (0)