|
@@ -12,10 +12,13 @@
|
|
<div slot="tip" class="el-upload__tip"></div>
|
|
<div slot="tip" class="el-upload__tip"></div>
|
|
</el-upload> -->
|
|
</el-upload> -->
|
|
</div>
|
|
</div>
|
|
- <myIframe v-if="show" :src="src" frameborder="0" :height="height" width="100%"></myIframe>
|
|
|
|
- <div v-else class="no-pdf-file">
|
|
|
|
- <span>暂无文档</span>
|
|
|
|
|
|
+ <div style="height:calc(100% - 120px)" v-loading="loading">
|
|
|
|
+ <myIframe v-if="show" :src="src" frameborder="0" :height="height" width="100%"></myIframe>
|
|
|
|
+ <div v-else class="no-pdf-file">
|
|
|
|
+ <span>暂无文档</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -30,7 +33,7 @@ export default {
|
|
src: '',
|
|
src: '',
|
|
fullHeight: document.documentElement.clientHeight,
|
|
fullHeight: document.documentElement.clientHeight,
|
|
height: 0,
|
|
height: 0,
|
|
- show: false,
|
|
|
|
|
|
+ show: true,
|
|
btnLoading: false,
|
|
btnLoading: false,
|
|
pdfType: 1,
|
|
pdfType: 1,
|
|
pdf: null
|
|
pdf: null
|
|
@@ -60,7 +63,6 @@ export default {
|
|
// 获取外部的pdf地址
|
|
// 获取外部的pdf地址
|
|
getData() {
|
|
getData() {
|
|
|
|
|
|
- this.show = false
|
|
|
|
this.height = (this.fullHeight - 230) + 'px'
|
|
this.height = (this.fullHeight - 230) + 'px'
|
|
if (this.patent.pdf && this.patent.pdf.length > 0) {
|
|
if (this.patent.pdf && this.patent.pdf.length > 0) {
|
|
this.getSrc()
|
|
this.getSrc()
|
|
@@ -70,16 +72,21 @@ export default {
|
|
appNo: this.patent.appNo,
|
|
appNo: this.patent.appNo,
|
|
rowApplicationNo: this.patent.rowApplicationNo,
|
|
rowApplicationNo: this.patent.rowApplicationNo,
|
|
}
|
|
}
|
|
|
|
+ this.loading = true
|
|
this.$api.getCnPdf(params).then(response => {
|
|
this.$api.getCnPdf(params).then(response => {
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
this.$set(this.patent, 'pdf', response.data)
|
|
this.$set(this.patent, 'pdf', response.data)
|
|
this.getSrc()
|
|
this.getSrc()
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
|
|
+ }).catch(error=>{
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 内部专利根据guid获取路径
|
|
// 内部专利根据guid获取路径
|
|
getSrc() {
|
|
getSrc() {
|
|
if(this.patent.pdf.length==0){
|
|
if(this.patent.pdf.length==0){
|
|
|
|
+ this.show = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let obj = this.patent.pdf.find(item => {
|
|
let obj = this.patent.pdf.find(item => {
|
|
@@ -92,6 +99,7 @@ export default {
|
|
this.pdfType = this.patent.pdf[0].type
|
|
this.pdfType = this.patent.pdf[0].type
|
|
guid = this.patent.pdf[0].pdfGuid
|
|
guid = this.patent.pdf[0].pdfGuid
|
|
}
|
|
}
|
|
|
|
+
|
|
this.src = this.$commonJS.checkGuid(guid)
|
|
this.src = this.$commonJS.checkGuid(guid)
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.show = true
|
|
this.show = true
|
|
@@ -138,11 +146,15 @@ export default {
|
|
appNo: this.patent.appNo,
|
|
appNo: this.patent.appNo,
|
|
// type: this.pdfType,//0公开1授权
|
|
// type: this.pdfType,//0公开1授权
|
|
}
|
|
}
|
|
|
|
+ this.loading = true
|
|
this.$api.getTextPdf(params).then(response => {
|
|
this.$api.getTextPdf(params).then(response => {
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
this.$set(this.patent, 'pdf', response.data)
|
|
this.$set(this.patent, 'pdf', response.data)
|
|
this.getSrc()
|
|
this.getSrc()
|
|
|
|
+ this.loading =false
|
|
}
|
|
}
|
|
|
|
+ }).catch(error=>{
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleResize(event) {
|
|
handleResize(event) {
|