emergencyEvacuationBig.vue 50 KB

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