|
@@ -30,75 +30,87 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106) + 'rpx;'"></view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="ddflex state-box">
|
|
|
|
|
- <view class="state-item">
|
|
|
|
|
- <view class="ddflex">
|
|
|
|
|
- <view class="icon"></view>
|
|
|
|
|
- <view class="state-label">租赁中</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="ddflex state-data">
|
|
|
|
|
- <view>{{count.leaseCount?count.leaseCount:0}}</view>
|
|
|
|
|
- <view>{{getP(1)}}%</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="state-item">
|
|
|
|
|
- <view class="ddflex">
|
|
|
|
|
- <view class="icon" style="background: #0FCB27;"></view>
|
|
|
|
|
- <view class="state-label">空闲</view>
|
|
|
|
|
|
|
+ <block v-if="isLogin">
|
|
|
|
|
+ <view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106) + 'rpx;'"></view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="ddflex state-box">
|
|
|
|
|
+ <view class="state-item">
|
|
|
|
|
+ <view class="ddflex">
|
|
|
|
|
+ <view class="icon"></view>
|
|
|
|
|
+ <view class="state-label">租赁中</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="ddflex state-data">
|
|
|
|
|
+ <view>{{count.leaseCount?count.leaseCount:0}}</view>
|
|
|
|
|
+ <view>{{getP(1)}}%</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="ddflex fflex state-data">
|
|
|
|
|
- <view>{{count.noLeaseCount?count.noLeaseCount:0}}</view>
|
|
|
|
|
- <view>{{getP(2)}}%</view>
|
|
|
|
|
|
|
+ <view class="state-item">
|
|
|
|
|
+ <view class="ddflex">
|
|
|
|
|
+ <view class="icon" style="background: #0FCB27;"></view>
|
|
|
|
|
+ <view class="state-label">空闲</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="ddflex fflex state-data">
|
|
|
|
|
+ <view>{{count.noLeaseCount?count.noLeaseCount:0}}</view>
|
|
|
|
|
+ <view>{{getP(2)}}%</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 电池 -->
|
|
|
|
|
- <view>
|
|
|
|
|
- <view class="cell-box" v-for="item,index in groupList">
|
|
|
|
|
- <view class="ddflex">
|
|
|
|
|
- <view style="margin-right: 35rpx;">
|
|
|
|
|
- <cell :width="99" :height="197" :soc="item.leaseStatus==1?50:100" :showsoc="false"></cell>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="cell-info fflex">
|
|
|
|
|
- <view class="ddflex">
|
|
|
|
|
- <view class="cell-title">{{item.model}}</view>
|
|
|
|
|
- <view class="cell-state" :style="item.leaseStatus==1?'':'background-color: #0FCB27;'">{{item.leaseStatus==1?'已租':'空闲'}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="cell-info ddflex">
|
|
|
|
|
- <view>电池Id:</view>
|
|
|
|
|
- <view>{{item.batteryId?item.batteryId:'暂无电池'}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="cell-info ddflex">
|
|
|
|
|
- <view>设备编号:</view>
|
|
|
|
|
- <view>{{item.number}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="cell-info ddflex">
|
|
|
|
|
- <view>门店:</view>
|
|
|
|
|
- <view>{{item.storeName}}</view>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 电池 -->
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <view class="cell-box" v-for="item,index in groupList">
|
|
|
|
|
+ <view class="ddflex">
|
|
|
|
|
+ <view style="margin-right: 35rpx;">
|
|
|
|
|
+ <cell :width="99" :height="197" :soc="item.leaseStatus==1?50:100" :showsoc="false"></cell>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="cell-info ddflex">
|
|
|
|
|
- <view>到期时间:</view>
|
|
|
|
|
- <view>{{item.blockDate}}</view>
|
|
|
|
|
|
|
+ <view class="cell-info fflex">
|
|
|
|
|
+ <view class="ddflex">
|
|
|
|
|
+ <view class="cell-title">{{item.model}}</view>
|
|
|
|
|
+ <view class="cell-state" :style="item.leaseStatus==1?'':'background-color: #0FCB27;'">{{item.leaseStatus==1?'已租':'空闲'}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="cell-info ddflex">
|
|
|
|
|
+ <view>电池Id:</view>
|
|
|
|
|
+ <view>{{item.batteryId?item.batteryId:'暂无电池'}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="cell-info ddflex">
|
|
|
|
|
+ <view>设备编号:</view>
|
|
|
|
|
+ <view>{{item.number}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="cell-info ddflex">
|
|
|
|
|
+ <view>门店:</view>
|
|
|
|
|
+ <view>{{item.storeName}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="cell-info ddflex">
|
|
|
|
|
+ <view>到期时间:</view>
|
|
|
|
|
+ <view>{{item.blockDate}}</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="cell-option ddflex">
|
|
|
|
|
+ <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
|
|
|
|
|
+ <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
|
|
|
|
|
+ <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="cell-option ddflex">
|
|
|
|
|
- <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
|
|
|
|
|
- <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
|
|
|
|
|
- <view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if="groupList.length==0">
|
|
|
|
|
+ <view class="nodata">
|
|
|
|
|
+ <image :src="picUrlss+'empty.png'"></image>
|
|
|
|
|
+ <text>暂无电池~</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </block>
|
|
|
|
|
|
|
|
- <view v-if="groupList.length==0">
|
|
|
|
|
- <view class="nodata">
|
|
|
|
|
- <image :src="picUrlss+'empty.png'"></image>
|
|
|
|
|
- <text>暂无电池~</text>
|
|
|
|
|
|
|
+ <view v-else>
|
|
|
|
|
+ <view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight) + 'rpx;'"></view>
|
|
|
|
|
+ <view class="wei-login" v-if="!isLogin">
|
|
|
|
|
+ <image :src="picUrlss + 'wei_login.png'"></image>
|
|
|
|
|
+ <view>暂未登录</view>
|
|
|
|
|
+ <navigator url="/pages/authorize/authorize" hover-class="none" class="cart-login">立即登录</navigator>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<left-pop v-if="showPop" :showPop="showPop" :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒" width="460rpx"
|
|
<left-pop v-if="showPop" :showPop="showPop" :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒" width="460rpx"
|
|
|
@closePop="closePop()" @popSubmit="popSubmit()">
|
|
@closePop="closePop()" @popSubmit="popSubmit()">
|
|
@@ -140,6 +152,8 @@
|
|
|
systems: {},
|
|
systems: {},
|
|
|
isTop:0,
|
|
isTop:0,
|
|
|
|
|
|
|
|
|
|
+ isLogin:false,
|
|
|
|
|
+
|
|
|
userInfo:{},
|
|
userInfo:{},
|
|
|
|
|
|
|
|
showPop: false,
|
|
showPop: false,
|
|
@@ -164,7 +178,8 @@
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
// 判断当前登录用户身份
|
|
// 判断当前登录用户身份
|
|
|
- if(req.isLogins(true)){
|
|
|
|
|
|
|
+ if(req.isLogins(false)){
|
|
|
|
|
+ this.isLogin = true
|
|
|
this.userInfo = req.getStorage('userInfo')
|
|
this.userInfo = req.getStorage('userInfo')
|
|
|
|
|
|
|
|
if(!this.userInfo.storeId){
|
|
if(!this.userInfo.storeId){
|
|
@@ -177,9 +192,11 @@
|
|
|
this.getTopNum()
|
|
this.getTopNum()
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- this.getMachineList()
|
|
|
|
|
|
|
+ this.isLogin = false
|
|
|
|
|
+ // this.getMachineList()
|
|
|
}
|
|
}
|
|
|
uni.$on('reSetLogin',(data)=>{
|
|
uni.$on('reSetLogin',(data)=>{
|
|
|
|
|
+ this.isLogin = true
|
|
|
console.log('reSetLogin')
|
|
console.log('reSetLogin')
|
|
|
this.actMerchant = null
|
|
this.actMerchant = null
|
|
|
// 判断当前登录用户身份
|
|
// 判断当前登录用户身份
|
|
@@ -195,11 +212,18 @@
|
|
|
this.getMachineList()
|
|
this.getMachineList()
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- this.getMachineList()
|
|
|
|
|
|
|
+ this.isLogin = false
|
|
|
|
|
+ // this.getMachineList()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ if(req.isLogins(false)){
|
|
|
|
|
+ this.isLogin = true
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.isLogin = false
|
|
|
|
|
+ // this.getMachineList()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
this.getMachineList(true)
|
|
this.getMachineList(true)
|