修改公海和询单页面

This commit is contained in:
浅念
2025-07-30 18:50:31 +08:00
parent 1bfbb95bd9
commit ea1dbb7af4
2 changed files with 21 additions and 6 deletions
+18 -3
View File
@@ -58,8 +58,8 @@
</ArtTable>
</div>
</div>
<el-dialog v-model="detailDialogVisible" title="详情" width="400px">
<div v-if="detailRow" v-html="detailRow.desc_collect"></div>
<el-dialog v-model="detailDialogVisible" title="详情">
<div v-if="detailRow" v-html="detailRow.desc_collect" class="detils-content"></div>
</el-dialog>
</template>
@@ -176,14 +176,29 @@
// 用户点击了取消
})
}
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>
<style lang="scss" scoped>
.detils-content {
padding-left: 15px;
img {
max-width: 100% !important;
}
}
.boxshadow {
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 10, 118, 0.1);