Forráskód Böngészése

Merge branch 'master' of http://172.16.90.201:3000/parking/parking_pda

aleyds 3 éve
szülő
commit
45ccc228e0
2 módosított fájl, 40 hozzáadás és 3 törlés
  1. 2 0
      pages/getin/getin.scss
  2. 38 3
      pages/getin/getin.vue

+ 2 - 0
pages/getin/getin.scss

@@ -87,6 +87,8 @@
 }
 .upload-wrap{
 	margin: 42rpx 40rpx;
+	display: flex;
+	flex-wrap: wrap;
 }
 
 .bottom-btn-box{

+ 38 - 3
pages/getin/getin.vue

@@ -53,7 +53,31 @@
 			ref="uUpload"
 			:action="uploadAction" 
 			:show-progress="false" 
-			max-count="4"
+			max-count="1"
+			@on-oversize
+			:source-type="sourceType"
+			upload-text="拍照取证" ></u-upload>
+			<u-upload
+			ref="uUpload1"
+			:action="uploadAction" 
+			:show-progress="false" 
+			max-count="1"
+			@on-oversize
+			:source-type="sourceType"
+			upload-text="拍照取证" ></u-upload>
+			<u-upload
+			ref="uUpload2"
+			:action="uploadAction" 
+			:show-progress="false" 
+			max-count="1"
+			@on-oversize
+			:source-type="sourceType"
+			upload-text="拍照取证" ></u-upload>
+			<u-upload
+			ref="uUpload3"
+			:action="uploadAction" 
+			:show-progress="false" 
+			max-count="1"
 			@on-oversize
 			:source-type="sourceType"
 			upload-text="拍照取证" ></u-upload>
@@ -223,13 +247,24 @@
 				let files = [];
 				let that = this;
 				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
-				files = this.$refs.uUpload.lists.filter(val => {
+				files[0] = this.$refs.uUpload.lists.filter(val => {
+					return val.progress == 100;
+				});
+				files[1] = this.$refs.uUpload1.lists.filter(val => {
 					return val.progress == 100;
 				});
+				files[2] = this.$refs.uUpload2.lists.filter(val => {
+					return val.progress == 100;
+				});
+				files[3] = this.$refs.uUpload3.lists.filter(val => {
+					return val.progress == 100;
+				});
+				
 				// 如果不需要进行太多的处理,直接如下即可
 				// files = this.$refs.uUpload.lists;
 				files.forEach(function(element) {
-				  that.images.push(element.response.data.url);
+					console.log('files',element)
+				  that.images.push(element[0].response.data.url);
 				});
 				if(that.images=='' || that.images==null){
 					this.$refs.uToast.show({