Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
hanshaozhuang
2022-06-21 17:52:17 +08:00
2 changed files with 115 additions and 226 deletions
+3 -3
View File
@@ -345,9 +345,9 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button>
<!-- <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">-->
<!-- <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>-->
<!-- </button>-->
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
+16 -127
View File
@@ -1409,6 +1409,7 @@
import RelatedTermsSelect from "@/pages/details/otherStandardDetails/components/RelatedTermsSelect";
import {getBusStandFileByAttId} from 'api/process'
import {dicTypeData} from "api/unqualProcess";
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
export default {
@@ -2639,138 +2640,26 @@
if (fileSuffix !== undefined && fileSuffix !== null) {
fileSuffix = fileSuffix.toUpperCase()
}
// 判断上传文件格式
if (fileSuffix === '.PNG' || fileSuffix === '.JPG' || fileSuffix === '.JPEG') {
this.downloadFile(attId)
return true
}
// 缺少文件
if (this.$route.query.pageType === 'INLAND_STAND') {
if (this.$hasPermission('2d6ab9d465ab73d415194e1ca4313793')) {
if (fileSuffix === '.PDG' || fileSuffix === '.pdg') {
this.getBusStandFileByAttId(attId)
.then(res => {
if (res) {
const editFileInfo = res
if (editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG') {
window.open('book://ssreader/e0?url=' + editFileInfo.downLoadUrl)
} else {
if(fileSuffix !== 'pdg' && fileSuffix !== 'PDG'){
this.getBusStandFileByAttId(attId)
.then(res => {
if (res) {
const editFileInfo = res
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)
}
}
}).catch(e => {
console.log(e)
this.$message.warning('文件不存在,预览失败')
})
} else {
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
attId: attId
}, {
_this: this
}, res => {
if (res.data) {
let fileObj = {}
fileObj.fileId = res.data.attId
fileObj.fileName = oldFileName
let fileList = []
let repeatData = 0
if (sessionStorage.getItem('fileInfo')) {
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].fileId === res.data.attId) {
repeatData = 1
break
}
}
if (repeatData === 0) {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
}
} else {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
} else {
this.$message.error('文档未转换成功或本地读取不到该文档')
}
}, e => {
this.$message.error('文档未转换成功或本地读取不到该文档')
})
}
} else {
this.$message.error('没有在线预览文档权限!')
}
} else {
// 国外在线预览权限
if (this.$hasPermission('ee684b4a9975f5d8a6dfe898c0332f98')) {
// if (this.$hasPermission('02fd6eff0537c283dd071683de10689f')) {
if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
window.open('/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)
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
attId: attId
}, {
_this: this
}, res => {
if (res.data) {
let fileObj = {}
fileObj.fileId = res.data.attId
fileObj.fileName = oldFileName
let fileList = []
let repeatData = 0
if (sessionStorage.getItem('fileInfo')) {
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].fileId === res.data.attId) {
repeatData = 1
break
}
}
if (repeatData === 0) {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
}
} else {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
} else {
this.$message.error('文档未转换成功或本地读取不到该文档')
}
}, e => {
this.$message.error('文档未转换成功或本地读取不到该文档')
})
} else {
this.$message.error('没有在线预览文档权限!')
}
}
if(this.$route.query.pageType === 'INLAND_STAND'){
let standNumber = this.sarStandardsInfoEO.standSortShow + ' ' + this.sarStandardsInfoEO.standNumber + '-' + this.sarStandardsInfoEO.standYear || this.sarStandardsInfoEO.standSort + ' ' + this.sarStandardsInfoEO.standNumber
this.$http.get('sarStandardsInfo/sar-standards-info/logInvalid',{
standNumber: standNumber,
standName: this.sarStandardsInfoEO.standName
}, {
_this: this
}, res => {
})
}else{
let standNumber = this.sarStandardsInfoEO.standSortShow + ' ' + this.sarStandardsInfoEO.standNumber + '-' + this.sarStandardsInfoEO.standYear || this.sarStandardsInfoEO.standSort + ' ' + this.sarStandardsInfoEO.standNumber
this.$http.get('sarStandardsInfo/sar-standards-info/logForeign',{
standNumber: standNumber,
standName: this.sarStandardsInfoEO.standEnName
}, {
_this: this
}, res => {
}).catch(e => {
this.$message.warning('文件不存在,预览失败')
})
}else {
this.$message.warning('PDG文件,不支持手机端预览')
}
},
showItemsModel(attField) {