From 364188791b16eafb9c3cc8646ea656b540cd5fca Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 11 May 2023 11:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E8=A7=92=E8=89=B2=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AD=98=E5=9C=A8=E5=85=B3=E8=81=94=20=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=B8=8D=E8=83=BD=E6=94=B9=E4=B8=BA=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/index.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 0add3d3..1489804 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -691,11 +691,19 @@ export default { if (valid) { if (this.form.roleId != undefined) { this.form.menuIds = this.getMenuAllCheckedKeys(); + if( this.form.menuIds.length==0){ + this.$message.error("菜单权限不能为空"); + return + } updateRole(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - this.getCustomerList(); + if(response.code === 20000) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + this.getCustomerList(); + }else{ + this.$message.error(response.message); + } }); } else { this.form.menuIds = this.getMenuAllCheckedKeys();