合并分支 'dev_20230216' 到 'master'

Dev 20230216

查看合并请求 laws-foton-slrs/foton-laws-system-front!36
This commit is contained in:
高嵩
2023-04-06 00:33:11 +08:00
2 changed files with 48 additions and 18 deletions
@@ -652,7 +652,7 @@
<div class="prc-content-border" v-show="opinionsShow">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="培训文件" prop="madelSubName" class="add-form-item form-item-disabled">
<el-form-item label="培训文件" prop="madelSubName" class="add-form-item form-item-disabled pxwj">
<el-input
disabled
style="display: none;"
@@ -674,7 +674,7 @@
type="primary"
class="common-button-primary"
size="mini"
style="margin-top: 6px; float: left;"
style="margin-top: 6px; float: right;"
@click="fileUpload('madelSub')">
<i class="el-icon-upload"></i>
</el-button>
@@ -1167,4 +1167,7 @@
.process-manuscript /deep/ .el-form-item__error {
right: 45px !important;
}
.pxwj /deep/ .el-form-item__error{
right: 45px !important;
}
</style>
@@ -898,6 +898,7 @@
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
let Base64 = require('js-base64').Base64;
import axios from '@/common/axiosV2'
export default {
name: "bussLibrary5",
@@ -1445,27 +1446,53 @@
previewShow(attId) {
this.iframeLoading = true
return new Promise((resolve, reject) => {
if(attId.indexOf('ATT_FILE') === 0){
getBusStandFileByAttId({
attId
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))+'&office.preview.type=pdf';
}
this.iframeLoading = false
this.$forceUpdate()
resolve(history)
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))+'&office.preview.type=pdf';
}
this.iframeLoading = false
this.$forceUpdate()
resolve(history)
}
}).catch(e => {
})
}else{
axios({
url: 'api/lawss/activiti/selectOnlineFile',
method: 'get',
params: 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))+'&office.preview.type=pdf';
}
this.iframeLoading = false
this.$forceUpdate()
resolve(history)
}
}).catch(e=>{})
}
})
},
previewIframe(targetName, action){