Merge branch 'develop' of ssh://gitlab.91isoft.com:10022/LAWS/laws-system-front-FOTON into develop

This commit is contained in:
zhangyichen
2022-04-22 14:45:39 +08:00
@@ -1,7 +1,8 @@
<template>
<div class="ZQYJAddFileDetails">
<div class="left">
<iframe name = "iframeMap" id="iframeMapViewComponent" v-bind:src="'/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + $route.query.attId)"
<loading :loading="iframeLoading">正在加载文档</loading>
<iframe name = "iframeMap" id="iframeMapViewComponent" v-bind:src="iframeUrl"
width="100%" height="100%"
frameborder="0" scrolling="no" ref="iframeDom"
></iframe>
@@ -48,11 +49,16 @@
</template>
<script>
import { getBusStandFileByAttId } from "api/process";
import { kkFileViewUrl } from "@/sysConfig";
export default {
name: "ZQYJAddFileDetails",
data () {
return {
options: [],
iframeUrl:"",
iframeLoading: false,
opinionContent: { // 抽屉数据
partCode: '',
oldText: '',
@@ -79,6 +85,33 @@
}
},
methods: {
previewShow(attId) {
this.iframeLoading = true
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if(res){
const history = res;
const editFileInfo = res.data
if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){
this.iframeUrl = 'book://ssreader/e0?url='+editFileInfo.downLoadUrl
}else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
this.iframeUrl = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)
}else {
const nowTime = new Date().getTime()
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl));
}
this.iframeLoading = false
this.$forceUpdate()
resolve(history)
}
}).catch(e => {
})
})
console.log(this.iframeUrl);
},
saveUserInfo () {
this.$refs['formAdd'].validate((valid) => {
if (valid) {
@@ -112,6 +145,8 @@
},
},
mounted() {
const attId = this.$route.query.attId
this.previewShow(attId)
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
standId: this.$route.query.standId,
fileType: this.$route.query.fileType,