emergencyEvacuationBig.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790
  1. <!-- 应急疏散 -->
  2. <template>
  3. <view id="emergencyEvacuationBig">
  4. <view class="setUpEvacuation" v-if="pageType == 1">
  5. <view class="evacuation-max-box">
  6. <view class="picker-max-box">
  7. <view class="picker-title-box">
  8. <view></view>
  9. <view>学院楼栋</view>
  10. </view>
  11. <picker @change="buildingChange"
  12. :range-key="'label'" :value="value" :range="buildingList">
  13. <view class="picker-min-box">
  14. <view>{{buildingName?buildingName:'请选择学院楼栋'}}</view>
  15. <img src="@/images/icon_06.png">
  16. </view>
  17. </picker>
  18. </view>
  19. <view class="picker-max-box">
  20. <view class="picker-title-box">
  21. <view></view>
  22. <view>楼层</view>
  23. </view>
  24. <picker @change="floorChange" :disabled="!buildingId"
  25. :range-key="'name'" :value="id" :range="floorList">
  26. <view class="picker-min-box">
  27. <view>{{floorName?floorName:'请选择楼层'}}</view>
  28. <img src="@/images/icon_06.png">
  29. </view>
  30. </picker>
  31. </view>
  32. <view class="picker-max-box">
  33. <view class="picker-title-box">
  34. <view></view>
  35. <view>实验室</view>
  36. </view>
  37. <picker @change="fjListChange" :disabled="!floorId"
  38. :range-key="'subjectName'" :value="id" :range="fjListArray">
  39. <view class="picker-min-box">
  40. <view>{{subName?subName:'请选择实验室'}}</view>
  41. <img src="@/images/icon_06.png">
  42. </view>
  43. </picker>
  44. </view>
  45. </view>
  46. <view class="setUpEvacuation-bottom-button" @click="confirmBtn">确认</view>
  47. </view>
  48. <view class="implementEvacuation" v-if="pageType == 2">
  49. <view class="evacuation-max-box">
  50. <!-- 头部 -->
  51. <view class="evacuation-title-box">
  52. <view class="evacuation-title-name-box">{{subName}}</view>
  53. <view class="site"><img src="@/images/icon_14.png">{{address}}</view>
  54. </view>
  55. <!-- 地图部分 -->
  56. <view class="roadmap">
  57. <view class="roadmap_t">
  58. <view class="monito_li_r_l">选择疏散路径</view>
  59. <view class="monito_li_r">
  60. <picker @change="buttonChange"
  61. :range-key="'name'" :value="id" :range="buttonArray">
  62. <view class="evacuation-title-button-box">
  63. <view :class="buttonArrayIndex?'colorB':'colorA'">{{buttonArrayIndex?buttonArray[buttonArrayIndex].name:'修改疏散路径'}}</view>
  64. <img src="@/images/icon_06.png">
  65. </view>
  66. </picker>
  67. </view>
  68. </view>
  69. <view class="evacuation-map-box">
  70. <view class="evacuation-map-big-box" :class="floorId==5?'map-1':(floorId==6?'map-2':(floorId==7?'map-3':''))">
  71. <view class="evacuation-map-min-for-box" :class="subId == item.subjectId?'evacuation-map-min-for-box-color':''"
  72. v-for="(item,index) in fjList" :key="index">{{item.room}}</view>
  73. <img class="map-min-img" src="@/images/Version2.3/icon_zjt.gif" v-show="lightList[0].type">
  74. <img class="map-min-img" src="@/images/Version2.3/icon_yjt.gif" v-show="lightList[1].type">
  75. <img class="map-min-img" src="@/images/Version2.3/icon_zjt.gif" v-show="lightList[2].type">
  76. <img class="map-min-img" src="@/images/Version2.3/icon_yjt.gif" v-show="lightList[3].type">
  77. <img class="map-min-img" src="@/images/Version2.3/icon_zjt.gif" v-show="lightList[4].type">
  78. <img class="map-min-img" src="@/images/Version2.3/icon_yjt.gif" v-show="lightList[5].type">
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 一键灭火 -->
  83. <view class="outfire" v-if='outfireData.isexist'>
  84. <view class="outfire_li" v-if="outfireData.online">
  85. <img src="@/images/icon_sy_wt.png">
  86. <text style="color: #FF7B1A;">设备已离线,请及时处理。</text>
  87. </view>
  88. <view class="outfire_li" v-if="outfireData.outfireing">
  89. <img src="@/images/icon_sy_mhwc.png">
  90. <text style="color: #FF2333;">灭火中,灭火程序将于<text>{{conductCountdown}}</text>秒后结束</text>
  91. </view>
  92. <view class="outfire_li" v-if="outfireEnd">
  93. <img src="@/images/icon_sy_mhwc.png">
  94. <text style="color: #FF2333;">灭火完成,请您及时补充灭火设备耗材</text>
  95. </view>
  96. <template v-if="!outfireData.online && !outfireData.outfireing && !outfireEnd">
  97. <view class="outfire_li">
  98. <img v-if='!outfireData.smoke' src="@/images/icon_yw_zc.png">
  99. <img v-if='outfireData.smoke' src="@/images/icon_yw_yc.png">
  100. <text :class="outfireData.smoke?'abnormal':'normal'">{{outfireData.smoke?'有烟雾':'无烟雾'}}</text>
  101. </view>
  102. <view class="outfire_li">
  103. <img v-if='!outfireData.temperature' src="@/images/icon_wd_zc.png">
  104. <img v-if='outfireData.temperature' src="@/images/icon_wd_yc.png">
  105. <text :class="outfireData.temperature?'abnormal':'normal'">{{outfireData.temperature?'温度异常':'温度正常'}}</text>
  106. </view>
  107. <view class="outfire_li">
  108. <img v-if='!outfireData.fire' src="@/images/icon_hy_zc.png">
  109. <img v-if='outfireData.fire' src="@/images/icon_hy_yc.png">
  110. <text :class="outfireData.fire?'abnormal':'normal'">{{outfireData.fire?'发现火焰':'无火焰'}}</text>
  111. </view>
  112. </template>
  113. <view v-if="!outfireData.online && !outfireData.outfireing && !outfireEnd" :class="!outfireData.online?'outfire_yes_btn':'outfire_no_btn'" @click="outfireFun()">一键灭火</view>
  114. </view>
  115. <!-- 视频部分 -->
  116. <view class="video-max-box" v-if="urlList[0]">
  117. <video
  118. v-for="(item,index) in urlList" :key="index" :id="urlList.id" :src="item.url"
  119. :poster="videoCover"
  120. :custom-cache='false' :autoplay="true" :controls="true"
  121. :enable-danmu="false" :muted="true" :show-fullscreen-btn="true"
  122. :show-center-play-btn="false" :show-play-btn="false"
  123. @error="videoErrorCallback" >
  124. </video>
  125. </view>
  126. <view class="bottom-button-box">
  127. <view @click="shadeTypeClick()">语音广播</view>
  128. <view @click="lineEvacuate" v-if="isEvacuate">执行疏散</view>
  129. <view @click="closireButton" v-if="!isEvacuate">结束疏散</view>
  130. </view>
  131. </view>
  132. <!-- 语音广播-->
  133. <view class="shade-max-big-box" v-if="broadcastType">
  134. <view class="null-box" @click="shadeTypeClick()"></view>
  135. <!-- 语音广播-执行疏散 -->
  136. <view class="broadcast">
  137. <view class="broadcast_t">语音广播<label>选择喇叭位置</label></view>
  138. <!-- 按钮部分 -->
  139. <view class="trumpet-max-box">
  140. <view @click="trumpetClick(index)"
  141. class="trumpet-for-box" :class="item.type?'trumpet-color-a':'trumpet-color-b'"
  142. v-for="(item,index) in trumpetList" :key="index">
  143. <img src="@/images/icon_sskz_zc.png" v-if="!item.type">
  144. <img src="@/images/icon_sskz_xz.png" v-if="item.type">
  145. {{item.name}}
  146. </view>
  147. </view>
  148. <view class="broadcast_m">
  149. <view class="broadcast_m_t" :class="liveType?'broadcast_m_t_back_a':'broadcast_m_t_back_b'" @longpress.stop="recordButton" @touchmove.stop="cancelButton" @touchend.stop="sendButton">
  150. {{liveType?'松开发送':'按住说话'}}
  151. </view>
  152. <view class="broadcast_m_b" v-if="!liveType">按住说话,录入广播内容</view>
  153. <view class="broadcast_m_b" v-if="liveType">松开发送,向上滑动取消发送</view>
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 一键灭火遮罩-->
  158. <view class="shade-outfire" v-if="dialogVisible">
  159. <view class="null-box" @click="dialogOutfire()"></view>
  160. <view class="shade-outfire-n">
  161. <img class="shade-outfire-n-t" src="@/images/icon_mh.png"/>
  162. <view class="shade-outfire-n-m">一键灭火启动中,倒计时<text>{{countdown}}</text>秒</view>
  163. <view class="shade-outfire-n-b" @click="cancelOutfire()">放弃一键灭火</view>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. import $mqtt from '@/utils/mqtt.min.js';
  171. import { config } from '@/api/request/config.js'
  172. import { lablayout,evacuate,closure,lineEvacuate,getRedis,getDeviceList,textParseUrlIps,laboratoryInfo,
  173. getCameraByFloor,lineEvacuateTow,treeselectByUser,getBuilding,getDeviceListBySub,
  174. GetStartList,firedeviceStatus,firedeviceStatusTiming,firedeviceStart} from '@/api/index.js'
  175. export default {
  176. data() {
  177. return {
  178. videoCover:uni.getStorageSync('videoCover'),
  179. //页面状态
  180. pageType:"2",
  181. deptIndex:0,
  182. //院系楼栋数据
  183. buildingList:[],
  184. buildingName:"",
  185. buildingId:"",
  186. //楼层数据
  187. floorList:[],
  188. floorName:"",
  189. floorId:"",
  190. //实验室
  191. fjListArray:[],
  192. //疏散方向
  193. buttonArray:[
  194. {name:"向左疏散",id:"1"},
  195. {name:"向右疏散",id:"2"},
  196. {name:"两侧疏散",id:"0"},
  197. ],
  198. buttonArrayIndex:"2",
  199. //视频数据
  200. urlList:[],
  201. //布局数据
  202. fjList:[],
  203. lightList:[
  204. {
  205. id:"5",
  206. type:false,
  207. },
  208. {
  209. id:"2",
  210. type:false,
  211. },
  212. {
  213. id:"3",
  214. type:false,
  215. },
  216. {
  217. id:"4",
  218. type:false,
  219. },
  220. {
  221. id:"1",
  222. type:false,
  223. },
  224. {
  225. id:"6",
  226. type:false,
  227. },
  228. ],
  229. //接收参数
  230. subId:"",
  231. subName:"",
  232. title:"",
  233. type:"",
  234. //喇叭数据
  235. trumpetList:[],
  236. //广播相关
  237. liveType:false,
  238. sendLock: true, //发送锁,当为true时上锁,false时解锁发送
  239. recorderManager : wx.getRecorderManager(),
  240. isEvacuate:true,//疏散按钮控制,当为true时候执行疏散
  241. //滑动记录
  242. startPoint:{},
  243. //摄像头信息
  244. deptId:'',
  245. itemData:{
  246. hardwareNUM:'',
  247. name:'',
  248. },
  249. broadcastType:false,
  250. address:"",
  251. videoHardwareNUM:[],//实验室和楼道摄像头编码
  252. outfireData:{},//一键灭火
  253. countdown:'',//倒计时
  254. timer2: null,//倒计时
  255. dialogVisible:false,//一键灭火弹出层
  256. conductCountdown:'',
  257. timer3: null,//倒计时
  258. outfireEnd:false,//灭火结束状态
  259. }
  260. },
  261. onLoad(option) {
  262. let self = this;
  263. //一键灭火正式使用需要注销
  264. this.itemData.subjectId=85
  265. this.firedeviceStatus();
  266. //定时请求一键灭火设备状态
  267. this.treeselectByUser(option);
  268. this.getAppExitLine();
  269. // this.getAppOutfire();
  270. getApp().watch(this.getMqttLineData,'lineData');
  271. //判断入口(执行疏散)
  272. },
  273. onShow(){
  274. },
  275. onUnload(){
  276. },
  277. methods: {
  278. //根据账户信息查询学院楼栋数据
  279. async treeselectByUser(option){
  280. const {data} = await treeselectByUser()
  281. let list = [];
  282. for(let i=0;i<data.data.length;i++){
  283. for(let o=0;o<data.data[i].children.length;o++){
  284. let obj = {
  285. label:data.data[i].label+'-'+data.data[i].children[o].label,
  286. value:data.data[i].children[o].id,
  287. }
  288. list.push(obj);
  289. }
  290. }
  291. this.$set(this,'buildingList',list);
  292. this.$set(this,'buildingName',"");
  293. this.$set(this,'buildingId',"");
  294. this.$set(this,'deptId',"");
  295. this.$set(this,'floorList',[]);
  296. this.$set(this,'floorName',"");
  297. this.$set(this,'floorId',"");
  298. this.$set(this,'fjListArray',[]);
  299. this.$set(this,'subName',"");
  300. this.$set(this,'subId',"");
  301. // this.getBuilding(this.buildingId);
  302. if(option.item){
  303. let item = JSON.parse(decodeURIComponent(option.item));
  304. console.log("item",item)
  305. this.subId = item.subId;
  306. this.subName = item.subjectName;
  307. this.address = item.address
  308. this.buildingId = item.buildingId;
  309. this.deptId = item.buildingId;
  310. this.floorId = item.floorId;
  311. this.title = item.title;
  312. this.type = item.type;
  313. this.lablayout(this.buildingId,this.floorId);
  314. this.evacuateTwo();
  315. this.itemData.subjectId = item.subId;
  316. this.laboratoryInfo();
  317. this.firedeviceStatus();
  318. }else{
  319. //判断入口(首页按钮)
  320. this.getRedis();
  321. }
  322. },
  323. //一键灭火-查询设备状态
  324. async firedeviceStatus(){
  325. let _this=this;
  326. const {data} = await firedeviceStatus(_this.itemData.subjectId)
  327. if(data.code==200){
  328. _this.outfireData=data.data
  329. //灭火进行中倒计时
  330. if(_this.conductCountdown==30){
  331. _this.conductCountdown+=data.data.fireDevice.deviceCountDown
  332. _this.sendCode2()
  333. }
  334. }
  335. },
  336. //一键灭火-查询设备状态
  337. async firedeviceStatusTiming(){
  338. let _this=this;
  339. const {data} = await firedeviceStatusTiming(_this.outfireData.fireDevice.deviceCode)
  340. if(data.code==200){
  341. _this.outfireData.fire=data.data.fire
  342. _this.outfireData.online=data.data.online
  343. _this.outfireData.smoke=data.data.smoke
  344. _this.outfireData.temperature=data.data.temperature
  345. }
  346. },
  347. //启动灭火设备
  348. async firedeviceStart(){
  349. let _this=this;
  350. const {data} = await firedeviceStart(_this.itemData.subjectId)
  351. if(data.code==200){
  352. if(data.data.flg){
  353. _this.conductCountdown=30;
  354. _this.firedeviceStatus();
  355. }else{
  356. wx.showToast({
  357. title: data.data.msg,
  358. icon: "none",
  359. duration:6000
  360. });
  361. }
  362. }
  363. },
  364. //一键灭火按钮
  365. outfireFun(){
  366. let _this=this;
  367. uni.showModal({
  368. title:"是否确认执行一键灭火?",
  369. content: '该操作存在风险,请您务必确认实验室内人员已安全撤离?',
  370. cancelColor:"#999",
  371. confirmColor:"#0183FA",
  372. success: function (res) {
  373. if (res.confirm) {
  374. console.log('用户点击确定');
  375. _this.dialogVisible=true;
  376. _this.countdown=6;
  377. _this.sendCode()//倒计时
  378. } else if (res.cancel) {
  379. console.log('用户点击取消');
  380. }
  381. }
  382. });
  383. },
  384. //一键灭火弹出层关闭
  385. dialogOutfire(){
  386. this.dialogVisible=!this.dialogVisible
  387. this.clearTimer(); //关闭定时器
  388. },
  389. //取消一键灭火
  390. cancelOutfire(){
  391. this.dialogVisible=false;
  392. this.clearTimer(); //关闭定时器
  393. },
  394. //倒计时
  395. sendCode(){
  396. let _this=this;
  397. _this.loading(); //启动定时器
  398. _this.timer2 = setInterval(() =>{
  399. //创建定时器
  400. if(_this.countdown === 1){
  401. _this.clearTimer(); //关闭定时器
  402. _this.firedeviceStart();//启动灭火设备
  403. }else{
  404. _this.loading();
  405. }
  406. },1000);
  407. },
  408. loading(){
  409. //启动定时器
  410. this.countdown--; //定时器减1
  411. },
  412. clearTimer(){
  413. //清除定时器
  414. clearInterval(this.timer2);
  415. this.timer2 = null;
  416. this.dialogVisible=false;
  417. this.countdown=6;
  418. },
  419. //进行中倒计时
  420. sendCode2(){
  421. let _this=this;
  422. _this.loading2(); //启动定时器
  423. _this.timer3 = setInterval(() =>{
  424. //创建定时器
  425. if(_this.conductCountdown === 1){
  426. _this.clearTimer2(); //关闭定时器
  427. _this.outfireEnd=true;//灭火倒计时结束
  428. }else{
  429. _this.loading2();
  430. }
  431. },1000);
  432. },
  433. loading2(){
  434. //启动定时器
  435. this.conductCountdown--; //定时器减1
  436. },
  437. clearTimer2(){
  438. //清除定时器
  439. clearInterval(this.timer3);
  440. this.timer3 = null;
  441. },
  442. //根据账户信息查询学院楼栋数据
  443. async getBuilding(buildingId){
  444. const {data} = await getBuilding(buildingId)
  445. // 过滤了三楼
  446. let list = [];
  447. for(let i=0;i<data.data.length;i++){
  448. if(data.data[i].id != 7){
  449. list.push(data.data[i]);
  450. }
  451. }
  452. this.$set(this,'floorList',list);
  453. this.$set(this,'floorName',"");
  454. this.$set(this,'floorId',"");
  455. this.$set(this,'fjListArray',[]);
  456. this.$set(this,'subName',"");
  457. this.$set(this,'subId',"");
  458. },
  459. //获取实验室布局
  460. async lablayout(buildingId,floorId){
  461. console.log('buildingId',buildingId)
  462. console.log('floorId',floorId)
  463. let self = this;
  464. const {data} = await lablayout(buildingId)
  465. if(data.code == 200){
  466. for(let i=0;i<data.data.length;i++){
  467. if(data.data[i].id == floorId){
  468. let newList = [];
  469. self.fjList = data.data[i].list;
  470. for(let o=0;o<data.data[i].list.length;o++){
  471. if(data.data[i].list[o].subjectId != -1){
  472. newList.push(data.data[i].list[o]);
  473. }
  474. }
  475. this.$set(this,'fjListArray',newList);
  476. }
  477. }
  478. }
  479. },
  480. //学院楼栋选中
  481. buildingChange(e){
  482. this.$set(this,'buildingName',this.buildingList[e.detail.value].label);
  483. this.$set(this,'buildingId',this.buildingList[e.detail.value].value);
  484. this.$set(this,'deptId',this.buildingList[e.detail.value].value);
  485. this.getBuilding(this.buildingList[e.detail.value].value);
  486. },
  487. //楼层选中
  488. floorChange(e){
  489. this.$set(this,'floorName',this.floorList[e.detail.value].name);
  490. this.$set(this,'floorId',this.floorList[e.detail.value].id);
  491. this.lablayout(this.buildingId,this.floorList[e.detail.value].id);
  492. },
  493. //实验室选择
  494. fjListChange(e){
  495. this.$set(this,'subName',this.fjListArray[e.detail.value].subjectName);
  496. this.$set(this,'subId',this.fjListArray[e.detail.value].subjectId);
  497. this.itemData.name=this.fjListArray[e.detail.value].subjectName
  498. this.itemData.floorId=this.fjListArray[e.detail.value].floorId
  499. this.itemData.id=this.fjListArray[e.detail.value].id
  500. this.itemData.subjectId=this.fjListArray[e.detail.value].subjectId
  501. },
  502. getAppExitLine(){
  503. let list = [{type:"lab/exit/line"},{type:"lab/fireDevice/Warn/"}];
  504. getApp().appMqttOn(1,list);
  505. },
  506. getAppOutfire(){
  507. // let list = [{type:"lab/fireDevice/Warn/"}]
  508. let list = [{type:"lab/function/data"}];
  509. getApp().appMqttOn(1,list);
  510. },
  511. shadeTypeClick(){
  512. this.broadcastType = !this.broadcastType
  513. },
  514. async evacuateTwo(){
  515. const {data} = await lineEvacuateTow(this.subId,0)
  516. if(data.code == 200){
  517. if(data.data){
  518. this.pageType = 2;
  519. uni.showToast({
  520. title: '执行成功',
  521. icon:"none",
  522. mask:true,
  523. duration: 2000
  524. });
  525. this.initialization(data.data);
  526. }
  527. }
  528. },
  529. //获取实验室摄像头
  530. async laboratoryInfo(){
  531. let _this = this;
  532. const {data} = await laboratoryInfo(_this.itemData.subjectId);
  533. if(data.code == 200){
  534. let list = data.data[0];
  535. list.labHardwareVOList.forEach(function(item){
  536. if(item.hardwareTypeEnum.enumName=='VIDEO_MONITOR'){
  537. console.log(item.hardwareNUM)
  538. _this.videoHardwareNUM.push(item.hardwareNUM)
  539. }
  540. })
  541. this.getCameraByFloor();
  542. }
  543. },
  544. //获取楼层摄像头列表
  545. async getCameraByFloor(){
  546. let _this=this;
  547. const {data} = await getCameraByFloor({floorId:this.floorId})
  548. if(data.code == 200){
  549. if(data.data[0]){
  550. let list=_this.videoHardwareNUM.concat(data.data)
  551. let qc=[]
  552. for(var i = 0; i < list.length-1; i++){
  553. for(var j = i+1; j < list.length; j++){
  554. if(list[i]===list[j]){
  555. list.splice(j,1);
  556. j--;
  557. }
  558. }
  559. }
  560. this.GetStartList(list);
  561. }else{
  562. this.GetStartList(_this.videoHardwareNUM);
  563. }
  564. }
  565. },
  566. async GetStartList(rows){
  567. let self = this;
  568. let list = "";
  569. for(let i=0;i<rows.length;i++){
  570. list = list + rows[i]+","
  571. }
  572. let obj = {
  573. page:"1",
  574. count:"100",
  575. deviceIds:list,
  576. };
  577. const {data} = await GetStartList(obj)
  578. if(data.code == 200){
  579. let list = [];
  580. for(let i=0;i<data.data.length;i++){
  581. let text = uni.getStorageSync('cameraUrl');
  582. let url = data.data[i].result.body.data.hls;
  583. url = url.split("rtp/");
  584. let newUrl = text+'rtp/'+url[1];
  585. let obj = {
  586. name:"楼道监控"+(i+1),
  587. id:data.data[i].result.body.data.deviceID,
  588. url:newUrl,
  589. }
  590. list.push(obj)
  591. }
  592. this.urlList = list;
  593. }
  594. },
  595. //点击选择喇叭
  596. trumpetClick(index){
  597. this.trumpetList[index].type = !this.trumpetList[index].type
  598. let _this=this;
  599. if(_this.trumpetList[index].type==true){
  600. _this.trumpetList.forEach(function(item2) {
  601. if(item2.deviceSn==_this.trumpetList[index].deviceSn){
  602. item2.type=true
  603. }else{
  604. item2.type=false
  605. }
  606. })
  607. }
  608. },
  609. //录制
  610. recordButton(e){
  611. console.log("按下")
  612. let self = this;
  613. let num = 0;
  614. for(let i=0;i<self.trumpetList.length;i++){
  615. if(self.trumpetList[i].type){
  616. num++
  617. }
  618. }
  619. if(num == 0){
  620. uni.showToast({
  621. title: '请选择喇叭',
  622. icon:"none",
  623. mask:true,
  624. duration: 2000
  625. });
  626. return
  627. }
  628. this.liveType=true;
  629. console.log('录制',e)
  630. this.startPoint = e.touches[0];//记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
  631. const options = {
  632. duration: 10000,
  633. sampleRate: 16000,
  634. numberOfChannels: 1,
  635. encodeBitRate: 48000,
  636. format: 'mp3',
  637. frameSize: 50
  638. }
  639. this.recorderManager.start(options);//开始录音
  640. this.recorderManager.onStart(() => {
  641. console.log('recorder start')
  642. })
  643. this.recorderManager.onError((res) => {
  644. console.log(res);
  645. })
  646. wx.showToast({
  647. title: "正在录音,上划取消发送",
  648. icon: "none",
  649. duration: 60000//先定义个60秒,后面可以手动调用wx.hideToast()隐藏
  650. });
  651. this.sendLock = false;//长按时是不上锁的。
  652. },
  653. //取消
  654. cancelButton(e){
  655. console.log("移动")
  656. let self = this;
  657. let num = 0;
  658. for(let i=0;i<self.trumpetList.length;i++){
  659. if(self.trumpetList[i].type){
  660. num++
  661. }
  662. }
  663. if(num == 0){
  664. return
  665. }
  666. this.liveType=false;
  667. console.log('取消',e)
  668. let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
  669. if (Math.abs(moveLenght) > 50) {
  670. wx.showToast({
  671. title: "松开手指,取消发送",
  672. icon: "none",
  673. duration: 60000
  674. });
  675. this.sendLock = true;//触发了上滑取消发送,上锁
  676. } else {
  677. wx.showToast({
  678. title: "正在录音,上划取消发送",
  679. icon: "none",
  680. duration: 60000
  681. });
  682. this.sendLock = false;//上划距离不足,依然可以发送,不上锁
  683. }
  684. },
  685. //发送
  686. sendButton(e){
  687. console.log("松开")
  688. let self = this;
  689. let num = 0;
  690. for(let i=0;i<self.trumpetList.length;i++){
  691. if(self.trumpetList[i].type){
  692. num++
  693. }
  694. }
  695. if(num == 0){
  696. return
  697. }
  698. this.liveType=false;
  699. console.log('发送',e)
  700. wx.hideToast();//结束录音、隐藏Toast提示框
  701. this.recorderManager.stop();//结束录音
  702. this.recorderManager.onStop((res) => {
  703. if(!this.sendLock){
  704. console.log('1', this.recorderManager)
  705. this.uploadImg(res.tempFilePath);
  706. }
  707. console.log('停止录音', res.tempFilePath)
  708. console.log("sendLock",this.sendLock);
  709. })
  710. },
  711. //上传MP3
  712. async uploadImg(tempFilePaths){
  713. var self = this;
  714. uni.uploadFile({
  715. url: config.base_url+'/file/upload', //仅为示例,非真实的接口地址
  716. header:{'Authorization':uni.getStorageSync('token')},
  717. filePath: tempFilePaths,
  718. name: 'file',
  719. formData: {
  720. 'user': 'test'
  721. },
  722. success: (uploadFileRes) => {
  723. let res = JSON.parse(uploadFileRes.data);
  724. if(res.code == 200){
  725. console.log("上传成功",res)
  726. self.textParseUrlIps(config.base_url+ '/' +res.data.url);
  727. }else{
  728. uni.showToast({
  729. title: res.msg,
  730. icon:"none",
  731. mask:true,
  732. duration: 2000
  733. });
  734. }
  735. },
  736. fail: err => {
  737. uni.hideLoading()
  738. },
  739. complete: () => {
  740. }
  741. });
  742. },
  743. //发送语音
  744. async textParseUrlIps(text){
  745. let self = this;
  746. let newList = [];
  747. for(let i=0;i<self.trumpetList.length;i++){
  748. if(self.trumpetList[i].type){
  749. let obj = {
  750. sn:self.trumpetList[i].deviceSn,
  751. port:self.trumpetList[i].port,
  752. deviceIp:self.trumpetList[i].deviceIp,
  753. type:"",
  754. name:"",
  755. speed:"",
  756. params:{
  757. tid:"",
  758. vol:self.trumpetList[i].deviceVol,
  759. urls:[]
  760. }
  761. };
  762. newList.push(obj);
  763. }
  764. }
  765. const {data} = await textParseUrlIps(newList,text)
  766. if(data.code == 200){
  767. uni.showToast({
  768. title: '发送成功',
  769. icon:"none",
  770. mask:true,
  771. duration: 2000
  772. });
  773. }
  774. },
  775. //监听应急疏散数据变更
  776. getMqttLineData(val){
  777. console.log('收到疏散MQTT')
  778. let self = this;
  779. if(val.EXIT_LINE_MESSAGE){
  780. console.log('数据改变')
  781. this.evacuate();
  782. }else{
  783. console.log('应急疏散已结束')
  784. uni.showToast({
  785. title: '应急疏散已结束',
  786. icon:"none",
  787. mask:true,
  788. duration: 2000
  789. });
  790. setTimeout(function(){
  791. uni.navigateBack();
  792. },2000);
  793. }
  794. },
  795. //获取当前疏散数据
  796. async getRedis(){
  797. let self = this;
  798. const {data} = await getRedis()
  799. if(data.code == 200){
  800. if(data.data){
  801. this.isEvacuate=false;
  802. this.deptId = data.data.deptId;
  803. this.buildingId = data.data.buildId;
  804. this.floorId = data.data.floorId;
  805. this.subId = data.data.subId;
  806. this.subName = data.data.subName;
  807. this.address = data.data.deptName+'-'+data.data.buildName+'-'+data.data.floorName
  808. this.lablayout(this.buildingId,this.floorId);
  809. this.evacuate();
  810. this.itemData.subjectId = data.data.subId;
  811. this.laboratoryInfo();
  812. this.firedeviceStatus();
  813. }else{
  814. this.isEvacuate=true;
  815. }
  816. }
  817. },
  818. //疏散路线选择
  819. buttonChangeTwo(e){
  820. this.buttonArrayIndex = e.detail.value;
  821. },
  822. //执行疏散
  823. async evacuate(){
  824. console.log("执行疏散")
  825. const {data} = await evacuate(this.subId)
  826. if(data.code == 200){
  827. if(data.data){
  828. this.initialization(data.data);
  829. }
  830. }
  831. },
  832. //结束疏散
  833. closireButton(){
  834. let self = this;
  835. uni.showModal({
  836. content: '确认结束疏散吗?',
  837. cancelColor:"#999",
  838. confirmColor:"#0183FA",
  839. success: function (res) {
  840. if (res.confirm) {
  841. self.closure();
  842. this.isEvacuate=true;
  843. console.log('用户点击确定');
  844. } else if (res.cancel) {
  845. console.log('用户点击取消');
  846. }
  847. }
  848. });
  849. },
  850. async closure(){
  851. const {data} = await closure(this.subId)
  852. if(data.code == 200){
  853. uni.showToast({
  854. title: '操作成功',
  855. icon:"none",
  856. mask:true,
  857. duration: 2000
  858. });
  859. setTimeout(function(){
  860. uni.navigateBack();
  861. },2000);
  862. }
  863. },
  864. buttonChange(e){
  865. this.buttonArrayIndex = e.detail.value;
  866. this.lineEvacuate();
  867. },
  868. /* 确认 */
  869. confirmBtn(){
  870. if(!this.subId){
  871. uni.showToast({
  872. title: '请选择实验室',
  873. icon:"none",
  874. mask:true,
  875. duration: 2000
  876. });
  877. return
  878. }
  879. this.address = this.buildingName+''+this.floorName
  880. this.lineEvacuateTow();
  881. this.laboratoryInfo();
  882. },
  883. /* 2.5获取疏散线路 */
  884. async lineEvacuateTow(){
  885. if(!this.buttonArrayIndex){
  886. uni.showToast({
  887. title: '请选择疏散路线',
  888. icon:"none",
  889. mask:true,
  890. duration: 2000
  891. });
  892. return
  893. }
  894. const {data} = await lineEvacuateTow(this.subId,this.buttonArray[this.buttonArrayIndex].id)
  895. if(data.code == 200){
  896. if(data.data){
  897. this.pageType = 2;
  898. uni.showToast({
  899. title: '执行成功',
  900. icon:"none",
  901. mask:true,
  902. duration: 2000
  903. });
  904. this.initialization(data.data);
  905. }
  906. }
  907. },
  908. //执行疏散
  909. async lineEvacuate(){
  910. if(!this.subId){
  911. uni.showToast({
  912. title: '请选择实验室',
  913. icon:"none",
  914. mask:true,
  915. duration: 2000
  916. });
  917. return
  918. }
  919. if(!this.buttonArrayIndex){
  920. uni.showToast({
  921. title: '请选择疏散路线',
  922. icon:"none",
  923. mask:true,
  924. duration: 2000
  925. });
  926. return
  927. }
  928. const {data} = await lineEvacuate(this.subId,this.buttonArray[this.buttonArrayIndex].id)
  929. if(data.code == 200){
  930. if(data.data){
  931. console.log('执行疏散')
  932. this.isEvacuate=false;
  933. uni.showToast({
  934. title: '执行成功',
  935. icon:"none",
  936. mask:true,
  937. duration: 2000
  938. });
  939. this.initialization(data.data);
  940. }
  941. }
  942. },
  943. //灯初始化
  944. initialization(list){
  945. console.log('灯数据',list);
  946. let self = this;
  947. let newList = [
  948. {
  949. id:"5",
  950. type:false,
  951. },
  952. {
  953. id:"2",
  954. type:false,
  955. },
  956. {
  957. id:"3",
  958. type:false,
  959. },
  960. {
  961. id:"4",
  962. type:false,
  963. },
  964. {
  965. id:"1",
  966. type:false,
  967. },
  968. {
  969. id:"6",
  970. type:false,
  971. },
  972. ];
  973. for(let i=0;i<list.length;i++){
  974. for(let o=0;o<newList.length;o++){
  975. if(list[i].lightId == newList[o].id){
  976. newList[o].type = true;
  977. }
  978. }
  979. }
  980. this.lightList = newList;
  981. console.log('灯数据改变',this.lightList);
  982. this.pageType = 2;
  983. this.$forceUpdate();
  984. this.getDeviceList();
  985. },
  986. async getDeviceList(){
  987. let obj ={
  988. subId:this.itemData.subjectId,
  989. floorId:this.floorId,
  990. page:1,
  991. pageSize:100,
  992. };
  993. const {data} = await getDeviceListBySub(obj)
  994. if(data.code == 200){
  995. for(let i=0;i<data.data.length;i++){
  996. data.data[i].type = false;
  997. }
  998. this.$set(this,'trumpetList',data.data)
  999. }
  1000. },
  1001. //摄像头切换
  1002. scrollBoxClick(index){
  1003. this.videoIndex = index;
  1004. },
  1005. },
  1006. beforeDestroy(){
  1007. //断开mqtt连接
  1008. getApp().offMQTT();
  1009. //删除应急疏散监听
  1010. getApp().deleteLineData();
  1011. }
  1012. }
  1013. </script>
  1014. <style lang="stylus" scoped>
  1015. #emergencyEvacuationBig{
  1016. height:100%;
  1017. width:100%;
  1018. display:flex;
  1019. flex-direction:column;
  1020. overflow-y:scroll;
  1021. .setUpEvacuation{
  1022. flex:1;
  1023. display:flex;
  1024. flex-direction:column;
  1025. overflow-y:scroll;
  1026. .evacuation-max-box{
  1027. width:710rpx;
  1028. margin:20rpx 20rpx;
  1029. background #fff
  1030. border-radius:20rpx;
  1031. padding:20rpx 0;
  1032. .picker-max-box{
  1033. .picker-title-box{
  1034. padding:0 20rpx;
  1035. display flex
  1036. view{
  1037. line-height:80rpx;
  1038. font-size:28rpx;
  1039. }
  1040. view:nth-child(1){
  1041. color:red;
  1042. }
  1043. view:nth-child(2){
  1044. }
  1045. view:nth-child(3){
  1046. color:#999;
  1047. }
  1048. }
  1049. .picker-min-box{
  1050. display flex;
  1051. height:80rpx;
  1052. width:667rpx;
  1053. border:1rpx solid #a2a2a2;
  1054. border-radius:10rpx;
  1055. margin:0 20rpx;
  1056. view{
  1057. flex:1;
  1058. line-height:80rpx;
  1059. padding:0 20rpx;
  1060. color:#999;
  1061. font-size:28rpx;
  1062. overflow: hidden
  1063. }
  1064. img{
  1065. width:24rpx;
  1066. height:12rpx;
  1067. margin:35rpx 23rpx;
  1068. }
  1069. }
  1070. }
  1071. }
  1072. }
  1073. .implementEvacuation{
  1074. flex:1;
  1075. display:flex;
  1076. flex-direction:column;
  1077. overflow-y:scroll;
  1078. .evacuation-max-box{
  1079. width:710rpx;
  1080. margin:20rpx 20rpx;
  1081. /* background #fff */
  1082. border-radius:20rpx;
  1083. padding:20rpx 0 30rpx;
  1084. .evacuation-title-box{
  1085. // height:150rpx;
  1086. //border-bottom:1rpx solid #dedede;
  1087. background: #FFFFFF;
  1088. border-radius: 20rpx;
  1089. padding:34rpx 22rpx;
  1090. box-sizing :border-box;
  1091. .evacuation-title-name-box{
  1092. font-size: 30rpx;
  1093. font-family: PingFang SC;
  1094. font-weight: 500;
  1095. color: #333333;
  1096. line-height: 30rpx;
  1097. }
  1098. .site{
  1099. font-size: 28rpx;
  1100. font-family: PingFang SC;
  1101. font-weight: 500;
  1102. color: #999999;
  1103. line-height: 30rpx;
  1104. margin-top:32rpx;
  1105. display :flex;
  1106. justify-content :flex-start;
  1107. align-items center;
  1108. >img{
  1109. width: 28rpx;
  1110. height: 30rpx;
  1111. margin-right:18rpx;
  1112. }
  1113. }
  1114. }
  1115. /* 一键灭火 */
  1116. .outfire{
  1117. width: 710rpx;
  1118. height: 80rpx;
  1119. background: #FFFFFF;
  1120. border-radius: 20rpx;
  1121. margin:20rpx 0;
  1122. padding: 0 10rpx;
  1123. box-sizing: border-box;
  1124. display: flex;
  1125. justify-content: space-between;
  1126. align-items: center;
  1127. .outfire_li{
  1128. display: flex;
  1129. justify-content: flex-start;
  1130. align-items: center;
  1131. >img{
  1132. width: 24rpx;
  1133. height: 30rpx;
  1134. margin-right: 12rpx;
  1135. }
  1136. .normal{
  1137. font-size: 24rpx;
  1138. font-family: PingFang SC;
  1139. font-weight: 500;
  1140. color: #333333;
  1141. }
  1142. .abnormal{
  1143. font-size: 24rpx;
  1144. font-family: PingFang SC;
  1145. font-weight: 500;
  1146. color: #F11C00;
  1147. }
  1148. }
  1149. .outfire_li:nth-of-type(1){
  1150. >img{
  1151. width: 30rpx;
  1152. height: 28rpx;
  1153. margin-right: 12rpx;
  1154. }
  1155. }
  1156. .outfire_yes_btn{
  1157. width: 120rpx;
  1158. height: 40rpx;
  1159. font-size: 24rpx;
  1160. font-family: PingFang SC;
  1161. font-weight: 500;
  1162. color: #F21C00;
  1163. line-height: 40rpx;
  1164. border: 1px solid #F21C00;
  1165. border-radius: 8rpx;
  1166. text-align: center;
  1167. margin-left: 54rpx;
  1168. }
  1169. .outfire_no_btn{
  1170. width: 120rpx;
  1171. height: 40rpx;
  1172. font-size: 24rpx;
  1173. font-family: PingFang SC;
  1174. font-weight: 500;
  1175. color: #CCCCCC;
  1176. line-height: 40rpx;
  1177. border: 1px solid #E0E0E0;
  1178. border-radius: 8rpx;
  1179. text-align: center;
  1180. margin-left: 54rpx;
  1181. }
  1182. }
  1183. .evacuation-scroll-box{
  1184. height:95rpx;
  1185. overflow-x scroll
  1186. overflow-y hidden
  1187. white-space:nowrap;
  1188. margin:0 20rpx;
  1189. view{
  1190. line-height:95rpx;
  1191. font-size:28rpx;
  1192. display inline-block
  1193. margin-right:45rpx;
  1194. }
  1195. .scroll-box-color{
  1196. color:#0183FA;
  1197. }
  1198. }
  1199. .evacuation-video-box{
  1200. width:668rpx;
  1201. height:341rpx;
  1202. margin:0 auto;
  1203. position relative
  1204. video{
  1205. position absolute
  1206. top:0;
  1207. left:0;
  1208. width:668rpx;
  1209. height:341rpx;
  1210. margin:0 auto;
  1211. }
  1212. .video-a{
  1213. z-index:100;
  1214. }
  1215. .video-b{
  1216. z-index:0;
  1217. }
  1218. }
  1219. /* 路线图 */
  1220. .roadmap{
  1221. width: 710rpx;
  1222. height: 464rpx;
  1223. background: #FFFFFF;
  1224. border-radius: 20rpx;
  1225. padding :20rpx 20rpx 0;
  1226. box-sizing :border-box;
  1227. margin-top :20rpx;
  1228. .roadmap_t{
  1229. font-size: 30rpx;
  1230. font-family: PingFang SC;
  1231. font-weight: 500;
  1232. color: #333333;
  1233. line-height: 30rpx;
  1234. display:flex;
  1235. .monito_li_r_l{
  1236. flex:1;
  1237. line-height:61rpx;
  1238. font-size:28rpx;
  1239. }
  1240. .monito_li_r{
  1241. width :380rpx;
  1242. font-size: 24rpx;
  1243. font-family: PingFang SC;
  1244. font-weight: 500;
  1245. color: #0183FA;
  1246. line-height: 80rpx;
  1247. display :flex;
  1248. justify-content :flex-end;
  1249. align-items center;
  1250. >img{
  1251. width: 9rpx;
  1252. height: 22rpx;
  1253. margin-left :20rpx;
  1254. }
  1255. .evacuation-title-button-box{
  1256. display flex
  1257. overflow hidden
  1258. view{
  1259. line-height:61rpx;
  1260. font-size:28rpx;
  1261. }
  1262. .colorA{
  1263. color: #0183FA;
  1264. }
  1265. .colorB{
  1266. color:#0183FA;
  1267. }
  1268. img{
  1269. margin:28rpx 20rpx 0;
  1270. width:24rpx;
  1271. height:9rpx;
  1272. }
  1273. }
  1274. }
  1275. }
  1276. .evacuation-map-box{
  1277. width:668rpx;
  1278. height:348rpx;
  1279. margin:0 auto;
  1280. overflow:hidden;
  1281. border:1rpx solid #E0E0E0;
  1282. margin-top:20rpx;
  1283. .map-1{
  1284. background:url(../images/kuangdaMap/map1.png);
  1285. .evacuation-map-min-for-box:nth-child(1){
  1286. margin:4rpx 0 0 0;
  1287. width:54rpx;
  1288. height:102rpx;
  1289. }
  1290. .evacuation-map-min-for-box:nth-child(2){
  1291. margin:4rpx 54rpx 0 0;
  1292. width:54rpx;
  1293. height:102rpx;
  1294. }
  1295. .evacuation-map-min-for-box:nth-child(3){
  1296. margin:4rpx 54rpx 0 0;
  1297. width:100rpx;
  1298. height:102rpx;
  1299. }
  1300. .evacuation-map-min-for-box:nth-child(4){
  1301. margin:4rpx 0 0 0;
  1302. width:135rpx;
  1303. height:102rpx;
  1304. }
  1305. .evacuation-map-min-for-box:nth-child(5){
  1306. margin:4rpx 0 0 0;
  1307. width:95rpx;
  1308. height:102rpx;
  1309. }
  1310. .evacuation-map-min-for-box:nth-child(6){
  1311. margin:4rpx 0 0 0;
  1312. width:54rpx;
  1313. height:102rpx;
  1314. }
  1315. .evacuation-map-min-for-box:nth-child(7){
  1316. margin:78rpx 0 0 0;
  1317. width:130rpx;
  1318. height:102rpx;
  1319. }
  1320. .evacuation-map-min-for-box:nth-child(8){
  1321. margin:78rpx 0 0 0;
  1322. width:149rpx;
  1323. height:102rpx;
  1324. }
  1325. .evacuation-map-min-for-box:nth-child(9){
  1326. margin:78rpx 0 0 0;
  1327. width:84rpx;
  1328. height:102rpx;
  1329. }
  1330. .evacuation-map-min-for-box:nth-child(10){
  1331. margin:78rpx 0 0 0;
  1332. width:84rpx;
  1333. height:102rpx;
  1334. }
  1335. .evacuation-map-min-for-box:nth-child(11){
  1336. margin:78rpx 0 0 0;
  1337. width:94rpx;
  1338. height:102rpx;
  1339. }
  1340. .evacuation-map-min-for-box:nth-child(12){
  1341. margin:78rpx 0 0 0;
  1342. width:44rpx;
  1343. height:102rpx;
  1344. }
  1345. .evacuation-map-min-for-box:nth-child(13){
  1346. margin:78rpx 0 0 0;
  1347. width:64rpx;
  1348. height:102rpx;
  1349. }
  1350. .map-min-img:nth-child(14){
  1351. top: 134rpx;
  1352. left: 80rpx;
  1353. }
  1354. .map-min-img:nth-child(15){
  1355. top: 134rpx;
  1356. left: 160rpx;
  1357. }
  1358. .map-min-img:nth-child(16){
  1359. top: 134rpx;
  1360. left:280rpx;
  1361. }
  1362. .map-min-img:nth-child(17){
  1363. top: 134rpx;
  1364. left:340rpx;
  1365. }
  1366. .map-min-img:nth-child(18){
  1367. top: 134rpx;
  1368. left:460rpx;
  1369. }
  1370. .map-min-img:nth-child(19){
  1371. top: 134rpx;
  1372. left:540rpx;
  1373. }
  1374. }
  1375. .map-2{
  1376. background:url(../images/kuangdaMap/map2.png);
  1377. .evacuation-map-min-for-box:nth-child(1){
  1378. margin:4rpx 0 0 0;
  1379. width:54rpx;
  1380. height:102rpx;
  1381. }
  1382. .evacuation-map-min-for-box:nth-child(2){
  1383. margin:4rpx 54rpx 0 0;
  1384. width:54rpx;
  1385. height:102rpx;
  1386. }
  1387. .evacuation-map-min-for-box:nth-child(3){
  1388. margin:4rpx 54rpx 0 0;
  1389. width:100rpx;
  1390. height:102rpx;
  1391. }
  1392. .evacuation-map-min-for-box:nth-child(4){
  1393. margin:4rpx 0 0 0;
  1394. width:135rpx;
  1395. height:102rpx;
  1396. }
  1397. .evacuation-map-min-for-box:nth-child(5){
  1398. margin:4rpx 0 0 0;
  1399. width:145rpx;
  1400. height:102rpx;
  1401. }
  1402. .evacuation-map-min-for-box:nth-child(6){
  1403. margin:4rpx 0 0 0;
  1404. width:106rpx;
  1405. height:102rpx;
  1406. }
  1407. .evacuation-map-min-for-box:nth-child(7){
  1408. margin:78rpx 0 0 0;
  1409. width:106rpx;
  1410. height:102rpx;
  1411. }
  1412. .evacuation-map-min-for-box:nth-child(8){
  1413. margin:78rpx 0 0 0;
  1414. width:100rpx;
  1415. height:102rpx;
  1416. }
  1417. .evacuation-map-min-for-box:nth-child(9){
  1418. margin:78rpx 0 0 0;
  1419. width:100rpx;
  1420. height:102rpx;
  1421. }
  1422. .evacuation-map-min-for-box:nth-child(10){
  1423. margin:78rpx 0 0 0;
  1424. width:92rpx;
  1425. height:102rpx;
  1426. }
  1427. .evacuation-map-min-for-box:nth-child(11){
  1428. margin:78rpx 0 0 0;
  1429. width:90rpx;
  1430. height:102rpx;
  1431. }
  1432. .evacuation-map-min-for-box:nth-child(12){
  1433. margin:78rpx 0 0 0;
  1434. width:53rpx;
  1435. height:102rpx;
  1436. }
  1437. .map-min-img:nth-child(13){
  1438. top: 134rpx;
  1439. left: 80rpx;
  1440. }
  1441. .map-min-img:nth-child(14){
  1442. top: 134rpx;
  1443. left: 160rpx;
  1444. }
  1445. .map-min-img:nth-child(15){
  1446. top: 134rpx;
  1447. left:280rpx;
  1448. }
  1449. .map-min-img:nth-child(16){
  1450. top: 134rpx;
  1451. left:340rpx;
  1452. }
  1453. .map-min-img:nth-child(17){
  1454. top: 134rpx;
  1455. left:460rpx;
  1456. }
  1457. .map-min-img:nth-child(18){
  1458. top: 134rpx;
  1459. left:540rpx;
  1460. }
  1461. }
  1462. .map-3{
  1463. background:url(../images/kuangdaMap/map3.png);
  1464. }
  1465. .evacuation-map-big-box{
  1466. height:293rpx;
  1467. width:644rpx;
  1468. // background:url(../images/Version2.3/icon_bj_syspmtcy_jinan.png);
  1469. background-size 100%
  1470. margin:28rpx 13rpx ;
  1471. position relative
  1472. .evacuation-map-min-for-box{
  1473. overflow: hidden;
  1474. display: inline-block;
  1475. line-height:70rpx;
  1476. text-align: center;
  1477. font-size:14rpx;
  1478. }
  1479. .evacuation-map-min-for-box-color{
  1480. background: rgba(0,189,255,0.3);
  1481. }
  1482. .map-min-img{
  1483. position: absolute;
  1484. width:34rpx;
  1485. height:22rpx;
  1486. }
  1487. }
  1488. }
  1489. }
  1490. .video-max-box{
  1491. width: 710rpx;
  1492. height: 780rpx;
  1493. overflow-y scroll;
  1494. background: #FFFFFF;
  1495. border-radius: 20rpx;
  1496. padding :22rpx 30rpx 30rpx;
  1497. box-sizing :border-box;
  1498. margin-top :20rpx;
  1499. margin-bottom:120rpx;
  1500. video{
  1501. width:645rpx;
  1502. height:355rpx;
  1503. }
  1504. }
  1505. .bottom-button-box{
  1506. position absolute;
  1507. bottom:20rpx;
  1508. display flex;
  1509. width:670rpx;
  1510. margin:20rpx;
  1511. view{
  1512. width:335rpx;
  1513. height:100rpx;
  1514. line-height:100rpx;
  1515. text-align center;
  1516. color:#fff;
  1517. font-size:28rpx;
  1518. }
  1519. view:nth-child(1){
  1520. border-top-left-radius :50rpx;
  1521. border-bottom-left-radius :50rpx;
  1522. background:#FF9C00;
  1523. }
  1524. view:nth-child(2){
  1525. border-top-right-radius :50rpx;
  1526. border-bottom-right-radius :50rpx;
  1527. background:#0183FA;
  1528. }
  1529. }
  1530. }
  1531. .live-button{
  1532. width:650rpx;
  1533. height:100rpx;
  1534. line-height:100rpx;
  1535. text-align center;
  1536. font-size:28rpx;
  1537. margin:50rpx auto 0;
  1538. border-radius:20rpx;
  1539. }
  1540. .live-color-a{
  1541. color:#fff;
  1542. background:#FF8686;
  1543. }
  1544. .live-color-b{
  1545. color:#fff;
  1546. background:#25C95B;
  1547. }
  1548. /* 语音广播 */
  1549. .shade-max-big-box{
  1550. height:100%;
  1551. width:100%;
  1552. position fixed
  1553. display flex;
  1554. flex-direction column
  1555. z-index:10;
  1556. background :rgba(0,0,0,0.2);
  1557. .null-box{
  1558. flex:1;
  1559. }
  1560. /* 语音广播-执行疏散 */
  1561. .broadcast{
  1562. width: 100%;
  1563. // height: 532rpx;
  1564. background: #FFFFFF;
  1565. border-top-left-radius :20rpx;
  1566. border-top-right-radius :20rpx
  1567. padding :22rpx 30rpx 30rpx;
  1568. box-sizing :border-box;
  1569. margin-top:20rpx;
  1570. .broadcast_t{
  1571. font-size: 30rpx;
  1572. font-family: PingFang SC;
  1573. font-weight: 500;
  1574. color: #333333;
  1575. line-height: 30rpx;
  1576. >label{
  1577. font-size: 24rpx;
  1578. font-family: PingFang SC;
  1579. font-weight: 500;
  1580. color: #999999;
  1581. line-height: 30rpx;
  1582. margin-left :16rpx;
  1583. }
  1584. }
  1585. .trumpet-max-box{
  1586. display :flex;
  1587. justify-content :flex-start;
  1588. margin-top :22rpx;
  1589. flex-wrap: wrap;
  1590. .trumpet-for-box{
  1591. display:inline-block;
  1592. width:200rpx;
  1593. height:60rpx;
  1594. line-height:60rpx;
  1595. font-size:24rpx;
  1596. text-align center;
  1597. cursor: pointer;
  1598. overflow: hidden;
  1599. border: 1rpx solid #E0E0E0;
  1600. border-radius:10rpx;
  1601. color: #E0E0E0;
  1602. display :flex;
  1603. justify-content :center;
  1604. margin-right :20rpx;
  1605. margin-bottom: 10rpx;
  1606. >img{
  1607. width:36rpx;
  1608. height:34rpx;
  1609. margin :12rpx 20rpx 0 25rpx;
  1610. }
  1611. }
  1612. .trumpet-color-a{
  1613. border:1px solid #0183FA;
  1614. color:#0183FA;
  1615. }
  1616. .trumpet-color-b{
  1617. border:1px solid #CCCCCC;
  1618. color:#999;
  1619. }
  1620. }
  1621. .broadcast_m{
  1622. width :100%;
  1623. .broadcast_m_t{
  1624. width: 142rpx;
  1625. height: 142rpx;
  1626. margin :30rpx 0 0 258rpx;
  1627. position :relative;
  1628. font-size: 24rpx;
  1629. font-family: PingFang SC;
  1630. font-weight: 500;
  1631. line-height: 170rpx;
  1632. text-align center
  1633. >img{
  1634. width: 142rpx;
  1635. height: 142rpx;
  1636. position :absolute;
  1637. }
  1638. >label{
  1639. width :100%;
  1640. font-size: 24rpx;
  1641. font-family: PingFang SC;
  1642. font-weight: 500;
  1643. color: #0183FA;
  1644. line-height: 24rpx;
  1645. display :inline-block;
  1646. text-align :center;
  1647. position :absolute;
  1648. top:76rpx;
  1649. }
  1650. /* 按下 */
  1651. .press_color{
  1652. color: #FFFFFF;
  1653. }
  1654. /* 松开 */
  1655. .slip_color{
  1656. color: #0183FA;
  1657. }
  1658. }
  1659. .broadcast_m_t_back_a{
  1660. background:url(@/images/icon_sskz_skfs.png);
  1661. background-size 100%
  1662. color: #FFFFFF;
  1663. }
  1664. .broadcast_m_t_back_b{
  1665. background:url(@/images/icon_sskz_azsh.png);
  1666. background-size 100%
  1667. color: #0183FA;
  1668. }
  1669. .broadcast_m_b{
  1670. font-size: 24rpx;
  1671. font-family: PingFang SC;
  1672. font-weight: 500;
  1673. color: #999999;
  1674. line-height: 24rpx;
  1675. text-align center;
  1676. margin-top :14rpx;
  1677. }
  1678. }
  1679. /* 疏散按钮 */
  1680. .evacuation-button-box{
  1681. width:650rpx;
  1682. height:100rpx;
  1683. background #0183FA
  1684. color:#fff;
  1685. text-align center;
  1686. line-height:100rpx;
  1687. font-size:28rpx;
  1688. margin:88rpx auto 0;
  1689. border-radius:20rpx;
  1690. }
  1691. }
  1692. }
  1693. /* 一键灭火 */
  1694. .shade-outfire{
  1695. height:100%;
  1696. width:100%;
  1697. position fixed
  1698. display flex;
  1699. flex-direction column
  1700. z-index:10;
  1701. background :rgba(0,0,0,0.2);
  1702. .null-box{
  1703. flex:1;
  1704. }
  1705. /* 语音广播-执行疏散 */
  1706. .shade-outfire-n{
  1707. width: 625rpx;
  1708. height: 450rpx;
  1709. background: #FFFFFF;
  1710. border-radius: 20rpx;
  1711. position: absolute;
  1712. top: 370rpx;
  1713. left: 62rpx;
  1714. .shade-outfire-n-t{
  1715. width: 172rpx;
  1716. height: 172rpx;
  1717. margin: 38rpx 0 0 226rpx;
  1718. }
  1719. .shade-outfire-n-m{
  1720. font-size: 30rpx;
  1721. font-family: PingFang SC;
  1722. font-weight: 500;
  1723. color: #E30000;
  1724. line-height: 84rpx;
  1725. text-align: center
  1726. border-bottom: 1px solid #E0E0E0;
  1727. >text{
  1728. font-size: 40rpx;
  1729. }
  1730. }
  1731. .shade-outfire-n-b{
  1732. width: 402rpx;
  1733. height: 82rpx;
  1734. background: #FFFFFF;
  1735. border: 2rpx solid #0183FA;
  1736. border-radius: 10rpx;
  1737. font-size: 28rpx;
  1738. line-height: 82rpx;
  1739. font-family: PingFang SC;
  1740. font-weight: 500;
  1741. color: #0183FA;
  1742. text-align: center;
  1743. margin: 30rpx 0 0 112rpx;
  1744. }
  1745. }
  1746. }
  1747. }
  1748. .setUpEvacuation-bottom-button{
  1749. width:650rpx;
  1750. height:100rpx;
  1751. background #0183FA
  1752. color:#fff;
  1753. text-align center;
  1754. line-height:100rpx;
  1755. font-size:28rpx;
  1756. margin:50rpx auto;
  1757. border-radius:20rpx;
  1758. }
  1759. }
  1760. </style>