emergencyEvacuationBig.vue 51 KB

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