emergencyEvacuationBig.vue 39 KB

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