Merge branch 'develop' of ssh://gitlab.91isoft.com:10022/LAWS/laws-system-front-FOTON into develop
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ZQYJAddFileDetails">
|
<div class="ZQYJAddFileDetails">
|
||||||
<div class="left">
|
<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%"
|
width="100%" height="100%"
|
||||||
frameborder="0" scrolling="no" ref="iframeDom"
|
frameborder="0" scrolling="no" ref="iframeDom"
|
||||||
></iframe>
|
></iframe>
|
||||||
@@ -48,11 +49,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getBusStandFileByAttId } from "api/process";
|
||||||
|
import { kkFileViewUrl } from "@/sysConfig";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ZQYJAddFileDetails",
|
name: "ZQYJAddFileDetails",
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options: [],
|
options: [],
|
||||||
|
iframeUrl:"",
|
||||||
|
iframeLoading: false,
|
||||||
opinionContent: { // 抽屉数据
|
opinionContent: { // 抽屉数据
|
||||||
partCode: '',
|
partCode: '',
|
||||||
oldText: '',
|
oldText: '',
|
||||||
@@ -79,6 +85,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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 () {
|
saveUserInfo () {
|
||||||
this.$refs['formAdd'].validate((valid) => {
|
this.$refs['formAdd'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -112,6 +145,8 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
const attId = this.$route.query.attId
|
||||||
|
this.previewShow(attId)
|
||||||
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
||||||
standId: this.$route.query.standId,
|
standId: this.$route.query.standId,
|
||||||
fileType: this.$route.query.fileType,
|
fileType: this.$route.query.fileType,
|
||||||
|
|||||||
Reference in New Issue
Block a user