|
@@ -13,6 +13,10 @@
|
|
|
<room-class-select
|
|
|
v-model="modalForm.roomOrClass"
|
|
|
placeholder="请选择考场/班级"
|
|
|
+ :filter-data="{
|
|
|
+ examId: task.examId,
|
|
|
+ courseCode: task.courseCode,
|
|
|
+ }"
|
|
|
:disabled="isScaning"
|
|
|
>
|
|
|
</room-class-select>
|
|
@@ -51,8 +55,8 @@
|
|
|
<div class="part-box part-box-pad">
|
|
|
<el-table ref="TableList" size="medium" :data="scanStageList">
|
|
|
<el-table-column
|
|
|
- prop="文件名"
|
|
|
- label="任务名称"
|
|
|
+ prop="filename"
|
|
|
+ label="文件名称"
|
|
|
min-width="300"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
@@ -82,6 +86,7 @@ import {
|
|
|
saveOutputImage,
|
|
|
clearDir,
|
|
|
getDirScanFile,
|
|
|
+ getScanFileBasename,
|
|
|
} from "../../../plugins/imageOcr";
|
|
|
import db from "../../../plugins/db";
|
|
|
import { evokeScanner } from "../../../plugins/scanner";
|
|
@@ -233,7 +238,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
logger.info(`03扫描仪停止,扫描数:${res.data.length}`);
|
|
|
- await this.stageScanImage(res.data);
|
|
|
+ this.stageScanImage(res.data);
|
|
|
this.scanStatus = "FINISH";
|
|
|
logger.info(`03-1完成条码解析`);
|
|
|
},
|
|
@@ -246,7 +251,7 @@ export default {
|
|
|
console.error(error);
|
|
|
});
|
|
|
this.stopLoopScaningFile();
|
|
|
- await this.getScaningFile();
|
|
|
+ this.getScaningFile();
|
|
|
|
|
|
const scanCount = this.scanStageList.length - this.scanCount;
|
|
|
this.scanCount = this.scanStageList.length;
|
|
@@ -263,7 +268,7 @@ export default {
|
|
|
}
|
|
|
logger.info(`03扫描仪停止,扫描数:${scanCount}`);
|
|
|
},
|
|
|
- async stageScanImage(imageList) {
|
|
|
+ stageScanImage(imageList) {
|
|
|
for (let i = 0, len = imageList.length; i < len; i++) {
|
|
|
const fileInfo = {
|
|
|
id: randomCode(16),
|
|
@@ -275,6 +280,7 @@ export default {
|
|
|
courseName: this.task.courseName,
|
|
|
frontOriginImgPath: imageList[i].frontFile,
|
|
|
versoOriginImgPath: imageList[i].versoFile,
|
|
|
+ filename: getScanFileBasename(imageList[i].frontFile),
|
|
|
isFormal: 0,
|
|
|
studentName: "",
|
|
|
studentCode: "",
|
|
@@ -309,7 +315,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.$refs.selectBatchNoDialog.open();
|
|
|
+ this.$refs.SelectBatchNoDialog.open();
|
|
|
},
|
|
|
async saveScanData(batchNo) {
|
|
|
if (this.saving) return;
|
|
@@ -342,10 +348,10 @@ export default {
|
|
|
},
|
|
|
// delay mode
|
|
|
// 实时获取扫描图片
|
|
|
- async loopScaningFile() {
|
|
|
+ loopScaningFile() {
|
|
|
this.clearSetTs();
|
|
|
if (!this.looping) return;
|
|
|
- await this.getScaningFile();
|
|
|
+ this.getScaningFile();
|
|
|
|
|
|
this.addSetTime(this.loopScaningFile, 1 * 1000);
|
|
|
},
|
|
@@ -353,9 +359,9 @@ export default {
|
|
|
this.clearSetTs();
|
|
|
this.looping = false;
|
|
|
},
|
|
|
- async getScaningFile() {
|
|
|
+ getScaningFile() {
|
|
|
const newScanFiles = getDirScanFile(this.GLOBAL.input);
|
|
|
- await this.stageScanImage(newScanFiles);
|
|
|
+ this.stageScanImage(newScanFiles);
|
|
|
},
|
|
|
// table action
|
|
|
async clearStage() {
|