emergencyEvacuationBig.vue 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  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,getDeviceListBySub} 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. subId:this.itemData.subjectId,
  881. floorId:this.floorId,
  882. page:1,
  883. pageSize:100,
  884. };
  885. const {data} = await getDeviceListBySub(obj)
  886. if(data.code == 200){
  887. for(let i=0;i<data.data.length;i++){
  888. data.data[i].type = false;
  889. }
  890. this.$set(this,'trumpetList',data.data)
  891. }
  892. },
  893. //摄像头切换
  894. scrollBoxClick(index){
  895. this.videoIndex = index;
  896. },
  897. },
  898. beforeDestroy(){
  899. //断开mqtt连接
  900. getApp().offMQTT();
  901. //删除应急疏散监听
  902. getApp().deleteLineData();
  903. }
  904. }
  905. </script>
  906. <style lang="stylus" scoped>
  907. #emergencyEvacuationBig{
  908. height:100%;
  909. width:100%;
  910. display:flex;
  911. flex-direction:column;
  912. overflow-y:scroll;
  913. .setUpEvacuation{
  914. flex:1;
  915. display:flex;
  916. flex-direction:column;
  917. overflow-y:scroll;
  918. .evacuation-max-box{
  919. width:710rpx;
  920. margin:20rpx 20rpx;
  921. background #fff
  922. border-radius:20rpx;
  923. padding:20rpx 0;
  924. .picker-max-box{
  925. .picker-title-box{
  926. padding:0 20rpx;
  927. display flex
  928. view{
  929. line-height:80rpx;
  930. font-size:28rpx;
  931. }
  932. view:nth-child(1){
  933. color:red;
  934. }
  935. view:nth-child(2){
  936. }
  937. view:nth-child(3){
  938. color:#999;
  939. }
  940. }
  941. .picker-min-box{
  942. display flex;
  943. height:80rpx;
  944. width:667rpx;
  945. border:1rpx solid #a2a2a2;
  946. border-radius:10rpx;
  947. margin:0 20rpx;
  948. view{
  949. flex:1;
  950. line-height:80rpx;
  951. padding:0 20rpx;
  952. color:#999;
  953. font-size:28rpx;
  954. overflow: hidden
  955. }
  956. img{
  957. width:24rpx;
  958. height:12rpx;
  959. margin:35rpx 23rpx;
  960. }
  961. }
  962. }
  963. }
  964. }
  965. .implementEvacuation{
  966. flex:1;
  967. display:flex;
  968. flex-direction:column;
  969. overflow-y:scroll;
  970. .evacuation-max-box{
  971. width:710rpx;
  972. margin:20rpx 20rpx;
  973. /* background #fff */
  974. border-radius:20rpx;
  975. padding:20rpx 0 30rpx;
  976. .evacuation-title-box{
  977. // height:150rpx;
  978. //border-bottom:1rpx solid #dedede;
  979. background: #FFFFFF;
  980. border-radius: 20rpx;
  981. padding:34rpx 22rpx;
  982. box-sizing :border-box;
  983. .evacuation-title-name-box{
  984. font-size: 30rpx;
  985. font-family: PingFang SC;
  986. font-weight: 500;
  987. color: #333333;
  988. line-height: 30rpx;
  989. }
  990. .site{
  991. font-size: 28rpx;
  992. font-family: PingFang SC;
  993. font-weight: 500;
  994. color: #999999;
  995. line-height: 30rpx;
  996. margin-top:32rpx;
  997. display :flex;
  998. justify-content :flex-start;
  999. align-items center;
  1000. >img{
  1001. width: 28rpx;
  1002. height: 30rpx;
  1003. margin-right:18rpx;
  1004. }
  1005. }
  1006. }
  1007. /* 视频监控-选择疏散路线 */
  1008. .monito{
  1009. width: 710rpx;
  1010. height: 161rpx;
  1011. background: #FFFFFF;
  1012. border-radius: 20rpx;
  1013. padding :0 14rpx;
  1014. box-sizing border-box;
  1015. margin-top :20rpx;
  1016. .monito_li{
  1017. width: 680rpx;
  1018. height: 80rpx;
  1019. font-size: 30rpx;
  1020. font-family: PingFang SC;
  1021. font-weight: 500;
  1022. color: #333333;
  1023. line-height: 80rpx;
  1024. border-bottom: 1rpx solid #E0E0E0;
  1025. display :flex;
  1026. justify-content :space-between;
  1027. .monito_li_r_text{
  1028. font-size:28rpx!important;
  1029. padding-right:37rpx;
  1030. }
  1031. .monito_li_r{
  1032. width :380rpx;
  1033. font-size: 24rpx;
  1034. font-family: PingFang SC;
  1035. font-weight: 500;
  1036. color: #0183FA;
  1037. line-height: 80rpx;
  1038. display :flex;
  1039. justify-content :flex-end;
  1040. align-items center;
  1041. >img{
  1042. width: 9rpx;
  1043. height: 22rpx;
  1044. margin-left :20rpx;
  1045. }
  1046. .evacuation-title-button-box{
  1047. display flex
  1048. overflow hidden
  1049. view{
  1050. line-height:61rpx;
  1051. font-size:28rpx;
  1052. }
  1053. .colorA{
  1054. color: #0183FA;
  1055. }
  1056. .colorB{
  1057. color:#0183FA;
  1058. }
  1059. img{
  1060. margin:28rpx 20rpx 0;
  1061. width:24rpx;
  1062. height:9rpx;
  1063. }
  1064. }
  1065. }
  1066. }
  1067. }
  1068. .evacuation-scroll-box{
  1069. height:95rpx;
  1070. overflow-x scroll
  1071. overflow-y hidden
  1072. white-space:nowrap;
  1073. margin:0 20rpx;
  1074. view{
  1075. line-height:95rpx;
  1076. font-size:28rpx;
  1077. display inline-block
  1078. margin-right:45rpx;
  1079. }
  1080. .scroll-box-color{
  1081. color:#0183FA;
  1082. }
  1083. }
  1084. .evacuation-video-box{
  1085. width:668rpx;
  1086. height:341rpx;
  1087. margin:0 auto;
  1088. position relative
  1089. video{
  1090. position absolute
  1091. top:0;
  1092. left:0;
  1093. width:668rpx;
  1094. height:341rpx;
  1095. margin:0 auto;
  1096. }
  1097. .video-a{
  1098. z-index:100;
  1099. }
  1100. .video-b{
  1101. z-index:0;
  1102. }
  1103. }
  1104. /* 路线图 */
  1105. .roadmap{
  1106. width: 710rpx;
  1107. height: 464rpx;
  1108. background: #FFFFFF;
  1109. border-radius: 20rpx;
  1110. padding :20rpx 20rpx 0;
  1111. box-sizing :border-box;
  1112. margin-top :20rpx;
  1113. .roadmap_t{
  1114. font-size: 30rpx;
  1115. font-family: PingFang SC;
  1116. font-weight: 500;
  1117. color: #333333;
  1118. line-height: 30rpx;
  1119. display:flex;
  1120. .monito_li_r_l{
  1121. flex:1;
  1122. line-height:61rpx;
  1123. font-size:28rpx;
  1124. }
  1125. .monito_li_r{
  1126. width :380rpx;
  1127. font-size: 24rpx;
  1128. font-family: PingFang SC;
  1129. font-weight: 500;
  1130. color: #0183FA;
  1131. line-height: 80rpx;
  1132. display :flex;
  1133. justify-content :flex-end;
  1134. align-items center;
  1135. >img{
  1136. width: 9rpx;
  1137. height: 22rpx;
  1138. margin-left :20rpx;
  1139. }
  1140. .evacuation-title-button-box{
  1141. display flex
  1142. overflow hidden
  1143. view{
  1144. line-height:61rpx;
  1145. font-size:28rpx;
  1146. }
  1147. .colorA{
  1148. color: #0183FA;
  1149. }
  1150. .colorB{
  1151. color:#0183FA;
  1152. }
  1153. img{
  1154. margin:28rpx 20rpx 0;
  1155. width:24rpx;
  1156. height:9rpx;
  1157. }
  1158. }
  1159. }
  1160. }
  1161. .evacuation-map-box{
  1162. width:668rpx;
  1163. height:348rpx;
  1164. margin:0 auto;
  1165. overflow:hidden;
  1166. border:1rpx solid #E0E0E0;
  1167. margin-top:20rpx;
  1168. .map-1{
  1169. background:url(../images/kuangdaMap/map1.png);
  1170. .evacuation-map-min-for-box:nth-child(1){
  1171. margin:4rpx 0 0 0;
  1172. width:54rpx;
  1173. height:102rpx;
  1174. }
  1175. .evacuation-map-min-for-box:nth-child(2){
  1176. margin:4rpx 54rpx 0 0;
  1177. width:54rpx;
  1178. height:102rpx;
  1179. }
  1180. .evacuation-map-min-for-box:nth-child(3){
  1181. margin:4rpx 54rpx 0 0;
  1182. width:100rpx;
  1183. height:102rpx;
  1184. }
  1185. .evacuation-map-min-for-box:nth-child(4){
  1186. margin:4rpx 0 0 0;
  1187. width:135rpx;
  1188. height:102rpx;
  1189. }
  1190. .evacuation-map-min-for-box:nth-child(5){
  1191. margin:4rpx 0 0 0;
  1192. width:95rpx;
  1193. height:102rpx;
  1194. }
  1195. .evacuation-map-min-for-box:nth-child(6){
  1196. margin:4rpx 0 0 0;
  1197. width:54rpx;
  1198. height:102rpx;
  1199. }
  1200. .evacuation-map-min-for-box:nth-child(7){
  1201. margin:78rpx 0 0 0;
  1202. width:130rpx;
  1203. height:102rpx;
  1204. }
  1205. .evacuation-map-min-for-box:nth-child(8){
  1206. margin:78rpx 0 0 0;
  1207. width:149rpx;
  1208. height:102rpx;
  1209. }
  1210. .evacuation-map-min-for-box:nth-child(9){
  1211. margin:78rpx 0 0 0;
  1212. width:84rpx;
  1213. height:102rpx;
  1214. }
  1215. .evacuation-map-min-for-box:nth-child(10){
  1216. margin:78rpx 0 0 0;
  1217. width:84rpx;
  1218. height:102rpx;
  1219. }
  1220. .evacuation-map-min-for-box:nth-child(11){
  1221. margin:78rpx 0 0 0;
  1222. width:94rpx;
  1223. height:102rpx;
  1224. }
  1225. .evacuation-map-min-for-box:nth-child(12){
  1226. margin:78rpx 0 0 0;
  1227. width:44rpx;
  1228. height:102rpx;
  1229. }
  1230. .evacuation-map-min-for-box:nth-child(13){
  1231. margin:78rpx 0 0 0;
  1232. width:64rpx;
  1233. height:102rpx;
  1234. }
  1235. .map-min-img:nth-child(14){
  1236. top: 134rpx;
  1237. left: 80rpx;
  1238. }
  1239. .map-min-img:nth-child(15){
  1240. top: 134rpx;
  1241. left: 160rpx;
  1242. }
  1243. .map-min-img:nth-child(16){
  1244. top: 134rpx;
  1245. left:280rpx;
  1246. }
  1247. .map-min-img:nth-child(17){
  1248. top: 134rpx;
  1249. left:340rpx;
  1250. }
  1251. .map-min-img:nth-child(18){
  1252. top: 134rpx;
  1253. left:460rpx;
  1254. }
  1255. .map-min-img:nth-child(19){
  1256. top: 134rpx;
  1257. left:540rpx;
  1258. }
  1259. }
  1260. .map-2{
  1261. background:url(../images/kuangdaMap/map2.png);
  1262. .evacuation-map-min-for-box:nth-child(1){
  1263. margin:4rpx 0 0 0;
  1264. width:54rpx;
  1265. height:102rpx;
  1266. }
  1267. .evacuation-map-min-for-box:nth-child(2){
  1268. margin:4rpx 54rpx 0 0;
  1269. width:54rpx;
  1270. height:102rpx;
  1271. }
  1272. .evacuation-map-min-for-box:nth-child(3){
  1273. margin:4rpx 54rpx 0 0;
  1274. width:100rpx;
  1275. height:102rpx;
  1276. }
  1277. .evacuation-map-min-for-box:nth-child(4){
  1278. margin:4rpx 0 0 0;
  1279. width:135rpx;
  1280. height:102rpx;
  1281. }
  1282. .evacuation-map-min-for-box:nth-child(5){
  1283. margin:4rpx 0 0 0;
  1284. width:145rpx;
  1285. height:102rpx;
  1286. }
  1287. .evacuation-map-min-for-box:nth-child(6){
  1288. margin:4rpx 0 0 0;
  1289. width:106rpx;
  1290. height:102rpx;
  1291. }
  1292. .evacuation-map-min-for-box:nth-child(7){
  1293. margin:78rpx 0 0 0;
  1294. width:106rpx;
  1295. height:102rpx;
  1296. }
  1297. .evacuation-map-min-for-box:nth-child(8){
  1298. margin:78rpx 0 0 0;
  1299. width:100rpx;
  1300. height:102rpx;
  1301. }
  1302. .evacuation-map-min-for-box:nth-child(9){
  1303. margin:78rpx 0 0 0;
  1304. width:100rpx;
  1305. height:102rpx;
  1306. }
  1307. .evacuation-map-min-for-box:nth-child(10){
  1308. margin:78rpx 0 0 0;
  1309. width:92rpx;
  1310. height:102rpx;
  1311. }
  1312. .evacuation-map-min-for-box:nth-child(11){
  1313. margin:78rpx 0 0 0;
  1314. width:90rpx;
  1315. height:102rpx;
  1316. }
  1317. .evacuation-map-min-for-box:nth-child(12){
  1318. margin:78rpx 0 0 0;
  1319. width:53rpx;
  1320. height:102rpx;
  1321. }
  1322. .map-min-img:nth-child(13){
  1323. top: 134rpx;
  1324. left: 80rpx;
  1325. }
  1326. .map-min-img:nth-child(14){
  1327. top: 134rpx;
  1328. left: 160rpx;
  1329. }
  1330. .map-min-img:nth-child(15){
  1331. top: 134rpx;
  1332. left:280rpx;
  1333. }
  1334. .map-min-img:nth-child(16){
  1335. top: 134rpx;
  1336. left:340rpx;
  1337. }
  1338. .map-min-img:nth-child(17){
  1339. top: 134rpx;
  1340. left:460rpx;
  1341. }
  1342. .map-min-img:nth-child(18){
  1343. top: 134rpx;
  1344. left:540rpx;
  1345. }
  1346. }
  1347. .map-3{
  1348. background:url(../images/kuangdaMap/map3.png);
  1349. }
  1350. .evacuation-map-big-box{
  1351. height:293rpx;
  1352. width:644rpx;
  1353. // background:url(../images/Version2.3/icon_bj_syspmtcy_jinan.png);
  1354. background-size 100%
  1355. margin:28rpx 13rpx ;
  1356. position relative
  1357. .evacuation-map-min-for-box{
  1358. overflow: hidden;
  1359. display: inline-block;
  1360. line-height:70rpx;
  1361. text-align: center;
  1362. font-size:14rpx;
  1363. }
  1364. .evacuation-map-min-for-box-color{
  1365. background: rgba(0,189,255,0.3);
  1366. }
  1367. .map-min-img{
  1368. position: absolute;
  1369. width:34rpx;
  1370. height:22rpx;
  1371. }
  1372. }
  1373. }
  1374. }
  1375. .video-max-box{
  1376. width: 710rpx;
  1377. height: 780rpx;
  1378. overflow-y scroll;
  1379. background: #FFFFFF;
  1380. border-radius: 20rpx;
  1381. padding :22rpx 30rpx 30rpx;
  1382. box-sizing :border-box;
  1383. margin-top :20rpx;
  1384. margin-bottom:120rpx;
  1385. video{
  1386. width:645rpx;
  1387. height:355rpx;
  1388. }
  1389. }
  1390. .bottom-button-box{
  1391. position absolute;
  1392. bottom:20rpx;
  1393. display flex;
  1394. width:670rpx;
  1395. margin:20rpx;
  1396. view{
  1397. width:335rpx;
  1398. height:100rpx;
  1399. line-height:100rpx;
  1400. text-align center;
  1401. color:#fff;
  1402. font-size:28rpx;
  1403. }
  1404. view:nth-child(1){
  1405. border-top-left-radius :50rpx;
  1406. border-bottom-left-radius :50rpx;
  1407. background:#FF9C00;
  1408. }
  1409. view:nth-child(2){
  1410. border-top-right-radius :50rpx;
  1411. border-bottom-right-radius :50rpx;
  1412. background:#0183FA;
  1413. }
  1414. }
  1415. }
  1416. .live-button{
  1417. width:650rpx;
  1418. height:100rpx;
  1419. line-height:100rpx;
  1420. text-align center;
  1421. font-size:28rpx;
  1422. margin:50rpx auto 0;
  1423. border-radius:20rpx;
  1424. }
  1425. .live-color-a{
  1426. color:#fff;
  1427. background:#FF8686;
  1428. }
  1429. .live-color-b{
  1430. color:#fff;
  1431. background:#25C95B;
  1432. }
  1433. .shade-max-big-box{
  1434. height:100%;
  1435. width:100%;
  1436. position fixed
  1437. display flex;
  1438. flex-direction column
  1439. z-index:10;
  1440. background :rgba(0,0,0,0.2);
  1441. .null-box{
  1442. flex:1;
  1443. }
  1444. /* 语音广播-执行疏散 */
  1445. .broadcast{
  1446. width: 100%;
  1447. // height: 532rpx;
  1448. background: #FFFFFF;
  1449. border-top-left-radius :20rpx;
  1450. border-top-right-radius :20rpx
  1451. padding :22rpx 30rpx 30rpx;
  1452. box-sizing :border-box;
  1453. margin-top:20rpx;
  1454. .broadcast_t{
  1455. font-size: 30rpx;
  1456. font-family: PingFang SC;
  1457. font-weight: 500;
  1458. color: #333333;
  1459. line-height: 30rpx;
  1460. >label{
  1461. font-size: 24rpx;
  1462. font-family: PingFang SC;
  1463. font-weight: 500;
  1464. color: #999999;
  1465. line-height: 30rpx;
  1466. margin-left :16rpx;
  1467. }
  1468. }
  1469. .trumpet-max-box{
  1470. display :flex;
  1471. justify-content :flex-start;
  1472. margin-top :22rpx;
  1473. flex-wrap: wrap;
  1474. .trumpet-for-box{
  1475. display:inline-block;
  1476. width:200rpx;
  1477. height:60rpx;
  1478. line-height:60rpx;
  1479. font-size:24rpx;
  1480. text-align center;
  1481. cursor: pointer;
  1482. overflow: hidden;
  1483. border: 1rpx solid #E0E0E0;
  1484. border-radius:10rpx;
  1485. color: #E0E0E0;
  1486. display :flex;
  1487. justify-content :center;
  1488. margin-right :20rpx;
  1489. margin-bottom: 10rpx;
  1490. >img{
  1491. width:36rpx;
  1492. height:34rpx;
  1493. margin :12rpx 20rpx 0 25rpx;
  1494. }
  1495. }
  1496. .trumpet-color-a{
  1497. border:1px solid #0183FA;
  1498. color:#0183FA;
  1499. }
  1500. .trumpet-color-b{
  1501. border:1px solid #CCCCCC;
  1502. color:#999;
  1503. }
  1504. }
  1505. .broadcast_m{
  1506. width :100%;
  1507. .broadcast_m_t{
  1508. width: 142rpx;
  1509. height: 142rpx;
  1510. margin :30rpx 0 0 258rpx;
  1511. position :relative;
  1512. font-size: 24rpx;
  1513. font-family: PingFang SC;
  1514. font-weight: 500;
  1515. line-height: 170rpx;
  1516. text-align center
  1517. >img{
  1518. width: 142rpx;
  1519. height: 142rpx;
  1520. position :absolute;
  1521. }
  1522. >label{
  1523. width :100%;
  1524. font-size: 24rpx;
  1525. font-family: PingFang SC;
  1526. font-weight: 500;
  1527. color: #0183FA;
  1528. line-height: 24rpx;
  1529. display :inline-block;
  1530. text-align :center;
  1531. position :absolute;
  1532. top:76rpx;
  1533. }
  1534. /* 按下 */
  1535. .press_color{
  1536. color: #FFFFFF;
  1537. }
  1538. /* 松开 */
  1539. .slip_color{
  1540. color: #0183FA;
  1541. }
  1542. }
  1543. .broadcast_m_t_back_a{
  1544. background:url(@/images/icon_sskz_skfs.png);
  1545. background-size 100%
  1546. color: #FFFFFF;
  1547. }
  1548. .broadcast_m_t_back_b{
  1549. background:url(@/images/icon_sskz_azsh.png);
  1550. background-size 100%
  1551. color: #0183FA;
  1552. }
  1553. .broadcast_m_b{
  1554. font-size: 24rpx;
  1555. font-family: PingFang SC;
  1556. font-weight: 500;
  1557. color: #999999;
  1558. line-height: 24rpx;
  1559. text-align center;
  1560. margin-top :14rpx;
  1561. }
  1562. }
  1563. /* 疏散按钮 */
  1564. .evacuation-button-box{
  1565. width:650rpx;
  1566. height:100rpx;
  1567. background #0183FA
  1568. color:#fff;
  1569. text-align center;
  1570. line-height:100rpx;
  1571. font-size:28rpx;
  1572. margin:88rpx auto 0;
  1573. border-radius:20rpx;
  1574. }
  1575. }
  1576. }
  1577. }
  1578. .setUpEvacuation-bottom-button{
  1579. width:650rpx;
  1580. height:100rpx;
  1581. background #0183FA
  1582. color:#fff;
  1583. text-align center;
  1584. line-height:100rpx;
  1585. font-size:28rpx;
  1586. margin:50rpx auto;
  1587. border-radius:20rpx;
  1588. }
  1589. }
  1590. </style>