emergencyEvacuationBig.vue 50 KB

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