emergencyEvacuationBig.vue 41 KB

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