emergencyEvacuationBig.vue 50 KB

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