修改图片预览

This commit is contained in:
gaosong
2024-01-08 16:22:50 +08:00
parent caf1ab94ba
commit a904ae1b19
6 changed files with 21 additions and 8 deletions
@@ -118,6 +118,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (this.Uploadable.includes(fileSuffix)) {
} else {
@@ -76,6 +76,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -105,7 +106,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
val.fileSuffix = fileSuffix.toLowerCase()
})
this.loading = false
} else {
@@ -41,8 +41,9 @@
</a-row>
</a-form>
</div>
<div class="table-operator" v-if="$route.query.titleNameDesgin == 'maintenance'">
<div @click="handleAdd" class="operator-text" v-has="'params:paramsInfo:add'">
<div class="table-operator" >
<div @click="handleAdd" v-if="$route.query.titleNameDesgin == 'maintenance'"
class="operator-text" v-has="'params:paramsInfo:add'">
<a-icon type="plus"/>
{{$t('newlyAdded')}}
</div>
@@ -50,18 +51,24 @@
<a-icon type="export" :rotate="-90"/>
{{$t('dataExport')}}
</div>
<div @click="handleModule" class="operator-text" v-has="'params:paramsInfo:template'">
<div @click="handleModule" class="operator-text"
v-if="$route.query.titleNameDesgin == 'maintenance'"
v-has="'params:paramsInfo:template'">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
<div class="operator-text" v-has="'params:paramsInfo:import'">
<div class="operator-text"
v-if="$route.query.titleNameDesgin == 'maintenance'"
v-has="'params:paramsInfo:import'">
<ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsTemplateId='this.$route.query.id' @getList='getList'/>
</div>
<!-- <div @click="releaseVersion" class="operator-text" v-has="'params:paramsInfo:publish'">-->
<!-- <a-icon type="rocket"/>-->
<!-- {{$t('releaseVersion')}}-->
<!-- </div>-->
<div @click="handleDel" class="operator-text" v-has="'params:paramsInfo:deleteBatch'">
<div @click="handleDel"
v-if="$route.query.titleNameDesgin == 'maintenance'"
class="operator-text" v-has="'params:paramsInfo:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
@@ -3382,7 +3382,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
val.fileSuffix = fileSuffix.toLowerCase()
})
this.loading = false
} else {
@@ -3450,6 +3450,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -210,6 +210,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
@@ -509,6 +509,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -529,6 +530,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -571,7 +573,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
val.fileSuffix = fileSuffix.toLowerCase()
})
this.loading = false
} else {