11wqe1 1 년 전
부모
커밋
e16580b1d0
1개의 변경된 파일10개의 추가작업 그리고 9개의 파일을 삭제
  1. 10 9
      src/components/pages/test/check/index.vue

+ 10 - 9
src/components/pages/test/check/index.vue

@@ -147,7 +147,7 @@
                     :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
                 </el-tooltip>
                 <span>{{ item.title }}</span>
-								<el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button>
+								<el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title,index)">批量下载附件</el-button>
 								<div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div>
               </div>
               <div class="detail" v-if="item.detail">{{ item.detail }}</div>
@@ -215,7 +215,7 @@
                   </div>
                 </div>
                 <div v-if="
-                    fileLoading
+                    fileLoading[index].bool
                   " class="mask">
                     <div class="progressBox">
                       <div class="lbox">
@@ -930,7 +930,7 @@ export default {
       pdfLoading: false,
       btnDisplay: false,
 
-      fileLoading: false,
+      fileLoading: [],
       fileLoadCount: 0,
       fileLoadNum: 0,
       infoisAllSize: 0,
@@ -1312,6 +1312,7 @@ export default {
             }
             console.log('topictopictopictopic',topic)
             testArray.push(topic)
+            this.fileLoading.push({id:i,bool:false})
           }
           this.testArray = testArray
           this.worksArray = array
@@ -2003,8 +2004,8 @@ export default {
       this.screenWidth = window.innerWidth;
       this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
     },
-		downloadFileType5(fileData,title="附件"){
-      this.fileLoading = true
+		downloadFileType5(fileData,title="附件",index){
+      this.fileLoading[index].bool=true
       this.fileLoadNum = 0
       this.fileLoadCount = 0
 			let data = fileData;
@@ -2033,7 +2034,7 @@ export default {
                 this.fileLoadCount+=1
                 this.infoprogress = parseInt((this.fileLoadCount / this.fileLoadNum) * 100);
                 if (this.fileLoadCount == this.fileLoadNum) {
-                  this.fileLoading = false
+                  this.fileLoading[index].bool=false
                 }
         	  });
            
@@ -2051,7 +2052,7 @@ export default {
             this.infoprogress = parseInt((this.fileLoadCount / this.fileLoadNum) * 100);
 
             if (this.fileLoadCount == this.fileLoadNum) {
-              this.fileLoading = false
+              this.fileLoading[index].bool=false
             }
 					}))
 				}
@@ -2067,7 +2068,7 @@ export default {
               this.fileLoadCount+=1
               this.infoprogress = parseInt((this.fileLoadCount / this.fileLoadNum) * 100);
               if (this.fileLoadCount == this.fileLoadNum) {
-                this.fileLoading = false
+                this.fileLoading[index].bool=false
               }
 						}))
 					}else if(i.urlList.length>1){//有多个文件的
@@ -2082,7 +2083,7 @@ export default {
                 this.fileLoadCount+=1
                 this.infoprogress = parseInt((this.fileLoadCount / this.fileLoadNum) * 100);
                 if (this.fileLoadCount == this.fileLoadNum) {
-                  this.fileLoading = false
+                  this.fileLoading[index].bool=false
                 }
 						  })
 							promises.push(promise)