This commit is contained in:
parent
5ef89d5c85
commit
987388f71b
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
|
|
@ -158,6 +158,13 @@
|
|||
<!-- 文件格式下载,图片格式预览 -->
|
||||
<div slot="file" slot-scope="{ file }">
|
||||
<img
|
||||
v-if="isPdf(file)"
|
||||
class="el-upload-list__item-thumbnail"
|
||||
src="@/assets/images/pdf.png"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="file.url"
|
||||
alt=""
|
||||
|
|
@ -587,6 +594,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
isPdf(file) {
|
||||
const url = file.response ? file.response.data.url : file.url.replaceAll('#', '%23')
|
||||
if (!url) return false
|
||||
return url.toLowerCase().includes('.pdf')
|
||||
},
|
||||
// 查询
|
||||
handleQuery() {
|
||||
// 重置分页到第一页
|
||||
|
|
@ -1278,6 +1290,10 @@ export default {
|
|||
console.log("xxxxxxxxxxxx",file)
|
||||
this.dialogImageUrl =file.response ? file.response.data.url : file.url.replaceAll('#', '%23')
|
||||
console.log("zzzzzzzzzz",this.dialogImageUrl)
|
||||
if (this.isPdf(file)) {
|
||||
window.open(this.dialogImageUrl, '_blank')
|
||||
return
|
||||
}
|
||||
// const parts = file.name ? file.name:file.url.split('.')
|
||||
// console.log("yyyyyyyyy",parts)
|
||||
// const extension = parts?.pop()
|
||||
|
|
|
|||
|
|
@ -45,11 +45,6 @@
|
|||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准箱类型" align="center" prop="boxType" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.qr_box_type" :value="scope.row.boxType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准箱名称" align="center" prop="boxName" show-overflow-tooltip />
|
||||
<el-table-column label="标准箱编码" align="center" prop="boxCode" show-overflow-tooltip />
|
||||
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip />
|
||||
|
|
|
|||
Loading…
Reference in New Issue