Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
e56101c3
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e56101c3
编写于
10月 09, 2019
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加user管理页面 修复了第一次登陆白屏bug
上级
600636a2
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
243 addition
and
100 deletion
+243
-100
QMPlusServer/db/qmplus.sql
QMPlusServer/db/qmplus.sql
+48
-39
QMPlusServer/model/dbModel/user.go
QMPlusServer/model/dbModel/user.go
+1
-1
QMPlusVuePage/src/api/api.js
QMPlusVuePage/src/api/api.js
+16
-0
QMPlusVuePage/src/api/user.js
QMPlusVuePage/src/api/user.js
+16
-0
QMPlusVuePage/src/store/module/user.js
QMPlusVuePage/src/store/module/user.js
+4
-3
QMPlusVuePage/src/utils/request.js
QMPlusVuePage/src/utils/request.js
+3
-0
QMPlusVuePage/src/view/superAdmin/api/api.vue
QMPlusVuePage/src/view/superAdmin/api/api.vue
+32
-10
QMPlusVuePage/src/view/superAdmin/authority/authority.vue
QMPlusVuePage/src/view/superAdmin/authority/authority.vue
+31
-35
QMPlusVuePage/src/view/superAdmin/menu/menu.vue
QMPlusVuePage/src/view/superAdmin/menu/menu.vue
+18
-12
QMPlusVuePage/src/view/superAdmin/user/user.vue
QMPlusVuePage/src/view/superAdmin/user/user.vue
+74
-0
未找到文件。
QMPlusServer/db/qmplus.sql
浏览文件 @
e56101c3
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
Target Server Version : 50644
Target Server Version : 50644
File Encoding : 65001
File Encoding : 65001
Date:
30/09/2019 15:46:49
Date:
09/10/2019 18:28:48
*/
*/
SET
NAMES
utf8mb4
;
SET
NAMES
utf8mb4
;
...
@@ -30,7 +30,7 @@ CREATE TABLE `api_authorities` (
...
@@ -30,7 +30,7 @@ CREATE TABLE `api_authorities` (
`api_id`
int
(
10
)
UNSIGNED
NULL
DEFAULT
NULL
,
`api_id`
int
(
10
)
UNSIGNED
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_api_authorities_deleted_at`
(
`deleted_at`
)
USING
BTREE
INDEX
`idx_api_authorities_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
59
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
85
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- ----------------------------
-- Records of api_authorities
-- Records of api_authorities
...
@@ -44,33 +44,31 @@ INSERT INTO `api_authorities` VALUES (77, '2019-09-30 15:34:19', '2019-09-30 15:
...
@@ -44,33 +44,31 @@ INSERT INTO `api_authorities` VALUES (77, '2019-09-30 15:34:19', '2019-09-30 15:
INSERT
INTO
`api_authorities`
VALUES
(
78
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
78
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
79
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
79
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
80
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
80
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
81
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
25
);
INSERT
INTO
`api_authorities`
VALUES
(
159
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
1
);
INSERT
INTO
`api_authorities`
VALUES
(
133
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
1
);
INSERT
INTO
`api_authorities`
VALUES
(
160
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
2
);
INSERT
INTO
`api_authorities`
VALUES
(
134
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
2
);
INSERT
INTO
`api_authorities`
VALUES
(
161
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
3
);
INSERT
INTO
`api_authorities`
VALUES
(
135
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
3
);
INSERT
INTO
`api_authorities`
VALUES
(
162
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
4
);
INSERT
INTO
`api_authorities`
VALUES
(
136
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
4
);
INSERT
INTO
`api_authorities`
VALUES
(
163
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
5
);
INSERT
INTO
`api_authorities`
VALUES
(
137
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
5
);
INSERT
INTO
`api_authorities`
VALUES
(
164
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
6
);
INSERT
INTO
`api_authorities`
VALUES
(
138
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
6
);
INSERT
INTO
`api_authorities`
VALUES
(
165
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
7
);
INSERT
INTO
`api_authorities`
VALUES
(
139
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
7
);
INSERT
INTO
`api_authorities`
VALUES
(
166
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
8
);
INSERT
INTO
`api_authorities`
VALUES
(
140
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
8
);
INSERT
INTO
`api_authorities`
VALUES
(
167
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
9
);
INSERT
INTO
`api_authorities`
VALUES
(
141
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
9
);
INSERT
INTO
`api_authorities`
VALUES
(
168
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
10
);
INSERT
INTO
`api_authorities`
VALUES
(
142
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
10
);
INSERT
INTO
`api_authorities`
VALUES
(
169
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
28
);
INSERT
INTO
`api_authorities`
VALUES
(
143
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
11
);
INSERT
INTO
`api_authorities`
VALUES
(
170
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
11
);
INSERT
INTO
`api_authorities`
VALUES
(
144
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
12
);
INSERT
INTO
`api_authorities`
VALUES
(
171
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
12
);
INSERT
INTO
`api_authorities`
VALUES
(
145
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
13
);
INSERT
INTO
`api_authorities`
VALUES
(
172
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
13
);
INSERT
INTO
`api_authorities`
VALUES
(
146
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
14
);
INSERT
INTO
`api_authorities`
VALUES
(
173
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
14
);
INSERT
INTO
`api_authorities`
VALUES
(
147
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
15
);
INSERT
INTO
`api_authorities`
VALUES
(
174
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
15
);
INSERT
INTO
`api_authorities`
VALUES
(
148
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
16
);
INSERT
INTO
`api_authorities`
VALUES
(
175
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
16
);
INSERT
INTO
`api_authorities`
VALUES
(
149
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
176
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
150
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
18
);
INSERT
INTO
`api_authorities`
VALUES
(
177
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
18
);
INSERT
INTO
`api_authorities`
VALUES
(
151
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
19
);
INSERT
INTO
`api_authorities`
VALUES
(
178
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
19
);
INSERT
INTO
`api_authorities`
VALUES
(
152
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
20
);
INSERT
INTO
`api_authorities`
VALUES
(
179
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
20
);
INSERT
INTO
`api_authorities`
VALUES
(
153
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
21
);
INSERT
INTO
`api_authorities`
VALUES
(
180
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
21
);
INSERT
INTO
`api_authorities`
VALUES
(
154
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
22
);
INSERT
INTO
`api_authorities`
VALUES
(
181
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
22
);
INSERT
INTO
`api_authorities`
VALUES
(
155
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
26
);
INSERT
INTO
`api_authorities`
VALUES
(
182
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
156
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
183
,
'2019-10-09 15:15:27'
,
'2019-10-09 15:15:27'
,
NULL
,
888
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
157
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
158
,
'2019-09-30 15:40:45'
,
'2019-09-30 15:40:45'
,
NULL
,
888
,
25
);
-- ----------------------------
-- ----------------------------
-- Table structure for apis
-- Table structure for apis
...
@@ -87,7 +85,7 @@ CREATE TABLE `apis` (
...
@@ -87,7 +85,7 @@ CREATE TABLE `apis` (
`group`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`group`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_apis_deleted_at`
(
`deleted_at`
)
USING
BTREE
INDEX
`idx_apis_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
8
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
9
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- ----------------------------
-- Records of apis
-- Records of apis
...
@@ -116,7 +114,8 @@ INSERT INTO `apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NUL
...
@@ -116,7 +114,8 @@ INSERT INTO `apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NUL
INSERT
INTO
`apis`
VALUES
(
22
,
'2019-09-30 15:28:21'
,
'2019-09-30 15:28:21'
,
NULL
,
NULL
,
'/menu/getBaseMenuById'
,
'根据id获取菜单'
,
'menu'
);
INSERT
INTO
`apis`
VALUES
(
22
,
'2019-09-30 15:28:21'
,
'2019-09-30 15:28:21'
,
NULL
,
NULL
,
'/menu/getBaseMenuById'
,
'根据id获取菜单'
,
'menu'
);
INSERT
INTO
`apis`
VALUES
(
23
,
'2019-09-30 15:29:19'
,
'2019-09-30 15:29:19'
,
NULL
,
NULL
,
'/user/changePassword'
,
'修改密码'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
23
,
'2019-09-30 15:29:19'
,
'2019-09-30 15:29:19'
,
NULL
,
NULL
,
'/user/changePassword'
,
'修改密码'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
24
,
'2019-09-30 15:29:33'
,
'2019-09-30 15:29:33'
,
NULL
,
NULL
,
'/user/uploadHeaderImg'
,
'上传头像'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
24
,
'2019-09-30 15:29:33'
,
'2019-09-30 15:29:33'
,
NULL
,
NULL
,
'/user/uploadHeaderImg'
,
'上传头像'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
25
,
'2019-09-30 15:30:00'
,
'2019-09-30 15:30:00'
,
NULL
,
NULL
,
'/user/getInfoList'
,
'分页获取用户列表'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
25
,
'2019-09-30 15:30:00'
,
'2019-09-30 15:30:00'
,
'2019-10-09 15:26:37'
,
NULL
,
'/user/getInfoList'
,
'分页获取用户列表'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
28
,
'2019-10-09 15:15:17'
,
'2019-10-09 15:17:07'
,
NULL
,
NULL
,
'/user/getUserList'
,
'获取用户列表'
,
'user'
);
-- ----------------------------
-- ----------------------------
-- Table structure for authorities
-- Table structure for authorities
...
@@ -164,7 +163,7 @@ CREATE TABLE `base_menus` (
...
@@ -164,7 +163,7 @@ CREATE TABLE `base_menus` (
`nick_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`nick_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_base_menus_deleted_at`
(
`deleted_at`
)
USING
BTREE
INDEX
`idx_base_menus_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
9
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
18
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- ----------------------------
-- Records of base_menus
-- Records of base_menus
...
@@ -177,6 +176,15 @@ INSERT INTO `base_menus` VALUES (5, '2019-09-19 22:13:18', '2019-09-19 22:13:18'
...
@@ -177,6 +176,15 @@ INSERT INTO `base_menus` VALUES (5, '2019-09-19 22:13:18', '2019-09-19 22:13:18'
INSERT
INTO
`base_menus`
VALUES
(
6
,
'2019-09-19 22:13:36'
,
'2019-09-19 22:13:36'
,
NULL
,
0
,
3
,
'api'
,
'api'
,
0
,
'view/superAdmin/api/api.vue'
,
'api管理'
,
's-platform'
,
'api管理'
);
INSERT
INTO
`base_menus`
VALUES
(
6
,
'2019-09-19 22:13:36'
,
'2019-09-19 22:13:36'
,
NULL
,
0
,
3
,
'api'
,
'api'
,
0
,
'view/superAdmin/api/api.vue'
,
'api管理'
,
's-platform'
,
'api管理'
);
INSERT
INTO
`base_menus`
VALUES
(
7
,
'2019-09-22 17:17:15'
,
'2019-09-26 13:09:57'
,
'2019-09-26 13:10:14'
,
0
,
0
,
'tttt22'
,
'修改测试'
,
0
,
''
,
'修改测试'
,
'share'
,
'api管理'
);
INSERT
INTO
`base_menus`
VALUES
(
7
,
'2019-09-22 17:17:15'
,
'2019-09-26 13:09:57'
,
'2019-09-26 13:10:14'
,
0
,
0
,
'tttt22'
,
'修改测试'
,
0
,
''
,
'修改测试'
,
'share'
,
'api管理'
);
INSERT
INTO
`base_menus`
VALUES
(
8
,
'2019-09-26 17:17:48'
,
'2019-09-26 17:18:46'
,
'2019-09-26 17:19:23'
,
0
,
0
,
'ASDASDASD'
,
'tttTTT'
,
0
,
'TTTT'
,
'TTT'
,
'TTT'
,
'TTT'
);
INSERT
INTO
`base_menus`
VALUES
(
8
,
'2019-09-26 17:17:48'
,
'2019-09-26 17:18:46'
,
'2019-09-26 17:19:23'
,
0
,
0
,
'ASDASDASD'
,
'tttTTT'
,
0
,
'TTTT'
,
'TTT'
,
'TTT'
,
'TTT'
);
INSERT
INTO
`base_menus`
VALUES
(
9
,
'2019-09-30 18:23:01'
,
'2019-09-30 18:23:01'
,
'2019-09-30 18:25:07'
,
0
,
0
,
't
\'
t'
,
'tttt'
,
0
,
'tt'
,
'tt'
,
'tt'
,
'tt'
);
INSERT
INTO
`base_menus`
VALUES
(
10
,
'2019-09-30 18:23:29'
,
'2019-09-30 18:23:29'
,
'2019-09-30 18:25:05'
,
0
,
0
,
'ttt'
,
'ttt'
,
0
,
'ttt'
,
'ttt'
,
'ttt'
,
'ttt'
);
INSERT
INTO
`base_menus`
VALUES
(
11
,
'2019-09-30 18:23:59'
,
'2019-09-30 18:23:59'
,
'2019-09-30 18:25:04'
,
0
,
0
,
'11111111'
,
'11111111111111'
,
0
,
'111111111'
,
'1111111111'
,
'11111111'
,
'1111111111'
);
INSERT
INTO
`base_menus`
VALUES
(
12
,
'2019-09-30 18:24:03'
,
'2019-09-30 18:24:03'
,
'2019-09-30 18:25:02'
,
0
,
0
,
'22222'
,
'11111111111111222222222222222222'
,
0
,
'11111111222222221'
,
'1111111111222222222222222'
,
'1111112222222211'
,
'1111111111222222222222222'
);
INSERT
INTO
`base_menus`
VALUES
(
13
,
'2019-09-30 18:24:11'
,
'2019-09-30 18:24:11'
,
'2019-09-30 18:25:13'
,
0
,
0
,
'11114'
,
'124124'
,
0
,
'1241'
,
'124124'
,
'214124'
,
'124124'
);
INSERT
INTO
`base_menus`
VALUES
(
14
,
'2019-09-30 18:24:19'
,
'2019-09-30 18:24:19'
,
'2019-09-30 18:25:12'
,
0
,
0
,
'22222'
,
'222'
,
0
,
'2222'
,
'22'
,
'222'
,
'22'
);
INSERT
INTO
`base_menus`
VALUES
(
15
,
'2019-09-30 18:24:22'
,
'2019-09-30 18:24:22'
,
'2019-09-30 18:25:10'
,
0
,
0
,
'2222211'
,
'22211'
,
0
,
'22221'
,
'2211'
,
'2221'
,
'2211'
);
INSERT
INTO
`base_menus`
VALUES
(
16
,
'2019-09-30 18:24:29'
,
'2019-09-30 18:24:29'
,
'2019-09-30 18:25:09'
,
0
,
0
,
'3223123'
,
'123123'
,
0
,
'123123'
,
'123123'
,
'21312323'
,
'123123'
);
INSERT
INTO
`base_menus`
VALUES
(
17
,
'2019-10-09 15:12:29'
,
'2019-10-09 15:14:44'
,
NULL
,
0
,
3
,
'user'
,
'user'
,
0
,
'view/superAdmin/user/user.vue'
,
'用户管理'
,
'coordinate'
,
'用户管理'
);
-- ----------------------------
-- ----------------------------
-- Table structure for menus
-- Table structure for menus
...
@@ -200,7 +208,7 @@ CREATE TABLE `menus` (
...
@@ -200,7 +208,7 @@ CREATE TABLE `menus` (
`nick_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`nick_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_menus_deleted_at`
(
`deleted_at`
)
USING
BTREE
INDEX
`idx_menus_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
10
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
31
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- ----------------------------
-- Records of menus
-- Records of menus
...
@@ -210,12 +218,13 @@ INSERT INTO `menus` VALUES (196, '2019-09-19 22:06:17', '2019-09-30 15:44:50', N
...
@@ -210,12 +218,13 @@ INSERT INTO `menus` VALUES (196, '2019-09-19 22:06:17', '2019-09-30 15:44:50', N
INSERT
INTO
`menus`
VALUES
(
197
,
'2019-09-19 22:06:38'
,
'2019-09-19 22:06:38'
,
NULL
,
0
,
9528
,
'admin'
,
'superAdmin'
,
0
,
'view/superAdmin/index.vue'
,
'超级管理员'
,
'user-solid'
,
0
,
'3'
,
'超级管理员'
);
INSERT
INTO
`menus`
VALUES
(
197
,
'2019-09-19 22:06:38'
,
'2019-09-19 22:06:38'
,
NULL
,
0
,
9528
,
'admin'
,
'superAdmin'
,
0
,
'view/superAdmin/index.vue'
,
'超级管理员'
,
'user-solid'
,
0
,
'3'
,
'超级管理员'
);
INSERT
INTO
`menus`
VALUES
(
198
,
'2019-09-19 22:11:53'
,
'2019-09-19 22:11:53'
,
NULL
,
0
,
9528
,
'authority'
,
'authority'
,
0
,
'view/superAdmin/authority/authority.vue'
,
'角色管理'
,
's-custom'
,
3
,
'4'
,
'角色管理'
);
INSERT
INTO
`menus`
VALUES
(
198
,
'2019-09-19 22:11:53'
,
'2019-09-19 22:11:53'
,
NULL
,
0
,
9528
,
'authority'
,
'authority'
,
0
,
'view/superAdmin/authority/authority.vue'
,
'角色管理'
,
's-custom'
,
3
,
'4'
,
'角色管理'
);
INSERT
INTO
`menus`
VALUES
(
199
,
'2019-09-19 22:13:18'
,
'2019-09-19 22:13:18'
,
NULL
,
0
,
9528
,
'menu'
,
'menu'
,
0
,
'view/superAdmin/menu/menu.vue'
,
'菜单管理'
,
's-order'
,
3
,
'5'
,
'菜单管理'
);
INSERT
INTO
`menus`
VALUES
(
199
,
'2019-09-19 22:13:18'
,
'2019-09-19 22:13:18'
,
NULL
,
0
,
9528
,
'menu'
,
'menu'
,
0
,
'view/superAdmin/menu/menu.vue'
,
'菜单管理'
,
's-order'
,
3
,
'5'
,
'菜单管理'
);
INSERT
INTO
`menus`
VALUES
(
204
,
'2019-09-19 22:05:18'
,
'2019-09-19 22:05:18'
,
NULL
,
0
,
888
,
'dashbord'
,
'dashbord'
,
0
,
'view/dashbord/index.vue'
,
'仪表盘'
,
'setting'
,
0
,
'1'
,
'仪表盘'
);
INSERT
INTO
`menus`
VALUES
(
224
,
'2019-09-19 22:05:18'
,
'2019-09-19 22:05:18'
,
NULL
,
0
,
888
,
'dashbord'
,
'dashbord'
,
0
,
'view/dashbord/index.vue'
,
'仪表盘'
,
'setting'
,
0
,
'1'
,
'仪表盘'
);
INSERT
INTO
`menus`
VALUES
(
205
,
'2019-09-19 22:06:17'
,
'2019-09-30 15:44:50'
,
NULL
,
0
,
888
,
'test'
,
'test'
,
0
,
'view/test/index.vue'
,
'测试菜单'
,
'info'
,
0
,
'2'
,
'测试菜单'
);
INSERT
INTO
`menus`
VALUES
(
225
,
'2019-09-19 22:06:17'
,
'2019-09-30 15:44:50'
,
NULL
,
0
,
888
,
'test'
,
'test'
,
0
,
'view/test/index.vue'
,
'测试菜单'
,
'info'
,
0
,
'2'
,
'测试菜单'
);
INSERT
INTO
`menus`
VALUES
(
206
,
'2019-09-19 22:06:38'
,
'2019-09-19 22:06:38'
,
NULL
,
0
,
888
,
'admin'
,
'superAdmin'
,
0
,
'view/superAdmin/index.vue'
,
'超级管理员'
,
'user-solid'
,
0
,
'3'
,
'超级管理员'
);
INSERT
INTO
`menus`
VALUES
(
226
,
'2019-09-19 22:06:38'
,
'2019-09-19 22:06:38'
,
NULL
,
0
,
888
,
'admin'
,
'superAdmin'
,
0
,
'view/superAdmin/index.vue'
,
'超级管理员'
,
'user-solid'
,
0
,
'3'
,
'超级管理员'
);
INSERT
INTO
`menus`
VALUES
(
207
,
'2019-09-19 22:11:53'
,
'2019-09-19 22:11:53'
,
NULL
,
0
,
888
,
'authority'
,
'authority'
,
0
,
'view/superAdmin/authority/authority.vue'
,
'角色管理'
,
's-custom'
,
3
,
'4'
,
'角色管理'
);
INSERT
INTO
`menus`
VALUES
(
227
,
'2019-09-19 22:11:53'
,
'2019-09-19 22:11:53'
,
NULL
,
0
,
888
,
'authority'
,
'authority'
,
0
,
'view/superAdmin/authority/authority.vue'
,
'角色管理'
,
's-custom'
,
3
,
'4'
,
'角色管理'
);
INSERT
INTO
`menus`
VALUES
(
208
,
'2019-09-19 22:13:18'
,
'2019-09-19 22:13:18'
,
NULL
,
0
,
888
,
'menu'
,
'menu'
,
0
,
'view/superAdmin/menu/menu.vue'
,
'菜单管理'
,
's-order'
,
3
,
'5'
,
'菜单管理'
);
INSERT
INTO
`menus`
VALUES
(
228
,
'2019-09-19 22:13:18'
,
'2019-09-19 22:13:18'
,
NULL
,
0
,
888
,
'menu'
,
'menu'
,
0
,
'view/superAdmin/menu/menu.vue'
,
'菜单管理'
,
's-order'
,
3
,
'5'
,
'菜单管理'
);
INSERT
INTO
`menus`
VALUES
(
209
,
'2019-09-19 22:13:36'
,
'2019-09-19 22:13:36'
,
NULL
,
0
,
888
,
'api'
,
'api'
,
0
,
'view/superAdmin/api/api.vue'
,
'api管理'
,
's-platform'
,
3
,
'6'
,
'api管理'
);
INSERT
INTO
`menus`
VALUES
(
229
,
'2019-09-19 22:13:36'
,
'2019-09-19 22:13:36'
,
NULL
,
0
,
888
,
'api'
,
'api'
,
0
,
'view/superAdmin/api/api.vue'
,
'api管理'
,
's-platform'
,
3
,
'6'
,
'api管理'
);
INSERT
INTO
`menus`
VALUES
(
230
,
'2019-10-09 15:12:29'
,
'2019-10-09 15:14:44'
,
NULL
,
0
,
888
,
'user'
,
'user'
,
0
,
'view/superAdmin/user/user.vue'
,
'用户管理'
,
'coordinate'
,
3
,
'17'
,
'用户管理'
);
-- ----------------------------
-- ----------------------------
-- Table structure for users
-- Table structure for users
...
...
QMPlusServer/model/dbModel/user.go
浏览文件 @
e56101c3
...
@@ -11,7 +11,7 @@ import (
...
@@ -11,7 +11,7 @@ import (
)
)
type
User
struct
{
type
User
struct
{
gorm
.
Model
`json:"-"`
gorm
.
Model
UUID
uuid
.
UUID
`json:"uuid"`
UUID
uuid
.
UUID
`json:"uuid"`
Username
string
`json:"userName"`
Username
string
`json:"userName"`
Password
string
`json:"-"`
Password
string
`json:"-"`
...
...
QMPlusVuePage/src/api/api.js
浏览文件 @
e56101c3
...
@@ -133,3 +133,19 @@ export const setAuthAndApi = (data) => {
...
@@ -133,3 +133,19 @@ export const setAuthAndApi = (data) => {
data
data
})
})
}
}
// @Tags Api
// @Summary 删除指定api
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body dbModel.Api true "删除api"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/deleteApi [post]
export
const
deleteApi
=
(
data
)
=>
{
return
service
({
url
:
"
/api/deleteApi
"
,
method
:
'
post
'
,
data
})
}
\ No newline at end of file
QMPlusVuePage/src/api/user.js
浏览文件 @
e56101c3
...
@@ -23,3 +23,19 @@ export const regist = (data) => {
...
@@ -23,3 +23,19 @@ export const regist = (data) => {
data
:
data
data
:
data
})
})
}
}
// @Tags User
// @Summary 分页获取用户列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /user/getUserList [post]
export
const
getUserList
=
(
data
)
=>
{
return
service
({
url
:
"
/user/getUserList
"
,
method
:
'
post
'
,
data
:
data
})
}
\ No newline at end of file
QMPlusVuePage/src/store/module/user.js
浏览文件 @
e56101c3
...
@@ -26,10 +26,11 @@ export const user = {
...
@@ -26,10 +26,11 @@ export const user = {
// 这里的 `state` 对象是模块的局部状态
// 这里的 `state` 对象是模块的局部状态
state
.
expiresAt
=
expiresAt
state
.
expiresAt
=
expiresAt
},
},
clearAll
(
state
)
{
LoginOut
(
state
)
{
state
.
userInfo
=
{}
state
.
userInfo
=
{}
state
.
token
=
""
state
.
token
=
""
state
.
expiresAt
=
""
state
.
expiresAt
=
""
router
.
push
({
name
:
'
login
'
})
}
}
},
},
...
@@ -43,9 +44,9 @@ export const user = {
...
@@ -43,9 +44,9 @@ export const user = {
if
(
res
.
success
)
{
if
(
res
.
success
)
{
const
redirect
=
router
.
history
.
current
.
query
.
redirect
const
redirect
=
router
.
history
.
current
.
query
.
redirect
if
(
redirect
)
{
if
(
redirect
)
{
router
.
push
({
path
:
redirect
})
router
.
push
({
path
:
redirect
,
replace
:
true
})
}
else
{
}
else
{
router
.
push
({
name
:
'
dashboard
'
})
router
.
push
({
name
:
'
dashboard
'
,
replace
:
true
})
}
}
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
QMPlusVuePage/src/utils/request.js
浏览文件 @
e56101c3
...
@@ -40,6 +40,9 @@ service.interceptors.response.use(
...
@@ -40,6 +40,9 @@ service.interceptors.response.use(
message
:
response
.
data
.
msg
,
message
:
response
.
data
.
msg
,
type
:
'
error
'
type
:
'
error
'
})
})
if
(
response
.
data
.
data
&&
response
.
data
.
data
.
reload
)
{
store
.
commit
(
'
user/LoginOut
'
)
}
return
Promise
.
reject
(
response
.
data
.
msg
)
return
Promise
.
reject
(
response
.
data
.
msg
)
}
}
},
},
...
...
QMPlusVuePage/src/view/superAdmin/api/api.vue
浏览文件 @
e56101c3
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<el-dialog
:visible.sync=
"dialogFormVisible"
title=
"新增Api"
>
<el-dialog
:visible.sync=
"dialogFormVisible"
title=
"新增Api"
>
<el-form
:inline=
"true"
:model=
"form"
label-width=
"80px"
>
<el-form
:inline=
"true"
:model=
"form"
label-width=
"80px"
>
<el-form-item
label=
"路径"
>
<el-form-item
label=
"路径"
>
<el-input
autocomplete=
"off"
@
blur=
"autoGroup
"
v-model=
"form.path"
></el-input>
<el-input
@
blur=
"autoGroup"
autocomplete=
"off
"
v-model=
"form.path"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"api分组"
>
<el-form-item
label=
"api分组"
>
<el-input
autocomplete=
"off"
v-model=
"form.group"
></el-input>
<el-input
autocomplete=
"off"
v-model=
"form.group"
></el-input>
...
@@ -51,7 +51,13 @@
...
@@ -51,7 +51,13 @@
<
script
>
<
script
>
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
import
{
getApiById
,
getApiList
,
createApi
,
updataApi
}
from
'
@/api/api
'
import
{
getApiById
,
getApiList
,
createApi
,
updataApi
,
deleteApi
}
from
'
@/api/api
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
export
default
{
export
default
{
...
@@ -72,7 +78,7 @@ export default {
...
@@ -72,7 +78,7 @@ export default {
},
},
methods
:
{
methods
:
{
// 自动设置api分组
// 自动设置api分组
autoGroup
(){
autoGroup
()
{
this
.
form
.
group
=
this
.
form
.
path
.
split
(
'
/
'
)[
1
]
this
.
form
.
group
=
this
.
form
.
path
.
split
(
'
/
'
)[
1
]
},
},
initForm
()
{
initForm
()
{
...
@@ -90,15 +96,34 @@ export default {
...
@@ -90,15 +96,34 @@ export default {
this
.
type
=
type
this
.
type
=
type
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
},
},
addApi
()
{
createApi
()
},
async
editApi
(
row
)
{
async
editApi
(
row
)
{
const
res
=
await
getApiById
({
id
:
row
.
ID
})
const
res
=
await
getApiById
({
id
:
row
.
ID
})
this
.
form
=
res
.
data
.
api
this
.
form
=
res
.
data
.
api
this
.
openDialog
(
'
edit
'
)
this
.
openDialog
(
'
edit
'
)
},
},
deleteApi
()
{},
async
deleteApi
(
row
)
{
this
.
$confirm
(
'
此操作将永久删除所有角色下该菜单, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
})
.
then
(
async
()
=>
{
const
res
=
await
deleteApi
(
row
)
if
(
res
.
success
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功!
'
})
this
.
getTableData
()
}
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
})
})
},
async
enterDialog
()
{
async
enterDialog
()
{
switch
(
this
.
type
)
{
switch
(
this
.
type
)
{
case
'
addApi
'
:
case
'
addApi
'
:
...
@@ -141,9 +166,6 @@ export default {
...
@@ -141,9 +166,6 @@ export default {
break
break
}
}
}
}
},
created
()
{
this
.
getTableData
()
}
}
}
}
</
script
>
</
script
>
...
...
QMPlusVuePage/src/view/superAdmin/authority/authority.vue
浏览文件 @
e56101c3
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
<!-- 关联menu弹窗 -->
<!-- 关联menu弹窗 -->
<el-dialog
:visible.sync=
"menuDialogFlag"
title=
"关联菜单"
>
<el-dialog
:visible.sync=
"menuDialogFlag"
title=
"关联菜单"
>
<el-tree
<el-tree
v-if=
"menuDialogFlag"
:data=
"menuTreeData"
:data=
"menuTreeData"
:default-checked-keys=
"menuTreeIds"
:default-checked-keys=
"menuTreeIds"
:props=
"menuDefaultProps"
:props=
"menuDefaultProps"
...
@@ -54,6 +53,7 @@
...
@@ -54,6 +53,7 @@
node-key=
"ID"
node-key=
"ID"
ref=
"menuTree"
ref=
"menuTree"
show-checkbox
show-checkbox
v-if=
"menuDialogFlag"
></el-tree>
></el-tree>
<div
class=
"dialog-footer"
slot=
"footer"
>
<div
class=
"dialog-footer"
slot=
"footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
...
@@ -61,12 +61,9 @@
...
@@ -61,12 +61,9 @@
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 关联api弹窗 -->
<!-- 关联api弹窗 -->
<el-dialog
:visible.sync=
"apiDialogFlag"
title=
"关联api"
>
<el-dialog
:visible.sync=
"apiDialogFlag"
title=
"关联api"
>
<el-tree
<el-tree
v-if=
"apiDialogFlag"
:data=
"apiTreeData"
:data=
"apiTreeData"
:default-checked-keys=
"apiTreeIds"
:default-checked-keys=
"apiTreeIds"
:props=
"apiDefaultProps"
:props=
"apiDefaultProps"
...
@@ -75,6 +72,7 @@
...
@@ -75,6 +72,7 @@
node-key=
"ID"
node-key=
"ID"
ref=
"apiTree"
ref=
"apiTree"
show-checkbox
show-checkbox
v-if=
"apiDialogFlag"
></el-tree>
></el-tree>
<div
class=
"dialog-footer"
slot=
"footer"
>
<div
class=
"dialog-footer"
slot=
"footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
...
@@ -93,19 +91,15 @@ import {
...
@@ -93,19 +91,15 @@ import {
createAuthority
createAuthority
}
from
'
@/api/authority
'
}
from
'
@/api/authority
'
import
{
getBaseMenuTree
,
addMenuAuthority
,
getMenuAuthority
}
from
'
@/api/menu
'
import
{
getBaseMenuTree
,
addMenuAuthority
,
getMenuAuthority
}
from
'
@/api/menu
'
import
{
import
{
getAllApis
,
getAuthAndApi
,
setAuthAndApi
}
from
'
@/api/api
'
getAllApis
,
getAuthAndApi
,
setAuthAndApi
}
from
'
@/api/api
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
export
default
{
export
default
{
name
:
'
Authority
'
,
name
:
'
Authority
'
,
mixins
:[
infoList
],
mixins
:
[
infoList
],
data
()
{
data
()
{
return
{
return
{
listApi
:
getAuthorityList
,
listApi
:
getAuthorityList
,
listKey
:
'
list
'
,
listKey
:
'
list
'
,
activeUserId
:
0
,
activeUserId
:
0
,
menuTreeData
:
[],
menuTreeData
:
[],
menuTreeIds
:
[],
menuTreeIds
:
[],
...
@@ -194,7 +188,7 @@ export default {
...
@@ -194,7 +188,7 @@ export default {
const
arr
=
[]
const
arr
=
[]
menus
.
map
(
item
=>
{
menus
.
map
(
item
=>
{
// 防止直接选中父级造成全选
// 防止直接选中父级造成全选
if
(
!
menus
.
some
(
same
=>
same
.
parentId
===
item
.
menuId
))
{
if
(
!
menus
.
some
(
same
=>
same
.
parentId
===
item
.
menuId
))
{
arr
.
push
(
Number
(
item
.
menuId
))
arr
.
push
(
Number
(
item
.
menuId
))
}
}
})
})
...
@@ -204,8 +198,7 @@ export default {
...
@@ -204,8 +198,7 @@ export default {
},
},
// 关联树 确认方法
// 关联树 确认方法
async
relation
()
{
async
relation
()
{
const
checkArr
=
this
.
$refs
.
menuTree
const
checkArr
=
this
.
$refs
.
menuTree
.
getCheckedNodes
(
false
,
true
)
.
getCheckedNodes
(
false
,
true
)
const
res
=
await
addMenuAuthority
({
const
res
=
await
addMenuAuthority
({
menus
:
checkArr
,
menus
:
checkArr
,
authorityId
:
this
.
activeUserId
authorityId
:
this
.
activeUserId
...
@@ -219,36 +212,40 @@ export default {
...
@@ -219,36 +212,40 @@ export default {
this
.
closeDialog
()
this
.
closeDialog
()
},
},
// 创建api树方法
// 创建api树方法
buildApiTree
(
apis
){
buildApiTree
(
apis
)
{
const
apiObj
=
new
Object
const
apiObj
=
new
Object
()
apis
&&
apis
.
map
(
item
=>
{
apis
&&
if
(
apiObj
.
hasOwnProperty
(
item
.
group
)){
apis
.
map
(
item
=>
{
if
(
apiObj
.
hasOwnProperty
(
item
.
group
))
{
apiObj
[
item
.
group
].
push
(
item
)
apiObj
[
item
.
group
].
push
(
item
)
}
else
{
}
else
{
Object
.
assign
(
apiObj
,{[
item
.
group
]:[
item
]
})
Object
.
assign
(
apiObj
,
{
[
item
.
group
]:
[
item
]
})
}
}
})
})
const
apiTree
=
[]
const
apiTree
=
[]
for
(
const
key
in
apiObj
)
{
for
(
const
key
in
apiObj
)
{
const
treeNode
=
{
const
treeNode
=
{
ID
:
key
,
ID
:
key
,
description
:
key
+
"
组
"
,
description
:
key
+
'
组
'
,
children
:
apiObj
[
key
]
children
:
apiObj
[
key
]
}
}
apiTree
.
push
(
treeNode
)
apiTree
.
push
(
treeNode
)
}
}
return
apiTree
return
apiTree
},
},
// 关联用户api关系
// 关联用户api关系
async
addAuthApi
(
row
){
async
addAuthApi
(
row
)
{
const
res
=
await
getAuthAndApi
({
authorityId
:
row
.
authorityId
})
const
res
=
await
getAuthAndApi
({
authorityId
:
row
.
authorityId
})
this
.
activeUserId
=
row
.
authorityId
this
.
activeUserId
=
row
.
authorityId
this
.
apiTreeIds
=
res
.
data
.
apis
||
[]
this
.
apiTreeIds
=
res
.
data
.
apis
||
[]
this
.
apiDialogFlag
=
true
this
.
apiDialogFlag
=
true
},
},
async
authApiEnter
(){
async
authApiEnter
()
{
const
checkArr
=
this
.
$refs
.
apiTree
.
getCheckedKeys
(
true
)
const
checkArr
=
this
.
$refs
.
apiTree
.
getCheckedKeys
(
true
)
const
res
=
await
setAuthAndApi
({
authorityId
:
this
.
activeUserId
,
apiIds
:
checkArr
})
const
res
=
await
setAuthAndApi
({
authorityId
:
this
.
activeUserId
,
apiIds
:
checkArr
})
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
'
success
'
,
type
:
'
success
'
,
...
@@ -259,7 +256,6 @@ export default {
...
@@ -259,7 +256,6 @@ export default {
}
}
},
},
async
created
()
{
async
created
()
{
this
.
getTableData
()
// 获取所有菜单树
// 获取所有菜单树
const
res
=
await
getBaseMenuTree
()
const
res
=
await
getBaseMenuTree
()
this
.
menuTreeData
=
res
.
data
.
menus
this
.
menuTreeData
=
res
.
data
.
menus
...
...
QMPlusVuePage/src/view/superAdmin/menu/menu.vue
浏览文件 @
e56101c3
...
@@ -82,18 +82,24 @@
...
@@ -82,18 +82,24 @@
<
script
>
<
script
>
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
import
{
updataBaseMenu
,
getMenuList
,
addBaseMenu
,
deleteBaseMenu
,
getBaseMenuById
}
from
'
@/api/menu
'
import
{
updataBaseMenu
,
getMenuList
,
addBaseMenu
,
deleteBaseMenu
,
getBaseMenuById
}
from
'
@/api/menu
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
export
default
{
export
default
{
name
:
'
Menus
'
,
name
:
'
Menus
'
,
mixins
:[
infoList
],
mixins
:
[
infoList
],
data
()
{
data
()
{
return
{
return
{
listApi
:
getMenuList
,
listApi
:
getMenuList
,
listKey
:
'
list
'
,
listKey
:
'
list
'
,
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
form
:
{
form
:
{
ID
:
0
,
ID
:
0
,
path
:
''
,
path
:
''
,
name
:
''
,
name
:
''
,
hidden
:
''
,
hidden
:
''
,
...
@@ -104,7 +110,7 @@ export default {
...
@@ -104,7 +110,7 @@ export default {
icon
:
''
icon
:
''
}
}
},
},
isEdit
:
false
isEdit
:
false
}
}
},
},
methods
:
{
methods
:
{
...
@@ -154,9 +160,9 @@ export default {
...
@@ -154,9 +160,9 @@ export default {
// 添加menu
// 添加menu
async
enterDialog
()
{
async
enterDialog
()
{
let
res
let
res
if
(
this
.
isEdit
)
{
if
(
this
.
isEdit
)
{
res
=
await
updataBaseMenu
(
this
.
form
)
res
=
await
updataBaseMenu
(
this
.
form
)
}
else
{
}
else
{
res
=
await
addBaseMenu
(
this
.
form
)
res
=
await
addBaseMenu
(
this
.
form
)
}
}
if
(
res
.
success
)
{
if
(
res
.
success
)
{
...
@@ -183,8 +189,8 @@ export default {
...
@@ -183,8 +189,8 @@ export default {
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
},
},
// 修改菜单方法
// 修改菜单方法
async
editMenu
(
id
){
async
editMenu
(
id
)
{
const
res
=
await
getBaseMenuById
({
id
})
const
res
=
await
getBaseMenuById
({
id
})
this
.
form
=
res
.
data
.
menu
this
.
form
=
res
.
data
.
menu
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
this
.
isEdit
=
true
this
.
isEdit
=
true
...
...
QMPlusVuePage/src/view/superAdmin/user/user.vue
0 → 100644
浏览文件 @
e56101c3
<
template
>
<div>
<div
class=
"button-box clearflex"
></div>
<el-table
:data=
"tableData"
border
stripe
>
<el-table-column
label=
"头像"
min-width=
"50"
>
<template
slot-scope=
"scope"
>
<img
:src=
"scope.row.headerImg"
width=
"50"
height=
"50"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"id"
min-width=
"60"
prop=
"ID"
></el-table-column>
<el-table-column
label=
"用户名"
min-width=
"150"
prop=
"userName"
></el-table-column>
<el-table-column
label=
"昵称"
min-width=
"150"
prop=
"nickName"
></el-table-column>
<el-table-column
label=
"用户级别"
min-width=
"150"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
authority
.
authorityName
}}
</div>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"editApi(scope.row)"
size=
"small"
type=
"text"
>
编辑
</el-button>
<el-button
@
click=
"deleteApi(scope.row)"
size=
"small"
type=
"text"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
:current-page=
"page"
:page-size=
"pageSize"
:page-sizes=
"[10, 30, 50, 100]"
:style=
"{float:'right',padding:'20px'}"
:total=
"total"
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
hide-on-single-page
layout=
"total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
</template>
<
script
>
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
import
{
getUserList
}
from
'
@/api/user
'
import
infoList
from
'
@/view/superAdmin/mixins/infoList
'
export
default
{
name
:
'
Api
'
,
mixins
:
[
infoList
],
data
()
{
return
{
listApi
:
getUserList
,
listKey
:
'
userList
'
,
dialogFormVisible
:
false
,
type
:
''
}
},
methods
:
{
initForm
()
{
this
.
form
=
{
path
:
''
,
group
:
''
,
description
:
''
}
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.button-box
{
padding
:
10px
20px
;
.el-button
{
float
:
right
;
}
}
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录