heyang 2 年之前
父節點
當前提交
3ac7e91ecc
共有 4 個文件被更改,包括 70 次插入43 次删除
  1. 14 13
      pages.json
  2. 36 21
      pages/earlyWarningManage/earlyWarningDetail.vue
  3. 14 9
      pages/earlyWarningManage/videoMonitoring.vue
  4. 6 0
      pages/login.vue

+ 14 - 13
pages.json

@@ -1,11 +1,18 @@
 {
 	"pages": [
-		{
-			"path": "pages/earlyWarningManage/earlyWarningList",
-			"style": {
-				"navigationBarTitleText": "预警记录"
-			}
-		},
+		
+				{
+					"path": "pages/earlyWarningManage/earlyWarningList",
+					"style": {
+						"navigationBarTitleText": "预警记录"
+					}
+				},
+				{
+							"path": "pages/earlyWarningManage/videoMonitoring",
+							"style": {
+								"navigationBarTitleText": "监控信息"
+							}
+						},
 		{
 			"path": "pages/home",//首页
 			"style": {
@@ -16,19 +23,13 @@
 			}
 		},
 		/* 预警信息 */
-		{
-			"path": "pages/earlyWarningManage/videoMonitoring",
-			"style": {
-				"navigationBarTitleText": "监控信息"
-			}
-		},
+		
 		{
 			"path": "pages/earlyWarningManage/earlyWarningDetail",
 			"style": {
 				"navigationBarTitleText": "预案预警信息"
 			}
 		},
-		
 
 		{
 			"path": "pages/supplierWorkbench",

+ 36 - 21
pages/earlyWarningManage/earlyWarningDetail.vue

@@ -3,13 +3,13 @@
   <view class="earlyWarning">
 	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 		<!-- 预案报警 -->
-		<view class="header" v-if="form.warningType==4">甲烷气体泄露-中风险</view>
+		<view class="header" v-if="form.warningType==4">{{form.warningContent}}</view>
 		<!-- 化学品 -->
-		<view class="header_tow" v-if="form.warningType==2">化学品违规带离</view>
+		<view class="header_tow" v-if="form.warningType==2">{{form.warningContent}}</view>
 		<!-- 气瓶 -->
-		<view class="header_three" v-if="form.warningType==3">气瓶违规带离</view>
+		<view class="header_three" v-if="form.warningType==3">{{form.warningContent}}</view>
 		<!-- 算法识别 -->
-		<view class="header_four" v-if="form.warningType==1">多人未穿戴实验服</view>
+		<view class="header_four" v-if="form.warningType==1">{{form.warningContent}}</view>
 		<!-- 预案报警 -->
 		<view class="site" v-if="form.warningType==4">
 			<img src="@/images/Version2.2/icon_wtzg_xx.png"/>
@@ -65,17 +65,17 @@
 				<text>化学品余量:</text>
 				<text>{{form.margin}}</text>
 			</view>
-			<view class="basics_li">
+			<view class="basics_li" v-if="form.warningSubType==2">
 				<text>申领人:</text>
 				<text>{{form.apply}}</text>
 			</view>
-			<view class="basics_li">
+			<view class="basics_li" v-if="form.warningSubType==2">
 				<text>申领时间:</text>
 				<text>{{form.applyTime}}</text>
 			</view>
-			<view class="basics_li">
+			<view class="basics_li" v-if="form.warningSubType==3||form.warningSubType==4">
 				<text>过期时间:</text>
-				<text>{{form.applyTime}}</text>
+				<text>{{form.expirationTime}}</text>
 			</view>
 		</view>
 		<!-- 气瓶 -->
@@ -95,17 +95,17 @@
 			</view>
 			<view class="basics_li">
 				<text>所有人:</text>
-				<text>{{form.specification}}</text>
+				<text>{{form.holder}}</text>
 			</view>
 			<view class="basics_li">
 				<text>入库时间:</text>
-				<text>{{form.specification}}</text>
+				<text>{{form.entryTime}}</text>
 			</view>
-			<view class="basics_li">
+			<view class="basics_li" v-if="form.warningSubType==2">
 				<text>申领人:</text>
-				<text>{{form.apply}}</text>apply
+				<text>{{form.apply}}</text>
 			</view>
-			<view class="basics_li">
+			<view class="basics_li" v-if="form.warningSubType==2">
 				<text>申领时间:</text>
 				<text>{{form.applyTime}}</text>
 			</view>
@@ -114,14 +114,14 @@
 			<view class="small_title"><text></text><text>通知短信</text></view>
 			<view class="note_li" style="margin-top:20rpx;" v-for="(item,index) in form.messageVOList">
 				<text>{{item.name}}</text>
-				<view class="note_li_r" v-if="item.isSuccess=='成功'"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
+				<view class="note_li_r" v-if="item.isSuccess==1"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
 			</view>
 		</view>
 		<view class="note">
 			<view class="small_title"><text></text><text>预警通知</text></view>
 			<view class="note_li" style="margin-top:20rpx;">
 				<text>语音播报</text>
-				<view class="note_li_r"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
+				<view class="note_li_r" v-if="form.voiceBroadcast==1"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
 			</view>
 		</view>
 		<view class="picture">
@@ -133,7 +133,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="bottom_btn">查看监控</view>
+		<view class="bottom_btn" @click="handleClick('','monitor')">查看监控</view>
 	</scroll-view>	
   </view>
 
@@ -156,14 +156,27 @@ export default {
 			pageSize:20,
 		},
 		total:0,
-		id:'',
+		warningId:'',
 		form:{},
 		
 	}
   },
   onLoad(option) {
 	  if(option.id){
-		  this.id=option.id;
+		  this.warningId=option.id;
+	  }
+	  let self = this;
+	  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');
 	  }
   },
   onShow() {
@@ -206,7 +219,7 @@ export default {
 		//获取详情
 		async getInfo(){
 		    let _this = this;
-			const {data} = await warningNoticeLogDetail({id:this.id})
+			const {data} = await warningNoticeLogDetail({id:this.warningId})
 			if(data.code==200){
 				let res=data.data
 				this.form=res;
@@ -232,8 +245,10 @@ export default {
 		},
 		handleClick(row,doType){
 		  let self=this;
-		  if( doType=='detail'){//详情	
-			  
+		  if( doType=='monitor'){//监控
+			  uni.navigateTo({
+			    url: '/pages/earlyWarningManage/videoMonitoring?subId='+this.form.subId+'&floorId='+this.form.floorId//我的实验室
+			  });
 		  }
 		  
 		},

+ 14 - 9
pages/earlyWarningManage/videoMonitoring.vue

@@ -67,18 +67,24 @@ export default {
 		liveType: false,
 		sendLock: true, //发送锁,当为true时上锁,false时解锁发送
 		recorderManager: wx.getRecorderManager(),
+		subId:'96',
+		floorId:'5',
 		
 	}
   },
   onLoad(option) {
-	  
+	 //  if(option.subId || option.floorId){
+		// this.subId=option.subId
+		// this.floorId=option.floorId
+	 //  }
   },
   onShow() {
 	
   },
   mounted(){
 	 
-	  
+	  this.laboratoryInfo()
+	  this.getDeviceList()
   },
   methods: {
 		//顶部tab点击
@@ -100,18 +106,17 @@ export default {
 		  let _this = this;
 		  const {
 		    data
-		  } = await laboratoryInfo(_this.itemData.subjectId);
+		  } = await laboratoryInfo(_this.subId);
 		  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.videoHardwareNUM.push(item)
 		      }
 		    })
 		
-		    this.getCameraByFloor();
-		
+		    //this.getCameraByFloor();
+		    this.GetStartList(_this.videoHardwareNUM);
 		  }
 		},
 		//获取楼层摄像头列表
@@ -148,7 +153,7 @@ export default {
 		  }
 		  let list = "";
 		  for (let i = 0; i < rows.length; i++) {
-		    list = list + rows[i] + ","
+		    list = list + rows[i].hardwareNUM + ","
 		  }
 		  let obj = {
 		    page: "1",
@@ -179,7 +184,7 @@ export default {
 		//获取喇叭列表
 		async getDeviceList() {
 		  let obj = {
-		    subId: this.itemData.subjectId,
+		    subId: this.subId,
 		    floorId: this.floorId,
 		    page: 1,
 		    pageSize: 100,

+ 6 - 0
pages/login.vue

@@ -188,11 +188,17 @@ export default {
           uni.redirectTo({
             url: '/pages_manage/workbench/laboratory/laboratoryInfo'
           });
+        }else if(uni.getStorageSync('warningId')){//报警信息详情
+          uni.redirectTo({
+            url: '/pages/earlyWarningManage/earlyWarningDetail'
+          });
         }else{
           uni.redirectTo({
             url: '/pages/home',
           });
         }
+		
+		
 
       }
     },