update image thumb

This commit is contained in:
Timi
2026-08-22 01:27:45 +08:00
parent e2af521996
commit 3b56de2430
16 changed files with 69 additions and 38 deletions
+4 -1
View File
@@ -151,6 +151,7 @@ import type { Customer } from "@/types/Customer";
import type { EventItem } from "@/types/EventItem";
import type { PointAction } from "@/types/Point";
import { getEventNumberValuePlaceholder, resolveEventNumberValue } from "@/utils/eventValue";
import { getAttachmentReadURL } from "@/utils/attachment";
import { permissionCodes } from "@/utils/permission";
import { loadSourceValueConfig, type SourceValueConfig } from "@/utils/point";
import { compressUploadImage, compressUploadImageList } from "@/utils/imageCompression";
@@ -261,6 +262,7 @@ type CustomerAttachmentType = "PHOTO" | "POINT_CARD" | "OTHER";
type QuickCustomerPhoto = {
attachment?: Attachment;
attachType: CustomerAttachmentType;
previewUrl?: string;
tempFileId?: string;
url: string;
};
@@ -530,7 +532,8 @@ function syncCustomerPhoto(customer?: Customer): void {
.map(item => ({
attachment: item,
attachType: normalizeCustomerAttachmentType(item.attachType),
url: AttachmentAPI.getReadURL(item.id || "")
previewUrl: getAttachmentReadURL(item.id || ""),
url: getAttachmentReadURL(item.id || "", 64)
}));
}
+2 -2
View File
@@ -54,8 +54,8 @@
>
<template #leftIcon>
<t-image
v-if="getEventRecordPhotoURL(item)"
:src="getEventRecordPhotoURL(item)"
v-if="getEventRecordPhotoURL(item, 64)"
:src="getEventRecordPhotoURL(item, 64)"
:alt="item.event?.name || '未知事件'"
fit="cover"
class="record-photo"