heyang 2 rokov pred
rodič
commit
8500a8b8c7

+ 39 - 8
App.vue

@@ -41,7 +41,9 @@
             mqttDeviceData:{},
 			warnData:{},
 			lineData:{},
-			mqttOutfireData:{},
+			mqttfireData:{},//灭火传感器状态异常
+			mqttOnlineData:{},//设备是否在线
+			mqttPerformData:{},//是否正在执行灭火操作
         },
         methods: {
 			//删除报警监听
@@ -64,9 +66,17 @@
             deleteLineData(){
                 delete this.watchObj.lineData;
             },
-			//删除一键灭火
-			deleteOutfireData(){
-			    delete this.watchObj.mqttOutfireData;
+			//删除一键灭火-传感器状态
+			deletefireData(){
+			    delete this.watchObj.mqttfireData;
+			},
+			//删除一键灭火-设备是否在线
+			deleteOnlineData(){
+			    delete this.watchObj.mqttOnlineData;
+			},
+			//删除一键灭火-是否正在执行灭火
+			deletePerformData(){
+			    delete this.watchObj.mqttPerformData;
 			},
             //监听对应的mqtt数据
             watch:function(method,istr){
@@ -146,11 +156,26 @@
 							    }
 							});
 						}else if(self.mqttIdList[i].type == 'lab/fireDevice/Warn/'){
-							self.client.subscribe(self.mqttIdList[i].type+'#', (err) => {
+							self.client.subscribe(self.mqttIdList[i].type+self.mqttIdList[i].fireCode, (err) => {
+							    if (!err) {
+							        console.log("火灾传感器状态-订阅成功",self.mqttIdList[i].type+self.mqttIdList[i].fireCode)
+							    }
+							});
+							
+						}else if(self.mqttIdList[i].type == 'lab/fireDevice/isOnline/'){
+							self.client.subscribe(self.mqttIdList[i].type+self.mqttIdList[i].fireCode, (err) => {
+							    if (!err) {
+							        console.log("火灾设备是否在线-订阅成功",self.mqttIdList[i].type+self.mqttIdList[i].fireCode)
+							    }
+							});
+							
+						}else if(self.mqttIdList[i].type == 'lab/fireDevice/executing/'){
+							self.client.subscribe(self.mqttIdList[i].type+self.mqttIdList[i].fireCode, (err) => {
 							    if (!err) {
-							        console.log("一键灭火订阅成功",self.mqttIdList[i].type)
+							        console.log("火灾是否正在执行灭火操作-订阅成功:",self.mqttIdList[i].type+self.mqttIdList[i].fireCode)
 							    }
 							});
+							
 						}
 					}
                 });
@@ -179,8 +204,14 @@
 							// console.log("应急",data);
 							this.globalData.lineData = data.data;
 						}else if(topic.search("lab/fireDevice/Warn/") != -1){
-							// console.log("一键灭火",data);
-							this.globalData.mqttOutfireData = data.data;
+							 console.log("一键灭火-传感器状态",data);
+							this.globalData.mqttfireData = data;
+						}else if(topic.search("lab/fireDevice/isOnline/") != -1){
+							 console.log("一键灭火-设备是否在线",data);
+							this.globalData.mqttOnlineData = data;
+						}else if(topic.search("lab/fireDevice/executing/") != -1){
+							 console.log("一键灭火-是否正在执行灭火",data);
+							this.globalData.mqttPerformData = data;
 						}else if(topic == 'lab/bigview'){
 							// console.log("报警",data);
 							if(data.data == 'SUB_RISKPLAN_GROUP'){

+ 2 - 2
api/request/config.js

@@ -9,12 +9,12 @@ const config = {
 	// base_url: 'https://demo.sxitdlc.com/xzgd/',
 
 	// base_url: 'https://lab.sxitdlc.com/labNhSystem/',//43服务器高升测试
-	 base_url: 'https://lab.sxitdlc.com/labAppTest',//43服务器线上
+	// base_url: 'https://lab.sxitdlc.com/labAppTest',//43服务器线上
     //base_url: 'https://lab.sxitdlc.com/appTest/',//88服务器线上
 	//base_url: 'https://lab.sxitdlc.com/labSystem/', //矿大地址
 	// base_url: 'https://lab.sxitdlc.com/jdlabSystem/', //交大地址
     // base_url: 'https://lab.sxitdlc.com/jndxlabSystem/', //暨大地址
      //  base_url: 'https://lab.sxitdlc.com/kdwclabSystem/', //矿大文昌地址
-     //  base_url: 'https://lab.sxitdlc.com/sudalabSystem/', //苏大临时地址
+    base_url: 'https://lab.sxitdlc.com/sudalabSystem/', //苏大临时地址
 }
 export { config }

BIN
images/Version3.0/img_gysglpt_bg.png


BIN
images/Version3.0/img_sydj_sltp.png


BIN
images/kuangdaMap/map1.png


BIN
images/kuangdaMap/map2.png


BIN
images/kuangdaMap/map3.png


BIN
images/kuangdaMap/map4.png


+ 1 - 12
pages.json

@@ -9,18 +9,7 @@
 				"navigationBarBackgroundColor": "#0183FA" //导航背景色
 			}
 		},
