|
@@ -170,15 +170,15 @@
|
|
title="内容摘要">
|
|
title="内容摘要">
|
|
</vxe-column>
|
|
</vxe-column>
|
|
<vxe-column
|
|
<vxe-column
|
|
- field="attachedDocumentId"
|
|
+ field="attachedDocumentId2"
|
|
sortable
|
|
sortable
|
|
title="来文附件">
|
|
title="来文附件">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- <template v-if="row.attachedDocumentId">
|
|
+ <template v-if="row.attachedDocumentId2">
|
|
<el-image
|
|
<el-image
|
|
style="height: 50px;width:50px;margin-right:10px;"
|
|
style="height: 50px;width:50px;margin-right:10px;"
|
|
- :src="src" v-for="(src, index) in row.attachedDocumentId.split(',')" :key="index"
|
|
+ :src="src" v-for="(src, index) in row.attachedDocumentId2" :key="index"
|
|
- :preview-src-list="row.attachedDocumentId.split(',')">
|
|
+ :preview-src-list="row.attachedDocumentId2">
|
|
</el-image>
|
|
</el-image>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
@@ -250,7 +250,7 @@
|
|
writtenTime: '',
|
|
writtenTime: '',
|
|
receivingTime: '',
|
|
receivingTime: '',
|
|
contentSummary: '',
|
|
contentSummary: '',
|
|
- state: '1'
|
|
+ state: '5'
|
|
},
|
|
},
|
|
dataList: [],
|
|
dataList: [],
|
|
tablePage: {
|
|
tablePage: {
|
|
@@ -292,6 +292,21 @@
|
|
'orders': this.tablePage.orders,
|
|
'orders': this.tablePage.orders,
|
|
...this.searchForm
|
|
...this.searchForm
|
|
}).then((data) => {
|
|
}).then((data) => {
|
|
|
|
+ //处理附件中不是图片的,不显示
|
|
|
|
+
|
|
|
|
+ data.records.forEach(item => {
|
|
|
|
+
|
|
|
|
+ let files=item.attachedDocumentId.split(',')
|
|
|
|
+ let imgstr=[];
|
|
|
|
+ files.forEach(item2 => {
|
|
|
|
+ if (this.isImageFormat(item2)) {
|
|
|
|
+ imgstr.push(item2)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ item.attachedDocumentId2=imgstr;
|
|
|
|
+ console.log(item.id+"附件:"+item.attachedDocumentId2);
|
|
|
|
+ })
|
|
|
|
+
|
|
this.dataList = data.records
|
|
this.dataList = data.records
|
|
this.tablePage.total = data.total
|
|
this.tablePage.total = data.total
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -305,6 +320,11 @@
|
|
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 使用正则表达式判断文件名或URL是否为图片格式
|
|
|
|
+ isImageFormat(filename) {
|
|
|
|
+ const imageFormats = /\.(jpeg|jpg|gif|png|bmp|svg)$/i;
|
|
|
|
+ return imageFormats.test(filename);
|
|
|
|
+ },
|
|
// 当前页
|
|
// 当前页
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
this.tablePage.currentPage = currentPage
|
|
this.tablePage.currentPage = currentPage
|