fix(pda): discard failed ordinary photo drafts

This commit is contained in:
2026-10-23 02:39:14 +08:00
parent 51109ac852
commit 81f63e5d26
2 changed files with 34 additions and 0 deletions
+4
View File
@@ -1350,6 +1350,10 @@
this.showToast(type === 'SEAL' ? '带锁码照上传成功,封签号已保存' : '照片已上传并保存', 'success')
} catch (error) {
if (!this.isEvidenceContextActive(contextId, identity)) return
if (type !== 'SEAL') {
this.evidenceFiles = { ...this.evidenceFiles, [type]: (this.evidenceFiles[type] || []).filter(photo => photo.id || photo.localPath !== path) }
this.removeDraftPhoto(type, path)
}
entry.status = 'FAILED'; entry.error = this.remoteFailureMessage(error, '照片上传失败,请重新操作')
this.remoteError = entry.error
} finally { if (this.isEvidenceContextActive(contextId, identity)) { this.evidenceUploading = false; this.evidenceQueueItems = this.evidenceQueueItems.map(item => ({ ...item })) } }