修改搜索中心加文件名称和预览
This commit is contained in:
@@ -145,6 +145,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
|
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
|
||||||
|
<template slot="title">
|
||||||
|
<span v-html="item.file_name"></span>
|
||||||
|
</template>
|
||||||
|
<span style="cursor: pointer" v-html="item.file_name" @click="fileClick(item)"></span>
|
||||||
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" v-if="!queryParam.selectValue">
|
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" v-if="!queryParam.selectValue">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
@@ -343,6 +349,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
selectListModel(val) {
|
selectListModel(val) {
|
||||||
|
this.pageNo = 1
|
||||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||||
this.isTrue = val == 'list' ? true : false
|
this.isTrue = val == 'list' ? true : false
|
||||||
if (this.isTrue) {
|
if (this.isTrue) {
|
||||||
@@ -607,20 +614,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fileClick(fileQuery) {
|
fileClick(fileQuery) {
|
||||||
let fileName = fileQuery.fileName
|
let fileName = fileQuery.fileName || fileQuery.file_name
|
||||||
let index1 = fileName.lastIndexOf('.')
|
let index1 = fileName.lastIndexOf('.')
|
||||||
let index2 = fileName.length
|
let index2 = fileName.length
|
||||||
let fileSuffix = fileName.substring(index1, index2)
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
if (fileSuffix == '.pdf') {
|
if (fileSuffix == '.pdf') {
|
||||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.file_id || fileQuery.id))
|
||||||
} else if (fileSuffix == '.docx') {
|
} else if (fileSuffix == '.docx') {
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.file_id || fileQuery.id + fileSuffix)
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.file_id || fileQuery.id + fileSuffix)
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
} else {
|
} else {
|
||||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
titleClick(item) {
|
titleClick(item) {
|
||||||
|
|||||||
@@ -30,7 +30,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
|
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
|
||||||
|
<template slot="title">
|
||||||
|
<span v-html="item.file_name"></span>
|
||||||
|
</template>
|
||||||
|
<span style="cursor: pointer" v-html="item.file_name" @click="fileClick(item)"></span>
|
||||||
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<a-tooltip placement="topLeft" v-if="!queryParam.selectValue" :mouseEnterDelay="0.5">
|
<a-tooltip placement="topLeft" v-if="!queryParam.selectValue" :mouseEnterDelay="0.5">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
@@ -84,6 +89,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||||
|
import { Base64 } from 'js-base64'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'whole',
|
name: 'whole',
|
||||||
@@ -130,14 +136,32 @@
|
|||||||
} else {
|
} else {
|
||||||
this.checkboxText.push(item.id)
|
this.checkboxText.push(item.id)
|
||||||
}
|
}
|
||||||
console.log(this.checkboxText)
|
},
|
||||||
|
fileClick(fileQuery) {
|
||||||
|
let fileName = fileQuery.file_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=' + fileQuery.file_id))
|
||||||
|
} else if (fileSuffix == '.docx') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.file_id + fileSuffix)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.file_id + fileSuffix)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else {
|
||||||
|
downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.file_id })
|
||||||
|
}
|
||||||
},
|
},
|
||||||
pageOnChange(page, pageSize) {
|
pageOnChange(page, pageSize) {
|
||||||
this.pageNo = page
|
this.pageNo = page
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
SizeChange(page, pageSize) {
|
SizeChange(page, pageSize) {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.pageSize = pageSize
|
this.pageSize = pageSize
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
searchData(value) {
|
searchData(value) {
|
||||||
this.queryParam.selectValue = value || undefined
|
this.queryParam.selectValue = value || undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user