status.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580
  1. <template>
  2. <view class="container">
  3. <view style=" margin: 2vh 0 0 22vw;place-items: center;display: flex;flex-direction: row;justify-content: space-evenly;">
  4. <image style="height: 3vh;width: 35vw;"
  5. src="../../../static/images/new/starts/login/backImg2.png"></image>
  6. <view @click="clickRight()"
  7. style="font-size: 15px;font-weight: bold;z-index: 9999;height: 3vh;"><uni-icons v-show="!show" style="color: #ffffff;" size="30" type="more-filled"></uni-icons><uni-icons size="30" v-show="show" style="color: #57B03D;" type="more-filled"></uni-icons></view>
  8. <!-- <uni-drawer @change="changeDrawer" style="top:20vh;height: 100vh" ref="showRight" mode="right"
  9. :mask-click="true">
  10. </uni-drawer> -->
  11. </view>
  12. <view >
  13. <u-popup :show="show" mode="right" customStyle="top:10vh;bottom:200px;" :overlayOpacity="0" :closeOnClickOverlay="true" :zIndex="100" ref="showRight" :overlay="false" >
  14. <view style="width: 100vw;height: 100vh;">
  15. <scroll-view style="background: linear-gradient(#000000, #161615);font-size: 20px;height: 100vh;" scroll-y="true">
  16. <view class="prop-item" @click="handleLogout()">
  17. <!-- <view class="prop-item-image">
  18. <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
  19. </view> -->
  20. <view class="prop-item-right">{{i18('退出登录')}}</view>
  21. <view class="prop-item-left">
  22. <!-- <uni-icons type="forward" color="lightgray" size="16"></uni-icons> -->
  23. </view>
  24. </view>
  25. <u-divider />
  26. <view class="prop-item" @click="skipPage(3)">
  27. <!-- <view class="prop-item-image">
  28. <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
  29. </view> -->
  30. <view class="prop-item-right">{{i18('关于我们')}}</view>
  31. <view class="prop-item-left">
  32. <!-- <uni-icons type="forward" color="lightgray" size="16"></uni-icons> -->
  33. </view>
  34. </view>
  35. <u-divider />
  36. <view class="prop-item" @click="skipPage(4)">
  37. <!-- <view class="prop-item-image">
  38. <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
  39. </view> -->
  40. <view class="prop-item-right">{{i18('帮助')}}</view>
  41. <view class="prop-item-left">
  42. <!-- <uni-icons type="forward" color="lightgray" size="16"></uni-icons> -->
  43. </view>
  44. </view>
  45. <u-divider />
  46. </scroll-view>
  47. </view>
  48. </u-popup>
  49. </view>
  50. <view style=" position: relative;top: 4vh;margin-top: 4vh;text-align: center;display: flex;flex-direction: row;justify-content: center;">
  51. <view class="progress_box" style="text-align: center">
  52. <!-- <canvas class="progress_bg" canvas-id="cpbg"></canvas> -->
  53. <view >
  54. <image class="progress-barup" src="../../../static/images/new/starts/kedu.png"></image>
  55. <canvas class="progress_bar" canvas-id="cpbar"></canvas>
  56. </view>
  57. <!-- <canvas class="progress_line" canvas-id="cpline"></canvas> -->
  58. <view class="progress_txt">
  59. <view class="progress_info">
  60. <view class="p0" style="color: azure;font-size: 13px;" st="">{{ deviceInfo.qrcode}}</view>
  61. <view class="p1">
  62. <view v-if="portStatus == 2" style="position: relative;">
  63. {{$t('charge.charging')}}
  64. </view>
  65. <view v-else-if="portStatus == 6" style="position: relative;">
  66. {{$t('charge.planed')}}
  67. </view>
  68. <view v-else-if="portStatus == 5" style="position: relative;">
  69. {{$t('charge.connected')}}
  70. </view>
  71. <view v-else>
  72. {{$t('charge.nocharge')}}
  73. </view>
  74. </view>
  75. <view class="p2">
  76. <view class="item-value" v-if="portDetail.voltage == 0">0 {{ i18('度') }}</view>
  77. <view class="item-value" v-else>{{ dianliang }} {{ i18('度') }}</view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <!-- <view class="dtop">
  83. <view class="can" style="background-image: url(/static/images/new/quan.png);">
  84. <view class="box">
  85. <view class="three">
  86. <view class="four"></view>
  87. <view class="five"></view>
  88. <view class="six"></view>
  89. </view>
  90. <view class="dot"></view>
  91. <view class="dot"></view>
  92. <view class="dot"></view>
  93. <view class="dot"></view>
  94. <view class="dot"></view>
  95. </view>
  96. <view class="stip">
  97. <view class="p0" st="">{{ deviceInfo.qrcode}}</view>
  98. <view class="p1">
  99. <view v-if="portStatus == 2">
  100. {{$t('charge.charging')}}
  101. </view>
  102. <view v-else-if="portStatus == 6">
  103. {{$t('charge.planed')}}
  104. </view>
  105. <view v-else-if="portStatus == 5">
  106. {{$t('charge.connected')}}
  107. </view>
  108. <view v-else>
  109. {{$t('charge.nocharge')}}
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>-->
  115. </view>
  116. <view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 6vh;">
  117. <view
  118. style="background-color: #494E51;justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 75vw;;border-radius: 27px;">
  119. <view span="4" style="width: 25vw;">
  120. <view class="item-value">{{ deviceV }}V</view>
  121. <span class="item-text">{{$t('charge.voltage')}}</span>
  122. </view>
  123. <u-line direction="col" color="#6F84AC" length="50"></u-line>
  124. <view span="4" style="width: 25vw;">
  125. <view class="item-value">{{ gonglv }}W</view>
  126. <span class="item-text">{{$t('charge.power')}}</span>
  127. </view>
  128. <u-line direction="col" color="#6F84AC" length="50"></u-line>
  129. <view span="4" style="width: 25vw; margin-top: -5px;">
  130. <view class="item-value">{{deviceTemp}}℃</view>
  131. <span class="item-text">{{$t('charge.devtemper')}}</span>
  132. </view>
  133. <!-- <view span="3" style="width: 19vw;">
  134. <view class="item-value" v-if="portDetail.voltage == 0">0 {{ i18('度') }}</view>
  135. <view class="item-value" v-else>{{ dianliang }} {{ i18('度') }}</view>
  136. <span class="item-text">{{$t('charge.elec')}}</span>
  137. </view> -->
  138. </view>
  139. </view>
  140. <view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 3vh;">
  141. <view
  142. style="position:relative;justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 100%;height: 6vh;}">
  143. <view style="width: 27vw;left:5vw;position: absolute;font-size: 11px;">
  144. <view style="margin-left: 1vh;">
  145. <view style="font-weight: bold;"><span v-if="portDetail.portStatus == 6">{{i18('剩余时间')}}</span>
  146. <span v-else>{{$t('charge.chargetime')}}</span></view>
  147. <view class="demo-layout bg-purple"
  148. style="border-radius: 8px;background-color: aliceblue;color: #000;display: flex;padding-top: 5px;
  149. justify-content: center;
  150. align-items: center;">
  151. <view style="">{{ chargeTime }}{{ i18('分钟') }}</view>
  152. </view>
  153. </view>
  154. </view>
  155. <view span="2" style=";left:34vw;position: absolute">
  156. <view v-if="portDetail.portStatus == 2"
  157. style="text-align: center;position: absolute;margin:-1vh 2vw;border: 0ch;height: 20vh;">
  158. <u-button @click="toPage()" shape="circle"
  159. style="background: #ec3e41;color:white;width: 28vw;border: 0ch;height: 6vh;">STOP</u-button>
  160. </view>
  161. <view v-if="portDetail.portStatus != 2"
  162. style="text-align: center;position: absolute;margin:-1vh 2vw;border: 0ch;height: 20vh;">
  163. <u-button @click="toPage()" shape="circle"
  164. style="background: #57B03D;color:white;width: 28vw;border: 0ch;height: 6vh;">Charge</u-button>
  165. </view>
  166. <!-- <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
  167. <image class="btn-image" src="/static/images/new/start/stop.png" >
  168. </image>
  169. <view>{{ i18('停止充电') }}</view>
  170. </view>
  171. <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus != 2">
  172. <image class="btn-image" src="/static/images/new/start/using.png" >
  173. </image>
  174. <view>{{ i18('立即充电') }}</view>
  175. </view> -->
  176. </view>
  177. <view span="3" style="width: 26vw;left:65%;position: absolute">
  178. <view style="margin-left: 3vw;font-size: 11px;">
  179. <view style="font-weight: bold;"> Ampere</view>
  180. <view class="demo-layout bg-purple"
  181. style="border-radius: 8px;background-color: aliceblue;color: #000;display: flex;padding-top: 5px;
  182. justify-content: center;
  183. align-items: center;">
  184. <view v-if="deviceV == 0">0A</view>
  185. <view v-else>{{currentValue}}A</view>
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <view style="display: flex;align-items: center;justify-content: center;margin-top: 0vh;">
  192. <view @click="toSetting">
  193. <image src="../../../static/images/new/starts/status/Setting.png"
  194. style="width: 60px;height: 60px;margin: 2vh 2vh;"></image>
  195. </view>
  196. <!-- <view class="" @click="wifi">
  197. <image src="../../../static/images/new/starts/status/WiFi.png"
  198. style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
  199. </view> -->
  200. <!-- <view class="">
  201. <image src="../../../static/images/new/starts/status/Lock/Unlocked.png"
  202. style="width: 60px;height: 60px;margin: 2vh 2vh;"></image>
  203. </view> -->
  204. <view class="" @click="getInfo">
  205. <image src="../../../static/images/new/starts/status/Refresh.png"
  206. style="width: 60px;height: 60px;margin: 2vh 2vh;;"></image>
  207. </view>
  208. <!-- <view class="">
  209. <image src="../../../static/images/new/starts/status/Link.png"
  210. style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
  211. </view> -->
  212. </view>
  213. <view style="position:fixed;bottom:1vh;display: flex;align-items: center;justify-content: center;text-align: center;left:0px;right:0px;">
  214. <view @click="skipPage(0)" style="margin:0px 10px;">
  215. <image src="@/static/images/new/starts/tabbar/one_off.png"
  216. style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
  217. </view>
  218. <view @click="skipPage(1)" style="margin:0px 10px;">
  219. <image src="@/static/images/new/starts/tabbar/two_on.png"
  220. style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
  221. </view>
  222. <view @click="skipPage(2)" style="margin:0px 10px;">
  223. <image src="@/static/images/new/starts/tabbar/three_off.png"
  224. style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
  225. </view>
  226. </view>
  227. <!-- <view style="display: flex;flex-direction: row;margin:0 33%;" v-if="curPort.length>1">
  228. <view class="port_item" :class="item.id==choosePort?'selected_item':''" v-for="item in curPort"
  229. @click="selectPort(item.id);">{{ i18(item.text )}}</view>
  230. </view>
  231. <view class="dstatus">
  232. <view class="ditem">
  233. <image class="itemimg" src="/static/images/new/tmp.png" />
  234. <view class="item-value">{{deviceTemp}}℃</view>
  235. <span class="item-text">{{$t('charge.devtemper')}}</span>
  236. </view>
  237. <view class="ditem">
  238. <image class="itemimg" src="/static/images/new/dianya.png" />
  239. <view class="item-value">{{ deviceV }}V</view>
  240. <span class="item-text">{{$t('charge.voltage')}}</span>
  241. </view>
  242. <view class="ditem">
  243. <image class="itemimg" src="/static/images/new/dianliu.png" />
  244. <view class="item-value" v-if="deviceV == 0">0A</view>
  245. <view class="item-value" v-else>{{currentValue}}A</view>
  246. <span class="item-text">{{$t('charge.current')}}</span>
  247. </view>
  248. <view class="ditem">
  249. <image class="itemimg" src="/static/images/new/shjian.png" />
  250. <view class="item-value">{{ chargeTime }}{{ i18('分钟') }}</view>
  251. <span class="item-text" v-if="portDetail.portStatus == 6">{{i18('剩余时间')}}</span>
  252. <span class="item-text" v-else>{{$t('charge.chargetime')}}</span>
  253. </view>
  254. <view class="ditem">
  255. <image class="itemimg" src="/static/images/new/gonglv.png" />
  256. <view class="item-value">{{ gonglv }}W</view>
  257. <span class="item-text">{{$t('charge.power')}}</span>
  258. </view>
  259. <view class="ditem">
  260. <image class="itemimg" src="/static/images/new/dianliang.png" />
  261. <view class="item-value" v-if="portDetail.voltage == 0">0 {{ i18('度') }}</view>
  262. <view class="item-value" v-else>{{ dianliang }} {{ i18('度') }}</view>
  263. <span class="item-text">{{$t('charge.elec')}}</span>
  264. </view>
  265. </view>
  266. <view class="dbtns">
  267. <view class="start" @click="toPage">
  268. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/start.png" />
  269. <span>{{$t('charge.startcharge')}}</span>
  270. </view>
  271. <view class="get" @click="getInfo">
  272. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/get.png" />
  273. <span>{{$t('charge.getinfo')}}</span>
  274. </view>
  275. </view> -->
  276. <!-- <view class="dtip">
  277. <view style="margin:10px 0px;color: #1A87FF;"><img style="width: 13px;height: 13px"
  278. src="/static/images/new/tip.png">{{i18('温馨提示')}}</view>
  279. <view>1,{{i18('桩控制最大输出电流,当功率没有达到请检查车的状态或者车的设置')}};</view>
  280. <view>2,{{i18('启动充电-&gt;设备管理->可设置设备最大输出电流')}}</view>
  281. <view>3,{{i18('为保障您远程启动正常充电,请确保枪头完全连接充电口,同时确认您的爱车处于立即充电状态下')}};</view>
  282. <view>4,{{i18('注意规范安全充电,停好车,锁好车。')}}</view>
  283. </view> -->
  284. </view>
  285. </template>
  286. <script>
  287. import {
  288. getDeviceInfo,
  289. getPortDetail,
  290. startCharge,
  291. stopCharge,
  292. sendPortDetailCmd,
  293. checkStatusChange,
  294. getPlanInfo,
  295. cancelPlan
  296. } from "@/api/device/device";
  297. import websocket from '@/utils/websocket'
  298. import i18 from '@/utils/i18.js'
  299. export default {
  300. data() {
  301. return {
  302. consolee:0, //测试参数
  303. refreshTimer: null,
  304. curPort: [],
  305. chargeTime: 0,
  306. deviceTemp: 0,
  307. deviceV: 0,
  308. currentValue: 0,
  309. gonglv: 0,
  310. dianliang: 0,
  311. portStatus: 0,
  312. deviceInfo: {},
  313. visitTime: "",
  314. timer: null,
  315. showPort: false,
  316. portDetail: {
  317. portStatus: 0,
  318. POWER: 0,
  319. voltage: 0
  320. },
  321. statusTimer: "",
  322. connected: false,
  323. scriptTask: null,
  324. choosePort: 1,
  325. portList: [
  326. [{
  327. port: 1,
  328. text: "端口一"
  329. }]
  330. ],
  331. planInfo: null,
  332. days: ["", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  333. clickRightTag: 0,
  334. show:false,
  335. timeFlg:true
  336. }
  337. },
  338. computed: {
  339. imgUrl() {
  340. return getApp().globalData.config.imgUrl;
  341. }
  342. },
  343. onLoad(opt) {
  344. this.deviceInfo.deviceId = opt.id;
  345. this.deviceInfo.ccid = opt.ccid;
  346. this.deviceInfo.qrcode = opt.qrcode;
  347. this.startTimer();
  348. },
  349. onShow() {
  350. this.getInfo();
  351. this.getPlanInfo();
  352. },
  353. onUnload() {
  354. this.closeSocket();
  355. if (this.refreshTimer != null) {
  356. clearTimeout(this.refreshTimer)
  357. }
  358. },
  359. mounted: function() {
  360. this.drawCircle(25);
  361. //this.drawProgressbg();
  362. //参数为1-100
  363. //this.drawLine();
  364. },
  365. methods: {
  366. resetMainboard() {
  367. let deviceId = this.deviceId;
  368. // 恢复默认配置
  369. let self = this;
  370. this.$modal.loading("正在重置,请稍等...");
  371. reset({deviceId:deviceId,ccid:this.ccid}).then(res => {
  372. this.$modal.loading("正在重置,请稍等...");
  373. setTimeout(function(){
  374. self.sendMainboardCmd();
  375. },5000)
  376. })
  377. },
  378. skipPage(type){
  379. if(type==0){
  380. uni.navigateTo({
  381. url:'/pages/index'
  382. })
  383. }else if(type==1){
  384. uni.navigateTo({
  385. url:'/pages/weitiandi/deviceList'
  386. })
  387. }else if(type==2){
  388. uni.navigateTo({
  389. url:'/pages/mine/index'
  390. })
  391. }else{
  392. this.$modal.showToast("功能开发中..");
  393. }
  394. },
  395. handleLogout() {
  396. this.$modal.confirm('确定注销并退出系统吗?').then(() => {
  397. this.$store.dispatch('LogOut').then(() => {
  398. uni.setStorageSync("loginInfo",'');
  399. this.$tab.reLaunch('/pages/index')
  400. })
  401. })
  402. },
  403. close(){
  404. this.show=false
  405. },
  406. open(){
  407. this.show=true
  408. },
  409. // clickRight() {
  410. // this.show=true
  411. // },
  412. // changeDrawer(event) {
  413. // if (event) {
  414. // // 抽屉打开时的逻辑
  415. // this.clickRightTag = 1
  416. // } else {
  417. // // 抽屉关闭时的逻辑
  418. // this.clickRightTag = 0
  419. // }
  420. // },
  421. // //自定义头右操作函数
  422. clickRight() {
  423. //打开抽屉
  424. this.show=!this.show
  425. // if (this.clickRightTag == 0) {
  426. // this.show=true
  427. // this.clickRightTag = 1
  428. // } else {
  429. // this.show=false
  430. // this.clickRightTag = 0
  431. // }
  432. },
  433. //开始充电按钮
  434. trigger() {
  435. let portStatus = this.portDetail.portStatus;
  436. if (portStatus == 2) { //需要停止充电
  437. this.$modal.confirm("需要停止充电么?").then(res => {
  438. this.stopCharge();
  439. })
  440. } else {
  441. if (portStatus == 1) {
  442. this.$modal.msg("请先将充电枪插入后再点击充电");
  443. }
  444. if (portStatus == 5) {
  445. this.$modal.confirm("确认开始充电么?").then(res => {
  446. this.startCharge();
  447. })
  448. }
  449. }
  450. },
  451. // drawProgressbg: function() {
  452. // // 自定义组件实例 this ,表示在这个自定义组件下查找拥有 canvas-id 的 <canvas/>
  453. // var ctx = uni.createCanvasContext('cpbg', this);
  454. // ctx.setLineWidth(20); // 设置圆环的宽度
  455. // ctx.setStrokeStyle('#35383A'); // 设置圆环的颜色
  456. // // ctx.setLineCap('round'); // 设置圆环端点的形状
  457. // ctx.setLineCap('square'); // 设置圆环端点的形状
  458. // ctx.beginPath(); //开始一个新的路径
  459. // ctx.arc(120, 120, 90, 0 * Math.PI, 2 * Math.PI, false);
  460. // //设置一个原点(110,110),半径为100的圆的路径到当前路径
  461. // ctx.stroke(); //对当前路径进行描边
  462. // ctx.draw();
  463. // },
  464. drawCircle: function(step) {
  465. var ctx = uni.createCanvasContext('cpbar', this);
  466. // 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
  467. var gradient = ctx.createLinearGradient(0, 0, 120, 0);
  468. let increase = 0.15;
  469. let end = (120 /100) * 2 * Math.PI ; // 最后的角度
  470. let current = (50 / 100) * 2 * Math.PI-Math.PI/3 ; // 起始角度
  471. if(this.portDetail.portStatus == 2){
  472. this.consolee+=1
  473. if(this.timeFlg){
  474. this.timeFlg=false
  475. let timer = setInterval(() => {
  476. gradient.addColorStop('0', '#57B03D');
  477. gradient.addColorStop('1.0', '#57B03D');
  478. ctx.setLineWidth(10);
  479. ctx.setStrokeStyle(gradient);
  480. ctx.setLineCap('square');
  481. ctx.beginPath();
  482. // 参数step 为绘制的百分比
  483. if (current < end) {
  484. current = current + increase;
  485. }
  486. if (current >= end) {
  487. //current = end;
  488. if(this.portDetail.portStatus != 2){
  489. clearInterval(timer);
  490. this.timeFlg=true
  491. }
  492. end = (120 /100) * 2 * Math.PI ; // 最后的角度
  493. current = (50 / 100) * 2 * Math.PI-Math.PI/3 ; // 起始角度
  494. }
  495. ctx.arc(120, 120, 115, (50 / 100) * 2 * Math.PI-Math.PI/2, current, false);
  496. ctx.stroke();
  497. ctx.draw();
  498. }, 40);
  499. }
  500. }
  501. },
  502. toPage() {
  503. let imei = this.deviceInfo.deviceId;
  504. let ccid = this.deviceInfo.ccid;
  505. this.closeSocket();
  506. uni.navigateTo({
  507. url: '/pages/weitiandi/device/index?id=' + imei + '&ccid=' + ccid
  508. });
  509. },
  510. toSetting(){
  511. let imei = this.deviceInfo.deviceId;
  512. let ccid = this.deviceInfo.ccid;
  513. this.closeSocket();
  514. uni.navigateTo({
  515. url: '/pages/weitiandi/device/setting?id=' + imei + '&ccid=' + ccid
  516. });
  517. },
  518. i18(text) {
  519. return i18(text)
  520. },
  521. planCharge() {
  522. if (this.planInfo != null) {
  523. this.$modal.confirm("确认取消预约?").then(res => {
  524. this.cancelPlan();
  525. })
  526. } else {
  527. this.toPlan()
  528. }
  529. },
  530. cancelPlan() {
  531. cancelPlan(this.planInfo.id).then(res => {
  532. this.$modal.msg("取消成功");
  533. this.planInfo = null;
  534. this.getPlanInfo();
  535. })
  536. },
  537. getPlanInfo() {
  538. getPlanInfo(this.deviceInfo.deviceId, this.choosePort).then(res => {
  539. let data = res.data;
  540. if (data != null) {
  541. let planType = data.planType;
  542. if (planType == 1) { //单次预约
  543. let planInfo = {};
  544. planInfo.runTime = data.runTime;
  545. this.planInfo = planInfo;
  546. this.planInfo.id = data.id;
  547. } else {
  548. let planInfo = {};
  549. planInfo.runTime = data.runTime;
  550. let repeatDays = data.repeatDays;
  551. let days = repeatDays.split(",")
  552. let strs = "";
  553. for (let i = 0; i < days.length; i++) {
  554. if (strs.length > 0) {
  555. strs += ",";
  556. }
  557. strs += this.days[days[i]];
  558. }
  559. this.planInfo = planInfo;
  560. this.planInfo.runTime = strs + " " + data.repeatTime;
  561. this.planInfo.id = data.id;
  562. }
  563. }
  564. })
  565. },
  566. startTimer() {
  567. let self = this;
  568. if (this.refreshTimer != null) {
  569. clearTimeout(this.refreshTimer);
  570. }
  571. self.refreshTimer = setTimeout(function() {
  572. self.getInfo();
  573. self.startTimer();
  574. }, 30000);
  575. },
  576. confirmPort(e) {
  577. let value = e.value[0]
  578. this.choosePort = value.port;
  579. this.showPort = false;
  580. this.getInfo()
  581. },
  582. parsePortCmd(real_data) {
  583. let self = this;
  584. self.portDetail = real_data;
  585. self.portList = [
  586. []
  587. ];
  588. self.curPort = [];
  589. let port_first_status = self.portDetail["port_first_status"];
  590. let port_second_status = self.portDetail["port_second_status"]
  591. if (port_first_status) {
  592. self.portList[0].push({
  593. port: 1,
  594. text: "端口一"
  595. });
  596. self.curPort.push({
  597. text: "端口一",
  598. status: port_first_status,
  599. id: 1,
  600. })
  601. let power = self.portDetail.power;
  602. let voltage = parseInt(self.portDetail.voltage);
  603. if (voltage > 0) {
  604. let current = power / voltage;
  605. current = current.toFixed(1);
  606. self.portDetail.currentValue = current;
  607. }
  608. }
  609. if (port_second_status) {
  610. self.portList[0].push({
  611. port: 2,
  612. text: "端口二"
  613. });
  614. self.curPort.push({
  615. text: "端口二",
  616. status: port_second_status,
  617. id: 2
  618. })
  619. let power = self.portDetail.power_1;
  620. let voltage = parseInt(self.portDetail.voltage);
  621. if (voltage > 0) {
  622. let current = power / voltage;
  623. current = current.toFixed(1);
  624. self.portDetail.currentValue_1 = current;
  625. }
  626. }
  627. let choosePort = self.choosePort
  628. /**
  629. * chargeTime:0,
  630. * deviceTemp:0,
  631. * deviceV:0,
  632. * currentValue:0,
  633. * gonglv:0,
  634. * dianliang:0,
  635. * portStatus:0,
  636. */
  637. if (choosePort == 1) {
  638. self.portDetail.portStatus = port_first_status;
  639. self.chargeTime = self.portDetail.time;
  640. self.gonglv = self.portDetail.power;
  641. self.dianliang = self.portDetail.elec / 100;
  642. self.currentValue = self.portDetail.currentValue;
  643. if (port_first_status != 2) {
  644. self.chargeTime = 0;
  645. if (port_first_status == 6) {
  646. self.chargeTime = self.portDetail.time;
  647. }
  648. self.gonglv = 0;
  649. self.dianliang = 0;
  650. self.currentValue = 0;
  651. }
  652. } else if (choosePort == 2) {
  653. self.portDetail.portStatus = port_second_status;
  654. self.chargeTime = self.portDetail.time_1;
  655. self.gonglv = self.portDetail.power_1;
  656. self.dianliang = self.portDetail.elec_1 / 100;
  657. self.currentValue = self.portDetail.currentValue_1;
  658. if (port_second_status != 2) {
  659. self.chargeTime = 0;
  660. if (port_first_status == 6) {
  661. self.chargeTime = self.portDetail.time_1;
  662. }
  663. self.gonglv = 0;
  664. self.dianliang = 0;
  665. self.currentValue = 0;
  666. }
  667. }
  668. self.portStatus = self.portDetail.portStatus;
  669. self.deviceTemp = self.portDetail.dev_temper;
  670. self.deviceV = self.portDetail.voltage;
  671. self.$modal.closeLoading();
  672. if(self.portDetail.portStatus==2){
  673. this.drawCircle(25);
  674. }
  675. },
  676. initSocket(key) {
  677. let self = this;
  678. let socketUrl = getApp().globalData.config.socketUrl
  679. this.scriptTask = websocket({
  680. url: "/" + key + "/",
  681. });
  682. let scriptTask = this.scriptTask;
  683. scriptTask.onOpen(function(res) {
  684. console.log('WebSocket连接已打开!');
  685. self.connected = true;
  686. });
  687. scriptTask.onError(function(res) {
  688. self.connected = false;
  689. console.log(res);
  690. });
  691. scriptTask.onMessage(function(res) {
  692. let data = JSON.parse(res.data);
  693. let type = data.type;
  694. let real_data = data.real_data;
  695. if (type == 103) {
  696. self.parsePortCmd(real_data);
  697. }
  698. if (type == 116) {
  699. self.$modal.closeLoading();
  700. self.getInfo();
  701. }
  702. if (type == 113) {
  703. self.$modal.closeLoading();
  704. self.getInfo();
  705. }
  706. if (type == 96) {
  707. self.mainBoardInfo = real_data;
  708. self.formatMainboardData();
  709. self.$modal.closeLoading();
  710. }
  711. self.$forceUpdate();
  712. console.log('收到服务器内容:' + JSON.stringify(data));
  713. });
  714. scriptTask.onClose(function(res) {
  715. console.log('WebSocket 已关闭!');
  716. });
  717. },
  718. toSet() {
  719. this.closeSocket();
  720. uni.navigateTo({
  721. url: '/pages/weitiandi/device/setting?id=' + this.deviceInfo.deviceId + "&ccid=" + this
  722. .deviceInfo.ccid
  723. });
  724. },
  725. toPlan() {
  726. uni.navigateTo({
  727. url: '/pages/weitiandi/device/plan?port=' + this.choosePort + '&id=' + this.deviceInfo
  728. .deviceId + "&ccid=" + this.deviceInfo.ccid
  729. });
  730. },
  731. trigger() {
  732. let portStatus = this.portDetail.portStatus;
  733. if (portStatus == 2) { //需要停止充电
  734. this.$modal.confirm("需要停止充电么?").then(res => {
  735. this.stopCharge();
  736. this.drawCircle(0);
  737. })
  738. } else {
  739. if (portStatus == 1) {
  740. this.$modal.msg("请先将充电枪插入后再点击充电");
  741. }
  742. if (portStatus == 5) {
  743. this.$modal.confirm("确认开始充电么?").then(res => {
  744. this.startCharge();
  745. this.drawCircle(50); //参数为1-100
  746. })
  747. }
  748. }
  749. },
  750. getInfo() {
  751. let self = this;
  752. this.$modal.loading("正在获取状态,请稍等...",true);
  753. sendPortDetailCmd(this.deviceInfo).then(res => {
  754. this.$modal.loading("正在获取状态,请稍等...",true);
  755. this.visitTime = res.msg;
  756. if (!this.visitTime) {
  757. this.$modal.msg("请重新进入页面");
  758. return;
  759. }
  760. if (!this.scriptTask) {
  761. this.initSocket(this.deviceInfo.deviceId);
  762. }
  763. setTimeout(function() {
  764. getPortDetail(self.deviceInfo, self.visitTime).then(res => {
  765. let data = res.data;
  766. if (data != null) {
  767. self.parsePortCmd(data);
  768. } else {}
  769. });
  770. }, 500)
  771. })
  772. this.drawCircle(25)
  773. },
  774. stopCharge() {
  775. let self = this;
  776. this.deviceInfo.port = this.choosePort;
  777. stopCharge(this.deviceInfo).then(() => {
  778. self.$modal.loading("停止成功");
  779. setTimeout((() => {
  780. self.getInfo();
  781. }), 1000);
  782. })
  783. },
  784. startCharge() {
  785. let self = this;
  786. this.deviceInfo.port = this.choosePort;
  787. startCharge(this.deviceInfo).then(res => {
  788. self.$modal.loading("启动成功");
  789. setTimeout((() => {
  790. self.getInfo();
  791. }), 1000);
  792. })
  793. },
  794. getPortInfo() {
  795. this.startPortDetailTimer();
  796. },
  797. startPortDetailTimer() {
  798. let self = this;
  799. this.timer = setTimeout(function() {
  800. getPortDetail(self.deviceInfo, self.visitTime).then(res => {
  801. let data = res.data;
  802. if (data != null) {
  803. self.portDetail = data;
  804. self.checkStatusCheck();
  805. self.$modal.closeLoading();
  806. } else {
  807. self.startPortDetailTimer();
  808. }
  809. });
  810. }, 1000);
  811. },
  812. checkStatusCheck() {
  813. this.statusChangeTimer();
  814. },
  815. checkOnPage() {
  816. var pages = getCurrentPages() // 获取栈实例
  817. let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
  818. if ("pages/weitiandi/device/index" != currentRoute) {
  819. return false;
  820. }
  821. return true;
  822. },
  823. closeSocket() {
  824. this.scriptTask.close();
  825. this.scriptTask = null;
  826. },
  827. statusChangeTimer() {
  828. let self = this;
  829. this.statusTimer = setTimeout(function() {
  830. if (!this.checkOnPage()) {
  831. return;
  832. }
  833. checkStatusChange(self.deviceInfo, self.visitTime).then(res => {
  834. let data = res.data;
  835. if (data != null) {
  836. self.getInfo();
  837. } else {
  838. self.statusChangeTimer();
  839. }
  840. });
  841. }, 3000);
  842. },
  843. wifi() {
  844. uni.navigateTo({
  845. url: '/pages/bluetooth/index/wifi'
  846. });
  847. },
  848. }
  849. }
  850. </script>
  851. <style>
  852. .container {
  853. /* //background: rgb(208, 208, 208); */
  854. background-image: url('../../../static/images/new/starts/bg1.jpg');
  855. inset: 0;
  856. position: absolute;
  857. background-size: cover;
  858. background-repeat: no-repeat;
  859. }
  860. .prop-item {
  861. position: relative;
  862. display: flex;
  863. flex-direction: row;
  864. height: 40px;
  865. line-height: 40px;
  866. margin: 0 20rpx;
  867. }
  868. .prop-item-left {
  869. color: #BCBCBF;
  870. ;
  871. width: 30%;
  872. font-size: 14px;
  873. //margin-left: 36px;
  874. }
  875. .prop-item-image {
  876. width: 15px;
  877. height: 15px;
  878. position: absolute;
  879. left: 2vw;
  880. top: 0.5vh;
  881. }
  882. .prop-item-right {
  883. position: absolute;
  884. right: 10rpx;
  885. top: 5rpx;
  886. color: #BCBCBF;
  887. }
  888. .progress_box {
  889. /* position: relative; */
  890. /* width: 60vw; */
  891. height: 38vh;
  892. /* background-color: red; */
  893. display: flex;
  894. text-align: center;
  895. flex-direction: row;
  896. }
  897. .pcds {
  898. margin-top: 90rpx;
  899. color: black;
  900. }
  901. .progress_bg {
  902. position: absolute;
  903. width: 60vw;
  904. height: 50vh;
  905. }
  906. .progress_txt {
  907. /* position: absolute; */
  908. z-index: 99;
  909. /* width: 55vw; */
  910. /* text-align: center;
  911. font-size: 28upx;
  912. margin: 16vw;
  913. /* margin-top: 54px;
  914. margin-left: 74px;
  915. color: #999999; */
  916. }
  917. .progress_bar {
  918. position: absolute;
  919. width: 64vw;
  920. margin: 7px 0px 0px 5px;
  921. height: 50vh;
  922. }
  923. .progress-barup{
  924. position: absolute;
  925. width: 250px;
  926. margin: 0px;
  927. height: 250px;
  928. z-index: 1;
  929. }
  930. .progress_line {
  931. position: absolute;
  932. width: 60vw;
  933. height: 50vh;
  934. }
  935. .progress_info {
  936. display: flex;
  937. font-size: 10px;
  938. margin: 80px 30px;
  939. align-items: center;
  940. flex-direction: column;
  941. /* height: 14vh; */
  942. width: 190px;
  943. }
  944. .header {
  945. position: relative;
  946. margin-top: 4vw;
  947. }
  948. .header-status-desc {
  949. position: absolute;
  950. text-align: center;
  951. width: 100%;
  952. bottom: 1vh;
  953. font-size: 5vw;
  954. font-weight: bold;
  955. color: #0E9F9B;
  956. margin-bottom: 5vw;
  957. }
  958. .header-status {
  959. font-weight: bold;
  960. text-align: center;
  961. }
  962. .chong-active {
  963. color: #0E9F9B
  964. }
  965. .header-img {
  966. width: 100%;
  967. padding: 5% 10%;
  968. text-align: center;
  969. }
  970. .header-img image {
  971. width: 100%;
  972. height: 23vh;
  973. }
  974. .info-body {
  975. background: #0E9F9B;
  976. height: 20vh;
  977. margin: 0 2%;
  978. border-radius: 1vw;
  979. margin-top: 2vh;
  980. color: #F8FCFF;
  981. line-height: 3vh;
  982. }
  983. .info-content {
  984. display: inline-block;
  985. width: 23%;
  986. text-align: center;
  987. margin: 1%;
  988. margin-top: 2.5vh;
  989. }
  990. .info-content-value {
  991. font-weight: bold;
  992. }
  993. .info-content-text {}
  994. .info-summary {
  995. display: flex;
  996. flex-direction: row;
  997. text-align: center;
  998. margin: 3vh 0;
  999. }
  1000. .summary {
  1001. width: 33%;
  1002. line-height: 2.5vh;
  1003. }
  1004. .charge-num {
  1005. color: #0E9F9B;
  1006. font-weight: bold;
  1007. font-size: 4.5vw;
  1008. }
  1009. .charge-title {
  1010. color: #B2B2B2;
  1011. font-weight: 400;
  1012. }
  1013. .btn-image {
  1014. width: 90%;
  1015. height: 100%;
  1016. }
  1017. .info-bottom-btn {
  1018. display: flex;
  1019. flex-direction: row;
  1020. text-align: center;
  1021. position: relative;
  1022. margin-top: 10vh;
  1023. }
  1024. .btn-area {
  1025. width: 50%;
  1026. height: 50px;
  1027. }
  1028. .left {
  1029. position: relative;
  1030. left: 10px;
  1031. text-align: right;
  1032. }
  1033. .right {
  1034. text-align: left;
  1035. position: relative;
  1036. right: 10px;
  1037. }
  1038. .info-plan {
  1039. text-align: center;
  1040. color: #0E9F9B;
  1041. margin-top: 1vh;
  1042. font-weight: 400;
  1043. }
  1044. .setting {
  1045. position: fixed;
  1046. right: -1px;
  1047. top: 10vh;
  1048. z-index: 999;
  1049. background: rgb(227, 243, 245);
  1050. color: #0E9F9B;
  1051. font-size: 10px;
  1052. border-radius: 5px;
  1053. padding: 3px;
  1054. }
  1055. .port {
  1056. height: 70px;
  1057. background: #F8FCFF;
  1058. border: 0px solid #F8FCFF;
  1059. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  1060. border-radius: 4px;
  1061. margin: 0 10px;
  1062. position: relative;
  1063. margin-top: 10px;
  1064. }
  1065. .plan {
  1066. height: 70px;
  1067. background: #F8FCFF;
  1068. border: 0px solid #F8FCFF;
  1069. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  1070. border-radius: 4px;
  1071. margin: 0 10px;
  1072. position: relative;
  1073. margin-top: 15px;
  1074. }
  1075. .port-image {
  1076. height: 40px;
  1077. width: 40px;
  1078. position: absolute;
  1079. top: 15px;
  1080. left: 20px;
  1081. }
  1082. .port-text {
  1083. position: absolute;
  1084. top: 13px;
  1085. left: 75px;
  1086. font-weight: bold;
  1087. }
  1088. .port-num {
  1089. position: absolute;
  1090. top: 38px;
  1091. left: 75px;
  1092. color: #B2B2B2;
  1093. }
  1094. .port-icon {
  1095. position: absolute;
  1096. top: 30px;
  1097. right: 5px;
  1098. width: 10px;
  1099. height: 16px;
  1100. }
  1101. .port-icon image {
  1102. width: 90%;
  1103. }
  1104. .body-bottom {
  1105. padding: 0 22px;
  1106. }
  1107. .body-bottom .info-content {
  1108. width: 30%;
  1109. }
  1110. .bottom-control {
  1111. height: 22vh;
  1112. margin: 0 2%;
  1113. margin-top: 2vh;
  1114. line-height: 3vh;
  1115. background: #F8FCFF;
  1116. border: 0px solid #F8FCFF;
  1117. box-shadow: 0px 0px 6px 1px rgba(101, 101, 101, 0.29);
  1118. border-radius: 4px;
  1119. padding: 3%;
  1120. }
  1121. .control-btn {
  1122. display: inline-block;
  1123. ;
  1124. height: 60px;
  1125. width: 25%;
  1126. padding: 10px 20px;
  1127. text-align: center;
  1128. font-size: 12px;
  1129. color: black;
  1130. }
  1131. .control-btn .btn-image {}
  1132. #box {
  1133. /* width: 300px; */
  1134. height: 280px;
  1135. position: relative;
  1136. /* 背景色 */
  1137. /* background: #f7f6f6; */
  1138. overflow: hidden;
  1139. /* padding: 50px 0; */
  1140. box-sizing: border-box;
  1141. ;
  1142. }
  1143. .box {
  1144. width: 100%;
  1145. height: 100%;
  1146. position: absolute;
  1147. display: flex;
  1148. justify-content: center;
  1149. /* 此处尽量不要设置背景色,可以选择在父标签上设置背景色,否则没有黏黏的效果 */
  1150. filter: url("#goo");
  1151. }
  1152. /* 电量文字 */
  1153. .text {
  1154. font-weight: 200;
  1155. font-size: 20px;
  1156. margin-top: 5px;
  1157. text-align: center;
  1158. color: #ff6600;
  1159. }
  1160. /* 电量文字 */
  1161. .text span {
  1162. font-size: 15px;
  1163. }
  1164. /* 顶部的两个旋转小球 */
  1165. .top_ball {
  1166. width: 200px;
  1167. height: 200px;
  1168. border-radius: 35%;
  1169. opacity: 0.5;
  1170. position: absolute;
  1171. top: 20px;
  1172. z-index: 10;
  1173. /* 从中心向外剪切圆,相当于掏空 */
  1174. -webkit-mask: radial-gradient(transparent 95px, white 0px);
  1175. }
  1176. /* 顶部的两个旋转小球 */
  1177. .top_ball.one {
  1178. background: var(--c);
  1179. animation: ballZhuan 5s linear infinite;
  1180. }
  1181. /* 顶部的两个旋转小球 */
  1182. .top_ball.two {
  1183. background: var(--c);
  1184. animation: ballZhuan 8s linear infinite;
  1185. }
  1186. .three {
  1187. width: 170px;
  1188. height: 170px;
  1189. border-radius: 300px;
  1190. opacity: 1;
  1191. position: absolute;
  1192. top: 20px;
  1193. z-index: 10;
  1194. /* 从中心向外剪切圆,相当于掏空 */
  1195. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  1196. background: #ffffff;
  1197. /* animation: ballZhuan 9s linear infinite; */
  1198. overflow: hidden;
  1199. box-shadow: 0px 0px 19px 1px #2196f3;
  1200. }
  1201. .four {
  1202. width: 200px;
  1203. height: 200px;
  1204. border-radius: 80px;
  1205. opacity: 0.3;
  1206. position: absolute;
  1207. top: 10px;
  1208. z-index: 10;
  1209. /* 从中心向外剪切圆,相当于掏空 */
  1210. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  1211. background: #2196f3;
  1212. animation: ballZhuan1 linear infinite;
  1213. animation-duration: 11s;
  1214. }
  1215. .five {
  1216. width: 270px;
  1217. height: 270px;
  1218. border-radius: 99px;
  1219. opacity: 0.6;
  1220. position: absolute;
  1221. top: 30px;
  1222. z-index: 10;
  1223. /* 从中心向外剪切圆,相当于掏空 */
  1224. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  1225. background: #2196f3;
  1226. animation: ballZhuan1 linear infinite;
  1227. /* transform: rotate(120deg); */
  1228. animation-duration: 9s;
  1229. left: -67px;
  1230. }
  1231. .six {
  1232. width: 270px;
  1233. height: 270px;
  1234. border-radius: 99px;
  1235. opacity: 0.6;
  1236. position: absolute;
  1237. top: 30px;
  1238. z-index: 10;
  1239. /* 从中心向外剪切圆,相当于掏空 */
  1240. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  1241. background: #2196f3;
  1242. animation: ballZhuan1 7s linear infinite;
  1243. /* transform: rotate(120deg); */
  1244. right: -67px;
  1245. }
  1246. @keyframes ballZhuan {
  1247. 100% {
  1248. transform: rotate(360deg);
  1249. }
  1250. }
  1251. @keyframes ballZhuan1 {
  1252. 100% {
  1253. transform: rotate(360deg);
  1254. }
  1255. }
  1256. /* 底部的小球 */
  1257. .dot {
  1258. display: block;
  1259. width: 20px;
  1260. height: 20px;
  1261. border-radius: 50%;
  1262. background: rgba(101, 192, 255, 0.28);
  1263. position: absolute;
  1264. z-index: 1000;
  1265. bottom: -50px;
  1266. }
  1267. .dot:nth-of-type(1) {
  1268. width: 40px;
  1269. height: 40px;
  1270. right: 116px;
  1271. animation: dotMove 5s linear infinite;
  1272. }
  1273. .dot:nth-of-type(2) {
  1274. width: 50px;
  1275. height: 50px;
  1276. left: 120px;
  1277. animation: dotMove 4s linear infinite;
  1278. }
  1279. .dot:nth-of-type(3) {
  1280. animation: dotMove 2s linear infinite;
  1281. }
  1282. .dot:nth-of-type(4) {
  1283. width: 15px;
  1284. height: 15px;
  1285. left: 130px;
  1286. animation: dotMove 2s linear infinite;
  1287. }
  1288. .dot:nth-of-type(5) {
  1289. width: 30px;
  1290. height: 30px;
  1291. animation: dotMove 3s linear infinite;
  1292. }
  1293. @keyframes dotMove {
  1294. 0% {
  1295. transform: translateY(0px);
  1296. opacity: 1;
  1297. }
  1298. 98% {
  1299. opacity: 1;
  1300. }
  1301. 100% {
  1302. transform: translateY(-260px);
  1303. opacity: 0;
  1304. }
  1305. }
  1306. .w-flex {
  1307. display: -webkit-box;
  1308. display: -webkit-flex;
  1309. display: flex;
  1310. padding: 0px 25px;
  1311. }
  1312. .w-flex__item {
  1313. -webkit-box-flex: 1;
  1314. -webkit-flex: 1;
  1315. flex: 1;
  1316. }
  1317. .w-item {
  1318. text-align: center;
  1319. padding: 5px;
  1320. }
  1321. .w-item-tit {
  1322. font-size: 14px;
  1323. color: #888;
  1324. }
  1325. .w-item-num {
  1326. font-size: 18px;
  1327. color: #111;
  1328. }
  1329. .can {
  1330. position: relative;
  1331. z-index: 0;
  1332. width: 211px;
  1333. height: 211px;
  1334. background-size: cover;
  1335. display: flex;
  1336. justify-content: center;
  1337. align-items: center;
  1338. }
  1339. .dtop {
  1340. background: url(/static/images/new/box1.png);
  1341. background-size: cover;
  1342. width: 260px;
  1343. height: 236px;
  1344. display: flex;
  1345. justify-content: center;
  1346. align-items: center;
  1347. left: 15%;
  1348. position: relative;
  1349. }
  1350. .dstatus {
  1351. margin-top: 0.1rem;
  1352. display: flex;
  1353. flex-wrap: wrap;
  1354. justify-content: space-evenly;
  1355. align-content: center;
  1356. }
  1357. .ditem {
  1358. width: 30%;
  1359. display: flex;
  1360. flex-direction: column;
  1361. align-items: center;
  1362. margin-bottom: 0.3rem;
  1363. margin-top: 10px;
  1364. }
  1365. .itemimg {
  1366. width: 50px;
  1367. height: 50px;
  1368. }
  1369. .item-value {
  1370. font-weight: bold;
  1371. font-size: 15px;
  1372. margin:8px 0 0 0;
  1373. }
  1374. .item-text {
  1375. font-size: 11px;
  1376. margin: 0px 0;
  1377. color: aliceblue;
  1378. }
  1379. .start {
  1380. background: #1A87FF;
  1381. color: #fff;
  1382. width: 45%;
  1383. height: 50px;
  1384. min-height: 40px;
  1385. border-radius: 50px;
  1386. display: flex;
  1387. justify-content: center;
  1388. align-items: center;
  1389. font-size: 20px;
  1390. font-weight: bold;
  1391. }
  1392. .dbtns {
  1393. display: flex;
  1394. margin-top: 10px;
  1395. justify-content: space-between;
  1396. padding: 0 30px;
  1397. }
  1398. .get {
  1399. background: #fff;
  1400. border: 1px solid #1A87FF;
  1401. color: #1A87FF;
  1402. width: 45%;
  1403. height: 50px;
  1404. min-height: 40px;
  1405. border-radius: 50px;
  1406. display: flex;
  1407. justify-content: center;
  1408. align-items: center;
  1409. font-size: 20px;
  1410. font-weight: bold;
  1411. }
  1412. .dtip {
  1413. margin: 20px 20px;
  1414. padding: 10px;
  1415. background: rgba(127, 200, 251, 0.1);
  1416. border: 1px solid #7FC8FB;
  1417. box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.19);
  1418. border-radius: 5px;
  1419. font-size: 17px;
  1420. font-weight: 400;
  1421. color: #B8B9BA;
  1422. margin-bottom: 10px;
  1423. }
  1424. .p1 {
  1425. font-size: 22px;
  1426. color: white;
  1427. font-weight: bold;
  1428. margin-top: 10px;
  1429. /* margin-left: -1vh;; */
  1430. }
  1431. .p2{
  1432. color: #888;
  1433. font-size: 22px;
  1434. font-weight: bold;
  1435. }
  1436. .stip {
  1437. text-align: center;
  1438. z-index: 9999;
  1439. }
  1440. </style>