修改权限管理中的bug,提交连击,默认级别是汉字,去掉超级管理员
This commit is contained in:
parent
4669fa5b9d
commit
01f713bc7c
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user