heyang 2 年之前
父節點
當前提交
8bf215cb68

+ 8 - 0
api/index.js

@@ -1698,6 +1698,14 @@ export const getCameraByFloor  = (data) => {
         data: data,
     })
 };
+//获取疏散硬件
+export const sparseHardwareList  = (data) => {
+    return apiResquest({
+        url: `/laboratory/sparseHardware/list`,
+        method: 'GET',
+        data: data,
+    })
+};
 
 //获取当前用户认证头像
 export const mystudent  = (data) => {

+ 2 - 2
api/request/config.js

@@ -11,8 +11,8 @@ const config = {
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//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/', //矿大化工
+	// base_url: 'https://lab.zjznai.com//labSystem/', //矿大地址
+    //base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工
 	// base_url: 'https://lab.zjznai.com/jdlabSystem/', //交大地址
     // base_url: 'https://lab.zjznai.com/jndxlabSystem/', //暨大地址
     //  base_url: 'https://lab.zjznai.com/kdwclabSystem/', //矿大文昌地址

+ 14 - 12
pages.json

@@ -1,18 +1,19 @@
 {
 	"pages": [
 		
-				{
-					"path": "pages/earlyWarningManage/earlyWarningList",
-					"style": {
-						"navigationBarTitleText": "预警记录"
-					}
-				},
-				{
-							"path": "pages/earlyWarningManage/videoMonitoring",
-							"style": {
-								"navigationBarTitleText": "监控信息"
-							}
-						},
+		{
+			"path": "pages/earlyWarningManage/earlyWarningList",
+			"style": {
+				"navigationBarTitleText": "预警记录"
+			}
+		},
+			
+		{
+			"path": "pages/earlyWarningManage/videoMonitoring",
+			"style": {
+				"navigationBarTitleText": "监控信息"
+			}
+		},		
 		{
 			"path": "pages/home",//首页
 			"style": {
@@ -22,6 +23,7 @@
 				"navigationStyle": "custom"
 			}
 		},
+		
 		/* 预警信息 */
 		
 		{

+ 25 - 15
pages/earlyWarningManage/earlyWarningDetail.vue

@@ -117,9 +117,16 @@
 				<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="note" v-if="(form.warningType==2 || form.warningType==3) && form.warningSubType==1">
 			<view class="small_title"><text></text><text>预警通知</text></view>
-			<view class="note_li" style="margin-top:20rpx;">
+			<view class="note_li" style="margin-top:20rpx;" >
+				<text>声光报警通知</text>
+				<view class="note_li_r" v-if="form.voiceBroadcast==1"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
+			</view>
+		</view>
+		<view class="note" v-if="(form.warningType==1 || form.warningType==4) && form.warningSubType==1">
+			<view class="small_title"><text></text><text>预警通知</text></view>
+			<view class="note_li" style="margin-top:20rpx;" >
 				<text>语音播报</text>
 				<view class="note_li_r" v-if="form.voiceBroadcast==1"><img  src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
 			</view>
@@ -162,22 +169,24 @@ export default {
 	}
   },
   onLoad(option) {
+	  let self = this;
 	  if(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');
+		 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() {
 	
@@ -219,7 +228,8 @@ export default {
 		//获取详情
 		async getInfo(){
 		    let _this = this;
-			const {data} = await warningNoticeLogDetail({id:this.warningId})
+			console.log(_this.warningId)
+			const {data} = await warningNoticeLogDetail({id:_this.warningId})
 			if(data.code==200){
 				let res=data.data
 				this.form=res;

+ 1 - 1
pages/earlyWarningManage/earlyWarningList.vue

@@ -17,7 +17,7 @@
 				<view class="list_li_b">
 					<view class="list_li_b_t">
 						<text>{{item2.subName}}</text>
-						<text>{{item2.warningTime}}</text>
+						<text>{{item2.warningTime.split(' ')[1]}}</text>
 					</view>
 					<view class="list_li_b_b">
 						<img src="@/images/Version2.2/icon_wtzg_xx.png"/>

+ 37 - 27
pages/earlyWarningManage/videoMonitoring.vue

@@ -3,7 +3,7 @@
   <view class="earlyWarning">
 	<scroll-view scroll-x @scrolltolower="scrollGet"  class="header">
 		<view class="tabTitle_tow">
-			<view class="tabTitle_tow_li" @tap="tabClickTow(item,index)"  :key="index" v-for="(item,index) in tabTextTow">
+			<view class="tabTitle_tow_li" @tap="tabClickTow(item,index)"  :key="index" v-for="(item,index) in videoHardwareList">
 				<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
 				<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
 			</view>
@@ -48,7 +48,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import {laboratoryInfo,getCameraByFloor,GetStartList,getDeviceListBySub} from '@/api/index.js'
+import {laboratoryInfo,getCameraByFloor,GetStartList,getDeviceListBySub,sparseHardwareList} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -67,8 +67,10 @@ export default {
 		liveType: false,
 		sendLock: true, //发送锁,当为true时上锁,false时解锁发送
 		recorderManager: wx.getRecorderManager(),
+		videoHardwareList:[],//获取所有摄像头编码
+		hardwareList:[],//硬件列表
 		subId:'96',
-		floorId:'5',
+		floorId:'58',
 		
 	}
   },
@@ -83,13 +85,16 @@ export default {
   },
   mounted(){
 	 
-	  this.laboratoryInfo()
-	  this.getDeviceList()
+	  //this.laboratoryInfo()
+	  //this.getDeviceList()
+	  //this.getCameraByFloor()
+	  this.sparseHardwareList()
   },
   methods: {
 		//顶部tab点击
 		tabClickTow(item,index) {
 			this.curTabTow = index;
+			this.GetStartList(item)
 			
 		},
 		//滚动事件
@@ -111,12 +116,27 @@ export default {
 		    let list = data.data[0];
 		    list.labHardwareVOList.forEach(function(item) {
 		      if (item.hardwareTypeEnum.enumName == 'VIDEO_MONITOR') {
-		        _this.videoHardwareNUM.push(item)
+				_this.videoHardwareList.push({name:item.hardwareName,num:item.hardwareNUM})
 		      }
 		    })
+		    _this.GetStartList(_this.videoHardwareList[0])
+			console.log(_this.videoHardwareList)
+		  }
+		},
 		
-		    //this.getCameraByFloor();
-		    this.GetStartList(_this.videoHardwareNUM);
+		//获取疏散硬件列表
+		async sparseHardwareList() {
+		  let _this = this;
+		  const {
+		    data
+		  } = await sparseHardwareList()
+		  if (data.code == 200) {
+			if(data.rows[0]){
+			   this.hardwareList=data.rows;
+			   this.getCameraByFloor();
+			}else{
+			  this.laboratoryInfo();	
+			}
 		  }
 		},
 		//获取楼层摄像头列表
@@ -128,21 +148,14 @@ export default {
 		    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);
-		    }
+			  for(let i=0;i<data.data.length;i++){
+				for(let k=0;k<_this.hardwareList.length;k++){
+					if(data.data[i]==_this.hardwareList[k].hardwareNum){
+						_this.videoHardwareList.push({name:_this.hardwareList[k].name,num:_this.hardwareList[k].hardwareNum})
+					}		  
+				}
+			  }
+			  this.laboratoryInfo()
 		  }
 		},
 		async GetStartList(rows) {
@@ -151,10 +164,7 @@ export default {
 		  if(!rows[0]){
 			return
 		  }
-		  let list = "";
-		  for (let i = 0; i < rows.length; i++) {
-		    list = list + rows[i].hardwareNUM + ","
-		  }
+		  let list = rows.num;
 		  let obj = {
 		    page: "1",
 		    count: "100",