searchPile.vue 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933
  1. <template>
  2. <view class='font1'>
  3. <ujp-navbar :is-back="false" :height='nav_height'style="background-color: bisque;">
  4. <view style="display: flex;flex-direction: column; width: 100%;height: 100%;">
  5. <view style="display: flex;flex-direction: row; height: 100%; align-items: center;margin-top:0rpx;padding-top: 0rpx;padding-bottom: 20rpx;">
  6. <view style="margin-left:20rpx;width: 160rpx;">
  7. <uni-combox class='font2' ref="city" :border="false" v-model="area" :candidates="cities" @updateModel='updateCity' @updateSelector="updateCitySelector"></uni-combox>
  8. </view>
  9. <view style="margin-left: 20rpx;margin-right: 20rpx; flex:1" >
  10. <u-search height="80" :input-style='inputStyle' placeholder="搜索站点名称" v-model="keyword" :showAction="false" @focus="navigate"></u-search></view>
  11. <view style="margin-right: 20rpx;" v-show="viewMode" @click="listMode">
  12. <text class="iconfont">&#xe613;</text> <text class="list font2">列表</text>
  13. <!-- <u-icon name="list-dot" size="26" color="#c0c4cc"></u-icon>
  14. <label>列表</label>-->
  15. </view>
  16. <view style="margin-right: 20rpx;" v-show="!viewMode" @click="mapMode">
  17. <text class="iconfont">&#xe622;</text> <text class="list font2">地图</text>
  18. <!--<u-icon name="map" size="26" color="#c0c4cc"></u-icon>
  19. <label>地图</label>
  20. -->
  21. </view>
  22. </view>
  23. <view style="display: flex;flex-direction: row;width:100%; justify-content: space-between;align-items: center;">
  24. <view style="margin-left:20rpx;width: 160rpx;">
  25. <uni-combox class='font2' ref="raidus" style="width: 200rpx;" :border="false" v-model="raidus" :candidates="radiuses" @updateModel='updateRadius' @updateSelector="updateRadiusSelector"></uni-combox>
  26. </view>
  27. <!--
  28. <view style="margin-left: 20rpx;">
  29. <label class="arrow">{{ info.miles_type[preference.miles_index].text }}</label>
  30. <u-icon name="arrow-down-fill" size="13" color="#c0c4cc"></u-icon>
  31. </view>
  32. -->
  33. <view style="margin-left:20rpx;margin-right: 20rpx;flex:1">
  34. <uni-combox ref="type" class='font2' style="width: 200rpx;" :border="false" v-model="type" :candidates="types" @updateModel='updateType' @updateSelector="updateTypeSelector"></uni-combox>
  35. </view>
  36. <!-- <view style="margin-left: 20rpx;margin-right: 20rpx;flex:1">
  37. <label class="arrow">{{ info.obc_type[preference.obc_type_index].text }}</label>
  38. <u-icon name="arrow-down-fill" size="13" color="#c0c4cc"></u-icon>
  39. </view>-->
  40. <view style="margin-right: 20rpx;" @click="open">
  41. <label v-if="show" class="arrow font2" style="color: #00b962;">{{ action }}</label>
  42. <label v-else class="arrow font2" >{{ action }}</label>
  43. <u-icon v-if="show" name="arrow-up-fill" size="13" color="#00B962"></u-icon>
  44. <u-icon v-else name="arrow-down-fill" size="13" color="#999999"></u-icon>
  45. </view>
  46. </view>
  47. </view>
  48. </ujp-navbar>
  49. <view class="content" >
  50. <view v-if="show" class="preference" :style="show ? 'z-index:1024;top:'+navBarHeight+'px;' : 'z-index:0'" style="width: 100%;">
  51. <view class="content-s">
  52. <view class="preference_group">
  53. <view class="preference_group_item"><label class="preference_label">距离我</label></view>
  54. <view>
  55. <u-tag
  56. class="preference_item"
  57. v-for="(item, index) in info.miles_type"
  58. :key="index"
  59. :style="index == preference.miles_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  60. shape="circle"
  61. :text="item.text"
  62. @click="selectMiles(index)"
  63. ></u-tag>
  64. </view>
  65. </view>
  66. <view class="preference_group">
  67. <view class="preference_group_item"><label class="preference_label">充电站类型</label></view>
  68. <view>
  69. <u-tag
  70. class="preference_item_medium"
  71. v-for="(item, index) in info.obc_type"
  72. :key="index"
  73. :style="index == preference.obc_type_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  74. shape="circle"
  75. :text="item.text"
  76. @click="selectOBSType(index)"
  77. ></u-tag>
  78. </view>
  79. </view>
  80. <view class="preference_group">
  81. <view class="preference_group_item"><label class="preference_label">是否对外开放</label></view>
  82. <view>
  83. <u-tag
  84. class="preference_item_plus"
  85. v-for="(item, index) in info.obc_status"
  86. :key="index"
  87. :style="index == preference.obc_status_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  88. shape="circle"
  89. :text="item.text"
  90. @click="selectOBSStatus(index)"
  91. ></u-tag>
  92. </view>
  93. </view>
  94. <view class="preference_group">
  95. <view style="margin-left: 30rpx;"><u-checkbox active-color="#00b962" shape="circle" v-model="preference.save_preference" @change="radioChange">保存偏好设置</u-checkbox></view>
  96. </view>
  97. </view>
  98. <view class="pre-btn" style="display: flex;flex-direction: row;">
  99. <view class="btn-1 font3" @click="reset" style="width: 30%;">重置</view>
  100. <view class="btn-2 font3" @click="close" style="width: 70%;background-color: #00B962;color: #fff;">确定</view>
  101. </view>
  102. </view>
  103. <u-mask :show="show" @click="show = false"></u-mask>
  104. <view v-show="!viewMode" >
  105. <view class="carNone" v-if="stationslist.length == 0">
  106. <img src="static/img/暂无数据-缺省页.png" alt="">
  107. <p class="oldTextjp2" oldstyle="font-size: 18px;">暂无可用充电站</p>
  108. </view>
  109. <view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow" @click="stationDetail(item)">
  110. <view class="address">
  111. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  112. {{item.name}}
  113. </view>
  114. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-if="item.distance != '99999999'">
  115. <text class="iconfont" style="color:#666666">&#xe615;</text>
  116. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  117. </view>
  118. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  119. <text class="iconfont" style="color:#666666">&#xe615;</text>
  120. 暂无定位
  121. </view>
  122. </view>
  123. <view class="sign" v-if="item.stationType==50">
  124. {{item.address}}
  125. </view>
  126. <view class="sign">
  127. <view class="sign-1" v-if="item.giveDiscount">服务费{{item.discountRatio/10}}折</view>
  128. <view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
  129. </view>
  130. <view class="price-free price-freeList">
  131. <view class="price">
  132. <view class="price-1">
  133. <text class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  134. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</text>
  135. <text class="unit " oldstyle="font-size: 14px;">
  136. 元/度 起
  137. </text>
  138. </view>
  139. <view class="price-2 " oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  140. <text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  141. <text class="unit">元/度 起</text>
  142. </view>
  143. </view>
  144. <view class="free">
  145. <view class="fast" v-if="item.type == '快充' || item.type == '快/慢'">
  146. <view class="fast-font">
  147. </view>
  148. <view class="num">
  149. {{item.fastAvailableNum}}/{{item.fastNum}}
  150. </view>
  151. </view>
  152. <view class="slow" v-if="item.type == '慢充' || item.type == '快/慢'">
  153. <view class="slow-font">
  154. </view>
  155. <view class="num">
  156. {{item.slowAvailableNum}}/{{item.slowNum}}
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- <view class="free">
  162. <text :class="item.type == '快充' ? 'fast-charge':(item.type == '慢充' ? 'trickle-charge':'fast-trickle-charge')">{{item.type}}</text>
  163. <view class="free-num">
  164. <text style="color:#009143;">空闲{{item.idleNum}}</text>/总数{{item.total}}
  165. </view>
  166. <view class="distance" v-if="item.distance!=99999999">
  167. <text class="iconfont distance-font">&#xe615;</text>
  168. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}} {{item.time.toFixed(0)}}分钟
  169. </view>
  170. <view class="distance" v-else>
  171. <text class="iconfont distance-font">&#xe615;</text>
  172. 导航
  173. </view>
  174. </view> -->
  175. </view>
  176. <u-divider margin-top="20" bg-color="#F2F4F4" v-if="stationslist.length != 0">已经到底了</u-divider>
  177. </view>
  178. <view v-show="viewMode">
  179. <view>
  180. <Chargermap @onMoveStart="moveStart" @onMoveEnd="moveEnd" ref="amap" @onClicked="onClicked" @onload="mapdown" @clickMap="clickMap"></Chargermap>
  181. <!--@location="location"-->
  182. <u-image style='position:absolute;z-index:1023;right:40rpx;bottom:520rpx; '
  183. src="@/static/img/location.png" border-radius="8" bg-color="#ffffff" width="30px" height="30px" @click="setCenter"></u-image>
  184. </view>
  185. <!-- 新版卡片 -->
  186. <view class="chargerCard" v-if="stationsmap.length>0">
  187. <swiper v-if="stationsmap.length>0" :current="currentIndex" @change="swiperChange" slide-change-transition-end='swiperTransitionEnd' @transition="swiperTransition">
  188. <swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
  189. <view class="swiper-item" style="height: 100%; background-color: #ffffff;" @click="stationDetail(item)">
  190. <view class="charing-slow charing-slow-2" @click="stationDetail(item)">
  191. <view class="address">
  192. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  193. {{item.name}}
  194. </view>
  195. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" >
  196. <text class="iconfont" style="color:#666666">&#xe615;</text>
  197. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  198. </view>
  199. <!-- <view class="distance oldTextjp2" oldstyle="font-size: 16px;">
  200. <text class="iconfont" style="color:#666666">&#xe615;</text>
  201. 暂无定位
  202. </view> -->
  203. </view>
  204. <view class="sign min-h">
  205. <view class="sign-1" v-if="item.giveDiscount">服务费{{item.discountRatio/10}}折</view>
  206. <view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList"
  207. :key="tagIndex">{{tagName}}</view>
  208. </view>
  209. <view class="price-free ">
  210. <view class="price">
  211. <view class="price-1">
  212. <view class="num">
  213. {{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  214. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</view>
  215. <view class="unit oldTextjp2" oldstyle="font-size: 14px;">
  216. 元/度 起
  217. </view>
  218. </view>
  219. <view class="price-2 oldTextjp2" oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  220. <text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  221. <text class="unit">元/度 起</text>
  222. </view>
  223. </view>
  224. <view class="free">
  225. <view class="fast" v-if="item.type == '快充' || item.type == '快/慢'">
  226. <view class="fast-font">
  227. </view>
  228. <view class="num">
  229. {{item.fastAvailableNum}}/{{item.fastNum}}
  230. </view>
  231. </view>
  232. <view class="slow" v-if="item.type == '慢充' || item.type == '快/慢'">
  233. <view class="slow-font">
  234. </view>
  235. <view class="num">
  236. {{item.slowAvailableNum}}/{{item.slowNum}}
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. </swiper-item>
  244. </swiper>
  245. </view>
  246. <!-- 老版卡片-->
  247. <!-- <view v-if="stationsmap.length>0" class="chargerCard" >
  248. <swiper v-if="stationsmap.length>0" :current="currentIndex" @change="swiperChange" slide-change-transition-end='swiperTransitionEnd' @transition="swiperTransition" style="height: 100%;">
  249. <swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
  250. <view class="swiper-item" style="height: 100%; background-color: #ffffff;" @click="stationDetail(item)">
  251. <view class="charing-slow charing-slow-2" @click="stationDetail(item)">
  252. <view class="address">
  253. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  254. {{item.name}}
  255. </view>
  256. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-if="item.distance != '99999999'">
  257. <text class="iconfont" style="color:#666666">&#xe615;</text>
  258. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  259. </view>
  260. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  261. <text class="iconfont" style="color:#666666">&#xe615;</text>
  262. 暂无定位
  263. </view>
  264. </view>
  265. <view class="sign">
  266. <view class="sign-1" v-if="item.giveDiscount">服务费{{item.discountRatio/10}}折</view>
  267. <view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
  268. </view>
  269. <view class="price-free">
  270. <view class="price">
  271. <view class="price-1">
  272. <view class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  273. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</view>
  274. <view class="unit oldTextjp2" oldstyle="font-size: 14px;">
  275. 元/度 起
  276. </view>
  277. </view>
  278. <view class="price-2 oldTextjp2" oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  279. <text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  280. <text class="unit">元/度 起</text>
  281. </view>
  282. </view>
  283. <view class="free">
  284. <view class="fast" v-if="item.type == '快充' || item.type == '快/慢'">
  285. <view class="fast-font">
  286. </view>
  287. <view class="num">
  288. {{item.fastAvailableNum}}/{{item.fastNum}}
  289. </view>
  290. </view>
  291. <view class="slow" v-if="item.type == '慢充' || item.type == '快/慢'">
  292. <view class="slow-font">
  293. </view>
  294. <view class="num">
  295. {{item.slowAvailableNum}}/{{item.slowNum}}
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. </view>
  301. <view class="card_item" >
  302. <u-button shape='circle' style="color: #00B962;" @click="getScanCode" >
  303. <u-icon name="scan" size="26" color="#00B962" ></u-icon>
  304. <label>扫码充电</label>
  305. </u-button>
  306. <view class="round" @click.stop="navigateTo(item)" v-if="item.distance!=99999999">
  307. <text class="iconfont distance-font">&#xe615;</text>
  308. <view style="margin-right: 10rpx;" >
  309. {{item.distance!=null&&item.distance>0.1 ? item.distance.toFixed(1)+'公里':'小于100米'}}
  310. </view>
  311. <view style="margin-right: 10rpx;">
  312. {{item.time!=null?item.time.toFixed(0):''}}分钟
  313. </view>
  314. </view>
  315. <view class="round" @click.stop="navigateTo(item)" v-else>
  316. <text class="iconfont distance-font">&#xe615;</text>
  317. <view style="margin-right: 10rpx;" >
  318. 导航
  319. </view>
  320. </view>
  321. </view>
  322. </view>
  323. </swiper-item>
  324. </swiper>
  325. </view> -->
  326. </view>
  327. </view>
  328. <Tabbar :current="1" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  329. </view>
  330. </template>
  331. <script>
  332. // import api from './site-index.js'
  333. // export default api
  334. import * as indexAPI from '@/apis/index.js'
  335. import * as api from '@/apis/site.js';
  336. import Chargermap from '@/components/Chargermap.vue';
  337. import DoubleSlider from '@/components/double-slider/DoubleSlider.vue';
  338. import Tabbar from '@/components/Tabbar.vue';
  339. import uniCombox from '@/components/uni-combox/components/uni-combox/uni-combox.vue'
  340. import * as WxJsApi from '@/utils/wxJsApi.js'
  341. //import * as Map from '@/utils/openMap.js'
  342. //import MapLoader from '@/utils/AMap'
  343. //import xflSelect from '@/components/xfl-select/xfl-select.vue'
  344. let _self;
  345. export default {
  346. components: {
  347. Chargermap,
  348. DoubleSlider,
  349. Tabbar,
  350. uniCombox,
  351. // xflSelect
  352. },
  353. data() {
  354. return {
  355. elderStatus: false,
  356. inputStyle:{
  357. backgroundColor: 'transparent',
  358. "font-size":'18px',
  359. "font-weight":"normal"
  360. },
  361. nav_height:88,
  362. elderMode:false,
  363. showCity:false,
  364. showType:false,
  365. showRadius:false,
  366. cities: [ '荆州市'],
  367. radiuses:['1公里','2公里','5公里','10公里','20公里','50公里','100公里','200公里'],
  368. types:['全部','交流快充','直流慢充'],
  369. area: '荆州市',
  370. raidus:'',
  371. type:'',
  372. centerImg:'@/static/img/location.png',
  373. currentIndex:-1,
  374. navBarHeight:88,
  375. viewMode: false, //列表
  376. keyword: '',
  377. show: false,
  378. mapopen: false,
  379. isReady: false,
  380. id: '',
  381. longitude:null,
  382. latitude: null,
  383. name:'荆鹏软件园',
  384. // longitude: '',
  385. // latitude: '',
  386. nearbyStationInfo: {
  387. nearbyShiftDTOList: []
  388. },
  389. action: '筛选',
  390. preference: {
  391. miles_index: 3,
  392. obc_type_index: 0,
  393. obc_status_index: 0,
  394. obc_voltage_index: 0,
  395. save_preference: false,
  396. obc_power: { minValue: 0, maxValue: 500 }
  397. },
  398. stationsmap:[
  399. /* {name:'荆鹏软件园充电站',position:'湖北省荆州市沙市区江津东路附155号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'慢充'},
  400. {name:'荆鹏软件园充电站2',position:'湖北省荆州市沙市区江津东路附156号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'快充'},
  401. {name:'荆鹏软件园充电站3',position:'湖北省荆州市沙市区江津东路附157号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'慢充'},
  402. {name:'荆鹏大道求助站充电站',position:'湖北省荆州市沙市区江津东路附158号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'快充'},
  403. */
  404. ],
  405. first:true,
  406. timer:null,
  407. swipping:false,
  408. stationslist:[],
  409. info: {
  410. miles_type: [
  411. { distance: 1, text: '1公里' },
  412. { distance: 2, text: '2公里' },
  413. { distance: 5, text: '5公里' },
  414. { distance: 10, text: '10公里' },
  415. { distance: 20, text: '20公里' },
  416. { distance: 50, text: '50公里' },
  417. { distance: 100, text: '100公里' },
  418. { distance: 200, text: '200公里' }
  419. ],
  420. obc_type: [{ value: '', text: '全部' }, { value: 0, text: '直流快充' }, { value: 1, text: '交流慢充' }],
  421. obc_status: [{ value: 0, text: '对外开放' }, { value: 1, text: '不对外开放' }],
  422. obc_voltage: [{ value: 0, text: '低于700V' }, { value: 1, text: '700V及以上' }],
  423. obc_power: { minValue: 0, maxValue: 1000 }
  424. },
  425. userId:'',
  426. };
  427. },
  428. onLoad(op) {
  429. _self = this;
  430. var px = uni.upx2px(172);
  431. this.nav_height = px;
  432. // //('longitude0 ' + _self.longitude);
  433. // //('latitude0 ' + _self.latitude);
  434. // if (op != null) {
  435. // if (op.longitude != null) this.longitude = op.longitude;
  436. // if (op.latitude != null) this.latitude = op.latitude;
  437. // if (op.id != null) this.id = op.id;
  438. // }
  439. // if(this.elderMode)
  440. // {
  441. // window.document.getElementsByTagName('body')[0].style.setProperty('--theme', 1);
  442. // }
  443. //navigation.getPoint();
  444. let data1 = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  445. this.getChargingStationData(data1);
  446. },
  447. onReady() {
  448. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  449. this.elderStatus = true;
  450. } else {
  451. this.elderStatus = false;
  452. }
  453. // //('长者模式'+JSON.stringify(this.carhelp.get("getElderModeClass")));
  454. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  455. //this.elderMode = true;
  456. if(this.elderMode)
  457. this.theme('elder')
  458. else
  459. this.theme('standard')
  460. if (this.carhelp.getPersonInfo()) {
  461. this.userId = this.carhelp.getPersonInfo().id;
  462. }
  463. let preference = this.carhelp.get('preference',this.preference)
  464. if(preference.save_preference)
  465. {
  466. this.preference = preference;
  467. //('preference'+JSON.stringify(preference))
  468. }
  469. this.types = [];
  470. for(let i = 0;i< this.info.obc_type.length;i++){
  471. this.types.push(this.info.obc_type[i].text);
  472. }
  473. this.radiuses = [];
  474. for(let i = 0;i< this.info.miles_type.length;i++){
  475. this.radiuses.push(this.info.miles_type[i].text);
  476. }
  477. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  478. this.raidus = this.info.miles_type[this.preference.miles_index].text;
  479. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  480. // //(res)
  481. }).catch(error => {
  482. //(error)
  483. })
  484. // //('longitude2 '+this.longitude)
  485. // //('latitude2 '+this.latitude)
  486. this.$refs.amap.init();
  487. //this.getPositionByLonLats();
  488. // this.$refs.amap.setMyStyle("height:1500rpx;width:100%;");
  489. // this.$refs.amap.setMyStyle("height:calc(100%-176rpx);width:100%;");
  490. // //('longitude3 '+this.longitude)
  491. // //('latitude3 '+this.latitude)
  492. },
  493. onShow() {
  494. if(this.$refs.tabbarMain){
  495. this.$refs.tabbarMain.setcount(1);
  496. }
  497. // //('onShow')
  498. if (this.isReady) {
  499. }
  500. this.$nextTick(()=>{
  501. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  502. this.raidus = this.info.miles_type[this.preference.miles_index].text;
  503. this.$refs.amap.init();
  504. })
  505. },
  506. onHide(){
  507. this.end();
  508. },
  509. methods: {
  510. updateCitySelector(){
  511. //('updateCitySelector');
  512. this.$refs.type.closeSelector();
  513. this.$refs.raidus.closeSelector();
  514. //this.$refs.city.closeSelector();
  515. this.show = false;
  516. },
  517. updateTypeSelector(){
  518. //('updateTypeSelector');
  519. //this.$refs.type.closeSelector();
  520. this.$refs.raidus.closeSelector();
  521. this.$refs.city.closeSelector();
  522. this.show = false;
  523. },
  524. updateRadiusSelector(){
  525. //('updateRadiusSelector');
  526. this.$refs.type.closeSelector();
  527. //this.$refs.raidus.closeSelector();
  528. this.$refs.city.closeSelector();
  529. this.show = false;
  530. },
  531. updateCity(e){
  532. this.close();
  533. },
  534. updateRadius(e){
  535. this.preference.miles_index = e.value;
  536. this.close();
  537. //('updateRadius'+JSON.stringify(e))
  538. },
  539. updateType(e){
  540. this.preference.obc_type_index = e.value;
  541. this.close();
  542. //('updateType'+JSON.stringify(e))
  543. },
  544. setCenter(){
  545. //('getPoint')
  546. WxJsApi.getLocation().then((res) => {
  547. _self.latitude = parseFloat(res.latitude);
  548. _self.longitude = parseFloat(res.longitude);
  549. //let data = {position:{latitude:latitude,longitude:longitude}};
  550. let posCenter= {longitude: _self.longitude,latitude: _self.latitude};
  551. this.$refs.amap.setCenter(posCenter);
  552. }).catch(error => {
  553. uni.showToast({
  554. title:JSON.stringify(error)
  555. })
  556. })
  557. // //('setCenter')
  558. },
  559. getScanCode() {
  560. if(!this.isEnabled())
  561. return;
  562. if (this.userId) {
  563. WxJsApi.scanQRCode(1).then(res => {
  564. if(res) {
  565. indexAPI.scanCode(res).then((response) => {
  566. }).catch(error => {
  567. uni.showToast({
  568. title: error,
  569. icon: "none"
  570. })
  571. })
  572. }
  573. }).catch(error => {
  574. })
  575. } else {
  576. uni.navigateTo({
  577. url: '/pages/login/login'
  578. })
  579. }
  580. },
  581. //导航
  582. guide(signMap,item) {
  583. let self = this;
  584. if (item.position && item.position != '') {
  585. //景点位置partnerAddress 景点经纬度lng lat
  586. var lng = self.lng;
  587. var lat = self.lat;
  588. if (signMap == 'gd') {
  589. // 高德地图
  590. //('signMap')
  591. if (self.customBrowserVersion().android) {
  592. window.location.href = "androidamap://viewMap?sourceApplication=appname&poiname=" + item.position +
  593. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  594. //判断是否跳转
  595. setTimeout(function () {
  596. let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||
  597. window.document.webkitHidden
  598. if (typeof hidden == "undefined" || hidden == false) {
  599. //调用高德地图
  600. window.location.href = "https://uri.amap.com/marker?position=" + item.longitude + "," + item.latitude +
  601. "&name=" + item.position;
  602. }
  603. }, 2000);
  604. } else if (self.customBrowserVersion().ios) {
  605. window.location.href = "iosamap://viewMap?sourceApplication=appname&poiname=" + item.position +
  606. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  607. //判断是否跳转
  608. setTimeout(function () {
  609. let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||
  610. window.document.webkitHidden
  611. if (typeof hidden == "undefined" || hidden == false) {
  612. //调用高德地图
  613. window.location.href = "https://uri.amap.com/marker?position=" + item.longitude + "," + item.latitude +
  614. "&name=" + item.position;
  615. }
  616. }, 2000);
  617. }
  618. } else if (signMap == 'bd') {
  619. // 百度地图
  620. if (self.customBrowserVersion().android) {
  621. //安卓操作系统
  622. let d = new Date();
  623. let t0 = d.getTime();
  624. window.location.href = "androidamap://viewMap?sourceApplication=appname&poiname=" + item.position+
  625. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  626. //由于打开需要1~2秒,利用这个时间差来处理--打开app后,返回h5页面会出现页面变成app下载页面,影响用户体验
  627. var delay = setInterval(function () {
  628. var d = new Date();
  629. var t1 = d.getTime();
  630. if (t1 - t0 < 3000 && t1 - t0 > 2000) {
  631. window.location.href = "http://api.map.baidu.com/marker?location=" + item.latitude + "," +
  632. item.longitude + "&title=" + item.position +
  633. "&content=充电桩&output=html&src=webapp.baidu.openAPIdemo";
  634. }
  635. if (t1 - t0 >= 3000) {
  636. clearInterval(delay);
  637. }
  638. }, 1000);
  639. }
  640. if (self.customBrowserVersion().ios) {
  641. //ios操作系统
  642. let d = new Date();
  643. let t0 = d.getTime();
  644. window.location.href = "iosamap://viewMap?sourceApplication=appname&poiname=" + self.partnerAddress +
  645. "&lat=" + lat + "&lon=" + lng + "&dev=0";
  646. //由于打开需要1~2秒,利用这个时间差来处理--打开app后,返回h5页面会出现页面变成app下载页面,影响用户体验
  647. let delay = setInterval(function () {
  648. var d = new Date();
  649. var t1 = d.getTime();
  650. if (t1 - t0 < 3000 && t1 - t0 > 2000) {
  651. window.location.href = "http://api.map.baidu.com/marker?location=" + item.latitude + "," +
  652. item.longitude + "&title=" + item.position +
  653. "&content=充电桩&output=html&src=webapp.baidu.openAPIdemo";
  654. }
  655. if (t1 - t0 >= 3000) {
  656. clearInterval(delay);
  657. }
  658. }, 1000);
  659. }
  660. }
  661. } else {
  662. uni.showToast({
  663. title:'暂时不知道充电桩位置'
  664. })
  665. }
  666. },
  667. //区分设备
  668. customBrowserVersion() {
  669. var u = navigator.userAgent;
  670. return {
  671. trident: u.indexOf('Trident') > -1, //IE内核
  672. presto: u.indexOf('Presto') > -1, //opera内核
  673. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  674. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  675. mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
  676. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  677. android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
  678. iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
  679. iPad: u.indexOf('iPad') > -1, //是否iPad
  680. webApp: u.indexOf('Safari') == -1, //是否web应用程序,没有头部与底部
  681. weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
  682. qq: u.match(/\sQQ/i) == " qq", //是否QQ
  683. isBaidu: u.indexOf('baiduboxapp') !== -1, //是否为百度浏览器
  684. isqqBrowser: u.indexOf('mqqbrowser') !== -1, //是否为qq浏览器
  685. isWxBrowser: u.indexOf('micromessenger') !== -1, //是否为微信浏览器
  686. isUc: u.indexOf('ucbrowser') !== -1, //是否为uc浏览器
  687. };
  688. },
  689. navigateTo(item){
  690. /*
  691. this.elderMode = !this.elderMode;
  692. if(this.elderMode)
  693. this.theme('elder')
  694. else
  695. this.theme('standard')
  696. return;
  697. */
  698. //this.guide('gd',item);
  699. ////('导航'+JSON.stringify(item))
  700. window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
  701. //Map.getRoute(item);
  702. //Map.openMap(this.latitude, this.longitude, this.name, 'wgs84')
  703. //var startLngLat = [this.longitude, this.latitude]
  704. //var endLngLat = [item.longitude, item.latitude]
  705. ///let platform = uni.getSystemInfoSync().platform
  706. ////('platform'+JSON.stringify(platform))
  707. //this.$refs.amap.navigate(startLngLat,endLngLat);
  708. },
  709. navigate(){
  710. //('naviage to ')
  711. uni.navigateTo({
  712. url:'/pages/search/search'
  713. })
  714. },
  715. getPoint() {
  716. // //('getPoint')
  717. WxJsApi.getLocation().then((res) => {
  718. var latitude = parseFloat(res.latitude);
  719. var longitude = parseFloat(res.longitude);
  720. let data = {position:{latitude:latitude,longitude:longitude}};
  721. _self.location(data);
  722. if(_self.first)
  723. {
  724. var obj = {
  725. longitude: longitude,
  726. latitude: latitude
  727. };
  728. this.$refs.amap.setPerson(obj);
  729. //let data = {latitude:latitude,longtitude:longitude};
  730. //this.getChargingStationData(data);
  731. this.getNearbyStationInfo();
  732. _self.first = false;
  733. //this.$refs.amap.listenMove();
  734. }
  735. //('当前位置' +JSON.stringify(data))
  736. //this.latitude2 = latitude;
  737. //this.longitude2 = longitude;
  738. /*uni.showToast({
  739. title:JSON.stringify(res)
  740. })*/
  741. //this.message=JSON.stringify(res)
  742. }).catch(error => {
  743. uni.showToast({
  744. title:JSON.stringify(error)
  745. })
  746. })
  747. },
  748. start() {
  749. let self = this;
  750. // 将定时器名字赋值到变量中
  751. this.timer = setInterval(() => {
  752. ////("开始---");
  753. //self.$refs.amap.getLocation1();
  754. //self.$refs.amap.getLocation ();
  755. }, 10000);
  756. },
  757. end() {
  758. clearInterval(this.timer);
  759. this.timer = null // 这里最好清除一下,回归默认值
  760. // 众所周知,定时器返回一个随机整数,用于表示定时器的编号,后面通过名字可以取消这个定时器的执行。
  761. //(this.timer);
  762. },
  763. isEnabled(){
  764. if(this.viewMode)
  765. {
  766. if(this.show)
  767. return false;
  768. }
  769. return true;
  770. },
  771. stationDetail(item){
  772. if(!this.isEnabled())
  773. return;
  774. //('stationDetail'+JSON.stringify(item))
  775. uni.navigateTo({
  776. url:'stationAndPile/stationDetails?id='+item.id
  777. })
  778. /*
  779. uni.navigateTo({
  780. url:'stationAndPile/stationDetails?station='+encodeURIComponent(JSON.stringify(item))
  781. })
  782. */
  783. // //('stationDetail'+JSON.stringify(item))
  784. },
  785. location(e){
  786. if(e.position){
  787. //this.$refs.amap.getPositionByLonLats(e.position);
  788. if(e.position.latitude && e.position.longitude)
  789. if(this.latitude != e.position.latitude ||
  790. this.longitude != e.position.longitude)
  791. {
  792. this.longitude = e.position.longitude;
  793. this.latitude = e.position.latitude;
  794. let data = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  795. this.getChargingStationData(data);
  796. //('获取定位'+JSON.stringify(e));
  797. }
  798. }
  799. },
  800. getChargingStationData(pos){
  801. //return;
  802. if(pos == null)
  803. return ;
  804. // //('getChargingStationData'+JSON.stringify(pos))
  805. let data1 = { pageIndex:0,pageSize:20};
  806. if(this.info.obc_type[this.preference.obc_type_index].text.indexOf('直流快充')>=0)
  807. data1.type = "1";
  808. else if(this.info.obc_type[this.preference.obc_type_index].text.indexOf('交流慢充')>=0)
  809. data1.type = "2";
  810. if(pos.longtitude != null)
  811. data1.longitude = pos.longtitude.toString();
  812. if(pos.latitude != null)
  813. data1.latitude = pos.latitude.toString();
  814. if(this.info.miles_type[this.preference.miles_index].distance!=null)
  815. data1.raidus = this.info.miles_type[this.preference.miles_index].distance.toString();
  816. // data1.online = "0";//在线
  817. if(pos.findType != null)
  818. data1.findType = pos.findType;
  819. else
  820. data1.findType = this.viewMode?"0":"1";
  821. if(data1.findType == "0")
  822. {
  823. // //('getChargingStationData res1'+JSON.stringify(res));
  824. _self.currentIndex = -1;
  825. _self.stationsmap = [];
  826. }else{
  827. _self.stationslist = [];
  828. }
  829. /*
  830. if(this.preference.obc_power.minValue!=null)
  831. data1.powerStart = this.preference.obc_power.minValue.toString();
  832. if(this.preference.obc_power.maxValue!=null)
  833. data1.powerEnd = this.preference.obc_power.maxValue.toString();
  834. */
  835. // //('data1'+JSON.stringify(data1))
  836. uni.showLoading({
  837. })
  838. if (this.carhelp.getPersonInfo()) {
  839. data1.openId=this.carhelp.getOpenId()
  840. }
  841. api.getChargingStationData(data1).then(function(res){
  842. uni.hideLoading()
  843. // //('data1'+JSON.stringify(res))
  844. if(!res.result || !res.data || !res.data.data)
  845. {
  846. //('getChargingStationData res nulll')
  847. return;
  848. }
  849. let items = res.data.data;
  850. if(data1.findType == "0")
  851. {
  852. // //('getChargingStationData res1'+JSON.stringify(res));
  853. // _self.currentIndex = -1;
  854. _self.stationsmap = [];
  855. //let stations = [];
  856. for(let i = 0;i<items.length;i++)
  857. {
  858. let obj = {
  859. name:'',
  860. position:'',
  861. price:1.2,
  862. idleNum:10,
  863. total:10,
  864. type: data1.type == "2" ? '慢充':'快充',
  865. id: i,
  866. distance:0,
  867. time:9,
  868. park: '2小时免费停车',
  869. // longitude: 112.28541 + i * 0.001,
  870. // latitude: 30.308354 + i * 0.01
  871. };
  872. if(items[i].id != null){
  873. obj.id = items[i].id;
  874. obj=items[i];
  875. }
  876. else
  877. continue;
  878. if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
  879. {
  880. obj.type = '快/慢'
  881. }
  882. if(items[i].type=="1" )
  883. {
  884. obj.type = '快充'
  885. }
  886. if(items[i].type=="2" )
  887. {
  888. obj.type = '慢充'
  889. }
  890. if(items[i].name!=null)
  891. obj.name = items[i].name;
  892. if(items[i].address!=null)
  893. obj.position = items[i].address;
  894. if(items[i].costPrice!=null)
  895. obj.price = items[i].costPrice;
  896. if(items[i].availableNum!=null)
  897. obj.idleNum = items[i].availableNum;
  898. if(items[i].totalNum!=null)
  899. obj.total = items[i].totalNum;
  900. if(items[i].longitude!=null)
  901. obj.longitude = items[i].longitude;
  902. if(items[i].latitude!=null)
  903. obj.latitude = items[i].latitude;
  904. if(items[i].distance!=null)
  905. obj.distance = items[i].distance;
  906. if(items[i].time != null){
  907. obj.time = items[i].time;
  908. }
  909. if(items[i].image != null){
  910. obj.image = items[i].image;
  911. }
  912. if(items[i].parkingDescription != null){
  913. obj.parkingDescription = items[i].parkingDescription;
  914. }
  915. if(items[i].park != null)
  916. obj.park = items[i].park;
  917. /*
  918. let obj = {name:items[i].name,
  919. position:items[i].address,
  920. price:items[i].costPrice,
  921. idleNum:items[i].availableNum,
  922. total:items[i].totalNum,
  923. distance:0.1,
  924. time:1,
  925. type:'慢充',
  926. id: items[i].id,
  927. park: i%2 == 0? '以实际费用为准':'2小时免费停车',
  928. longitude: items[i].longitude,
  929. latitude: items[i].latitude
  930. };*/
  931. _self.stationsmap.push(obj);
  932. //stations.push(obj);
  933. }
  934. _self.$refs.amap.calcDistances([_self.longitude, _self.latitude],_self.stationsmap)
  935. _self.$refs.amap.setChargerList(_self.stationsmap);
  936. _self.currentIndex = 0;
  937. //if(_self.stationsmap.length>0)
  938. /*_self.$refs.amap.calcDistances([_self.longitude, _self.latitude],stations)
  939. _self.stationsmap = stations;
  940. _self.$refs.amap.setChargerList(stations);*/
  941. if(_self.stationsmap.length>0)
  942. {
  943. //('刷新Map'+JSON.stringify(_self.stationsmap));
  944. _self.$refs.amap.updateCharger(_self.stationsmap[0]);
  945. //let index = _self.stationsmap.findIndex(item => item.id == _self.stationsmap[0].id);
  946. //('刷新Map Index'+ _self.currentIndex)
  947. }
  948. }else if(data1.findType == "1")
  949. {
  950. _self.stationslist = [];
  951. // //('getChargingStationData res2'+JSON.stringify(res));
  952. for(let i = 0;i<items.length;i++)
  953. {
  954. let obj = {
  955. name:'',
  956. position:'',
  957. price:1.2,
  958. idleNum:10,
  959. total:10,
  960. type: data1.type == "2" ? '慢充':'快充',
  961. id: i,
  962. distance:0,
  963. time:9,
  964. park: '以实际费用为准',
  965. // longitude: 112.28541 + i * 0.001,
  966. // latitude: 30.308354 + i * 0.01
  967. };
  968. if(items[i].id != null){
  969. obj.id = items[i].id;
  970. obj=items[i];
  971. }
  972. else
  973. continue;
  974. if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
  975. {
  976. obj.type = '快/慢'
  977. }
  978. if(items[i].type=="1" )
  979. {
  980. obj.type = '快充'
  981. }
  982. if(items[i].type=="2" )
  983. {
  984. obj.type = '慢充'
  985. }
  986. if(items[i].name!=null)
  987. obj.name = items[i].name;
  988. if(items[i].address!=null)
  989. obj.position = items[i].address;
  990. if(items[i].costPrice!=null)
  991. obj.price = items[i].costPrice;
  992. if(items[i].availableNum!=null)
  993. obj.idleNum = items[i].availableNum;
  994. if(items[i].totalNum!=null)
  995. obj.total = items[i].totalNum;
  996. if(items[i].longitude!=null)
  997. obj.longitude = items[i].longitude;
  998. if(items[i].latitude!=null)
  999. obj.latitude = items[i].latitude;
  1000. if(items[i].distance!=null)
  1001. obj.distance = items[i].distance;
  1002. if(items[i].time != null){
  1003. obj.time = items[i].time;
  1004. }
  1005. if(items[i].parkingDescription != null){
  1006. obj.parkingDescription = items[i].parkingDescription;
  1007. }
  1008. if(items[i].image != null){
  1009. obj.image = items[i].image;
  1010. }
  1011. if(items[i].park != null)
  1012. obj.park = items[i].park;
  1013. //arr.push(obj);
  1014. _self.stationslist.push(obj);
  1015. }
  1016. _self.$refs.amap.calcDistances([_self.longitude, _self.latitude],_self.stationslist)
  1017. // //(' getChargingStationData stations'+JSON.stringify(_self.stationslist))
  1018. }
  1019. },function(err){
  1020. uni.showToast({
  1021. title:err
  1022. })
  1023. //('getChargingStationData err'+JSON.stringify(err))
  1024. }
  1025. )
  1026. // //('getChargingStationData end')
  1027. },
  1028. /*
  1029. charge(item){
  1030. //('扫码充电')
  1031. //#ifdef MP-WEIXIN
  1032. uni.scanCode({
  1033. success:function(res){
  1034. uni.navigateTo({
  1035. url:'chargingPileDetails?pile='+encodeURIComponent(JSON.stringify(data))
  1036. })
  1037. }
  1038. })
  1039. return;
  1040. //#endif
  1041. //('扫码充电1')
  1042. uni.navigateTo({
  1043. url:'stationAndPile/chargingPileDetails'
  1044. })
  1045. }, */
  1046. moveEnd(e){
  1047. //('moveEnd')
  1048. this.close_all();
  1049. let posCenter = this.$refs.amap.logMapInfo();
  1050. ////('posCenter'+JSON.stringify(posCenter))
  1051. let data = {latitude:e.center.lat,longtitude:e.center.lng};
  1052. this.getChargingStationData(data);
  1053. },
  1054. moveStart(e){
  1055. this.close_all();
  1056. },
  1057. clickTabItem (index) {
  1058. //('clickTabaItem'+JSON.stringify(index));
  1059. this.currentIndex = index
  1060. },
  1061. swiperChange (e) {
  1062. //('swiperChange currentIndex'+JSON.stringify(this.currentIndex))
  1063. //('swiperChange'+JSON.stringify(e))
  1064. this.currentIndex = e.detail.current
  1065. let station = this.stationsmap[this.currentIndex];
  1066. let posCenter= {longitude: station.longitude,latitude: station.latitude};
  1067. // //('currentIndex'+JSON.stringify(this.currentIndex))
  1068. // //('currentIndex'+JSON.stringify(posCenter))
  1069. // //('station'+JSON.stringify(station))
  1070. let bounds = this.$refs.amap.logMapInfo();
  1071. /*if( (posCenter.latitude<bounds.bounds.northeast.lat && posCenter.latitude>bounds.bounds.sourthwest.lat)
  1072. && (posCenter.longitude<bounds.bounds.northeast.lng && posCenter.longitude>bounds.bounds.sourthwest.lng)
  1073. ){
  1074. //('bounds'+JSON.stringify(bounds));
  1075. }else{
  1076. this.$refs.amap.setCenter(posCenter);
  1077. }*/
  1078. this.$refs.amap.updateCharger(station);
  1079. this.$refs.amap.setCenter(posCenter);
  1080. },
  1081. swiperTransitionEnd(e){
  1082. //('swiperTransitionEnd'+JSON.stringify(e))
  1083. },
  1084. swiperTransition (e) {
  1085. // //('swiperTransition'+JSON.stringify(e))
  1086. },
  1087. listMode() {
  1088. this.close_all();
  1089. this.viewMode = false
  1090. },
  1091. mapMode() {
  1092. this.close_all();
  1093. this.viewMode = true
  1094. },
  1095. radioChange(e) {
  1096. // //('e'+JSON.stringify(e))
  1097. this.preference.save_preference = e.value;
  1098. // //('save_preference '+this.preference.save_preference);
  1099. },
  1100. handlerDoubleSlider(e) {
  1101. // //('e'+JSON.stringify(e))
  1102. this.preference.obc_power = e;
  1103. //this.preference.obc_power.minValue = e.minValue;
  1104. //this.preference.obc_power.maxValue = e.maxValue;
  1105. },
  1106. selectOBSType(index) {
  1107. this.preference.obc_type_index = index;
  1108. },
  1109. selectOBSStatus(index) {
  1110. this.preference.obc_status_index = index;
  1111. },
  1112. selectOBCVoltage(index) {
  1113. this.preference.obc_voltage_index = index;
  1114. },
  1115. selectMiles(index) {
  1116. this.preference.miles_index = index;
  1117. },
  1118. reset() {
  1119. this.preference.obc_status_index = 0;
  1120. this.preference.obc_voltage_index = 0;
  1121. this.preference.obc_type_index = 0;
  1122. this.preference.miles_index = 3;
  1123. this.preference.save_preference = false;
  1124. // this.$refs.obc_voltage.currentValue = [0,100];
  1125. this.preference.obc_power.minValue = 0;
  1126. this.preference.obc_power.maxValue = 500;
  1127. this.preference.obc_power.minP = Math.floor((this.preference.obc_power.minValue / (this.info.obc_power.maxValue - this.info.obc_power.minValue)) * 100);
  1128. this.preference.obc_power.maxP = Math.floor((this.preference.obc_power.maxValue / (this.info.obc_power.maxValue - this.info.obc_power.minValue)) * 100);
  1129. // //('minP'+this.preference.obc_power.minP)
  1130. // //('maxP'+this.preference.obc_power.maxP)
  1131. this.$refs.obc_voltage.reset(this.preference.obc_power);
  1132. // this.$refs.obc_voltage.currentMaxValue = this.preference.obc_power[1];
  1133. // //('reset')
  1134. },
  1135. close_all(){
  1136. this.$refs.type.closeSelector();
  1137. this.$refs.raidus.closeSelector();
  1138. this.$refs.city.closeSelector();
  1139. this.show = false;
  1140. },
  1141. open() {
  1142. this.$refs.type.closeSelector();
  1143. this.$refs.raidus.closeSelector();
  1144. this.$refs.city.closeSelector();
  1145. this.show = !this.show;
  1146. //this.$refs.obc_voltage.currentMinValue = this.preference.obc_power[0];
  1147. //this.$refs.obc_voltage.currentMaxValue = this.preference.obc_power[1];
  1148. //('open');
  1149. },
  1150. close() {
  1151. //('偏好设置' + JSON.stringify(this.preference));
  1152. this.close_all();
  1153. // this.show = false;
  1154. let data = {latitude:this.latitude,longtitude:this.longitude};
  1155. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  1156. this.raidus = this.info.miles_type[this.preference.miles_index].text;
  1157. if(this.preference.save_preference)
  1158. this.carhelp.set('preference',this.preference)
  1159. this.getChargingStationData(data);
  1160. this.stationslist = this.stationsmap;
  1161. // //('close');
  1162. },
  1163. onClicked(e){
  1164. this.close_all();
  1165. ////('onClicked e'+JSON.stringify(e))
  1166. },
  1167. // 获取当前位置
  1168. clickMap(obj) {
  1169. this.show=false;
  1170. //this.currentIndex = 5;
  1171. // //('longitude1 ' + _self.longitude);
  1172. // //('latitude1 ' + _self.latitude);
  1173. if (obj == null || obj.type == null) return;
  1174. if (obj.type == 'charger') {
  1175. if (obj.obj != null) {
  1176. //_self.$refs.amap.updateCharger(obj.obj);
  1177. let index = _self.stationsmap.findIndex(item => item.id == obj.obj.id);
  1178. _self.currentIndex = index;
  1179. //('find Index'+index);
  1180. }
  1181. /*api.getChargerInfoById(obj).then(
  1182. function(data) {
  1183. if (obj.obj != null) {
  1184. //obj.obj.price = 2.25;
  1185. //obj.obj.idleNum = 12;
  1186. _self.$refs.amap.updateCharger(obj.obj);
  1187. let index = _self.stationsmap.findIndex(item => item.id == obj.obj.id);
  1188. _self.currentIndex = index;
  1189. //('find Index'+index);
  1190. }
  1191. // //('点击1'+JSON.stringify(obj));
  1192. },
  1193. function(err) {
  1194. //('点击2' + JSON.stringify(obj));
  1195. }
  1196. );*/
  1197. }
  1198. },
  1199. mapdown() {
  1200. ////('this'+JSON.stringify(this))
  1201. // //('longitude1 ' + this.longitude);
  1202. // //('latitude1 ' + this.latitude);
  1203. //this.start();
  1204. //this.$refs.amap.getLocation1();
  1205. //this.getNearbyStationInfo();
  1206. let data2 = {latitude:this.latitude,longtitude:this.longitude,findType:"0"};
  1207. this.getChargingStationData(data2);
  1208. this.isReady = true;
  1209. //this.$refs.amap.getLocation ();
  1210. //let state = {};
  1211. uni.getSystemInfo({
  1212. success: (res) => {
  1213. // #ifndef MP
  1214. let navbarH = 0
  1215. // #endif
  1216. // #ifdef MP
  1217. let navbarH = uni.upx2px(90)
  1218. // #endif
  1219. /*state.status_width = res.windowWidth;
  1220. //('window width'+state.status_width);*/
  1221. let scrollH = res.windowHeight;// - uni.upx2px(88) - navbarH
  1222. let scrollW = res.windowWidth;
  1223. // //('布局结果'+ JSON.stringify(res));
  1224. // //('scrollW'+scrollW)
  1225. //#ifdef MP-WEIXIN
  1226. const {
  1227. statusBarHeight,
  1228. windowWidth,
  1229. } = uni.getSystemInfoSync();
  1230. scrollW = windowWidth;
  1231. // //('height ' + statusBarHeight);
  1232. //this.status_height = uni.getStatusbarHeight();
  1233. let res1 = uni.getMenuButtonBoundingClientRect()
  1234. // //('layout selectHeight '+JSON.stringify(res1))
  1235. //state.selectHeight = (res1.top-res.statusBarHeight)*2+ res1.height;
  1236. //#endif
  1237. ////('status height'+state.status_height)
  1238. _self.$refs.amap.setMyStyle("height:"+(scrollH-88-50)+ "px;width:"+scrollW+"px;");
  1239. }
  1240. })
  1241. this.getPoint();
  1242. },
  1243. gotoLine(item, downid) {
  1244. uni.navigateTo({
  1245. url: '/pages/route/index?id=' + item.routeId + '&upid=' + item.startStationId + '&downid=' + downid
  1246. });
  1247. },
  1248. mapopenBtn() {
  1249. this.mapopen = !this.mapopen;
  1250. if (this.mapopen) {
  1251. this.$refs.amap.setMyStyle('width: 100%; height: 340px;');
  1252. } else {
  1253. this.$refs.amap.setMyStyle('width: 100%; height: 140px;');
  1254. }
  1255. },
  1256. getNearbyStationInfo() {
  1257. let data1 = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  1258. this.getChargingStationData(data1);
  1259. let data2 = {latitude:this.latitude,longtitude:this.longitude,findType:"0"};
  1260. this.getChargingStationData(data2);
  1261. },
  1262. theme(type) {
  1263. if(type == 'elder')
  1264. {
  1265. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  1266. let data = {
  1267. backgroundColor: 'transparent',
  1268. "font-size":'36rpx',
  1269. "font-weight":"bold!important"
  1270. };
  1271. this.inputStyle = data;
  1272. }
  1273. else
  1274. {
  1275. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  1276. let data ={
  1277. backgroundColor: 'transparent',
  1278. "font-size":'36rpx',
  1279. "font-weight":"normal"
  1280. };
  1281. this.inputStyle = data;
  1282. }
  1283. }
  1284. }
  1285. };
  1286. </script>
  1287. <style lang="scss" scoped>
  1288. @import "@/_theme.scss";
  1289. .oldTextClassF{
  1290. .price-freeList{
  1291. .price{
  1292. line-height: 56rpx;
  1293. }
  1294. .price .price-2 {
  1295. font-size: 28rpx !important;
  1296. }
  1297. .price .price-1 .num{
  1298. font-size: 56rpx !important;
  1299. }
  1300. .price .price-1 .unit{
  1301. margin-left: 0px;
  1302. }
  1303. }
  1304. }
  1305. .carNone{
  1306. display: flex;
  1307. flex-direction: column;
  1308. justify-content: center;
  1309. align-items: center;
  1310. img{
  1311. width: 100%;
  1312. height: 100%;
  1313. }
  1314. p{
  1315. margin-top: -60px;
  1316. }
  1317. }
  1318. .uni-combox__no-border{
  1319. white-space: nowrap;
  1320. }
  1321. .u-mask {
  1322. position: fixed;
  1323. left: 0;
  1324. top: 576px;
  1325. }
  1326. .content-s{
  1327. height: 440px;
  1328. overflow-y:scroll;
  1329. }
  1330. .cj-slider {
  1331. width: 90%;
  1332. margin: auto;
  1333. }
  1334. .cj-slide__text {
  1335. text-align: center;
  1336. padding: 20rpx;
  1337. }
  1338. .preference_group_item {
  1339. padding: 15rpx;
  1340. }
  1341. .preference_group {
  1342. padding-bottom: 20rpx;
  1343. }
  1344. .preference {
  1345. background-color: #ffffff;
  1346. left: 0rpx;
  1347. position: absolute
  1348. }
  1349. .preference_item {
  1350. margin-bottom: 10rpx;
  1351. margin-left: 20rpx;
  1352. text-align: center;
  1353. border-style: none;
  1354. width: 20%;
  1355. height: 56rpx;
  1356. @include themeify{
  1357. // font-size: themed('font-size2');
  1358. // line-height: themed('font-size2');
  1359. }
  1360. /* line-height: 14px;*/
  1361. }
  1362. .preference_item_medium {
  1363. margin-bottom: 10rpx;
  1364. margin-left: 20rpx;
  1365. text-align: center;
  1366. border-style: none;
  1367. width: 22%;
  1368. height: 56rpx;
  1369. @include themeify{
  1370. font-size: themed('font-size2');
  1371. line-height: themed('font-size2');
  1372. }
  1373. /* line-height: 14px;*/
  1374. }
  1375. .preference_item_plus {
  1376. margin-bottom: 10rpx;
  1377. margin-left: 20rpx;
  1378. align-items: center;
  1379. justify-content: center;
  1380. text-align: center;
  1381. width: 28%;
  1382. border-style: none;
  1383. height: 56rpx;
  1384. @include themeify{
  1385. font-size: themed('font-size2');
  1386. line-height: themed('font-size2');
  1387. }
  1388. /* line-height: 14px;*/
  1389. }
  1390. .preference_label {
  1391. @include themeify{
  1392. color:themed('font_colorLabel');
  1393. font-size: themed('font-size1');
  1394. font-weight: themed('fontWeight');
  1395. }
  1396. margin-left: 20rpx;
  1397. margin-bottom: 100rpx;
  1398. }
  1399. .pre-btn{
  1400. width: 100%;
  1401. height: 96rpx;
  1402. z-index: 999;
  1403. }
  1404. .btn-1,.btn-2{
  1405. height: 96rpx;
  1406. line-height: 96rpx;
  1407. text-align: center;
  1408. border-top: 1px solid rgba(225, 228, 232, 100);
  1409. }
  1410. .map{
  1411. background-color: #ffffff;
  1412. left: 0rpx;
  1413. position: absolute;
  1414. }
  1415. .chargerCard{
  1416. z-index: 999;
  1417. background-color: #fff;
  1418. margin: 0 24rpx;
  1419. border-radius: 16rpx;
  1420. // overflow: hidden;
  1421. bottom: 68px;
  1422. left: 0;
  1423. right: 0;
  1424. position: fixed;
  1425. // height: 380rpx;
  1426. // @include themeify{
  1427. // height:themed('cardHeight');
  1428. // }
  1429. }
  1430. .arrow{
  1431. margin-right: 15rpx;
  1432. }
  1433. .card_item{
  1434. display: flex;
  1435. flex-direction: row;
  1436. @include themeify{
  1437. font-size: themed('font-size2');
  1438. }
  1439. justify-content: space-between;
  1440. }
  1441. .round{
  1442. border-radius:50rpx;
  1443. background-color: #00B962;
  1444. color: #ffffff;
  1445. text-align: center;
  1446. justify-content: center;
  1447. align-items: center;
  1448. @include themeify{
  1449. font-size: themed('font-size2');
  1450. width:themed('buttonWidth')
  1451. }
  1452. /* width: 250rpx;*/
  1453. display: flex;
  1454. flex-direction: row;
  1455. }
  1456. .round2{
  1457. border-radius:50rpx;
  1458. background-color: #00B962;
  1459. color: #ffffff;
  1460. text-align: center;
  1461. justify-content: center;
  1462. align-items: center;
  1463. // width:125rpx;
  1464. }
  1465. .swiper-item{
  1466. }
  1467. .list {
  1468. margin-left: 4rpx;
  1469. }
  1470. .charing-slow-2{
  1471. margin: 0 0 10px 0 !important;
  1472. // border-bottom: 1px solid rgba(238, 242, 240, 100);
  1473. }
  1474. .charing-slow {
  1475. background-color: #fff;
  1476. margin: 36rpx;
  1477. border-radius: 16rpx;
  1478. padding: 40rpx 24rpx 24rpx;
  1479. position: relative;
  1480. left: 0;
  1481. right: 0;
  1482. }
  1483. .fast-charge {
  1484. display: inline-block;
  1485. border-radius: 50px;
  1486. border-radius: 4px;
  1487. background-color: rgba(208, 209, 255, 100);
  1488. color: rgba(56, 60, 255, 100);
  1489. margin: auto 0;
  1490. @include themeify{
  1491. width: themed('font-size18');
  1492. font-size: themed('font-size2');
  1493. line-height: themed('font-size7');
  1494. height: themed('font-size8');
  1495. }
  1496. text-align: center;
  1497. }
  1498. .fast-trickle-charge {
  1499. display: inline-block;
  1500. margin: auto 0;
  1501. border-radius: 4px;
  1502. background-color: rgba(172, 236, 240, 100);
  1503. color: rgba(0, 124, 134, 100);
  1504. @include themeify{
  1505. width: themed('font-size18');
  1506. font-size: themed('font-size2');
  1507. line-height: themed('font-size7');
  1508. height: themed('font-size8');
  1509. }
  1510. text-align: center;
  1511. }
  1512. .trickle-charge {
  1513. display: inline-block;
  1514. border-radius: 4px;
  1515. margin: auto 0;
  1516. background-color: rgba(186, 240, 215, 100);
  1517. color: rgba(0, 130, 69, 100);
  1518. @include themeify{
  1519. width: themed('font-size18');
  1520. font-size: themed('font-size2');
  1521. line-height: themed('font-size7');
  1522. height: themed('font-size8');
  1523. }
  1524. text-align: center;
  1525. }
  1526. .station-items {
  1527. display: inline-block;
  1528. /* height: 16px;
  1529. line-height: 16px;*/
  1530. @include themeify{
  1531. font-size: themed('font-size3');
  1532. font-weight: themed('fontWeight');
  1533. line-height: themed('font-size3');
  1534. height: themed('font-size3');
  1535. }
  1536. margin-left: 8rpx;
  1537. color: #101010;
  1538. }
  1539. //
  1540. .address {
  1541. width: 100%;
  1542. line-height: 20px;
  1543. display: flex;
  1544. justify-content: space-between;
  1545. .name{
  1546. font-size: 16px;
  1547. white-space: nowrap;
  1548. overflow: hidden;
  1549. text-overflow: ellipsis;
  1550. }
  1551. .distance{
  1552. color: rgba(102, 102, 102, 100);
  1553. font-size: 12px;
  1554. width:80px;
  1555. .iconfont{
  1556. font-size: 12px;
  1557. margin-right: 2px;
  1558. }
  1559. }
  1560. @include themeify{
  1561. font-size: themed('font-size5');
  1562. line-height: themed('font-size7');
  1563. }
  1564. /* font-size: 11px;*/
  1565. font-weight: 600;
  1566. color: #101010;
  1567. }
  1568. .price-free{
  1569. width: 100%;
  1570. display: flex;
  1571. align-items: center;
  1572. justify-content: space-between;
  1573. margin-top: 8px;
  1574. }
  1575. .price {
  1576. display: flex;
  1577. align-items: baseline;
  1578. line-height: 40rpx;
  1579. .price-1{
  1580. .num {
  1581. color: rgba(255, 98, 0, 100);
  1582. @include themeify{
  1583. font-size: themed('font-size5');
  1584. height: themed('font-size5');
  1585. }
  1586. text-align: left;
  1587. font-family: Roboto-medium;
  1588. }
  1589. .unit {
  1590. // font-size: 12px;
  1591. color: rgba(102, 102, 102, 100);
  1592. @include themeify{
  1593. // font-size: themed('font-size2');
  1594. font-size: 12px;
  1595. height: themed('font-size2');
  1596. }
  1597. text-align: left;
  1598. font-family: AlibabaPuHui-regular;
  1599. margin-left: 8rpx;
  1600. }
  1601. }
  1602. .price-2{
  1603. color: rgba(153, 153, 153, 100);
  1604. margin-left: 6rpx;
  1605. text-decoration: line-through;
  1606. font-size: 24rpx
  1607. }
  1608. }
  1609. .free{
  1610. display: flex;
  1611. align-items: center;
  1612. .slow,.fast{
  1613. display: flex;
  1614. .fast-font{
  1615. width: 40rpx;
  1616. height: 40rpx;
  1617. line-height: 40rpx;
  1618. border-radius: 4px;
  1619. background-color: rgba(186, 240, 215, 100);
  1620. color: rgba(0, 130, 69, 100);
  1621. font-size: 28rpx;
  1622. text-align: center;
  1623. margin-right: 2rpx;
  1624. }
  1625. .slow-font{
  1626. width: 40rpx;
  1627. height: 40rpx;
  1628. line-height: 40rpx;
  1629. border-radius: 4px;
  1630. background-color: rgba(226, 226, 226, 100);
  1631. color: rgba(128, 128, 128, 100);
  1632. font-size: 28rpx;
  1633. text-align: center;
  1634. margin-right: 2rpx;
  1635. }
  1636. .num{
  1637. font-size: 32rpx;color: rgba(0, 145, 67, 100);
  1638. line-height: 40rpx;
  1639. }
  1640. }
  1641. .slow{
  1642. margin-left: 16rpx;
  1643. }
  1644. }
  1645. .park {
  1646. margin-top: 16rpx;
  1647. display: flex;
  1648. }
  1649. .park-p {
  1650. display: inline-block;
  1651. width: 20px;
  1652. /* height: 18px;
  1653. line-height: 12px;*/
  1654. @include themeify{
  1655. line-height: themed('font-size1');
  1656. height: themed('font-size4');
  1657. }
  1658. text-align: center;
  1659. // background-color: rgba(125, 177, 255, 100);
  1660. background-color: #00b962;
  1661. color: #fff;
  1662. }
  1663. .park-text {
  1664. display: inline-block;
  1665. color: rgba(102, 102, 102, 100);
  1666. @include themeify{
  1667. font-size: themed('font-size1');
  1668. height:themed('font-size4');
  1669. }
  1670. /* font-size: 12px;*/
  1671. text-align: left;
  1672. margin-left: 4px;
  1673. margin-top: 2px;
  1674. }
  1675. .map {
  1676. width: 100%;
  1677. height: 100%;
  1678. position: relative;
  1679. }
  1680. #container {
  1681. width: 100%;
  1682. height: 100%;
  1683. }
  1684. .distance-font {
  1685. @include themeify{
  1686. font-size: themed('font-size3');
  1687. }
  1688. /* font-size: 16px*/
  1689. }
  1690. .position{
  1691. color: #1677ff;
  1692. @include themeify{
  1693. font-size: themed('font-size2');
  1694. }
  1695. /* font-size: 14px*/
  1696. }
  1697. .position-box{
  1698. position:absolute;
  1699. top: 341px;
  1700. right: 118px;
  1701. width: 16px;
  1702. height: 16px;
  1703. /* line-height: 20px; */
  1704. background-color: rgba(22, 119, 255, 100);
  1705. text-align: center;
  1706. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.4);
  1707. border: 2px solid rgba(255, 255, 255, 100);
  1708. border-radius: 999px;
  1709. }
  1710. .min-h{
  1711. min-height: 65px;
  1712. }
  1713. .sign{
  1714. display: flex;
  1715. flex-wrap: wrap;
  1716. margin-top: 10px;
  1717. .sign-1{
  1718. height: 20px;
  1719. line-height: 20px;
  1720. border-radius: 4px;
  1721. background-color: rgba(255, 255, 255, 100);
  1722. color: rgba(255, 139, 0, 100);
  1723. font-size: 12px;
  1724. text-align: center;
  1725. border: 1px solid rgba(255, 139, 0, 100);
  1726. padding: 0 4px;
  1727. margin-right: 8px;
  1728. margin-bottom: 4px;
  1729. }
  1730. .sign-2{
  1731. height: 20px;
  1732. line-height: 20px;
  1733. border-radius: 4px;
  1734. background-color: rgba(255, 255, 255, 100);
  1735. color: rgba(153, 153, 153, 100);
  1736. font-size: 12px;
  1737. text-align: center;
  1738. border: 1px solid rgba(204, 204, 204, 100);
  1739. padding: 0 4px;
  1740. margin-right: 8px;
  1741. margin-bottom: 4px;
  1742. }
  1743. }
  1744. .park-text2 {
  1745. width: 140%;
  1746. }
  1747. .park-text3 {
  1748. white-space: nowrap;
  1749. text-overflow: ellipsis;
  1750. overflow: hidden;
  1751. }
  1752. </style>