mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
refactor: 移除冗余的成功消息提示代码
统一移除各模块中API调用后的成功消息提示,简化代码结构 保留错误处理逻辑,仅通过控制台输出错误信息
This commit is contained in:
@@ -193,10 +193,8 @@ const handleSave = async (item: any) => {
|
||||
|
||||
try {
|
||||
await updateConfig(tempConfigState);
|
||||
message.success(`${item.config_name} 保存成功`);
|
||||
isEditing[item.config_key] = false; // 退出编辑模式
|
||||
} catch (error) {
|
||||
message.error(`${item.config_name} 保存失败: ${error.message}`);
|
||||
console.error('保存失败:', error);
|
||||
} finally {
|
||||
isSaving[item.config_key] = false; // 重置保存状态
|
||||
}
|
||||
@@ -212,15 +210,6 @@ const beforeUpload = (file: File) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
// 编辑操作
|
||||
const handleEdit = (configKey: string) => {
|
||||
isEditing[configKey] = true;
|
||||
};
|
||||
|
||||
// 取消操作
|
||||
const handleCancel = (configKey: string) => {
|
||||
isEditing[configKey] = false;
|
||||
};
|
||||
|
||||
// 生命周期钩子
|
||||
onMounted(() => {
|
||||
|
||||
@@ -364,8 +364,7 @@ const onInfoFormFinish = async (values: any) => {
|
||||
try {
|
||||
infoSubmitting.value = true;
|
||||
values.avatar = infoFormState.avatar;
|
||||
const response = await updateCurrentUserInfo(values);
|
||||
message.success(response.data.msg);
|
||||
await updateCurrentUserInfo(values);
|
||||
await userStore.getUserInfo;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@@ -395,9 +394,7 @@ const onPasswordFormFinish = async (values: any) => {
|
||||
new_password: values.newPassword
|
||||
};
|
||||
|
||||
const response = await changeCurrentUserPassword(data);
|
||||
message.success(response.data.msg);
|
||||
|
||||
await changeCurrentUserPassword(data);
|
||||
await logout({ token: storage.get('Access-Token') });
|
||||
|
||||
// 重置 store 状态
|
||||
@@ -439,8 +436,6 @@ const handleUpload = async (options: any) => {
|
||||
infoFormState.avatar = fileUrl;
|
||||
fileList.value = [{ url: fileUrl }];
|
||||
|
||||
message.success(response.data.msg);
|
||||
|
||||
onSuccess(response, file);
|
||||
} catch (error) {
|
||||
onError(error);
|
||||
|
||||
@@ -232,8 +232,7 @@ const onSubmit = async () => {
|
||||
return;
|
||||
}
|
||||
await forgetPasswordFormRef.value.validate();
|
||||
const response = await forgetPassword({ ...forgetPasswordForm });
|
||||
message.success(response.data.msg);
|
||||
await forgetPassword({ ...forgetPasswordForm });
|
||||
Object.keys(forgetPasswordForm).forEach(key => delete forgetPasswordForm[key]);
|
||||
modalVisible.value = false;
|
||||
} else {
|
||||
@@ -244,8 +243,7 @@ const onSubmit = async () => {
|
||||
return;
|
||||
}
|
||||
await registerFormRef.value.validate();
|
||||
const response = await registerUser({ ...registerForm });
|
||||
message.success(response.data.msg);
|
||||
await registerUser({ ...registerForm });
|
||||
Object.keys(registerForm).forEach(key => delete registerForm[key]);
|
||||
modalVisible.value = false;
|
||||
}
|
||||
|
||||
@@ -340,9 +340,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
const deleteRow = async (row: tableType) => {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
const response = await deleteConfig({ id: row.id })
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
await deleteConfig({ id: row.id })
|
||||
loadingData();
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
@@ -367,11 +365,9 @@ const handleModalSumbit = async () => {
|
||||
delete createBody[key];
|
||||
}
|
||||
})
|
||||
const response = await createConfig(createBody)
|
||||
await createConfig(createBody)
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
@@ -382,9 +378,8 @@ const handleModalSumbit = async () => {
|
||||
} else if (modalTitle.value === 'update') {
|
||||
try {
|
||||
await updateForm.value.validate();
|
||||
const response = await updateConfig(updateState)
|
||||
await updateConfig(updateState)
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
@@ -383,9 +383,7 @@ const resetFields = () => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteDept({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteDept({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
@@ -404,9 +402,7 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
content: e.key == 1 ? '是否确定启用选择项?' : '是否确定停用选择项?',
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailableDept(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
batchAvailableDept(body).then(() => {
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -468,13 +464,11 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
});
|
||||
|
||||
createDept(createBody).then(response => {
|
||||
const result = response.data;
|
||||
createDept(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
createState.order = 1;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
@@ -487,11 +481,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateDept(updateState).then(response => {
|
||||
updateDept(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
|
||||
@@ -516,9 +516,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDictDataType) => {
|
||||
deleteDictData({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteDictData({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -542,12 +540,10 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createDictData(createBody).then(response => {
|
||||
createDictData(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -562,10 +558,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateDictData(updateState).then(response => {
|
||||
updateDictData(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
modalSubmitLoading.value = false;
|
||||
|
||||
@@ -366,9 +366,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDictType) => {
|
||||
deleteDictType({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteDictType({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -393,12 +391,10 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createDictType(createBody).then(response => {
|
||||
createDictType(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -413,10 +409,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateDictType(updateState).then(response => {
|
||||
updateDictType(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
modalSubmitLoading.value = false;
|
||||
|
||||
@@ -751,9 +751,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableJobType) => {
|
||||
deleteJob({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteJob({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -777,12 +775,10 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createJob(createBody).then(response => {
|
||||
createJob(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -797,10 +793,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateJob(updateState).then(response => {
|
||||
updateJob(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
modalSubmitLoading.value = false;
|
||||
@@ -864,9 +859,7 @@ const handleClear = () => {
|
||||
title: '警告',
|
||||
content: '是否确认清空所有定时任务数据?',
|
||||
onOk() {
|
||||
clearJob().then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
clearJob().then(() => {
|
||||
loadingData();
|
||||
})
|
||||
}
|
||||
@@ -875,9 +868,7 @@ const handleClear = () => {
|
||||
|
||||
// 操作按钮:操作类型 1: 暂停 2: 恢复 3: 重启
|
||||
const handleOption = (row: tableJobType, option: number) => {
|
||||
OptionJob({ id: row.id, option: option }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
OptionJob({ id: row.id, option: option }).then(() => {
|
||||
loadingData();
|
||||
})
|
||||
}
|
||||
|
||||
@@ -290,9 +290,7 @@ const resetFields = () => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteLog({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteLog({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
|
||||
@@ -601,9 +601,7 @@ const modalHandle = (modalType: string, record?: tableDataType) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteMenu({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteMenu({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -623,9 +621,7 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
content: e.key == 1 ? '是否确定启用选择项?' : '是否确定停用选择项?',
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailableMenu(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
batchAvailableMenu(body).then(() => {
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -651,7 +647,7 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createMenu(createBody).then(response => {
|
||||
createMenu(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key])
|
||||
@@ -659,8 +655,6 @@ const handleModalSumbit = () => {
|
||||
createState.order = 1;
|
||||
createState.cache = true;
|
||||
createState.hidden = false;
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -675,11 +669,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateMenu(updateState).then(response => {
|
||||
updateMenu(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
|
||||
@@ -400,9 +400,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteNotice({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteNotice({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -421,9 +419,7 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
content: e.key == 1 ? '是否确定启用选择项?' : '是否确定停用选择项?',
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailableNotice(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
batchAvailableNotice(body).then(() => {
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -450,12 +446,10 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createNotice(createBody).then(response => {
|
||||
createNotice(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -470,10 +464,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateNotice(updateState).then(response => {
|
||||
updateNotice(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
})
|
||||
|
||||
|
||||
@@ -369,9 +369,7 @@ const modalHandle = (modalType: string, index?: number) => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deletePosition({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deletePosition({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -390,9 +388,7 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
content: e.key == 1 ? '是否确定启用选择项?' : '是否确定停用选择项?',
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailablePosition(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
batchAvailablePosition(body).then(() => {
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -419,13 +415,11 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createPosition(createBody).then(response => {
|
||||
createPosition(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
createState.order = 1;
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -440,10 +434,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updatePosition(updateState).then(response => {
|
||||
updatePosition(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(response.data.msg);
|
||||
loadingData();
|
||||
})
|
||||
|
||||
|
||||
@@ -189,8 +189,7 @@ const emit = defineEmits(['event']);
|
||||
const handleDrawerSave = () => {
|
||||
drawerSaving.value = true;
|
||||
|
||||
setPermission(permissionState.value).then(response => {
|
||||
message.success(response.data.msg);
|
||||
setPermission(permissionState.value).then(() => {
|
||||
drawerSaving.value = false;
|
||||
openDrawer.value = false;
|
||||
emit('event');
|
||||
|
||||
@@ -348,9 +348,7 @@ const resetFields = () => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteRole({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteRole({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -371,8 +369,6 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailableRole(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -445,13 +441,11 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createRole(createBody).then(response => {
|
||||
const result = response.data;
|
||||
createRole(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
createState.order = 1;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -466,11 +460,9 @@ const handleModalSumbit = () => {
|
||||
|
||||
} else if (modalTitle.value === 'update') {
|
||||
updateForm.value.validate().then(() => {
|
||||
updateRole(updateState).then(response => {
|
||||
const result = response.data;
|
||||
updateRole(updateState).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
|
||||
@@ -698,11 +698,8 @@ const resetFields = () => {
|
||||
|
||||
// 删除
|
||||
const deleteRow = (row: tableDataType) => {
|
||||
deleteUser({ id: row.id }).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
deleteUser({ id: row.id }).then(() => {
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
@@ -720,9 +717,7 @@ const handleMoreClick: MenuProps['onClick'] = e => {
|
||||
content: e.key == 1 ? '是否确定启用选择项?' : '是否确定停用选择项?',
|
||||
onOk() {
|
||||
const body = { ids: selectedRowKeys.value, available: e.key == 1 ? true : false };
|
||||
batchAvailableUser(body).then(response => {
|
||||
const result = response.data;
|
||||
message.success(result.msg);
|
||||
batchAvailableUser(body).then(() => {
|
||||
selectedRowKeys.value = [];
|
||||
loadingData();
|
||||
}).catch(error => {
|
||||
@@ -838,12 +833,10 @@ const handleModalSumbit = () => {
|
||||
}
|
||||
})
|
||||
|
||||
createUser(createBody).then(response => {
|
||||
const result = response.data;
|
||||
createUser(createBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
Object.keys(createState).forEach(key => delete createState[key]);
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -876,11 +869,9 @@ const handleModalSumbit = () => {
|
||||
updateBody['password'] = updateState.password;
|
||||
}
|
||||
|
||||
updateUser(updateBody).then(response => {
|
||||
const result = response.data;
|
||||
updateUser(updateBody).then(() => {
|
||||
modalSubmitLoading.value = false;
|
||||
openModal.value = false;
|
||||
message.success(result.msg);
|
||||
loadingData();
|
||||
|
||||
}).catch(error => {
|
||||
@@ -1006,7 +997,6 @@ const customRequest = ({ file, onSuccess, onError, onProgress }: any) => {
|
||||
fileItem.percent = 100;
|
||||
upload.isUploading = false;
|
||||
upload.open = false;
|
||||
message.success(response.data.msg);
|
||||
onSuccess(response);
|
||||
loadingData(); // 刷新数据
|
||||
})
|
||||
@@ -1014,7 +1004,7 @@ const customRequest = ({ file, onSuccess, onError, onProgress }: any) => {
|
||||
fileItem.status = 'error';
|
||||
upload.isUploading = false;
|
||||
onError(error);
|
||||
message.error(error.response?.data?.detail || '用户导入失败');
|
||||
console.error('导入失败:', error);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user