brand上传多个文件出现bug

This commit is contained in:
李志鹏
2025-10-14 13:32:07 +08:00
parent df6add8814
commit 0240b50a73

View File

@@ -175,7 +175,7 @@ export default defineComponent({
isNoData:false,//如果数据为空就不加载 isNoData:false,//如果数据为空就不加载
isNull:true, isNull:true,
finishTime:'', finishTime:'',
upLoadList:0, uploadCount:0,//上传的图片数量
}) })
const dataDom = reactive({ const dataDom = reactive({
Cropper:null as any, Cropper:null as any,
@@ -184,6 +184,7 @@ export default defineComponent({
loadingDom:null as any, loadingDom:null as any,
}) })
const customRequest = (event:any)=>{ const customRequest = (event:any)=>{
data.uploadCount++;
let new_data = { let new_data = {
file:event.file, file:event.file,
brandId:data.detail.id, brandId:data.detail.id,
@@ -191,7 +192,9 @@ export default defineComponent({
data.isShowMark = true data.isShowMark = true
Https.axiosPost(Https.httpUrls.brandDNAUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then( Https.axiosPost(Https.httpUrls.brandDNAUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
(rv: any) => { (rv: any) => {
data.uploadCount --;
dataDom.fall.clearData() dataDom.fall.clearData()
if(data.uploadCount) return;
data.isShowMark = false data.isShowMark = false
data.isNoData = false data.isNoData = false
data.currentPage = 1 data.currentPage = 1
@@ -201,6 +204,7 @@ export default defineComponent({
} }
).catch((res)=>{ ).catch((res)=>{
// getLibraryList() // getLibraryList()
data.uploadCount --;
data.isShowMark = false data.isShowMark = false
}); });
} }