|
@@ -62,7 +62,17 @@
|
|
|
{{obj2.address}}
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="item" v-if="objlist.length>1">
|
|
|
+ <view class="title">
|
|
|
+ 绑定站点
|
|
|
+ </view>
|
|
|
+ <view class="content" style="color: #275cbf;" @click="isswitchshow=true" >
|
|
|
+ {{obj2.name}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <u-picker mode="selector" v-model="isswitchshow" :range="objlist" range-key="name" :default-selector="columnsindex" @confirm="switchBtn" ></u-picker>
|
|
|
+
|
|
|
<view class="equipment-infos">
|
|
|
<view class="item">
|
|
|
<view class="title">
|
|
@@ -92,7 +102,9 @@
|
|
|
id:"",
|
|
|
obj1:{},obj2:{},
|
|
|
stationName:"",
|
|
|
-
|
|
|
+ objlist:[],
|
|
|
+ isswitchshow:false,
|
|
|
+ columnsindex:[0],
|
|
|
}
|
|
|
},
|
|
|
onLoad(op) {
|
|
@@ -105,6 +117,13 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ switchBtn(e){
|
|
|
+ this.columnsindex=e;
|
|
|
+
|
|
|
+ this.obj2=this.objlist[e[0]]
|
|
|
+
|
|
|
+ //
|
|
|
+ },
|
|
|
submit(){
|
|
|
if(!this.stationName){
|
|
|
this.stationName=this.obj2.name;
|
|
@@ -115,7 +134,8 @@
|
|
|
})
|
|
|
API.bindCategoryDevice({
|
|
|
deviceNo:this.id,
|
|
|
- stationName:this.stationName
|
|
|
+ stationName:this.stationName,
|
|
|
+ stationId:this.obj2.id
|
|
|
}).then((res) => {
|
|
|
//this.obj = res.data
|
|
|
|
|
@@ -142,7 +162,8 @@
|
|
|
deviceNo:this.id
|
|
|
}).then((res) => {
|
|
|
this.obj1 = res.data.chargingDevice
|
|
|
- this.obj2 = res.data.chargingStation
|
|
|
+ this.objlist= res.data.chargingStationList;
|
|
|
+ this.obj2 = res.data.chargingStationList[0]
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|