heyang 2 gadi atpakaļ
vecāks
revīzija
50fbfd4eac

+ 39 - 36
pages/emergencyEvacuationBig.vue

@@ -28,7 +28,7 @@
 						<view></view>
 						<view>实验室</view>
 					</view>
-					<picker @change="fjListChange" 
+					<picker @change="fjListChange"
 						:range-key="'subjectName'" :value="id" :range="fjListArray">
 						<view class="picker-min-box">
 							<view>{{fjListIndex?fjListArray[fjListIndex].subjectName:'请选择实验室'}}</view>
@@ -41,7 +41,7 @@
 						<view>*</view>
 						<view>疏散路径:</view>
 					</view>
-					<picker @change="buttonChangeTwo" 
+					<picker @change="buttonChangeTwo"
 						:range-key="'name'" :value="id" :range="buttonArray">
 						<view class="picker-min-box">
 							<view>{{buttonArrayIndex?buttonArray[buttonArrayIndex].name:'请选择疏散路径'}}</view>
@@ -86,7 +86,7 @@
 				</view> -->
 				<!-- 视频部分 -->
 				<!-- <view class="evacuation-video-box">
-					<video 
+					<video
 						:class="index == videoIndex?'video-a':'video-b'"
 						v-for="(item,index) in videoList" :key="index"
 						:id="urlList.id" :src="item.url"
@@ -126,7 +126,7 @@
 				</view>
 				<!-- 视频部分 -->
 				<view class="video-max-box" v-if="urlList[0]">
-					<video 
+					<video
 						v-for="(item,index) in urlList" :key="index" :id="urlList.id" :src="item.url"
 						poster="http://lab.sxitdlc.com:9300/statics/logo/logo.png"
 						:custom-cache='false' :autoplay="true" :controls="true"
@@ -149,7 +149,7 @@
 					<!-- 按钮部分 -->
 					<view class="trumpet-max-box">
 						<view @click="trumpetClick(index)"
-							class="trumpet-for-box" :class="item.type?'trumpet-color-a':'trumpet-color-b'" 
+							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">
@@ -171,14 +171,14 @@
 			</view>
 			<!-- <view class="live-button" :class="liveType?'live-color-a':'live-color-b'"
 				@longpress.stop="recordButton" @touchmove.stop="cancelButton"  @touchend.stop="sendButton">开始广播</view> -->
-			
+
 		</view>
 	</view>
 </template>
 
 <script>
     import { config } from '@/api/request/config.js'
-    import { lablayout,evacuate,closure,lineEvacuate,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,nanhuGetStartList,lineEvacuateTow} from '@/api/index.js'
+    import { lablayout,evacuate,closure,lineEvacuate,getRedis,getDeviceList,textParseUrlIps,getCameraByFloor,jinanGetStartList,nanhuGetStartList,lineEvacuateTow} from '@/api/index.js'
     export default {
         data() {
             return {
@@ -306,8 +306,8 @@
 				const {data} = await getCameraByFloor({floorId:5})
 				if(data.code == 200){
 					if(data.data[0]){
-						this.nanhuGetStartList(data.data);
-						// this.itemData.hardwareNUM=data.data.join(',')
+						//this.nanhuGetStartList(data.data);
+						 this.itemData.hardwareNUM=data.data.join(',')
 						// this.startUrl(response.data);
 					}
 				}
@@ -324,11 +324,11 @@
 				  deviceIds:list,
 				  // deviceIds:'440102004920000000011111,2C440102004920000000011112',
 				};
-				const {data} = await nanhuGetStartList(obj)
+				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/nanhu/stream/';
+                         let text = 'https://lab.sxitdlc.com/jinandaxue/stream/';
                         let url = data.data[i].result.body.data.fmp4;
                         url = url.split("rtp/");
                         let newUrl = text+'rtp/'+url[1];
@@ -363,7 +363,7 @@
 						mask:true,
 						duration: 2000
 					});
