|
@@ -116,7 +116,8 @@ import {
|
|
} from "@ant-design/icons-vue";
|
|
} from "@ant-design/icons-vue";
|
|
import { cloneDeep } from "lodash-es";
|
|
import { cloneDeep } from "lodash-es";
|
|
import EventBus from "@/plugins/eventBus";
|
|
import EventBus from "@/plugins/eventBus";
|
|
-import { addFileServerPrefixToTask } from "@/utils/utils";
|
|
|
|
|
|
+import { addFileServerPrefixToTask,preDrawImage} from "@/utils/utils";
|
|
|
|
+import { message } from "ant-design-vue";
|
|
|
|
|
|
const {
|
|
const {
|
|
title = "回评",
|
|
title = "回评",
|
|
@@ -253,14 +254,20 @@ async function updateHistoryTask({
|
|
let data = cloneDeep(res.data) ;
|
|
let data = cloneDeep(res.data) ;
|
|
data = data.map(addFileServerPrefixToTask);
|
|
data = data.map(addFileServerPrefixToTask);
|
|
store.historyTasks = data;
|
|
store.historyTasks = data;
|
|
- replaceCurrentTask(store.historyTasks[0]);
|
|
|
|
|
|
+ replaceCurrentTask(store.historyTasks[0]).catch((err)=>{
|
|
|
|
+ console.log(err);
|
|
|
|
+ void message.error('切换至回评任务失败');
|
|
|
|
+ });
|
|
}
|
|
}
|
|
if(!res?.data || !res?.data.length){
|
|
if(!res?.data || !res?.data.length){
|
|
store.globalMask = false;
|
|
store.globalMask = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-function replaceCurrentTask(task: Task | undefined) {
|
|
|
|
|
|
+async function replaceCurrentTask(task: Task | undefined) {
|
|
|
|
+ if (store.isScanImage) {
|
|
|
|
+ await preDrawImage(task);
|
|
|
|
+ }
|
|
store.currentTask = task;
|
|
store.currentTask = task;
|
|
}
|
|
}
|
|
|
|
|