emergencyEvacuationBig.vue 64 KB

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