Commit f69dd645 by maxiaohan

权限管理 用户权限编辑、用户组权限编辑

parent 734553c8
......@@ -244,16 +244,61 @@ export default [
component: () => import("@/views/SystemManage/RoleManage.vue")
},
{
path: "AuthManage",
name: "AuthManage",
path: "PermissionManage",
name: "PermissionManage",
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")
}
]
},
......
<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>
......@@ -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="openedit(scope.row.id)"
@click="groupEdit(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>
<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>
.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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment