|
@@ -17,13 +17,22 @@
|
|
|
<el-button size="mini" type="primary" @click="toSelectTaskStd"
|
|
|
>所有任务考生信息</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
- v-if="openOcr"
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- @click="toSetOcrArea"
|
|
|
- >设置OCR识别区</el-button
|
|
|
- >
|
|
|
+ <div v-if="openCodeOcr">
|
|
|
+ <el-button
|
|
|
+ v-if="openCodeOcr"
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ @click="toSetOcrArea"
|
|
|
+ >设置信息识别区</el-button
|
|
|
+ >
|
|
|
+ <el-radio-group v-model="areaType">
|
|
|
+ <el-radio v-if="openOcr" label="OCR">OCR识别</el-radio>
|
|
|
+ <el-radio v-if="openBarCode" label="BAR_CODE"
|
|
|
+ >条码识别</el-radio
|
|
|
+ >
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-divider></el-divider>
|
|
|
<div v-if="openGlobalMatch" class="box-justify mb-2">
|
|
|
<h4>绑定学生</h4>
|
|
@@ -209,8 +218,10 @@ export default {
|
|
|
// ocr
|
|
|
isSetOcrSet: false,
|
|
|
openOcr: false,
|
|
|
+ openBarCode: false,
|
|
|
openGlobalMatch: false,
|
|
|
globalMatch: false,
|
|
|
+ areaType: "",
|
|
|
ocrArea: { x: null, y: null, width: null, height: null, rotate: 0 },
|
|
|
ocrResult: [],
|
|
|
ocrResultDialogIsShow: false
|
|
@@ -219,6 +230,9 @@ export default {
|
|
|
computed: {
|
|
|
IS_UNDO_MODEL() {
|
|
|
return this.mode === "undo";
|
|
|
+ },
|
|
|
+ openCodeOcr() {
|
|
|
+ return this.openBarCode || this.openOcr;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -267,11 +281,20 @@ export default {
|
|
|
if (field.code === "openOcr") {
|
|
|
this.openOcr = field.value === "true";
|
|
|
}
|
|
|
+ if (field.code === "openBarCode") {
|
|
|
+ this.openBarCode = field.value === "true";
|
|
|
+ }
|
|
|
if (field.code === "openGlobalMatch") {
|
|
|
this.openGlobalMatch = field.value === "true";
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ if (this.openOcr) {
|
|
|
+ this.areaType = "OCR";
|
|
|
+ } else if (this.openBarCode) {
|
|
|
+ this.areaType = "BAR_CODE";
|
|
|
+ }
|
|
|
},
|
|
|
nameOrNoInput() {
|
|
|
this.clearSetTs();
|
|
@@ -301,7 +324,7 @@ export default {
|
|
|
this.curPagePaper = {
|
|
|
url: this.curPagePapers[this.curPagePaperIndex]
|
|
|
};
|
|
|
- if (this.openOcr) {
|
|
|
+ if (this.openCodeOcr) {
|
|
|
this.isSwitchFb = true;
|
|
|
await this.getOrcResult().catch(() => {});
|
|
|
this.isSwitchFb = false;
|
|
@@ -375,7 +398,7 @@ export default {
|
|
|
},
|
|
|
// ocr
|
|
|
toSetOcrArea() {
|
|
|
- if (!this.openOcr) return;
|
|
|
+ if (!this.openOcr && !this.openBarCode) return;
|
|
|
this.isSetOcrSet = true;
|
|
|
},
|
|
|
ocrAreaChange(ocrArea) {
|
|
@@ -397,6 +420,7 @@ export default {
|
|
|
const res = await libraryOcrResult({
|
|
|
paperLibraryId: this.curPage.id,
|
|
|
index: this.curPagePaperIndex,
|
|
|
+ type: this.areaType,
|
|
|
...this.ocrArea
|
|
|
});
|
|
|
if (res && res.length) {
|