From 01f713bc7c0a37131688273991fe3e265ee9f99a Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Wed, 29 Jul 2026 17:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=B8=AD=E7=9A=84bug=EF=BC=8C=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E8=BF=9E=E5=87=BB=EF=BC=8C=E9=BB=98=E8=AE=A4=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E6=98=AF=E6=B1=89=E5=AD=97=EF=BC=8C=E5=8E=BB=E6=8E=89=E8=B6=85?= =?UTF-8?q?=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/views/system/role/index.vue | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/business-css/frontend/src/views/system/role/index.vue b/business-css/frontend/src/views/system/role/index.vue index 38efed1..4c5b06f 100644 --- a/business-css/frontend/src/views/system/role/index.vue +++ b/business-css/frontend/src/views/system/role/index.vue @@ -68,14 +68,14 @@ const input = ref(""); const title = ref(""); const info: any = ref({ rolename: "", - level: "系统管理员", + level: "3", description: "", }); const faultList: any = [ - { - value: "1", - label: "超级管理员", - }, + // { + // value: "1", + // label: "超级管理员", + // }, { value: "2", label: "系统管理员", @@ -90,16 +90,21 @@ function addClick() { title.value = "新增角色"; info.value = { rolename: "", - level: "系统管理员", + level: "3", description: "", }; + isCombo.value = false dialogVisible.value = true; } //新建角色-确认按钮/修改按钮 +const isCombo = ref(false) function confirmClick(formEl: any) { formEl.validate((valid: any) => { if (valid) { - + if(isCombo.value == true){ + return + } + isCombo.value = true if (!info.value.id) { const params = { rolename: info.value.rolename, @@ -109,7 +114,9 @@ function confirmClick(formEl: any) { addDept(params).then((res) => { gettableData(); dialogVisible.value = false; - }); + }).catch(() => { + isCombo.value = false + }) } else if (info.value.id) { const params = { rolename: info.value.rolename, @@ -120,7 +127,9 @@ function confirmClick(formEl: any) { renewDept(params).then((res) => { gettableData(); dialogVisible.value = false; - }); + }).catch(() => { + isCombo.value = false + }) } else { return false; } @@ -145,6 +154,7 @@ const rules = ref({ //修改角色 function editrole(row: any) { title.value = "修改角色"; + isCombo.value = false info.value = JSON.parse(JSON.stringify(row)); dialogVisible.value = true; }