-					return 
+					return
 				}
 				this.liveType=true;
 				console.log('录制',e)
@@ -401,7 +401,7 @@
 					}
 				}
 				if(num == 0){
-					return 
+					return
 				}
 				this.liveType=false;
 				console.log('取消',e)
@@ -429,12 +429,12 @@
 				let num = 0;
 				for(let i=0;i<self.trumpetList.length;i++){
 					if(self.trumpetList[i].type){
-						
+
 						num++
 					}
 				}
 				if(num == 0){
-					return 
+					return
 				}
 				this.liveType=false;
 				console.log('发送',e)
@@ -492,6 +492,7 @@
 					let obj = {
 					  sn:self.trumpetList[i].deviceSn,
 					  port:self.trumpetList[i].port,
+					  deviceIp:self.trumpetList[i].deviceIp,
 					  type:"",
 					  name:"",
 					  speed:"",
@@ -550,7 +551,7 @@
 						this.isEvacuate=true;
 					}
 				}
-				
+
 			},
 			//实验室选择
 			fjListChange(e){
@@ -558,10 +559,10 @@
 				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
 			},
 			//疏散路线选择
 			buttonChangeTwo(e){
@@ -624,12 +625,12 @@
 					});
 					return
 				}
-				
+
 				this.lineEvacuateTow();
 			},
 			/* 2.5获取疏散线路 */
 			async lineEvacuateTow(){
-				
+
 				if(!this.buttonArrayIndex){
 					uni.showToast({
 						title: '请选择疏散路线',
@@ -640,7 +641,7 @@
 					return
 				}
 				const {data} = await lineEvacuateTow(this.subId,this.buttonArray[this.buttonArrayIndex].id)
-				
+
 				if(data.code == 200){
 					if(data.data){
 						this.pageType = 2;
@@ -675,7 +676,7 @@
 					return
 				}
 				const {data} = await lineEvacuate(this.subId,this.buttonArray[this.buttonArrayIndex].id)
-				
+
 				if(data.code == 200){
 					if(data.data){
 						console.log('执行疏散')
@@ -729,7 +730,7 @@
 				}
 				this.lightList = newList;
 				console.log('灯数据改变',this.lightList);
-				
+
 				this.pageType = 2;
 				this.$forceUpdate();
 				this.getDeviceList();
@@ -769,7 +770,7 @@
 					  this.$set(this,'fjListArray',newList);
 					}
 				  }
-				  
+
 				}
 			},
 		},
@@ -812,7 +813,7 @@
 							color:red;
 						}
 						view:nth-child(2){
-							
+
 						}
 						view:nth-child(3){
 							color:#999;
@@ -877,7 +878,7 @@
 						display :flex;
 						justify-content :flex-start;
 						align-items center;
-						
+
 						>img{
 							width: 28rpx;
 							height: 30rpx;
@@ -974,13 +975,13 @@
 						width:668rpx;
 						height:341rpx;
 						margin:0 auto;
-						
+
 					}
 					.video-a{
 						z-index:100;
 					}
 					.video-b{
-						z-index:0;	
+						z-index:0;
 					}
 				}
 				/* 路线图 */
@@ -1195,7 +1196,7 @@
 							}
 						}
 					}
