|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view style="padding:0 30rpx;" class="ddflex">
|
|
|
- <view class="cell-item" v-for="item,index in groupList">
|
|
|
+ <view class="cell-item" v-for="item,index in groupList" @click="jumpUrl('/machineAndCell/machineItemManage/machineItemManage?id='+item.doorId+'&devId='+id)">
|
|
|
<view class="cell-item-num">{{item.doorId?item.doorId:0}}</view>
|
|
|
<block v-if="item.boxEnable==0">
|
|
|
<view :style="(item.boxStatus==5||item.boxStatus==6)?'margin-top: 30rpx;':'margin-top: 70rpx;'"></view>
|
|
|
@@ -29,6 +29,14 @@
|
|
|
</view>
|
|
|
<view class="cell-item-info fflex">
|
|
|
<view class="cell-item-info-item ddflex">
|
|
|
+ <view>机柜状态</view>
|
|
|
+ <view>{{item.boxEnable==1?'启用':'禁用'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="cell-item-info-item ddflex">
|
|
|
+ <view>柜门</view>
|
|
|
+ <view>{{item.doorStatus==1?'开':item.doorStatus==0?'关':'-'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="cell-item-info-item ddflex">
|
|
|
<view>型号</view>
|
|
|
<view>{{item.model}}</view>
|
|
|
</view>
|
|
|
@@ -38,7 +46,15 @@
|
|
|
</view>
|
|
|
<view class="cell-item-info-item ddflex">
|
|
|
<view>电压</view>
|
|
|
- <view>{{item.batVol}}V</view>
|
|
|
+ <view>{{item.batVol?item.batVol:'-'}}V</view>
|
|
|
+ </view>
|
|
|
+ <view class="cell-item-info-item ddflex">
|
|
|
+ <view>电流</view>
|
|
|
+ <view>{{item.chgCur?item.chgCur:'-'}}A</view>
|
|
|
+ </view>
|
|
|
+ <view class="cell-item-info-item ddflex">
|
|
|
+ <view>温度</view>
|
|
|
+ <view>{{item.batTemp?item.batTemp:'-'}}℃</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -47,7 +63,10 @@
|
|
|
</view>
|
|
|
</block>
|
|
|
</block>
|
|
|
- <view class="cell-item-option" @click="jumpUrl('/machineAndCell/machineItemManage/machineItemManage?id='+item.doorId+'&devId='+id)">仓位管理</view>
|
|
|
+ <view class="cell-item-option ddflex">
|
|
|
+ <view class="fflex btn" style="margin-right: 10rpx;" @click.stop="boxEnableChange(item)">{{item.boxEnable==1?'禁用':'启用'}}</view>
|
|
|
+ <view class="fflex btn" @click.stop="open(item)">开仓</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -138,6 +157,53 @@
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
+
|
|
|
+ // 禁用
|
|
|
+ boxEnableChange(item){
|
|
|
+ let open = item.boxEnable==1?false:true
|
|
|
+ uni.showModal({
|
|
|
+ title:'提示',
|
|
|
+ content:open?'确定启用该仓门?':'确定禁用该仓门?',
|
|
|
+ success: (r) => {
|
|
|
+ if(r.confirm){
|
|
|
+ uni.showLoading({
|
|
|
+ title:open?'启用中':'禁用中',
|
|
|
+ })
|
|
|
+ req.postRequest('/admin/v2/cab/ableDoor',{devId:this.id,doorId:item.doorId,cabEnable:open?1:0},res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res){
|
|
|
+ req.msg(open?'启用成功':'禁用成功')
|
|
|
+ // if(item.boxEnable == 1){
|
|
|
+ // item.boxEnable = 0
|
|
|
+ // }else{
|
|
|
+ // item.boxEnable = 1
|
|
|
+ // }
|
|
|
+ // this.groupList = JSON.parse(JSON.stringify(this.groupList))
|
|
|
+ }else {
|
|
|
+ req.msg(open?'启用失败':'禁用失败')
|
|
|
+ }
|
|
|
+ this.getDataList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 开仓
|
|
|
+ open(item){
|
|
|
+ uni.showLoading({
|
|
|
+ title:'开门中',
|
|
|
+ })
|
|
|
+ req.postRequest('/admin/v2/cab/openDoor',{devId:this.id,doorId:item.doorId},res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res){
|
|
|
+ req.msg('操作成功')
|
|
|
+ }else {
|
|
|
+ req.msg('操作失败')
|
|
|
+ }
|
|
|
+ this.getDataList()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
|