emergencyEvacuationBig.vue 69 KB

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