dedsudiyu 8 달 전
부모
커밋
4a08fe112c
4개의 변경된 파일99개의 추가작업 그리고 100개의 파일을 삭제
  1. 1 1
      api/request/config.js
  2. 84 97
      pages_manage/views/emergencyEvacuationBig.vue
  3. 5 1
      pages_manage/views/laboratory/infoPage.vue
  4. 9 1
      pages_manage/views/laboratory/videoPlayer.vue

+ 1 - 1
api/request/config.js

@@ -1,6 +1,6 @@
 const config = {
 	// base_url: 'http://192.168.1.43/api', //43服务器
-	//base_url: 'http://192.168.1.8/api',//1.8服务器
+	base_url: 'http://192.168.1.8/api',//1.8服务器
 	// base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波

+ 84 - 97
pages_manage/views/emergencyEvacuationBig.vue

@@ -108,12 +108,14 @@
 					</view>
 				</view>
 				<!-- 视频部分 -->
-				<view class="video-max-box" v-if="urlList[0]">
-					<video v-for="(item,index) in urlList" :key="index" ref="videoRef" :src="item.url" :poster="videoCover"
-						:custom-cache='false' :autoplay="true" :controls="true" :enable-danmu="false" :muted="true"
-						:show-fullscreen-btn="true" :show-center-play-btn="false" :show-play-btn="false"
-						@error="videoErrorCallback">
-					</video>
+				<!-- <view class="video-max-box">
+				</view> -->
+				<view class="device-type">
+					<view @click="getVideo()">
+						<img src="@/pages_manage/images/icon_xq_spjk.png">
+						<view>视频监控</view>
+						<img src="@/pages_manage/images/icon_wdwg_gd.png">
+					</view>
 				</view>
 				<view class="bottom-button-box">
 					<view class="voice" @click="shadeTypeClick()">语音广播</view>
@@ -158,10 +160,7 @@
 	import $mqtt from '@/utils/mqtt.min.js';
 	import {
 		textParseUrlIps,
-		laboratoryInfo,
-		getCameraByFloor,
 		getDeviceListBySub,
-		GetStartList,
 		firedeviceStatus,
 		firedeviceStart,
 		firedeviceCancel,
@@ -210,8 +209,6 @@
 				floorId: "",
 				//实验室
 				fjListArray: [],
-				//视频数据
-				urlList: [],
 				//接收参数
 				subId: "",
 				subName: "",
@@ -318,7 +315,6 @@
 			backButton() {
 				let self = this;
 				this.$set(this, 'pageType', 1);
-				this.$set(this, 'urlList', []);
 				this.laboratoryBigViewGetBuildByBigView();
 			},
 			//结束预案
@@ -344,6 +340,26 @@
 					}
 				});
 			},
+			//获取视频数据
+			getVideo(){
+				if (!controlsRestrictVerify('subVideo')) {
+					uni.showToast({
+						title: '没有相关操作权限,请联系管理员',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				let obj = {
+					type:5,
+					floorId:this.floorId,
+					subId:this.subId,
+				}
+				uni.navigateTo({
+						url: '/pages_manage/views/laboratory/videoPlayer?item='+encodeURIComponent(JSON.stringify(obj))
+				});
+			},
 			async closeRiskPlan() {
 				console.log('this.groupId',this.groupId);
 				const {
@@ -520,89 +536,6 @@
 				}];
 				getApp().appMqttOn(1, list);
 			},
-
-			//获取实验室摄像头
-			async laboratoryInfo() {
-
-				let _this = this;
-				const {
-					data
-				} = await laboratoryInfo(_this.itemData.subjectId);
-				if (data.code == 200) {
-					let list = data.data[0];
-					list.labHardwareVOList.forEach(function(item) {
-						if (item.hardwareTypeEnum.enumName == 'VIDEO_MONITOR') {
-							console.log(item.hardwareNUM)
-							_this.videoHardwareNUM.push(item.hardwareNUM)
-						}
-					})
-
-					this.getCameraByFloor();
-
-				}
-			},
-			//获取楼层摄像头列表
-			async getCameraByFloor() {
-				let _this = this;
-				const {
-					data
-				} = await getCameraByFloor({
-					floorId: this.floorId
-				})
-				if (data.code == 200) {
-					if (data.data[0]) {
-						let list = _this.videoHardwareNUM.concat(data.data)
-						let qc = []
-						for (var i = 0; i < list.length - 1; i++) {
-							for (var j = i + 1; j < list.length; j++) {
-								if (list[i] === list[j]) {
-									list.splice(j, 1);
-									j--;
-								}
-							}
-						}
-						this.GetStartList(list);
-					} else {
-						this.GetStartList(_this.videoHardwareNUM);
-					}
-				}
-			},
-			async GetStartList(rows) {
-				console.log(rows)
-				let self = this;
-				if (!rows[0]) {
-					return
-				}
-				let list = "";
-				for (let i = 0; i < rows.length; i++) {
-					list = list + rows[i] + ","
-				}
-				let obj = {
-					page: "1",
-					count: "100",
-					deviceIds: list,
-				};
-				const {
-					data
-				} = await GetStartList(obj)
-				if (data.code == 200) {
-					let list = [];
-					for (let i = 0; i < data.data.length; i++) {
-						let text = uni.getStorageSync('cameraUrl');
-						let url = data.data[i].hls;
-						url = url.split("rtp/");
-						let newUrl = text + 'rtp/' + url[1];
-						let obj = {
-							name: "楼道监控" + (i + 1),
-							id: data.data[i].deviceID,
-							url: newUrl,
-							videoContext: wx.createVideoContext(data.data[i].deviceID)
-						}
-						list.push(obj)
-					}
-					this.urlList = list;
-				}
-			},
 			//点击选择喇叭
 			trumpetClick(index) {
 				this.trumpetList[index].type = !this.trumpetList[index].type
@@ -814,9 +747,7 @@
 				}
 				this.$set(this, 'pageType', 2);
 				this.getDeviceList();
-				//this.laboratoryInfo();
 				this.getRedisEvacuation();
-
 			},
 			//执行疏散
 			async lineEvacuate() {
@@ -1965,5 +1896,61 @@
 			margin: 50rpx auto;
 			border-radius: 20rpx;
 		}
+		
+		.device-type {
+			margin-top:20rpx;
+			border-radius:20rpx;
+			background: #fff;
+			padding: 24rpx 20rpx;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: flex-start;
+			flex-wrap: wrap;
+		
+			>view {
+				//width: 356rpx;
+				height: 60rpx;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				padding-left: 10rpx;
+				padding-right: 10rpx;
+				box-sizing: border-box;
+		
+				>img:nth-of-type(1) {
+					width: 42rpx;
+					height: 42rpx;
+					margin-right: 12rpx;
+				}
+		
+				>view {
+					font-family: PingFang SC;
+					font-weight: 500;
+					font-size: 30rpx;
+					color: #222222;
+					line-height: 60rpx;
+					width: 560rpx;
+				}
+		
+				>img:nth-of-type(2) {
+					width: 24rpx;
+					height: 22rpx;
+				}
+			}
+		
+			>view:nth-child(2n) {
+				border-right: none;
+				padding-left: 20rpx;
+				box-sizing: border-box;
+			}
+		
+			>view:nth-last-child(1) {
+				border-bottom: none;
+			}
+		
+			>view:nth-last-child(2) {
+				border-bottom: none;
+			}
+		}
 	}
 </style>

+ 5 - 1
pages_manage/views/laboratory/infoPage.vue

@@ -114,8 +114,12 @@
 		methods: {
 			goVideoPage(){
 				console.log('视频')
+				let obj = {
+					type:4,
+					subId:this.newData.subId
+				}
 				uni.navigateTo({
-						url: '/pages_manage/views/laboratory/videoPlayer?item='+encodeURIComponent(JSON.stringify(this.newData))
+						url: '/pages_manage/views/laboratory/videoPlayer?item='+encodeURIComponent(JSON.stringify(obj))
 				});
 			},
 			getIotControlData(){

+ 9 - 1
pages_manage/views/laboratory/videoPlayer.vue

@@ -15,7 +15,15 @@
         },
         onLoad(option) {
 					let obj = JSON.parse(decodeURIComponent(option.item))
-					let url = uni.getStorageSync('cameraExtranetAgent')+'?type=4&id='+obj.subId
+					console.log('obj',obj)
+					let url = '';
+					if(obj.type == 4){
+						url = uni.getStorageSync('cameraExtranetAgent')+'?type=4&subId='+obj.subId
+						// url = 'http://192.168.1.10:8080/?type=4&subId='+obj.subId
+					}else if(obj.type == 5){
+						url = uni.getStorageSync('cameraExtranetAgent')+'?type=5&floorId='+obj.floorId+'&subId='+obj.subId
+						// url = 'http://192.168.1.10:8080/?type=5&floorId='+obj.floorId+'&subId='+obj.subId
+					}
 					this.$set(this,'webViewUrl',url);
 					this.$set(this,'pageType',true);
         },