File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 24
24
</template>
25
25
</el-table-column>
26
26
<el-table-column align="center" label="跟进内容" prop="content" />
27
+ <el-table-column label="图片" align="center">
28
+ <template #default="scope">
29
+ <div v-if="scope.row.picUrls && scope.row.picUrls.length > 0" class="flex">
30
+ <el-image
31
+ v-for="(url, index) in scope.row.picUrls"
32
+ :key="index"
33
+ :src="url"
34
+ :preview-src-list="scope.row.picUrls"
35
+ class="w-10 h-10 mr-1"
36
+ :initial-index="index"
37
+ fit="cover"
38
+ preview-teleported
39
+ />
40
+ </div>
41
+ </template>
42
+ </el-table-column>
43
+ <el-table-column label="附件" align="center">
44
+ <template #default="scope">
45
+ <div v-if="scope.row.fileUrls && scope.row.fileUrls.length > 0" class="flex flex-col">
46
+ <el-link
47
+ v-for="(url, index) in scope.row.fileUrls"
48
+ :key="index"
49
+ :href="url"
50
+ type="primary"
51
+ target="_blank"
52
+ download
53
+ >
54
+ {{ getFileName(url) }}
55
+ </el-link>
56
+ </div>
57
+ </template>
58
+ </el-table-column>
27
59
<el-table-column
28
60
:formatter="dateFormatter"
29
61
align="center"
@@ -97,6 +129,14 @@ import { BizTypeEnum } from '@/api/crm/permission'
97
129
98
130
/** 跟进记录列表 */
99
131
defineOptions({ name: 'FollowUpRecord' })
132
+
133
+ const getFileName = (url: string) => {
134
+ if (!url) {
135
+ return ''
136
+ }
137
+ return url.substring(url.lastIndexOf('/') + 1)
138
+ }
139
+
100
140
const props = defineProps<{
101
141
bizType: number
102
142
bizId: number
You can’t perform that action at this time.
0 commit comments