|
@@ -25,7 +25,18 @@
|
|
|
<a-row align="top" :gutter="8" class="m-b-8px">
|
|
|
<a-col :span="6">
|
|
|
<div class="modal-box">
|
|
|
- <p class="box-title">客观题</p>
|
|
|
+ <p
|
|
|
+ v-if="curArbitrateTaskDetail.type === 'question'"
|
|
|
+ class="box-title"
|
|
|
+ >
|
|
|
+ 客观题
|
|
|
+ </p>
|
|
|
+ <p
|
|
|
+ v-else-if="curArbitrateTaskDetail.type === 'paperType'"
|
|
|
+ class="box-title"
|
|
|
+ >
|
|
|
+ 卷型
|
|
|
+ </p>
|
|
|
<p class="box-cont">{{ curTaskDetailName }}</p>
|
|
|
</div>
|
|
|
</a-col>
|
|
@@ -41,7 +52,7 @@
|
|
|
</div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-row align="top" :gutter="8">
|
|
|
+ <a-row align="stretch" :gutter="8">
|
|
|
<a-col :span="3">
|
|
|
<div class="modal-box">
|
|
|
<p class="box-title">一评结果</p>
|
|
@@ -97,9 +108,11 @@ import {
|
|
|
SwapLeftOutlined,
|
|
|
} from "@ant-design/icons-vue";
|
|
|
import { message } from "ant-design-vue";
|
|
|
+import { useUserStore } from "@/store";
|
|
|
|
|
|
import RecognizeImage from "./RecognizeImage.vue";
|
|
|
|
|
|
+import { getBaseDataConfig } from "@/ap/baseDataConfig";
|
|
|
import {
|
|
|
recognizeArbitrateTask,
|
|
|
recognizeArbitrateSave,
|
|
@@ -121,8 +134,15 @@ defineOptions({
|
|
|
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
+const userStore = useUserStore();
|
|
|
const groupId = route.params.groupId ? Number(route.params.groupId) : 0;
|
|
|
|
|
|
+const paperTypeBarcodeContent = ref<string[]>([]);
|
|
|
+async function getConfig() {
|
|
|
+ const res = await getBaseDataConfig({ examId: userStore.curExam.id });
|
|
|
+ paperTypeBarcodeContent.value = res.paperTypeBarcodeContent || [];
|
|
|
+}
|
|
|
+
|
|
|
// 任务进度
|
|
|
const progress = ref({
|
|
|
finishCount: 0,
|
|
@@ -217,22 +237,38 @@ function parseDetails(
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
- // // 试卷类型
|
|
|
- // if (page.paperType) {
|
|
|
- // details.push({
|
|
|
- // ...parseDetailSize(
|
|
|
- // recogData.paperType.fill_result[0],
|
|
|
- // "paperType",
|
|
|
- // 0,
|
|
|
- // []
|
|
|
- // ),
|
|
|
- // result1: page.paperType ? page.paperType[0] : "",
|
|
|
- // result2: page.paperType ? page.paperType[1] : "",
|
|
|
- // pageIndex: page.index,
|
|
|
- // groupId: groupId,
|
|
|
- // uri: page.uri,
|
|
|
- // });
|
|
|
- // }
|
|
|
+ // 试卷类型
|
|
|
+ if (page.paperType) {
|
|
|
+ let fillArea: AreaSize | null = null;
|
|
|
+ const rect = recogData.paperType.rect || null;
|
|
|
+ if (rect) {
|
|
|
+ const hasArea = rect.some((item) => item);
|
|
|
+ if (hasArea) {
|
|
|
+ fillArea = {
|
|
|
+ x: rect[0],
|
|
|
+ y: rect[1],
|
|
|
+ w: rect[2],
|
|
|
+ h: rect[3],
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ details.push({
|
|
|
+ ...parseDetailSize(
|
|
|
+ recogData.paperType.fill_result[0],
|
|
|
+ "paperType",
|
|
|
+ 0,
|
|
|
+ []
|
|
|
+ ),
|
|
|
+ options: ["#", ...paperTypeBarcodeContent.value],
|
|
|
+ result1: page.paperType ? page.paperType[0] : "",
|
|
|
+ result2: page.paperType ? page.paperType[1] : "",
|
|
|
+ pageIndex: page.index,
|
|
|
+ groupId,
|
|
|
+ fillArea: fillArea || { x: 0, y: 0, w: 0, h: 0 },
|
|
|
+ uri: page.uri,
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
// 试题
|
|
|
let index = 0;
|
|
@@ -262,8 +298,9 @@ function parseDetails(
|
|
|
// 任务执行流程 ----------------- start>
|
|
|
async function setCurTaskDetail() {
|
|
|
const val = curArbitrateTaskDetails.value[curArbitrateTaskDetailIndex.value];
|
|
|
- curArbitrateTaskDetail.value = val;
|
|
|
+ if (!val) return;
|
|
|
|
|
|
+ curArbitrateTaskDetail.value = val;
|
|
|
curArbitrateTaskDetail.value.sliceImg = await getSliceFileUrl(
|
|
|
val.uri,
|
|
|
val.fillArea
|
|
@@ -511,6 +548,7 @@ function goback() {
|
|
|
|
|
|
onMounted(async () => {
|
|
|
await releaseTask();
|
|
|
+ getConfig();
|
|
|
initData();
|
|
|
registKeyEvent();
|
|
|
});
|