emergencyEvacuationBig.vue 39 KB

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