-		{
-			"path": "pages/alarmInfo/alarmInfo",//报警信息
-			"style": {
-				"navigationBarTitleText": "报警信息"
-			}
-		},
-		{
-			"path": "pages/alarmInfo/alarmInfoMonitor",//报警信息
-			"style": {
-				"navigationBarTitleText": "视频监控"
-			}
-		},
+		
 	
 		
 

+ 24 - 18
pages/emergencyEvacuationBig.vue

@@ -552,15 +552,15 @@ export default {
     async treeselectByUser(option) {
       const { data } = await getBuildOrFloorList({type:2,parentId:''})
       this.$set(this, 'buildingList', data.data);
-      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.$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.selectTriggerInfo(1);
     },
     //获取楼层数据
@@ -722,14 +722,14 @@ export default {
       } = await GetStartList(obj)
       if (data.code == 200) {
         let list = [];
-        for (let i = 0; i < data.data.length; i++) {
+       for(let i=0;i<data.data.data.length;i++){
           let text = uni.getStorageSync('cameraUrl');
-          let url = data.data[i].result.body.data.hls;
+           let url = data.data.data[i].hls;
           url = url.split("rtp/");
           let newUrl = text + 'rtp/' + url[1];
           let obj = {
             name: "楼道监控" + (i + 1),
-            id: data.data[i].result.body.data.deviceID,
+             id:data.data.data[i].deviceID,
             url: newUrl,
           }
           list.push(obj)
@@ -858,7 +858,7 @@ export default {
     async uploadImg(tempFilePaths) {
       var self = this;
       uni.uploadFile({
-        url: config.base_url + '/file/upload', //仅为示例,非真实的接口地址
+        url: config.base_url + '/base/file/upload', //仅为示例,非真实的接口地址
         header: {
           'Authorization': uni.getStorageSync('token')
         },
@@ -1319,15 +1319,20 @@ export default {
             //设备在线状态
             console.log('设备在线状态');
           }else if(topic == (self.firePerformTopic + self.fireCode)){
-            console.log('灭火中')
+            console.log('灭火中'+data.fireStatus)
             //灭火执行操作
             if(data.fireStatus == 1){
               if(!self.fireStartType){
                 self.$set(self,'fireStartType',true);
                 self.sendCode2(data.direTime);
-              }else if(data.fireStatus == 0){
-                self.msgError('一键灭火启动失败')
               }
+            }else if(data.fireStatus == 0){
+				uni.showToast({
+				  title: '一键灭火启动失败',
+				  icon: "none",
+				  mask: true,
+				  duration: 2000
+				});
             }
           }
         }
@@ -1979,7 +1984,7 @@ export default {
 
           .trumpet-for-box {
             display: inline-block;
-            width: 200rpx;
+             width: auto;
             height: 60rpx;
             line-height: 60rpx;
             font-size: 24rpx;
@@ -1993,7 +1998,8 @@ export default {
             justify-content: center;
             margin-right: 20rpx;
             margin-bottom: 10rpx;
-
+			padding: 0 12rpx;
+		  box-sizing: border-box;
             >img {
               width: 36rpx;
               height: 34rpx;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1454
pages/emergencyEvacuationBig/emergencyEvacuationBig.vue


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1571
pages/emergencyEvacuationBig/emergencyEvacuationBigOne.vue


+ 424 - 7
pages_manage/workbench/laboratory/laboratoryInfo.vue

@@ -26,6 +26,43 @@
         </view>
       </view>
     </view>
+	<!-- 一键灭火 -->
+	<view class="outfire" v-if='fireType'>
+	  <view class="outfire_li" v-if="!fireListType">
+	    <img src="@/images/icon_sy_wt.png">
+	    <text style="color: #FF7B1A;">设备已离线,请及时处理。</text>
+	  </view>
+	  <view class="outfire_li" v-if="fireStartType">
+	    <img src="@/images/icon_sy_mhwc.png">
+	    <text style="color: #FF2333;">灭火中,灭火程序将于<text>{{conductCountdown}}</text>秒后结束</text>
+	  </view>
+	  <view class="outfire_li" v-if="outfireEnd">
+	    <img src="@/images/icon_sy_mhwc.png">
+	    <text style="color: #FF2333;">灭火完成,请您及时补充灭火设备耗材</text>
+	  </view>
+	  <template v-if="fireListType && !fireStartType && !outfireEnd">
+	    <view class="outfire_li">
+	      <img v-if='!outfireData.smoke' src="@/images/icon_yw_zc.png">
+	      <img v-if='outfireData.smoke' src="@/images/icon_yw_yc.png">
+	      <text
+	          :class="outfireData.smoke?'abnormal':'normal'">{{outfireData.smoke?'有烟雾':'无烟雾'}}</text>
+	    </view>
+	    <view class="outfire_li">
+	      <img v-if='!outfireData.temperature' src="@/images/icon_wd_zc.png">
+	      <img v-if='outfireData.temperature' src="@/images/icon_wd_yc.png">
+	      <text
+	          :class="outfireData.temperature?'abnormal':'normal'">{{outfireData.temperature?'温度异常':'温度正常'}}</text>
+	    </view>
+	    <view class="outfire_li">
+	      <img v-if='!outfireData.fire' src="@/images/icon_hy_zc.png">
+	      <img v-if='outfireData.fire' src="@/images/icon_hy_yc.png">
+	      <text :class="outfireData.fire?'abnormal':'normal'">{{outfireData.fire?'发现火焰':'无火焰'}}</text>
+	    </view>
+	  </template>
+	  <view v-if="fireListType && !fireStartType && !outfireEnd"
+	        :class="fireListType?'outfire_yes_btn':'outfire_no_btn'" @click="outfireFun()">一键灭火
+	  </view>
+	</view>
     <view class="control-max-box" v-if="!saoCodeType">
       <view class="title-max-box">
         <view class="left-view"></view>
@@ -40,7 +77,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' && minItem.hardwareTypeEnum.enumName!='RFID_RECOGNIZER'&& minItem.hardwareTypeEnum.enumName!='AI_TERMINAL'&& minItem.hardwareTypeEnum.enumName!='AI_DOORLOCK'&& minItem.hardwareTypeEnum.enumName!='AI_CABINETLOCK'">
+        <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' && minItem.hardwareName!='一键灭火'">
           <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')">
@@ -110,13 +147,22 @@
         </view>
       </view>
     </view>
+	<!-- 一键灭火遮罩-->
+	<view class="shade-outfire" v-if="dialogVisible">
+	  <view class="null-box" @click="dialogOutfire()"></view>
+	  <view class="shade-outfire-n">
+	    <img class="shade-outfire-n-t" src="@/images/icon_mh.png" />
+	    <view class="shade-outfire-n-m">一键灭火启动中,倒计时<text>{{countdown}}</text>秒</view>
+	    <view class="shade-outfire-n-b" @click="cancelOutfire()">放弃一键灭火</view>
+	  </view>
+	</view>
   </view>
 </template>
 
 <script>
 import $mqtt from '@/utils/mqtt.min.js';
 import { config } from '@/api/request/config.js'
-import { mySubjectList,subject_class,listDepartments,mangerControl,getDicts,laboratoryInfo } from '@/api/index.js'
+import { mySubjectList,subject_class,listDepartments,mangerControl,getDicts,laboratoryInfo,firedeviceStatus,firedeviceStart,firedeviceCancel} from '@/api/index.js'
 export default {
   data() {
     return {
@@ -136,12 +182,43 @@ export default {
       extinguishingKeyPoints:[],
       deptId:"",
       saoCodeType:false,
+	  
+	  countdown: '', //倒计时
+	  timer2: null, //倒计时
+	  dialogVisible: false, //一键灭火弹出层
+	  
+	  conductCountdown: '',
+	  timer3: null, //倒计时
+	  outfireEnd: false, //灭火结束状态
+	  //新布局地图相关数据
+	  zoomData: null,
+	  mapType:false,
+	  mapList: [],
+	  mapWidth: null, //40边框距离
+	  mapHeight: null, //40边框距离
+	  //新MQTT
+	  floorClient: {},
+	  evacuationTopic: "lab/newexit/line", //疏散
+	  //灭火设备MQTT相关
+	  fireClient:{},
+	  fireTopic:"lab/fireDevice/Warn/",//传感器状态异常
+	  fireOnlineTopic:"lab/fireDevice/isOnline/",//设备是否在线
+	  firePerformTopic:"lab/fireDevice/executing/",//是否正在执行灭火操作
+	  
+	  
+	  fireType:false,//有无火焰设备状态
+	  fireListType:false,//灭火设备在线离线
+	  fireCode:null,// //灭火设备code
+	  fireStartType:false, //灭火启动状态
+	  outfireData: {}, //一键灭火
+	  subId:'',
     }
   },
   onLoad(option) {
     let self = this;
     if(uni.getStorageSync('saoCodeId')){
       this.saoCodeType = true;
+	  this.subId=uni.getStorageSync('saoCodeId');
       this.laboratoryInfo();
     }else{
       if(option.q){
@@ -152,11 +229,13 @@ export default {
         let list = newList[0].split("=")[1].split("-")
         codeId = list[0];
         uni.setStorageSync('saoCodeId',codeId)
+		this.subId=uni.getStorageSync('saoCodeId');
         this.saoCodeType = true;
         this.laboratoryInfo();
       }else{
         this.deptId = JSON.parse(decodeURIComponent(option.deptId));
         this.itemData = JSON.parse(decodeURIComponent(option.item));
+		this.subId=this.itemData.id;
         self.itemData.videoNum = 0;
         self.itemData.hardwareNUM = "";
         for(let i=0;i<self.itemData.labHardwareVOList.length;i++){
@@ -210,6 +289,7 @@ export default {
         this.saoCodeType = false;
       }
     }
+	this.firedeviceStatus();
 
   },
   onShow(){
@@ -218,10 +298,159 @@ export default {
       getApp().watch(this.getMqttSensorData,'mqttSensorData')
       // //监听设备信息
       getApp().watch(this.getMqttDeviceData,'mqttDeviceData')
+	  //一键灭火-灭火传感器状态异常
+      getApp().watch(this.getMqttfireData,'mqttfireData')
+	  //一键灭火-是否正在执行灭火操作
+      getApp().watch(this.getMqttPerformData,'mqttPerformData')
     }
-	this.mqttInfo()
+	
   },
   methods: {
+	  //一键灭火-查询设备状态
+	  async firedeviceStatus() {
+	    let _this = this;
+	  
+	    const {data} = await firedeviceStatus(_this.subId)
+	    if (data.code == 200) {
+	      if(data.data.isexist){//是否有灭火设备
+	        this.$set(this,'fireType',data.data.isexist);
+	        if(data.data.online){
+	          _this.outfireData = data.data
+	          _this.$set(this,'fireListType',data.data.online);
+	          _this.$set(this,'fireCode',data.data.fireDevice.deviceCode);
+	          if(data.data.temperature && data.data.smoke){
+	            if(!this.fireStartType){
+	              this.$set(this,'fireStartType',true);
+	              this.sendCode2(data.data.timeDifference);
+	            }
+	          }
+	        }else{
+	          this.$set(this,'fireListType',false);
+	          this.$set(this,'fireCode',null);
+	        }
+	      }else{
+	        this.$set(this,'fireType',false);
+	      }
+		  this.mqttInfo()
+	    }
+	  },
+	  //启动灭火设备
+	  async firedeviceStart() {
+	    let _this = this;
+	    let obj={
+	      subjectId:this.subId,
+	      deviceCode:_this.fireCode
+	    }
+	    const {data} = await firedeviceStart(obj)
+	    if (data.code == 200) {
+	      if (data.data.online) {
+	        _this.dialogVisible = true;
+	        _this.$set(this,'fireListType',data.data.online);
+	        _this.countdown = data.data.waitTime;//灭火倒计时
+	        _this.sendCode() //倒计时
+	  
+	      } else {
+	        wx.showToast({
+	          title: '一键灭火启动失败!',
+	          icon: "none",
+	          duration: 6000
+	        });
+	      }
+	    }
+	  },
+	  //取消灭火设备
+	  async firedeviceCancel() {
+	    let _this = this;
+	    const {data} = await firedeviceCancel(_this.itemData.subjectId)
+	    if (data.code == 200) {
+	      wx.showToast({
+	        title: '放弃一键灭火!',
+	        icon: "none",
+	        duration: 2000
+	      });
+	    }
+	  },
+	  //一键灭火按钮
+	  outfireFun() {
+	    let _this = this;
+	    uni.showModal({
+	      title: "是否确认执行一键灭火?",
+	      content: '该操作存在风险,请您务必确认实验室内人员已安全撤离?',
+	      cancelColor: "#999",
+	      confirmColor: "#0183FA",
+	      success: function(res) {
+	        if (res.confirm) {
+	          _this.firedeviceStart(); //启动灭火设备
+	  
+	        } else if (res.cancel) {
+	  
+	        }
+	      }
+	    });
+	  
+	  },
+	  //一键灭火弹出层关闭
+	  dialogOutfire() {
+	    this.dialogVisible = !this.dialogVisible
+	    this.clearTimer(); //关闭定时器
+	  },
+	  //取消一键灭火
+	  cancelOutfire() {
+	    this.dialogVisible = false;
+	    this.clearTimer(); //关闭定时器
+	    this.firedeviceCancel()
+	  },
+	  //倒计时
+	  sendCode() {
+	    let _this = this;
+	    _this.loading(); //启动定时器
+	    _this.timer2 = setInterval(() => {
+	      //创建定时器
+	      if (_this.countdown === 1) {
+	        _this.clearTimer(); //关闭定时器
+	      } else {
+	        _this.loading();
+	      }
+	    }, 1000);
+	  },
+	  loading() {
+	    //启动定时器
+	    this.countdown--; //定时器减1
+	  },
+	  clearTimer() {
+	    //清除定时器
+	    clearInterval(this.timer2);
+	    this.timer2 = null;
+	    this.dialogVisible = false;
+	  
+	  },
+	  //进行中倒计时
+	  sendCode2(time) {
+	    let _this = this;
+	    _this.conductCountdown=time
+	    _this.loading2(); //启动定时器
+	    _this.timer3 = setInterval(() => {
+	      //创建定时器
+	      if (_this.conductCountdown === 1) {
+	        _this.clearTimer2(); //关闭定时器
+	        _this.outfireEnd = true; //灭火倒计时结束
+	        _this.fireStartType = false; //灭火状态
+	  
+	        console.log()
+	      } else {
+	        _this.loading2();
+	      }
+	    }, 1000);
+	  },
+	  loading2() {
+	    //启动定时器
+	    this.conductCountdown--; //定时器减1
+	  },
+	  clearTimer2() {
+	    //清除定时器
+	    clearInterval(this.timer3);
+	    this.timer3 = null;
+	  },
 	//详情页面MQTT
 	mqttInfo(){
 		let list = [];
@@ -233,8 +462,23 @@ export default {
 			type:"lab/hardware/data",
 			idList:[this.itemData.id],
 		}
+		let objTow = {
+			type:"lab/fireDevice/Warn/",
+			fireCode:this.fireCode,
+		}
+		let objThree = {
+			type:"lab/fireDevice/isOnline/",
+			fireCode:this.fireCode,
+		}
+		let objFour = {
+			type:"lab/fireDevice/executing/",
+			fireCode:this.fireCode,
+		}
 		list.push(obj);
 		list.push(objOne);
+		list.push(objTow);
+		list.push(objThree);
+		list.push(objFour);
 		// mqtt订阅因为返回数据频率问题 暂时取消列表的MQTT刷新
 		getApp().appMqttOn(1,list);
 	},
@@ -293,6 +537,36 @@ export default {
         this.infoMaxBoxType = true;
       }
     },
+	//一键灭火-传感器状态异常
+	getMqttfireData(val){
+		let self = this;
+		if(val){
+			//传感器状态
+			console.log('传感器状态');
+			self.firedeviceStatus();
+		}
+	},
+	//一键灭火-是否正在执行灭火操作
+	getMqttPerformData(val){
+		let self = this;
+		debugger
+		if(val){
+			//灭火执行操作
+			if(val.fireStatus == 1){
+			  if(!self.fireStartType){
+			    self.$set(self,'fireStartType',true);
+			    self.sendCode2(val.direTime);
+			  }else if(val.fireStatus == 0){
+				uni.showToast({
+				  title: '一键灭火启动失败',
+				  icon: "none",
+				  mask: true,
+				  duration: 2000
+				});
+			  }
+			}
+		}
+	},
     //监听传感器信息
     getMqttSensorData(val){
       let self = this;
@@ -498,14 +772,25 @@ export default {
     getApp().deleteSensorWatch();
     // //删除设备监听
     getApp().deleteDeviceWatch();
-    console.log("onHide",this.mtopic);
+	//删除一键灭火-传感器状态
+	getApp().deletefireData();
+	//删除一键灭火-设备是否在线
+	getApp().deleteOnlineData();
+	//删除一键灭火-是否正在执行灭火
+	getApp().deletePerformData();
+   
   },
   beforeDestroy(){
     // //删除传感器监听
     getApp().deleteSensorWatch();
     // //删除设备监听
     getApp().deleteDeviceWatch();
-    console.log("beforeDestroy",this.mtopic);
+	//删除一键灭火-传感器状态
+	getApp().deletefireData();
+	//删除一键灭火-设备是否在线
+	getApp().deleteOnlineData();
+	//删除一键灭火-是否正在执行灭火
+	getApp().deletePerformData();
   }
 }
 </script>
@@ -513,8 +798,140 @@ export default {
 <style lang="stylus" scoped>
 #laboratoryInfo{
   height:100%;
-  display flex
-  flex-direction column
+  display flex;
+  flex-direction column;
+  /* 一键灭火 */
+  .outfire {
+    width: 750rpx;
+    height: auto;
+    background: #FFFFFF;
+    margin: 20rpx 0;
+    padding: 20rpx 10rpx;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  
+    .outfire_li {
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+  
+      >img {
+        width: 24rpx;
+        height: 30rpx;
+        margin-right: 12rpx;
+      }
+  
+      .normal {
+        font-size: 24rpx;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #333333;
+      }
+  
+      .abnormal {
+        font-size: 24rpx;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #F11C00;
+      }
+    }
+  
+    .outfire_li:nth-of-type(1) {
+      >img {
+        width: 30rpx;
+        height: 28rpx;
+        margin-right: 12rpx;
+      }
+    }
+  
+    .outfire_yes_btn {
+      width: 120rpx;
+      height: 40rpx;
+      font-size: 24rpx;
+      font-family: PingFang SC;
+      font-weight: 500;
+      color: #F21C00;
+      line-height: 40rpx;
+      border: 1px solid #F21C00;
+      border-radius: 8rpx;
+      text-align: center;
+      margin-left: 54rpx;
+    }
+  
+    .outfire_no_btn {
+      width: 120rpx;
+      height: 40rpx;
+      font-size: 24rpx;
+      font-family: PingFang SC;
+      font-weight: 500;
+      color: #CCCCCC;
+      line-height: 40rpx;
+      border: 1px solid #E0E0E0;
+      border-radius: 8rpx;
+      text-align: center;
+      margin-left: 54rpx;
+    }
+  }
+  /* 一键灭火 */
+  .shade-outfire {
+    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;
+    }
+    .shade-outfire-n {
+      width: 625rpx;
+      height: 450rpx;
+      background: #FFFFFF;
+      border-radius: 20rpx;
+      position: absolute;
+      top: 370rpx;
+      left: 62rpx;
+  
+      .shade-outfire-n-t {
+        width: 172rpx;
+        height: 172rpx;
+        margin: 38rpx 0 0 226rpx;
+      }
+  
+      .shade-outfire-n-m {
+        font-size: 30rpx;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #E30000;
+        line-height: 84rpx;
+        text-align: center;
+        border-bottom: 1px solid #E0E0E0;
+  
+        >text {
+          font-size: 40rpx;
+        }
+      }
+  
+      .shade-outfire-n-b {
+        width: 402rpx;
+        height: 82rpx;
+        background: #FFFFFF;
+        border: 2rpx solid #0183FA;
+        border-radius: 10rpx;
+        font-size: 28rpx;
+        line-height: 82rpx;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #0183FA;
+        text-align: center;
+        margin: 30rpx 0 0 112rpx;
+      }
+    }
+  }
   .name-max-box{
     background #fff
     .title-box{

+ 7 - 4
pages_manage/workbench/laboratory/monitor.vue

@@ -365,13 +365,13 @@ export default {
       const {data} = await GetStartList(obj);
       if(data.code == 200){
         let list = [];
-        for(let i=0;i<data.data.length;i++){
+        for(let i=0;i<data.data.data.length;i++){
           let text = uni.getStorageSync('cameraUrl');
-          let url = data.data[i].result.body.data.hls;
+          let url = data.data.data[i].hls;
           url = url.split("rtp/");
           let newUrl = text+'rtp/'+url[1];
           let obj = {
-            id:data.data[i].result.body.data.deviceID,
+            id:data.data.data[i].deviceID,
             url:newUrl,
           }
           list.push(obj)
@@ -476,7 +476,8 @@ export default {
         margin-top :22rpx;
         .trumpet-for-box{
           display:inline-block !important;
-          width:204rpx;
+          //width:204rpx;
+		  width: auto;
           height:60rpx;
           line-height:60rpx;
           font-size:24rpx;
@@ -489,6 +490,8 @@ export default {
           justify-content :center;
           // margin-right :30rpx;
           margin: 10rpx 16rpx;
+		  padding: 0 12rpx;
+		  box-sizing: border-box;
           .trumpet-for-min-box{
             display flex
             >img{

+ 13 - 30
utils/secret.js

@@ -1,46 +1,29 @@
 //引入crypto-js
 //const CryptoJS = require('crypto-js');
 import CryptoJS from '@/utils/crypto-js.js';	
-//十六位十六进制数作为密钥(秘钥为随机生成,必须与后端保持一致!)
-const key = CryptoJS.enc.Utf8.parse("J4ny0Ja678Y7P2so");
-//十六位十六进制数作为密钥偏移量(秘钥为随机生成,必须与后端保持一致!)
-const iv = CryptoJS.enc.Utf8.parse('pTNorfvZW2UZJbd0');
+
+// //十六位十六进制数作为密钥(秘钥为随机生成,必须与后端保持一致!)
+// const key = 'J4ny0Ja678Y7P2so';
+// //十六位十六进制数作为密钥偏移量(秘钥为随机生成,必须与后端保持一致!)
+// const iv = 'pTNorfvZW2UZJbd0';
+
+const key = CryptoJS.enc.Utf8.parse("J4ny0Ja678Y7P2so");  //十六位十六进制数作为密钥
+const iv = CryptoJS.enc.Utf8.parse('pTNorfvZW2UZJbd0');   //十六位十六进制数作为密钥偏移量
 
 //解密方法
 function Decrypt(word) {
-  // 先将 Base64 还原一下, 因为加密的时候做了一些字符的替换
-  const restoreBase64 = word.replace(/\-/g,'+').replace(/_/g,'/');
-  // 这里 mode, padding, iv 一定要跟加密的时候完全一样
-  // 返回的是一个解密后的对象
-  let decrypt = CryptoJS.AES.decrypt(restoreBase64, key, {
-    iv: iv,
-    mode: CryptoJS.mode.CBC,
-    padding: CryptoJS.pad.Pkcs7
-  });
-  // 将解密对象转换成 UTF8 的字符串
+  let encryptedHexStr = CryptoJS.enc.Hex.parse(word);
+  let srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
+  let decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
   let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
-  // 返回解密结果
   return decryptedStr.toString();
 }
 
 //加密方法
 function Encrypt(word) {
   let srcs = CryptoJS.enc.Utf8.parse(word);
-  /**
-   * CipherOption, 加密的一些选项:
-   *   mode: 加密模式, 可取值(CBC, CFB, CTR, CTRGladman, OFB, ECB), 都在 CryptoJS.mode 对象下
-   *   padding: 填充方式, 可取值(Pkcs7, AnsiX923, Iso10126, Iso97971, ZeroPadding, NoPadding), 都在 CryptoJS.pad 对象下
-   *   iv: 偏移量, mode === ECB 时, 不需要 iv
-   * 	返回的是一个加密对象
-   */
-  let encrypted = CryptoJS.AES.encrypt(srcs, key,
-    {
-      iv: iv,
-      mode: CryptoJS.mode.CBC,
-      padding: CryptoJS.pad.Pkcs7
-    });
-  //将结果进行base64加密
-  return encrypted.ciphertext.toString(CryptoJS.enc.Base64);
+  let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
+  return encrypted.ciphertext.toString().toUpperCase();
 }
 
 export {Decrypt , Encrypt}