emergencyEvacuationBig.vue 50 KB

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