emergencyEvacuationBig.vue 51 KB

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