emergencyEvacuationBig.vue 50 KB

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