emergencyEvacuationBig.vue 49 KB

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