emergencyEvacuationBig.vue 69 KB

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