ocr校核
This commit is contained in:
@@ -151,6 +151,7 @@
|
|||||||
<!-- <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>-->
|
<!-- <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>-->
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -161,6 +162,8 @@
|
|||||||
import docTable from './modules/docTable'
|
import docTable from './modules/docTable'
|
||||||
import frameAssembly from '@/components/frameAssembly/index'
|
import frameAssembly from '@/components/frameAssembly/index'
|
||||||
import ocrUpload from '@/components/ocrUpload/index'
|
import ocrUpload from '@/components/ocrUpload/index'
|
||||||
|
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||||
|
import Vue from 'vue'
|
||||||
// import uploadFile from '@/components/uploadFile/file'
|
// import uploadFile from '@/components/uploadFile/file'
|
||||||
export default {
|
export default {
|
||||||
name: 'ocr',
|
name: 'ocr',
|
||||||
@@ -455,7 +458,11 @@
|
|||||||
},
|
},
|
||||||
//校核确认
|
//校核确认
|
||||||
handleOkCheck(){
|
handleOkCheck(){
|
||||||
window.open(`http://10.0.1.25:8080/jero-boot/ocr/pageOffice/word`)
|
this.$router.push({
|
||||||
|
path:'/ocr/ocrSplit'
|
||||||
|
})
|
||||||
|
// const token = Vue.ls.get(ACCESS_TOKEN);
|
||||||
|
// window.open('http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word?token='+token)
|
||||||
this.checkVisible=false
|
this.checkVisible=false
|
||||||
},
|
},
|
||||||
//校核取消
|
//校核取消
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<iframe id="iframe" frameborder="0"></iframe>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||||
|
import Vue from 'vue'
|
||||||
|
export default {
|
||||||
|
name: 'ocrSplit',
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
setTimeout(() => {
|
||||||
|
var iframe = document.querySelector("#iframe");
|
||||||
|
this.populateIframe(iframe, [["X-Access-Token", this.token]]);
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
populateIframe(iframe, headers) {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||||
|
xhr.responseType = "blob";
|
||||||
|
headers.forEach((header) => {
|
||||||
|
xhr.setRequestHeader(header[0], header[1]);
|
||||||
|
});
|
||||||
|
xhr.onreadystatechange = () => {
|
||||||
|
if (xhr.readyState === xhr.DONE) {
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
iframe.src = URL.createObjectURL(xhr.response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user