emergencyEvacuationBig.vue 41 KB

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