emergencyEvacuationBig.vue 41 KB

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