emergencyEvacuationBig.vue 51 KB

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