ocr校核校验
This commit is contained in:
@@ -54,8 +54,9 @@
|
|||||||
populateIframe(iframe, headers) {
|
populateIframe(iframe, headers) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
let fileName= this.$route.query.fileName
|
let fileName= this.$route.query.fileName
|
||||||
|
let id=this.$route.query.id
|
||||||
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||||
xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
|
xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName+'&id='+id);
|
||||||
xhr.responseType = "blob";
|
xhr.responseType = "blob";
|
||||||
headers.forEach((header) => {
|
headers.forEach((header) => {
|
||||||
xhr.setRequestHeader(header[0], header[1]);
|
xhr.setRequestHeader(header[0], header[1]);
|
||||||
|
|||||||
@@ -1,83 +1,85 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ocr">
|
<div class="ocr">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="table-page-search-wrapper">
|
<a-spin :spinning="loading">
|
||||||
<search :flag="'2'" :url="url"/>
|
<div class="table-page-search-wrapper">
|
||||||
</div>
|
<search :flag="'2'" :url="url"/>
|
||||||
<div class="table-operator">
|
|
||||||
<div class="operator-text" @click="handleUpload" v-has="'ocr:ocrRestful:addOcrRecord'">
|
|
||||||
<a-icon type="plus" />
|
|
||||||
{{ $t('upload1') }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleFileExport" v-has="'document:ocrPageInfo'">
|
<div class="table-operator">
|
||||||
<a-icon type="export" />
|
<div class="operator-text" @click="handleUpload" v-has="'ocr:ocrRestful:addOcrRecord'">
|
||||||
{{ $t('RetrieveFiles') }}
|
<a-icon type="plus" />
|
||||||
|
{{ $t('upload1') }}
|
||||||
|
</div>
|
||||||
|
<div class="operator-text" @click="handleFileExport" v-has="'document:ocrPageInfo'">
|
||||||
|
<a-icon type="export" />
|
||||||
|
{{ $t('RetrieveFiles') }}
|
||||||
|
</div>
|
||||||
|
<div class="operator-text" @click="handleDel" v-has="'ocr:ocrRecord:deleteBatch'">
|
||||||
|
<a-icon type="delete" />
|
||||||
|
{{ $t('BatchDelete') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleDel" v-has="'ocr:ocrRecord:deleteBatch'">
|
|
||||||
<a-icon type="delete" />
|
<!-- 上传弹框-->
|
||||||
{{ $t('BatchDelete') }}
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('UploadFile')"
|
||||||
|
:visible="fileVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="modalOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
>
|
||||||
|
<addForm
|
||||||
|
ref="fileForm"
|
||||||
|
@addFormClick="addFormClick"
|
||||||
|
:flag="'2'"
|
||||||
|
v-if="fileVisible"
|
||||||
|
:url="url">
|
||||||
|
</addForm>
|
||||||
|
</a-modal>
|
||||||
|
|
||||||
|
<!-- 同步弹框-->
|
||||||
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('SyncLibrary')"
|
||||||
|
v-if="toVisible"
|
||||||
|
:visible="toVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleOkTo"
|
||||||
|
@cancel="handleCancelTo"
|
||||||
|
>
|
||||||
|
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
||||||
|
</a-modal>
|
||||||
|
<!-- 校核弹框-->
|
||||||
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('check')"
|
||||||
|
v-if="checkVisible"
|
||||||
|
:visible="checkVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleOkCheck"
|
||||||
|
@cancel="handleCancelCheck"
|
||||||
|
>
|
||||||
|
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
||||||
|
</a-modal>
|
||||||
|
<div class="table-detail">
|
||||||
|
<tableData
|
||||||
|
:flag="'2'"
|
||||||
|
:OperationList="OperationList"
|
||||||
|
@actionSynchron="actionSynchron"
|
||||||
|
:url="url"
|
||||||
|
showAction
|
||||||
|
@actionCheck="actionCheck"
|
||||||
|
@actionDown="actionDown"
|
||||||
|
@onSelectChange="onSelectChange"
|
||||||
|
@actionDelete="actionDelete"
|
||||||
|
@detailClick="detailClick"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 上传弹框-->
|
<doc-table v-if="drawVisible" :drawVisible="drawVisible" :drawTableSorce="drawTableSorce" @visible="docVisible" @exportVisible="exportVisible"></doc-table>
|
||||||
<a-modal
|
<!-- <ocr-upload ref="uploadFile1" :disabled="disabled" :accept="accept" :listType='listType' @uploadSuccess="uploadSuccess"></ocr-upload>-->
|
||||||
class="show-content"
|
</a-spin>
|
||||||
:title="$t('UploadFile')"
|
|
||||||
:visible="fileVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="modalOk"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
>
|
|
||||||
<addForm
|
|
||||||
ref="fileForm"
|
|
||||||
@addFormClick="addFormClick"
|
|
||||||
:flag="'2'"
|
|
||||||
v-if="fileVisible"
|
|
||||||
:url="url">
|
|
||||||
</addForm>
|
|
||||||
</a-modal>
|
|
||||||
|
|
||||||
<!-- 同步弹框-->
|
|
||||||
<a-modal
|
|
||||||
class="show-content"
|
|
||||||
:title="$t('SyncLibrary')"
|
|
||||||
v-if="toVisible"
|
|
||||||
:visible="toVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="handleOkTo"
|
|
||||||
@cancel="handleCancelTo"
|
|
||||||
>
|
|
||||||
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 校核弹框-->
|
|
||||||
<a-modal
|
|
||||||
class="show-content"
|
|
||||||
:title="$t('check')"
|
|
||||||
v-if="checkVisible"
|
|
||||||
:visible="checkVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="handleOkCheck"
|
|
||||||
@cancel="handleCancelCheck"
|
|
||||||
>
|
|
||||||
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
|
||||||
</a-modal>
|
|
||||||
<div class="table-detail">
|
|
||||||
<tableData
|
|
||||||
:flag="'2'"
|
|
||||||
:OperationList="OperationList"
|
|
||||||
@actionSynchron="actionSynchron"
|
|
||||||
:url="url"
|
|
||||||
showAction
|
|
||||||
@actionCheck="actionCheck"
|
|
||||||
@actionDown="actionDown"
|
|
||||||
@onSelectChange="onSelectChange"
|
|
||||||
@actionDelete="actionDelete"
|
|
||||||
@detailClick="detailClick"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<doc-table v-if="drawVisible" :drawVisible="drawVisible" :drawTableSorce="drawTableSorce" @visible="docVisible" @exportVisible="exportVisible"></doc-table>
|
|
||||||
<!-- <ocr-upload ref="uploadFile1" :disabled="disabled" :accept="accept" :listType='listType' @uploadSuccess="uploadSuccess"></ocr-upload>-->
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -159,6 +161,7 @@
|
|||||||
listType:'text',
|
listType:'text',
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
websock: null,
|
websock: null,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -308,16 +311,36 @@
|
|||||||
//校核
|
//校核
|
||||||
actionCheck(val){
|
actionCheck(val){
|
||||||
// this.checkVisible=true
|
// this.checkVisible=true
|
||||||
let newUrl = this.$router.resolve({
|
this.loading=true
|
||||||
path: '/ocr/ocrSplit',
|
axios({
|
||||||
query:{
|
url: '/jero-boot/ocr/ocrCheck/verifyCheckFlag',
|
||||||
fileName: val.docRealName
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id:val.id
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
'X-Access-Token':this.token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.$router.push({
|
.then( (res) => {
|
||||||
// path:'/ocr/ocrSplit'
|
if (res.data.success) {
|
||||||
// })
|
let newUrl = this.$router.resolve({
|
||||||
window.open(newUrl.href, '_blank')
|
path: '/ocr/ocrSplit',
|
||||||
|
query:{
|
||||||
|
fileName: val.docRealName,
|
||||||
|
id:val.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.open(newUrl.href, '_blank')
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
this.loading=false
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//下载
|
//下载
|
||||||
actionDown(val){
|
actionDown(val){
|
||||||
|
|||||||
Reference in New Issue
Block a user