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