index.vue 23 KB

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