# Conflicts:
#	src/views/cases/detail.vue
main
SWX\10484 4 days ago
commit 5d267e1cf2
  1. 21
      src/views/cases/detail.vue

@ -21,14 +21,14 @@
scope.row.bucket_compress +
'/' +
scope.row.object_compress
" fit="cover" style="width: 100px; height: 80px; pointer-events: none" />
" fit="cover" style="width: 125px; height: 125px; pointer-events: none" />
<div v-else class="video-thumb-wrapper">
<video :src="$store.state.user.netConfig.MINIO_ENDPOINT_HTTPS +
scope.row.bucket_compress +
'/' +
scope.row.object_compress
" preload="metadata"
style="width: 100px; height: 80px; object-fit: cover; pointer-events: none" />
style="width: 125px; height: 80px; object-fit: cover; pointer-events: none" />
<i class="el-icon-video-play video-play-icon"></i>
</div>
</div>
@ -222,7 +222,7 @@
item.object_compress
"
fit="cover"
style="width: 100px; height: 80px"
style="width: 125px; height: 125px"
/>
<div v-else class="video-thumb-wrapper">
<video
@ -232,7 +232,7 @@
item.object_compress
"
preload="metadata"
style="width: 100px; height: 80px; object-fit: cover; pointer-events: none"
style="width: 125px; height: 125px; object-fit: cover; pointer-events: none"
/>
<i class="el-icon-video-play video-play-icon"></i>
</div>
@ -750,8 +750,21 @@ export default {
async handleFileChange(event) {
const files = event.target.files;
if (!files || files.length === 0) return;
//
const imageExtensions = ['.bmp', '.png', '.jpg'];
//
const videoExtensions = ['.mp4'];
const allowedExtensions = [...imageExtensions, ...videoExtensions];
try {
for (const file of files) {
//
const fileName = file.name.toLowerCase();
const ext = fileName.substring(fileName.lastIndexOf('.'));
if (!allowedExtensions.includes(ext)) {
this.$modal.msgError(`文件类型不支持: ${file.name},仅支持图片和视频格式`);
continue;
}
await this.uploadImageToMinIO(file);
}
} catch (error) {

Loading…
Cancel
Save