index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <view class="container">
  3. <view class="dboxs dport">
  4. <view class="dboxtitle"><image class="portimg" src="/static/images/new/start/port.png"/>
  5. <view class="dboxtitle-text"> {{ i18('设备端口') }}</view>
  6. </view>
  7. <view class="dportitems">
  8. <view class="dportitem " v-for="item in curPort" @click="selectPort(item.id);">
  9. <p class="dpropitem-title "> {{ item.text }}</p>
  10. <view style="position: absolute;right: 0px;z-index: 9999" v-if="item.id == choosePort">
  11. <image class="dportitem-img" style="width: 15px;height: 15px" src="/static/images/new/start/choose.png"/>
  12. </view>
  13. <view class="dpropitem-block dportitem-block-2" v-if="item.status == 2">
  14. <image class="dportitem-img" src="/static/images/new/start/using.png"/>
  15. <view class="dpropitem-status">{{ i18('充电中') }}</view>
  16. </view>
  17. <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1">
  18. <image class="dportitem-img" src="/static/images/new/start/free.png"/>
  19. <view class="dpropitem-status">{{ i18('空闲中') }}</view>
  20. </view>
  21. <view class="dpropitem-block dportitem-block-3" style="background: rgb(247,238,240);color:#FF6868" v-if="item.status == 3">
  22. <image class="dportitem-img" src="/static/images/new/start/ban.png"/>
  23. <view class="dpropitem-status">{{ i18('禁用中') }}</view>
  24. </view>
  25. <view class="dpropitem-block dportitem-block-3" style="background: rgb(248,244,230);color:#FFAA00" v-if="item.status == 4">
  26. <image class="dportitem-img" src="/static/images/new/start/bad.png"/>
  27. <view class="dpropitem-status">{{ i18('故障中') }}</view>
  28. </view>
  29. <view class="dpropitem-block dportitem-block-3" style=";" v-if="item.status == 5">
  30. <image class="dportitem-img" src="/static/images/new/start/lianjie.png"/>
  31. <view class="dpropitem-status">{{ i18('已连接') }}</view>
  32. </view>
  33. <view class="dpropitem-block dportitem-block-3" style="background: rgb(239,235,254);color:#A552FF" v-if="item.status == 6">
  34. <image class="dportitem-img" src="/static/images/new/start/yuyue.png"/>
  35. <view class="dpropitem-status">{{ i18('已预约') }}</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="dboxs dport" style="height: 100px" @click="planCharge">
  41. <view class="dboxtitle"><image class="portimg" src="/static/images/new/start/clock.png"/>
  42. <view class="dboxtitle-text">{{ i18('预约充电') }}</view>
  43. </view>
  44. <view class="port-text" v-if="planInfo != null" style="left:40px;top:48px;font-size: 14px">
  45. {{ i18('已预约') }} <view class="port-text" style="top:30px;">
  46. <text style="font-size: 10px">{{ planInfo.runTime }}</text>
  47. </view>
  48. </view>
  49. <view class="port-text" style="left:40px;top:55px;font-size: 14px" v-else>
  50. {{ i18('点击预约充电') }}
  51. </view>
  52. <view class="port-num" style="left:40px;top:70px;font-size: 12px" v-if="portDetail.portStatus == 6">
  53. {{ i18('可点击取消预约') }}
  54. </view>
  55. <view class="port-icon" v-if="portDetail.portStatus !=6" style="width: 50px;height: 50px;right:10px;top:28%">
  56. <image class="btn-image" src="/static/images/new/start/clock.png" >
  57. </image>
  58. </view>
  59. <view class="port-icon" v-if="portDetail.portStatus == 6" style="width: 50px;height: 50px;right:10px;top:28%">
  60. <image class="btn-image" src="/static/images/new/start/del.png" >
  61. </image>
  62. </view>
  63. </view>
  64. <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
  65. <view class="dboxs dport" style="height: 200px">
  66. <view class="dboxtitle"><image class="portimg" src="/static/images/new/start/oper.png"/>
  67. <view class="dboxtitle-text"> {{ i18('设备操作') }}</view>
  68. </view>
  69. <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
  70. <image class="btn-image" src="/static/images/new/start/stop.png" >
  71. </image>
  72. <view>{{ i18('停止充电') }}</view>
  73. </view>
  74. <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus != 2">
  75. <image class="btn-image" src="/static/images/new/start/using.png" >
  76. </image>
  77. <view>{{ i18('立即充电') }}</view>
  78. </view>
  79. <view class="control-btn" @click="getInfo">
  80. <image class="btn-image" src="/static/images/new/start/get.png" >
  81. </image>
  82. <view>{{ i18('获取状态') }}</view>
  83. </view>
  84. <view class="control-btn" @click="toSet">
  85. <image class="btn-image" src="/static/images/new/start/oper.png" >
  86. </image>
  87. <view>{{ i18('设备控制') }}</view>
  88. </view>
  89. <view class="control-btn" @click="goBack">
  90. <image class="btn-image" src="/static/images/new/start/back.png" >
  91. </image>
  92. <view>{{ i18('返回') }}</view>
  93. </view>
  94. <!-- <view class="control-btn">-->
  95. <!-- <image class="btn-image" :src="imgUrl+'/control/record.png'" >-->
  96. <!-- </image>-->
  97. <!-- <view>使用记录</view>-->
  98. <!-- </view>-->
  99. </view>
  100. <u-picker @cancel="cancelPicker" @confirm="confirm" :show="showPlan" :columns="planCols" @change="changeHandler"></u-picker>
  101. <u-modal :show="showPwd" :confirmText="i18('确认')" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" title="修改密码" >
  102. <view class="slot-content">
  103. <view>
  104. <u--input
  105. type="number"
  106. :placeholder="i18('原密码')"
  107. border="surround"
  108. v-model="oldPwd"
  109. ></u--input>
  110. </view>
  111. <view style="margin-top:5px">
  112. <u--input
  113. type="number"
  114. :placeholder="i18('6位数字新密码')"
  115. border="surround"
  116. v-model="pwd"
  117. ></u--input>
  118. </view>
  119. </view>
  120. </u-modal>
  121. </view>
  122. </template>
  123. <script>
  124. import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
  125. // #ifdef APP
  126. import ecUI from '@/utils/ecUI.js'
  127. import ecBLE from '@/utils/ecBLE/ecBLE.js'
  128. // #endif
  129. // #ifdef MP
  130. const ecUI = require('@/utils/ecUI.js')
  131. const ecBLE = require('@/utils/ecBLE/ecBLE.js')
  132. // #endif
  133. import i18 from '@/utils/i18.js'
  134. let ctx
  135. let isCheckScroll = true
  136. let isCheckRevHex = false
  137. let isCheckSendHex = false
  138. let sendData = ''
  139. export default {
  140. data() {
  141. return {
  142. oldPwd:"",
  143. pwd:"",
  144. showPwd:false,
  145. planCols:[ ],
  146. columnData:[],
  147. showPlan:false,
  148. deviceInfo:{},
  149. visitTime:"",
  150. timer:null,
  151. showPort:false,
  152. portDetail:{portStatus:0,POWER:0,voltage:0},
  153. statusTimer:"",
  154. connected:false,
  155. scriptTask:null,
  156. choosePort:1,
  157. portList:[[{port:1,text:"端口一"}]],
  158. planInfo:null,
  159. days:["","周一","周二","周三","周四","周五","周六","周日"],
  160. textRevData: '',
  161. picker:null,
  162. firstInit:false,
  163. hasRight:false,
  164. startAutoCharge:true,
  165. curPort:[]
  166. }
  167. },
  168. computed: {
  169. imgUrl() {
  170. return getApp().globalData.config.imgUrl;
  171. }
  172. },
  173. onLoad(opt) {
  174. this.deviceInfo.deviceId = opt.id;
  175. this.deviceInfo.ccid = opt.ccid;
  176. this.deviceInfo.qrcode = opt.qrcode;
  177. this.checkPassword();
  178. },
  179. onShow(){
  180. this.buletooth();
  181. },
  182. onUnload (){
  183. this.closeSocket();
  184. },
  185. methods: {
  186. i18(text){
  187. return i18(text)
  188. },
  189. selectPort(id){
  190. this.choosePort = id;
  191. console.log(this.choosePort)
  192. },
  193. cancel(){
  194. this.showPwd = false;
  195. },
  196. modifyPwd(){
  197. this.showPwd = true;
  198. },
  199. inputPwd(){
  200. let rightPwd = uni.getStorageSync("pwd");
  201. if(!this.oldPwd){
  202. this.$modal.showToast("原密码不能为空");
  203. return;
  204. }
  205. if(rightPwd != this.oldPwd){
  206. this.$modal.showToast("原密码不对");
  207. return;
  208. }
  209. if(!this.pwd){
  210. this.$modal.showToast("密码不能为空");
  211. }else {
  212. setPwd(this.pwd);
  213. this.$modal.showToast("密码修改成功");
  214. this.goBack();
  215. }
  216. },
  217. confirm(e) {
  218. let value = e.value;
  219. console.log('confirm', value)
  220. let day = value[0];
  221. let date = new Date();
  222. let nowDay = date.getDate();
  223. let hour = value[1]+"";
  224. hour = parseInt(hour.substr(0,hour.length-1),10);
  225. let min = value[2]+"";
  226. min = parseInt(min.substr(0,min.length-1),10);
  227. let todayTotalMin = 0;
  228. let planDate = {min:min,hour:hour};
  229. let nowHour = date.getHours();
  230. let nowMin = date.getMinutes();
  231. let nowDate ={min:nowMin,hour:nowHour};
  232. if(i18("今日") == day){
  233. todayTotalMin = this.getGapMin(planDate,nowDate)
  234. }else {
  235. let nowHour = date.getHours();
  236. let min = date.getMinutes();
  237. let maxDate ={min:59,hour:23};
  238. todayTotalMin = this.getGapMin(maxDate,nowDate);
  239. let minDate = {min:0,hour:0};
  240. todayTotalMin +=this.getGapMin(planDate,minDate);
  241. }
  242. console.log(todayTotalMin);
  243. this.cancelPicker();
  244. if(todayTotalMin<=0 || todayTotalMin>1440){
  245. this.$modal.showToast("最大预约时间为24小时");
  246. }else{
  247. planCharge(this.choosePort,todayTotalMin).then(res=>{
  248. this.getInfo(true);
  249. });
  250. }
  251. },
  252. getGapMin(date1,date2){
  253. let min1 = date1.min;
  254. let hour1 = date1.hour;
  255. let min2 = date2.min;
  256. let hour2 = date2.hour;
  257. let total1 = min1+hour1*60;
  258. let total2 = min2+hour2*60;
  259. return total1-total2;
  260. },
  261. cancelPicker(e) {
  262. this.showPlan = false
  263. },
  264. changeHandler(e){
  265. const {
  266. columnIndex,
  267. value,
  268. values, // values为当前变化列的数组内容
  269. index,
  270. // 微信小程序无法将picker实例传出来,只能通过ref操作
  271. picker = this.$refs.uPicker
  272. } = e
  273. let day = e.value[0];
  274. // 当第一列值发生变化时,变化第二列(后一列)对应的选项
  275. this.picker = picker;
  276. if (columnIndex === 0) {
  277. // picker为选择器this实例,变化第二列对应的选项
  278. if(day == i18("今日")){
  279. picker.setColumnValues(1, this.columnData[1])
  280. }else{
  281. picker.setColumnValues(1, this.columnData[0])
  282. }
  283. }
  284. },
  285. checkPassword(){
  286. },
  287. recon(){
  288. let self = this;
  289. ecUI.showLoading('设备连接中')
  290. let blueid = uni.getStorageSync('blueid');
  291. ecBLE.onBLEConnectionStateChange(res => {
  292. ecUI.hideLoading()
  293. if (res.ok) {
  294. self.buletooth();
  295. } else {
  296. uni.removeStorageSync('blueid');
  297. ecUI.showModal(
  298. '提示',
  299. '连接失败,errCode=' + res.errCode + ',errMsg=' + res.errMsg
  300. )
  301. }
  302. })
  303. ecBLE.createBLEConnection(blueid);
  304. },
  305. buletooth(){
  306. let self = this;
  307. ctx = this
  308. isCheckScroll = true
  309. isCheckRevHex = false
  310. isCheckSendHex = false
  311. sendData = ''
  312. //on disconnect
  313. ecBLE.onBLEConnectionStateChange(() => {
  314. uni.showModal({
  315. title: '提示',
  316. content: '蓝牙断开连接',
  317. confirmText:"点击重连",
  318. showCancel:false,
  319. success: function (res) {
  320. if (res.confirm) {
  321. self.recon()
  322. } else if (res.cancel) {
  323. console.log('用户点击取消');
  324. }
  325. }
  326. });
  327. })
  328. //receive data
  329. ecBLE.onBLECharacteristicValueChange((str, strHex) => {
  330. isCheckRevHex = true;
  331. let data =
  332. (isCheckRevHex ? strHex.replace(/[0-9a-fA-F]{2}/g, ' $&') : str)
  333. // console.log(data)
  334. self.$modal.closeLoading();
  335. console.log("收到消息:"+data);
  336. //AA 67 0D 05 00 00 00 00 00 00 00 00 00 25 E2 00 80
  337. data = parseDataObj(data);
  338. self.messageCallback(data);
  339. })
  340. self.getInfo();
  341. },
  342. messageCallback(data){
  343. let self = this;
  344. console.log(data);
  345. let type = data.type;
  346. let real_data = data.real_data;
  347. if(type == 103){
  348. self.portDetail = real_data
  349. self.portList = [[]];
  350. self.curPort = [];
  351. let port_first_status = self.portDetail["port_first_status"];
  352. let port_second_status = self.portDetail["port_second_status"]
  353. if(port_first_status){
  354. self.portList[0].push({port:1,text:"端口一"});
  355. self.curPort.push({
  356. text:"端口一",
  357. status:port_first_status,
  358. id:1,
  359. })
  360. }
  361. if(port_second_status){
  362. self.portList[0].push({port:2,text:"端口二"});
  363. self.curPort.push({
  364. text:"端口二",
  365. status:port_second_status,
  366. id:2
  367. })
  368. }
  369. let choosePort = self.choosePort
  370. if(choosePort == 1){
  371. self.portDetail.portStatus = port_first_status;
  372. }else if(choosePort == 2){
  373. self.portDetail.portStatus = port_second_status;
  374. }
  375. self.$modal.closeLoading();
  376. }
  377. if(type == 116){
  378. self.$modal.closeLoading();
  379. self.getInfo();
  380. }
  381. if(type == 113){
  382. self.$modal.closeLoading();
  383. self.getInfo();
  384. }
  385. if(type == 96){
  386. }
  387. self.$forceUpdate();
  388. console.log('收到服务器内容:' + JSON.stringify(data));
  389. if(!this.firstInit){
  390. this.firstInit = true;
  391. if(self.portDetail.portStatus == 5){
  392. self.startCharge();
  393. }
  394. }
  395. },
  396. planCharge(){
  397. if(this.portDetail.portStatus == 6){
  398. this.$modal.confirm("确认取消预约?").then(res=>{
  399. this.cancelPlan();
  400. })
  401. }else{
  402. this.toPlan()
  403. }
  404. },
  405. sendBlueData(){
  406. ecBLE.writeBLECharacteristicValue(tempSendData, false)
  407. },
  408. cancelPlan(){
  409. cancelPlan(this.choosePort).then(res=>{
  410. this.$modal.msg("取消成功");
  411. this.getInfo(true);
  412. })
  413. },
  414. getPlanInfo(){
  415. getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
  416. let data = res.data;
  417. if(data != null){
  418. let planType = data.planType;
  419. if(planType == 1){//单次预约
  420. let planInfo = {};
  421. planInfo.runTime = data.runTime;
  422. this.planInfo = planInfo;
  423. this.planInfo.id = data.id;
  424. }else{
  425. let planInfo = {};
  426. planInfo.runTime = data.runTime;
  427. let repeatDays = data.repeatDays;
  428. let days = repeatDays.split(",")
  429. let strs = "";
  430. for (let i = 0; i < days.length; i++) {
  431. if(strs.length>0){
  432. strs+=",";
  433. }
  434. strs +=this.days[days[i]];
  435. }
  436. this.planInfo = planInfo;
  437. this.planInfo.runTime = strs+" "+data.repeatTime;
  438. this.planInfo.id = data.id;
  439. }
  440. }
  441. })
  442. },
  443. confirmPort(e){
  444. let value = e.value[0]
  445. this.choosePort = value.port;
  446. this.showPort = false;
  447. this.getInfo()
  448. },
  449. initSocket(key){
  450. let self = this;
  451. },
  452. toSet(){
  453. // this.closeSocket();
  454. uni.navigateTo({
  455. url: '/pages/weitiandi/bluetooth/setting'
  456. });
  457. },
  458. toPlan(){
  459. let arr = [];
  460. let date = new Date();
  461. let min = date.getMinutes();
  462. let hour = date.getHours();
  463. let arr1 = [i18("今日"), i18("明日")];
  464. let arr2 = []
  465. let arr3 = [];
  466. let arr4 = [];
  467. for (let i = 0; i < hour; i++) {
  468. arr2.push(i+"时")
  469. }
  470. this.columnData[0] = arr2;
  471. for (let i = hour+1; i < 24; i++) {
  472. arr3.push(i+"时")
  473. }
  474. this.columnData[1] = arr3;
  475. for (let i = 0; i <= 59; i++) {
  476. arr4.push(i+"分")
  477. }
  478. this.planCols = [arr1, arr3, arr4]
  479. this.showPlan = true;
  480. },
  481. trigger(){
  482. let portStatus = this.portDetail.portStatus;
  483. if(portStatus == 2){//需要停止充电
  484. this.$modal.confirm("需要停止充电么?").then(res=>{
  485. this.stopCharge();
  486. })
  487. }else{
  488. if(portStatus == 1){
  489. this.$modal.msg("请先将充电枪插入后再点击充电");
  490. }
  491. if(portStatus == 5){
  492. this.$modal.confirm("确认开始充电么?").then(res=>{
  493. this.startCharge();
  494. })
  495. }else {
  496. this.$modal.msg("端口无法开始充电");
  497. }
  498. }
  499. },
  500. getInfo(flag) {
  501. // let str = "AA 67 0D 01 00 00 00 00 00 00 00 00 00 25 E2 00 80";
  502. // let data = parseDataObj(str);
  503. // this.messageCallback(data);
  504. //
  505. //
  506. this.$modal.loading("正在获取状态,请稍等...");
  507. if(flag){
  508. setTimeout(function (){
  509. sendPortDetailCmd().then(res => {
  510. })
  511. },500)
  512. }else{
  513. sendPortDetailCmd().then(res => {
  514. })
  515. }
  516. },
  517. stopCharge(){
  518. let self = this;
  519. this.deviceInfo.port = this.choosePort;
  520. stopCharge(this.deviceInfo).then(()=>{
  521. self.$modal.loading("停止成功");
  522. setTimeout((()=>{
  523. self.getInfo();
  524. }),1000);
  525. })
  526. },
  527. startCharge(){
  528. let self = this;
  529. this.deviceInfo.port = this.choosePort;
  530. startCharge(this.deviceInfo).then(res=>{
  531. self.$modal.loading("启动成功");
  532. setTimeout((()=>{
  533. self.getInfo();
  534. }),1000);
  535. })
  536. },
  537. getPortInfo(){
  538. this.startPortDetailTimer();
  539. },
  540. startPortDetailTimer(){
  541. let self = this;
  542. this.timer = setTimeout(function (){
  543. getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
  544. let data = res.data;
  545. if(data != null){
  546. self.portDetail = data;
  547. self.checkStatusCheck();
  548. self.$modal.closeLoading();
  549. }else{
  550. self.startPortDetailTimer();
  551. }
  552. });
  553. },1000);
  554. },
  555. checkStatusCheck(){
  556. this.statusChangeTimer();
  557. },
  558. checkOnPage(){
  559. var pages = getCurrentPages() // 获取栈实例
  560. let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
  561. if("pages/weitiandi/device/index" != currentRoute){
  562. return false;
  563. }
  564. return true;
  565. },
  566. goBack(){
  567. this.closeSocket();
  568. uni.navigateBack({
  569. });
  570. },
  571. closeSocket(){
  572. ecBLE.onBLEConnectionStateChange(() => {})
  573. ecBLE.onBLECharacteristicValueChange(() => {})
  574. },
  575. statusChangeTimer(){
  576. let self = this;
  577. this.statusTimer = setTimeout(function(){
  578. if(!this.checkOnPage()){
  579. return;
  580. }
  581. checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
  582. let data = res.data;
  583. if(data != null){
  584. self.getInfo();
  585. }else{
  586. self.statusChangeTimer();
  587. }
  588. });
  589. },3000);
  590. }
  591. }
  592. }
  593. </script>
  594. <style>
  595. .container {
  596. background: rgb(249, 252, 255);
  597. inset: 0;
  598. position: absolute;
  599. }
  600. .header {
  601. position: relative;
  602. margin-top:4vw;
  603. }
  604. .header-status-desc {
  605. position: absolute;
  606. text-align: center;
  607. width: 100%;
  608. bottom:1vh;
  609. font-size: 5vw;
  610. font-weight: bold;
  611. color: #0E9F9B;
  612. margin-bottom: 5vw;
  613. }
  614. .header-status {
  615. font-weight: bold;
  616. text-align: center;
  617. }
  618. .chong-active {
  619. color: #0E9F9B
  620. }
  621. .header-img {
  622. width: 100%;
  623. padding: 5% 10%;
  624. text-align: center;
  625. }
  626. .header-img image {
  627. width: 100%;
  628. height: 23vh;
  629. }
  630. .info-body{
  631. background: #0E9F9B;
  632. height: 20vh;
  633. margin: 0 2%;
  634. border-radius: 1vw;
  635. margin-top:2vh;
  636. color: #F8FCFF;
  637. line-height: 3vh;
  638. }
  639. .info-content{
  640. display: inline-block;
  641. width: 23%;
  642. text-align: center;
  643. margin: 1%;
  644. margin-top:2.5vh;
  645. }
  646. .info-content-value{
  647. font-weight: bold;
  648. }
  649. .info-content-text{
  650. }
  651. .info-summary{
  652. display: flex;
  653. flex-direction: row;
  654. text-align: center;
  655. margin:3vh 0;
  656. }
  657. .summary{
  658. width: 33%;
  659. line-height: 2.5vh;
  660. }
  661. .charge-num{
  662. color: #0E9F9B;
  663. font-weight: bold;
  664. font-size: 4.5vw;
  665. }
  666. .charge-title{
  667. color: #B2B2B2;
  668. font-weight: 400;
  669. }
  670. .btn-image{
  671. width: 90%;
  672. height: 100%;
  673. }
  674. .info-bottom-btn{
  675. display: flex;
  676. flex-direction: row;
  677. text-align: center;
  678. position: relative;
  679. margin-top: 10vh
  680. ;
  681. }
  682. .btn-area{
  683. width: 50%;
  684. height: 50px;
  685. }
  686. .left{
  687. position: relative;
  688. left: 10px;
  689. text-align: right;
  690. }
  691. .right{
  692. text-align: left;
  693. position: relative;
  694. right: 10px;
  695. }
  696. .info-plan{
  697. text-align: center;
  698. color: #0E9F9B;
  699. margin-top:1vh;
  700. font-weight: 400;
  701. }
  702. .setting{
  703. position: fixed;
  704. right: -1px;
  705. top: 10vh;
  706. z-index: 999;
  707. background: rgb(227,243,245);
  708. color: #0E9F9B;
  709. font-size: 10px;
  710. border-radius: 5px;
  711. padding: 3px;
  712. }
  713. .port{
  714. height: 70px;
  715. background: #F8FCFF;
  716. border: 0px solid #F8FCFF;
  717. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  718. border-radius: 4px;
  719. margin:0 10px;
  720. position: relative;
  721. margin-top:10px;
  722. }
  723. .plan{
  724. height: 70px;
  725. background: #F8FCFF;
  726. border: 0px solid #F8FCFF;
  727. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  728. border-radius: 4px;
  729. margin:0 10px;
  730. position: relative;
  731. margin-top:15px;
  732. }
  733. .port-image{
  734. height: 40px;
  735. width: 40px;
  736. position: absolute;
  737. top:15px;
  738. left:20px;
  739. }
  740. .port-text{
  741. position: absolute;
  742. top:13px;
  743. left:75px;
  744. font-weight: bold;
  745. }
  746. .port-num{
  747. position: absolute;
  748. top:38px;
  749. left:75px;
  750. color: #B2B2B2;
  751. }
  752. .port-icon{
  753. position: absolute;
  754. top:30px;
  755. right:5px;
  756. width: 10px;
  757. height: 16px;
  758. }
  759. .port-icon image{
  760. width: 90%;
  761. }
  762. .body-bottom{
  763. padding:0 22px;
  764. }
  765. .body-bottom .info-content{
  766. width: 30%;
  767. }
  768. .bottom-control{
  769. height: 22vh;
  770. margin: 0 2%;
  771. margin-top:2vh;
  772. line-height: 3vh;
  773. background: #F8FCFF;
  774. border: 0px solid #F8FCFF;
  775. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  776. border-radius: 4px;
  777. padding:3%;
  778. }
  779. .control-btn{
  780. display: inline-block;;
  781. height: 60px;
  782. width: 25%;
  783. padding:10px 20px;
  784. text-align: center;
  785. font-size: 12px;
  786. color: black;
  787. }
  788. .control-btn .btn-image{
  789. }
  790. .dportitem{
  791. color: #60af7b
  792. }
  793. .dboxs{
  794. background: #F8FCFF;
  795. border: 0px solid #F8FCFF;
  796. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  797. border-radius: 4px;
  798. padding: 20px;
  799. font-size: 0.24rem;
  800. color: #1A87FF;
  801. margin:20px;
  802. position: relative;
  803. }
  804. .portimg{
  805. width: 20px;
  806. height: 20px;
  807. }
  808. .dportitem-img{
  809. width: 30px;
  810. height: 30px;
  811. }
  812. .dpropitem-block{
  813. padding: 0.12rem 0.37rem;
  814. background: #e6f6f1;
  815. display: flex;
  816. width: 70px;
  817. height: 70px;
  818. flex-direction: column;
  819. justify-content: center;
  820. align-items: center;
  821. position: relative;
  822. }
  823. .dportitem{
  824. margin:10px;
  825. width: 70px;
  826. position: relative;
  827. display: inline-block;
  828. }
  829. .dportitem-block-2{
  830. background: #f9f4e5;
  831. color: #FFAA00;
  832. }
  833. .dpropitem-title{
  834. text-align: center;
  835. margin-bottom: 5px;
  836. font-size: 16px;
  837. }
  838. .dpropitem-status{
  839. font-size: 14px;
  840. }
  841. .dboxtitle{
  842. font-size: 18px;
  843. position: relative;
  844. }
  845. .dboxtitle-text{
  846. display: inline-block;
  847. position: absolute;
  848. top: -2px;
  849. left: 25px;
  850. }
  851. .btn-image{
  852. width: 30px;
  853. height: 30px;
  854. }
  855. .control-btn{
  856. font-size: 14px;
  857. }
  858. </style>