|
@@ -24,7 +24,7 @@
|
|
|
-->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="screen-item">
|
|
|
+ <view class="screen-item" v-if="false">
|
|
|
<view class="screen-head">充电桩类型</view>
|
|
|
<view class="screen-main">
|
|
|
<view :class="{
|
|
@@ -46,14 +46,28 @@
|
|
|
<view class="screen-main">
|
|
|
<view class="screen-entry " :class="{
|
|
|
active:selectstationId==''
|
|
|
- }" @click="selectstationId=''">全部</view>
|
|
|
- <view v-for="(item,i) in stationList" :key="i" :class="{
|
|
|
- active:selectstationId==item.id
|
|
|
- }" @click="selectstationId=item.id,selectdeviceNo=''" class="screen-entry">{{item.name}}</view>
|
|
|
+ }" @click="selectstationId=''">全部</view>
|
|
|
+
|
|
|
+
|
|
|
+ <template v-for="(item,i) in stationList" >
|
|
|
+
|
|
|
+ <view class="screen-head"
|
|
|
+ style="width: 100%;"
|
|
|
+ v-if="getStationNo(i)" :key="i" >
|
|
|
+
|
|
|
+ {{item.stationNo.substring(0,1)}}类</view>
|
|
|
+ <view
|
|
|
+ :key="i"
|
|
|
+ :class="{
|
|
|
+ active:selectstationId==item.id
|
|
|
+ }"
|
|
|
+ @click="selectstationId=item.id,selectdeviceNo=''"
|
|
|
+ class="screen-entry" >{{item.name}}</view>
|
|
|
+ </template>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="screen-item">
|
|
|
+ <view class="screen-item" v-show="selectstationId">
|
|
|
<view class="screen-head">桩号</view>
|
|
|
<view class="screen-main">
|
|
|
|
|
@@ -295,7 +309,27 @@
|
|
|
this.getStation()
|
|
|
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ getStationNo(i){
|
|
|
+ var no=this.stationList[i].stationNo
|
|
|
+ if(no){
|
|
|
+ if(i==0){
|
|
|
+ return true
|
|
|
+ }else{
|
|
|
+ var no2=this.stationList[i-1].stationNo
|
|
|
+ console.log(no2,no)
|
|
|
+ if(no2){
|
|
|
+ return no2.substring(0,1)!=no.substring(0,1)
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
|
},
|
|
@@ -467,9 +501,7 @@
|
|
|
|
|
|
var list2=list.sort(function(item1,item2){
|
|
|
|
|
|
- if(item1.stationNo.indexOf("D")==0){
|
|
|
- return 1
|
|
|
- }
|
|
|
+
|
|
|
return (item1.stationNo>item2.stationNo)?1:-1
|
|
|
})
|
|
|
for(var i in list2){
|