diff --git a/dangan-ui/src/views/dangan/collection/index.vue b/dangan-ui/src/views/dangan/collection/index.vue index 97fe31d..2a92bff 100644 --- a/dangan-ui/src/views/dangan/collection/index.vue +++ b/dangan-ui/src/views/dangan/collection/index.vue @@ -37,7 +37,7 @@ 点击上传 扫描上传 - 创建识别任务 + 创建识别任务
@@ -72,151 +72,235 @@ -
-
-
档案室密集柜:
- +
+
+
档案室密集柜:
+ -
+ :expand-on-click-node="false" + ref="myTreeSelect" + node-key="id" + highlight-current + @node-click="selectTree" + /> +
-
- - -
将文件拖到此处,或点击上传
-
只能上传图片,且不超过{{ upload.fileSize }}MB
-
- - +
+ + +
将文件拖到此处,或点击上传
+
只能上传图片,且不超过{{ upload.fileSize }}MB
+
+ + -
+
-
+
-
- 确定上传 +
+ 确定上传 +
-
-
-
档案室密集柜:
- +
+
+
档案室密集柜:
+ -
+ :expand-on-click-node="false" + ref="myTreeSelect" + node-key="id" + highlight-current + @node-click="selectTree1" + /> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + 开始扫描 +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 开始扫描
-
+
-
+
+ + -
- - + +
-
-
- -
- 确定上传 +
+ 确定上传 +
- - -
- 创建识别任务提交失败,请选择【暂不处理继续采集】或【重新提交任务】或【去任务记录】查看! + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
- @@ -236,8 +320,39 @@ export default { dicts: ['total_task', 'tatal_task_pic', 'url'], data() { return { - tsVisible: false, - taskId: null, + // 档案类型 + dAType: { + // 弹出框 + open: false, + sbType: null, + // 常住人口登记表 + sbTypeOptions1: [ + { label:'常住人口登记表1', value:'option1' }, + { label:'常住人口登记表2', value:'option3' }, + { label:'常住人口登记表3', value:'option9' }, + { label:'常住卡', value:'option2' }, + ], + // 出生医学证明 + sbTypeOptions2: [ + { label:'出生医学证明', value:'option4' } + ], + // 一胎证明 + sbTypeOptions3: [ + { label:'一胎证明', value:'option6' } + ], + // 迁移证 + sbTypeOptions4: [ + { label:'迁移证', value:'option5' } + ], + // 准迁证 + sbTypeOptions5: [ + { label:'准迁证', value:'option8' } + ], + // 转非农业人口批复存根 + sbTypeOptions6: [ + { label:'转非农业人口批复存根', value:'option7' } + ] + }, // 颜色模式,0:黑白 1:灰色 2:彩色 pixel: 1, // 是否单面 @@ -265,7 +380,12 @@ export default { }, // 书架树选项 shuJiaOptions: [], + // 上传图片记录 pictureRecard: [], + // 已识别图片 + yPictureRecard: [], + // 未识别图片 + wPictureRecard: [], checkLength: 0, // 是否全选 checkAll: false, @@ -621,6 +741,23 @@ export default { this.checkAll = checkAll }, // 创建识别任务 + cjsbrw(){ + this.dAType.sbType = null; + this.dAType.open = true; + }, + // 识别类型选择 + sbTypeSubmit(){ + if(this.dAType.sbType){ + this.dAType.open = false; + this.OCRRecognition() + }else { + this.$alert(`请先选择识别类型!`, `提示`, { + type: 'warning' + }); + } + + }, + // 提交识别任务 async OCRRecognition(){ let tatal_task_pic = this.dict.type.tatal_task_pic; @@ -628,17 +765,27 @@ export default { this.checkLength = 0; let arr = []; + let warr = []; let singeOrDouble = 0 if(!this.single){ singeOrDouble = 1 } + this.pictureRecard.forEach(item => { - item.singeOrDouble = singeOrDouble if(item.checked){ - arr.push(item) + item.singeOrDouble = singeOrDouble; + if(this.dAType.sbType){ + item['sbType'] = this.dAType.sbType; + } + arr.push(item); + }else { + warr.push(item); } }) + this.yPictureRecard = arr; + this.wPictureRecard = warr; + this.checkLength = arr.length; if(arr.length === 0){ @@ -674,38 +821,15 @@ export default { }); collectRecongnize(arr).then(response => { - this.pictureRecard = []; + this.pictureRecard = [...this.wPictureRecard]; this.checkAll = false; this.$modal.msgSuccess(response.msg); loading.close(); }).catch((err)=>{ loading.close(); - if(err.taskId){ - this.taskId = err.taskId; - this.tsVisible = true; - } }); }, - // 暂不处理继续采集 - onZbqljxcj(){ - this.pictureRecard = []; - this.checkAll = false; - this.tsVisible = false; - }, - // 重新提交任务 - qxtjTask(){ - reRecongnize({taskId: this.taskId}).then(response => { - this.pictureRecard = []; - this.checkAll = false; - this.tsVisible = false; - this.$modal.msgSuccess(response.msg); - }) - }, - // 去任务记录页面 - goTask(){ - this.$router.push("/task"); - }, // 删除 点击上传 deleteFile(index){ this.fileList.splice(index, 1); diff --git a/dangan-ui/src/views/dangan/pictureRecard/index.vue b/dangan-ui/src/views/dangan/pictureRecard/index.vue index b62f05d..356c522 100644 --- a/dangan-ui/src/views/dangan/pictureRecard/index.vue +++ b/dangan-ui/src/views/dangan/pictureRecard/index.vue @@ -2,13 +2,19 @@
-
{{ dict.label }}
+ + + + + + - - - - - 导出 - + 导出图片 - - 创建识别任务 + + 创建识别任务 @@ -183,19 +174,99 @@
- - -
- 创建识别任务提交失败,请选择【暂不处理继续采集】或【重新提交任务】或【去任务记录】查看! + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
- @@ -211,10 +282,41 @@ export default { dicts: ['recognize', 'yw_type', 'error_correct', 'total_task', 'tatal_task_pic'], data() { return { - tsVisible: false, - taskId: null, // 遮罩层 loading: true, + // 档案类型 + dAType: { + // 弹出框 + open: false, + sbType: null, + // 常住人口登记表 + sbTypeOptions1: [ + { label:'常住人口登记表1', value:'option1' }, + { label:'常住人口登记表2', value:'option3' }, + { label:'常住人口登记表3', value:'option9' }, + { label:'常住卡', value:'option2' }, + ], + // 出生医学证明 + sbTypeOptions2: [ + { label:'出生医学证明', value:'option4' } + ], + // 一胎证明 + sbTypeOptions3: [ + { label:'一胎证明', value:'option6' } + ], + // 迁移证 + sbTypeOptions4: [ + { label:'迁移证', value:'option5' } + ], + // 准迁证 + sbTypeOptions5: [ + { label:'准迁证', value:'option8' } + ], + // 转非农业人口批复存根 + sbTypeOptions6: [ + { label:'转非农业人口批复存根', value:'option7' } + ] + }, // 选中数组 ids: [], // 非单个禁用 @@ -238,7 +340,7 @@ export default { wlsjPath: null, muId: null, muPath: null, - recognize: null, + recognize: '0', errorCorrect: null, createTime: null }, @@ -269,9 +371,15 @@ export default { this.resetForm("queryForm"); if(this.queryParams.ywType!==ywType){ this.queryParams.ywType=ywType; + this.queryParams.recognize='0' this.handleQuery() } }, + handleClick(recognize){ + this.resetForm("queryForm"); + this.queryParams.recognize = recognize.name; + this.handleQuery() + }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -300,6 +408,22 @@ export default { }).catch(() => {}); }, // 创建识别任务 + cjsbrw(){ + this.dAType.sbType = null; + this.dAType.open = true; + }, + // 识别类型选择 + sbTypeSubmit(){ + if(this.dAType.sbType){ + this.dAType.open = false; + this.OCRRecognition() + }else { + this.$alert(`请先选择识别类型!`, `提示`, { + type: 'warning' + }); + } + }, + // 创建识别任务 async OCRRecognition(){ let tatal_task_pic = this.dict.type.tatal_task_pic; @@ -311,7 +435,10 @@ export default { singeOrDouble = 1 } this.selectionList.forEach(item => { - item.singeOrDouble = singeOrDouble + item.singeOrDouble = singeOrDouble; + if(this.dAType.sbType){ + item['sbType'] = this.dAType.sbType; + } arr.push(item); }) @@ -354,27 +481,8 @@ export default { this.getList(); }).catch((err)=>{ loading.close(); - this.taskId = err.taskId; - this.tsVisible = true; }); }, - // 暂不处理继续采集 - onZbqljxcj(){ - this.selectionList = []; - this.tsVisible = false; - }, - // 重新提交任务 - qxtjTask(){ - reRecongnize({taskId: this.taskId}).then(response => { - this.selectionList = []; - this.tsVisible = false; - this.$modal.msgSuccess(response.msg); - }) - }, - // 去任务记录页面 - goTask(){ - this.$router.push("/task"); - }, /** 导出按钮操作 */ handleExport() { this.download('dangan/pictureRecard/export', { @@ -396,7 +504,7 @@ export default { display: flex; } -.c-tabs__item { +.z_c-tabs__item { cursor: pointer; text-align: right; padding: 0 10px; @@ -410,7 +518,7 @@ export default { margin-right: 20px; } -.c-tabs__item.is-active { +.z_c-tabs__item.is-active { color: #1890ff; border-right: 5px solid #1890ff; } diff --git a/dangan-ui/src/views/dangan/task/index.vue b/dangan-ui/src/views/dangan/task/index.vue index 9e11521..56b0a1b 100644 --- a/dangan-ui/src/views/dangan/task/index.vue +++ b/dangan-ui/src/views/dangan/task/index.vue @@ -63,13 +63,13 @@ v-if="scope.row.status==='0'|| scope.row.status==='3'|| scope.row.status==='4'" size="mini" type="text" - @click="onReRecongnize(scope.row)" + @click="cjsbrw(scope.row)" >重新提交任务 重新识别失败图片 -
@@ -160,6 +159,100 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 确定 +
+
+
@@ -173,6 +266,40 @@ dicts: ['task_status', 'yw_type', 'total_task'], data() { return { + // 档案类型 + dAType: { + // 弹出框 + open: false, + sbType: null, + // 常住人口登记表 + sbTypeOptions1: [ + { label:'常住人口登记表1', value:'option1' }, + { label:'常住人口登记表2', value:'option3' }, + { label:'常住人口登记表3', value:'option9' }, + { label:'常住卡', value:'option2' }, + ], + // 出生医学证明 + sbTypeOptions2: [ + { label:'出生医学证明', value:'option4' } + ], + // 一胎证明 + sbTypeOptions3: [ + { label:'一胎证明', value:'option6' } + ], + // 迁移证 + sbTypeOptions4: [ + { label:'迁移证', value:'option5' } + ], + // 准迁证 + sbTypeOptions5: [ + { label:'准迁证', value:'option8' } + ], + // 转非农业人口批复存根 + sbTypeOptions6: [ + { label:'转非农业人口批复存根', value:'option7' } + ], + selRow: null + }, // 遮罩层 loading: true, // 显示搜索条件 @@ -284,7 +411,30 @@ this.open = true; this.title = "任务详情"; }, - async onReRecongnize(row){ + // 创建识别任务 + cjsbrw(row){ + this.dAType.selRow = row; + + if(row.failNum===row.num){ + this.dAType.sbType = null; + this.dAType.open = true; + }else { + this.onReRecongnize() + } + + }, + // 识别类型选择 + sbTypeSubmit(){ + if(this.dAType.sbType){ + this.dAType.open = false; + this.onReRecongnize() + }else { + this.$alert(`请先选择识别类型!`, `提示`, { + type: 'warning' + }); + } + }, + async onReRecongnize(){ let total_task = this.dict.type.total_task; let total1 = await listTask({status: '-1'}).then(response => { return response.total; @@ -303,7 +453,8 @@ spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); - reRecongnize({taskId: row.id}).then(response => { + + reRecongnize({taskId: this.dAType.selRow.id, sbType: this.dAType.sbType?this.dAType.sbType:this.dAType.selRow.ywType}).then(response => { loading.close(); this.$modal.msgSuccess(response.msg); this.getList()