Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
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
常超
founder_vue
Commits
f69dd645
Commit
f69dd645
authored
Nov 10, 2021
by
maxiaohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限管理 用户权限编辑、用户组权限编辑
parent
734553c8
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
221 additions
and
37 deletions
+221
-37
src/router/modules/index.js
+48
-3
src/views/SystemManage/GroupPermission.vue
+20
-0
src/views/SystemManage/PermissionManage.vue
+80
-34
src/views/SystemManage/UserPermission.vue
+45
-0
src/views/SystemManage/scss/grouppermission.scss
+0
-0
src/views/SystemManage/scss/permission.scss
+0
-0
src/views/SystemManage/scss/userpermission.scss
+28
-0
No files found.
src/router/modules/index.js
View file @
f69dd645
...
...
@@ -244,16 +244,61 @@ export default [
component
:
()
=>
import
(
"@/views/SystemManage/RoleManage.vue"
)
},
{
path
:
"
Auth
Manage"
,
name
:
"
Auth
Manage"
,
path
:
"
Permission
Manage"
,
name
:
"
Permission
Manage"
,
hidden
:
false
,
meta
:
{
title
:
"权限管理"
,
auth
:
"5"
},
component
:
()
=>
import
(
"@/views/SystemManage/AuthManage.vue"
)
component
:
()
=>
import
(
"@/views/SystemManage/PermissionManage.vue"
),
children
:
[
// {
// path: "/UserPermission",
// name: "UserPermission",
// hidden: true,
// meta: {
// title: "编辑用户权限",
// auth: "5"
// },
// component: () =>
// import("@/views/SystemManage/UserPermission.vue")
// },
// {
// path: "/GroupPermission",
// name: "GroupPermission",
// hidden: true,
// meta: {
// title: "编辑用户权限",
// auth: "5"
// },
// component: () =>
// import("@/views/SystemManage/GroupPermission.vue")
// }
]
}
]
},
{
path
:
"/UserPermission"
,
name
:
"UserPermission"
,
hidden
:
true
,
meta
:
{
title
:
"编辑用户权限"
,
auth
:
"5"
},
component
:
()
=>
import
(
"@/views/SystemManage/UserPermission.vue"
)
},
{
path
:
"/GroupPermission"
,
name
:
"GroupPermission"
,
hidden
:
true
,
meta
:
{
title
:
"编辑用户权限"
,
auth
:
"5"
},
component
:
()
=>
import
(
"@/views/SystemManage/GroupPermission.vue"
)
}
]
},
...
...
src/views/SystemManage/GroupPermission.vue
0 → 100644
View file @
f69dd645
<
template
>
<div>
{{
id
}}
</div>
</
template
>
<
script
>
export
default
{
name
:
"GroupPermission"
,
data
()
{
return
{
id
:
""
};
},
mounted
()
{
this
.
id
=
this
.
$route
.
params
.
id
;
console
.
info
(
"chuancan"
,
this
.
$route
.
params
.
id
);
}
};
</
script
>
<
style
scoped
></
style
>
src/views/SystemManage/
Auth
Manage.vue
→
src/views/SystemManage/
Permission
Manage.vue
View file @
f69dd645
...
...
@@ -70,27 +70,47 @@
<!-- 用户表格-->
<div
class=
"table"
>
<el-table
:height=
"height"
:height=
"
userWidths.
height"
style=
"width: 100%;"
highlight-current-row
ref=
"multipleTable"
:data=
"userTableData"
class=
"table"
>
<el-table-column
prop=
"username"
label=
"用户名"
:width=
"width1"
>
<el-table-column
prop=
"username"
label=
"用户名"
:width=
"userWidths.width1"
>
</el-table-column>
<el-table-column
prop=
"truename"
label=
"姓名"
:width=
"width1"
>
<el-table-column
prop=
"truename"
label=
"姓名"
:width=
"userWidths.width1"
>
</el-table-column>
<el-table-column
prop=
"policemanid"
label=
"警号"
:width=
"width2"
>
<el-table-column
prop=
"policemanid"
label=
"警号"
:width=
"userWidths.width2"
>
</el-table-column>
<el-table-column
prop=
"group"
label=
"用户组"
:width=
"width3"
>
<el-table-column
prop=
"group"
label=
"用户组"
:width=
"userWidths.width3"
>
</el-table-column>
<el-table-column
prop=
"unitname"
label=
"所属单位"
:width=
"width5"
>
<el-table-column
prop=
"unitname"
label=
"所属单位"
:width=
"userWidths.width5"
>
</el-table-column>
<el-table-column
prop=
"roleName"
label=
"角色"
:width=
"width4"
:width=
"
userWidths.
width4"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
...
...
@@ -106,7 +126,7 @@
<el-table-column
prop=
"groupid_list"
label=
"权限"
:width=
"width5"
:width=
"
userWidths.
width5"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
...
...
@@ -119,7 +139,11 @@
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"启用状态"
:width=
"width1"
>
<el-table-column
prop=
"status"
label=
"启用状态"
:width=
"userWidths.width1"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.status === '0'"
class=
"circle-red"
></div>
<div
v-if=
"scope.row.status === '1'"
class=
"circle-blue"
></div>
...
...
@@ -137,7 +161,7 @@
<img
style=
"width: 1.125rem;height: 1.125rem;margin-right: 1.125rem;cursor: pointer"
src=
"../../assets/img/qbryk/bj.png"
@
click=
"userEdit(scope.row.userId)"
@
click=
"userEdit(scope.row.userId
, scope.row.roleName
)"
/>
<!--
<img-->
<!-- style="width: 1.125rem;height: 1.125rem;cursor: pointer"-->
...
...
@@ -220,15 +244,17 @@
<!-- 用户组表格-->
<div
class=
"table"
>
<el-table
:height=
"height"
:height=
"
groupWidths.
height"
highlight-current-row
ref=
"multipleTable"
:data=
"groupTableData"
class=
"table"
>
</el-table-column>
<el-table-column
prop=
"groupname"
label=
"用户组"
:width=
"groupWidths.width1"
>
<el-table-column
prop=
"groupname"
label=
"用户组"
:width=
"groupWidths.width1"
>
</el-table-column>
<el-table-column
prop=
"rolename"
...
...
@@ -246,7 +272,11 @@
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"username"
label=
"组成员"
:width=
"groupWidths.width3"
>
<el-table-column
prop=
"username"
label=
"组成员"
:width=
"groupWidths.width3"
>
<
template
slot-scope=
"scope"
>
<div
class=
"group-item"
>
<svg-icon
...
...
@@ -262,15 +292,16 @@
</el-table-column>
<el-table-column>
<
template
slot-scope=
"scope"
>
<div
class=
"set-btn"
:width=
"groupWidths.btnwidth"
>
<div
class=
"set-btn"
:width=
"groupWidths.btnwidth"
>
用户设置
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"启用状态"
:width=
"groupWidths.width3"
>
<el-table-column
prop=
"status"
label=
"启用状态"
:width=
"groupWidths.width3"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.status === '0'"
class=
"circle-red"
></div>
<div
v-if=
"scope.row.status === '1'"
class=
"circle-blue"
></div>
...
...
@@ -288,13 +319,13 @@
<img
style=
"width: 1.125rem;height: 1.125rem;margin-right: 1.125rem;cursor: pointer"
src=
"../../assets/img/qbryk/bj.png"
@
click=
"
opene
dit(scope.row.id)"
@
click=
"
groupE
dit(scope.row.id)"
/>
<!--
<img-->
<!-- style="width: 1.125rem;height: 1.125rem;cursor: pointer"-->
<!-- src="../../assets/img/qbryk/del.png"-->
<!-- @click="del(scope.row.id)"-->
<!-- />-->
<!--
<img-->
<!-- style="width: 1.125rem;height: 1.125rem;cursor: pointer"-->
<!-- src="../../assets/img/qbryk/del.png"-->
<!-- @click="del(scope.row.id)"-->
<!-- />-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -382,8 +413,7 @@ export default {
width2
:
400
,
width1
:
200
,
height
:
480
,
btnwidth
:
200
,
btnwidth
:
200
},
// 搜索用户组
groupSearchParams
:
{
...
...
@@ -443,7 +473,7 @@ export default {
this
.
userSearchParams
.
page
.
total
=
20
;
this
.
userSearchParams
.
username
=
""
;
this
.
userSearchParams
.
permissionname
=
""
;
this
.
searchUser
()
this
.
searchUser
()
;
},
// 用户组清空
...
...
@@ -455,7 +485,7 @@ export default {
this
.
groupSearchParams
.
truename
=
""
;
this
.
groupSearchParams
.
unitcode
=
""
;
this
.
groupSearchParams
.
rolename
=
""
;
this
.
searchGroup
()
this
.
searchGroup
()
;
},
// 用户当期页发生变化
userHandleCurrPageChange
:
function
(
val
)
{
...
...
@@ -491,8 +521,16 @@ export default {
.
catch
(
failResponse
=>
{});
},
// 编辑用户权限
userEdit
(
id
)
{},
userEdit
(
id
,
rolename
)
{
console
.
info
(
"用户id=====>"
,
id
);
this
.
$router
.
push
({
name
:
"UserPermission"
,
params
:
{
id
:
id
,
rolename
:
rolename
}
});
},
// 用户组当前页发生变化
groupHandleCurrPageChange
:
function
(
val
)
{
this
.
groupSearchParams
.
page
.
page
=
val
;
...
...
@@ -528,7 +566,15 @@ export default {
})
.
catch
(
failResponse
=>
{});
},
groupEdit
(
id
)
{},
groupEdit
(
id
)
{
console
.
info
(
"用户id=====>"
,
id
);
this
.
$router
.
push
({
name
:
"GroupPermission"
,
params
:
{
id
:
id
}
});
},
// 新增权限
add
()
{
...
...
@@ -624,5 +670,5 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"scss/
auth.scss
"
;
@import
"scss/
permission
"
;
</
style
>
src/views/SystemManage/UserPermission.vue
0 → 100644
View file @
f69dd645
<
template
>
<el-container
class=
"manage-page"
direction=
"vertical"
>
<div
class=
"header"
:class=
"
{ stop: status === '0', up: status === '1' }">
<!--
<div-->
<!-- >-->
<!--
{{
id
}}{{
rolename
}}
-->
<!--
</div>
-->
</div>
</el-container>
</
template
>
<
script
>
export
default
{
name
:
"UserPermission"
,
data
()
{
return
{
id
:
""
,
rolename
:
""
,
status
:
"-1"
,
userData
:
{}
};
},
mounted
()
{
this
.
id
=
this
.
$route
.
params
.
id
;
this
.
rolename
=
this
.
$route
.
params
.
rolename
;
var
user
=
new
URLSearchParams
();
user
.
append
(
"userId"
,
this
.
id
);
this
.
$axios
.
post
(
"/login/user/queryuserInfo"
,
user
)
.
then
(
res
=>
{
if
(
res
.
data
)
{
console
.
info
(
res
.
data
);
this
.
userData
=
res
.
data
;
this
.
status
=
res
.
data
.
status
;
}
})
.
catch
(
failResponse
=>
{});
console
.
info
(
"chuancan"
,
this
.
$route
.
params
.
id
);
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"scss/userpermission.scss"
;
</
style
>
src/views/SystemManage/scss/grouppermission.scss
0 → 100644
View file @
f69dd645
src/views/SystemManage/scss/
auth
.scss
→
src/views/SystemManage/scss/
permission
.scss
View file @
f69dd645
File moved
src/views/SystemManage/scss/userpermission.scss
0 → 100644
View file @
f69dd645
.manage-page
{
width
:
100%
;
padding
:
24px
;
font-family
:
MicrosoftYaHei
;
border
:
1px
solid
darkcyan
;
.header
{
border
:
1px
solid
#8b0027
;
width
:
1544px
;
height
:
54px
;
border-radius
:
8px
;
&
.stop
{
background
:
#FEF5F6
;
}
&
.up
{
background
:
#F2F7FE
;
}
//.status{
// width: 96px;
// height: 96px;
// background: #FAE1E4;
// border-radius: 16px;
//
//}
}
}
\ No newline at end of file
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