修正判断机制

This commit is contained in:
lai committed 2024-01-08 17:34:48 +08:00
1 parent 5bf38b1322
commit c98470330b
1 file changed
+15 -8
+15 -8
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')}`,