|
@@ -10,14 +10,7 @@
|
|
{{obj1.deviceNo}}
|
|
{{obj1.deviceNo}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="item">
|
|
|
|
- <view class="title">
|
|
|
|
- 设备名称
|
|
|
|
- </view>
|
|
|
|
- <view class="content">
|
|
|
|
- {{obj1.name}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
+
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="title">
|
|
<view class="title">
|
|
设备类型
|
|
设备类型
|
|
@@ -72,7 +65,15 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-picker mode="selector" v-model="isswitchshow" :range="objlist" range-key="name" :default-selector="columnsindex" @confirm="switchBtn" ></u-picker>
|
|
<u-picker mode="selector" v-model="isswitchshow" :range="objlist" range-key="name" :default-selector="columnsindex" @confirm="switchBtn" ></u-picker>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ <!-- <view class="item">
|
|
|
|
+ <view class="title">
|
|
|
|
+ 设备名称
|
|
|
|
+ </view>
|
|
|
|
+ <view class="content">
|
|
|
|
+ {{obj1.name}}
|
|
|
|
+ </view>
|
|
|
|
+ </view> -->
|
|
<view class="equipment-infos">
|
|
<view class="equipment-infos">
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="title">
|
|
<view class="title">
|
|
@@ -81,10 +82,24 @@
|
|
<view class="content" style="color: #acacac;">
|
|
<view class="content" style="color: #acacac;">
|
|
|
|
|
|
<u-input v-model="stationName"
|
|
<u-input v-model="stationName"
|
|
- :placeholder="obj2.name"
|
|
|
|
|
|
+ :placeholder="obj2.name"
|
|
|
|
+ @focus="focus(0)"
|
|
type="text" :border="false" />
|
|
type="text" :border="false" />
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="title">
|
|
|
|
+ <text>*</text>车位号
|
|
|
|
+ </view>
|
|
|
|
+ <view class="content" style="color: #acacac;">
|
|
|
|
+
|
|
|
|
+ <u-input v-model="deviceName"
|
|
|
|
+ @focus="focus(1)"
|
|
|
|
+ :placeholder="obj1.name"
|
|
|
|
+ type="text" :border="false" />
|
|
|
|
+
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<button class="btn" @click="submit">确认绑定并激活</button>
|
|
<button class="btn" @click="submit">确认绑定并激活</button>
|
|
@@ -101,7 +116,8 @@
|
|
return {
|
|
return {
|
|
id:"",
|
|
id:"",
|
|
obj1:{},obj2:{},
|
|
obj1:{},obj2:{},
|
|
- stationName:"",
|
|
|
|
|
|
+ stationName:"",
|
|
|
|
+ deviceName:"",
|
|
objlist:[],
|
|
objlist:[],
|
|
isswitchshow:false,
|
|
isswitchshow:false,
|
|
columnsindex:[0],
|
|
columnsindex:[0],
|
|
@@ -116,7 +132,20 @@
|
|
onReady() {
|
|
onReady() {
|
|
|
|
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ focus(k){
|
|
|
|
+ if(k==0){
|
|
|
|
+ if(!this.stationName){
|
|
|
|
+ this.stationName=this.obj2.name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(k==1){
|
|
|
|
+ if(!this.deviceName){
|
|
|
|
+ this.deviceName=this.obj1.name;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
switchBtn(e){
|
|
switchBtn(e){
|
|
this.columnsindex=e;
|
|
this.columnsindex=e;
|
|
|
|
|
|
@@ -127,14 +156,19 @@
|
|
submit(){
|
|
submit(){
|
|
if(!this.stationName){
|
|
if(!this.stationName){
|
|
this.stationName=this.obj2.name;
|
|
this.stationName=this.obj2.name;
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ if(!this.deviceName){
|
|
|
|
+ this.deviceName=this.obj1.name;
|
|
|
|
+ }
|
|
|
|
+
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "加载中",
|
|
title: "加载中",
|
|
mask: true,
|
|
mask: true,
|
|
})
|
|
})
|
|
API.bindCategoryDevice({
|
|
API.bindCategoryDevice({
|
|
deviceNo:this.id,
|
|
deviceNo:this.id,
|
|
- stationName:this.stationName,
|
|
|
|
|
|
+ stationName:this.stationName,
|
|
|
|
+ deviceName:this.deviceName,
|
|
stationId:this.obj2.id
|
|
stationId:this.obj2.id
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
//this.obj = res.data
|
|
//this.obj = res.data
|
|
@@ -196,8 +230,8 @@
|
|
border-bottom: solid 1px #C2C2C2;
|
|
border-bottom: solid 1px #C2C2C2;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
.title{
|
|
.title{
|
|
-
|
|
|
|
- margin-right: 42rpx;
|
|
|
|
|
|
+ width: 80px;
|
|
|
|
+
|
|
color: #777777;
|
|
color: #777777;
|
|
text{
|
|
text{
|
|
color: #ee3138;
|
|
color: #ee3138;
|