emergencyEvacuationBig.vue 50 KB

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