拆分详情修改

This commit is contained in:
caoyang
2022-04-13 23:10:03 +08:00
parent bba9732863
commit 313d071cfc
5 changed files with 37 additions and 14 deletions
@@ -55,7 +55,7 @@
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
let fileName= this.$route.query.fileName 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.31:8080/jero-boot/ocr/pageOffice/word');
xhr.open("GET", 'http://10.0.1.25:8080/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName); xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
xhr.responseType = "blob"; xhr.responseType = "blob";
headers.forEach((header) => { headers.forEach((header) => {
xhr.setRequestHeader(header[0], header[1]); xhr.setRequestHeader(header[0], header[1]);
@@ -128,7 +128,8 @@
}, },
rowId:'', rowId:'',
rows:[], rows:[],
type:'pdf' type:'pdf',
flag:false
} }
}, },
mounted() { mounted() {
@@ -215,6 +216,9 @@
// }else if(file.text_info=='相关资料'){ // }else if(file.text_info=='相关资料'){
// params.fileType='6' // params.fileType='6'
// } // }
if(!this.flag){
this.flag=true
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => { postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
@@ -224,7 +228,10 @@
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
}).finally(()=>{
this.flag=false
}) })
}
// this.$emit('exportVisible',true) // this.$emit('exportVisible',true)
}else{ }else{
this.$message.warning(this.$t('OnlyPDF')) this.$message.warning(this.$t('OnlyPDF'))
@@ -282,6 +282,7 @@
parameter:{}, parameter:{},
widthBrown:'', widthBrown:'',
creenWidth: document.body.clientWidth, creenWidth: document.body.clientWidth,
brownHeight:document.documentElement.clientHeight,
} }
}, },
watch:{ watch:{
@@ -302,9 +303,11 @@
const that = this; const that = this;
let client='' let client=''
let width='' let width=''
this.widthBrown = document.documentElement.offsetWidth || document.body.offsetWidth this.widthBrown = window.screenWidth || document.body.clientWidth;
client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect() client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
width = this.widthBrown - client.left width = this.widthBrown - client.left
let iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px' document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
that.screenWidth = window.screenWidth || document.body.clientWidth; that.screenWidth = window.screenWidth || document.body.clientWidth;
@@ -312,6 +315,8 @@
// console.log('screenWidth',that.screenWidth) // console.log('screenWidth',that.screenWidth)
width = that.screenWidth - client.left width = that.screenWidth - client.left
document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px' document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
}, false); }, false);
@@ -1131,6 +1136,7 @@
padding-right: 20px; padding-right: 20px;
border-right: 1px solid #E6E7EC; border-right: 1px solid #E6E7EC;
overflow-y: auto;
.split-detail-left-tree{ .split-detail-left-tree{
} }
@@ -20,7 +20,7 @@
<!-- 模板下载--> <!-- 模板下载-->
<div class="operator-select-type"> <div class="operator-select-type">
<span class="operator-file-type">{{$t('fileType')}}</span> <span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
<a-select v-model="fileGroup" :placeholder="$t('selectFileType')" class="file-type-select"> <a-select v-model="fileGroup" :placeholder="$t('selectFileType')" class="file-type-select">
<a-select-option value="GSO" key="GSO" title="GSO"> <a-select-option value="GSO" key="GSO" title="GSO">
GSO GSO
@@ -291,6 +291,14 @@
line-height: 32px; line-height: 32px;
display: inline-block; display: inline-block;
margin-right: 16px; margin-right: 16px;
.operator-i{
display: inline-block;
width: 10px;
height: 38px;
line-height: 38px;
text-align: center;
color:#f5222d;
}
} }
.operator-select-type{ .operator-select-type{
display: flex; display: flex;
@@ -275,11 +275,13 @@
this.key=value this.key=value
if(value==1){ if(value==1){
this.submitKey='1' this.submitKey='1'
this.queryParam.pageNo=1
this.loadData(1) this.loadData(1)
// this.tableData=this.taglab // this.tableData=this.taglab
// this.tableData=this.taglabSplit // this.tableData=this.taglabSplit
}else if(value==2){ }else if(value==2){
this.submitKey='2' this.submitKey='2'
this.queryParam.pageNo=1
this.loadData(0) this.loadData(0)
} }
}, },