emergencyEvacuationBig.vue 50 KB

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