index.vue 23 KB

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