emergencyEvacuationBig.vue 46 KB

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