Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
6d3860c1
Commit
6d3860c1
authored
Jul 27, 2021
by
Qingyu Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: role detail should not keep alive
parent
bbe1ae77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
25 deletions
+34
-25
request.js
server/utils/request.js
+2
-3
RoleDetail.vue
src/components/Roles/RoleDetail.vue
+12
-12
index.js
src/router/Withdrawal/index.js
+20
-10
No files found.
server/utils/request.js
View file @
6d3860c1
...
...
@@ -18,7 +18,8 @@ exports.httpReq = (ctx, opts) => {
request
(
opts
,
(
err
,
res
,
body
)
=>
{
console
.
info
(
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
}
]) spent:
${
+
new
Date
()
-
time_start
}
ms`
);
...
...
@@ -31,5 +32,3 @@ exports.httpReq = (ctx, opts) => {
});
});
};
src/components/Roles/RoleDetail.vue
View file @
6d3860c1
...
...
@@ -70,7 +70,7 @@
<
script
>
import
{
get_role_info
as
reqGet_role_info
,
getAll_role_list
as
reqGetAll_role_list
getAll_role_list
as
reqGetAll_role_list
,
}
from
"../../service/role"
;
export
default
{
name
:
"RoleDetail"
,
...
...
@@ -82,7 +82,7 @@ export default {
multiple
:
true
,
//设置为多选
value
:
"id"
,
//value值和哪个值绑定
label
:
"desc"
,
//label值和哪个值绑定
children
:
"sub_permissions"
//children值和哪个值绑定
children
:
"sub_permissions"
,
//children值和哪个值绑定
},
selectedOptions
:
[],
permissionsAll
:
[],
...
...
@@ -95,17 +95,17 @@ export default {
update_user_name
:
""
,
create_time
:
""
,
create_user_name
:
""
,
role_account_list
:
[]
}
role_account_list
:
[]
,
}
,
};
},
mounted
()
{
this
.
roleId
=
this
.
$route
.
query
.
roleId
;
let
{
email
}
=
this
.
$store
.
state
.
userInfo
;
reqGetAll_role_list
(
email
,
this
.
appId
).
then
(
res
=>
{
reqGetAll_role_list
(
email
,
this
.
appId
).
then
(
(
res
)
=>
{
this
.
permissionsAll
=
res
.
permissions
;
});
reqGet_role_info
(
this
.
roleId
,
this
.
appId
).
then
(
res
=>
{
reqGet_role_info
(
this
.
roleId
,
this
.
appId
).
then
(
(
res
)
=>
{
const
{
role_name
,
role_status
,
...
...
@@ -114,7 +114,7 @@ export default {
create_time
,
create_user_name
,
role_account_list
,
permissions
permissions
,
}
=
res
.
result
;
this
.
role_info_detail
=
{
role_name
,
...
...
@@ -123,7 +123,7 @@ export default {
update_user_name
,
create_time
,
create_user_name
,
role_account_list
role_account_list
,
};
this
.
editEchoData
(
permissions
);
});
...
...
@@ -135,18 +135,18 @@ export default {
//遍历回显值selectedOptions
editEchoData
(
permissions
)
{
let
selectData
=
[];
permissions
.
map
(
item
=>
{
permissions
.
map
(
(
item
)
=>
{
let
one
=
{
id
:
item
.
id
};
if
(
item
.
sub_permissions
)
{
item
.
sub_permissions
.
map
(
info
=>
{
item
.
sub_permissions
.
map
(
(
info
)
=>
{
let
selectId
=
[
one
.
id
,
info
.
id
];
selectData
.
push
(
selectId
);
});
}
});
this
.
selectedOptions
=
selectData
;
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
src/router/Withdrawal/index.js
View file @
6d3860c1
...
...
@@ -7,19 +7,26 @@ const withdrawalRoutes = [
{
path
:
"/op/withdrawal/examine"
,
name
:
"Examine"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Examine"
),
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Examine"
)
},
//用户管理
{
path
:
"/op/withdrawal/user"
,
name
:
"User"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/User/userList"
),
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/User/userList"
)
},
//角色管理
{
path
:
"/op/withdrawal/roleAddRole"
,
name
:
"AddRole"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/add-role"
),
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/add-role"
),
meta
:
{
requireAuth
:
true
,
keepAlive
:
true
...
...
@@ -28,7 +35,10 @@ const withdrawalRoutes = [
{
path
:
"/op/withdrawal/roleManageRole"
,
name
:
"ManageRole"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/manage-role"
),
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/manage-role"
),
meta
:
{
requireAuth
:
true
,
keepAlive
:
true
...
...
@@ -37,11 +47,11 @@ const withdrawalRoutes = [
{
path
:
"/op/withdrawal/roleRoleDetail"
,
name
:
"RoleDetail"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/role-detail"
),
meta
:
{
keepAlive
:
true
}
}
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/role-detail"
)
}
];
export
default
withdrawalRoutes
;
\ No newline at end of file
export
default
withdrawalRoutes
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment