heyang 2 년 전
부모
커밋
ba7a0d1ca4
3개의 변경된 파일1066개의 추가작업 그리고 222개의 파일을 삭제
  1. 553 0
      pages/alarmInfo/alarmInfo.vue
  2. 174 0
      pages/alarmInfo/alarmInfoMonitor.vue
  3. 339 222
      pages/emergencyEvacuationBig.vue

+ 553 - 0
pages/alarmInfo/alarmInfo.vue

@@ -0,0 +1,553 @@
+<!-- 停用 -->
+<template>
+    <view class="alarm">
+		<view class="alarm_t">
+			<view class="alarm_t_t">
+				<img src="@/images/icon_003.png">
+				<text>2022-01-01  14:00:23</text>
+				<text>待处理</text>
+			</view>
+			<view class="alarm_t_b">化学品名称-未领用带离实验室房间,请尽快确认。</view>
+		</view>
+		<view class="alarm_c">
+			<view class="alarm_c_li">
+				<text>位置:</text>
+				<text>实验室名称-楼栋楼层房间号</text>
+			</view>
+			<view class="alarm_c_li">
+				<text>气瓶规格:</text>
+				<text>10L</text>
+			</view>
+			<view class="alarm_c_li">
+				<text>气体余量:</text>
+				<text>10Mpa</text>
+			</view>
+			<view class="alarm_c_li">
+				<text>当前使用人:</text>
+				<text>成双-13666554455</text>
+			</view>
+			<view class="alarm_c_li">
+				<text>气瓶所有人:</text>
+				<text>李妮妮-13256564545</text>
+			</view>
+			<view class="alarm_c_img">
+				<view>报警抓拍:</view>
+				<view>
+					<img src="@/images/icon_01.png">
+					<img src="@/images/icon_01.png">
+					<img src="@/images/icon_01.png">
+					<img src="@/images/icon_01.png">
+					<img src="@/images/icon_01.png">
+					<img src="@/images/icon_01.png">
+				</view>
+			</view>
+		</view>
+		<view class="alarm_b">
+			<view class="alarm_b_l" @click="MonitorBtn()">查看监控</view>
+			<view class="alarm_b_r" @click="voiceBtn()">语音广播</view>
+		</view>
+		<view class="shade-max-big-box" v-if="broadcastType">
+			<view class="null-box" @click="voiceBtn()"></view>
+			<!-- 语音广播-执行疏散 -->
+			<view class="broadcast">
+				<view class="broadcast_t">语音广播<label>选择喇叭位置</label></view>
+				<!-- 按钮部分 -->
+				<view class="trumpet-max-box">
+					<view @click="trumpetClick(index)"
+						class="trumpet-for-box" :class="item.type?'trumpet-color-a':'trumpet-color-b'"
+						v-for="(item,index) in trumpetList" :key="index">
+						<img src="@/images/icon_sskz_zc.png" v-if="!item.type">
+						<img src="@/images/icon_sskz_xz.png" v-if="item.type">
+						{{item.name}}
+					</view>
+				</view>
+				<view class="broadcast_m">
+					<view class="broadcast_m_t" :class="liveType?'broadcast_m_t_back_a':'broadcast_m_t_back_b'" @longpress.stop="recordButton" @touchmove.stop="cancelButton"  @touchend.stop="sendButton">
+						
+						{{liveType?'松开发送':'按住说话'}}
+					</view>
+					<view class="broadcast_m_b" v-if="!liveType">按住说话,录入广播内容</view>
+					<view class="broadcast_m_b" v-if="liveType">松开发送,向上滑动取消发送</view>
+				</view>
+			</view>
+		</view>
+		
+	</view>
+	
+</template>
+
+<script>
+	import { config,} from '@/api/request/config.js'
+    import {getDeviceList,textParseUrlIps} from '@/api/index.js'
+    export default {
+        data() {
+            return {
+				form:{
+				
+				},
+				broadcastType:false,
+				//喇叭数据
+				trumpetList:[],
+				//广播相关
+				liveType:false,
+				sendLock: true, //发送锁,当为true时上锁,false时解锁发送
+				recorderManager : wx.getRecorderManager(),
+				//滑动记录
+				startPoint:{},
+            }
+        },
+        onLoad(option) {
+			this.getDeviceList()
+        },
+        onShow(){
+			
+        },
+		methods:{
+			MonitorBtn(){
+				// uni.navigateTo({
+				//   url:'/pages/alarmInfo/alarmInfoMonitor'
+				// })
+			},
+			voiceBtn(){
+				this.broadcastType = !this.broadcastType
+			},
+			//获取喇叭
+			async getDeviceList(){
+				let obj ={
+					floorId:5,
+					page:1,
+					pageSize:100,
+				};
+				const {data} = await getDeviceList(obj)
+				if(data.code == 200){
+					for(let i=0;i<data.data.length;i++){
+						data.data[i].type = false;
+					}
+					this.$set(this,'trumpetList',data.data)
+				}
+			},
+			//点击选择喇叭
+			trumpetClick(index){
+				this.trumpetList[index].type = !this.trumpetList[index].type
+			},
+			//录制
+			recordButton(e){
+				console.log("按下")
+				let self = this;
+				let num = 0;
+				for(let i=0;i<self.trumpetList.length;i++){
+					if(self.trumpetList[i].type){
+						num++
+					}
+				}
+				if(num == 0){
+					uni.showToast({
+						title: '请选择喇叭',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+					return
+				}
+				this.liveType=true;
+				console.log('录制',e)
+				this.startPoint = e.touches[0];//记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
+				const options = {
+					duration: 10000,
+					sampleRate: 16000,
+					numberOfChannels: 1,
+					encodeBitRate: 48000,
+					format: 'mp3',
+					frameSize: 50
+				}
+				this.recorderManager.start(options);//开始录音
+				this.recorderManager.onStart(() => {
+					console.log('recorder start')
+				})
+				this.recorderManager.onError((res) => {
+					console.log(res);
+				})
+				wx.showToast({
+					title: "正在录音,上划取消发送",
+					icon: "none",
+					duration: 60000//先定义个60秒,后面可以手动调用wx.hideToast()隐藏
+				});
+				this.sendLock = false;//长按时是不上锁的。
+			},
+			//取消
+			cancelButton(e){
+				console.log("移动")
+				let self = this;
+				let num = 0;
+				for(let i=0;i<self.trumpetList.length;i++){
+					if(self.trumpetList[i].type){
+						num++
+					}
+				}
+				if(num == 0){
+					return
+				}
+				this.liveType=false;
+				console.log('取消',e)
+				let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
+				/* if (Math.abs(moveLenght) > 50) {
+					wx.showToast({
+						title: "松开手指,取消发送",
+						icon: "none",
+						duration: 60000
+					});
+					this.sendLock = true;//触发了上滑取消发送,上锁
+				} else {
+					wx.showToast({
+						title: "正在录音,上划取消发送",
+						icon: "none",
+						duration: 60000
+					});
+					this.sendLock = false;//上划距离不足,依然可以发送,不上锁
+				} */
+			},
+			//发送
+			sendButton(e){
+				console.log("松开")
+				let self = this;
+				let num = 0;
+				for(let i=0;i<self.trumpetList.length;i++){
+					if(self.trumpetList[i].type){
+			
+						num++
+					}
+				}
+				if(num == 0){
+					return
+				}
+				this.liveType=false;
+				console.log('发送',e)
+				wx.hideToast();//结束录音、隐藏Toast提示框
+				this.recorderManager.stop();//结束录音
+				this.recorderManager.onStop((res) => {
+					if(!this.sendLock){
+						console.log('1', this.recorderManager)
+						this.uploadImg(res.tempFilePath);
+					}
+					console.log('停止录音', res.tempFilePath)
+					console.log("sendLock",this.sendLock);
+				})
+			},
+			//发送语音
+			async textParseUrlIps(text){
+				let self = this;
+				let newList = [];
+				for(let i=0;i<self.trumpetList.length;i++){
+				  if(self.trumpetList[i].type){
+					let obj = {
+					  sn:self.trumpetList[i].deviceSn,
+					  port:self.trumpetList[i].port,
+					  deviceIp:self.trumpetList[i].deviceIp,
+					  type:"",
+					  name:"",
+					  speed:"",
+					  params:{
+						tid:"",
+						vol:"",
+						urls:[]
+					  }
+					};
+					newList.push(obj);
+				  }
+				}
+				const {data} = await textParseUrlIps(newList,text)
+				if(data.code == 200){
+					uni.showToast({
+						title: '发送成功',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}
+			},
+			
+		}
+        
+	}
+</script>
+
+<style lang="stylus" scoped>
+    .alarm{
+        height:100%;
+        width:100%;
+		display:flex;
+		flex-direction:column;
+		overflow-y:scroll;
+		.alarm_t{
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			background: #fff;
+			.alarm_t_t{
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				height: 80rpx;
+				border-bottom: 1px solid #e0e0e0;
+				>img{
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 22rpx;
+				}
+				>text:nth-of-type(1){
+					width: 586rpx;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 28rpx;
+				}
+				>text:nth-of-type(2){
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FF9C00;
+					line-height: 28rpx;
+				}
+			}
+			.alarm_t_b{ 
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 120rpx;
+			}
+		}
+		.alarm_c{
+			margin: 20rpx;
+			padding:0 16rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			.alarm_c_li{
+				height: 80rpx;
+				display: flex;
+				justify-content: space-between;
+				border-bottom: 1px solid #e0e0e0;
+				>text{
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 80rpx;
+				}
+				>text:nth-of-type(1){}
+				>text:nth-of-type(2){
+					color: #666666;
+				}
+			}
+			.alarm_c_img{
+				display: flex;
+				justify-content: flex-start;
+				margin-top: 30rpx;
+				>view:nth-of-type(1){
+					width: 184rpx;
+					display: inline-block;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 28rpx;
+				}
+				>view:nth-of-type(2){
+					flex: 1;
+					display: flex;
+					justify-content: flex-start;
+					flex-wrap: wrap;
+					>img{
+						width: 150rpx;
+						height: 150rpx;
+						background: #FFFFFF;
+						border-radius: 4rpx;
+						margin-right: 14rpx;
+						margin-bottom: 20rpx;
+					}
+				}
+			}
+			
+		}
+		.alarm_b{
+			width: 650rpx;
+			margin-left: 50rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			line-height: 100rpx;
+			text-align: center;
+			position: fixed;
+			bottom: 20rpx;
+			display: flex;
+			justify-content: flex-start;
+			.alarm_b_l{
+				width: 325rpx;
+				height: 100rpx;
+				background: linear-gradient(-45deg, #FA9901, #F28E26);
+				border-radius: 50rpx 0px 0px 50rpx;
+				
+			}
+			.alarm_b_r{
+				width: 325rpx;
+				height: 100rpx;
+				background: linear-gradient(-35deg, #309CFF, #0183FA);
+				border-radius: 0px 50rpx 50rpx 0px;
+				
+			}
+		}
+		.shade-max-big-box{
+				height:100%;
+				width:100%;
+				position fixed
+				display flex;
+				flex-direction column
+				z-index:10;
+				background :rgba(0,0,0,0.2);
+				.null-box{
+					flex:1;
+				}
+				/* 语音广播-执行疏散 */
+				.broadcast{
+					width: 100%;
+					// height: 532rpx;
+					background: #FFFFFF;
+					border-top-left-radius :20rpx;
+					border-top-right-radius :20rpx
+					padding :22rpx 30rpx 30rpx;
+					box-sizing :border-box;
+					margin-top:20rpx;
+					.broadcast_t{
+						font-size: 30rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						line-height: 30rpx;
+						>label{
+							font-size: 24rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 30rpx;
+							margin-left :16rpx;
+						}
+					}
+					.trumpet-max-box{
+						display :flex;
+						justify-content :flex-start;
+						margin-top :22rpx;
+						flex-wrap: wrap;
+						.trumpet-for-box{
+							display:inline-block;
+							width:200rpx;
+							height:60rpx;
+							line-height:60rpx;
+							font-size:24rpx;
+							text-align center;
+							cursor: pointer;
+							overflow: hidden;
+							border: 1rpx solid #E0E0E0;
+							border-radius:10rpx;
+							color: #E0E0E0;
+							display :flex;
+							justify-content :center;
+							margin-right :20rpx;
+							margin-bottom: 10rpx;
+							>img{
+								width:36rpx;
+								height:34rpx;
+								margin :12rpx 20rpx 0 25rpx;
+							}
+						}
+		
+						.trumpet-color-a{
+							border:1px solid #0183FA;
+							color:#0183FA;
+						}
+						.trumpet-color-b{
+							border:1px solid #CCCCCC;
+							color:#999;
+						}
+					}
+					.broadcast_m{
+						width :100%;
+						.broadcast_m_t{
+							width: 142rpx;
+							height: 142rpx;
+							margin :30rpx 0 0 258rpx;
+							position :relative;
+							font-size: 24rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							line-height: 170rpx;
+							text-align center
+							>img{
+								width: 142rpx;
+								height: 142rpx;
+								position :absolute;
+		
+							}
+							>label{
+								width :100%;
+								font-size: 24rpx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #0183FA;
+								line-height: 24rpx;
+								display :inline-block;
+								text-align :center;
+								position :absolute;
+								top:76rpx;
+							}
+							/* 按下 */
+							.press_color{
+								color: #FFFFFF;
+							}
+							/* 松开 */
+							.slip_color{
+								color: #0183FA;
+							}
+						}
+						.broadcast_m_t_back_a{
+							background:url(@/images/icon_sskz_skfs.png);
+							background-size 100%
+							color: #FFFFFF;
+						}
+						.broadcast_m_t_back_b{
+							background:url(@/images/icon_sskz_azsh.png);
+							background-size 100%
+							color: #0183FA;
+						}
+						.broadcast_m_b{
+							font-size: 24rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 24rpx;
+							text-align center;
+							margin-top :14rpx;
+						}
+					}
+					/* 疏散按钮 */
+					.evacuation-button-box{
+						width:650rpx;
+						height:100rpx;
+						background #0183FA
+						color:#fff;
+						text-align center;
+						line-height:100rpx;
+						font-size:28rpx;
+						margin:88rpx auto 0;
+						border-radius:20rpx;
+					}
+				}
+			}
+				
+	}
+	
+	/deep/.input-value-border{
+		display :none !important;
+	}
+</style>

+ 174 - 0
pages/alarmInfo/alarmInfoMonitor.vue

@@ -0,0 +1,174 @@
+<!-- 停用 -->
+<template>
+    <view class="monitor">
+		<view class="monitor_n">
+			<scroll-view class="scroll1" scroll-x="true">
+					<view :class="currentTab==index ? 'select' : 'select1'" v-for="(item,index) in barNameList" :key="index" :data-current="index" @click="ontabtap(item,$event)">
+						{{item.name}}
+					</view>
+			</scroll-view>
+
+			<view class="monitor_n_b">
+				<video
+				    v-for="(item,index) in urlList" :key="index" :id="urlList.id" :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>
+		</view>
+	</view>
+	
+</template>
+
+<script>
+	import { config,} from '@/api/request/config.js'
+    import {jinanGetStartList} from '@/api/index.js'
+    export default {
+        data() {
+            return {
+				videoCover:uni.getStorageSync('videoCover'),
+				currentTab: 0,
+				form:{
+				
+				},
+				urlList:[],
+				barNameList:[
+					{
+						name:'楼道监控1',
+					},
+					{
+						name:'实验室监控1',
+					},
+					{
+						name:'实验室监控1',
+					},
+					{
+						name:'实验室监控1',
+					},
+					{
+						name:'实验室监控1',
+					},
+					{
+						name:'实验室监控1',
+					},
+				],
+				
+            }
+        },
+        onLoad(option) {
+			this.jinanGetStartList();
+        },
+        onShow(){
+			
+        },
+		methods:{
+			//点击tab切换
+			ontabtap:function(item,e) {
+				var _this = this;
+				if (this.currentTab === e.target.dataset.current) {
+					return false;
+				} else {
+					this.currentTab = e.target.dataset.current
+				}
+				// this.hardware.forEach(function(item,index){
+				// 	if(data.id==item.id){
+				// 	  _this.jinanGetStartList(_this.hardwareNUM[index])
+				// 	}
+				// })
+				
+			},
+			//查询摄像头地址(交大)
+			async jinanGetStartList(deviceIds){
+			  let obj = {
+				page:'1',
+				count:'1',
+				//deviceIds:deviceIds
+				deviceIds:'4401020049200000000100209'
+			  };
+			  const {data} = await jinanGetStartList(obj);
+			  if(data.code == 200){
+				let list = [];
+				for(let i=0;i<data.data.length;i++){
+				  let text = 'https://lab.sxitdlc.com/jinandaxue/stream/';
+				  let url = data.data[i].result.body.data.hls;
+				  url = url.split("rtp/");
+				  let newUrl = text+'rtp/'+url[1];
+				  let obj = {
+					id:data.data[i].result.body.data.deviceID,
+					url:newUrl,
+				  }
+				  list.push(obj)
+				  console.log("obj",obj)
+				}
+				this.urlList = list;
+			  }
+			},
+		},
+	
+	}
+</script>
+
+<style lang="stylus" scoped>
+    .monitor{
+        height:100%;
+        width:100%;
+		display:flex;
+		flex-direction:column;
+		.monitor_n{
+			width:710rpx;
+			margin: 20rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			padding: 20rpx 22rpx 40rpx;
+			box-sizing: border-box;
+			.scroll1 {
+					width: 100%;
+					white-space: nowrap;
+					border-bottom: 1px solid #e0e0e0;
+			 
+					& view {
+						white-space: normal;
+						display: inline-block;
+						height: 60rpx;
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						line-height: 60rpx;
+						margin-right: 34rpx;
+					}
+					& view:first-child:before {
+						display: none;
+					}
+			 
+					.select {
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #0183FA;
+						line-height: 60rpx;
+					}
+			 
+					.select1 {
+						color: #333333;
+					}
+				}
+			.monitor_n_b{
+				width: 666rpx;
+				height: 347rpx;
+				margin-top: 16rpx;
+				overflow-y scroll;
+				video{
+				  width:666rpx;
+				  height:347rpx;
+				}
+			}
+		}
+	}	
+	/deep/.input-value-border{
+		display :none !important;
+	}
+</style>

+ 339 - 222
pages/emergencyEvacuationBig.vue

@@ -6,32 +6,38 @@
 				<view class="picker-max-box">
 					<view class="picker-title-box">
 						<view></view>
-						<view>所属学院</view>
-					</view>
-					<view class="picker-min-box" style="background:#f5f5f5;">
-						<view>{{collegeArray[deptIndex].name}}</view>
-						<img src="@/images/icon_06.png">
+						<view>学院楼栋</view>
 					</view>
+					<picker @change="buildingChange"
+						:range-key="'label'" :value="value" :range="buildingList">
+						<view class="picker-min-box">
+							<view>{{buildingName?buildingName:'请选择学院楼栋'}}</view>
+							<img src="@/images/icon_06.png">
+						</view>
+					</picker>
 				</view>
 				<view class="picker-max-box">
 					<view class="picker-title-box">
 						<view></view>
-						<view>楼层楼栋</view>
-					</view>
-					<view class="picker-min-box" style="background:#f5f5f5;">
-						<view>{{deptArray[deptIndex].name}}</view>
-						<img src="@/images/icon_06.png">
+						<view>楼层</view>
 					</view>
+					<picker @change="floorChange" :disabled="!buildingId"
+						:range-key="'name'" :value="id" :range="floorList">
+						<view class="picker-min-box">
+							<view>{{floorName?floorName:'请选择楼层'}}</view>
+							<img src="@/images/icon_06.png">
+						</view>
+					</picker>
 				</view>
 				<view class="picker-max-box">
 					<view class="picker-title-box">
 						<view></view>
 						<view>实验室</view>
 					</view>
-					<picker @change="fjListChange"
+					<picker @change="fjListChange" :disabled="!floorId"
 						:range-key="'subjectName'" :value="id" :range="fjListArray">
 						<view class="picker-min-box">
-							<view>{{fjListIndex?fjListArray[fjListIndex].subjectName:'请选择实验室'}}</view>
+							<view>{{subName?subName:'请选择实验室'}}</view>
 							<img src="@/images/icon_06.png">
 						</view>
 					</picker>
@@ -57,10 +63,10 @@
 				<!-- 头部 -->
 				<view class="evacuation-title-box">
 					<view class="evacuation-title-name-box">{{subName}}</view>
-					<view class="site"><img src="@/images/icon_14.png">安全学院 环境与气象研究所</view>
+					<view class="site"><img src="@/images/icon_14.png">{{address}}</view>
 				</view>
 				<!-- 视频监控-选择疏散路径 -->
-				<view class="monito">
+				<!-- <view class="monito">
 					<view class="monito_li">
 						视频监控
 						<view class="monito_li_r monito_li_r_text" @click="goVideo()">查看监控<img src="@/images/icon_04.png"></view>
@@ -77,7 +83,7 @@
 							</picker>
 						</view>
 					</view>
-				</view>
+				</view> -->
 				<!-- 滚动部分 -->
 				<!-- <view class="evacuation-scroll-box">
 					<view :class="videoIndex == index?'scroll-box-color':''"
@@ -112,10 +118,10 @@
 						</view>
 						</view>
 					<view class="evacuation-map-box">
-						<view class="evacuation-map-big-box">
+						<view class="evacuation-map-big-box" :class="floorId==5?'map-1':(floorId==6?'map-2':(floorId==7?'map-3':''))">
 							<view class="evacuation-map-min-for-box" :class="subId == item.subjectId?'evacuation-map-min-for-box-color':''"
 							v-for="(item,index) in fjList" :key="index">{{item.room}}</view>
-							<img class="map-min-img" src="@/images/Version2.3/icon_sjt.gif" v-show="lightList[0].type">
+							<img class="map-min-img" src="@/images/Version2.3/icon_zjt.gif" v-show="lightList[0].type">
 							<img class="map-min-img" src="@/images/Version2.3/icon_yjt.gif" v-show="lightList[1].type">
 							<img class="map-min-img" src="@/images/Version2.3/icon_zjt.gif" v-show="lightList[2].type">
 							<img class="map-min-img" src="@/images/Version2.3/icon_yjt.gif" v-show="lightList[3].type">
@@ -128,7 +134,7 @@
 				<view class="video-max-box" v-if="urlList[0]">
 					<video
 						v-for="(item,index) in urlList" :key="index" :id="urlList.id" :src="item.url"
-            :poster="videoCover"
+						poster="http://lab.sxitdlc.com:9300/statics/logo/logo.png"
 						: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"
@@ -178,21 +184,24 @@
 
 <script>
     import { config } from '@/api/request/config.js'
-    import { lablayout,evacuate,closure,lineEvacuate,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,jinanGetStartList,nanhuGetStartList,lineEvacuateTow,laboratoryInfo} from '@/api/index.js'
+    import { lablayout,evacuate,closure,lineEvacuate,getRedis,getDeviceList,textParseUrlIps,
+	getCameraByFloor,jinanGetStartList,nanhuGetStartList,wenchangGetStartList,lineEvacuateTow,treeselectByUser,getBuilding} from '@/api/index.js'
     export default {
         data() {
             return {
-              videoCover:uni.getStorageSync('videoCover'),
 				//页面状态
 				pageType:"",
-				//学院
-				collegeArray:[{name:"环境学院-祈福楼",id:"113"}],
-				//楼栋
-				deptArray:[{name:"环境与气象研究所",id:"137"}],
 				deptIndex:0,
+				//院系楼栋数据
+				buildingList:[],
+				buildingName:"",
+				buildingId:"",
+				//楼层数据
+				floorList:[],
+				floorName:"",
+				floorId:"",
 				//实验室
 				fjListArray:[],
-				fjListIndex:"",
 				//疏散方向
 				buttonArray:[
 					{name:"向左疏散",id:"1"},
@@ -251,29 +260,139 @@
 					name:'',
 				},
 				broadcastType:false,
-				videoHardwareNUM:[],//实验室和楼道摄像头编码
+				address:"",
 			}
 		},
         onLoad(option) {
+			this.treeselectByUser(option);
+			this.getAppExitLine();
+			getApp().watch(this.getMqttLineData,'lineData');
 			let self = this;
 			//判断入口(执行疏散)
-			if(option.item){
-				let item = JSON.parse(decodeURIComponent(option.item));
-				this.subId = item.subId;
-				this.title = item.title;
-				this.type = item.type;
-				this.evacuateTwo();
-			}else{
-				//判断入口(首页按钮)
-				this.getRedis();
-			}
 		},
 		onShow(){
-			this.getAppExitLine();
-			this.lablayout();
-            getApp().watch(this.getMqttLineData,'lineData');
+			// this.lablayout();
+			// this.getCameraByFloor();
 		},
 		methods: {
+			//根据账户信息查询学院楼栋数据
+			async treeselectByUser(option){
+				const {data} = await treeselectByUser()
+				let list = [];
+				for(let i=0;i<data.data.length;i++){
+					for(let o=0;o<data.data[i].children.length;o++){
+						let obj = {
+							label:data.data[i].label+'-'+data.data[i].children[o].label,
+							value:data.data[i].children[o].id,
+						}
+						list.push(obj);
+						// if(i==0&&o==0){
+						// 	this.$set(this,'buildingId',obj.value);
+						// 	this.$set(this,'deptId',obj.value);
+						// 	this.$set(this,'buildingName',obj.label);
+						// }
+					}
+				}
+				this.$set(this,'buildingList',list);
+				this.$set(this,'buildingName',"");
+				this.$set(this,'buildingId',"");
+				this.$set(this,'deptId',"");
+				this.$set(this,'floorList',[]);
+				this.$set(this,'floorName',"");
+				this.$set(this,'floorId',"");
+			    this.$set(this,'fjListArray',[]);
+				this.$set(this,'subName',"");
+				this.$set(this,'subId',"");
+				// this.getBuilding(this.buildingId);
+				if(option.item){
+					let item = JSON.parse(decodeURIComponent(option.item));
+					console.log("item",item)
+					this.subId = item.subId;
+					this.subName = item.subjectName;
+					this.address = item.address
+					this.buildingId = item.buildingId;
+					this.deptId = item.buildingId;
+					this.floorId = item.floorId;
+					this.title = item.title;
+					this.type = item.type;
+					this.lablayout(this.buildingId,this.floorId);
+					this.evacuateTwo();
+				}else{
+					//判断入口(首页按钮)
+					this.getRedis();
+				}
+			},
+			//根据账户信息查询学院楼栋数据
+			async getBuilding(buildingId){
+				const {data} = await getBuilding(buildingId)
+				// 过滤了三楼
+				let list = [];
+				for(let i=0;i<data.data.length;i++){
+					if(data.data[i].id != 7){
+						list.push(data.data[i]);
+					}
+				}
+				this.$set(this,'floorList',list);
+				this.$set(this,'floorName',"");
+				this.$set(this,'floorId',"");
+			    this.$set(this,'fjListArray',[]);
+				this.$set(this,'subName',"");
+				this.$set(this,'subId',"");
+				// if(data.data[0]){
+				// 	this.$set(this,'floorName',data.data[0].name);
+				// 	this.$set(this,'floorId',data.data[0].id);
+				// 	this.lablayout(this.buildingId,this.floorId);
+				// }
+			},
+			//获取实验室布局
+			async lablayout(buildingId,floorId){
+				console.log('buildingId',buildingId)
+				console.log('floorId',floorId)
+				let self = this;
+				const {data} = await lablayout(buildingId)
+				if(data.code == 200){
+				  for(let i=0;i<data.data.length;i++){
+					if(data.data[i].id == floorId){
+					  let newList = [];
+					  self.fjList = data.data[i].list;
+					  for(let o=0;o<data.data[i].list.length;o++){
+						if(data.data[i].list[o].subjectId != -1){
+							newList.push(data.data[i].list[o]);
+						}
+					  }
+					  this.$set(this,'fjListArray',newList);
+					 //  if(newList[0]){
+						//   console.log("newList",newList[0])
+						// this.$set(this,'subName',newList[0].subjectName);
+						// this.$set(this,'subId',newList[0].subjectId);
+					 //  }
+					}
+				  }
+				}
+			},
+			//学院楼栋选中
+			buildingChange(e){
+				this.$set(this,'buildingIndex',e.detail.value);
+				this.$set(this,'buildingName',this.buildingList[e.detail.value].label);
+				this.$set(this,'buildingId',this.buildingList[e.detail.value].value);
+				this.$set(this,'deptId',this.buildingList[e.detail.value].value);
+				this.getBuilding(this.buildingList[e.detail.value].value);
+			},
+			//楼层选中
+			floorChange(e){
+				this.$set(this,'floorIndex',e.detail.value);
+				this.$set(this,'floorName',this.floorList[e.detail.value].name);
+				this.$set(this,'floorId',this.floorList[e.detail.value].id);
+				this.lablayout(this.buildingId,this.floorList[e.detail.value].id);
+			},
+			//实验室选择
+			fjListChange(e){
+				this.$set(this,'subName',this.fjListArray[e.detail.value].subjectName);
+				this.$set(this,'subId',this.fjListArray[e.detail.value].subjectId);
+				this.itemData.name=this.fjListArray[e.detail.value].subjectName
+				this.itemData.floorId=this.fjListArray[e.detail.value].floorId
+				this.itemData.id=this.fjListArray[e.detail.value].id
+			},
 			getAppExitLine(){
 				let list = [{type:"lab/exit/line"}];
 				getApp().appMqttOn(1,list);
@@ -298,53 +417,22 @@
 			},
 			//跳转摄像头列表
 			goVideo(){
-				this.itemData.id=this.subId;
 			    uni.navigateTo({
 			        url:'/pages_manage/workbench/laboratory/monitor?item='+encodeURIComponent(JSON.stringify(this.itemData))+'&deptId='+this.deptId
 			    })
 			},
-			//获取实验室摄像头
-			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:5})
+				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--;
-								}
-							}
-						}
-						console.log(list)
-					
-					
-						this.nanhuGetStartList(list);
+						this.itemData.hardwareNUM=data.data.join(',')
+						this.wenchangGetStartList(data.data);
+						// this.startUrl(response.data);
 					}
 				}
 			},
