emergencyEvacuationBig.vue 49 KB

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