修改权限管理中的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 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;
}