emergencyEvacuationBig.vue 50 KB

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