病例库bug

main
SWX\10484 5 days ago
parent 107a002ead
commit b1f087c99c
  1. 78
      src/views/cases/detail.vue

@ -25,6 +25,11 @@
> >
<el-table-column align="center"> <el-table-column align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div
class="img-wrapper"
@click="handleImageClick(scope.row)"
@dblclick="handleAttachmentClick(scope.row)"
>
<el-image <el-image
:src=" :src="
$store.state.user.netConfig.MINIO_ENDPOINT_HTTPS + $store.state.user.netConfig.MINIO_ENDPOINT_HTTPS +
@ -33,14 +38,9 @@
scope.row.object_compress scope.row.object_compress
" "
fit="cover" fit="cover"
:preview-src-list="[ style="width: 100px; height: 80px; pointer-events: none"
$store.state.user.netConfig.MINIO_ENDPOINT_HTTPS +
scope.row.bucket_compress +
'/' +
scope.row.object_compress,
]"
style="width: 100px; height: 80px"
/> />
</div>
<div class="img-status">上传完成</div> <div class="img-status">上传完成</div>
<el-button <el-button
type="text" type="text"
@ -751,6 +751,19 @@
</el-dialog> </el-dialog>
<!-- 打印预览弹窗 --> <!-- 打印预览弹窗 -->
<UltrasoundReportPrint ref="UltrasoundReportPrintRef" /> <UltrasoundReportPrint ref="UltrasoundReportPrintRef" />
<!-- 图片预览弹窗 -->
<el-dialog
:visible.sync="imagePreviewVisible"
title="影像预览"
width="80%"
top="3vh"
destroy-on-close
>
<div class="image-preview-body">
<img :src="imagePreviewUrl" alt="预览" />
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -872,6 +885,10 @@ export default {
{ required: true, message: "请输入片语内容", trigger: "blur" }, { required: true, message: "请输入片语内容", trigger: "blur" },
], ],
}, },
// ====================== ======================
imagePreviewVisible: false,
imagePreviewUrl: "",
imageClickTimer: null,
}; };
}, },
created() { created() {
@ -1000,15 +1017,35 @@ export default {
} }
}, },
handleAttachmentClick(row) { handleAttachmentClick(row) {
//
if (this.imageClickTimer) {
clearTimeout(this.imageClickTimer);
this.imageClickTimer = null;
}
row.showInDoc = 1; row.showInDoc = 1;
}, },
// 300ms
handleImageClick(row) {
if (this.imageClickTimer) {
clearTimeout(this.imageClickTimer);
this.imageClickTimer = null;
return;
}
this.imageClickTimer = setTimeout(() => {
this.imageClickTimer = null;
this.imagePreviewUrl =
this.$store.state.user.netConfig.MINIO_ENDPOINT_HTTPS +
row.bucket_compress +
"/" +
row.object_compress;
this.imagePreviewVisible = true;
}, 300);
},
handleDeleteImg(row, index) { handleDeleteImg(row, index) {
this.$modal this.$modal
.confirm("确定删除该影像?") .confirm("确定删除该影像?")
.then(function () {
return this.form.attachment.splice(index, 1);
})
.then(() => { .then(() => {
this.form.attachment.splice(index, 1);
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => {});
@ -1527,4 +1564,25 @@ export default {
align-self: center; align-self: center;
flex-shrink: 0; flex-shrink: 0;
} }
//
.image-preview-body {
background: #000;
display: flex;
align-items: center;
justify-content: center;
min-height: 400px;
img {
max-width: 100%;
max-height: 75vh;
object-fit: contain;
}
}
//
.img-wrapper {
display: inline-block;
cursor: pointer;
}
</style> </style>
Loading…
Cancel
Save