-			async nanhuGetStartList(rows){
+			async wenchangGetStartList(rows){
 				let self = this;
 				let list = "";
 				for(let i=0;i<rows.length;i++){
@@ -360,7 +448,7 @@
 				if(data.code == 200){
                     let list = [];
                     for(let i=0;i<data.data.length;i++){
-                         let text = 'https://lab.sxitdlc.com/jinandaxue/stream/';
+                         let text = 'https://lab.sxitdlc.com/wenchang/stream/';
                         let url = data.data[i].result.body.data.hls;
                         url = url.split("rtp/");
                         let newUrl = text+'rtp/'+url[1];
@@ -575,9 +663,15 @@
 					if(data.data){
 						this.isEvacuate=false;
 						this.deptId = data.data.deptId;
+						this.buildingId = data.data.buildId;
+						this.floorId = data.data.floorId;
 						this.subId = data.data.subId;
 						this.subName = data.data.subName;
+						this.address = data.data.deptName+'-'+data.data.buildName+'-'+data.data.floorName
+						// this.lablayout(data.data.buildId,data.data.floorId);
+						this.lablayout(this.buildingId,this.floorId);
 						this.evacuate();
+						// this.getBuilding(this.buildingId);
 					}else{
 						this.pageType = 1;
 						this.isEvacuate=true;
@@ -585,20 +679,6 @@
 				}
 
 			},
-			//实验室选择
-			fjListChange(e){
-				this.fjListIndex = e.detail.value;
-				this.$set(this,'subName',this.fjListArray[this.fjListIndex].subjectName);
-				this.$set(this,'subId',this.fjListArray[e.detail.value].subjectId);
-				this.$set(this,'deptId',this.fjListArray[e.detail.value].deptId);
-
-				this.itemData.name=this.fjListArray[e.detail.value].subjectName
-				this.itemData.floorId=this.fjListArray[e.detail.value].floorId
-				this.itemData.id=this.fjListArray[e.detail.value].id
-				this.itemData.subjectId=this.fjListArray[e.detail.value].subjectId
-
-				console.log(this.fjListArray[e.detail.value])
-			},
 			//疏散路线选择
 			buttonChangeTwo(e){
 				this.buttonArrayIndex = e.detail.value;
@@ -660,9 +740,9 @@
 					});
 					return
 				}
-
+				this.address = this.buildingName+''+this.floorName
 				this.lineEvacuateTow();
-				this.laboratoryInfo();
+				this.getCameraByFloor();
 			},
 			/* 2.5获取疏散线路 */
 			async lineEvacuateTow(){
@@ -766,14 +846,14 @@
 				}
 				this.lightList = newList;
 				console.log('灯数据改变',this.lightList);
-
 				this.pageType = 2;
 				this.$forceUpdate();
 				this.getDeviceList();
+				this.getCameraByFloor();
 			},
 			async getDeviceList(){
 				let obj ={
-					floorId:5,
+					floorId:this.floorId,
 					page:1,
 					pageSize:100,
 				};
@@ -789,26 +869,6 @@
 			scrollBoxClick(index){
 				this.videoIndex = index;
 			},
-			//获取实验室布局
-			async lablayout(){
-				let self = this;
-				const {data} = await lablayout(137)
-				if(data.code == 200){
-				  for(let i=0;i<data.data.length;i++){
-					if(data.data[i].id == 5){
-					  self.fjList = data.data[i].list;
-					  let newList = [];
-					  for(let o=0;o<data.data[i].list.length;o++){
-						if(data.data[i].list[o].subjectId != -1){
-							newList.push(data.data[i].list[o]);
-						}
-					  }
-					  this.$set(this,'fjListArray',newList);
-					}
-				  }
-
-				}
-			},
 		},
         beforeDestroy(){
 			//断开mqtt连接
@@ -890,12 +950,11 @@
 				border-radius:20rpx;
 				padding:20rpx 0 30rpx;
 				.evacuation-title-box{
-					height:150rpx;
+					// height:150rpx;
 					//border-bottom:1rpx solid #dedede;
 					background: #FFFFFF;
 					border-radius: 20rpx;
-					padding-left:22rpx;
-					padding-top:34rpx;
+					padding:34rpx 22rpx;
 					box-sizing :border-box;
 					.evacuation-title-name-box{
 						font-size: 30rpx;
@@ -1084,151 +1143,209 @@
 						overflow:hidden;
 						border:1rpx solid #E0E0E0;
 						margin-top:20rpx;
-						.evacuation-map-big-box{
-							height:285rpx;
-							width:641rpx;
-							background:url(../images/Version2.3/icon_bj_syspmtcy_jinan.png);
-							background-size 100%
-							margin:28rpx 13rpx ;
-							position relative
-							.evacuation-map-min-for-box{
-								overflow: hidden;
-								display: inline-block;
-								line-height:70rpx;
-								text-align: center;
-								font-size:14rpx;
-							}
-							.evacuation-map-min-for-box-color{
-								background: rgba(0,189,255,0.3);
-							}
+						.map-1{
+							background:url(../images/kuangdaMap/map1.png);
 							.evacuation-map-min-for-box:nth-child(1){
-								margin:4rpx 82rpx 0 0;
-								width:91rpx;
-								height:91rpx;
+								margin:4rpx 0 0 0;
+								width:54rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(2){
-								margin:4rpx 0 0 0;
-								width:57rpx;
-								height:91rpx;
+								margin:4rpx 54rpx 0 0;
+								width:54rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(3){
-								margin:4rpx 0 0 0;
-								width:57rpx;
-								height:91rpx;
+								margin:4rpx 54rpx 0 0;
+								width:100rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(4){
 								margin:4rpx 0 0 0;
-								width:57rpx;
-								height:91rpx;
+								width:135rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(5){
 								margin:4rpx 0 0 0;
-								width:58rpx;
-								height:91rpx;
+								width:95rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(6){
 								margin:4rpx 0 0 0;
-								width:57rpx;
-								height:91rpx;
+								width:54rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(7){
-								margin:4rpx 0 0 0;
-								width:57rpx;
-								height:91rpx;
+								margin:78rpx 0 0 0;
+								width:130rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(8){
-								margin:4rpx 40rpx 0 0;
-								width:57rpx;
-								height:91rpx;
+								margin:78rpx 0 0 0;
+								width:149rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(9){
-								margin:47rpx 0 0 0;
-								width:51rpx;
-								height:136rpx;
-								line-height:140rpx;
+								margin:78rpx 0 0 0;
+								width:84rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(10){
-								margin:47rpx 0 0 0;
-								width:60rpx;
-								height:136rpx;
-								line-height:140rpx;
+								margin:78rpx 0 0 0;
+								width:84rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(11){
-								margin:47rpx 0 0 0;
-								width:62rpx;
-								height:136rpx;
-								line-height:140rpx;
+								margin:78rpx 0 0 0;
+								width:94rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(12){
-								margin:47rpx 0 0 0;
-								width:58rpx;
-								height:136rpx;
-								line-height:140rpx;
+								margin:78rpx 0 0 0;
+								width:44rpx;
+								height:102rpx;
 							}
 							.evacuation-map-min-for-box:nth-child(13){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
-							}
-							.evacuation-map-min-for-box:nth-child(14){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
+								margin:78rpx 0 0 0;
+								width:64rpx;
+								height:102rpx;
 							}
-							.evacuation-map-min-for-box:nth-child(15){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
+							.map-min-img:nth-child(14){
+								top: 134rpx;
+								left: 80rpx;
 							}
-							.evacuation-map-min-for-box:nth-child(16){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
+							.map-min-img:nth-child(15){
+								top: 134rpx;
+								left: 160rpx;
 							}
-							.evacuation-map-min-for-box:nth-child(17){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
+							.map-min-img:nth-child(16){
+								top: 134rpx;
+								left:280rpx;
 							}
-							.evacuation-map-min-for-box:nth-child(18){
-								margin:47rpx 0 0 0;
-								width:57rpx;
-								height:136rpx;
-								line-height:140rpx;
+							.map-min-img:nth-child(17){
+								top: 134rpx;
+								left:340rpx;
 							}
-							.map-min-img{
-								position: absolute;
-								width:34rpx;
-								height:22rpx;
+							.map-min-img:nth-child(18){
+								top: 134rpx;
+								left:460rpx;
 							}
 							.map-min-img:nth-child(19){
-								top: 64rpx;
-								left: 94rpx;
+								top: 134rpx;
+								left:540rpx;
+							}
+						}
+						.map-2{
+							background:url(../images/kuangdaMap/map2.png);
+							.evacuation-map-min-for-box:nth-child(1){
+								margin:4rpx 0 0 0;
+								width:54rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(2){
+								margin:4rpx 54rpx 0 0;
+								width:54rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(3){
+								margin:4rpx 54rpx 0 0;
+								width:100rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(4){
+								margin:4rpx 0 0 0;
+								width:135rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(5){
+								margin:4rpx 0 0 0;
+								width:145rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(6){
+								margin:4rpx 0 0 0;
+								width:106rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(7){
+								margin:78rpx 0 0 0;
+								width:106rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(8){
+								margin:78rpx 0 0 0;
+								width:100rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(9){
+								margin:78rpx 0 0 0;
+								width:100rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(10){
+								margin:78rpx 0 0 0;
+								width:92rpx;
+								height:102rpx;
+							}
+							.evacuation-map-min-for-box:nth-child(11){
+								margin:78rpx 0 0 0;
+								width:90rpx;
+								height:102rpx;
 							}
-							.map-min-img:nth-child(20){
-								top: 109rpx;
-								left: 134rpx;
+							.evacuation-map-min-for-box:nth-child(12){
+								margin:78rpx 0 0 0;
+								width:53rpx;
+								height:102rpx;
+							}
+							.map-min-img:nth-child(13){
+								top: 134rpx;
+								left: 80rpx;
+							}
+							.map-min-img:nth-child(14){
+								top: 134rpx;
+								left: 160rpx;
 							}
-							.map-min-img:nth-child(21){
-								top: 109rpx;
-								left:290rpx;
+							.map-min-img:nth-child(15){
+								top: 134rpx;
+								left:280rpx;
 							}
-							.map-min-img:nth-child(22){
-								top: 109rpx;
-								left:350rpx;
+							.map-min-img:nth-child(16){
+								top: 134rpx;
+								left:340rpx;
 							}
-							.map-min-img:nth-child(23){
-								top: 109rpx;
-								left:520rpx;
+							.map-min-img:nth-child(17){
+								top: 134rpx;
+								left:460rpx;
 							}
-							.map-min-img:nth-child(24){
-								top: 109rpx;
-								left:580rpx;
+							.map-min-img:nth-child(18){
+								top: 134rpx;
+								left:540rpx;
+							}
+						}
+						.map-3{
+							background:url(../images/kuangdaMap/map3.png);
+						}
+						.evacuation-map-big-box{
+							height:293rpx;
+							width:644rpx;
+							// background:url(../images/Version2.3/icon_bj_syspmtcy_jinan.png);
+							background-size 100%
+							margin:28rpx 13rpx ;
+							position relative
+							.evacuation-map-min-for-box{
+								overflow: hidden;
+								display: inline-block;
+								line-height:70rpx;
+								text-align: center;
+								font-size:14rpx;
+							}
+							.evacuation-map-min-for-box-color{
+								background: rgba(0,189,255,0.3);
+							}
+							.map-min-img{
+								position: absolute;
+								width:34rpx;
+								height:22rpx;
 							}
 						}
 					}