|
@@ -100,6 +100,7 @@ import {
|
|
onMounted,
|
|
onMounted,
|
|
onBeforeUnmount,
|
|
onBeforeUnmount,
|
|
nextTick,
|
|
nextTick,
|
|
|
|
+ watch,
|
|
} from "vue";
|
|
} from "vue";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import {
|
|
import {
|
|
@@ -137,12 +138,22 @@ const route = useRoute();
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
const groupId = route.params.groupId ? Number(route.params.groupId) : 0;
|
|
const groupId = route.params.groupId ? Number(route.params.groupId) : 0;
|
|
|
|
|
|
|
|
+const paperTypeBarcodeContentAll = ref<any>([]);
|
|
const paperTypeBarcodeContent = ref<string[]>([]);
|
|
const paperTypeBarcodeContent = ref<string[]>([]);
|
|
async function getConfig() {
|
|
async function getConfig() {
|
|
- const res = await getBaseDataConfig({ examId: userStore.curExam.id });
|
|
|
|
- paperTypeBarcodeContent.value = res.paperTypeBarcodeContent || [];
|
|
|
|
|
|
+ const res = await getBaseDataConfig({ examId: userStore.curExam?.id });
|
|
|
|
+ let arr = res.paperTypeBarcodeContent || [];
|
|
|
|
+ paperTypeBarcodeContentAll.value = arr;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const getPaperTypeBarcodeContent = () => {
|
|
|
|
+ let paperTypeBarcodeContent =
|
|
|
|
+ paperTypeBarcodeContentAll.value.find(
|
|
|
|
+ (item: any) => item.code == subjectCode.value
|
|
|
|
+ )?.paperTypeBarcodeContent || [];
|
|
|
|
+ return paperTypeBarcodeContent;
|
|
|
|
+};
|
|
|
|
+
|
|
// 任务进度
|
|
// 任务进度
|
|
const progress = ref({
|
|
const progress = ref({
|
|
finishCount: 0,
|
|
finishCount: 0,
|
|
@@ -190,7 +201,6 @@ async function getNewTask() {
|
|
curArbitrateTaskDetail.value = null;
|
|
curArbitrateTaskDetail.value = null;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
curArbitrateTaskDetails.value = parseDetails(curTask.value);
|
|
curArbitrateTaskDetails.value = parseDetails(curTask.value);
|
|
curArbitrateTaskDetailIndex.value = 0;
|
|
curArbitrateTaskDetailIndex.value = 0;
|
|
setCurTaskDetail();
|
|
setCurTaskDetail();
|
|
@@ -208,6 +218,7 @@ async function initData() {
|
|
function parseDetails(
|
|
function parseDetails(
|
|
data: RecognizeArbitrateItem
|
|
data: RecognizeArbitrateItem
|
|
): RecognizeArbitrateTaskDetail[] {
|
|
): RecognizeArbitrateTaskDetail[] {
|
|
|
|
+ paperTypeBarcodeContent.value = getPaperTypeBarcodeContent();
|
|
const details: RecognizeArbitrateTaskDetail[] = [];
|
|
const details: RecognizeArbitrateTaskDetail[] = [];
|
|
data.pages.forEach((page) => {
|
|
data.pages.forEach((page) => {
|
|
const recogData = parseRecogData(page.recogData);
|
|
const recogData = parseRecogData(page.recogData);
|
|
@@ -252,7 +263,6 @@ function parseDetails(
|
|
};
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
details.push({
|
|
details.push({
|
|
...parseDetailSize(
|
|
...parseDetailSize(
|
|
recogData.paperType.fill_result[0],
|
|
recogData.paperType.fill_result[0],
|
|
@@ -548,7 +558,7 @@ function goback() {
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
await releaseTask();
|
|
await releaseTask();
|
|
- getConfig();
|
|
|
|
|
|
+ await getConfig();
|
|
initData();
|
|
initData();
|
|
registKeyEvent();
|
|
registKeyEvent();
|
|
});
|
|
});
|
|
@@ -557,4 +567,8 @@ onBeforeUnmount(() => {
|
|
releaseTask();
|
|
releaseTask();
|
|
removeKeyEvent();
|
|
removeKeyEvent();
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+const subjectCode = computed(() => {
|
|
|
|
+ return curTask.value?.subjectCode || "";
|
|
|
|
+});
|
|
</script>
|
|
</script>
|