emergencyEvacuationBig.vue 49 KB

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