stationDetails.vue 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644
  1. <template>
  2. <view>
  3. <ujp-navbar title="站点详情">
  4. <view slot="right" style="margin-right: 10px;" @click="openModalBl=true">
  5. <view class="iconfont service">
  6. &#xe60d;
  7. </view>
  8. </view>
  9. </ujp-navbar>
  10. <u-alert-tips type="warning" @click="noticeShow=false" icon="volume-up-fill"
  11. v-show="noticeShow&&stationDetail.station&&stationDetail.station.maxSoc&&stationDetail.station.maxSoc!=100"
  12. :descStyle="{
  13. fontSize: '28rpx',
  14. color: '#ef7a30',
  15. }" :show-icon="true"
  16. :description="'【充电SOC限制】为保障充电安全,并积极响应主管部门对新能源汽车充电安全工作,从即日起,该站充电设施SOC上限阈值为'+(stationDetail&&stationDetail.station&&stationDetail.station.maxSoc?stationDetail.station.maxSoc:'')+'%,即充电量达到满充电量'+(stationDetail&&stationDetail.station&&stationDetail.station.maxSoc?stationDetail.station.maxSoc:'')+'%时,充电设施将自动结束充电。'">
  17. </u-alert-tips>
  18. <u-notice-bar mode="vertical" font-size="36" :more-icon="true" @click="noticeShow=true"
  19. v-show="!noticeShow&&stationDetail.station&&stationDetail.station.maxSoc&&stationDetail.station.maxSoc!=100"
  20. :list="['【充电SOC限制】为保障充电安全,并积极响应主管部门对新能源汽车充电安全工作,从即日起,该站充电设施SOC上限阈值为'+(stationDetail&&stationDetail.station&&stationDetail.station.maxSoc?stationDetail.station.maxSoc:'')+'%,即充电量达到满充电量'+(stationDetail&&stationDetail.station&&stationDetail.station.maxSoc?stationDetail.station.maxSoc:'')+'%时,充电设施将自动结束充电。']">
  21. </u-notice-bar>
  22. <view class="head" v-if="stationDetail.station!=null">
  23. <img @click="previewImage(stationDetail.station.image)" v-if="stationDetail.station.image"
  24. :src="stationDetail.station.image" mode=""></img>
  25. <img v-else src="@/assets/img/chargesite_default.png" mode=""></img>
  26. </view>
  27. <!-- 站点详情 -->
  28. <view class="stationDetail">
  29. <view class="stationDetailHead">
  30. <!-- 标题 -->
  31. <view class="title">
  32. {{stationDetail.station.name}}
  33. </view>
  34. <view v-if="quickChargeReduceMethod1(stationDetail.station)&&personInfo&&personInfo.userType==2"
  35. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;">
  36. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  37. border-radius: 4px;
  38. padding: 0rpx 10rpx;
  39. margin-right: 8rpx;
  40. font-size: 24rpx;
  41. line-height:40rpx;
  42. ">活动</span>
  43. 快充订单满{{stationDetail.station.quickChargeDegree}}度服务费{{discountRatio10(stationDetail.station.quickChargeDiscountRatio)}}折
  44. </view>
  45. <view v-if="quickChargeReduceMethod2(stationDetail.station)&&personInfo&&personInfo.userType==2"
  46. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;">
  47. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  48. border-radius: 4px;
  49. padding: 0rpx 10rpx;
  50. margin-right: 8rpx;
  51. font-size: 24rpx;
  52. line-height:40rpx;
  53. ">活动</span>
  54. 喜迎国庆,充电有奖
  55. </view>
  56. <!-- 标签 -->
  57. <view class="tags sign">
  58. <view class="tags1 sign-1"
  59. v-if="station.giveDiscount&&station.discountRatio&&station.discountRatio!=100">
  60. 会员{{discountRatio10(station.discountRatio)}}折</view>
  61. <view class="tags1 sign-3" v-if="station.category=='超充'">160kW超充站</view>
  62. <view class="tags1 sign-4" v-if="stationDetail.station.nightLowPriceEnabled">
  63. 夜间超低价</view>
  64. <view class="tags1 sign-2" v-if="stationDetail.station.platformType==1">自营站</view>
  65. <view class="tags1 sign-2" v-if="stationDetail.station.tagList.length != 0"
  66. v-for="(tagName,tagIndex) in stationDetail.station.tagList"
  67. :style="'border: 1px solid '+tagNameBy(tagName,1)+';color:'+tagNameBy(tagName,1)"
  68. :key="tagIndex">{{tagNameBy(tagName,0)}}</view>
  69. </view>
  70. <u-line color="#EEF2F0" margin="24rpx 0"></u-line>
  71. <!-- 定位 -->
  72. <template v-if="stationDetail&&stationAddressList&&stationAddressList.length">
  73. <view class="position" v-for="(item ,i) in stationAddressList" :key="i">
  74. <view class="block">
  75. {{item.areaTitle}}
  76. </view>
  77. <view class="address">
  78. {{item.address}}
  79. </view>
  80. <view class="distance" @click="map(item)">
  81. <view class="distance-icon">
  82. <img src="../../../assets/img/riFill-navigation-fill@1x.png" alt="">
  83. </view>
  84. <view class="distance-text">
  85. {{item.distance!=null&&item.distance>0.1 ? item.distance.toFixed(1)+'公里':'小于100米'}}
  86. </view>
  87. </view>
  88. </view>
  89. </template>
  90. <view class="position" v-else>
  91. <view class="address">
  92. {{stationDetail.station.address}}
  93. </view>
  94. <view class="distance" @click="map()">
  95. <view class="distance-icon">
  96. <img src="../../../assets/img/riFill-navigation-fill@1x.png" alt="">
  97. </view>
  98. <view class="distance-text" v-if="stationDetail.station.distance">
  99. {{stationDetail.station.distance!=null&&stationDetail.station.distance>0.1 ? stationDetail.station.distance.toFixed(1)+'公里':'小于100米'}}
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="stationDetailBody">
  105. <!-- 充电桩类型 -->
  106. <view class="type" v-if="numShowBl">
  107. <view class="type-box" v-if="stationDetail.station.superNum" :class="{
  108. 'checked':flag=='super',
  109. numShowview2:(stationDetail.station.superNum==0||stationDetail.station.slowNum==0||stationDetail.station.fastNum-stationDetail.station.superNum==0)
  110. }" @click="flag!='super'?flag='super':flag=''">
  111. <view class="box-top">
  112. <view class="super">
  113. </view>
  114. <view class="pile-type">
  115. 直流超充
  116. </view>
  117. </view>
  118. <view class="pile-amount">
  119. <view class="super">
  120. {{stationDetail.station.superAvailableNum}}空闲
  121. </view>
  122. <view class="cut">
  123. |
  124. </view>
  125. <view class="sum">
  126. {{stationDetail.station.superNum}}总
  127. </view>
  128. </view>
  129. <!-- 尖角 -->
  130. <view class="angle" v-if="flag=='super'">
  131. </view>
  132. </view>
  133. <view class="type-box" v-if="stationDetail.station.fastNum-stationDetail.station.superNum" :class="{
  134. 'checked':flag=='fast',
  135. numShowview2:(stationDetail.station.superNum==0||stationDetail.station.slowNum==0||stationDetail.station.fastNum-stationDetail.station.superNum==0),
  136. numShowviewleft:stationDetail.station.slowNum
  137. }" @click="flag!='fast'?flag='fast':flag=''">
  138. <view class="box-top">
  139. <view class="fast">
  140. </view>
  141. <view class="pile-type">
  142. 直流快充
  143. </view>
  144. </view>
  145. <view class="pile-amount">
  146. <view class="fast">
  147. {{stationDetail.station.fastAvailableNum-stationDetail.station.superAvailableNum}}空闲
  148. </view>
  149. <view class="cut">
  150. |
  151. </view>
  152. <view class="sum">
  153. {{stationDetail.station.fastNum-stationDetail.station.superNum}}总
  154. </view>
  155. </view>
  156. <!-- 尖角 -->
  157. <view class="angle" v-if="flag=='fast'">
  158. </view>
  159. </view>
  160. <view class="type-box" v-if="stationDetail.station.slowNum" :class="{
  161. 'checked':flag=='slow',
  162. numShowview2:(stationDetail.station.superNum==0||stationDetail.station.slowNum==0||stationDetail.station.fastNum-stationDetail.station.superNum==0)
  163. }" @click="flag!='slow'?flag='slow':flag=''">
  164. <view class="box-top">
  165. <view class="slow">
  166. </view>
  167. <view class="pile-type">
  168. 交流慢充
  169. </view>
  170. </view>
  171. <view class="pile-amount">
  172. <view class="free">
  173. {{stationDetail.station.slowAvailableNum}}空闲
  174. </view>
  175. <view class="cut">
  176. |
  177. </view>
  178. <view class="sum">
  179. {{stationDetail.station.slowNum}}总
  180. </view>
  181. </view>
  182. <!-- 尖角 -->
  183. <view class="angle" v-if="flag=='slow'">
  184. </view>
  185. </view>
  186. </view>
  187. <!-- 充电桩状态 -->
  188. <view class="pile-state">
  189. <view v-if="quickChargeReduceMethod1(stationDetail.station)&&personInfo&&personInfo.userType==2"
  190. style="margin-bottom: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;">
  191. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  192. border-radius: 4px;
  193. padding: 0rpx 10rpx;
  194. margin-right: 8rpx;
  195. font-size: 24rpx;
  196. line-height:40rpx;
  197. ">活动</span>
  198. 快充订单满{{stationDetail.station.quickChargeDegree}}度服务费{{discountRatio10(stationDetail.station.quickChargeDiscountRatio)}}折
  199. </view>
  200. <view v-if="quickChargeReduceMethod2(stationDetail.station)&&personInfo&&personInfo.userType==2"
  201. style="margin-bottom: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;">
  202. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  203. border-radius: 4px;
  204. padding: 0rpx 10rpx;
  205. margin-right: 8rpx;
  206. font-size: 24rpx;
  207. line-height:40rpx;
  208. ">活动</span>
  209. 喜迎国庆,充电有奖
  210. </view>
  211. <!-- 总计 -->
  212. <view class="statistics">
  213. <view class="free">
  214. {{pilestate.num1}} 空闲
  215. </view>
  216. <view class="cut">
  217. |
  218. </view>
  219. <view class="busy">
  220. {{pilestate.num2}} 占用
  221. </view>
  222. <view class="cut">
  223. |
  224. </view>
  225. <view class="malfunction">
  226. {{pilestate.num3}}故障
  227. </view>
  228. </view>
  229. <!-- 充电枪详情 -->
  230. <view class="gun-details">
  231. <view class="item" v-for="(item,index) in stationDetailDevices" v-show="getShow(item)" @click="test(item)"
  232. :key="index">
  233. <view v-if="item.deviceAddressShow==1" class="deviceAddressShow deviceAddressShow1">
  234. <img src="@/assets/img/9-4/标题装饰左.svg">
  235. {{item.showTitle}}
  236. <img src="@/assets/img/9-4/标题装饰右.svg">
  237. </view>
  238. <view v-if="item.deviceAddressShow==2" class="deviceAddressShow deviceAddressShow2">
  239. <img src="@/assets/img/9-4/标题装饰左.svg">
  240. {{item.showTitle}}
  241. <img src="@/assets/img/9-4/标题装饰右.svg">
  242. </view>
  243. <view class="itemShowOpen">
  244. <view class="itemView">
  245. <!-- 充电桩状态 -->
  246. <view class="state" v-if="item.device.online" :class="{
  247. //预约
  248. 'charging a ':item.enableShare&&!item.enableShareWithinTime&&item.device.online,
  249. 'charging b ':item.enableShare&&item.workStatus!=0,
  250. 'charging c ':item.workStatus==2,
  251. //插枪
  252. 'off-line a ':(item.workStatus == 0&&item.insertStatus&&stationDetail.station.stationType!=50),
  253. 'off-line b':item.isRed&&item.workStatus!=2,
  254. }">
  255. <view class="state-icon">
  256. <img src="../../../assets/img/pileIcon.svg" alt="">
  257. </view>
  258. <view class="state-text"
  259. v-if="item.workStatus == 0&&item.insertStatus&&stationDetail.station.stationType!=50">
  260. 已插枪
  261. </view>
  262. <view class="state-text" v-else>
  263. <span v-if="item.workStatusText.length<4">{{item.workStatusText}}</span>
  264. <span v-else-if="item.workStatusText.length==4"
  265. style=" display: flex; flex-direction: column;">
  266. <span>{{item.workStatusText.substring(0,2)}}</span>
  267. <span>{{item.workStatusText.substring(2)}}</span>
  268. </span>
  269. <span v-else>{{item.workStatusText}}</span>
  270. </view>
  271. </view>
  272. <view class="state off-line" style="width: 96rpx;" v-else>
  273. <view class="state-icon">
  274. <img src="../../../assets/img/pileIcon.svg" alt="">
  275. </view>
  276. <view class="state-text ">
  277. 离线
  278. </view>
  279. </view>
  280. <!-- 详细信息 -->
  281. <view class="infos">
  282. <view class="gun-name">
  283. <span
  284. v-if="item.sortNo">{{item.sortNo}}号<text>/</text></span>{{item.device.name}}{{item.device.gunList.length>1?'枪'+channelNoShow(item.channelNo,item.device.manufacturer,item.customNo):''}}
  285. </view>
  286. <groupItem v-if="!item.device.groupName"
  287. :item="item" :openlist="openlist" @setOpen="setOpen" ></groupItem>
  288. </view>
  289. </view>
  290. <view>
  291. <template
  292. v-if="!item.isRed&&item.enableShare&&item.enableShareWithinTime&&item.device.online">
  293. <!-- 充电按钮 -->
  294. <view class="charge" v-if="!enableAppointmentBl(item)"
  295. @click="book(item,item.isAppointment&&!item.insertStatus)"
  296. :class="item.isAppointment&&!item.insertStatus?'':'not-open-tag'">
  297. 预约
  298. </view>
  299. <!-- 充电按钮 -->
  300. <view class="charge"
  301. :style="item.haveLock?'background-color:#009ED7;':''"
  302. @click="book2(item,item.enableShare&&item.enableShareWithinTime)" :class="{
  303. 'not-open-tag':!(item.enableShare&&item.enableShareWithinTime),
  304. 'not-enable-Appointment':enableAppointmentBl(item)
  305. }">
  306. {{item.haveLock&&item.lockStatus==1?'下降地锁':'充电'}}
  307. </view>
  308. </template>
  309. <!-- 电量 -->
  310. <view class="electric-quantity" v-if="item.workStatus == 2 ">
  311. <img src="../../../assets/img/electricQuantity.svg" alt="">
  312. <view class="" v-if="true" :class="{
  313. percentage:item.soc,
  314. percentage2:!item.soc
  315. }">
  316. {{item.soc?item.soc+'%':'充电中'}}
  317. </view>
  318. <view v-else class="percentage2">
  319. 充电中
  320. </view>
  321. </view>
  322. <view class="parkingNo" v-if="item.parkingNo&&!item.device.groupName" >
  323. 车位号:{{item.parkingNo}}
  324. </view>
  325. </view>
  326. </view>
  327. <view class="item-tip" v-if="item.device.groupName">
  328. <groupItem :item="item" :openlist="openlist" @setOpen="setOpen" ></groupItem>
  329. </view>
  330. <view class="open-time" v-show="openlist&&openlist.get(item.id)">
  331. <table>
  332. <tr v-if="pricesInfoCurrent">
  333. <td colspan="2">当前电价:
  334. <b style="color:#080808;margin-left: 4px;"
  335. v-if="(station&&station.giveDiscount||pricesInfoCurrent2.discountServicePrice)&&(!personInfo||personInfo.userType==1)">{{((pricesInfoCurrent.servicePrice*1000+pricesInfoCurrent.electricityPrice*1000)/1000).toFixed(2)}}元/度</b>
  336. <b v-else
  337. style="color:#080808;margin-left: 4px;">{{pricesInfoCurrent.costPrice.toFixed(2)}}元/度</b>
  338. </td>
  339. </tr>
  340. <tr v-if="item.device.deviceAddress">
  341. <td colspan="2">充电桩地址:
  342. <span style=" margin-left: 4px;">{{item.device.deviceAddress}}</span>
  343. </td>
  344. </tr>
  345. <tr>
  346. <td>开放充电时段:</td>
  347. <td
  348. v-if="!item.enableShare||!(item.sharedWeekSettingList&&item.sharedWeekSettingList.length)">
  349. 充电功能未开放</td>
  350. <template v-else v-for="(time,index) in item.sharedWeekSettingList">
  351. <td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
  352. </template>
  353. </tr>
  354. <template v-if="item.enableShare"
  355. v-for="(time,index) in item.sharedWeekSettingList">
  356. <tr :key="index" v-if="index==1">
  357. <td></td>
  358. <td>{{time.startTime}}-{{time.endTime}}</td>
  359. </tr>
  360. </template>
  361. <tr>
  362. <td>开放预约时段:</td>
  363. <td v-if="enableAppointmentBl(item)">
  364. 预约功能未开放
  365. </td>
  366. <template v-else v-for="(time,index) in item.reserveWeekSettingList">
  367. <td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
  368. </template>
  369. </tr>
  370. <template v-if="item.enableAppointment"
  371. v-for="(time,index) in item.reserveWeekSettingList">
  372. <tr :key="index" v-if="index==1">
  373. <td></td>
  374. <td>{{time.startTime}}-{{time.endTime}}</td>
  375. </tr>
  376. </template>
  377. </table>
  378. </view>
  379. </view>
  380. </view>
  381. </view>
  382. <!-- 价格信息 -->
  383. <view class="price-infos" v-if="pricesInfoCurrent2">
  384. <view class="title">
  385. 价格信息<text>({{pricesInfoCurrent.startTime==pricesInfoCurrent2.startTime?'当前时段 ':''}}{{pricesInfoCurrent2.startTime}}-{{pricesInfoCurrent2.endTime}})</text>
  386. </view>
  387. <view class="classify"
  388. v-if="(!personInfo||personInfo.userType==1)&&station&&(station.giveDiscount||(pricesInfoCurrent2.discountServicePrice))">
  389. <view class="item item-visitor">
  390. <view class="visitor">
  391. 充电价格
  392. </view>
  393. <view class="unit-price">
  394. <text>{{(pricesInfoCurrent2.servicePrice+pricesInfoCurrent2.electricityPrice).toFixed(2)}}</text>
  395. <text class="unit">元/度</text>
  396. </view>
  397. </view>
  398. <view class="item item-member">
  399. <view class="visitor">
  400. 会员价
  401. </view>
  402. <view class="unit-price">
  403. <text>{{pricesInfoCurrent2.costPrice.toFixed(2)}}</text>
  404. <text class="unit">元/度</text>
  405. <text class="register" @click="gotoUrl('pages/login/login')">注册</text>
  406. </view>
  407. </view>
  408. </view>
  409. <view class="classify" v-else-if="stationDetail.station&&stationDetail.station.tagList&&
  410. (stationDetail.station.tagList.indexOf('月卡')!=-1
  411. ||stationDetail.station.tagList.indexOf('6折卡')!=-1
  412. ||stationDetail.station.tagList.indexOf('自营站')!=-1)">
  413. <view class="item item-member-vip">
  414. <view class="visitor">
  415. 充电价格
  416. </view>
  417. <view class="unit-price">
  418. <text>{{pricesInfoCurrent2.costPrice.toFixed(2)}}</text>
  419. <text class="unit">元/度</text>
  420. </view>
  421. <view class="unit-price2"
  422. v-if="(personInfo&&personInfo.userType==2)&&(station.giveDiscount||(pricesInfoCurrent2.discountServicePrice))">
  423. 原价:{{(pricesInfoCurrent2.electricityPrice+pricesInfoCurrent2.servicePrice).toFixed(2)}}元/度
  424. </view>
  425. </view>
  426. <view class="item item-vip" v-if="userId&&userCardBool&&userCard.classify==1">
  427. <view class="visitor">
  428. 折扣卡会员价
  429. </view>
  430. <view class="unit-price">
  431. <text>{{(pricesInfoCurrent2.electricityPrice).toFixed(2)}}</text>
  432. <text class="unit">元/度</text>
  433. <view class="unit-price3">
  434. 已开通
  435. </view>
  436. </view>
  437. </view>
  438. <view class="item " v-if="!userCardBool" :class="{
  439. 'item-vip2':prevMonthKwhBL,
  440. 'item-vip':!prevMonthKwhBL
  441. }">
  442. <template v-if="prevMonthKwhBL">
  443. <view class="visitor">
  444. 6折卡会员价
  445. </view>
  446. <view class="unit-price">
  447. <text>{{showNumJP(pricesInfoCurrent2.electricityPrice+(pricesInfoCurrent2.servicePrice*0.6))}}</text>
  448. <text class="unit">元/度</text>
  449. <text class="register"
  450. @click="gotoUrl('pages/discountCard/productDetails')">开通</text>
  451. </view>
  452. </template>
  453. <template v-else>
  454. <view class="visitor">
  455. 月卡价格
  456. </view>
  457. <view class="unit-price">
  458. <text>{{(pricesInfoCurrent2.electricityPrice).toFixed(2)}}</text>
  459. <text class="unit">元/度</text>
  460. <text class="register" v-if="userId&&!userCardBool"
  461. @click="gotoUrl('pages/monthlyCardActivity/monthlyCardBuy')">开通</text>
  462. <text class="register" v-if="userId&&userCardBool">
  463. 已开通
  464. </text>
  465. </view>
  466. </template>
  467. </view>
  468. <view class="item item-vip3" :class="{
  469. 'discount-card-4':userCard.cardType==4
  470. }" v-if="userId&&userCardBool&&userCard.classify==2">
  471. <view class="visitor" v-if="userCard.cardType==4">
  472. {{userCard.monthlyRentName}}
  473. </view>
  474. <view class="visitor" v-else>
  475. 服务费{{userCard.serviceFeeDiscountRate/10}}折卡会员价
  476. </view>
  477. <view class="unit-price">
  478. <view class="unit"><span>{{thisendTime(userCard.endTime)}} 到期</span></view>
  479. <view class="unit" v-if="userCard.chargeDegreeLimit">
  480. <span>已用{{userCard.chargedDegree?userCard.chargedDegree.toFixed(0):0.00}}度 /
  481. 共{{userCard.chargeDegreeLimit}}度</span></view>
  482. <view class="unit" v-if="userCard.chargeDegreeLimit==0&&userCard.saveInformation">
  483. <span>已用{{userCard.saveInformation.num}}次 /
  484. 共省{{userCard.saveInformation.saveMoney}}元</span>
  485. </view>
  486. <u-line-progress :show-percent="false" active-color="#2979ff"
  487. :percent="thispercent(userCard)"></u-line-progress>
  488. </view>
  489. </view>
  490. </view>
  491. <view class="classify" v-else>
  492. <view class="item item-member-all">
  493. <view class="visitor">
  494. 充电价格
  495. </view>
  496. <view class="unit-price">
  497. <text>{{pricesInfoCurrent2.costPrice.toFixed(2)}}</text>
  498. <text class="unit">元/度</text>
  499. </view>
  500. <view class="unit-price2"
  501. v-if="(personInfo&&personInfo.userType==2)&&(station.giveDiscount||(pricesInfoCurrent2.discountServicePrice))">
  502. 原价:{{(pricesInfoCurrent2.electricityPrice+pricesInfoCurrent2.servicePrice).toFixed(2)}}元/度
  503. </view>
  504. </view>
  505. </view>
  506. <!-- 提示 -->
  507. <p class="hint">*该价格为含服务费价格,实际价格以扫码价格为准。</p>
  508. <!-- 表格 -->
  509. <view class="chat-box" v-if="pricesInfoCurrent2.electricityPrice">
  510. <view class="chat-infos">
  511. <view class="item">
  512. <view class="name">
  513. <view class="icon icon1">
  514. </view>
  515. <view class="text">
  516. 时段
  517. </view>
  518. </view>
  519. <view class="value">
  520. {{pricesInfoCurrent2.startTime}}-{{pricesInfoCurrent2.endTime}}
  521. </view>
  522. </view>
  523. <view class="item">
  524. <view class="name">
  525. <view class="icon icon2">
  526. </view>
  527. <view class="text">
  528. 电价
  529. </view>
  530. </view>
  531. <view class="value">
  532. {{pricesInfoCurrent2.electricityPrice.toFixed(2)}}元/度
  533. </view>
  534. </view>
  535. <view class="item" style="margin-bottom:0">
  536. <view class="name">
  537. <view class="icon icon3">
  538. </view>
  539. <view class="text">
  540. 服务费
  541. </view>
  542. </view>
  543. <view class="value" v-if="station">
  544. <span
  545. v-if="(personInfo&&personInfo.userType==2)&&(station.giveDiscount||(pricesInfoCurrent2.discountServicePrice))">
  546. {{pricesInfoCurrent2.discountServicePrice.toFixed(2)}}元/度
  547. </span>
  548. <span v-else>{{pricesInfoCurrent2.servicePrice.toFixed(2)}}元/度</span>
  549. </view>
  550. </view>
  551. <view class="item"
  552. v-if="(personInfo&&personInfo.userType==2)&&station&&(station.giveDiscount||(pricesInfoCurrent2.discountServicePrice))">
  553. <view class="name">
  554. <view class=" ">
  555. </view>
  556. <view class="text">
  557. </view>
  558. </view>
  559. <view class="value value2">
  560. <span>(原价:{{pricesInfoCurrent2.servicePrice.toFixed(2)}}元/度)</span>
  561. </view>
  562. </view>
  563. </view>
  564. </view>
  565. <view class="chat_hhh" v-if="pricesInfoCurrent2.electricityPrice">
  566. <view class="chatTime" v-for="(item,i) in pricesInfo" :style="'width:'+getW(item)" :key="i"
  567. :class="{
  568. current1: pricesInfoCurrent.startTime==item.startTime,
  569. current2: pricesInfoCurrent2.startTime==item.startTime,
  570. }" @click="pricesInfoCurrent2=item">
  571. <template v-if="station">
  572. <template
  573. v-if="(personInfo&&personInfo.userType==2)&&(station.giveDiscount||(item.discountServicePrice))">
  574. <span class="chats1"
  575. :style="'height:'+getH(item.discountServicePrice)">{{item.discountServicePrice}}</span>
  576. </template>
  577. <template v-else>
  578. <span class="chats1"
  579. :style="'height:'+getH(item.servicePrice)">{{item.servicePrice}}</span>
  580. </template>
  581. </template>
  582. <span class="chats2" :style="'height:'+getH(item.electricityPrice)">
  583. <span>{{item.electricityPrice}}</span>
  584. <span class="chats0" v-if="pricesInfoCurrent.startTime==item.startTime">
  585. <span>当前</span>
  586. <span>时段</span>
  587. </span>
  588. <span class="chats9" v-else>
  589. <span>当前</span>
  590. <span>时段</span>
  591. </span>
  592. </span>
  593. </view>
  594. </view>
  595. <view class="chat_hhh_time" v-if="pricesInfoCurrent2.electricityPrice">
  596. <span>00:00</span>
  597. <span>12:00</span>
  598. <span>24:00</span>
  599. </view>
  600. </view>
  601. <!-- 附加信息 -->
  602. <view class="overhead-infos"
  603. v-if="stationDetail&&(stationDetail.station.describe||stationDetail.station.parkingDescription)">
  604. <view class="item" v-if="stationDetail.station.describe">
  605. <view class="title">
  606. 营业时间
  607. </view>
  608. <view class="value">
  609. {{stationDetail.station.describe}}<text></text>
  610. </view>
  611. </view>
  612. <u-line margin="24rpx 0 " color="#F0F0F2"></u-line>
  613. <view class="item" v-if="stationDetail.station.parkingDescription">
  614. <view class="title">
  615. 停车费
  616. </view>
  617. <view class="value"
  618. @click="()=>{if(stationDetail.station.parkingSimpleDescription){parkingTips=true}}">
  619. {{stationDetail.station.parkingDescription}}
  620. <text v-if="stationDetail.station.parkingSimpleDescription"><u-icon name="arrow-right"
  621. color="#999999" size="28"></u-icon></text>
  622. </view>
  623. </view>
  624. </view>
  625. </view>
  626. </view>
  627. <u-modal v-model="parkingTips" title="新能源汽车停车费说明" :title-style="{fontSize: '40rpx'}" confirm-text="知道了"
  628. confirm-color="#53b56b">
  629. <view style="padding: 15px;" v-html="stationDetail.station.parkingSimpleDescription"></view>
  630. </u-modal>
  631. <u-modal v-model="show" confirm-text="去看空闲桩" cancel-text="查看处罚规则" confirm-color="#00B962">
  632. <view class="" style="padding: 15px 20px;">
  633. 因您近期存在预约超时未前往充电的违约行为,平台为保证每位车主的合理权益,
  634. 对您作出停用预约充电功能1天的处罚。
  635. 您可于<span style="color: #00b962;">2022年6月20日09时45分</span>后使用此功能。
  636. </view>
  637. </u-modal>
  638. <u-modal v-model="openModalBl" @confirm="confirmPhoneBl" confirm-text="拨打电话" confirm-color="#606266"
  639. :show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="consumerPhone"
  640. :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
  641. </view>
  642. </template>
  643. <script>
  644. import * as indexAPI from '@/apis/index.js'
  645. import * as WxJsApi from '@/utils/wxJsApi.js'
  646. import MapLoader from '@/utils/AMap'
  647. import * as API from '@/apis/chargeProcess.js'
  648. import * as api from "@/apis/site.js"
  649. let _self;
  650. import {
  651. newDate,
  652. parseUnixTime,daysDistance
  653. } from '@/utils'
  654. import groupItem from '@/components/GroupItem.vue'
  655. export default {
  656. components: {
  657. groupItem
  658. },
  659. data() {
  660. return {
  661. openModalBl: false,
  662. showNt: false,
  663. showNtStep: 0,
  664. showNtValue: 30,
  665. pricesInfoCurrent: null,
  666. pricesInfoCurrent2: null,
  667. noticeShow: false,
  668. parkingTips: false,
  669. stationId: '',
  670. pricesInfo: [],
  671. devicesId: '',
  672. elderMode: false,
  673. userId: '',
  674. userCard: null,
  675. show: false,
  676. showtips: true,
  677. list: [{
  678. "name": "充电桩"
  679. },
  680. {
  681. "name": "价格说明"
  682. }
  683. ],
  684. current: 0,
  685. currentPos: {
  686. /* name:'荆鹏软件园充电站',
  687. longitude: 112.28468,
  688. latitude: 30.307094,*/
  689. },
  690. stationAddressList: [],
  691. station: {},
  692. stationDetail: {
  693. devices: [],
  694. slowPrice: null,
  695. station: {},
  696. fastPrice: null
  697. },
  698. openlist: null,
  699. personInfo: null,
  700. consumerPhone: "",
  701. info: {
  702. station: {
  703. time: '周一到周日 07:00~22:00(节假日除外)',
  704. /* id:1,
  705. name:'荆鹏软件园充电站',
  706. longitude: 112.28468,
  707. latitude: 30.307094,
  708. type:'交流慢充',
  709. distance:0.1,
  710. address:'湖北省荆州市沙市区江津东路附155号'*/
  711. },
  712. prices: [
  713. ],
  714. park: {
  715. price: '2小时免费停车'
  716. },
  717. uuid: '',
  718. setIntervalBool: true,
  719. priceList: [],
  720. platform: '',
  721. personInfo: {},
  722. consumerPhone: "",
  723. devices: {
  724. idleNum: 1,
  725. total: 6,
  726. items: [
  727. ]
  728. },
  729. },
  730. carImg3span1: 0,
  731. carImg3span2: 0,
  732. canUse: false,
  733. flag: "",
  734. pilestate: {}
  735. }
  736. },
  737. onLoad(op) {
  738. uni.getSystemInfo({
  739. success: (res) => {
  740. // console.log("----------")
  741. // console.log(res.platform)
  742. this.platform = res.platform
  743. }
  744. })
  745. _self = this;
  746. // document.getElementsByTagName('body')[0].style.setProperty('--mode',1)
  747. if (op.jg == '1') {
  748. this.current = 1;
  749. }
  750. if (op != null) {
  751. if (op.id != null && op.id != undefined) {
  752. this.stationId = op.id;
  753. this.getPriceList(op.id)
  754. this.getChargingStationDetail()
  755. }
  756. }
  757. },
  758. onHide() {
  759. this.setIntervalBool = false
  760. if (this.uuid) {
  761. clearInterval(this.uuid)
  762. this.uuid = '';
  763. }
  764. },
  765. onShow() {
  766. this.setIntervalBool = true
  767. if (!this.uuid) {
  768. this.uuid = setInterval(() => {
  769. if (this.setIntervalBool) {
  770. this.getChargingStationDetail(true)
  771. }
  772. }, 5 * 1000)
  773. }
  774. if (this.carhelp.getPersonInfo()) {
  775. this.getHomePage()
  776. }
  777. //this.getHomePage()
  778. },
  779. onUnload() {
  780. if (this.uuid) {
  781. clearInterval(this.uuid)
  782. }
  783. },
  784. onReady() {
  785. var consumerPhone = "400-8899-619"
  786. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  787. if (consumerPhone) {
  788. this.consumerPhone = consumerPhone
  789. }
  790. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  791. if (this.elderMode)
  792. this.theme('elder')
  793. else
  794. this.theme('standard')
  795. if (this.carhelp.getPersonInfo()) {
  796. this.userId = this.carhelp.getPersonInfo().id;
  797. this.personInfo = this.carhelp.getPersonInfo()
  798. //this.userCard = this.carhelp.getPersonInfoPlus().userCard
  799. this.getHomePage()
  800. }
  801. WxJsApi.getWxConfig(['getLocation', 'openLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  802. // //(res)
  803. }).catch(error => {
  804. //(res)
  805. })
  806. },
  807. computed: {
  808. prevMonthKwhBL() {
  809. if (this.carImg3span1 >= 1000) {
  810. return false
  811. }
  812. return true
  813. },
  814. userCardBool() {
  815. if (this.userCard) {
  816. var date = new Date().getTime()
  817. var reg = new RegExp('-', 'gi')
  818. var str = this.userCard.endTime;
  819. //console.log(str.replace(reg,'/'))
  820. var date2 = newDate(str).getTime();
  821. if (date < date2) {
  822. return true;
  823. }
  824. }
  825. return false
  826. },
  827. numShowBl() {
  828. //true tab false line
  829. var superNum = this.stationDetail.station.superNum;
  830. var fastNumZ = this.stationDetail.station.fastNum;
  831. var fastNum = fastNumZ - superNum;
  832. var slowNum = this.stationDetail.station.slowNum;
  833. if (superNum && fastNum == 0 && slowNum == 0) {
  834. return false
  835. }
  836. if (fastNum && superNum == 0 && slowNum == 0) {
  837. return false
  838. }
  839. if (slowNum && fastNum == 0 && superNum == 0) {
  840. return false
  841. }
  842. return true;
  843. },
  844. stationDetailDevices() {
  845. var sz = [];
  846. for (var i in this.stationDetail.devices) {
  847. var item = this.stationDetail.devices[i]
  848. for (var j in item.gunList) {
  849. var gun = item.gunList[j]
  850. gun.device = item;
  851. //gun.parkingNo="123"
  852. sz.push(gun);
  853. }
  854. }
  855. sz = sz.sort(function(it1, it2) {
  856. if (!it2.device.online) {
  857. return -1
  858. }
  859. var i = 1;
  860. if (it1.device.online) {
  861. i = 1
  862. }
  863. if (it1.enableShare && !it1.enableShareWithinTime) {
  864. i = 1
  865. }
  866. i = it1.workStatus == 0 ? -1 : 1
  867. if (it2.workStatus == 0) {
  868. i = 1
  869. }
  870. if (!it2.enableShare || it2.enableShare && !it2.enableShareWithinTime) {
  871. i = -1
  872. }
  873. //console.log(it1,i)
  874. return i
  875. })
  876. var addis = ""
  877. var showIng = true
  878. if (this.flag == '' && this.stationAddressList && this.stationAddressList.length > 1) {
  879. sz.forEach(item => {
  880. item.deviceAddressShow = 0
  881. if (item.workStatus == 0) {
  882. if (item.device.deviceAddress != addis && item.device.deviceAddress) {
  883. addis = item.device.deviceAddress
  884. item.deviceAddressShow = 1
  885. item.showTitle = addis
  886. }
  887. } else {
  888. if (showIng) {
  889. showIng = false
  890. item.deviceAddressShow = 2
  891. item.showTitle = "其他状态"
  892. }
  893. }
  894. })
  895. }
  896. return sz
  897. }
  898. },
  899. watch: {
  900. flag(b) {
  901. this.pilestate = this.getpilestate()
  902. }
  903. },
  904. methods: {
  905. getChargeList() {
  906. var obj = this.carhelp.get("carhelp_getChargeList")
  907. var time = new Date().toLocaleString().substr(0, 12).replace("T", " ");
  908. if (obj && time == obj.time) {
  909. this.carImg3span1 = parseInt(obj.electricQuantity);
  910. this.carImg3span2 = parseInt(obj.totalServiceMoney);
  911. console.log("carhelp_getChargeList", this.carImg3span1, this.carImg3span2)
  912. return
  913. }
  914. var date = new Date().getTime() - 30 * 1000 * 60 * 60 * 24;
  915. var startDate = parseUnixTime(new Date(date), '{y}-{m}-{d}');
  916. if (this.carhelp.getPersonInfo() || this.userId) {
  917. indexAPI.chargingRecordData({
  918. pageIndex: 1,
  919. pageSize: 999,
  920. startDate: startDate,
  921. // endDate: this.endDate
  922. }).then((res) => {
  923. var chargeList = res.data.data;
  924. var num1 = 0;
  925. var num2 = 0;
  926. for (var i in chargeList) {
  927. var obj = chargeList[i]
  928. if (obj.status == 2) {
  929. num1 += obj.electricQuantity
  930. num2 += obj.totalServiceMoney
  931. }
  932. }
  933. console.log(num1, num2)
  934. this.carImg3span1 = parseInt(num1);
  935. this.carImg3span2 = parseInt(num2);
  936. this.carhelp.set("carhelp_getChargeList", {
  937. time: time,
  938. electricQuantity: num1,
  939. totalServiceMoney: num2
  940. })
  941. // if(num2*0.4>20){
  942. // this.carImg3Bl=true;
  943. // }else{
  944. // this.carImg4Bl=true;
  945. // }
  946. }).catch(error => {
  947. uni.showToast({
  948. title: error,
  949. icon: "none"
  950. })
  951. })
  952. }
  953. },
  954. getHomePage() {
  955. uni.showLoading({
  956. title: "加载中",
  957. mask: true,
  958. })
  959. API.userCard({
  960. stationId: this.stationId
  961. }).then((res) => {
  962. console.log(res)
  963. this.userCard = res.data.regUserCard
  964. this.canUse = res.data.canUse
  965. // if(this.canUse){
  966. // this.userCard=res.data.regUserCard
  967. // }
  968. uni.hideLoading()
  969. if (!this.userCardBool && !this.carImg3span1) {
  970. this.getChargeList()
  971. }
  972. }).catch(error => {
  973. uni.showToast({
  974. title: error
  975. })
  976. })
  977. },
  978. thisendTime(endTime) {
  979. if (endTime) {
  980. var reg = new RegExp('-', 'gi')
  981. var str = endTime.substring(0, 10).replace(reg, '.')
  982. return str
  983. }
  984. return ''
  985. },
  986. thisdaysDistance(endTime) {
  987. var date = new Date()
  988. var date2 = newDate(endTime);
  989. return daysDistance(date, date2)
  990. },
  991. thispercent(userCard) {
  992. if(userCard.classify==1||(userCard.classify==2&&userCard.chargeDegreeLimit==0)){
  993. var k1=daysDistance(userCard.startTime, userCard.endTime)
  994. var k2=this.thisdaysDistance(userCard.endTime)
  995. var p=(k1-k2)/k2* 100
  996. if (p > 100) {
  997. p = 100
  998. }
  999. return p.toFixed(0)
  1000. }else if(userCard.classify==2){
  1001. var p = 0
  1002. if (userCard && userCard.chargeDegreeLimit) {
  1003. p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
  1004. }
  1005. if (p > 100) {
  1006. p = 100
  1007. }
  1008. return p.toFixed(0)
  1009. }else{
  1010. return 0
  1011. }
  1012. },
  1013. getpilestate() {
  1014. var num1 = 0
  1015. var num2 = 0
  1016. var num3 = 0
  1017. for (var i in this.stationDetailDevices) {
  1018. var item = this.stationDetailDevices[i]
  1019. if (this.getShow(item)) {
  1020. if (item.isRed && item.workStatus != 2 || !item.device.online) {
  1021. num3++
  1022. } else if (item.workStatusText == '空闲中') {
  1023. num1++
  1024. } else {
  1025. num2++
  1026. }
  1027. }
  1028. }
  1029. return {
  1030. num1: num1,
  1031. num2: num2,
  1032. num3: num3
  1033. }
  1034. },
  1035. getShow(item) {
  1036. if (this.flag == '') {
  1037. return true
  1038. } else if (this.flag == 'super' && item.device.chargingType == '超充') {
  1039. return true
  1040. } else if (this.flag == 'fast' && item.device.chargingType == '快充') {
  1041. return true
  1042. } else if (this.flag == 'slow' && item.device.chargingType == '慢充') {
  1043. return true
  1044. } else {
  1045. return false
  1046. }
  1047. },
  1048. getH(item) {
  1049. return item * 100 + 'px'
  1050. },
  1051. getW(item) {
  1052. var t1 = item.endTime.substring(0, 2)
  1053. var t2 = item.startTime.substring(0, 2)
  1054. var k = parseInt(t1) - parseInt(t2);
  1055. return 100 / 24 * k + "%"
  1056. },
  1057. changeFlag() {
  1058. this.flag = !this.flag
  1059. },
  1060. enableAppointmentBl(item) {
  1061. if (!this.personInfo || this.personInfo.memberLevel != 4) {
  1062. return true
  1063. }
  1064. return (!item.enableAppointment || !(item.reserveWeekSettingList && item.reserveWeekSettingList.length));
  1065. },
  1066. confirmPhoneBl() {
  1067. this.openModalBl = false;
  1068. uni.makePhoneCall({
  1069. phoneNumber: this.consumerPhone //仅为示例
  1070. });
  1071. },
  1072. confirmPhone() {
  1073. if (this.stationDetail.station && this.stationDetail.station.contactPhone) {
  1074. uni.makePhoneCall({
  1075. phoneNumber: this.stationDetail.station.contactPhone //仅为示例
  1076. });
  1077. }
  1078. },
  1079. getChargingStationDetail(bl) {
  1080. if (!this.stationId) {
  1081. return false
  1082. }
  1083. var _self = this;
  1084. if (!bl) {
  1085. uni.showLoading({
  1086. })
  1087. }
  1088. let data = {
  1089. stationId: this.stationId
  1090. };
  1091. var distance = null;
  1092. if (bl && this.stationDetail && this.stationDetail.station) {
  1093. distance = this.stationDetail.station.distance
  1094. //防止重新获取定位
  1095. }
  1096. api.getChargingStationDetail(data).then(function(res) {
  1097. uni.hideLoading()
  1098. if (res && res.result && res.data) {
  1099. let data = res.data;
  1100. _self.stationDetail = data;
  1101. //console.log(data)
  1102. if (_self.stationDetail.station.contactPhone) {
  1103. _self.consumerPhone = _self.stationDetail.station.contactPhone
  1104. }
  1105. if (_self.stationAddressList.length == 0) {
  1106. _self.stationAddressList = _self.stationDetail.stationAddressList
  1107. }
  1108. if (_self.stationDetail.station.parkingDescription != null && _self.stationDetail.station
  1109. .parkingSimpleDescription != null) {
  1110. var tagList = _self.stationDetail.station.tagList;
  1111. for (var i = 0; i < tagList.length; i++) {
  1112. if (tagList[i] == _self.stationDetail.station.parkingDescription) {
  1113. tagList.splice(i, 1);
  1114. }
  1115. }
  1116. _self.stationDetail.station.tagList = tagList;
  1117. }
  1118. if (distance) {
  1119. _self.stationDetail.station.distance = distance
  1120. }
  1121. var totalNum = 0;
  1122. // _self.stationDetail.station.chargingType1=0;
  1123. // _self.stationDetail.station.chargingType2=0;
  1124. // _self.stationDetail.station.chargingType3=0;
  1125. // _self.stationDetail.station.chargingType1run=0;
  1126. // _self.stationDetail.station.chargingType2run=0;
  1127. // _self.stationDetail.station.chargingType3run=0;
  1128. // for(var i in _self.stationDetail.devices ){
  1129. // var device=_self.stationDetail.devices[i]
  1130. // var keyset="";
  1131. // if(device.chargingType=='超充'){
  1132. // keyset="chargingType1";
  1133. // }
  1134. // if(device.chargingType=='快充'){
  1135. // keyset="chargingType2";
  1136. // }
  1137. // if(device.chargingType=='慢充'){
  1138. // keyset="chargingType3";
  1139. // }
  1140. // for (let j = 0; j < device.gunList.length; j++) {
  1141. // if(device.gunList[j].workStatus==0){
  1142. // _self.stationDetail.station[keyset+"run"]++;
  1143. // }
  1144. // _self.stationDetail.station[keyset]++;
  1145. // }
  1146. // }
  1147. if (_self.openlist == null) {
  1148. _self.openlist = new Map();
  1149. for (var i in _self.stationDetail.devices) {
  1150. var device = _self.stationDetail.devices[i]
  1151. totalNum += device.gunList.length
  1152. for (let j = 0; j < device.gunList.length; j++) {
  1153. _self.openlist.set(device.gunList[j].id, false);
  1154. }
  1155. //console.log(_self.stationDetail.station)
  1156. }
  1157. _self.list[0].name = "充电桩(" + totalNum + ")"
  1158. }
  1159. if (_self.stationDetail.station.distance == null && !bl) {
  1160. _self.getPoint();
  1161. }
  1162. _self.pilestate = _self.getpilestate()
  1163. }
  1164. })
  1165. },
  1166. setOpen(item) {
  1167. var obj = this.openlist.get(item.id)
  1168. if (obj) {
  1169. obj = false;
  1170. } else {
  1171. obj = true
  1172. }
  1173. this.openlist.set(item.id, obj)
  1174. this.$forceUpdate()
  1175. },
  1176. change(index) {
  1177. this.current = index;
  1178. this.items = this.list[index].items;
  1179. },
  1180. previewImage(img) {
  1181. let imgs = [];
  1182. imgs.push(img);
  1183. uni.previewImage({
  1184. urls: imgs,
  1185. current: 0
  1186. })
  1187. },
  1188. book2(item, bl) {
  1189. if (bl) {
  1190. } else {
  1191. return
  1192. }
  1193. uni.navigateTo({
  1194. url: '/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id=' + item.gunNo,
  1195. })
  1196. ////('book'+JSON.stringify(item))
  1197. },
  1198. test(item) {
  1199. return
  1200. if (process.env.NODE_ENV === "development") {
  1201. uni.navigateTo({
  1202. url: '/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id=' + item.gunNo,
  1203. })
  1204. }
  1205. ////('book'+JSON.stringify(item))
  1206. },
  1207. book(item, bl) {
  1208. if (bl) {
  1209. } else {
  1210. uni.showToast({
  1211. title: '当前设备不可预约'
  1212. })
  1213. return
  1214. }
  1215. uni.navigateTo({
  1216. url: '/pages/searchPile/apointment/apointmentRecharge?id=' + item.gunNo,
  1217. })
  1218. ////('book'+JSON.stringify(item))
  1219. },
  1220. getPoint() {
  1221. // //('getPoint')
  1222. WxJsApi.getLocation().then((res) => {
  1223. var latitude = parseFloat(res.latitude);
  1224. var longitude = parseFloat(res.longitude);
  1225. var startLngLat = {
  1226. longitude: longitude,
  1227. latitude: latitude
  1228. };
  1229. var endLngLat = {
  1230. longitude: _self.stationDetail.station.longitude,
  1231. latitude: _self.stationDetail.station.latitude
  1232. };
  1233. _self.calculateDistance(startLngLat, endLngLat);
  1234. _self.calculateDistanceList(startLngLat)
  1235. /*uni.showToast({
  1236. title:'getPoint'+JSON.stringify(res)
  1237. })*/
  1238. ////('当前位置' +JSON.stringify(data))
  1239. //this.latitude2 = latitude;
  1240. //this.longitude2 = longitude;
  1241. /*uni.showToast({
  1242. title:JSON.stringify(res)
  1243. })*/
  1244. //this.message=JSON.stringify(res)
  1245. }).catch(error => {
  1246. // uni.showToast({
  1247. // title: error //'getPoint'+JSON.stringify()
  1248. // })
  1249. })
  1250. },
  1251. calculateDistanceList(startLngLat) {
  1252. if (_self.stationDetail && _self.stationDetail.stationAddressList && _self.stationDetail.stationAddressList
  1253. .length) {
  1254. } else {
  1255. return
  1256. }
  1257. var list = _self.stationDetail.stationAddressList;
  1258. MapLoader().then(AMap1 => {
  1259. for (var i in list) {
  1260. var endLngLat = list[i]
  1261. var lnglat = new AMap.LngLat(startLngLat.longitude, startLngLat.latitude);
  1262. var myDistance = lnglat.distance([endLngLat.longitude, endLngLat.latitude]);
  1263. endLngLat.distance = myDistance / 1000;
  1264. endLngLat.time = myDistance / 500;
  1265. }
  1266. _self.stationAddressList = list;
  1267. _self.$forceUpdate()
  1268. //console.log("11111111111111")
  1269. //console.log(_self.stationDetail.stationAddressList)
  1270. })
  1271. },
  1272. calculateDistance(startLngLat, endLngLat) {
  1273. var _this = this;
  1274. //直线距离
  1275. MapLoader().then(AMap1 => {
  1276. var lnglat = new AMap.LngLat(startLngLat.longitude, startLngLat.latitude);
  1277. var myDistance = lnglat.distance([endLngLat.longitude, endLngLat.latitude]);
  1278. _self.stationDetail.station.distance = myDistance / 1000;
  1279. _self.stationDetail.station.time = myDistance / 500;
  1280. })
  1281. //
  1282. return
  1283. //驾车距离
  1284. var _this = this;
  1285. MapLoader().then(AMap1 => {
  1286. this.AMap = AMap;
  1287. var map = new AMap.Map("container", {
  1288. center: [116.397559, 39.89621],
  1289. zoom: 14
  1290. });
  1291. var lnglat = new AMap.LngLat(117.186602, 34.261579);
  1292. //AMap.Walking
  1293. AMap.plugin('AMap.Driving', function() {
  1294. var driving = new AMap.Driving({
  1295. // 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
  1296. policy: AMap.DrivingPolicy.LEAST_TIME
  1297. })
  1298. //var startLngLat = [116.379028, 39.865042]
  1299. //var endLngLat = [116.427281, 39.903719]
  1300. var startLngLat2 = [startLngLat.longitude, startLngLat.latitude]
  1301. var endLngLat2 = [endLngLat.longitude, endLngLat.latitude]
  1302. driving.search(startLngLat2, endLngLat2, function(status, result) {
  1303. //(result)
  1304. //(result.routes[0].time)//秒
  1305. //(result.routes[0].distance)//米
  1306. _self.stationDetail.station.distance = result.routes[0].distance /
  1307. 1000;
  1308. _self.stationDetail.station.time = result.routes[0].time / 60;
  1309. })
  1310. })
  1311. }, e => {
  1312. //_this.mui.toast('地图加载失败');
  1313. //('地图加载失败', e)
  1314. console.log(e)
  1315. })
  1316. },
  1317. getScanCode() {
  1318. WxJsApi.scanQRCode(1).then(res => {
  1319. if (res) {
  1320. indexAPI.scanCode(res).then((response) => {
  1321. }).catch(error => {
  1322. uni.showToast({
  1323. title: error,
  1324. icon: "none"
  1325. })
  1326. })
  1327. }
  1328. }).catch(error => {
  1329. })
  1330. },
  1331. getPriceList(id) {
  1332. var formatNum = function(num) {
  1333. let res = Number(num);
  1334. return res < 10 ? '0' + res : res;
  1335. };
  1336. let data = {
  1337. stationId: id
  1338. };
  1339. api.getChargingStationPrice(data).then((res) => {
  1340. if (res.data.prices.length) {
  1341. let date = new Date();
  1342. this.station = res.data.chargingStation
  1343. let hours = date.getHours();
  1344. let minutes = date.getMinutes();
  1345. let seconds = date.getSeconds();
  1346. let date_str = formatNum(hours) + ':' + formatNum(minutes); //+ ' ' +formatWeek;
  1347. this.pricesInfo = res.data.prices[0].priceList
  1348. //console.log(this.pricesInfo)
  1349. for (var i in this.pricesInfo) {
  1350. var obj = this.pricesInfo[i]
  1351. if (date_str >= obj.startTime && date_str <= obj.endTime) {
  1352. obj.current = true;
  1353. this.pricesInfoCurrent = obj
  1354. this.pricesInfoCurrent2 = obj
  1355. if (obj.electricityPrice == 0 || this.station.stationType == 50) {
  1356. this.showtips = false
  1357. }
  1358. }
  1359. }
  1360. }
  1361. })
  1362. },
  1363. navigate(item) {
  1364. console.log(item)
  1365. if (item) {
  1366. if (item.areaTitle) {
  1367. item.name = _self.stationDetail.station.name
  1368. }
  1369. } else {
  1370. item = _self.stationDetail.station
  1371. }
  1372. //console.log(item)
  1373. uni.showLoading({
  1374. })
  1375. WxJsApi.openLocation({
  1376. latitude: parseFloat(item.latitude), //目的地latitude
  1377. longitude: parseFloat(item.longitude), //目的地longitude
  1378. name: item.name,
  1379. address: item.address,
  1380. scale: 15, //地图缩放大小,可根据情况具体调整
  1381. success(res) {
  1382. uni.hideLoading()
  1383. },
  1384. complete() {
  1385. // uni.hideLoading()
  1386. }
  1387. });
  1388. // //('station'+JSON.stringify(_self.stationDetail.station))
  1389. // window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
  1390. // "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
  1391. },
  1392. charge() {
  1393. //('扫码充电')
  1394. //#ifdef MP-WEIXIN
  1395. uni.scanCode({
  1396. success: function(res) {
  1397. uni.navigateTo({
  1398. url: 'chargingPileDetails?pile=' + encodeURIComponent(JSON.stringify(data))
  1399. })
  1400. }
  1401. })
  1402. return;
  1403. //#endif
  1404. //('扫码充电1')
  1405. uni.navigateTo({
  1406. url: 'chargingPileDetails'
  1407. })
  1408. },
  1409. priceDetail(t, id) {
  1410. uni.navigateTo({
  1411. url: 'chargePriceDetails?stationId=' + _self.stationDetail.station.id + "&type=" + t + "&id=" +
  1412. id
  1413. })
  1414. },
  1415. map(item) {
  1416. this.navigate(item)
  1417. //var item= _self.stationDetail.station
  1418. //window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
  1419. // //('map'+JSON.stringify(_self.station))
  1420. // _self.station.address = 'xxxxxxxxxxxxx'
  1421. // //this.carhelp.set(_self.stationDetail.station.id,_self.station);
  1422. // uni.navigateTo({
  1423. // url: 'stationDetailsMap?stationId=' + _self.stationDetail.station.id
  1424. // //url:'stationDetailsMap?station='+encodeURIComponent(JSON.stringify(_self.station))
  1425. // })
  1426. },
  1427. theme(type) {
  1428. if (type == 'elder') {
  1429. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  1430. } else {
  1431. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  1432. }
  1433. }
  1434. }
  1435. }
  1436. </script>
  1437. <style lang="scss" scoped>
  1438. .oldTextClassF {
  1439. .stationDetail .title {
  1440. font-size: 62rpx;
  1441. }
  1442. .stationDetail .position .address {
  1443. font-size: 38rpx;
  1444. }
  1445. .stationDetail .type .type-box .box-top .pile-type {
  1446. font-size: 38rpx;
  1447. color: #101010;
  1448. }
  1449. .stationDetail .pile-state .gun-details .item .itemShowOpen .itemView .infos .gun-name {
  1450. font-size: 48rpx;
  1451. }
  1452. .stationDetail .price-infos .title {
  1453. font-size: 38rpx;
  1454. }
  1455. }
  1456. .service {
  1457. font-size: 24px;
  1458. color: #101010;
  1459. }
  1460. page {
  1461. background-color: #F2F2F2;
  1462. }
  1463. .head {
  1464. width: 100%;
  1465. height: 360rpx;
  1466. img {
  1467. width: 100%;
  1468. height: 100%;
  1469. }
  1470. }
  1471. // 站点详情
  1472. .stationDetail {
  1473. background-color: #F2F2F2;
  1474. // background: linear-gradient(180deg, rgba(255,255,255,1) 59%,rgba(255,255,255,0) 100%);
  1475. border-radius: 24rpx 24rpx 0px 0px;
  1476. margin-top: -48rpx;
  1477. color: #101010;
  1478. z-index: 99;
  1479. position: absolute;
  1480. left: 0;
  1481. right: 0;
  1482. padding-bottom: 100rpx;
  1483. .stationDetailHead {
  1484. border-radius: 24rpx 24rpx 0px 0px;
  1485. background-color: #FFF;
  1486. padding: 24rpx 32rpx 12rpx 32rpx;
  1487. }
  1488. .stationDetailBody {
  1489. padding: 24rpx 32rpx;
  1490. }
  1491. // 标题
  1492. .title {
  1493. color: rgba(16, 16, 16, 1);
  1494. font-size: 40rpx;
  1495. font-weight: bold;
  1496. }
  1497. // 标签
  1498. .tags {
  1499. display: flex;
  1500. margin-top: 8rpx;
  1501. flex-wrap: wrap;
  1502. .tags1 {
  1503. //border: 1px solid rgba(255, 139, 0, 1);
  1504. height: 40rpx;
  1505. line-height: 40rpx;
  1506. border-radius: 4px;
  1507. //color: rgba(255, 139, 0, 1);
  1508. font-size: 24rpx;
  1509. text-align: center;
  1510. padding: 0 8rpx 0 8rpx;
  1511. margin-right: 16rpx;
  1512. margin-bottom: 8rpx;
  1513. }
  1514. .sign-1 {
  1515. background-color: rgba(255, 255, 255, 100);
  1516. color: rgba(255, 139, 0, 100);
  1517. border: 1px solid rgba(255, 139, 0, 100);
  1518. }
  1519. .sign-3 {
  1520. background-color: rgba(255, 255, 255, 100);
  1521. color: #8161FF;
  1522. border: 1px solid #8161FF;
  1523. }
  1524. .sign-4 {
  1525. background-color: rgba(255, 255, 255, 100);
  1526. color: #00B962;
  1527. border: 1px solid #00B962;
  1528. }
  1529. .sign-2 {
  1530. background-color: rgba(255, 255, 255, 100);
  1531. color: rgba(153, 153, 153, 100);
  1532. border: 1px solid rgba(204, 204, 204, 100);
  1533. }
  1534. }
  1535. // 定位
  1536. .position {
  1537. display: flex;
  1538. justify-content: space-between;
  1539. margin-bottom: 24rpx;
  1540. .block {
  1541. width: 96rpx;
  1542. height: 40rpx;
  1543. line-height: 40rpx;
  1544. border-radius: 50px;
  1545. background-color: rgba(0, 185, 98, 1);
  1546. color: rgba(255, 255, 255, 1);
  1547. font-size: 22rpx;
  1548. text-align: center;
  1549. padding: 0 4rpx;
  1550. }
  1551. .address {
  1552. width: 460rpx;
  1553. //margin-left: 16rpx;
  1554. color: rgba(16, 16, 16, 1);
  1555. font-size: 32rpx;
  1556. line-height: 44rpx;
  1557. }
  1558. .distance {
  1559. display: flex;
  1560. flex-direction: column;
  1561. align-items: center;
  1562. .distance-icon {
  1563. width: 40rpx;
  1564. height: 40rpx;
  1565. display: flex;
  1566. justify-content: center;
  1567. align-items: center;
  1568. background-color: rgba(0, 185, 98, 1);
  1569. border-radius: 999px;
  1570. }
  1571. .distance-text {
  1572. color: rgba(153, 153, 153, 1);
  1573. font-size: 24rpx;
  1574. margin-top: 16rpx;
  1575. }
  1576. }
  1577. }
  1578. // 充电桩类型
  1579. .type {
  1580. display: flex;
  1581. justify-content: space-between;
  1582. .checked {
  1583. background-color: rgba(20, 23, 43, 1) !important;
  1584. .pile-type {
  1585. color: #fff !important;
  1586. }
  1587. .cut {
  1588. color: #fff !important;
  1589. }
  1590. }
  1591. .numShowview {
  1592. width: 100% !important;
  1593. }
  1594. .numShowview2 {
  1595. width: 49% !important;
  1596. }
  1597. .type-box {
  1598. //width: 334rpx;
  1599. padding: 8rpx 0;
  1600. width: 32%;
  1601. border-radius: 8rpx;
  1602. background-color: rgba(255, 255, 255, 1);
  1603. position: relative;
  1604. padding: 8rpx 0;
  1605. .box-top {
  1606. display: flex;
  1607. align-items: center;
  1608. justify-content: center;
  1609. .super,
  1610. .fast,
  1611. .slow {
  1612. width: 40rpx;
  1613. height: 40rpx;
  1614. display: flex;
  1615. justify-content: center;
  1616. align-items: center;
  1617. border-radius: 8rpx;
  1618. color: rgba(255, 255, 255, 1);
  1619. font-size: 20rpx
  1620. }
  1621. .super {
  1622. background-color: #8161FF;
  1623. }
  1624. .fast {
  1625. background-color: #1677FF;
  1626. }
  1627. .slow {
  1628. background-color: #00B962;
  1629. }
  1630. .pile-type {
  1631. color: #303133;
  1632. font-size: 32rpx;
  1633. margin-left: 4rpx;
  1634. }
  1635. }
  1636. .pile-amount {
  1637. display: flex;
  1638. justify-content: center;
  1639. .super {
  1640. color: #8161FF;
  1641. margin-right: 8rpx;
  1642. }
  1643. .fast {
  1644. color: #1677FF;
  1645. margin-right: 8rpx;
  1646. }
  1647. .free {
  1648. color: #00B962;
  1649. margin-right: 8rpx;
  1650. }
  1651. .sum {
  1652. color: #999;
  1653. margin-left: 8rpx;
  1654. }
  1655. }
  1656. }
  1657. // 尖角
  1658. .angle {
  1659. position: absolute;
  1660. width: 0;
  1661. height: 0;
  1662. display: inline-block;
  1663. border-top: 16rpx solid #000000;
  1664. border-left: 16rpx solid transparent;
  1665. border-right: 16rpx solid transparent;
  1666. bottom: -16rpx;
  1667. left: 167rpx;
  1668. }
  1669. }
  1670. // 充电桩状态
  1671. .pile-state {
  1672. border-radius: 8px 8px 0 0;
  1673. margin-top: 32rpx;
  1674. background-color: rgba(255, 255, 255, 1);
  1675. padding: 24rpx;
  1676. // 总计
  1677. .statistics {
  1678. width: 406rpx;
  1679. border: 1px solid rgba(204, 204, 204, 1);
  1680. padding: 0 16rpx;
  1681. height: 48rpx;
  1682. display: flex;
  1683. justify-content: space-between;
  1684. align-items: center;
  1685. color: #777777;
  1686. .cut {
  1687. color: #8FCFB1;
  1688. }
  1689. }
  1690. // 充电枪详情
  1691. .gun-details {
  1692. .item {
  1693. margin-bottom: 12rpx;
  1694. .open-time {
  1695. border-bottom: 1px solid rgba(238, 242, 240, 100);
  1696. // padding-left: 150rpx;
  1697. // padding-bottom: 40rpx;
  1698. display: flex;
  1699. justify-content: center;
  1700. line-height: 18px;
  1701. font-size: 14px;
  1702. color: rgb(136, 136, 136);
  1703. p {
  1704. text-indent: 112px;
  1705. }
  1706. }
  1707. .itemShowOpen {
  1708. margin-top: 24rpx;
  1709. padding-top:18rpx;
  1710. border-top: 1px dashed #d5d0d0;
  1711. display: flex;
  1712. align-items: center;
  1713. justify-content: space-between;
  1714. .itemView {
  1715. display: flex;
  1716. align-items: center;
  1717. .state {
  1718. border-radius: 4px;
  1719. background: linear-gradient(180deg, rgba(98, 228, 167, 1) 0%, rgba(0, 180, 95, 1) 100%);
  1720. padding: 4rpx 12rpx;
  1721. display: flex;
  1722. flex-direction: column;
  1723. align-items: center;
  1724. justify-content: center;
  1725. img {
  1726. width: 56rpx;
  1727. height: 56rpx;
  1728. }
  1729. .state-text {
  1730. color: rgba(255, 255, 255, 1);
  1731. font-size: 22rpx;
  1732. margin-top: -10rpx;
  1733. }
  1734. }
  1735. .color185AC6 {
  1736. //color: #185AC6
  1737. background: linear-gradient(180deg, rgba(154,192,255,1) 0%,rgba(22,119,255,1) 100%);
  1738. //background: linear-gradient(90.17deg, rgba(31, 85, 255, 1) -3.73%, rgba(39, 171, 255, 1) 98.97%);
  1739. }
  1740. .color00B962 {
  1741. //color: #00B962
  1742. //background: linear-gradient(90deg, rgba(0, 146, 77, 1) 0%, rgba(62, 232, 152, 1) 100%);
  1743. }
  1744. .colorCA9DFF {
  1745. // color: #8161FF;
  1746. background: linear-gradient(90.17deg, #4f2ae0b5 -3.73%, #8e71ffba 98.97%);
  1747. //background: linear-gradient(90.17deg, rgba(79, 42, 224, 1) -3.73%, rgba(142, 113, 255, 1) 98.97%) ;
  1748. }
  1749. .charging {
  1750. background: linear-gradient(180deg, #FFC146 0%, #FF6B00 100%);
  1751. }
  1752. //充电中
  1753. .chargingOk {
  1754. background: linear-gradient(180deg, rgba(154,192,255,1) 0%,rgba(22,119,255,1) 100%);
  1755. }
  1756. // 离线
  1757. .off-line {
  1758. background: linear-gradient(180deg, rgba(209, 204, 204, 1) 0%, rgba(148, 145, 145, 1) 100%);
  1759. }
  1760. // 详细信息
  1761. .infos {
  1762. margin-left: 16rpx;
  1763. .gun-name {
  1764. color: rgba(51, 51, 51, 1);
  1765. font-size: 44rpx;
  1766. font-weight: bold;
  1767. width: 320rpx;
  1768. white-space: nowrap;
  1769. overflow: hidden;
  1770. text-overflow: ellipsis;
  1771. text {
  1772. color: #D6D6D6;
  1773. font-weight: normal;
  1774. }
  1775. }
  1776. }
  1777. .else {
  1778. display: flex;
  1779. align-items: center;
  1780. margin-top: 8rpx;
  1781. .gun-type {
  1782. //color: rgba(22, 119, 255, 1);
  1783. color: #fff;
  1784. //background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  1785. border-radius: 4px;
  1786. padding: 1px 12rpx;
  1787. margin-right: 8rpx;
  1788. font-size: 22rpx;
  1789. // height: 32rpx;
  1790. }
  1791. .voltage {
  1792. margin: 0 8rpx;
  1793. }
  1794. }
  1795. }
  1796. }
  1797. }
  1798. .item-tip{
  1799. // padding-left: 100rpx;
  1800. .else {
  1801. display: flex;
  1802. align-items: center;
  1803. margin-top: 8rpx;
  1804. .gun-type {
  1805. //color: rgba(22, 119, 255, 1);
  1806. color: #fff;
  1807. //background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  1808. border-radius: 4px;
  1809. padding: 1px 12rpx;
  1810. margin-right: 8rpx;
  1811. font-size: 22rpx;
  1812. // height: 32rpx;
  1813. }
  1814. .voltage {
  1815. margin: 0 8rpx;
  1816. }
  1817. }
  1818. }
  1819. // 充电按钮
  1820. .charge {
  1821. width: 96rpx;
  1822. height: 48rpx;
  1823. line-height: 48rpx;
  1824. border-radius: 50px;
  1825. background-color: rgba(0, 185, 98, 1);
  1826. color: rgba(255, 255, 255, 1);
  1827. text-align: center;
  1828. }
  1829. .not-open-tag {
  1830. background-color: rgba(192, 196, 208, 100);
  1831. }
  1832. .not-enable-Appointment {
  1833. width: 168rpx;
  1834. height: 56rpx;
  1835. line-height: 56rpx;
  1836. font-size: 32rpx;
  1837. }
  1838. .electric-quantity {
  1839. width: 168rpx;
  1840. height: 52rpx;
  1841. position: relative;
  1842. img {
  1843. width: 168rpx;
  1844. height: 72rpx;
  1845. }
  1846. .percentage2 {
  1847. text-align: center;
  1848. width: 126rpx;
  1849. height: 72rpx;
  1850. color: rgba(255, 255, 255, 1);
  1851. font-size: 30rpx;
  1852. line-height: 88rpx;
  1853. position: absolute;
  1854. left: 50%;
  1855. top: 50%;
  1856. transform: translate(-50%, -50%);
  1857. }
  1858. .percentage {
  1859. text-align: center;
  1860. width: 126rpx;
  1861. height: 72rpx;
  1862. color: rgba(255, 255, 255, 1);
  1863. font-size: 34rpx;
  1864. line-height: 88rpx;
  1865. position: absolute;
  1866. left: 50%;
  1867. top: 34rpx;
  1868. transform: translate(-50%, -50%);
  1869. white-space: nowrap;
  1870. overflow: hidden;
  1871. text-overflow: ellipsis;
  1872. }
  1873. }
  1874. }
  1875. }
  1876. // 价格信息
  1877. .price-infos {
  1878. background-color: #fff;
  1879. padding: 24rpx;
  1880. border-radius: 0 0 8px 8px;
  1881. .title {
  1882. color: rgba(51, 51, 51, 1);
  1883. font-weight: bold;
  1884. font-size: 32rpx;
  1885. text {
  1886. color: #777777;
  1887. font-weight: normal;
  1888. }
  1889. }
  1890. // 分类
  1891. .classify {
  1892. display: flex;
  1893. justify-content: space-between;
  1894. margin-top: 24rpx;
  1895. .item {
  1896. border-radius: 4px;
  1897. background-color: rgba(230, 245, 237, 1);
  1898. padding: 22rpx;
  1899. .unit-price {
  1900. font-size: 56rpx;
  1901. }
  1902. .unit-price2 {
  1903. color: #999999;
  1904. font-size: 24rpx;
  1905. font-weight: normal;
  1906. text-decoration: line-through;
  1907. }
  1908. .unit-price3 {
  1909. color: #999999;
  1910. font-size: 24rpx;
  1911. font-weight: normal;
  1912. //text-decoration: line-through;
  1913. }
  1914. .unit {
  1915. color: rgba(119, 119, 119, 1);
  1916. font-size: 28rpx
  1917. }
  1918. }
  1919. // 游客价
  1920. .item-visitor {
  1921. color: #333333;
  1922. width: 42%;
  1923. }
  1924. // 充电价格
  1925. .item-member {
  1926. color: #27B148;
  1927. width: 57%;
  1928. }
  1929. // 充电价格
  1930. .item-member-vip {
  1931. color: #27B148;
  1932. width: 42%;
  1933. }
  1934. .item-vip {
  1935. //color: #5A3629;
  1936. color: rgba(255, 255, 255, 1);
  1937. //background-color:#FFF9EB ;
  1938. background: linear-gradient(88.81deg, rgba(219, 199, 167, 1) 1.89%, rgba(194, 154, 93, 1) 98%);
  1939. width: 57%;
  1940. .unit {
  1941. color: rgba(255, 255, 255, 1);
  1942. }
  1943. .register {
  1944. padding: 4rpx 16rpx;
  1945. height: 24px;
  1946. border-radius: 50px;
  1947. //background: linear-gradient(87.64deg, rgba(253, 129, 69, 1) 1.81%, rgba(252, 63, 3, 1) 100.04%);
  1948. background: linear-gradient(87.64deg, rgba(255, 255, 255, 1) 1.81%, rgba(255, 251, 215, 1) 98.08%);
  1949. color: rgba(128, 74, 0, 1);
  1950. font-size: 24rpx;
  1951. text-align: center;
  1952. margin-left: 38rpx;
  1953. }
  1954. }
  1955. .item-vip2 {
  1956. color: rgba(255, 255, 255, 1);
  1957. background: linear-gradient(32.4deg, rgba(59, 182, 254, 1) 20.49%, rgba(0, 185, 98, 1) 118.87%);
  1958. ;
  1959. width: 57%;
  1960. .register {
  1961. padding: 4rpx 16rpx;
  1962. height: 24px;
  1963. border-radius: 50px;
  1964. //background: linear-gradient(87.64deg, rgba(253, 129, 69, 1) 1.81%, rgba(252, 63, 3, 1) 100.04%);
  1965. background: linear-gradient(87.64deg, rgba(255, 255, 255, 1) 1.81%, rgba(217, 255, 237, 1) 98.08%);
  1966. color: rgba(0, 142, 75, 1);
  1967. font-size: 24rpx;
  1968. text-align: center;
  1969. margin-left: 38rpx;
  1970. }
  1971. .unit {
  1972. color: rgba(255, 255, 255, 1);
  1973. }
  1974. }
  1975. .discount-card-4 {
  1976. background: #da241e !important;
  1977. .unit {
  1978. color: #fff !important;
  1979. }
  1980. .u-progress {
  1981. background-color: #e8aaa5 !important;
  1982. color: #fff;
  1983. }
  1984. }
  1985. .item-vip3 {
  1986. color: rgba(255, 255, 255, 1);
  1987. background-color: rgba(55, 59, 80, 1);
  1988. width: 57%;
  1989. .unit-price {
  1990. font-size: 44rpx;
  1991. }
  1992. .unit {
  1993. color: rgba(204, 204, 204, 1);
  1994. font-size: 10px;
  1995. }
  1996. .progress {
  1997. display: flex;
  1998. justify-content: space-between;
  1999. color: rgba(219, 219, 219, 1);
  2000. font-size: 24rpx;
  2001. margin-bottom: 16rpx;
  2002. margin-top: 24rpx;
  2003. }
  2004. ::v-deep .u-active {
  2005. background: linear-gradient(84.49deg, rgba(59, 182, 254, 1) 4.25%, rgba(0, 185, 98, 1) 95.02%);
  2006. }
  2007. }
  2008. // 充电价格
  2009. .item-member-all {
  2010. color: #27B148;
  2011. width: 100%;
  2012. }
  2013. .register {
  2014. padding: 4rpx 16rpx;
  2015. height: 24px;
  2016. border-radius: 50px;
  2017. background: linear-gradient(87.64deg, rgba(253, 129, 69, 1) 1.81%, rgba(252, 63, 3, 1) 100.04%);
  2018. color: rgba(255, 255, 255, 1);
  2019. font-size: 24rpx;
  2020. text-align: center;
  2021. margin-left: 38rpx;
  2022. }
  2023. }
  2024. // 提示
  2025. .hint {
  2026. margin: 16rpx 0;
  2027. color: rgba(119, 119, 119, 1);
  2028. }
  2029. // 图表
  2030. .chat-box {
  2031. border-radius: 4px;
  2032. background-color: rgba(249, 249, 249, 1);
  2033. padding: 24rpx;
  2034. .chat-infos {
  2035. .item {
  2036. display: flex;
  2037. justify-content: space-between;
  2038. align-items: center;
  2039. margin-bottom: 32rpx;
  2040. .name {
  2041. display: flex;
  2042. align-items: center;
  2043. .icon {
  2044. width: 56rpx;
  2045. height: 28rpx;
  2046. margin-right: 8rpx;
  2047. }
  2048. .icon1 {
  2049. border: 2px solid rgba(0, 0, 0, 1);
  2050. }
  2051. .icon2 {
  2052. background-color: rgba(87, 228, 160, 1);
  2053. }
  2054. .icon3 {
  2055. background-color: rgba(220, 220, 220, 1);
  2056. }
  2057. .text {
  2058. color: rgba(102, 102, 102, 1);
  2059. font-size: 32rpx;
  2060. }
  2061. }
  2062. .value {
  2063. color: rgba(16, 16, 16, 1);
  2064. font-size: 32rpx;
  2065. font-weight: bold;
  2066. }
  2067. .value2 {
  2068. color: #999999;
  2069. font-size: 28rpx;
  2070. font-weight: normal;
  2071. text-decoration: line-through;
  2072. }
  2073. }
  2074. }
  2075. }
  2076. }
  2077. .chat_hhh_time {
  2078. display: flex;
  2079. justify-content: space-between;
  2080. }
  2081. .chat_hhh {
  2082. background: #f9f9f9;
  2083. text-align: center;
  2084. min-height: 160px;
  2085. display: flex;
  2086. font-size: 20rpx;
  2087. .current1 {
  2088. .chats2 {
  2089. //border: 1px solid red;
  2090. }
  2091. }
  2092. .current2 {
  2093. .chats1 {
  2094. border: 1px solid #333333;
  2095. border-bottom: 0px;
  2096. }
  2097. .chats2 {
  2098. border: 1px solid #333333;
  2099. background: #26FF6B !important;
  2100. border-top: 0px;
  2101. }
  2102. }
  2103. .chatTime {
  2104. min-width: 68rpx;
  2105. display: flex;
  2106. flex-direction: column;
  2107. justify-content: flex-end;
  2108. border: 1px solid #f9f9f9;
  2109. .chats0 {
  2110. // background-color: #ff8b17;
  2111. // color: #ffecdd;
  2112. display: flex;
  2113. justify-content: center;
  2114. flex-wrap: wrap;
  2115. flex-direction: column;
  2116. }
  2117. .chats9 {
  2118. opacity: 0;
  2119. display: flex;
  2120. justify-content: center;
  2121. flex-wrap: wrap;
  2122. flex-direction: column;
  2123. }
  2124. .chats1 {
  2125. background: #dcdcdc;
  2126. min-height: 30rpx
  2127. }
  2128. .chats2 {
  2129. background: #80e0a6;
  2130. display: flex;
  2131. flex-direction: column;
  2132. justify-content: space-between;
  2133. }
  2134. }
  2135. }
  2136. // 附加信息
  2137. .overhead-infos {
  2138. margin-top: 24rpx;
  2139. background-color: #fff;
  2140. padding: 24rpx;
  2141. border-radius: 8px;
  2142. .item {
  2143. display: flex;
  2144. align-items: center;
  2145. justify-content: space-between;
  2146. font-size: 32rpx;
  2147. .title {
  2148. color: rgba(119, 119, 119, 1);
  2149. font-size: 32rpx;
  2150. }
  2151. .value {
  2152. color: rgba(51, 51, 51, 1);
  2153. }
  2154. }
  2155. }
  2156. }
  2157. .color185AC6 {
  2158. //color: #185AC6
  2159. background: linear-gradient(90.17deg, rgba(31, 85, 255, 1) -3.73%, rgba(39, 171, 255, 1) 98.97%);
  2160. }
  2161. .color00B962 {
  2162. //color: #00B962
  2163. background: linear-gradient(90deg, rgba(0, 146, 77, 1) 0%, rgba(62, 232, 152, 1) 100%);
  2164. }
  2165. .colorCA9DFF {
  2166. // color: #8161FF;
  2167. background: linear-gradient(90.17deg, rgba(79, 42, 224, 1) -3.73%, rgba(142, 113, 255, 1) 98.97%) ;
  2168. }
  2169. .deviceAddressShow {
  2170. margin-top: 24rpx;
  2171. font-size: 36rpx;
  2172. // color:#1677FF;
  2173. color: #00b962;
  2174. // font-weight: bold;
  2175. white-space: pre;
  2176. img {
  2177. width: 48rpx;
  2178. height: 24rpx;
  2179. margin: 0 16rpx;
  2180. }
  2181. }
  2182. .deviceAddressShow2 {
  2183. color: #ff8b00;
  2184. }
  2185. .parkingNo{
  2186. color: #03A9F4;
  2187. font-weight: bold;
  2188. }
  2189. </style>