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; }