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
+11 -3
View File
@@ -112,7 +112,12 @@
</t-form-item>
<div class="photo-part">
<photo-scroller v-model="photoList" :loading="isPhotoUploading" @add="capturePhoto" />
<photo-scroller
v-model="photoList"
:photo-items="photoItemList"
:loading="isPhotoUploading"
@add="capturePhoto"
/>
</div>
</t-form>
<t-cell-group
@@ -200,6 +205,7 @@ import type { Customer } from "@/types/Customer";
import type { EventItem } from "@/types/EventItem";
import type { EventRecord } from "@/types/EventRecord";
import type { PointAction } from "@/types/Point";
import { getAttachmentReadURL } from "@/utils/attachment";
import { getEventRecordPhotoURL } from "@/utils/eventRecord";
import { getEventNumberValuePlaceholder, resolveEventNumberValue } from "@/utils/eventValue";
import { permissionCodes } from "@/utils/permission";
@@ -218,6 +224,7 @@ const navBarStore = useNavBarStore();
type EditablePhoto = {
attachment?: Partial<Attachment>;
previewUrl?: string;
tempFileId?: string;
url: string;
};
@@ -344,7 +351,7 @@ function getRecordEventName(record: EventRecord): string {
}
function getRecordPhotoURL(record: EventRecord): string {
return getEventRecordPhotoURL(record);
return getEventRecordPhotoURL(record, 64);
}
// ---------- 扫码 ----------
@@ -724,7 +731,8 @@ async function loadRecordForEdit(): Promise<void> {
.filter(item => !!item.id)
.map(item => ({
attachment: item,
url: AttachmentAPI.getReadURL(item.id || "")
previewUrl: getAttachmentReadURL(item.id || ""),
url: getAttachmentReadURL(item.id || "", 64)
}));
await loadRecentRecordList();
}