upper attachment-selector to lib

This commit is contained in:
Timi
2026-10-21 16:24:00 +08:00
parent e40c912dd9
commit c870bcdd39
43 changed files with 678 additions and 1663 deletions
+5 -40
View File
@@ -155,16 +155,12 @@
</t-form-item>
<div class="photo-part">
<media-selector
<attachment-selector
title="登记事件照片"
:required="selectedRequiredPhotoEventList.length > 0"
v-model="photoList"
v-model:photo-items="photoItemList"
:edit-mode="true"
:loading="isPhotoUploading"
@add="selectPhotoFile"
@capture-photo="capturePhoto"
@capture-video="captureVideo"
v-model:items="photoItemList"
:busy="isPhotoUploading"
@select="handleRecordPhotoSelected($event.files)"
/>
</div>
</t-form>
@@ -213,30 +209,6 @@
/>
</div>
</t-popup>
<input
ref="recordPhotoInputRef"
class="file-input"
type="file"
accept="*/*"
multiple
@change="handleRecordPhotoSelected"
>
<input
ref="recordPhotoCameraInputRef"
class="file-input"
type="file"
accept="image/*"
capture="environment"
@change="handleRecordPhotoSelected"
>
<input
ref="videoInputRef"
class="file-input"
type="file"
accept="video/*"
capture="environment"
@change="handleRecordPhotoSelected"
>
</div>
<t-popup v-model="registeredAtPickerVisible" placement="bottom">
<t-date-time-picker
@@ -264,7 +236,7 @@ import CustomerList from "@/components/CustomerList.vue";
import CustomerProfileCard from "@/components/CustomerProfileCard.vue";
import CustomerSelector from "@/components/CustomerSelector.vue";
import EventOptionSelector from "@/components/EventOptionSelector.vue";
import MediaSelector from "@/components/mediaSelector/MediaSelector.vue";
import AttachmentSelector from "@/components/attachmentSelector/AttachmentSelector.vue";
import EventSelector from "@/components/EventSelector.vue";
import { useEventRecordPhoto } from "@/pages/event/component/useEventRecordPhoto";
import type { Customer } from "@/types/Customer";
@@ -581,15 +553,8 @@ function validateNumberValueList(): boolean {
// ---------- 照片 ----------
const {
recordPhotoInputRef,
recordPhotoCameraInputRef,
videoInputRef,
photoItemList,
isPhotoUploading,
photoList,
capturePhoto,
selectPhotoFile,
captureVideo,
handleRecordPhotoSelected,
setExistingPhotoList,
buildTempFileIdList,