stationDetails.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. <template>
  2. <view style="padding-bottom: 138px;">
  3. <u-navbar title="站点详情"></u-navbar>
  4. <view class="station-details">
  5. <u-image v-if="stationDetail.station.image != null" class="img" width="26.6%" height="75px" :src="stationDetail.station.image" loading-icon="photo"></u-image>
  6. <view class="station-name" >
  7. {{stationDetail.station.name}}
  8. </view>
  9. <view class="details-item" style="margin-top: 22px;">
  10. <text class="iconfont font5" style="color: #00b962;">&#xe60a;</text> <text
  11. class="item-text">{{(stationDetail.station.type.indexOf('1')>=0?'直流快充':'')}}{{(stationDetail.station.type.indexOf(',')>=0?'/':'')}}{{(stationDetail.station.type.indexOf('2')>=0?'交流慢充':'')}}</text>
  12. </view>
  13. <view class="details-item">
  14. <text class="iconfont font5" style="color: #4e94ff;">&#xe60e;</text>
  15. <text class="item-text">{{stationDetail.station.distance!=null ? stationDetail.station.distance.toFixed(3):''}}公里</text>
  16. </view>
  17. <view class="details-item">
  18. <text class="iconfont font5" style="color: #ffad79;">&#xe621;</text>
  19. <text class="item-text"> {{info.station.time}}</text>
  20. </view>
  21. <view class="station-address">
  22. <img src="static/img/Frame 201.png" alt="">
  23. <view class="address-text" >
  24. {{stationDetail.station.address}}
  25. </view>
  26. <view class="iconfont address-font" @click="map">
  27. &#xe60c;
  28. </view>
  29. </view>
  30. </view>
  31. <view class="price-details">
  32. <view class="detail-title">
  33. <view class="title-left font-weight5">价格详情</view>
  34. <view class="title-right" @click="priceDetail">
  35. <view class="right-text">价格详情 </view>
  36. <view class="iconfont right-font">&#xe600;</view>
  37. </view>
  38. </view>
  39. <view class="price-item" v-if="stationDetail.slowPrice != null" style="justify-content: space-between;" >
  40. <view style="display:flex;flex-direction:row">
  41. <view class="text1">慢充</view>
  42. <view class="text2">{{stationDetail.slowPrice.costPrice}}</view>
  43. <view class="text3">起 元/度</view>
  44. </view>
  45. <view class="text4">{{stationDetail.slowPrice.startTime}}-{{stationDetail.slowPrice.endTime}}</view>
  46. </view>
  47. <view class="price-item" v-if="stationDetail.fastPrice != null" style="justify-content: space-between;" >
  48. <view style="display:flex;flex-direction:row">
  49. <view class="text5">快充</view>
  50. <view class="text2">{{stationDetail.fastPrice.costPrice}}</view>
  51. <view class="text3">起 元/度</view>
  52. </view>
  53. <view class="text4">{{stationDetail.fastPrice.startTime}}-{{stationDetail.fastPrice.endTime}}</view>
  54. </view>
  55. <view class="park-item">
  56. <view class="text-box">
  57. <view class="text1">
  58. 停车
  59. </view>
  60. <view class="text2">
  61. {{info.park.price}}
  62. </view>
  63. </view>
  64. <view class="text3">
  65. 仅供参考,以停车场实际价格为准
  66. </view>
  67. </view>
  68. </view>
  69. <view class="equipment-details">
  70. <view class="title">
  71. <view class="title-left ">
  72. 设备详情
  73. </view>
  74. <view class="title-right">
  75. <text class="free">空闲{{stationDetail.station.availableNum}}/</text>
  76. <text>总数{{stationDetail.station.totalNum}}</text>
  77. </view>
  78. </view>
  79. <view class="equipment-item" v-for="(item,index) in stationDetail.devices" :key="index">
  80. <view class="left-font iconfont" v-if="item.workStatus==0">
  81. &#xe60a;
  82. </view>
  83. <view class="left-font iconfont" style="color:#ff6200" v-else>
  84. &#xe60a;
  85. </view>
  86. <view class="name">
  87. <view class="name-text">
  88. {{item.name}}
  89. </view>
  90. <view :class="item.workStatus==0?'tag-free':'tag-recharge'">
  91. {{item.workStatusText}}
  92. </view>
  93. </view>
  94. <view class="type" style="display: flex;flex-direction: row;">
  95. <view>
  96. {{item.interfaceType}}
  97. </view>
  98. <view v-show="item.interfaceType!= null && item.chargingType != null" style="margin-left: 5rpx;margin-right: 5rpx;">
  99. |
  100. </view>
  101. <view :style="item.chargingType=='快充' ? 'color:#CA9DFF':'color:#00B962'">
  102. {{item.chargingType}}
  103. </view>
  104. <view v-show="item.chargingPower!= null && item.chargingType != null" style="margin-left: 5rpx;margin-right: 5rpx;">
  105. |
  106. </view>
  107. <view>
  108. {{item.chargingPower!=null?item.chargingPower+'kW':''}}
  109. </view>
  110. </view>
  111. <view class="charging-gun" v-for="(item1,index1) in item.gunList" :key="index1" >
  112. <view class="iconfont">
  113. &#xe618;
  114. </view>
  115. <view class="gun-num">
  116. 充电枪{{item1.channelNo<10?'0'+item1.channelNo.toString():item1.channelNo.toString()}}
  117. </view>
  118. <view :class="item1.workStatus==0?'free-state':'recharge-state'">
  119. {{item1.workStatus == 0?item1.workStatusText: item1.workStatusText + ' SOC ' + item1.soc.toFixed(1)+'%'}}
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="bottom">
  125. <u-button class="button1" shape="circle" size="medium" @click="getScanCode()">扫码充电</u-button>
  126. <u-button class="button2" shape="circle" size="medium" @click="navigate">导航</u-button>
  127. </view>
  128. </view>
  129. </template>
  130. <script>
  131. import * as indexAPI from '@/apis/index.js'
  132. import * as WxJsApi from '@/utils/wxJsApi.js'
  133. import MapLoader from '@/utils/AMap'
  134. import * as api from "@/apis/site.js"
  135. let _self;
  136. export default {
  137. data() {
  138. return {
  139. elderMode:false,
  140. userId:'',
  141. currentPos:{
  142. name:'荆鹏软件园充电站',
  143. longitude: 112.28468,
  144. latitude: 30.307094,
  145. },
  146. station:{},
  147. stationDetail:{"devices":[{"id":"e451bcad-f4a6-4b3a-9b34-9c806543637d","name":"直流汽车充电桩xx01","deviceNo":"95272018111111111","type":"1","online":false,"stationId":"3865b3a3-13fd-461a-8145-ee9711df35a2","disProportion":null,"unitPrice":null,"roleName":null,"stationName":null,"interfaceType":null,"chargingType":null,"chargingPower":80,"gunList":[{"id":"3a025433-8e7a-41c3-99e5-372bf99950d5","deviceNo":"95272018111111111","gunNo":"952720181111111111001","channelNo":1,"gunType":1,"workStatus":2,"soc":50,"carConnectStatus":0,"dcV":40,"dcA":163,"bmsV":0,"bmsA":0,"bmsModel":0,"acAV":0,"acAA":0,"acBV":0,"acBA":0,"acCV":0,"acCA":0,"remainMin":0,"chargeTimeSec":0,"kwh":0,"beforeMeter":0.67,"nowMeter":0,"startType":0,"strategy":0,"strategyParam":0,"reserve":0,"cardId":"","reserveTimeout":0,"startTime":null,"beforeBalance":0,"power":6.5,"outWindTemperature":0,"envTemperature":0,"gunTemperature":0,"vin":"","doorStatus":0,"createBy":null,"createTime":"2022-05-13 11:40","updateBy":null,"updateTime":"2022-05-18 14:52","delFlag":false,"workStatusText":"充电进行中","gunTypeText":"交流"},{"id":"009507eb-308e-4121-8312-2fbc1de8afb6","deviceNo":"95272018111111111","gunNo":"952720181111111112001","channelNo":2,"gunType":1,"workStatus":0,"soc":0,"carConnectStatus":0,"dcV":0,"dcA":0,"bmsV":0,"bmsA":0,"bmsModel":0,"acAV":0,"acAA":0,"acBV":0,"acBA":0,"acCV":0,"acCA":0,"remainMin":0,"chargeTimeSec":0,"kwh":0,"beforeMeter":0,"nowMeter":0,"startType":0,"strategy":0,"strategyParam":0,"reserve":0,"cardId":"","reserveTimeout":0,"startTime":null,"beforeBalance":0,"power":null,"outWindTemperature":0,"envTemperature":0,"gunTemperature":0,"vin":"","doorStatus":0,"createBy":null,"createTime":"2022-05-17 11:12","updateBy":null,"updateTime":null,"delFlag":false,"workStatusText":"空闲中","gunTypeText":""}]},{"id":"d48f72f0-a951-4c41-85fe-c7deef29a79e","name":"W4702-80kw双枪直流桩","deviceNo":"23470220220422001","type":"1","online":false,"stationId":"3865b3a3-13fd-461a-8145-ee9711df35a2","disProportion":null,"unitPrice":null,"roleName":null,"stationName":null,"interfaceType":null,"chargingType":null,"chargingPower":null,"gunList":[{"id":"2a4b9c34-9e95-44da-94ba-e59eb2f57355","deviceNo":"23470220220422001","gunNo":"234702202204220011001","channelNo":1,"gunType":1,"workStatus":0,"soc":0,"carConnectStatus":0,"dcV":0,"dcA":0,"bmsV":0,"bmsA":0,"bmsModel":0,"acAV":0,"acAA":0,"acBV":0,"acBA":0,"acCV":0,"acCA":0,"remainMin":0,"chargeTimeSec":0,"kwh":0,"beforeMeter":63.29,"nowMeter":59.38,"startType":1,"strategy":2,"strategyParam":1000,"reserve":0,"cardId":"13986703087","reserveTimeout":0,"startTime":"2022-05-14 10:01","beforeBalance":67.49,"power":0,"outWindTemperature":73,"envTemperature":0,"gunTemperature":69,"vin":"","doorStatus":0,"createBy":null,"createTime":"2022-05-13 09:11","updateBy":null,"updateTime":"2022-05-14 10:34","delFlag":false,"workStatusText":"空闲中","gunTypeText":""},{"id":"f56571d1-b202-47e1-8016-72eb96684644","deviceNo":"23470220220422001","gunNo":"234702202204220012001","channelNo":2,"gunType":1,"workStatus":0,"soc":0,"carConnectStatus":0,"dcV":0,"dcA":0,"bmsV":0,"bmsA":0,"bmsModel":0,"acAV":0,"acAA":0,"acBV":0,"acBA":0,"acCV":0,"acCA":0,"remainMin":0,"chargeTimeSec":0,"kwh":0,"beforeMeter":9.12,"nowMeter":0,"startType":0,"strategy":0,"strategyParam":0,"reserve":0,"cardId":"","reserveTimeout":0,"startTime":"0002-11-30 00:00","beforeBalance":0,"power":0,"outWindTemperature":73,"envTemperature":0,"gunTemperature":77,"vin":"","doorStatus":0,"createBy":null,"createTime":"2022-05-13 09:11","updateBy":null,"updateTime":"2022-05-14 10:34","delFlag":false,"workStatusText":"空闲中","gunTypeText":""}]},{"id":"2ab49cd6-2492-4d96-8588-46b07edf5ceb","name":"双枪直流桩","deviceNo":"23470220220422002","type":"1","online":false,"stationId":"3865b3a3-13fd-461a-8145-ee9711df35a2","disProportion":null,"unitPrice":null,"roleName":null,"stationName":null,"interfaceType":"国际直流","chargingType":"快充","chargingPower":80,"gunList":[]}],"slowPrice":null,"station":{"id":"3865b3a3-13fd-461a-8145-ee9711df35a2","name":"荆鹏充电站","address":"江津路156号","longitude":112.28308,"latitude":30.312084,"type":"1","costPrice":null,"electricityPrice":null,"servicePrice":null,"availableNum":0,"totalNum":6,"distance":0.001},"fastPrice":{"id":"3d4f1007-a14c-4c87-a698-12f4bcecd74f","templateId":"0755f694-d1cf-11ec-ae55-0250f2000002","deviceId":"2ab49cd6-2492-4d96-8588-46b07edf5ceb","electricityPrice":0.5,"servicePrice":1,"startTime":"00:00","endTime":"07:00","createBy":"72dc480e-6816-4be3-918d-da2436f39627","createTime":"2022-05-16 10:39","updateBy":null,"updateTime":null,"delFlag":false,"costPrice":1.5,"firstTime":"00:00","latestTime":"20:00"}},
  148. info:{
  149. station:{
  150. time:'周一到周日 07:00~22:00(节假日除外)',
  151. /* id:1,
  152. name:'荆鹏软件园充电站',
  153. longitude: 112.28468,
  154. latitude: 30.307094,
  155. type:'交流慢充',
  156. distance:0.1,
  157. address:'湖北省荆州市沙市区江津东路附155号'*/
  158. },
  159. prices: [
  160. {name:'慢充',price:1.20,time:'00:00:00 ~ 23:59.59'},
  161. {name:'快充',price:1.20,time:'00:00:00 ~ 23:59.59'},
  162. ] ,
  163. park:{
  164. price:'免费'
  165. },
  166. priceList:[],
  167. devices:{
  168. idleNum:1,
  169. total:6,
  170. items:[
  171. {name:'1号桩',status:'空闲',description:'2015国标|直流快充|120kW',plugs:[{name:'充电枪01',status:'空闲',soc:'SOC 86.0%'},{name:'充电枪02',status:'充电中',soc:'SOC 86.0%'}]},
  172. {name:'2号桩',status:'充电中',description:'2015国标|直流快充|120kW',plugs:[{name:'充电枪01',status:'空闲',soc:'SOC 86.0%'},{name:'充电枪02',status:'充电中',soc:'SOC 86.0%'}]},
  173. {name:'3号桩',status:'充电中',description:'2015国标|直流快充|120kW',plugs:[{name:'充电枪01',status:'空闲',soc:'SOC 86.0%'},{name:'充电枪02',status:'充电中',soc:'SOC 86.0%'}]}
  174. ]
  175. }
  176. }
  177. }
  178. },
  179. onLoad(op){
  180. _self = this;
  181. // document.getElementsByTagName('body')[0].style.setProperty('--mode',1)
  182. _self.processStationsInfo();
  183. if(op!=null){
  184. if(op.id != null){
  185. let data = {stationId:op.id};
  186. //if(station.distance != null)
  187. // _self.stationDetail.station.distance = station.distance;
  188. //console.log('station'+JSON.stringify(station))
  189. //_self.station = station;
  190. api.getChargingStationDetail(data).then(function(res){
  191. console.log('站点详情'+JSON.stringify(res))
  192. //this.info.st
  193. if(res && res.result)
  194. {
  195. if(res.data){
  196. let data = res.data;
  197. //data.station.distance = station.distance;
  198. _self.stationDetail = data;
  199. _self.processStationsInfo();
  200. if(_self.stationDetail.station.distance == null){
  201. _self.getPoint();
  202. }
  203. // console.log('data'+JSON.stringify(data));
  204. }
  205. }
  206. })
  207. }
  208. if(op.station != null){
  209. let station = JSON.parse(decodeURIComponent(op.station))
  210. let data = {stationId:station.id};
  211. if(station.distance != null)
  212. _self.stationDetail.station.distance = station.distance;
  213. console.log('station'+JSON.stringify(station))
  214. _self.station = station;
  215. api.getChargingStationDetail(data).then(function(res){
  216. console.log('站点详情'+JSON.stringify(res))
  217. //this.info.st
  218. if(res && res.result)
  219. {
  220. if(res.data){
  221. let data = res.data;
  222. data.station.distance = station.distance;
  223. _self.stationDetail = data;
  224. _self.processStationsInfo();
  225. // console.log('data'+JSON.stringify(data));
  226. }
  227. }
  228. })
  229. /*api.getChargingStationPrice(data).then(function(res){
  230. if(res.result){
  231. let data = res.data;
  232. if(data.prices){
  233. _self.list = [];
  234. for(let i = 0;i< data.prices.length;i++){
  235. let _item = data.prices[i];
  236. let item = {name:data.prices[i].name,items:[]};
  237. for(let j = 0;j<_item.priceList.length;j++){
  238. let _subitem = _item.priceList[j];
  239. let subitem = {time:'00:00-07:00',single_price:0.5,service_price:0.25,price:0.75};
  240. subitem.time = _subitem.startTime + '-'+_subitem.endTime;
  241. subitem.single_price = _subitem.electricityPrice;
  242. subitem.service_price = _subitem.servicePrice;
  243. subitem.price = _subitem.costPrice;
  244. item.items.push(subitem);
  245. }
  246. _self.priceList.push(item);
  247. }
  248. console.log('站点价格详情'+JSON.stringify(list));
  249. }
  250. }
  251. })*/
  252. //this.info.station = station;
  253. console.log('stationDetail onLoad'+JSON.stringify(station))
  254. }
  255. }
  256. },
  257. onReady(){
  258. this.elderMode = this.carhelp.get('getElderModeClass');
  259. if(this.elderMode)
  260. this.theme('elder')
  261. else
  262. this.theme('standard')
  263. if (this.carhelp.getPersonInfo()) {
  264. this.userId = this.carhelp.getPersonInfo().id;
  265. }
  266. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  267. // console.log(res)
  268. }).catch(error => {
  269. console.log(res)
  270. })
  271. },
  272. methods:{
  273. getPoint() {
  274. // console.log('getPoint')
  275. WxJsApi.getLocation().then((res) => {
  276. var latitude = parseFloat(res.latitude);
  277. var longitude = parseFloat(res.longitude);
  278. var startLngLat = {longitude: longitude,latitude: latitude};
  279. var endLngLat = {longitude: _self.stationDetail.station.longitude,latitude: _self.stationDetail.station.latitude};
  280. _self.calculateDistance(startLngLat,endLngLat);
  281. /*uni.showToast({
  282. title:'getPoint'+JSON.stringify(res)
  283. })*/
  284. //console.log('当前位置' +JSON.stringify(data))
  285. //this.latitude2 = latitude;
  286. //this.longitude2 = longitude;
  287. /*uni.showToast({
  288. title:JSON.stringify(res)
  289. })*/
  290. //this.message=JSON.stringify(res)
  291. }).catch(error => {
  292. uni.showToast({
  293. title:error//'getPoint'+JSON.stringify()
  294. })
  295. })
  296. },
  297. calculateDistance(startLngLat,endLngLat){
  298. var lnglat = new AMap.LngLat(startLngLat.longitude,startLngLat.latitude);
  299. var myDistance = lnglat.distance([endLngLat.longitude, endLngLat.latitude]);
  300. _self.stationDetail.station.distance = myDistance/1000;
  301. _self.stationDetail.station.time = myDistance/500;
  302. /*
  303. var _this = this;
  304. MapLoader().then(AMap1 => {
  305. this.AMap=AMap;
  306. var map=new AMap.Map("container", {
  307. center: [116.397559, 39.89621],
  308. zoom: 14
  309. });
  310. var lnglat = new AMap.LngLat(117.186602, 34.261579);
  311. //AMap.Walking
  312. AMap.plugin('AMap.Driving', function() {
  313. var driving = new AMap.Driving({
  314. // 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
  315. policy: AMap.DrivingPolicy.LEAST_TIME
  316. })
  317. //var startLngLat = [116.379028, 39.865042]
  318. //var endLngLat = [116.427281, 39.903719]
  319. driving.search(startLngLat, endLngLat, function (status, result) {
  320. console.log(result)
  321. console.log(result.routes[0].time)//秒
  322. console.log(result.routes[0].distance)//米
  323. _self.stationDetail.station.distance = result.routes[0].distance/1000;
  324. _self.stationDetail.station.time = result.routes[0].time/60;
  325. })
  326. })
  327. }, e => {
  328. //_this.mui.toast('地图加载失败');
  329. console.log('地图加载失败', e)
  330. })*/
  331. },
  332. getScanCode() {
  333. if (this.userId) {
  334. WxJsApi.scanQRCode(1).then(res => {
  335. if(res) {
  336. indexAPI.scanCode(res).then((response) => {
  337. }).catch(error => {
  338. uni.showToast({
  339. title: 'scanQRCode'+error,
  340. icon: "none"
  341. })
  342. })
  343. }
  344. }).catch(error => {
  345. })
  346. } else {
  347. uni.navigateTo({
  348. url: '/pages/login/login'
  349. })
  350. }
  351. },
  352. processStationsInfo(){
  353. for(let i = 0;i <_self.stationDetail.devices.length;i++){
  354. if(!_self.stationDetail.devices[i].online)
  355. {
  356. _self.stationDetail.devices[i].workStatusText ='不在线';
  357. continue;
  358. }
  359. //console.log('device['+i.toString()+']'+JSON.stringify(_self.stationDetail.devices[i]))
  360. _self.stationDetail.devices[i].workStatus = 2;
  361. _self.stationDetail.devices[i].workStatusText ='充电中';
  362. for(let j = 0;j < _self.stationDetail.devices[i].gunList.length;j++){
  363. //console.log('j'+JSON.stringify(_self.stationDetail.devices[i].gunList[j]))
  364. if(_self.stationDetail.devices[i].gunList[j].workStatus == 0)
  365. {
  366. _self.stationDetail.devices[i].workStatus =0;
  367. _self.stationDetail.devices[i].workStatusText ='空闲';
  368. }
  369. }
  370. }
  371. },
  372. navigate(){
  373. /*wx.openLocation({
  374. latitude: _self.station.latitude,//目的地latitude
  375. longitude: _self.station.longitude,//目的地longitude
  376. name: _self.station.name,
  377. address: _self.station.address,
  378. scale: 15//地图缩放大小,可根据情况具体调整
  379. });*/
  380. console.log('station'+JSON.stringify(_self.stationDetail.station))
  381. window.location.href="https://uri.amap.com/marker?position="+ _self.stationDetail.station.longitude+","+_self.stationDetail.station.latitude+"&name="+_self.stationDetail.station.name;
  382. },
  383. charge(){
  384. console.log('扫码充电')
  385. //#ifdef MP-WEIXIN
  386. uni.scanCode({
  387. success:function(res){
  388. uni.navigateTo({
  389. url:'chargingPileDetails?pile='+encodeURIComponent(JSON.stringify(data))
  390. })
  391. }
  392. })
  393. return;
  394. //#endif
  395. console.log('扫码充电1')
  396. uni.navigateTo({
  397. url:'chargingPileDetails'
  398. })
  399. },
  400. priceDetail(){
  401. uni.navigateTo({
  402. url:'chargePriceDetails?stationId='+_self.stationDetail.station.id
  403. })
  404. },
  405. map(){
  406. console.log('map'+JSON.stringify(_self.station))
  407. _self.station.address = 'xxxxxxxxxxxxx'
  408. //this.carhelp.set(_self.stationDetail.station.id,_self.station);
  409. uni.navigateTo({
  410. url:'stationDetailsMap?stationId='+_self.stationDetail.station.id
  411. //url:'stationDetailsMap?station='+encodeURIComponent(JSON.stringify(_self.station))
  412. })
  413. },theme(type) {
  414. if(type == 'dark')
  415. {
  416. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  417. }
  418. else
  419. {
  420. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  421. }
  422. }
  423. }
  424. }
  425. </script>
  426. <style lang="scss" scoped>
  427. @import "@/_theme.scss";
  428. // 站点信息
  429. .station-details {
  430. width: 100%;
  431. height: 100%;
  432. padding: 20px 16px 16px;
  433. background-color: #fff;
  434. position: relative;
  435. .img{
  436. position: absolute;
  437. top: 13px;right: 16px;
  438. }
  439. .station-name {
  440. //line-height: 18px;
  441. color: #101010;
  442. @include themeify{
  443. line-height: themed('font-size4');
  444. font-weight: themed('fontWeight');
  445. font-size: themed('font-size4');
  446. letter-spacing: themed('letterSpacing');
  447. }
  448. /* line-height: 18px;*/
  449. margin-bottom: 11px;
  450. }
  451. .details-item {
  452. margin-top: 11px;
  453. height: 17px;
  454. @include themeify{
  455. font-size: themed('font-size1');
  456. }
  457. /*font-size: 12px;*/
  458. position: relative;
  459. }
  460. .item-text {
  461. display: inline-block;
  462. color: rgba(102, 102, 102, 100);
  463. margin-left: 4px;
  464. line-height: 17px;
  465. position: absolute;
  466. left: 24px;
  467. top: 2px;
  468. }
  469. .station-address {
  470. width: 100%;
  471. height: 40px;
  472. line-height: 40px;
  473. margin-top: 17px;
  474. position: relative;
  475. img {
  476. width: 100%;
  477. height: 100%;
  478. }
  479. .address-text {
  480. height: 17px;
  481. line-height: 17px;
  482. position: absolute;
  483. top: 12px;
  484. left: 0;
  485. @include themeify{
  486. font-size: themed('font-size1');
  487. }
  488. /* font-size: 12px*/
  489. }
  490. .address-font {
  491. @include themeify{
  492. font-size: themed('font-size9');
  493. }
  494. /* font-size: 28px;*/
  495. color: #4e94ff;
  496. position: absolute;
  497. top: 0;
  498. right: 0;
  499. }
  500. }
  501. }
  502. // 价格详情
  503. .price-details {
  504. width: 100%;
  505. margin-top: 12px;
  506. background-color: #fff;
  507. padding: 20px 15px 16px 16px;
  508. position: relative;
  509. .detail-title {
  510. display: flex;
  511. justify-content: space-between;
  512. .title-left {
  513. @include themeify{
  514. font-size: themed('font-size3');
  515. }
  516. /* font-size: 16px;*/
  517. color: #101010;
  518. }
  519. .title-right {
  520. @include themeify{
  521. font-size: themed('font-size2');
  522. line-height: themed('font-size2');
  523. }
  524. /* font-size: 14px;
  525. line-height: 14px;*/
  526. color: #00b962;
  527. }
  528. .right-text {
  529. @include themeify{
  530. font-size: themed('font-size2');
  531. }
  532. /* font-size: 14px;*/
  533. position: absolute;
  534. top: 23px;
  535. right: 36px;
  536. }
  537. .right-font {
  538. /* width: 24px;
  539. height: 24px;
  540. line-height: 24px;
  541. font-size: 24px;*/
  542. @include themeify{
  543. font-size: themed('font-size7');
  544. width: themed('font-size7');
  545. height: themed('font-size7');
  546. line-height: themed('font-size7');
  547. }
  548. position: absolute;
  549. top: 20px;
  550. right: 12px;
  551. }
  552. }
  553. .price-item{
  554. padding: 16px 0;
  555. display: flex;
  556. border-bottom: 1px solid rgba(238, 242, 240, 100);
  557. .text1{
  558. width: 44px;
  559. /* height: 20px;
  560. line-height: 20px;*/
  561. border-radius: 50px;
  562. background-color: rgba(0, 185, 98, 100);
  563. color: rgba(255, 255, 255, 100);
  564. /* font-size: 12px;*/
  565. @include themeify{
  566. font-size: themed('font-size1');
  567. height: themed('font-size5');
  568. line-height: themed('font-size5');
  569. }
  570. text-align: center;
  571. }
  572. .text5{
  573. width: 44px;
  574. /* height: 20px;
  575. line-height: 20px;*/
  576. border-radius: 50px;
  577. background-color: #9d9fff;
  578. color: rgba(255, 255, 255, 100);
  579. @include themeify{
  580. font-size: themed('font-size1');
  581. height: themed('font-size5');
  582. line-height: themed('font-size5');
  583. }
  584. /*font-size: 12px;*/
  585. text-align: center;
  586. }
  587. .text2{
  588. width: 40px;
  589. /* line-height: 19px;*/
  590. margin-left: 8px;
  591. color: rgba(255, 98, 0, 100);
  592. /* font-size: 20px;*/
  593. @include themeify{
  594. font-size: themed('font-size5');
  595. line-height: themed('font-size5');
  596. }
  597. text-align: left;
  598. }
  599. .text3{
  600. margin-left: 4px;
  601. color: rgba(51, 51, 51, 100);
  602. /* font-size: 16px;*/
  603. @include themeify{
  604. font-size: themed('font-size3');
  605. }
  606. }
  607. .text4{
  608. margin-left: 72px;
  609. /* font-size: 12px;
  610. line-height: 20px;*/
  611. @include themeify{
  612. font-size: themed('font-size1');
  613. line-height: themed('font-size5');
  614. }
  615. color: rgba(102, 102, 102, 100);
  616. }
  617. }
  618. .park-item{
  619. padding: 16px 0;
  620. display: flex;
  621. justify-content: space-between;
  622. .text-box{
  623. display: flex;
  624. }
  625. .text1{
  626. width: 44px;
  627. @include themeify{
  628. font-size: themed('font-size1');
  629. line-height: themed('font-size5');
  630. height: themed('font-size5');
  631. }
  632. /* height: 20px;
  633. line-height: 20px;*/
  634. border-radius: 50px;
  635. background-color: rgba(78, 148, 255, 100);
  636. color: rgba(255, 255, 255, 100);
  637. /* font-size: 12px;*/
  638. text-align: center;
  639. }
  640. .text2{
  641. margin-left: 8px;
  642. color: rgba(51, 51, 51, 100);
  643. @include themeify{
  644. font-size: themed('font-size3');
  645. }
  646. /* font-size: 16px;*/
  647. }
  648. .text3{
  649. @include themeify{
  650. font-size: themed('font-size1');
  651. line-height: themed('font-size5');
  652. }
  653. color: #666666;
  654. /* font-size: 12px;
  655. line-height: 20px;*/
  656. }
  657. }
  658. }
  659. // 设备详情
  660. .equipment-details{
  661. background-color: #fff;
  662. margin-top: 12px;
  663. padding:16px;
  664. .title{
  665. display: flex;
  666. justify-content: space-between;
  667. .title-left{
  668. @include themeify{
  669. font-size: themed('font-size3');
  670. height: themed('font-size3');
  671. }
  672. /* height: 16px;*/
  673. color: rgba(16, 16, 16, 100);
  674. /* font-size: 16px;*/
  675. }
  676. .title-right{
  677. @include themeify{
  678. font-size: themed('font-size2');
  679. height: themed('font-size3');
  680. }
  681. /* height: 16px;
  682. font-size: 14px;*/
  683. .free{
  684. color: #00b962;
  685. }
  686. }
  687. }
  688. .equipment-item{
  689. margin-left: 52px;
  690. margin-top: 20px;
  691. padding-bottom: 17px;
  692. border-bottom: 1px solid rgba(238, 242, 240, 100);
  693. position: relative;
  694. .left-font{
  695. color:#00b962 ;
  696. @include themeify{
  697. font-size: themed('font-size13');
  698. }
  699. /* font-size: 36px;*/
  700. position: absolute;
  701. left: -52px;
  702. top: -4px
  703. }
  704. .name{
  705. display: flex;
  706. .name-text{
  707. color: #101010;
  708. @include themeify{
  709. font-size: themed('font-size3');
  710. line-height: themed('font-size3');
  711. }
  712. /* font-size: 16px;
  713. line-height: 16px;*/
  714. }
  715. }
  716. .type{
  717. /* height: 17px;*/
  718. color: rgba(102, 102, 102, 100);
  719. @include themeify{
  720. font-size: themed('font-size1');
  721. height: themed('font-size4');
  722. }
  723. /* font-size: 12px;*/
  724. margin-top: 4px;
  725. }
  726. .charging-gun{
  727. display: flex;
  728. margin-top: 12px;
  729. .iconfont{
  730. color: #a5aaa8;
  731. @include themeify{
  732. font-size: themed('font-size5');
  733. }
  734. /* font-size: 20px*/
  735. }
  736. .gun-num{
  737. margin-left: 8px;
  738. @include themeify{
  739. font-size: themed('font-size1');
  740. line-height: themed('font-size5');
  741. }
  742. /* font-size: 12px;
  743. line-height: 20px; */
  744. color: rgba(102, 102, 102, 100);
  745. }
  746. .free-state{
  747. color: rgba(0, 185, 98, 100);
  748. @include themeify{
  749. font-size: themed('font-size1');
  750. line-height: themed('font-size5');
  751. }
  752. /* font-size: 12px;
  753. line-height: 20px;*/
  754. margin-left: 12px;
  755. }
  756. .recharge-state{
  757. height: 17px;
  758. color: rgba(255, 98, 0, 100);
  759. @include themeify{
  760. font-size: themed('font-size1');
  761. line-height: themed('font-size5');
  762. }
  763. /* font-size: 12px;
  764. line-height: 20px;*/
  765. margin-left: 12px;
  766. }
  767. }
  768. }
  769. .tag-recharge{
  770. width: 38px;
  771. /* height: 16px;
  772. line-height: 15px;*/
  773. @include themeify{
  774. font-size: themed('font-size0');
  775. line-height: themed('font-size2');
  776. height: themed('font-size3');
  777. }
  778. border-radius: 2px;
  779. color: rgba(255, 98, 0, 100);
  780. /* font-size: 10px;*/
  781. text-align: center;
  782. font-family: Arial;
  783. border: 1px solid rgba(255, 98, 0, 100);
  784. margin-left: 8px;
  785. }
  786. .tag-free{
  787. width: 28px;
  788. @include themeify{
  789. font-size: themed('font-size0');
  790. line-height: themed('font-size2');
  791. height: themed('font-size3');
  792. }
  793. /* height: 16px;
  794. line-height: 15px;*/
  795. border-radius: 2px;
  796. color: rgba(0, 185, 98, 100);
  797. /* font-size: 10px;*/
  798. text-align: center;
  799. font-family: Arial;
  800. border: 1px solid rgba(0, 185, 98, 100);
  801. margin-left: 8px;
  802. }
  803. }
  804. // 底部
  805. .bottom{
  806. width: 100%;
  807. height: 56px;
  808. background-color: #fff;
  809. position: fixed;
  810. left: 0;
  811. bottom: 0;
  812. padding: 12px 16px;
  813. display: flex;
  814. justify-content: space-between;
  815. .button1{
  816. width: 44%;
  817. height: 32px;
  818. border: 1px solid rgba(0, 185, 98, 100);
  819. color: rgba(0, 185, 98, 100);
  820. /* font-size: 14px;*/
  821. @include themeify{
  822. font-size: themed('font-size2');
  823. }
  824. }
  825. .button2{
  826. width: 44%;
  827. height: 32px;
  828. border-radius: 50px;
  829. background-color: rgba(0, 185, 98, 100);
  830. color: rgba(255, 255, 255, 100);
  831. @include themeify{
  832. font-size: themed('font-size2');
  833. }
  834. /* font-size: 14px;*/
  835. margin-left: 13px;
  836. }
  837. }
  838. </style>