| | |
| | | </u-input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="附件" prop="storageBlobDTO" labelWidth="80"> |
| | | <u-form-item label="附件" prop="commonFileListDTO" labelWidth="80"> |
| | | <view class="upload-container"> |
| | | <ImageUpload |
| | | v-model="form.storageBlobDTO" |
| | | v-model="form.commonFileListDTO" |
| | | :limit="10" |
| | | :fileSize="50" |
| | | :fileType="['jpg', 'jpeg', 'png', 'mp4', 'mov']" |
| | | :maxVideoDuration="60" |
| | | :statusType="0" |
| | | @update:modelValue="handleStorageBlobUpdate" |
| | | @update:modelValue="handleFileListUpdate" |
| | | /> |
| | | </view> |
| | | </u-form-item> |
| | |
| | | scannerName: '', |
| | | scannerId: '', |
| | | scanTime: '', |
| | | storageBlobDTO: [], |
| | | commonFileListDTO: [], |
| | | qrCode: { |
| | | id: '' |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | // 处理storageBlobDTO数据更新 |
| | | const handleStorageBlobUpdate = (value) => { |
| | | form.storageBlobDTO = value || [] |
| | | // 处理commonFileListDTO数据更新 |
| | | const handleFileListUpdate = (value) => { |
| | | form.commonFileListDTO = value || [] |
| | | } |
| | | |
| | | // 获取当前位置 |
| | |
| | | form.deviceName = row.deviceName || '' |
| | | form.location = row.location || '' |
| | | form.qrCodeId = row.qrCodeId |
| | | form.storageBlobDTO = [] |
| | | form.commonFileListDTO = [] |
| | | console.log('弹框表单数据:', form) |
| | | |
| | | // 强制更新视图 |
| | |
| | | scannerName: form.scannerName, |
| | | scannerId: form.scannerId, |
| | | scanTime: form.scanTime, |
| | | storageBlobDTO: form.storageBlobDTO.map(file => ({ |
| | | id: file.id, // 添加id字段 |
| | | commonFileListDTO: form.commonFileListDTO.map(file => ({ |
| | | id: file.id, |
| | | url: file.url, |
| | | bucketFilename: file.bucketFilename || file.name, |
| | | downloadUrl: file.downloadUrl || file.url, |