soft5566 2 سال پیش
والد
کامیت
b8a297609d
1فایلهای تغییر یافته به همراه18 افزوده شده و 4 حذف شده
  1. 18 4
      src/views/myAgent/index.vue

+ 18 - 4
src/views/myAgent/index.vue

@@ -116,11 +116,14 @@
 			</div>
 			</div>
 			<div style="display: flex;">
 			<div style="display: flex;">
 				<div style="text-align: right; font-weight: bold; width: 100px; height: 100px;">视频/图片:</div>
 				<div style="text-align: right; font-weight: bold; width: 100px; height: 100px;">视频/图片:</div>
-				<div v-if="approved_reject_Data.fileInfoList.length > 0">
+				<div v-if="approved_reject_Data.fileInfoList.length > 0 || approved_reject_Data.videoList.length > 0">
 					<viewer :images="fileInfoListImages">
 					<viewer :images="fileInfoListImages">
 						<div style="height: 120px; display: flex; justify-content: center; align-items: center;">
 						<div style="height: 120px; display: flex; justify-content: center; align-items: center;">
 							<img style="width: 110px; height: 110px; margin: 0 2px; border-radius: 5px; max-width: 110px; max-height: 110px; cursor: pointer;"
 							<img style="width: 110px; height: 110px; margin: 0 2px; border-radius: 5px; max-width: 110px; max-height: 110px; cursor: pointer;"
 								v-for="src in approved_reject_Data.fileInfoList" :src="src.url" :key="src.id">
 								v-for="src in approved_reject_Data.fileInfoList" :src="src.url" :key="src.id">
+							<video width="180" height="" v-for="vd in approved_reject_Data.videoList" controls>
+								<source :src="vd" type="video/mp4"></source>
+							</video>
 						</div>
 						</div>
 					</viewer>
 					</viewer>
 				</div>
 				</div>
@@ -210,7 +213,8 @@
 					status: '',
 					status: '',
 					workflowRemark: '',
 					workflowRemark: '',
 					remark: '',
 					remark: '',
-					fileInfoList: []
+					fileInfoList: [],
+					videoList: []
 				}, // 审核 驳回 参数
 				}, // 审核 驳回 参数
 				fileInofImage: [], // 缩略图
 				fileInofImage: [], // 缩略图
 				fileInfoListImages: [], // 滚动图片
 				fileInfoListImages: [], // 滚动图片
@@ -327,10 +331,20 @@
 				this.fileInofImage.push(row.coverImg)
 				this.fileInofImage.push(row.coverImg)
 				this.$set(this.approved_reject_Data, 'workflowRemark', row.workflowRemark)
 				this.$set(this.approved_reject_Data, 'workflowRemark', row.workflowRemark)
 				if (row.fileInfoList.length > 0) {
 				if (row.fileInfoList.length > 0) {
+					var tmpImgList = []
+					var tmpVideoList = []
 					for (var i = 0; i < row.fileInfoList.length; i++) {
 					for (var i = 0; i < row.fileInfoList.length; i++) {
-						this.fileInfoListImages.push(row.fileInfoList[i].url)
+						if (row.fileInfoList[i].url.toLowerCase().endsWith('.mp4')) {
+							tmpVideoList.push(row.fileInfoList[i].url)
+						} else if (!isEmpty(row.fileInfoList[i].url)) {
+							tmpImgList.push(row.fileInfoList[i].url)
+						}
+						this.fileInfoListImages = tmpImgList
 					}
 					}
-					this.$set(this.approved_reject_Data, 'fileInfoList', row.fileInfoList)
+					this.$set(this.approved_reject_Data, 'fileInfoList', tmpImgList)
+					this.$set(this.approved_reject_Data, 'videoList', tmpVideoList)
+					console.log(tmpImgList);
+					console.log(tmpVideoList);
 				} else {
 				} else {
 					this.$set(this.approved_reject_Data, 'fileInfoList', [])
 					this.$set(this.approved_reject_Data, 'fileInfoList', [])
 				}
 				}