emergencyEvacuationBig.vue 50 KB

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