mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 03:52:50 +08:00
角色,组织机构添加“用户列表”快捷查看
This commit is contained in:
parent
71f4ee0ba1
commit
29f631ae38
@ -113,13 +113,13 @@ export default {
|
||||
},
|
||||
where: {
|
||||
handler(){
|
||||
this.newWhere = this.$common.renderWhere(this.where)
|
||||
this.renderWhere()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.newWhere = this.$common.renderWhere(this.where)
|
||||
this.renderWhere()
|
||||
},
|
||||
mounted() {
|
||||
this.keyup()
|
||||
@ -131,7 +131,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
renderWhere(){
|
||||
this.newWhere = this.$common.renderWhere(this.where)
|
||||
},
|
||||
getList() {
|
||||
this.renderWhere()
|
||||
this.listLoading = true
|
||||
if (this.page) {
|
||||
this.newWhere.current = this.listCurrent
|
||||
|
@ -14,6 +14,7 @@
|
||||
v-bind="el"
|
||||
node-key="id"
|
||||
:default-expand-all="defaultExpandAll"
|
||||
:default-checked-keys="checkedIds"
|
||||
@check-change="checkChange"
|
||||
@node-click="nodeClick"
|
||||
:props="defaultProps"
|
||||
@ -62,6 +63,10 @@ export default {
|
||||
searchWidth: {
|
||||
type: String,
|
||||
default: '230px'
|
||||
},
|
||||
checkedIds: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -148,7 +148,7 @@ export default {
|
||||
{
|
||||
title: '操作',
|
||||
type: 'btns',
|
||||
width: 260,
|
||||
width: 310,
|
||||
fixed: 'right',
|
||||
align: 'left',
|
||||
btns: [
|
||||
@ -179,6 +179,15 @@ export default {
|
||||
done: () => this.reloadTable()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
permission: 'office:user:list',
|
||||
title: '用户列表',
|
||||
type: 'text',
|
||||
icon: 'el-icon-user-solid',
|
||||
click: (row) => {
|
||||
this.$router.push({ path: `/system/user/user-list?officeId=${row.id}` })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -120,15 +120,6 @@ export default {
|
||||
width: 270,
|
||||
fixed: 'right',
|
||||
btns: [
|
||||
{
|
||||
permission: 'role:user:list',
|
||||
title: '用户列表',
|
||||
type: 'text',
|
||||
icon: 'el-icon-user-solid',
|
||||
click: (row) => {
|
||||
this.$router.push({ path: `/system/user/user-list?roleId=${row.id}` })
|
||||
}
|
||||
},
|
||||
{
|
||||
permission: 'role:save',
|
||||
title: '修改',
|
||||
@ -160,6 +151,15 @@ export default {
|
||||
this.temp.id = row.id
|
||||
this.$refs.assignPermissionsDialog.show()
|
||||
}
|
||||
},
|
||||
{
|
||||
permission: 'role:user:list',
|
||||
title: '用户列表',
|
||||
type: 'text',
|
||||
icon: 'el-icon-user-solid',
|
||||
click: (row) => {
|
||||
this.$router.push({ path: `/system/user/user-list?roleId=${row.id}` })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<mb-tree url="office/tree" :el="{ 'expand-on-click-node': false,'show-checkbox': true }" :expand="false" :search="true" search-width="100%" :checked="false" @check-change="checkChange" />
|
||||
<mb-tree url="office/tree" :el="{ 'expand-on-click-node': false,'show-checkbox': true }" :checked-ids="[tableOptions.where.officeId]" :expand="false" :search="true" search-width="100%" :checked="false" @check-change="checkChange" />
|
||||
</div>
|
||||
<div class="right">
|
||||
|
||||
@ -158,12 +158,18 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.tableOptions.where.roleId.value = this.$route.query.roleId
|
||||
if(this.$route.query.roleId){
|
||||
this.tableOptions.where.roleId.value = this.$route.query.roleId
|
||||
}
|
||||
if(this.$route.query.officeId){
|
||||
this.tableOptions.where.officeId = this.$route.query.officeId
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkChange(values) {
|
||||
console.log(values)
|
||||
this.tableOptions.where.officeId = values
|
||||
this.reloadTable()
|
||||
this.$nextTick(() => this.reloadTable())
|
||||
},
|
||||
selectionChange(columns) {
|
||||
this.ids = columns.map(it => it['id']).join(',')
|
||||
|
Loading…
Reference in New Issue
Block a user