Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -345,9 +345,9 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||||||
<div id="toolbarContainer">
|
<div id="toolbarContainer">
|
||||||
<div id="toolbarViewer">
|
<div id="toolbarViewer">
|
||||||
<div id="toolbarViewerLeft">
|
<div id="toolbarViewerLeft">
|
||||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
|
<!-- <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>
|
<!-- <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>-->
|
||||||
</button>
|
<!-- </button>-->
|
||||||
<div class="toolbarButtonSpacer"></div>
|
<div class="toolbarButtonSpacer"></div>
|
||||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
||||||
<span data-l10n-id="findbar_label">Find</span>
|
<span data-l10n-id="findbar_label">Find</span>
|
||||||
|
|||||||
@@ -1409,6 +1409,7 @@
|
|||||||
import RelatedTermsSelect from "@/pages/details/otherStandardDetails/components/RelatedTermsSelect";
|
import RelatedTermsSelect from "@/pages/details/otherStandardDetails/components/RelatedTermsSelect";
|
||||||
import {getBusStandFileByAttId} from 'api/process'
|
import {getBusStandFileByAttId} from 'api/process'
|
||||||
import {dicTypeData} from "api/unqualProcess";
|
import {dicTypeData} from "api/unqualProcess";
|
||||||
|
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -2639,138 +2640,26 @@
|
|||||||
if (fileSuffix !== undefined && fileSuffix !== null) {
|
if (fileSuffix !== undefined && fileSuffix !== null) {
|
||||||
fileSuffix = fileSuffix.toUpperCase()
|
fileSuffix = fileSuffix.toUpperCase()
|
||||||
}
|
}
|
||||||
// 判断上传文件格式
|
if(fileSuffix !== 'pdg' && fileSuffix !== 'PDG'){
|
||||||
if (fileSuffix === '.PNG' || fileSuffix === '.JPG' || fileSuffix === '.JPEG') {
|
this.getBusStandFileByAttId(attId)
|
||||||
this.downloadFile(attId)
|
.then(res => {
|
||||||
return true
|
if (res) {
|
||||||
}
|
const editFileInfo = res
|
||||||
// 缺少文件
|
|
||||||
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 {
|
|
||||||
const nowTime = new Date().getTime()
|
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)
|
if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
|
||||||
}
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||||||
}
|
}else {
|
||||||
}).catch(e => {
|
const nowTime = new Date().getTime()
|
||||||
console.log(e)
|
// 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.$message.warning('文件不存在,预览失败')
|
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||||
})
|
|
||||||
} 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')) {
|
|
||||||
|
|
||||||
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) {
|
}).catch(e => {
|
||||||
fileList.push(fileObj)
|
this.$message.warning('文件不存在,预览失败')
|
||||||
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 => {
|
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
this.$message.warning('PDG文件,不支持手机端预览')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showItemsModel(attField) {
|
showItemsModel(attField) {
|
||||||
|
|||||||
Reference in New Issue
Block a user