emergencyEvacuationBigFullScreen.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <view id="emergencyEvacuationBigFullScreen">
  3. <view class="emergencyEvacuationBigFullScreen-page" v-if="mapType"
  4. :style="'width:'+mapWidth+'px;height:'+mapHeight+'px;transform: scale('+zoomData+');margin-top:-'+mapHeight/2+'px;margin-left:-'+mapWidth/2+'px;'">
  5. <view class="map-max-box" :style="'width:'+mapWidth+'px;height:'+mapHeight+'px;'">
  6. <!-- :style="'width:'+mapW+'px;height:'+mapH+'px;'" -->
  7. <view class="map-max-for-box for-map-box" v-if="item.type == 1" v-for="(item,index) in mapList"
  8. :key="index" :class="!item.policeType && checkSubId ==item.subId ? 'room-type-one':(
  9. item.policeType && checkSubId !=item.subId ? 'room-type-two':(
  10. item.policeType && checkSubId ==item.subId ? 'room-type-three':(
  11. !item.loginAdmin ? 'room-type-noe':''
  12. )))" :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+(item.w-4)+'px;height:'+(item.h-4)+'px;'">
  13. <view class="map-max-for-min-box">
  14. <view class="map-for-name-p" :style="'margin-top:'+((item.h/2)-20)+'px;'">
  15. {{item.roomType == '-99'?item.roomName:item.subName}}</view>
  16. <view class="map-for-num-p">({{item.roomNum}})</view>
  17. <view class="position-box" src="@/images/evacuation3_2/icon_sysbjt_m.png"
  18. :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':'')))"
  19. v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
  20. :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'">
  21. </view>
  22. </view>
  23. </view>
  24. <view class="map-max-for-box for-map-box-one" v-if="item.type == 2" v-for="(item,index) in mapList"
  25. :key="index" :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+item.w+'px;height:'+item.h+'px;'">
  26. <view class="map-max-for-min-box">
  27. <view class="position-box" @click="lighButton(minItem)"
  28. :class="minItem.state=='1'&&minItem.openType?'lightTopOn':(minItem.state=='1'&&!minItem.openType?'lightTopOff':
  29. (minItem.state=='2'&&minItem.openType?'lightBottomOn':(minItem.state=='2'&&!minItem.openType?'lightBottomOff':
  30. (minItem.state=='3'&&minItem.openType?'lightLeftOn':(minItem.state=='3'&&!minItem.openType?'lightLeftOff':
  31. (minItem.state=='4'&&minItem.openType?'lightRightOn':(minItem.state=='4'&&!minItem.openType?'lightRightOff':'')))))))"
  32. v-for="(minItem,minIndex) in item.lightList" :key="minIndex"
  33. :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'">
  34. </view>
  35. </view>
  36. </view>
  37. <view class="map-max-for-box for-map-box-two" v-if="item.type == 3" v-for="(item,index) in mapList"
  38. @click="checkRoom(item)"
  39. :key="index" :class="item.roomCheckType?'for-map-box-two-check':''"
  40. :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+item.w+'px;height:'+item.h+'px;'">
  41. </view>
  42. </view>
  43. </view>
  44. <view class="position-button" @click="backButton">退出全屏</view>
  45. <view class="position-button-two" @click="executeEvacuation">已确定疏散出口,立即执行疏散</view>
  46. </view>
  47. </template>
  48. <script>
  49. import $mqtt from '@/utils/mqtt.min.js';
  50. import {
  51. getFloorData,
  52. getRedisEvacuation,
  53. openLight,
  54. closeLight,
  55. executeEvacuation
  56. } from '@/api/index.js'
  57. export default {
  58. data() {
  59. return {
  60. // 楼栋id
  61. buildingId: null,
  62. //楼层id
  63. floorId: null,
  64. //实验室ID
  65. subId:null,
  66. //当前选中实验室
  67. checkSubId: null,
  68. //页面开关
  69. mapType: false,
  70. mapList: [],
  71. //缩放相关数据
  72. zoomData: null,
  73. mapWidth: null, //40边框距离
  74. mapHeight: null, //40边框距离
  75. //弹层地图数据
  76. buildingOptions: {},
  77. //mqtt
  78. floorClient: {},
  79. evacuationTopic: "lab/newexit/line", //疏散
  80. //疏散按钮
  81. buttonType:false
  82. }
  83. },
  84. onLoad(option) {
  85. if(option.item){
  86. let obj = JSON.parse(decodeURIComponent(option.item));
  87. this.$set(this,'buildingId',obj.buildingId);
  88. this.$set(this,'floorId',obj.floorId);
  89. this.$set(this,'subId',obj.subId);
  90. this.$set(this,'checkSubId',obj.subId);
  91. if(obj.type == 2){
  92. this.$set(this,'buttonType',true);
  93. }else{
  94. this.$set(this,'buttonType',false);
  95. }
  96. }
  97. },
  98. onShow() {
  99. // this.offMQTT('on');
  100. this.getBuildingData();
  101. },
  102. methods: {
  103. mqttPageFunction(type){
  104. // console.log('页面方法被上级路由页面调用-type=',type);
  105. let self = this;
  106. if (type == 'FLOOR_EXITLINE') {
  107. this.getRedisEvacuation();
  108. } else if (type == 'FLOOR_OVER_EXITLINE') {
  109. uni.showToast({
  110. title: '疏散已结束',
  111. icon: "none",
  112. mask: true,
  113. duration: 2000
  114. });
  115. setTimeout(function() {
  116. self.getBuildingData();
  117. }, 2000);
  118. }
  119. },
  120. checkRoom(item){
  121. console.log('item',item)
  122. if(this.buttonType){
  123. item.roomCheckType = !item.roomCheckType;
  124. this.$forceUpdate();
  125. }
  126. },
  127. //开始疏散
  128. async executeEvacuation(){
  129. let self = this;
  130. let list = [];
  131. let doorPointNames = [];
  132. for(let i=0;i<self.mapList.length;i++){
  133. if(self.mapList[i].type == 3){
  134. if(!self.mapList[i].roomCheckType){
  135. list.push(self.mapList[i].key)
  136. }else{
  137. doorPointNames.push(self.mapList[i].key)
  138. }
  139. }
  140. }
  141. if(!doorPointNames[0]){
  142. uni.showToast({
  143. title: '请选择疏散出口',
  144. icon: "none",
  145. mask: true,
  146. duration: 2000
  147. });
  148. return
  149. }
  150. let obj = {
  151. buildId:this.buildingId,
  152. floorId:this.floorId,
  153. subId: this.subId,
  154. badPointNames:list,
  155. doorPointNames:doorPointNames,
  156. }
  157. const { data } = await executeEvacuation(obj)
  158. console.log('data', data)
  159. if (data.code == 200) {
  160. uni.showToast({
  161. title: '执行成功',
  162. icon: "none",
  163. mask: true,
  164. duration: 2000
  165. });
  166. setTimeout(function(){
  167. uni.navigateBack();
  168. },2000);
  169. }
  170. },
  171. //疏散页面
  172. backButton() {
  173. uni.navigateBack()
  174. },
  175. //地图数据
  176. async getBuildingData() {
  177. let self = this;
  178. const {
  179. data
  180. } = await getFloorData(this.floorId)
  181. console.log('data', data)
  182. if (data.code == 200) {
  183. if (data.data.buildFloorLayoutVoList[0]) {
  184. let list = JSON.parse(data.data.labExitLineVertex.layoutJoinData)
  185. this.getWXSystemInfo(list);
  186. for (let i = 0; i < list.length; i++) {
  187. if (list[i].type == '2') {
  188. //楼道
  189. for (let o = 0; o < list[i].lightList.length; o++) {
  190. list[i].lightList[o].openType = false;
  191. }
  192. } else if (list[i].type == '1') {
  193. for (let o = 0; o < data.data.buildFloorLayoutVoList.length; o++) {
  194. if (list[i].key == data.data.buildFloorLayoutVoList[o].pointName) {
  195. list[i].id = data.data.buildFloorLayoutVoList[o].id;
  196. list[i].buildId = data.data.buildFloorLayoutVoList[o].buildId;
  197. list[i].floorId = data.data.buildFloorLayoutVoList[o].floorId;
  198. list[i].roomType = data.data.buildFloorLayoutVoList[o].roomType;
  199. list[i].roomName = data.data.buildFloorLayoutVoList[o].roomName;
  200. list[i].roomNum = data.data.buildFloorLayoutVoList[o].roomNum;
  201. list[i].subName = data.data.buildFloorLayoutVoList[o].subName;
  202. list[i].subId = data.data.buildFloorLayoutVoList[o].subId;
  203. list[i].online = data.data.buildFloorLayoutVoList[o].online;
  204. list[i].loginAdmin = data.data.buildFloorLayoutVoList[o].loginAdmin;
  205. list[i].policeType = false;
  206. }
  207. }
  208. } else if (list[i].type == 3) {
  209. list[i].roomCheckType = false;
  210. }
  211. }
  212. this.$set(this, 'mapList', JSON.parse(JSON.stringify(list)));
  213. this.$set(this, 'mapType', true);
  214. setTimeout(function() {
  215. self.getRedisEvacuation();
  216. }, 500);
  217. }
  218. }
  219. },
  220. //获取疏散数据
  221. async getRedisEvacuation() {
  222. let self = this;
  223. let obj = {
  224. buildId: this.buildingId,
  225. floorId: this.floorId,
  226. }
  227. const {
  228. data
  229. } = await getRedisEvacuation(obj)
  230. if (data.code == 200) {
  231. if (data.data.doorPointNames) {
  232. for (let o = 0; o < self.mapList.length; o++) {
  233. if (self.mapList[o].type == 2) {
  234. for (let x = 0; x < self.mapList[o].lightList.length; x++) {
  235. let num = 0;
  236. for (let i = 0; i < data.data.lightPointSet.length; i++) {
  237. if (data.data.lightPointSet[i]) { //处理后端返回的异常的NULL
  238. if (self.mapList[o].lightList[x].key == data.data.lightPointSet[i].key) {
  239. num++
  240. }
  241. }
  242. }
  243. self.mapList[o].lightList[x].openType = num != 0;
  244. }
  245. }
  246. }
  247. for (let i = 0; i < data.data.doorPointNames.length; i++) {
  248. for (let o = 0; o < self.mapList.length; o++) {
  249. if (self.mapList[o].type == 3) {
  250. if (data.data.doorPointNames[i] == self.mapList[o].key) {
  251. self.mapList[o].roomCheckType = true;
  252. }
  253. }
  254. }
  255. }
  256. this.$forceUpdate();
  257. }
  258. };
  259. },
  260. //灯点击事件
  261. lighButton(item) {
  262. let self = this;
  263. uni.showModal({
  264. content: '确定' + (item.openType ? '关闭' : '开启') + '该疏散灯?',
  265. cancelColor: "#999",
  266. confirmColor: "#0183FA",
  267. success: function(res) {
  268. if (res.confirm) {
  269. if (item.openType) {
  270. self.closeLight(item);
  271. } else {
  272. self.openLight(item);
  273. }
  274. console.log('用户点击确定');
  275. } else if (res.cancel) {
  276. console.log('用户点击取消');
  277. }
  278. }
  279. });
  280. },
  281. //开灯
  282. async openLight(item) {
  283. let obj = {
  284. buildId: this.buildingId,
  285. floorId: this.floorId,
  286. pointName: item.key
  287. };
  288. const {
  289. data
  290. } = await openLight(obj)
  291. if (data.code == 200) {
  292. uni.showToast({
  293. title: '操作成功',
  294. icon: "none",
  295. mask: true,
  296. duration: 2000
  297. });
  298. }
  299. },
  300. //关灯
  301. async closeLight(item) {
  302. let obj = {
  303. buildId: this.buildingId,
  304. floorId: this.floorId,
  305. pointName: item.key
  306. };
  307. const {
  308. data
  309. } = await closeLight(obj)
  310. if (data.code == 200) {
  311. uni.showToast({
  312. title: '操作成功',
  313. icon: "none",
  314. mask: true,
  315. duration: 2000
  316. });
  317. }
  318. },
  319. //计算缩放率
  320. getWXSystemInfo(list) {
  321. let self = this;
  322. wx.getSystemInfo({
  323. success: function(res) {
  324. self.zoomCalculate(list, res.windowHeight, res.windowWidth);
  325. }
  326. })
  327. },
  328. zoomCalculate(list, height, width) {
  329. let num = 0;
  330. let zoomType = 0;
  331. let maxWidth = 0
  332. let maxHeight = 0
  333. let zoomData = 1;
  334. if (height > width) {
  335. num = height / width
  336. } else {
  337. num = width / height
  338. }
  339. for (let i = 0; i < list.length; i++) {
  340. if ((list[i].x + list[i].w) > maxWidth) {
  341. maxWidth = list[i].x + list[i].w
  342. }
  343. if ((list[i].y + list[i].h) > maxHeight) {
  344. maxHeight = list[i].y + list[i].h
  345. }
  346. }
  347. this.$set(this, 'mapWidth', maxWidth);
  348. this.$set(this, 'mapHeight', maxHeight);
  349. let zoomNumOne = height / maxHeight;
  350. if(parseInt(this.accMul(zoomNumOne,maxHeight)) <= height && parseInt(this.accMul(zoomNumOne,maxWidth)) <= width){
  351. zoomData = zoomNumOne;
  352. this.$set(this,'zoomData',zoomNumOne);
  353. }
  354. let zoomNumTwo = width / maxWidth;
  355. if(parseInt(this.accMul(zoomNumTwo,maxHeight)) <= height && parseInt(this.accMul(zoomNumTwo,maxWidth)) <= width){
  356. zoomData = zoomNumTwo;
  357. this.$set(this,'zoomData',zoomNumTwo);
  358. }
  359. // if (maxWidth > maxHeight) {
  360. // if ((maxWidth / maxHeight) > num) {
  361. // // 以宽度缩放
  362. // zoomType = 1;
  363. // } else {
  364. // // 以高度缩放
  365. // zoomType = 2;
  366. // }
  367. // } else {
  368. // if ((maxHeight / maxWidth) > num) {
  369. // // 以高度缩放
  370. // zoomType = 2;
  371. // } else {
  372. // // 以宽度缩放
  373. // zoomType = 1;
  374. // }
  375. // }
  376. // if (zoomType == 1) {
  377. // if (width > maxWidth) {
  378. // zoomData = maxWidth / width;
  379. // } else {
  380. // zoomData = width / maxWidth;
  381. // }
  382. // if (width > maxWidth) {
  383. // this.$set(this, 'zoomData', maxWidth / width);
  384. // } else {
  385. // this.$set(this, 'zoomData', width / maxWidth);
  386. // }
  387. // } else if (zoomType == 2) {
  388. // if (height > maxHeight) {
  389. // zoomData = maxHeight / height;
  390. // } else {
  391. // zoomData = height / maxHeight;
  392. // }
  393. // if (height > maxHeight) {
  394. // this.$set(this, 'zoomData', maxHeight / height);
  395. // } else {
  396. // this.$set(this, 'zoomData', height / maxHeight);
  397. // }
  398. // }
  399. },
  400. accMul(arg1,arg2){
  401. var m=0,s1=arg1.toString(),s2=arg2.toString();
  402. try{m+=s1.split(".")[1].length}catch(e){}
  403. try{m+=s2.split(".")[1].length}catch(e){}
  404. return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
  405. },
  406. /*MQTT*/
  407. //订阅
  408. onMQTT() {
  409. let self = this;
  410. const mqttOptions = {
  411. keepalive: 30,
  412. clean: true, //保留会话
  413. connectTimeout: 600000, // 超时时间
  414. reconnectPeriod: 5000, // 重连间隔
  415. clientId: uni.getStorageSync('token') + 'lab/function/data',
  416. username: uni.getStorageSync('mqttUser'),
  417. password: uni.getStorageSync('mqttPassword'),
  418. }
  419. const connectUrl = uni.getStorageSync('mqttUrl');
  420. this.floorClient = $mqtt.connect('wxs://' + connectUrl, mqttOptions);
  421. this.floorClient.on('connect', () => {
  422. this.floorClient.subscribe(this.evacuationTopic + this.floorId, (err) => {
  423. if (!err) {
  424. console.log("疏散-订阅成功", )
  425. this.getBuildingData();
  426. }
  427. });
  428. });
  429. // 自动重连
  430. this.floorClient.on('reconnect', (msg) => {
  431. console.log('自动重连-reconnect-1', msg)
  432. });
  433. // 错误
  434. this.floorClient.on('error', () => {
  435. console.log('错误-error-1')
  436. });
  437. // 断开
  438. this.floorClient.on('end', () => {
  439. console.log('断开-end-1')
  440. });
  441. // 掉线
  442. this.floorClient.on('offline', (msg) => {
  443. console.log('掉线-offline-1', msg)
  444. });
  445. // 收到消息
  446. this.floorClient.on('message', (topic, message) => {
  447. let data = JSON.parse(message)
  448. if (data) {
  449. if (topic == (this.evacuationTopic + this.floorId)) {
  450. console.log('疏散通知', data)
  451. //疏散消息
  452. if (data.data == 'FLOOR_EXITLINE') {
  453. this.getRedisEvacuation();
  454. } else if (data.data == 'FLOOR_OVER_EXITLINE') {
  455. uni.showToast({
  456. title: '疏散已结束',
  457. icon: "none",
  458. mask: true,
  459. duration: 2000
  460. });
  461. setTimeout(function() {
  462. self.getBuildingData();
  463. }, 2000);
  464. }
  465. }
  466. }
  467. });
  468. // 全局监听是否有关闭mqtt的消息的事件
  469. uni.$on('closeMqtt', () => {
  470. this.floorClient.end(true); // 主动断开连接
  471. })
  472. },
  473. //关闭MQTT连接
  474. offMQTT(type) {
  475. if (this.floorClient.unsubscribe) {
  476. this.floorClient.unsubscribe(this.evacuationTopic + this.floorId, error => {
  477. if (error) {
  478. console.log('疏散连接-关闭错误', error)
  479. }
  480. });
  481. this.floorClient.end(true);
  482. this.$set(this, 'floorClient', {});
  483. }
  484. if (type) {
  485. this.onMQTT();
  486. }
  487. },
  488. },
  489. beforeDestroy() {
  490. //断开mqtt连接
  491. this.offMQTT();
  492. }
  493. }
  494. </script>
  495. <style lang="stylus" scoped>
  496. #emergencyEvacuationBigFullScreen {
  497. height: 100%;
  498. width: 100%;
  499. display: flex;
  500. overflow: hidden;
  501. .emergencyEvacuationBigFullScreen-page {
  502. // overflow: scroll;
  503. overflow: hidden;
  504. position: absolute;
  505. top: 50%;
  506. left: 50%;
  507. .map-max-box {
  508. position: relative;
  509. .map-max-for-box {
  510. position: absolute;
  511. display: flex;
  512. flex-direction: column;
  513. .map-max-for-min-box {
  514. position: relative;
  515. .position-box {
  516. position: absolute;
  517. }
  518. .map-for-name-p {
  519. padding: 0 10px;
  520. height: 20px;
  521. line-height: 20px;
  522. font-size: 14px;
  523. text-align: center;
  524. color: #333;
  525. overflow: hidden;
  526. text-overflow: ellipsis;
  527. white-space: nowrap;
  528. }
  529. .map-for-num-p {
  530. padding: 0 10px;
  531. height: 20px;
  532. line-height: 20px;
  533. font-size: 14px;
  534. text-align: center;
  535. color: #333;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. white-space: nowrap;
  539. }
  540. .center-move-door-p-t {
  541. background: url("../images/evacuation3_2/icon_sysbjt_m.png") !important;
  542. background-size: 100% !important;
  543. transform: rotate(180deg);
  544. }
  545. .center-move-door-p-b {
  546. background: url("../images/evacuation3_2/icon_sysbjt_m.png") !important;
  547. background-size: 100% !important;
  548. }
  549. .center-move-door-p-l {
  550. background: url("../images/evacuation3_2/icon_sysbjt_m.png") !important;
  551. background-size: 100% !important;
  552. transform: rotate(90deg);
  553. }
  554. .center-move-door-p-r {
  555. background: url("../images/evacuation3_2/icon_sysbjt_m.png") !important;
  556. background-size: 100% !important;
  557. transform: rotateZ(270deg);
  558. }
  559. .lightTopOn {
  560. background: url("../images/evacuation3_2//icon_sjt.png");
  561. background-size: 100%;
  562. }
  563. .lightTopOff {
  564. background: url("../images/evacuation3_2//icon_shang_hs.png");
  565. background-size: 100%;
  566. }
  567. .lightBottomOn {
  568. background: url("../images/evacuation3_2//icon_xjt.png");
  569. background-size: 100%;
  570. }
  571. .lightBottomOff {
  572. background: url("../images/evacuation3_2//icon_xia_hs.png");
  573. background-size: 100%;
  574. }
  575. .lightLeftOn {
  576. background: url("../images/evacuation3_2//icon_zuo.png");
  577. background-size: 100%;
  578. }
  579. .lightLeftOff {
  580. background: url("../images/evacuation3_2//icon_zou_hs.png");
  581. background-size: 100%;
  582. }
  583. .lightRightOn {
  584. background: url("../images/evacuation3_2//icon_yuo.png");
  585. background-size: 100%;
  586. }
  587. .lightRightOff {
  588. background: url("../images/evacuation3_2//icon_you_hs.png");
  589. background-size: 100%;
  590. }
  591. }
  592. }
  593. .for-map-box {
  594. border: 2px solid #fff;
  595. background: #CEF2FD;
  596. }
  597. .for-map-box-one {
  598. background: #CEFDD5;
  599. }
  600. .for-map-box-two {
  601. background: url("../images/evacuation3_2/icon_yjtd.png") center center no-repeat #006400;
  602. background-size: 60px 60px;
  603. }
  604. .for-map-box-two-check {
  605. background: url("../images/evacuation3_2/icon_yjtd.png") center center no-repeat rgba(50, 205, 50, 1);
  606. background-size: 80px 80px;
  607. }
  608. .room-type-one {
  609. //选中
  610. background: rgba(178, 235, 255, 1);
  611. }
  612. .room-type-two {
  613. //报警
  614. background: rgba(232, 0, 0, 0.4);
  615. box-shadow: 0 0 10px 1px #E80000 inset;
  616. }
  617. .room-type-three {
  618. //选中报警
  619. background: rgba(178, 235, 255, 1);
  620. box-shadow: 0 0 10px 1px #E80000 inset;
  621. }
  622. }
  623. }
  624. .position-button {
  625. position: fixed;
  626. top: 10px;
  627. right: 10px;
  628. width: 100px;
  629. line-height: 30px;
  630. font-size: 16px;
  631. background: rgba(0, 0, 0, 0.5);
  632. color: #fff;
  633. text-align: center;
  634. border-radius: 18px;
  635. border: none;
  636. }
  637. .position-button-two{
  638. position: fixed;
  639. bottom: 20px;
  640. left: 50%;
  641. width: 240px;
  642. line-height: 30px;
  643. font-size: 16px;
  644. text-align: center;
  645. color: #fff;
  646. background: #0183FA;
  647. border-radius: 4px;
  648. margin-left: -120px;
  649. border: none;
  650. }
  651. }
  652. </style>