stationDetails.vue 65 KB

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