index.vue 23 KB

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