index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  1. <template>
  2. <view class="container">
  3. <view style="color: #f4f4f4;margin: 3vh;">
  4. <!-- <view style="display: flex;">
  5. <text>{{ i18('设备端口') }}:</text>
  6. <view class="dportitem " v-for="item in curPort" @click="selectPort(item.id);" style="display: contents;">
  7. <p class="dpropitem-title "> {{ item.text }}</p>
  8. <view style="position: absolute;right: 0px;z-index: 9999" v-if="item.id == choosePort">
  9. </view>
  10. <view class="dpropitem-block dportitem-block-2" v-if="item.status == 2">
  11. <view class="dpropitem-status">{{ i18('充电中') }}</view>
  12. </view>
  13. <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1 || item.status == 7">
  14. <view class="dpropitem-status">{{ i18('空闲中') }}</view>
  15. </view>
  16. <view class="dpropitem-block dportitem-block-3" style="background: rgb(247,238,240);color:#FF6868"
  17. v-if="item.status == 3">
  18. <view class="dpropitem-status">{{ i18('禁用中') }}</view>
  19. </view>
  20. <view class="dpropitem-block dportitem-block-3" style="background: rgb(248,244,230);color:#FFAA00"
  21. v-if="item.status == 4">
  22. <view class="dpropitem-status">{{ i18('故障中') }}</view>
  23. </view>
  24. <view class="dpropitem-block dportitem-block-3" style=";" v-if="item.status == 5">
  25. <view class="dpropitem-status">{{ i18('已连接') }}</view>
  26. </view>
  27. <view class="dpropitem-block dportitem-block-3" style="background: rgb(239,235,254);color:#A552FF"
  28. v-if="item.status == 6">
  29. <view class="dpropitem-status">{{ i18('已预约') }}</view>
  30. </view>
  31. </view>
  32. </view> -->
  33. </view>
  34. <view>
  35. </view>
  36. <view class="dboxs dport">
  37. <view class="dboxtitle">
  38. <image class="" style="width: 18px;height: 30px;" src="../../../static/images/new/starts/mine/symbol1.png" />
  39. <view class="dboxtitle-text"> {{ i18('设备端口') }}</view>
  40. </view>
  41. <view class="dportitems">
  42. <view class="dportitem " v-for="item in curPort" @click="selectPort(item.id);">
  43. <p class="dpropitem-title "> {{ item.text }}</p>
  44. <view style="position: absolute;right: 20px;z-index: 9999" v-if="item.id == choosePort">
  45. <image class="dportitem-img" style="width: 15px;height: 15px"
  46. src="/static/images/new/start/choose.png" />
  47. </view>
  48. <view class="dpropitem-block dportitem-block-2" v-if="item.status == 2">
  49. <image class="dportitem-img" src="/static/images/new/starts/charnging.png" />
  50. <view class="dpropitem-status">{{ i18('充电中') }}</view>
  51. </view>
  52. <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1 || item.status == 7">
  53. <image class="dportitem-img" src="/static/images/new/starts/free.png" />
  54. <view class="dpropitem-status">{{ i18('空闲中') }}</view>
  55. </view>
  56. <view class="dpropitem-block dportitem-block-3" style="background: rgb(247,238,240);color:#FF6868"
  57. v-if="item.status == 3">
  58. <image class="dportitem-img" src="/static/images/new/starts/ban.png" />
  59. <view class="dpropitem-status">{{ i18('禁用中') }}</view>
  60. </view>
  61. <view class="dpropitem-block dportitem-block-3" style="background: rgb(248,244,230);color:#FFAA00"
  62. v-if="item.status == 4">
  63. <image class="dportitem-img" src="/static/images/new/starts/bad.png" />
  64. <view class="dpropitem-status">{{ i18('故障中') }}</view>
  65. </view>
  66. <view class="dpropitem-block dportitem-block-3" style=";" v-if="item.status == 5">
  67. <image class="dportitem-img" src="/static/images/new/port.png" />
  68. <view class="dpropitem-status">{{ i18('已连接') }}</view>
  69. </view>
  70. <view class="dpropitem-block dportitem-block-3" style="background: rgb(239,235,254);color:#A552FF"
  71. v-if="item.status == 6">
  72. <image class="dportitem-img" src="/static/images/new/start/yuyue.png" />
  73. <view class="dpropitem-status">{{ i18('已预约') }}</view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="dboxs dport" style="height: 100px" @click="planCharge">
  79. <view class="dboxtitle">
  80. <image class="portimg" src="../../../static/images/new/starts/mine/yuyue.png" />
  81. <view class="dboxtitle-text">{{ i18('预约充电') }}</view>
  82. </view>
  83. <view class="port-text" v-if="planInfo != null" style="left:60px;top:55px;font-size: 14px">
  84. {{ i18('已预约') }} {{planInfo.runTime}}
  85. </view>
  86. <view class="port-text" style="left:60px;top:55px;font-size: 14px" v-else>
  87. {{ i18('点击预约充电') }}
  88. </view>
  89. <view class="port-num" style="left:60px;top:55px;font-size: 12px" v-if="planInfo != null">
  90. {{ i18('可点击取消预约') }}
  91. </view>
  92. <!-- <view class="port-icon" v-if="planInfo == null" style="width: 50px;height: 50px;right:10px;top:28%">
  93. <image class="btn-image" src="../../../static/images/new/starts/index/yuyue.png">
  94. </image>
  95. </view>
  96. <view class="port-icon" v-if="planInfo != null" style="width: 50px;height: 50px;right:10px;top:28%">
  97. <image class="btn-image" src="/static/images/new/start/del.png">
  98. </image>
  99. </view> -->
  100. </view>
  101. <view class="dboxs dport" style="height: 25vh">
  102. <view class="dboxtitle">
  103. <image class="portimg" src="../../../static/images/new/starts/mine/list.png" />
  104. <view class="dboxtitle-text"> {{ i18('设备操作') }}</view>
  105. </view>
  106. <view style="margin-left: 7vw;display: flex;width: 70vw;">
  107. <view class="control-btn" @click="trigger()">
  108. <view v-if="portDetail.portStatus == 2">
  109. <image class="btn-image" src="../../../static/images/new/start/stop.png">
  110. </image>
  111. <view>{{ i18('停止充电') }}</view>
  112. </view>
  113. <view v-else>
  114. <image class="btn-image" src="../../../static/images/new/starts/index/using.png"> </image>
  115. <view>{{ i18('立即充电') }}</view>
  116. </view>
  117. </view>
  118. <!-- <view class="control-btn" @click="trigger()" v-else-if="portDetail.portStatus != 2">
  119. <view>
  120. <image class="btn-image" src="../../../static/images/new/starts/index/using.png"
  121. </image>
  122. <view>{{ i18('立即充电') }}{{portDetail.portStatus}}</view>
  123. </view>
  124. </view> -->
  125. <view class="control-btn" @click="getInfo">
  126. <image class="btn-image" src="../../../static/images/new/starts/index/icon_pull.png">
  127. </image>
  128. <view>{{ i18('获取状态') }}</view>
  129. </view>
  130. <view class="control-btn" @click="toSet">
  131. <image class="btn-image" src="../../../static/images/new/starts/index/list.png">
  132. </image>
  133. <view>{{ i18('设备控制') }}</view>
  134. </view>
  135. <!-- <view class="control-btn" @click="goBack">
  136. <image class="btn-image" src="../../../static/images/new/starts/index/return.png">
  137. </image>
  138. <view>{{ i18('查看状态') }}</view>
  139. </view> -->
  140. <view class="control-btn" @click="restart">
  141. <image class="btn-image" src="../../../static/images/new/starts/index/return.png">
  142. </image>
  143. <view>{{ i18('重置设备') }}</view>
  144. </view>
  145. </view>
  146. </view>
  147. <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList"
  148. keyName="text"></u-picker>
  149. <view style="width: 100%;text-align: center;">
  150. <image style="height: 3vh;width: 35vw;position: absolute;bottom: 10vh;left: 32.5vw;"
  151. src="../../../static/images/new/starts/login/backImg2.png"></image>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. import {
  157. getDeviceInfo,
  158. getPortDetail,
  159. startCharge,
  160. stopCharge,
  161. sendPortDetailCmd,
  162. checkStatusChange,
  163. getPlanInfo,
  164. cancelPlan
  165. } from "@/api/device/device";
  166. import {
  167. restart
  168. } from '@/api/device/current.js'
  169. import websocket from '@/utils/websocket'
  170. import i18 from '@/utils/i18.js'
  171. export default {
  172. data() {
  173. return {
  174. deviceInfo: {},
  175. visitTime: "",
  176. timer: null,
  177. showPort: false,
  178. portDetail: {
  179. portStatus: 0,
  180. POWER: 0,
  181. voltage: 0
  182. },
  183. statusTimer: "",
  184. connected: false,
  185. scriptTask: null,
  186. choosePort: 1,
  187. portList: [
  188. [{
  189. port: 1,
  190. text: "端口一"
  191. }]
  192. ],
  193. planInfo: null,
  194. days: ["", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  195. curPort: []
  196. }
  197. },
  198. computed: {
  199. imgUrl() {
  200. return getApp().globalData.config.imgUrl;
  201. }
  202. },
  203. onLoad(opt) {
  204. this.deviceInfo.deviceId = opt.id;
  205. this.deviceInfo.ccid = opt.ccid;
  206. this.deviceInfo.qrcode = opt.qrcode;
  207. },
  208. onShow() {
  209. this.getInfo();
  210. this.getPlanInfo();
  211. },
  212. onUnload() {
  213. this.closeSocket();
  214. },
  215. methods: {
  216. i18(text) {
  217. return i18(text)
  218. },
  219. restart() {
  220. let deviceId = this.deviceInfo.deviceId;
  221. this.$modal.loading("正在重置中,请稍等...");
  222. // 重启充电桩
  223. let self = this;
  224. restart({
  225. deviceId: deviceId,
  226. ccid: this.deviceInfo.ccid
  227. }).then(res => {
  228. this.$modal.loading("正在重置中,请稍等...");
  229. setTimeout(function() {
  230. self.getInfo()
  231. }, 5000)
  232. })
  233. },
  234. goBack() {
  235. uni.navigateBack({});
  236. },
  237. planCharge() {
  238. if (this.planInfo != null) {
  239. this.$modal.confirm("确认取消预约?").then(res => {
  240. this.cancelPlan();
  241. })
  242. } else {
  243. this.toPlan()
  244. }
  245. },
  246. cancelPlan() {
  247. cancelPlan(this.planInfo.id).then(res => {
  248. this.$modal.msg("取消成功");
  249. this.planInfo = null;
  250. this.getPlanInfo();
  251. })
  252. },
  253. getPlanInfo() {
  254. getPlanInfo(this.deviceInfo.deviceId, this.choosePort).then(res => {
  255. let data = res.data;
  256. if (data != null) {
  257. let planType = data.planType;
  258. if (planType == 1) { //单次预约
  259. let planInfo = {};
  260. planInfo.runTime = data.runTime;
  261. this.planInfo = planInfo;
  262. this.planInfo.id = data.id;
  263. } else {
  264. let planInfo = {};
  265. planInfo.runTime = data.runTime;
  266. let repeatDays = data.repeatDays;
  267. let days = repeatDays.split(",")
  268. let strs = "";
  269. for (let i = 0; i < days.length; i++) {
  270. if (strs.length > 0) {
  271. strs += ",";
  272. }
  273. strs += i18(this.days[days[i]]);
  274. }
  275. this.planInfo = planInfo;
  276. this.planInfo.runTime = strs + " " + data.repeatTime;
  277. this.planInfo.id = data.id;
  278. }
  279. }
  280. })
  281. },
  282. confirmPort(e) {
  283. let value = e.value[0]
  284. this.choosePort = value.port;
  285. this.showPort = false;
  286. this.getInfo()
  287. },
  288. parsePortCmd(real_data) {
  289. let self = this;
  290. self.portDetail = real_data
  291. self.curPort = [];
  292. let port_first_status = self.portDetail["port_first_status"];
  293. let port_second_status = self.portDetail["port_second_status"]
  294. if (port_first_status) {
  295. self.portList[0].push({
  296. port: 1,
  297. text: i18("端口一")
  298. });
  299. self.curPort.push({
  300. text: i18("端口一"),
  301. status: port_first_status,
  302. id: 1,
  303. })
  304. }
  305. if (port_second_status) {
  306. self.portList[0].push({
  307. port: 2,
  308. text: i18("端口二")
  309. });
  310. self.curPort.push({
  311. text: i18("端口二"),
  312. status: port_second_status,
  313. id: 2
  314. })
  315. }
  316. let choosePort = self.choosePort
  317. if (choosePort == 1) {
  318. self.portDetail.portStatus = port_first_status;
  319. } else if (choosePort == 2) {
  320. self.portDetail.portStatus = port_second_status;
  321. }
  322. self.$modal.closeLoading();
  323. },
  324. initSocket(key) {
  325. let self = this;
  326. let socketUrl = getApp().globalData.config.socketUrl
  327. this.scriptTask = websocket({
  328. url: "/" + key + "/",
  329. });
  330. let scriptTask = this.scriptTask;
  331. scriptTask.onOpen(function(res) {
  332. console.log('WebSocket连接已打开!');
  333. self.connected = true;
  334. });
  335. scriptTask.onError(function(res) {
  336. self.connected = false;
  337. console.log(res);
  338. });
  339. scriptTask.onMessage(function(res) {
  340. let data = JSON.parse(res.data);
  341. let type = data.type;
  342. let real_data = data.real_data;
  343. if (type == 103) {
  344. self.parsePortCmd(real_data);
  345. }
  346. if (type == 116) {
  347. self.$modal.closeLoading();
  348. self.getInfo();
  349. }
  350. if (type == 113) {
  351. self.$modal.closeLoading();
  352. self.getInfo();
  353. }
  354. if (type == 96) {
  355. self.mainBoardInfo = real_data;
  356. self.formatMainboardData();
  357. self.$modal.closeLoading();
  358. }
  359. self.$forceUpdate();
  360. console.log('收到服务器内容:' + JSON.stringify(data));
  361. });
  362. scriptTask.onClose(function(res) {
  363. console.log('WebSocket 已关闭!');
  364. });
  365. },
  366. toSet() {
  367. this.closeSocket();
  368. uni.navigateTo({
  369. url: '/pages/weitiandi/device/setting?id=' + this.deviceInfo.deviceId + "&ccid=" + this
  370. .deviceInfo.ccid
  371. });
  372. },
  373. toPlan() {
  374. uni.navigateTo({
  375. url: '/pages/weitiandi/device/plan?port=' + this.choosePort + '&id=' + this.deviceInfo
  376. .deviceId + "&ccid=" + this.deviceInfo.ccid
  377. });
  378. },
  379. trigger() {
  380. let portStatus = this.portDetail.portStatus;
  381. if (portStatus == 2) { //需要停止充电
  382. this.$modal.confirm("需要停止充电么?").then(res => {
  383. this.stopCharge();
  384. })
  385. } else {
  386. if (portStatus == 1) {
  387. this.$modal.msg("请先将充电枪插入后再点击充电");
  388. }
  389. if (portStatus == 5) {
  390. this.$modal.confirm("确认开始充电么?").then(res => {
  391. this.startCharge();
  392. })
  393. }
  394. }
  395. },
  396. getInfo() {
  397. let self = this;
  398. this.$modal.loading("正在获取状态,请稍等...");
  399. sendPortDetailCmd(this.deviceInfo).then(res => {
  400. this.$modal.loading("正在获取状态,请稍等...");
  401. this.visitTime = res.msg;
  402. if (!this.visitTime) {
  403. this.$modal.msg("请重新进入页面");
  404. return;
  405. }
  406. if (!this.scriptTask) {
  407. this.initSocket(this.deviceInfo.deviceId);
  408. }
  409. setTimeout(function() {
  410. getPortDetail(self.deviceInfo, self.visitTime).then(res => {
  411. let data = res.data;
  412. if (data != null) {
  413. self.parsePortCmd(data);
  414. } else {}
  415. });
  416. }, 500)
  417. })
  418. },
  419. stopCharge() {
  420. let self = this;
  421. this.deviceInfo.port = this.choosePort;
  422. stopCharge(this.deviceInfo).then(() => {
  423. self.$modal.loading("停止成功");
  424. setTimeout((() => {
  425. self.getInfo();
  426. }), 1000);
  427. })
  428. },
  429. startCharge() {
  430. let self = this;
  431. this.deviceInfo.port = this.choosePort;
  432. startCharge(this.deviceInfo).then(res => {
  433. self.$modal.loading("启动成功");
  434. setTimeout((() => {
  435. self.getInfo();
  436. }), 1000);
  437. })
  438. },
  439. getPortInfo() {
  440. this.startPortDetailTimer();
  441. },
  442. startPortDetailTimer() {
  443. let self = this;
  444. this.timer = setTimeout(function() {
  445. getPortDetail(self.deviceInfo, self.visitTime).then(res => {
  446. let data = res.data;
  447. if (data != null) {
  448. self.portDetail = data;
  449. self.checkStatusCheck();
  450. self.$modal.closeLoading();
  451. } else {
  452. self.startPortDetailTimer();
  453. }
  454. });
  455. }, 1000);
  456. },
  457. checkStatusCheck() {
  458. this.statusChangeTimer();
  459. },
  460. checkOnPage() {
  461. var pages = getCurrentPages() // 获取栈实例
  462. let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
  463. if ("pages/weitiandi/device/index" != currentRoute) {
  464. return false;
  465. }
  466. return true;
  467. },
  468. closeSocket() {
  469. this.scriptTask.close();
  470. this.scriptTask = null;
  471. },
  472. statusChangeTimer() {
  473. let self = this;
  474. this.statusTimer = setTimeout(function() {
  475. if (!this.checkOnPage()) {
  476. return;
  477. }
  478. checkStatusChange(self.deviceInfo, self.visitTime).then(res => {
  479. let data = res.data;
  480. if (data != null) {
  481. self.getInfo();
  482. } else {
  483. self.statusChangeTimer();
  484. }
  485. });
  486. }, 3000);
  487. }
  488. }
  489. }
  490. </script>
  491. <style>
  492. .container {
  493. /* background: rgb(213, 213, 213); */
  494. background-image: url('../../../static/images/new/starts/bg2.jpg');
  495. inset: 0;
  496. position: absolute;
  497. background-size: cover;
  498. background-repeat: no-repeat;
  499. height: 100%;
  500. width: 100%;
  501. }
  502. .header {
  503. position: relative;
  504. margin-top: 4vw;
  505. }
  506. .header-status-desc {
  507. position: absolute;
  508. text-align: center;
  509. width: 100%;
  510. bottom: 1vh;
  511. font-size: 5vw;
  512. font-weight: bold;
  513. color: #0E9F9B;
  514. margin-bottom: 5vw;
  515. }
  516. .header-status {
  517. font-weight: bold;
  518. text-align: center;
  519. }
  520. .chong-active {
  521. color: #0E9F9B
  522. }
  523. .header-img {
  524. width: 100%;
  525. padding: 5% 10%;
  526. text-align: center;
  527. }
  528. .header-img image {
  529. width: 100%;
  530. height: 23vh;
  531. }
  532. .info-body {
  533. background: #0E9F9B;
  534. height: 20vh;
  535. margin: 0 2%;
  536. border-radius: 1vw;
  537. margin-top: 2vh;
  538. color: #F8FCFF;
  539. line-height: 3vh;
  540. }
  541. .info-content {
  542. display: inline-block;
  543. width: 23%;
  544. text-align: center;
  545. margin: 1%;
  546. margin-top: 2.5vh;
  547. }
  548. .info-content-value {
  549. font-weight: bold;
  550. }
  551. .info-content-text {}
  552. .info-summary {
  553. display: flex;
  554. flex-direction: row;
  555. text-align: center;
  556. margin: 3vh 0;
  557. }
  558. .summary {
  559. width: 33%;
  560. line-height: 2.5vh;
  561. }
  562. .charge-num {
  563. color: #0E9F9B;
  564. font-weight: bold;
  565. font-size: 4.5vw;
  566. }
  567. .charge-title {
  568. color: #B2B2B2;
  569. font-weight: 400;
  570. }
  571. .btn-image {
  572. width: 42px;
  573. height: 42px;
  574. }
  575. .info-bottom-btn {
  576. display: flex;
  577. flex-direction: row;
  578. text-align: center;
  579. position: relative;
  580. margin-top: 10vh;
  581. }
  582. .btn-area {
  583. width: 50%;
  584. height: 50px;
  585. }
  586. .left {
  587. position: relative;
  588. left: 10px;
  589. text-align: right;
  590. }
  591. .right {
  592. text-align: left;
  593. position: relative;
  594. right: 10px;
  595. }
  596. .info-plan {
  597. text-align: center;
  598. color: #0E9F9B;
  599. margin-top: 1vh;
  600. font-weight: 400;
  601. }
  602. .setting {
  603. position: fixed;
  604. right: -1px;
  605. top: 10vh;
  606. z-index: 999;
  607. background: rgb(227, 243, 245);
  608. color: #0E9F9B;
  609. font-size: 10px;
  610. border-radius: 5px;
  611. padding: 3px;
  612. }
  613. .port {
  614. height: 70px;
  615. background: #F8FCFF;
  616. border: 0px solid #F8FCFF;
  617. box-shadow: 0px 0px 10px 1px rgba(52, 52, 52, 0.3);
  618. border-radius: 4px;
  619. margin: 0 10px;
  620. position: relative;
  621. margin-top: 10px;
  622. }
  623. .plan {
  624. height: 70px;
  625. background: #F8FCFF;
  626. border: 0px solid #F8FCFF;
  627. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  628. border-radius: 4px;
  629. margin: 0 10px;
  630. position: relative;
  631. margin-top: 15px;
  632. }
  633. .dpropitem-block {
  634. padding: 0.12rem 0.37rem;
  635. /* background: #e6f6f1; */
  636. display: flex;
  637. width: 70px;
  638. height: 70px;
  639. flex-direction: column;
  640. justify-content: center;
  641. align-items: center;
  642. position: relative;
  643. }
  644. .port-image {
  645. height: 40px;
  646. width: 40px;
  647. position: absolute;
  648. top: 15px;
  649. left: 20px;
  650. }
  651. .port-text {
  652. position: absolute;
  653. top:13px;
  654. left:75px;
  655. font-weight: bold;
  656. }
  657. .port-num {
  658. position: absolute;
  659. top: 38px;
  660. left: 75px;
  661. color: #B2B2B2;
  662. }
  663. .port-icon {
  664. position: absolute;
  665. top: 30px;
  666. right: 5px;
  667. width: 10px;
  668. height: 16px;
  669. }
  670. .port-icon image {
  671. width: 90%;
  672. }
  673. .body-bottom {
  674. padding: 0 22px;
  675. }
  676. .body-bottom .info-content {
  677. width: 30%;
  678. }
  679. .bottom-control {
  680. height: 22vh;
  681. margin: 0 2%;
  682. margin-top: 2vh;
  683. line-height: 3vh;
  684. background: #F8FCFF;
  685. border: 0px solid #F8FCFF;
  686. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  687. border-radius: 4px;
  688. padding: 3%;
  689. }
  690. .control-btn {
  691. /* display: inline-block;
  692. ;
  693. height: 60px;
  694. width: 25%; */
  695. padding: 10px 12px;
  696. text-align: center;
  697. font-size: 12px;
  698. color: black;
  699. }
  700. .control-btn .btn-image {}
  701. .dportitem {
  702. color: #60af7b
  703. }
  704. .dboxs {
  705. background: linear-gradient(#1e1e1e, #050609);
  706. border: 0px solid #F8FCFF;
  707. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  708. border-radius: 4px;
  709. padding: 20px;
  710. font-size: 0.24rem;
  711. color: #57B03D;
  712. margin: 5px;
  713. position: relative;
  714. }
  715. .portimg {
  716. width: 20px;
  717. height: 22px;
  718. }
  719. .dportitem-img {
  720. width: 50px;
  721. height: 50px;
  722. }
  723. .dpropitem-block {
  724. /* padding: 0.12rem 0.37rem;
  725. background: #e6f6f1; */
  726. margin-left: 7px;
  727. }
  728. .dportitem {
  729. margin: 10px 10px 0 32px;
  730. width: 81px;
  731. position: relative;
  732. display: inline-block;
  733. }
  734. .dportitem-block-2 {
  735. /* background: #f9f4e5; */
  736. color: #FFAA00;
  737. }
  738. .dpropitem-title {
  739. text-align: center;
  740. margin-bottom: 5px;
  741. font-size: 16px;
  742. /* margin-left: 16px; */
  743. }
  744. .dpropitem-status {
  745. font-size: 14px;
  746. }
  747. .dboxtitle {
  748. font-size: 18px;
  749. position: relative;
  750. }
  751. .dboxtitle-text {
  752. display: inline-block;
  753. position: absolute;
  754. top: 0px;
  755. left: 40px;
  756. color: #e7e7e7;
  757. }
  758. .control-btn {
  759. font-size: 14px;
  760. color: #d8d8d8;
  761. }
  762. </style>