index.vue 24 KB

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