Bläddra i källkod

图片上传完整提示,修改分页按钮样式

tianhui 3 år sedan
förälder
incheckning
eda866ba31
3 ändrade filer med 35 tillägg och 4 borttagningar
  1. 20 1
      pages/getin/getin.vue
  2. 13 1
      pages/parking/parking.scss
  3. 2 2
      pages/parking/parking.vue

+ 20 - 1
pages/getin/getin.vue

@@ -218,9 +218,28 @@
 				this.timeshow=false;
 			},
 			submit(){
-				this.time = this.confirmTime;
+				let files = [];
+				let that = this;
+				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
+				files = this.$refs.uUpload.lists.filter(val => {
+					return val.progress == 100;
+				});
+				// 如果不需要进行太多的处理,直接如下即可
+				// files = this.$refs.uUpload.lists;
+				files.forEach(function(element) {
+				  that.images.push(element.response.data.url);
+				});
+				if(that.images=='' || that.images==null){
+					this.$refs.uToast.show({
+						title: '需完整上传4张取证照片',
+						type: 'error',
+					})
+				}else{
+					this.time = this.confirmTime;
 				console.log(this.timeList[1].time)
 				this.timeshow=true;
+				}
+				
 				// this.timeList[0].time = this.inTime;
 			},
 			radioGroupChange(){

+ 13 - 1
pages/parking/parking.scss

@@ -99,11 +99,23 @@
 	margin: 10rpx 28rpx;
 }
 .pagesInput{
-	width: 45px;
+	display: flex;
+	width: 120rpx;
 	margin: auto 30rpx;
+	.pagesInput-left{
+		margin-top: 20rpx;
+		margin-right: 4rpx;
+	}
+	.pagesInput-right{
+		margin-top: 20rpx;
+		margin-left: 4rpx;
+	}
 }
 .num{
 	margin: auto 0;
+	.u-size-mini{
+		height: 76rpx;
+	}
 }
 .bottom-btn-wrap{
 	display: flex;

+ 2 - 2
pages/parking/parking.vue

@@ -24,9 +24,9 @@
 		</view>
 		<view class="bottom-btn-wrap">
 			<u-button class="bt1" @click="last(list.pageNum)"><</u-button>
-			<view class="pagesInput"><u-input v-model="pageNum" type="text" :border="true" :clearable="false" /></view>
+			<view class="pagesInput">
+				<view class="pagesInput-left">第</view><u-input v-model="currentPageNum" type="text" :border="true" :clearable="false" /><view class="pagesInput-right">页</view></view>
 			<view class="num">
-			第{{currentPageNum}}页
 			<u-button @click="jump(list.pageNum)" size="mini">跳转</u-button>
 			</view>
 			<u-button class="bt2" @click="next(list.pageNum)">></u-button>