修正判断机制
This commit is contained in:
@@ -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')}`,
|
||||
|
||||
Reference in New Issue
Block a user