-					
+
 				}
 				.video-max-box{
 					width: 710rpx;
@@ -1295,9 +1296,10 @@
 						display :flex;
 						justify-content :flex-start;
 						margin-top :22rpx;
+						flex-wrap: wrap;
 						.trumpet-for-box{
 							display:inline-block;
-							width:204rpx;
+							width:200rpx;
 							height:60rpx;
 							line-height:60rpx;
 							font-size:24rpx;
@@ -1309,14 +1311,15 @@
 							color: #E0E0E0;
 							display :flex;
 							justify-content :center;
-							margin-right :30rpx;
+							margin-right :20rpx;
+							margin-bottom: 10rpx;
 							>img{
 								width:36rpx;
 								height:34rpx;
-								margin :12rpx 20rpx 0 25rpx;	
+								margin :12rpx 20rpx 0 25rpx;
 							}
 						}
-						
+
 						.trumpet-color-a{
 							border:1px solid #0183FA;
 							color:#0183FA;
@@ -1342,7 +1345,7 @@
 								width: 142rpx;
 								height: 142rpx;
 								position :absolute;
-								
+
 							}
 							>label{
 								width :100%;
@@ -1384,7 +1387,7 @@
 							text-align center;
 							margin-top :14rpx;
 						}
-					}			
+					}
 					/* 疏散按钮 */
 					.evacuation-button-box{
 						width:650rpx;

+ 6 - 5
pages_manage/workbench/laboratory/laboratoryInfo.vue

@@ -40,7 +40,7 @@
           <view>语音播报</view>
           <view @click="goWord()">播放文字</view>
         </view>
-        <view class="for-button-box" v-for="(minItem,minIndex) in itemData.labHardwareVOList" :key="minIndex" v-if="minItem.hardwareTypeEnum.enumName!='VIDEO_MONITOR'">
+        <view class="for-button-box" v-for="(minItem,minIndex) in itemData.labHardwareVOList" :key="minIndex" v-if="minItem.hardwareTypeEnum.enumName!='VIDEO_MONITOR' && minItem.hardwareTypeEnum.enumName!='RFID_RECOGNIZER'&& minItem.hardwareTypeEnum.enumName!='AI_TERMINAL'&& minItem.hardwareTypeEnum.enumName!='AI_DOORLOCK'&& minItem.hardwareTypeEnum.enumName!='AI_CABINETLOCK'">
           <view>{{minItem.hardwareName}}</view>
           <img v-if="minItem.state.code=='3'" src="@/images/icon_10.png" @click="hardwareButton(minItem,'close')">
           <img v-if="minItem.state.code=='4'" src="@/images/icon_11.png" @click="hardwareButton(minItem,'open')">
@@ -77,10 +77,10 @@
             <view>安全负责人:</view>
             <view>{{itemData.safeInfo.safeUser[0]?"":"未设置"}}</view>
           </view>
-          <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.safeUser" :key="index">
-            <view style="color:#999;">{{item.name}}</view>
-            <view>{{itemData.safeInfo.safeUser[0]?"":"未设置"}}</view>
-          </view>
+           <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.safeUser" :key="index">
+			  <view style="color:#999;">{{item.name}}</view>
+			  <view>{{item.phone?item.phone:'未填写'}}</view>
+			</view>
         </view>
         <view class="safety-max-box" v-if="itemData.hazardCategory[0]||itemData.riskMeasure[0]||itemData.outfire[0]">
           <view class="max-for-box" v-if="itemData.hazardCategory[0]">
@@ -465,6 +465,7 @@ export default {
       }
     },
     goVideo(){
+		this.itemData.floorId = this.itemData.subAddrr.floorId;
       uni.navigateTo({
         url:'/pages_manage/workbench/laboratory/monitor?item='+encodeURIComponent(JSON.stringify(this.itemData))+'&deptId='+this.deptId
       })

+ 3 - 2
pages_manage/workbench/laboratory/monitor.vue

@@ -77,8 +77,8 @@ export default {
           value:"2"
         },
       ],
+
       current:1,
-      text:"",
       trumpetList:[],
       //滑动记录
       startPoint:{},
@@ -303,6 +303,7 @@ export default {
           let obj = {
             sn:self.trumpetList[i].deviceSn,
             port:self.trumpetList[i].port,
+			      deviceIp:self.trumpetList[i].deviceIp,
             type:"",
             name:"",
             speed:"",
@@ -331,7 +332,7 @@ export default {
     //获取喇叭列表
     async getDeviceListBySub(){
       let obj = {
-        floorId:this.itemData.subAddrr.floorId,
+        floorId:this.itemData.floorId,
         subId:this.itemData.id,
         page:1,
         pageSize:100