From 7e78f62be2e032304cf590e593db798299df8128 Mon Sep 17 00:00:00 2001 From: caoyang Date: Fri, 25 Feb 2022 13:12:05 +0800 Subject: [PATCH] =?UTF-8?q?ocr=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/ocrAddForm/index.vue | 496 ++++++++++++++++++ jero-web/src/components/ocrUpload/index.vue | 12 +- .../src/views/documentManage/ocr/index.vue | 74 +-- 3 files changed, 520 insertions(+), 62 deletions(-) create mode 100644 jero-web/src/components/ocrAddForm/index.vue diff --git a/jero-web/src/components/ocrAddForm/index.vue b/jero-web/src/components/ocrAddForm/index.vue new file mode 100644 index 000000000..b7b414d22 --- /dev/null +++ b/jero-web/src/components/ocrAddForm/index.vue @@ -0,0 +1,496 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/components/ocrUpload/index.vue b/jero-web/src/components/ocrUpload/index.vue index ce647af00..e7235b5a8 100644 --- a/jero-web/src/components/ocrUpload/index.vue +++ b/jero-web/src/components/ocrUpload/index.vue @@ -48,7 +48,7 @@ }, methods:{ beforeUpload(file) { - console.log(file) + // console.log(file) // let thisFileType = this.thisFileType.replace(/\s+/g, ""); if(file.type==this.accept){ this.fileTypeSatus = true; @@ -62,7 +62,7 @@ this.fileTypeSatus = true; }, handleChange(info) { - console.log('info',info) + // console.log('info',info) let { file } = info; const status = info.file.status; info.fileList.forEach((val,index)=>{ @@ -98,7 +98,7 @@ } else if (status === 'done') { this.fileList = [] this.myfileList = info.fileList; - console.log('file3333',info.fileList) + // console.log('file3333',info.fileList) if (info.fileList.length > 20) { info.fileList.splice(20) // this.myfileList = info.fileList; @@ -110,17 +110,17 @@ this.fileList.push(res) } }) - console.log('file1111',this.fileList) + // console.log('file1111',this.fileList) this.$emit('uploadSuccess', this.fileList) this.$message.destroy() this.$message.error('最多只能上传二十个'); return } - console.log('my222',this.myfileList) + // console.log('my222',this.myfileList) this.myfileList.forEach((res) => { if (res.response) { this.fileList.push(res.response.result) - console.log('flist',res.response) + // console.log('flist',res.response) } else { this.fileList.push(res) } diff --git a/jero-web/src/views/documentManage/ocr/index.vue b/jero-web/src/views/documentManage/ocr/index.vue index 2b45c0a42..b4dae6d7c 100644 --- a/jero-web/src/views/documentManage/ocr/index.vue +++ b/jero-web/src/views/documentManage/ocr/index.vue @@ -18,54 +18,26 @@ 批量删除 - + - - - - {{ (form.file === 'null' || form.file === '' || - form.file == null) ? '点击上传' : '查看已上传文件' - }} - - - - - - - - - - - - - - - - + :url="url"> + + { - let params={ ...this.form } - if(valid) { - postAction(`ocr/OcrRestful/addOcrRecord`,params).then(res=>{ - if(res.success){ - this.$message.success(res.result) - eventBUs.$emit('searchReset') - this.fileVisible=false - this.form={} - // this.$emit('ok') - }else{ - this.$message.warning(res.message) - } - }) - } - }) + modalOk(){ + this.$refs.fileForm.sumber() }, handleCancel(){ this.fileVisible=false @@ -350,7 +309,10 @@ window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + val.id)) }, exportVisible(val){ - this.fileVisible=val + // this.fileVisible=val + }, + addFormClick() { + this.fileVisible = false } } }