emergencyEvacuationBigOne.vue 40 KB

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