修正判断机制

This commit is contained in:
lai
2024-01-08 17:34:48 +08:00
parent 5bf38b1322
commit c98470330b

View File

@@ -352,14 +352,21 @@ function fnModalOk() {
const hide = message.loading({ content: t('common.loading') });
result
.then(res => {
if (res.code === RESULT_CODE_SUCCESS&&(typeof res.data.error === 'undefined')) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
duration: 3,
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList(1);
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data?.error || res.data?.affectedRows === 0) {
message.error({
content: `${t('views.configManage.neManage.addFail')}`,
duration: 3,
});
} else {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
duration: 3,
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList(1);
}
} else {
message.error({
content: `${t('views.configManage.neManage.addFail')}`,