emergencyEvacuationBigFullScreen.vue 19 KB

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