fix: 修复设备管理逻辑中错误处理的loading状态和取消逻辑的顺序
This commit is contained in:
@@ -48,8 +48,8 @@ export const useDeviceManagement = () => {
|
||||
downloadByData(data, `${stationName}_${deviceTypeName}列表_${time}.xlsx`);
|
||||
},
|
||||
onError: (error) => {
|
||||
if (isCancel(error)) return;
|
||||
window.$loadingBar.error();
|
||||
if (isCancel(error)) return;
|
||||
console.error(error);
|
||||
const errorFeedback = parseErrorFeedback(error);
|
||||
window.$message.error(errorFeedback);
|
||||
@@ -84,8 +84,8 @@ export const useDeviceManagement = () => {
|
||||
downloadByData(data, `${stationName}_${deviceTypeName}导入模板_${time}.xlsx`);
|
||||
},
|
||||
onError: (error) => {
|
||||
if (isCancel(error)) return;
|
||||
window.$loadingBar.error();
|
||||
if (isCancel(error)) return;
|
||||
console.error(error);
|
||||
const errorFeedback = parseErrorFeedback(error);
|
||||
window.$message.error(errorFeedback);
|
||||
@@ -137,8 +137,8 @@ export const useDeviceManagement = () => {
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
if (isCancel(error)) return;
|
||||
window.$loadingBar.error();
|
||||
if (isCancel(error)) return;
|
||||
console.error(error);
|
||||
const errorFeedback = parseErrorFeedback(error);
|
||||
window.$message.error(errorFeedback);
|
||||
@@ -163,8 +163,8 @@ export const useDeviceManagement = () => {
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
if (isCancel(error)) return;
|
||||
window.$loadingBar.error();
|
||||
if (isCancel(error)) return;
|
||||
console.error(error);
|
||||
const errorFeedback = parseErrorFeedback(error);
|
||||
window.$message.error(errorFeedback);
|
||||
|
||||
Reference in New Issue
Block a user