heyang 2 anni fa
parent
commit
b3c415be14

+ 2 - 2
api/request/config.js

@@ -2,14 +2,14 @@ const config = {
 	//base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	// base_url: 'http://192.168.1.17:8080',//小飞
-	 base_url: 'http://192.168.1.20:8080',//志伟
+	// base_url: 'http://192.168.1.20:8080',//志伟
     // base_url: 'http://192.168.1.8:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
     // base_url: 'http://192.168.1.43:9800',//43服务器
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
-	//base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
+	base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
     // base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	// base_url: 'https://lab.zjznai.com//labSystem/', //矿大地址
     //base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工

+ 14 - 13
pages.json

@@ -1,19 +1,7 @@
 {
 	"pages": [
 		
-		{
-			"path": "pages/earlyWarningManage/earlyWarningList",
-			"style": {
-				"navigationBarTitleText": "预警记录"
-			}
-		},
-			
-		{
-			"path": "pages/earlyWarningManage/videoMonitoring",
-			"style": {
-				"navigationBarTitleText": "监控信息"
-			}
-		},		
+		
 		{
 			"path": "pages/home",//首页
 			"style": {
@@ -32,6 +20,19 @@
 				"navigationBarTitleText": "预案预警信息"
 			}
 		},
+		{
+			"path": "pages/earlyWarningManage/earlyWarningList",
+			"style": {
+				"navigationBarTitleText": "预警记录"
+			}
+		},
+			
+		{
+			"path": "pages/earlyWarningManage/videoMonitoring",
+			"style": {
+				"navigationBarTitleText": "监控信息"
+			}
+		},		
 
 		{
 			"path": "pages/supplierWorkbench",

+ 37 - 19
pages/earlyWarningManage/earlyWarningDetail.vue

@@ -35,11 +35,11 @@
 			<view class="small_title"><text></text><text>风险概况</text></view>
 			<view class="basics_li" style="margin-top:20rpx;">
 				<text>发生时间:</text>
-				<text>{{form.startTime}}至{{form.endTime}}</text>
+				<text>{{form.startTime}}至{{form.endTime?form.endTime:'-'}}</text>
 			</view>
 			<view class="basics_li">
 				<text>持续时间:</text>
-				<text>{{form.riskDuration}}</text>
+				<text>{{form.riskDuration}}</text>
 			</view>
 			<view class="basics_li">
 				<text>风险响应人员:</text>
@@ -47,7 +47,7 @@
 			</view>
 			<view class="basics_li">
 				<text>实验室内人员:</text>
-				<text>{{form.indoorUser}}</text>
+				<text>{{form.indoorUser?form.indoorUser:'-'}}</text>
 			</view>
 		</view>
 		<!-- 化学品 -->
@@ -135,7 +135,7 @@
 			<view class="small_title"><text></text><text>报警抓拍</text></view>
 			<view class="picture_b" >
 				<view class="video">
-					<video id="myvideo" class="video_t" :src="configUrl+infoData.recordVideo"></video>
+					<video id="myvideo" class="video_t" :src="configUrl+form.recordVideo"></video>
 					<img  class="video_b" @click="lockVideo()" src="@/images/icon_bjzp_spbof.png"/>
 				</view>
 			</view>
@@ -165,34 +165,37 @@ export default {
 		total:0,
 		warningId:'',
 		form:{},
+		currentTime:'',
 		
 	}
   },
   onLoad(option) {
 	  let self = this;
-	  if(option.id){
-		  this.warningId=option.id;
+	  //先判断是否是通过点击列表进入
+	  if(option.warningId){
+		  this.warningId=option.warningId;
 	  }else{
-		 if(option.q){
-		     let text = decodeURIComponent(option.q)
-		     if(!uni.getStorageSync('token')){
-		         uni.setStorageSync('warningId',text.split("?")[1]);
-		         uni.redirectTo({
-		             url: '/pages/login',
-		         });
-		     }
-		 }else{
-		     this.warningId = uni.getStorageSync('warningId');
-		     uni.removeStorageSync('warningId');
-		 } 
+		//通过短信外链跳转进来
+		if(option.id){
+			if(!uni.getStorageSync('token')){
+			    uni.setStorageSync('warningId',option.id);
+			    uni.redirectTo({
+			        url: '/pages/login',
+			    });
+			}	
+		}else{
+			  this.warningId = uni.getStorageSync('warningId');
+			  uni.removeStorageSync('warningId');
+		}   
 	  }
-	  
+	 
   },
   onShow() {
 	
   },
   mounted(){
 	this.getInfo(); 
+	
   },
   methods: {
 		
@@ -201,6 +204,20 @@ export default {
 			let self=this;
 			
 		},
+		//判断预警时间是否超过30分钟
+		compareTime (gettime){
+			let timeOut = 30 * 60 * 1000;
+			let currentTime = new Date().getTime()  //获取当前时间
+			let endTime = new Date(gettime).getTime() //预警时间
+			if(currentTime-endTime>timeOut){
+				console.log('预警时间超过30分钟')
+				this.timeStatus=true;
+			}else{
+				console.log('预警没超过30分钟')
+				this.timeStatus=false;
+			}	
+			
+		},
 		//查看图片
 		lockImg(list){
 			console.log(list)
@@ -251,6 +268,7 @@ export default {
 						title:'预案报警信息'
 					}) 
 				}
+				this.compareTime(res.warningTime);
 			}
 		},
 		handleClick(row,doType){

+ 3 - 3
pages/earlyWarningManage/earlyWarningList.vue

@@ -49,6 +49,7 @@ export default {
 		},
 		dataList:[],
 		total:0,
+		timeStatus:false,//判断是否超过当前时间30分钟
 		
 	}
   },
@@ -59,8 +60,7 @@ export default {
 	
   },
   mounted(){
-	 this.getList();
-	  
+	 this.getList();  
   },
   methods: {
 		
@@ -83,7 +83,7 @@ export default {
 		  let self=this;
 		  if( doType=='detail'){//详情	
 			  uni.navigateTo({
-			    url: '/pages/earlyWarningManage/earlyWarningDetail?id='+row.id,//安全警报
+			    url: '/pages/earlyWarningManage/earlyWarningDetail?warningId='+row.id,//安全警报
 			  });
 		  }
 		  

+ 6 - 6
pages/earlyWarningManage/videoMonitoring.vue

@@ -69,16 +69,16 @@ export default {
 		recorderManager: wx.getRecorderManager(),
 		videoHardwareList:[],//获取所有摄像头编码
 		hardwareList:[],//硬件列表
-		subId:'96',
-		floorId:'58',
+		subId:'',
+		floorId:'',
 		
 	}
   },
   onLoad(option) {
-	 //  if(option.subId || option.floorId){
-		// this.subId=option.subId
-		// this.floorId=option.floorId
-	 //  }
+	  if(option.subId || option.floorId){
+		this.subId=option.subId
+		this.floorId=option.floorId
+	  }
   },
   onShow() {