From 57f56c2769360a3d15affcd35f152b68a23317b9 Mon Sep 17 00:00:00 2001 From: Ricky Date: Tue, 22 Jun 2021 14:47:28 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=A0=B7=E5=BC=8F=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/DictTag/index.vue | 51 ++++++++++++++++++ ruoyi-ui/src/views/system/dict/data.vue | 64 ++++++++++++++++++++--- ruoyi-ui/src/views/system/dict/index.vue | 15 ++++-- 3 files changed, 119 insertions(+), 11 deletions(-) create mode 100644 ruoyi-ui/src/components/DictTag/index.vue diff --git a/ruoyi-ui/src/components/DictTag/index.vue b/ruoyi-ui/src/components/DictTag/index.vue new file mode 100644 index 00000000..47794150 --- /dev/null +++ b/ruoyi-ui/src/components/DictTag/index.vue @@ -0,0 +1,51 @@ + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 0e5e21e9..6d3fb41b 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -85,10 +85,19 @@ - + + + - + + + - + + + @@ -558,6 +556,22 @@ export default { this.single = selection.length != 1; this.multiple = !selection.length; }, + // 更多操作触发 + handleCommand(command, row) { + switch (command) { + case "handleDelete": + this.handleDelete(row); + break; + case "handleResetPwd": + this.handleResetPwd(row); + break; + case "handleAuthRole": + this.handleAuthRole(row); + break; + default: + break; + } + }, /** 新增按钮操作 */ handleAdd() { this.reset(); @@ -600,6 +614,11 @@ export default { }); }).catch(() => {}); }, + /** 分配角色操作 */ + handleAuthRole: function(row) { + const userId = row.userId; + this.$router.push("/auth/role/" + userId); + }, /** 提交按钮 */ submitForm: function() { this.$refs["form"].validate(valid => {