twt 1 mese fa
parent
commit
9d6e52c403
1 ha cambiato i file con 83 aggiunte e 2 eliminazioni
  1. 83 2
      pages/index/reportUni.vue

+ 83 - 2
pages/index/reportUni.vue

@@ -143,6 +143,8 @@
 											<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>
 										<view class="contentB">
@@ -165,7 +167,8 @@
 									</view>
 									<view v-if="item.SectionType===1">
 										<view class="car-report-rv">
-											<img :src="item.SectionPic" style="width: 100%; height: 100%;" alt="图片加载失败">
+											<img v-if="item.SectionPic" :src="item.SectionPic" style="width: 100%; height: 100%;" alt="图片加载失败">
+											<img v-else src="http://api.dms.66km.com.cn/static/img/huanshi.png" style="width: 100%; height: 100%;" alt="图片加载失败">
 										</view>
 										<view class="car-report-rv-buttom"></view>
 									</view>
@@ -174,15 +177,35 @@
 										{{item.VideoName}}
 									</view>
 									<view class="image-list">
-										<view class="image-list-item" v-for="(file,index) in item.photoPath"
+										<!-- <view class="image-list-item" v-for="(file,index) in item.photoPath"
 											:key="file.id">
 											<img mode='aspectFit' :src="file"  @click="sphotos(item.photoPath,index)" class="image-list-item-img"/>
+										</view> -->
+										<view v-if="item.VideoPath" class="image-list-item " >
+											<view @click="showVideo(vi)" v-for="(vi,vindex) in item.VideoPath.split(',')" class="videoLine">
+												<!-- <video :src="vi" style="width: 160rpx;height: 160rpx;" ></video> -->
+												<view class="videoLineZz"></view>
+												<img src="http://dmsphoto.66km.com.cn/thFiles/C8C06AA1-7775-4C23-9454-38C64E004DA8.png" alt="" style="width: 160rpx;height: 160rpx;">
+											</view>
+											
+											
 										</view>
 									</view>
+									<!-- <view class="video-button carjcvideo-button" v-if="item.VideoPath&&!item.showVideo2">
+										<view class="video-play" @click="ckVideo2(item)"></view>
+										查看视频
+									</view> -->
 
 									<view class="video-wrapper" v-if="item.showVideo">
 										<video :src="item.VideoURL"></video>
 										<!-- <video-player class="vjs-custom-skin" :options="getPlayerOptions(item.VideoURL)"></video-player> -->
+									</view>
+									<view class="video-wrapper" v-if="item.showVideo2">
+										<view v-for="(vi,vindex) in item.VideoPath.split(',')">
+											<video :src="vi"></video>
+										</view>
+										
+										
 									</view>
 									<view class="car-report-remarks" v-if="item.SectionType&&item.Comment">
 										<p><span>备注:</span>{{item.Comment}} </p>
@@ -209,6 +232,12 @@
 				<image src="../../static/img/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
 			</view>
 		</view>
+		
+		<view class="authorizBox videoZz" v-if="videoUrlShow"  @click="videoUrlShow=false">
+			<view class="videoCont" @click.stop="">
+				<video :src="videoUrl" autoplay></video>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -229,6 +258,8 @@
 				authorizShow: false,
 				code: '',
 				iStatusBarHeight:'',
+				videoUrl:'',
+				videoUrlShow:false,
 			}
 		},
 		onLoad(opt) {
@@ -260,6 +291,27 @@
 
 		},
 		methods: {
+			showVideo(url){
+				this.videoUrl=url
+				this.videoUrlShow=true
+			},
+			seeImg(img){
+				console.log(img)
+				var arr=img.split(',')
+				uni.previewImage({
+					urls: arr,
+					//current: index,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
 			sphotos(arr,index){
 				uni.previewImage({
 					urls: arr,
@@ -312,6 +364,10 @@
 				console.log("点击视频")
 				item.showVideo = !item.showVideo
 			},
+			ckVideo2(item) {
+				console.log("点击视频")
+				item.showVideo2 = !item.showVideo2
+			},
 			getPlayerOptions(url) {
 				return {
 					// videojs options
@@ -354,6 +410,8 @@
 							this.$set(item2, 'name', Object.keys(item2)[0])
 							this.$set(item2, 'value', item2[Object.keys(item2)[0]])
 							this.$set(item2, 'showVideo', false)
+							this.$set(item2, 'showVideo2', false)
+							this.$set(item2, 'VideoPath', item2.value[0].VideoPath)
 							this.$set(item2, 'VideoName', item2.value[0].VideoName)
 							this.$set(item2, 'VideoURL', item2.value[0].VideoURL)
 							this.$set(item2, 'photoPath', item2.value[0].photoPath && item2.value[
@@ -902,6 +960,7 @@
 		position: fixed;
 		top: 0;
 		left: 0;
+		z-index: 11;
 	}
 
 	.authorizCont {
@@ -1226,4 +1285,26 @@
 		font-size: 24rpx;
 		color: #999999;
 	}
+	.videoLine{
+		position: relative;
+	}
+	.videoLineZz{
+		width: 160rpx;height: 160rpx;
+		position: absolute;top: 0;left: 0;
+		z-index: 11;
+	}
+	.videoCont{
+		width: 100vw;
+	}
+	.videoCont video{
+		width: 100vw;
+	}
+	.videoZz{
+		display: flex;
+		align-items: center;
+	}
+	.seeImg{
+		padding-left: 20rpx;font-size: 26rpx;
+		color: #1677FF;line-height: 40rpx;
+	}
 </style>