修改首页知识分享跳转
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<div class="monthlyReportRegulations-box-content" v-if="monthlyReportRegulationsList.length > 0">
|
<div class="monthlyReportRegulations-box-content" v-if="monthlyReportRegulationsList.length > 0">
|
||||||
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList" @click="preview(item)">
|
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList" @click="preview(item)">
|
||||||
<div class="yuan"></div>
|
<div class="yuan"></div>
|
||||||
<div class="text" :title="item.name">{{item.name}}</div>
|
<div class="text" :title="item.title">{{item.title}}</div>
|
||||||
<div class="time">{{item.createTime}}</div>
|
<div class="time">{{item.createTime}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,8 @@
|
|||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
|
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
|
||||||
url: {
|
url: {
|
||||||
list: '/report/lawsMonthlyReportManageEO/page'
|
// list: '/report/lawsMonthlyReportManageEO/page'
|
||||||
|
list: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
let query = {
|
let query = {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
issueStatus: '1'
|
releaseStatus: 'Have released'
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
@@ -62,33 +63,41 @@
|
|||||||
},
|
},
|
||||||
moreClick() {
|
moreClick() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/monthlyRegulationReport'
|
path: '/problemknowledgeBase'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
preview(item) {
|
preview(item) {
|
||||||
let fileName = item.name
|
this.$router.push({
|
||||||
let index1 = fileName.lastIndexOf('.')
|
path: '/problemknowledgeBase',
|
||||||
let index2 = fileName.length
|
query: {
|
||||||
let fileSuffix = fileName.substring(index1, index2)
|
id: item.id
|
||||||
if (fileSuffix === '.pdf') {
|
|
||||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
|
|
||||||
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
|
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
|
||||||
window.open(url, '_blank')
|
|
||||||
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
|
||||||
window.open(url, '_blank')
|
|
||||||
}else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){
|
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.fileId + fileSuffix)
|
|
||||||
window.open(url, '_blank')
|
|
||||||
} else {
|
|
||||||
if (item.createBy == this.userInfo().username){
|
|
||||||
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
|
|
||||||
}else{
|
|
||||||
this.$message.warning(this.$t('theDoesNotSupportPreview'))
|
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
// preview(item) {
|
||||||
|
// let fileName = item.name
|
||||||
|
// let index1 = fileName.lastIndexOf('.')
|
||||||
|
// let index2 = fileName.length
|
||||||
|
// let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
// if (fileSuffix === '.pdf') {
|
||||||
|
// window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
|
||||||
|
// } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
|
||||||
|
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
||||||
|
// window.open(url, '_blank')
|
||||||
|
// } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
||||||
|
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
||||||
|
// window.open(url, '_blank')
|
||||||
|
// }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){
|
||||||
|
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.fileId + fileSuffix)
|
||||||
|
// window.open(url, '_blank')
|
||||||
|
// } else {
|
||||||
|
// if (item.createBy == this.userInfo().username){
|
||||||
|
// downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
|
||||||
|
// }else{
|
||||||
|
// this.$message.warning(this.$t('theDoesNotSupportPreview'))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user