Bladeren bron

检测报告

twt 2 weken geleden
bovenliggende
commit
aab237b6ea
1 gewijzigde bestanden met toevoegingen van 58 en 19 verwijderingen
  1. 58 19
      pages/user/reportUni.vue

+ 58 - 19
pages/user/reportUni.vue

@@ -133,18 +133,24 @@
 								<view class="car-report-item-info">
 									<view v-if="item.SectionType===0">
 
-										<view class="nameBox" v-for="(item2,index) in item.value" :key="index">
-
-											<view class="contentB2">
-												<view class="leftName">{{item2.ItemName}}:</view>
-												<view v-if="item2.Value" class="itemValue">{{item2.Value}}</view>
-
-											</view>
-											<view class="kuang"
-												:class="{'report-color-red':item2.ValueType===3,'report-color-yellow':item2.ValueType===2}">
-												{{item2.ValueType===3?'急需处理':item2.ValueType===2?'密切关注':'状态良好'}}</view>
-                                             <view class="seeImg " v-if="item2.photoPath" @click="seeImg(item2.photoPath)">查看图片</view>
-										    
+										<view class="" v-for="(item2,index) in item.value" :key="index">
+                                           <view class="nameBox">
+											   <view class="contentB2">
+											   	<view class="leftName">{{item2.ItemName}}:</view>
+											   	<view v-if="item2.Value" class="itemValue">{{item2.Value}}</view>
+											   
+											   </view>
+											   <view class="kuang"
+											   	:class="{'report-color-red':item2.ValueType===3,'report-color-yellow':item2.ValueType===2}">
+											   	{{item2.ValueType===3?'急需处理':item2.ValueType===2?'密切关注':'状态良好'}}</view>
+										   </view>
+											
+                                          <!--   <view class="seeImg " v-if="item2.photoPath" @click="seeImg(item2.photoPath)">查看图片</view> -->
+										    <view class="imgLineBox" v-if="item2.photoPath">
+												   <view class="imgView" v-for="(imgurl,imgIndex) in item2.photoPath.split(',')">
+														<img class="lineImg" :src="imgurl" alt="" @click="seeImg3(item2.photoPath,imgIndex)">
+												   </view>
+										    </view>
 										</view>
 										<view class="contentB">
 											<view class="leftT">备注:</view>
@@ -154,7 +160,12 @@
 											<view class="leftT">说明:</view>
 											<view v-if="item.Describe" class="contentStr">{{item.Describe}}</view>
 										</view>
-										<view class="seeImg2" v-if="item.value[0].photoAllPath" @click="seeImg(item.value[0].photoAllPath)">查看图片</view>
+										<view class="imgLineBox" v-if="item.value[0].photoAllPath">
+											   <view class="imgView"  v-for="(imgurl,imgIndex) in item.value[0].photoAllPath.split(',')">
+													<img class="lineImg" :src="imgurl" alt="" @click="seeImg3(item.value[0].photoAllPath,imgIndex)">
+											   </view>
+										</view>
+										<!-- <view class="seeImg2" v-if="item.value[0].photoAllPath" @click="seeImg(item.value[0].photoAllPath)">查看图片</view> -->
 									</view>
 									<view class="warning-lamp" v-if="item.SectionType===2">
 
@@ -173,7 +184,12 @@
 										<view class="car-report-rv-buttom"></view>
 									</view>
 									<view v-if="item.SectionType===2||item.SectionType===1">
-										<view class="seeImg" v-if="item.photoPath.length" @click="seeImg2(item.photoPath)">查看图片</view>
+										<view class="imgLineBox" v-if="item.photoPath">
+										   <view class="imgView"  v-for="(imgurl,imgIndex) in item.photoPath">
+												<img class="lineImg" :src="imgurl" alt="" @click="seeImg2(item.photoPath,imgIndex)">
+										   </view>
+										</view>
+										<!-- <view class="seeImg" v-if="item.photoPath.length" @click="seeImg2(item.photoPath)">查看图片</view> -->
 									</view>
 									<view class="video-button carjcvideo-button" v-if="item.VideoName&&!item.showVideo">
 										<view class="video-play" @click="ckVideo(item)"></view>
@@ -186,8 +202,8 @@
 										</view> -->
 										<view v-if="item.VideoPath.length>0" class="image-list-item " >
 											<view  v-for="(vi,vindex) in item.VideoPath" class="videoLine">
-											<!-- 	<video :src="vi" style="width: 160rpx;height: 160rpx;" ></video> -->
-												<img src="http://dmsphoto.66km.com.cn/thFiles/C8C06AA1-7775-4C23-9454-38C64E004DA8.png" alt="" style="width: 160rpx;height: 160rpx;">
+												<video :src="vi" style="width: 160rpx;height: 160rpx;" playsinline webkit-playsinline></video> 
+												<!-- <img src="http://dmsphoto.66km.com.cn/thFiles/C8C06AA1-7775-4C23-9454-38C64E004DA8.png" alt="" style="width: 160rpx;height: 160rpx;"> -->
 												<view class="videoLineZz" @click="showVideoFN(vi)"></view>
 											</view>
 											
@@ -257,7 +273,7 @@
 		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id;
-			//this.id='C108AADE-9C50-43AE-A152-9A7C6E9BD7F4'//'761BD9FD-B5B4-468D-A136-3DB2AF68A203'
+			//this.id='C44E8DD8-1793-4544-BC25-AE2C77340ED4'//'761BD9FD-B5B4-468D-A136-3DB2AF68A203'
 			this.userInfo = this.$store.state.userInfo;
 			this.ext = this.$common.getExtStoreId();
 			if (this.userInfo) {
@@ -280,10 +296,10 @@
 
 		},
 		methods: {
-			seeImg2(arr){
+			seeImg2(arr,index){
 				uni.previewImage({
 					urls: arr,
-					//current: index,
+					current: index,
 					longPressActions: {
 						itemList: ['发送给朋友', '保存图片', ],
 						success: function(data) {
@@ -293,6 +309,20 @@
 					}
 				});
 			},
+			seeImg3(img,index){
+					var arr=img.split(',')
+					uni.previewImage({
+						urls: arr,
+						current: index,
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', ],
+							success: function(data) {
+							},
+							fail: function(err) {
+							}
+						}
+					});
+			},
 			showVideoFN(url){
 				console.log(url)
 				this.videoUrl=url
@@ -1311,4 +1341,13 @@
 		font-size: 26rpx;
 		color: #1677FF;line-height: 40rpx;
 	}
+	.imgLineBox{
+		display: flex;
+	}
+	.lineImg{
+		width: 160rpx;height: 160rpx;
+	}
+	.imgView{
+		margin-right: 20rpx;
+	}
 </style>