feat: There is no way the,
This commit is contained in:
@@ -967,6 +967,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import PutQuestionButton from '@/components/PutQuestionButton'
|
import PutQuestionButton from '@/components/PutQuestionButton'
|
||||||
import {dateFormat} from '../../../common/date'
|
import {dateFormat} from '../../../common/date'
|
||||||
|
import { getBusStandFileByAttId } from 'api/process'
|
||||||
|
|
||||||
|
|
||||||
const sarType = 'BUSS'
|
const sarType = 'BUSS'
|
||||||
export default {
|
export default {
|
||||||
@@ -1552,6 +1554,21 @@ export default {
|
|||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBusStandFileByAttId(attId) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getBusStandFileByAttId({
|
||||||
|
attId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.ok) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
reject(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
openFileInPdf (attId, oldFileName) {
|
openFileInPdf (attId, oldFileName) {
|
||||||
// 判断是否是图片格式,图片格式不预览,直接下载
|
// 判断是否是图片格式,图片格式不预览,直接下载
|
||||||
let index1 = oldFileName.lastIndexOf('.')
|
let index1 = oldFileName.lastIndexOf('.')
|
||||||
@@ -1568,44 +1585,78 @@ export default {
|
|||||||
}
|
}
|
||||||
// 缺少文件
|
// 缺少文件
|
||||||
if (this.$hasPermission('43ae63abc1b64e6bd5cf3bb75b423bc2')) {
|
if (this.$hasPermission('43ae63abc1b64e6bd5cf3bb75b423bc2')) {
|
||||||
this.$http.get('lawss/sarBussStandFile/queryConvertAtt', {
|
|
||||||
attId: attId
|
if (fileSuffix === '.PDG' || fileSuffix === '.pdg') {
|
||||||
}, {
|
this.getBusStandFileByAttId(attId)
|
||||||
_this: this
|
.then(res => {
|
||||||
}, res => {
|
if(res){
|
||||||
if (res.data) {
|
const editFileInfo = res
|
||||||
let fileObj = {}
|
console.log(editFileInfo)
|
||||||
fileObj.fileId = res.data.attId
|
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||||
fileObj.fileName = oldFileName
|
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||||
let fileList = []
|
}else {
|
||||||
let repeatData = 0
|
const nowTime = new Date().getTime()
|
||||||
if (sessionStorage.getItem('fileInfo')) {
|
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||||
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
|
// window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||||||
if (fileList != null && fileList.length > 0) {
|
}
|
||||||
for (let i = 0; i < fileList.length; i++) {
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||||||
if (fileList[i].fileId === res.data.attId) {
|
}
|
||||||
repeatData = 1
|
// switch (res.convertState) {
|
||||||
break
|
// case 'ERROR':
|
||||||
|
// this.$message.warning('文档转换失败')
|
||||||
|
// break
|
||||||
|
// case 'LODING':
|
||||||
|
// this.$message.info('文档转换中,请稍后查看')
|
||||||
|
// break
|
||||||
|
// case 'SUCCESS':
|
||||||
|
// const { convertFileInfo } = res
|
||||||
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
this.$message.warning('文件不存在,预览失败')
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$http.get('lawss/sarBussStandFile/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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (repeatData === 0) {
|
} else {
|
||||||
fileList.push(fileObj)
|
fileList.push(fileObj)
|
||||||
fileList = JSON.stringify(fileList)
|
fileList = JSON.stringify(fileList)
|
||||||
sessionStorage.setItem('fileInfo', fileList)
|
sessionStorage.setItem('fileInfo', fileList)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
|
||||||
} else {
|
} else {
|
||||||
fileList.push(fileObj)
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
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))
|
}, e => {
|
||||||
} else {
|
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
}
|
})
|
||||||
}, e => {
|
}
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('没有在线预览文档权限!')
|
this.$message.error('没有在线预览文档权限!')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -894,6 +894,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import PutQuestionButton from '@/components/PutQuestionButton'
|
import PutQuestionButton from '@/components/PutQuestionButton'
|
||||||
import {dateFormat} from '../../../common/date'
|
import {dateFormat} from '../../../common/date'
|
||||||
|
import { getBusStandFileByAttId } from 'api/process'
|
||||||
|
|
||||||
|
|
||||||
const sarType = 'LAWS_STAND'
|
const sarType = 'LAWS_STAND'
|
||||||
export default {
|
export default {
|
||||||
@@ -1471,6 +1473,21 @@ export default {
|
|||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBusStandFileByAttId(attId) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getBusStandFileByAttId({
|
||||||
|
attId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.ok) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
reject(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
openFileInPdf (attId, oldFileName) {
|
openFileInPdf (attId, oldFileName) {
|
||||||
// 判断是否是图片格式,图片格式不预览,直接下载
|
// 判断是否是图片格式,图片格式不预览,直接下载
|
||||||
let index1 = oldFileName.lastIndexOf('.')
|
let index1 = oldFileName.lastIndexOf('.')
|
||||||
@@ -1487,44 +1504,78 @@ export default {
|
|||||||
}
|
}
|
||||||
// 缺少文件
|
// 缺少文件
|
||||||
if (this.$hasPermission('fd83032ae5f41a0021b00e93c88edbbg')) {
|
if (this.$hasPermission('fd83032ae5f41a0021b00e93c88edbbg')) {
|
||||||
this.$http.get('lawss/sarLawsFile/queryConvertAtt', {
|
|
||||||
attId: attId
|
if (fileSuffix === '.PDG' || fileSuffix === '.pdg') {
|
||||||
}, {
|
this.getBusStandFileByAttId(attId)
|
||||||
_this: this
|
.then(res => {
|
||||||
}, res => {
|
if(res){
|
||||||
if (res.data) {
|
const editFileInfo = res
|
||||||
let fileObj = {}
|
console.log(editFileInfo)
|
||||||
fileObj.fileId = res.data.attId
|
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||||
fileObj.fileName = oldFileName
|
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||||
let fileList = []
|
}else {
|
||||||
let repeatData = 0
|
const nowTime = new Date().getTime()
|
||||||
if (sessionStorage.getItem('fileInfo')) {
|
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||||
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
|
// window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||||||
if (fileList != null && fileList.length > 0) {
|
}
|
||||||
for (let i = 0; i < fileList.length; i++) {
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||||||
if (fileList[i].fileId === res.data.attId) {
|
}
|
||||||
repeatData = 1
|
// switch (res.convertState) {
|
||||||
break
|
// case 'ERROR':
|
||||||
|
// this.$message.warning('文档转换失败')
|
||||||
|
// break
|
||||||
|
// case 'LODING':
|
||||||
|
// this.$message.info('文档转换中,请稍后查看')
|
||||||
|
// break
|
||||||
|
// case 'SUCCESS':
|
||||||
|
// const { convertFileInfo } = res
|
||||||
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
this.$message.warning('文件不存在,预览失败')
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$http.get('lawss/sarLawsFile/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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (repeatData === 0) {
|
} else {
|
||||||
fileList.push(fileObj)
|
fileList.push(fileObj)
|
||||||
fileList = JSON.stringify(fileList)
|
fileList = JSON.stringify(fileList)
|
||||||
sessionStorage.setItem('fileInfo', fileList)
|
sessionStorage.setItem('fileInfo', fileList)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
|
||||||
} else {
|
} else {
|
||||||
fileList.push(fileObj)
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
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))
|
}, e => {
|
||||||
} else {
|
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
}
|
})
|
||||||
}, e => {
|
}
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('没有在线预览文档权限!')
|
this.$message.error('没有在线预览文档权限!')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1405,6 +1405,8 @@ import CustomSVPPS from '@/components/CustomFormComponents/SVPPS'
|
|||||||
import CustomOrg from '@/components/CustomFormComponents/OrgTree'
|
import CustomOrg from '@/components/CustomFormComponents/OrgTree'
|
||||||
import {dateFormat} from '@/common/date'
|
import {dateFormat} from '@/common/date'
|
||||||
import RelatedTermsSelect from './components/RelatedTermsSelect'
|
import RelatedTermsSelect from './components/RelatedTermsSelect'
|
||||||
|
import { getBusStandFileByAttId } from 'api/process'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OtherStandardDetails',
|
name: 'OtherStandardDetails',
|
||||||
@@ -2442,6 +2444,21 @@ export default {
|
|||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBusStandFileByAttId(attId) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getBusStandFileByAttId({
|
||||||
|
attId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.ok) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
reject(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
openFileInPdf(attId, oldFileName) {
|
openFileInPdf(attId, oldFileName) {
|
||||||
// 判断是否是图片格式,图片格式不预览,直接下载
|
// 判断是否是图片格式,图片格式不预览,直接下载
|
||||||
let index1 = oldFileName.lastIndexOf('.')
|
let index1 = oldFileName.lastIndexOf('.')
|
||||||
@@ -2456,50 +2473,83 @@ export default {
|
|||||||
this.downloadFile(attId)
|
this.downloadFile(attId)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 缺少文件
|
// 缺少文件
|
||||||
if (this.$route.params.pageType === 'INLAND_STAND') {
|
if (this.$route.params.pageType === 'INLAND_STAND') {
|
||||||
if (this.$hasPermission('2d6ab9d465ab73d415194e1ca4313793')) {
|
if (this.$hasPermission('2d6ab9d465ab73d415194e1ca4313793')) {
|
||||||
|
if (fileSuffix === '.PDG' || fileSuffix === '.pdg') {
|
||||||
|
this.getBusStandFileByAttId(attId)
|
||||||
|
.then(res => {
|
||||||
|
if(res){
|
||||||
|
const editFileInfo = res
|
||||||
|
console.log(editFileInfo)
|
||||||
|
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||||
|
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||||
|
}else {
|
||||||
|
const nowTime = new Date().getTime()
|
||||||
|
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||||
|
// window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||||||
|
}
|
||||||
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||||||
|
}
|
||||||
|
// switch (res.convertState) {
|
||||||
|
// case 'ERROR':
|
||||||
|
// this.$message.warning('文档转换失败')
|
||||||
|
// break
|
||||||
|
// case 'LODING':
|
||||||
|
// this.$message.info('文档转换中,请稍后查看')
|
||||||
|
// break
|
||||||
|
// case 'SUCCESS':
|
||||||
|
// const { convertFileInfo } = res
|
||||||
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
this.$message.warning('文件不存在,预览失败')
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
|
||||||
|
attId: attId
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
|
||||||
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
|
console.log("res.data", res.data);
|
||||||
attId: attId
|
if (res.data) {
|
||||||
}, {
|
let fileObj = {}
|
||||||
_this: this
|
fileObj.fileId = res.data.attId
|
||||||
}, res => {
|
fileObj.fileName = oldFileName
|
||||||
|
let fileList = []
|
||||||
console.log("res.data", res.data);
|
let repeatData = 0
|
||||||
if (res.data) {
|
if (sessionStorage.getItem('fileInfo')) {
|
||||||
let fileObj = {}
|
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
|
||||||
fileObj.fileId = res.data.attId
|
if (fileList != null && fileList.length > 0) {
|
||||||
fileObj.fileName = oldFileName
|
for (let i = 0; i < fileList.length; i++) {
|
||||||
let fileList = []
|
if (fileList[i].fileId === res.data.attId) {
|
||||||
let repeatData = 0
|
repeatData = 1
|
||||||
if (sessionStorage.getItem('fileInfo')) {
|
break
|
||||||
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
|
}
|
||||||
if (fileList != null && fileList.length > 0) {
|
}
|
||||||
for (let i = 0; i < fileList.length; i++) {
|
if (repeatData === 0) {
|
||||||
if (fileList[i].fileId === res.data.attId) {
|
fileList.push(fileObj)
|
||||||
repeatData = 1
|
fileList = JSON.stringify(fileList)
|
||||||
break
|
sessionStorage.setItem('fileInfo', fileList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (repeatData === 0) {
|
} else {
|
||||||
fileList.push(fileObj)
|
fileList.push(fileObj)
|
||||||
fileList = JSON.stringify(fileList)
|
fileList = JSON.stringify(fileList)
|
||||||
sessionStorage.setItem('fileInfo', fileList)
|
sessionStorage.setItem('fileInfo', fileList)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
|
||||||
} else {
|
} else {
|
||||||
fileList.push(fileObj)
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
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))
|
}, e => {
|
||||||
} else {
|
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
}
|
})
|
||||||
}, e => {
|
}
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('没有在线预览文档权限!')
|
this.$message.error('没有在线预览文档权限!')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user