修改权限管理中的bug,提交连击,默认级别是汉字,去掉超级管理员

This commit is contained in:
limengnan 2026-07-29 17:51:25 +08:00
parent 4669fa5b9d
commit 01f713bc7c

View File

@ -68,14 +68,14 @@ const input = ref("");
const title = ref(""); const title = ref("");
const info: any = ref({ const info: any = ref({
rolename: "", rolename: "",
level: "系统管理员", level: "3",
description: "", description: "",
}); });
const faultList: any = [ const faultList: any = [
{ // {
value: "1", // value: "1",
label: "超级管理员", // label: "",
}, // },
{ {
value: "2", value: "2",
label: "系统管理员", label: "系统管理员",
@ -90,16 +90,21 @@ function addClick() {
title.value = "新增角色"; title.value = "新增角色";
info.value = { info.value = {
rolename: "", rolename: "",
level: "系统管理员", level: "3",
description: "", description: "",
}; };
isCombo.value = false
dialogVisible.value = true; dialogVisible.value = true;
} }
//-/ //-/
const isCombo = ref(false)
function confirmClick(formEl: any) { function confirmClick(formEl: any) {
formEl.validate((valid: any) => { formEl.validate((valid: any) => {
if (valid) { if (valid) {
if(isCombo.value == true){
return
}
isCombo.value = true
if (!info.value.id) { if (!info.value.id) {
const params = { const params = {
rolename: info.value.rolename, rolename: info.value.rolename,
@ -109,7 +114,9 @@ function confirmClick(formEl: any) {
addDept(params).then((res) => { addDept(params).then((res) => {
gettableData(); gettableData();
dialogVisible.value = false; dialogVisible.value = false;
}); }).catch(() => {
isCombo.value = false
})
} else if (info.value.id) { } else if (info.value.id) {
const params = { const params = {
rolename: info.value.rolename, rolename: info.value.rolename,
@ -120,7 +127,9 @@ function confirmClick(formEl: any) {
renewDept(params).then((res) => { renewDept(params).then((res) => {
gettableData(); gettableData();
dialogVisible.value = false; dialogVisible.value = false;
}); }).catch(() => {
isCombo.value = false
})
} else { } else {
return false; return false;
} }
@ -145,6 +154,7 @@ const rules = ref({
// //
function editrole(row: any) { function editrole(row: any) {
title.value = "修改角色"; title.value = "修改角色";
isCombo.value = false
info.value = JSON.parse(JSON.stringify(row)); info.value = JSON.parse(JSON.stringify(row));
dialogVisible.value = true; dialogVisible.value = true;
} }