ocr校核修改
This commit is contained in:
@@ -28,7 +28,12 @@
|
||||
@cancel="handleErrCancel"
|
||||
:footer="false"
|
||||
>
|
||||
<span class="err-value">{{errValue}}</span>
|
||||
<div class="err-value">
|
||||
<p class="err-item" v-for="item in errValues">
|
||||
{{item}}
|
||||
</p>
|
||||
</div>
|
||||
<!-- <span class="err-value">{{errValue}}</span>-->
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
@@ -55,7 +60,8 @@
|
||||
},
|
||||
cut:'',
|
||||
preErrVisible:false,
|
||||
errValue:''
|
||||
errValue:'',
|
||||
errValues:[]
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
@@ -122,7 +128,9 @@
|
||||
this.$message.error(val.response.message);
|
||||
}else{
|
||||
this.preErrVisible=true
|
||||
this.errValue=val.response.message
|
||||
let errValue=val.response.message
|
||||
this.errValues=errValue.split('</br>')
|
||||
// this.errValue = errValue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
},
|
||||
methods:{
|
||||
beforeUpload(file,fileList) {
|
||||
console.log('file',this.accept,file,fileList,this.myfileList)
|
||||
// console.log('file',this.accept,file,fileList,this.myfileList)
|
||||
this.fileTypeSatus=false
|
||||
if(this.myfileList&&this.myfileList.length>=1){
|
||||
// console.log()
|
||||
@@ -93,7 +93,7 @@
|
||||
info.fileList.splice(index,1)
|
||||
}
|
||||
})
|
||||
console.log('fileStatue',this.fileTypeSatus)
|
||||
// console.log('fileStatue',this.fileTypeSatus)
|
||||
if (this.fileTypeSatus) {
|
||||
if (file.size > 100000000) {
|
||||
this.$message.error(this.errorMessage)
|
||||
@@ -152,7 +152,7 @@
|
||||
if(this.myfileList.length > 0){
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name}`+this.$t('fileUploadFailed'));
|
||||
this.$message.success(`${info.file.name}`+this.$t('uploadSuccessful'));
|
||||
// console.log('fileList111',file,this.fileList,fileList1)
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<a-card>
|
||||
<iframe id="iframe" ref="iframe" frameborder="0" :style="'width:100%;height:'+iframeHeight+'px'"></iframe>
|
||||
<iframe id="iframe" ref="iframe" frameborder="0" :style="'width:100%;height:'+iframeHeight+'px'">
|
||||
<div class="form"></div>
|
||||
</iframe>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -18,12 +20,23 @@
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
brownHeight(){
|
||||
immediate: true
|
||||
|
||||
}
|
||||
// brownHeight(){
|
||||
// immediate: true
|
||||
//
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
// var iframeTop=document.querySelector("#iframe").offsetHeight
|
||||
// var formElement = document.querySelector('.form')
|
||||
// formElement.style.height=iframeTop+'px'
|
||||
// window.addEventListener('resize', () => {
|
||||
// var iframeTopNow=document.querySelector("#iframe").offsetHeight
|
||||
// formElement.style.height=iframeTopNow+'px'
|
||||
// }, false);
|
||||
|
||||
|
||||
|
||||
|
||||
this.iframeTop=this.$refs.iframe.getBoundingClientRect().top
|
||||
this.iframeHeight=this.brownHeight-this.iframeTop-24
|
||||
window.addEventListener('resize', () => {
|
||||
@@ -40,8 +53,9 @@
|
||||
methods:{
|
||||
populateIframe(iframe, headers) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
let fileName= this.$route.query.fileName
|
||||
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||
xhr.open("GET", 'http://10.0.1.25:8080/jero-boot/ocr/ocrCheck/editorFile');
|
||||
xhr.open("GET", 'http://10.0.1.25:8080/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
|
||||
xhr.responseType = "blob";
|
||||
headers.forEach((header) => {
|
||||
xhr.setRequestHeader(header[0], header[1]);
|
||||
|
||||
@@ -310,6 +310,9 @@
|
||||
// this.checkVisible=true
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/ocr/ocrSplit',
|
||||
query:{
|
||||
fileName: val.docRealName
|
||||
}
|
||||
})
|
||||
// this.$router.push({
|
||||
// path:'/ocr/ocrSplit'
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
@cancel="handleErrCancel"
|
||||
:footer="false"
|
||||
>
|
||||
<span class="err-value">{{errValue}}</span>
|
||||
<div class="err-value" v-html="errValue"></div>
|
||||
<!-- <span class="err-value">{{errValue}}</span>-->
|
||||
</a-modal>
|
||||
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
|
||||
</a-drawer>
|
||||
@@ -286,7 +287,7 @@
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
}else{
|
||||
this.$message.warning(res.data.message)
|
||||
// this.$message.warning(res.data.message)
|
||||
if(res.data.code==1){
|
||||
this.$message.error(res.data.message);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user