From 29f631ae38941eb720d85e88e46cb653d7260b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Fri, 4 Feb 2022 19:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=EF=BC=8C=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E6=B7=BB=E5=8A=A0=E2=80=9C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E2=80=9D=E5=BF=AB=E6=8D=B7=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/MagicBoot/mb-table.vue | 8 ++++++-- .../src/components/MagicBoot/mb-tree.vue | 5 +++++ .../src/views/system/office/office-list.vue | 11 ++++++++++- .../src/views/system/role/role-list.vue | 18 +++++++++--------- .../src/views/system/user/user-list.vue | 12 +++++++++--- 5 files changed, 39 insertions(+), 15 deletions(-) diff --git a/magic-boot-ui/src/components/MagicBoot/mb-table.vue b/magic-boot-ui/src/components/MagicBoot/mb-table.vue index 806f309..f92a4fd 100644 --- a/magic-boot-ui/src/components/MagicBoot/mb-table.vue +++ b/magic-boot-ui/src/components/MagicBoot/mb-table.vue @@ -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 diff --git a/magic-boot-ui/src/components/MagicBoot/mb-tree.vue b/magic-boot-ui/src/components/MagicBoot/mb-tree.vue index 8f59a1a..9294126 100644 --- a/magic-boot-ui/src/components/MagicBoot/mb-tree.vue +++ b/magic-boot-ui/src/components/MagicBoot/mb-tree.vue @@ -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: { diff --git a/magic-boot-ui/src/views/system/office/office-list.vue b/magic-boot-ui/src/views/system/office/office-list.vue index 455cb1e..a18265b 100644 --- a/magic-boot-ui/src/views/system/office/office-list.vue +++ b/magic-boot-ui/src/views/system/office/office-list.vue @@ -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}` }) + } } ] } diff --git a/magic-boot-ui/src/views/system/role/role-list.vue b/magic-boot-ui/src/views/system/role/role-list.vue index 159f6c8..f6af8d8 100644 --- a/magic-boot-ui/src/views/system/role/role-list.vue +++ b/magic-boot-ui/src/views/system/role/role-list.vue @@ -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}` }) + } } ] } diff --git a/magic-boot-ui/src/views/system/user/user-list.vue b/magic-boot-ui/src/views/system/user/user-list.vue index e65cfe3..dd5d518 100644 --- a/magic-boot-ui/src/views/system/user/user-list.vue +++ b/magic-boot-ui/src/views/system/user/user-list.vue @@ -13,7 +13,7 @@