修正判断机制
This commit is contained in:
@@ -352,14 +352,21 @@ function fnModalOk() {
|
|||||||
const hide = message.loading({ content: t('common.loading') });
|
const hide = message.loading({ content: t('common.loading') });
|
||||||
result
|
result
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS&&(typeof res.data.error === 'undefined')) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
if (res.data?.error || res.data?.affectedRows === 0) {
|
||||||
content: t('common.msgSuccess', { msg: modalState.title }),
|
message.error({
|
||||||
duration: 3,
|
content: `${t('views.configManage.neManage.addFail')}`,
|
||||||
});
|
duration: 3,
|
||||||
modalState.visibleByEdit = false;
|
});
|
||||||
modalStateFrom.resetFields();
|
} else {
|
||||||
fnGetList(1);
|
message.success({
|
||||||
|
content: t('common.msgSuccess', { msg: modalState.title }),
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
modalState.visibleByEdit = false;
|
||||||
|
modalStateFrom.resetFields();
|
||||||
|
fnGetList(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: `${t('views.configManage.neManage.addFail')}`,
|
content: `${t('views.configManage.neManage.addFail')}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user