chenken 7 жил өмнө
parent
commit
0309864127
1 өөрчлөгдсөн 10 нэмэгдсэн , 3 устгасан
  1. 10 3
      src/views/index.vue

+ 10 - 3
src/views/index.vue

@@ -80,9 +80,16 @@
 					this.photoList.push(photos.files[i]);
 				}
 				this.allNum = this.photoList.length;
+				var _this = this;
 				if(this.allNum > this.photoQuantityLimit){
-					alert("单次上传文件数量不能大于"+this.photoQuantityLimit+",当前数量为"+this.allNum);
-	    			photos.files = null;
+					this.$alert('单次上传文件数量不能大于'+this.photoQuantityLimit+',当前数量为'+this.allNum, '提示', {
+		        		showClose:false,
+		                confirmButtonText:'确定',
+		                callback: action => {
+		                    _this.init();
+	    					photos.files = null;
+		                }
+		            })
 					return;
 				}
 				//初始化this.concurrency个到photoLine中,开始处理
@@ -90,7 +97,7 @@
 		    	for(var i = 0;i<this.photoLine.length;i++){
 		    		this.processStudentPhoto(this.photoLine[i]);
 		    	}
-                var _this = this;
+                
                 /**
                  * 启动检查,看photoLine中是否有已完成的,如果有,从photoList中取出第一个将其替换
                  * 队列中一直保持this.concurrency个正在处理的照片