修改图片预览

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 index1 = fileName.lastIndexOf('.')
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (this.Uploadable.includes(fileSuffix)) { if (this.Uploadable.includes(fileSuffix)) {
} else { } else {
@@ -76,6 +76,7 @@
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)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username)) 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') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -105,7 +106,7 @@
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)
val.fileSuffix = fileSuffix val.fileSuffix = fileSuffix.toLowerCase()
}) })
this.loading = false this.loading = false
} else { } else {
@@ -41,8 +41,9 @@
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="table-operator" v-if="$route.query.titleNameDesgin == 'maintenance'"> <div class="table-operator" >
<div @click="handleAdd" class="operator-text" v-has="'params:paramsInfo:add'"> <div @click="handleAdd" v-if="$route.query.titleNameDesgin == 'maintenance'"
class="operator-text" v-has="'params:paramsInfo:add'">
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('newlyAdded')}} {{$t('newlyAdded')}}
</div> </div>
@@ -50,18 +51,24 @@
<a-icon type="export" :rotate="-90"/> <a-icon type="export" :rotate="-90"/>
{{$t('dataExport')}} {{$t('dataExport')}}
</div> </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"/> <a-icon type="download"/>
{{$t('templateDownload')}} {{$t('templateDownload')}}
</div> </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'/> <ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsTemplateId='this.$route.query.id' @getList='getList'/>
</div> </div>
<!-- <div @click="releaseVersion" class="operator-text" v-has="'params:paramsInfo:publish'">--> <!-- <div @click="releaseVersion" class="operator-text" v-has="'params:paramsInfo:publish'">-->
<!-- <a-icon type="rocket"/>--> <!-- <a-icon type="rocket"/>-->
<!-- {{$t('releaseVersion')}}--> <!-- {{$t('releaseVersion')}}-->
<!-- </div>--> <!-- </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"/> <a-icon type="delete"/>
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
@@ -3382,7 +3382,7 @@
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)
val.fileSuffix = fileSuffix val.fileSuffix = fileSuffix.toLowerCase()
}) })
this.loading = false this.loading = false
} else { } else {
@@ -3450,6 +3450,7 @@
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)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username)) 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') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -210,6 +210,7 @@
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)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username)) 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') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
@@ -509,6 +509,7 @@
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)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username)) 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') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -529,6 +530,7 @@
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)
fileSuffix = fileSuffix.toLowerCase()
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id+'&userName='+this.userInfo().username)) 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') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
@@ -571,7 +573,7 @@
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)
val.fileSuffix = fileSuffix val.fileSuffix = fileSuffix.toLowerCase()
}) })
this.loading = false this.loading = false
} else { } else {