From 1b2dc570de9bca616f664838c147e9f81fdc2f1c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 17 Feb 2022 11:30:31 +0800 Subject: [PATCH] =?UTF-8?q?v3.7.0=20=E8=8F=9C=E5=8D=95&=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B1=95=E5=BC=80/=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/dept/index.vue | 22 +++++++++++++++++-- .../src/views/system/menu/index.vue | 17 +++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/yudao-ui-admin/src/views/system/dept/index.vue b/yudao-ui-admin/src/views/system/dept/index.vue index c83c09f63..71fdbb789 100644 --- a/yudao-ui-admin/src/views/system/dept/index.vue +++ b/yudao-ui-admin/src/views/system/dept/index.vue @@ -17,12 +17,16 @@ - 新增 + 新增 + + + 展开/折叠 - @@ -131,6 +135,12 @@ export default { title: "", // 是否显示弹出层 open: false, + // 是否展开,默认全部展开 + isExpandAll: true, + // 重新渲染表格状态 + refreshTable: true, + // 是否展开 + expand: false, // 状态数据字典 statusOptions: [], // 查询参数 @@ -255,6 +265,14 @@ export default { this.deptOptions = this.handleTree(response.data, "id"); }); }, + /** 展开/折叠操作 */ + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); + }, /** 修改按钮操作 */ handleUpdate(row) { this.reset(); diff --git a/yudao-ui-admin/src/views/system/menu/index.vue b/yudao-ui-admin/src/views/system/menu/index.vue index 00b7d984d..afc4de9ab 100644 --- a/yudao-ui-admin/src/views/system/menu/index.vue +++ b/yudao-ui-admin/src/views/system/menu/index.vue @@ -20,10 +20,13 @@ 新增 + + 展开/折叠 + - @@ -155,6 +158,10 @@ export default { title: "", // 是否显示弹出层 open: false, + // 是否展开,默认全部折叠 + isExpandAll: false, + // 重新渲染表格状态 + refreshTable: true, // 查询参数 queryParams: { name: undefined, @@ -249,6 +256,14 @@ export default { this.resetForm("queryForm"); this.handleQuery(); }, + /** 展开/折叠操作 */ + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); + }, /** 新增按钮操作 */ handleAdd(row) { this.reset();