客户列表 添加公海详情展示

This commit is contained in:
浅念
2025-08-01 10:01:35 +08:00
parent b50f650565
commit 6bfb940881
+29 -1
View File
@@ -116,6 +116,15 @@
<el-table-column prop="created_at" label="创建时间"></el-table-column> <el-table-column prop="created_at" label="创建时间"></el-table-column>
<el-table-column fixed="right" label="操作" width="200px" align="center"> <el-table-column fixed="right" label="操作" width="200px" align="center">
<template #default="scope"> <template #default="scope">
<el-link
type="success"
underline="never"
style="margin-right: 8px"
@click="onDetail(scope.row)"
v-if="hasAuth('crm_customer@show')"
>
<i class="iconfont-sys"> &#xe70f;</i>详情
</el-link>
<el-link <el-link
type="primary" type="primary"
underline="never" underline="never"
@@ -132,7 +141,7 @@
@click="goAddFollow(scope.row)" @click="goAddFollow(scope.row)"
v-if="hasAuth('crm_customer@follow_add')" v-if="hasAuth('crm_customer@follow_add')"
> >
<i class="iconfont-sys">&#xe6bf;</i> 添加跟进 <i class="iconfont-sys">&#xe6bf;</i> 跟进
</el-link> </el-link>
<el-link <el-link
type="danger" type="danger"
@@ -148,6 +157,9 @@
</ArtTable> </ArtTable>
</div> </div>
</div> </div>
<el-dialog v-model="detailDialogVisible" title="详情">
<div v-if="detailRow" v-html="detailRow.desc_collect" class="detils-content"></div>
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -161,6 +173,8 @@
const activeTab = ref('') const activeTab = ref('')
const showMore = ref(false) const showMore = ref(false)
const loading = ref(false) const loading = ref(false)
const detailDialogVisible = ref(false)
const detailRow = ref<any>(null)
const pagination = reactive({ const pagination = reactive({
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
@@ -288,6 +302,20 @@
// 用户点击了取消 // 用户点击了取消
}) })
} }
function processImages(html: string) {
const parser = new DOMParser()
const doc = parser.parseFromString(html, 'text/html')
doc.querySelectorAll('img').forEach((img) => {
img.style.maxWidth = '100%'
img.style.height = 'auto'
})
return doc.body.innerHTML
}
function onDetail(row: any) {
row.desc_collect = processImages(row.desc_collect) // 处理图片
detailRow.value = row
detailDialogVisible.value = true
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">