fix(系统设置): 统一修改弹窗更改
This commit is contained in:
parent
7a501fff3f
commit
cd556cb5a6
|
@ -582,26 +582,17 @@
|
|||
content: t('system.config.auth.enableTipContent'),
|
||||
okText: t('system.config.auth.enableConfirm'),
|
||||
cancelText: t('system.config.auth.cancel'),
|
||||
cancelButtonProps: {
|
||||
disabled: enableLoading.value,
|
||||
},
|
||||
okLoading: enableLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
enableLoading.value = true;
|
||||
await updateAuthStatus({
|
||||
id: record.id,
|
||||
enable: true,
|
||||
});
|
||||
Message.success(t('system.config.auth.enableSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
enableLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -619,26 +610,17 @@
|
|||
content: t('system.config.auth.disableTipContent'),
|
||||
okText: t('system.config.auth.disableConfirm'),
|
||||
cancelText: t('system.config.auth.cancel'),
|
||||
cancelButtonProps: {
|
||||
disabled: disableLoading.value,
|
||||
},
|
||||
okLoading: disableLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
disableLoading.value = true;
|
||||
await updateAuthStatus({
|
||||
id: record.id,
|
||||
enable: false,
|
||||
});
|
||||
Message.success(t('system.config.auth.disableSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
disableLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -659,23 +641,14 @@
|
|||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
cancelButtonProps: {
|
||||
disabled: delLoading.value,
|
||||
},
|
||||
maskClosable: false,
|
||||
okLoading: delLoading.value,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
delLoading.value = true;
|
||||
await deleteAuth(record.id);
|
||||
Message.success(t('system.config.auth.deleteSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
delLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
|
|
@ -208,8 +208,7 @@
|
|||
Message.success(isEnable ? t('common.enableSuccess') : t('common.closeSuccess'));
|
||||
fetchData();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
|
|
@ -184,23 +184,14 @@
|
|||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
cancelButtonProps: {
|
||||
disabled: disableLoading.value,
|
||||
},
|
||||
okLoading: disableLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
disableLoading.value = true;
|
||||
await togglePoolStatus(record.id);
|
||||
Message.success(t('system.resourcePool.disablePoolSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
disableLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -221,23 +212,14 @@
|
|||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
cancelButtonProps: {
|
||||
disabled: delLoading.value,
|
||||
},
|
||||
maskClosable: false,
|
||||
okLoading: delLoading.value,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
delLoading.value = true;
|
||||
await delPoolInfo(record.id);
|
||||
Message.success(t('system.resourcePool.deletePoolSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
delLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
|
|
@ -333,10 +333,8 @@
|
|||
try {
|
||||
await resetUserPassword(userIdList);
|
||||
Message.success(t('system.user.resetPswSuccess'));
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -363,26 +361,17 @@
|
|||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
cancelButtonProps: {
|
||||
disabled: modalLoading.value,
|
||||
},
|
||||
okLoading: modalLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
modalLoading.value = true;
|
||||
await toggleUserStatus({
|
||||
userIdList,
|
||||
enable: false,
|
||||
});
|
||||
Message.success(t('system.user.disableUserSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
modalLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -405,26 +394,17 @@
|
|||
content: t('system.user.enableUserContent'),
|
||||
okText: t('system.user.enableUserConfirm'),
|
||||
cancelText: t('system.user.enableUserCancel'),
|
||||
cancelButtonProps: {
|
||||
disabled: modalLoading.value,
|
||||
},
|
||||
okLoading: modalLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
modalLoading.value = true;
|
||||
await toggleUserStatus({
|
||||
userIdList,
|
||||
enable: true,
|
||||
});
|
||||
Message.success(t('system.user.enableUserSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
modalLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
@ -450,25 +430,16 @@
|
|||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
cancelButtonProps: {
|
||||
disabled: modalLoading.value,
|
||||
},
|
||||
okLoading: modalLoading.value,
|
||||
maskClosable: false,
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
modalLoading.value = true;
|
||||
await deleteUserInfo({
|
||||
userIdList,
|
||||
});
|
||||
Message.success(t('system.user.deleteUserSuccess'));
|
||||
loadList();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
} finally {
|
||||
modalLoading.value = false;
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
|
|
@ -167,11 +167,8 @@
|
|||
await deleteUserGroup(id);
|
||||
Message.success(t('system.user.deleteUserSuccess'));
|
||||
initData();
|
||||
return true;
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
return false;
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
hideCancel: false,
|
||||
|
|
Loading…
Reference in New Issue