|
@@ -18,8 +18,8 @@
|
|
|
<block v-if="queryType==1">
|
|
<block v-if="queryType==1">
|
|
|
<view class="option-box">
|
|
<view class="option-box">
|
|
|
<view class="option-time ddflex">
|
|
<view class="option-time ddflex">
|
|
|
- <view>更新时间: 2023-04-03 11:09:08</view>
|
|
|
|
|
- <view class="refresh ddflex">
|
|
|
|
|
|
|
+ <view>更新时间: {{time}}</view>
|
|
|
|
|
+ <view class="refresh ddflex" @click="getData()">
|
|
|
<image src="../../static/pages/images/refresh.png"></image>
|
|
<image src="../../static/pages/images/refresh.png"></image>
|
|
|
<text>刷新</text>
|
|
<text>刷新</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -27,7 +27,7 @@
|
|
|
<view style="position: relative;">
|
|
<view style="position: relative;">
|
|
|
<view style="height: 130rpx;"></view>
|
|
<view style="height: 130rpx;"></view>
|
|
|
<view style="margin-top: 40rpx;justify-content: center;position: absolute;left: 50%;transform: translateX(-50%);top: -50%;" class="ddflex">
|
|
<view style="margin-top: 40rpx;justify-content: center;position: absolute;left: 50%;transform: translateX(-50%);top: -50%;" class="ddflex">
|
|
|
- <cell :width="99" :height="197" :soc="6*10" :showsoc="true" :rotate="90"></cell>
|
|
|
|
|
|
|
+ <cell :width="99" :height="197" :soc="info.State.SOC" :showsoc="true" :rotate="90"></cell>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -35,92 +35,92 @@
|
|
|
<view class="bms-info">
|
|
<view class="bms-info">
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>电池数量:</text>
|
|
|
|
|
- <text class="bms-row-data">17 串</text>
|
|
|
|
|
|
|
+ <text>电池类型:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.BetteryType==1?'铁锂':'三元'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>剩余容量:</text>
|
|
|
|
|
- <text class="bms-row-data">31.6 AH</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>工作状态:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.WorkStatus==1?'充电中':info.State.WorkStatus==2?'闲置':'放电中'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
<text>总电压:</text>
|
|
<text>总电压:</text>
|
|
|
- <text class="bms-row-data">66.99V</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>电流数据:</text>
|
|
|
|
|
- <text class="bms-row-data">0A</text>
|
|
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.BetteryV_All}}V </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>最低电压:</text>
|
|
|
|
|
- <text class="bms-row-data">3.934 V</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>最高电压:</text>
|
|
|
|
|
- <text class="bms-row-data">3.946V</text>
|
|
|
|
|
|
|
+ <text>标称容量:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.FCC}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>相差电压:</text>
|
|
|
|
|
- <text class="bms-row-data">0.012V</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>平均电压:</text>
|
|
|
|
|
- <text class="bms-row-data">3.94V</text>
|
|
|
|
|
|
|
+ <text>剩余容量:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.SYLA}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>温度数量:</text>
|
|
|
|
|
- <text class="bms-row-data">2个</text>
|
|
|
|
|
|
|
+ <text>充电电流:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.CPowerA}}A </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>校准容量:</text>
|
|
|
|
|
- <text class="bms-row-data">36.1AH</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>剩余容量百分比:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.SOC}}% </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>温度:</text>
|
|
|
|
|
- <text class="bms-row-data"> [20°C][20°C]</text>
|
|
|
|
|
|
|
+ <text>充电保护状态:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.CPStatus==1?'硬控保护':info.State.CPStatus==2?'软控保护':'正常'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>功率:</text>
|
|
|
|
|
- <text class="bms-row-data">0KW</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>放电保护状态:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.DPStatus==1?'硬控保护':info.State.DPStatus==2?'软控保护':'正常'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>充电状态:</text>
|
|
|
|
|
- <text class="bms-row-data">静止</text>
|
|
|
|
|
|
|
+ <text>短路保护:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.SCProtect==1?'保护':'正常'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>均衡开闭:</text>
|
|
|
|
|
- <text class="bms-row-data">关闭</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>均衡类型:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.BetteryType==1?'被动':info.State.BetteryType==2?'主动':'无'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>循环摞碍次数:</text>
|
|
|
|
|
- <text class="bms-row-data">216次</text>
|
|
|
|
|
|
|
+ <text>均衡开关:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{(info.State.EM==1||info.State.EM=='Open')?'打开':'关闭'}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>固件版本:</text>
|
|
|
|
|
- <text class="bms-row-data">0KW</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>保护板温度:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.TC_T}}°C </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bms-row ddflex">
|
|
<view class="bms-row ddflex">
|
|
|
<view class="fflex ddflex">
|
|
<view class="fflex ddflex">
|
|
|
- <text>连接状态:</text>
|
|
|
|
|
- <text class="bms-row-data">已连接</text>
|
|
|
|
|
|
|
+ <text>出厂日期:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.CCXX}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fflex ddflex bms-row-right">
|
|
|
|
|
- <text>设备编码:</text>
|
|
|
|
|
- <text class="bms-row-data">613880983244</text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="bms-row ddflex">
|
|
|
|
|
+ <view class="fflex ddflex">
|
|
|
|
|
+ <text>厂商编码:</text>
|
|
|
|
|
+ <text class="bms-row-data">{{info.State.BMSCode}} </text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -129,25 +129,25 @@
|
|
|
<block v-if="queryType==2">
|
|
<block v-if="queryType==2">
|
|
|
<view class="option-box">
|
|
<view class="option-box">
|
|
|
<view class="option-time ddflex">
|
|
<view class="option-time ddflex">
|
|
|
- <view>更新时间: 2023-04-03 11:09:08</view>
|
|
|
|
|
- <view class="refresh ddflex">
|
|
|
|
|
|
|
+ <view>更新时间: {{time}}</view>
|
|
|
|
|
+ <view class="refresh ddflex" @click="getData()">
|
|
|
<image src="../../static/pages/images/refresh.png"></image>
|
|
<image src="../../static/pages/images/refresh.png"></image>
|
|
|
<text>刷新</text>
|
|
<text>刷新</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="ddflex state">
|
|
|
|
|
|
|
+ <!-- <view class="ddflex state">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view>充电开关:</view>
|
|
<view>充电开关:</view>
|
|
|
- <view style="color: #A8A5A5;">开启</view>
|
|
|
|
|
|
|
+ <view style="color: #A8A5A5;">{{info.Seting.CHON==1?'开启':'关闭'}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <switch style="transform: scale(0.6);" color="#FF753A"></switch>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <switch style="transform: scale(0.6);" :checked="info.Seting.CHON" color="#FF753A"></switch>
|
|
|
|
|
+ </view> -->
|
|
|
<view class="ddflex state">
|
|
<view class="ddflex state">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view>放电开关:</view>
|
|
<view>放电开关:</view>
|
|
|
- <view style="color: #A8A5A5;">关闭</view>
|
|
|
|
|
|
|
+ <view style="color: #A8A5A5;">{{info.Seting.DHON==1?'开启':'关闭'}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <switch style="transform: scale(0.6);" color="#FF753A"></switch>
|
|
|
|
|
|
|
+ <switch style="transform: scale(0.6);" :checked="info.Seting.DHON==1?true:false" color="#FF753A" @change="switchChange"></switch>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
@@ -159,6 +159,7 @@
|
|
|
const app = getApp();
|
|
const app = getApp();
|
|
|
const req = require("../../utils/request.js");
|
|
const req = require("../../utils/request.js");
|
|
|
import cell from "../../components/cell/index";
|
|
import cell from "../../components/cell/index";
|
|
|
|
|
+ const utils = require("../../utils/util");
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -171,10 +172,15 @@
|
|
|
isTop:0,
|
|
isTop:0,
|
|
|
|
|
|
|
|
queryType: 1,
|
|
queryType: 1,
|
|
|
|
|
+
|
|
|
|
|
+ id:null,
|
|
|
|
|
+ info:{},
|
|
|
|
|
+ time:''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
-
|
|
|
|
|
|
|
+ this.id = options.id
|
|
|
|
|
+ this.getData()
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
|
|
@@ -191,24 +197,59 @@
|
|
|
if (this.queryType == val) return false
|
|
if (this.queryType == val) return false
|
|
|
this.queryType = val
|
|
this.queryType = val
|
|
|
},
|
|
},
|
|
|
|
|
+ getData(){
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title:'加载中'
|
|
|
|
|
+ })
|
|
|
|
|
+ req.getRequest('/admin/v2/battery/bmsData',{batteryId:this.id},res=>{
|
|
|
|
|
+ this.info = res[0]
|
|
|
|
|
+ this.info.Seting = JSON.parse(this.info.Seting)
|
|
|
|
|
+ this.info.State = JSON.parse(this.info.State)
|
|
|
|
|
+ this.time = utils.formatTime(new Date()).t1
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ switchChange(event){
|
|
|
|
|
+ event.detail.value = event.detail.value?1:0
|
|
|
|
|
+ this.info.Seting.DHON = event.detail.value
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title:'提示',
|
|
|
|
|
+ content:event.detail.value?'确定开启放电开关?':'确定关闭放电开关?',
|
|
|
|
|
+ success: (r) => {
|
|
|
|
|
+ if(r.confirm){
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title:event.detail.value?'开启中':'关闭中',
|
|
|
|
|
+ })
|
|
|
|
|
+ req.postRequest('/admin/v2/battery/bmsSend',{batteryId:this.id,type:event.detail.value},res=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(res){
|
|
|
|
|
+ // req.msg(event.detail.value?'开启成功':'关闭成功')
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title:'提示',
|
|
|
|
|
+ content:'操作成功,该操作会有延迟,请稍候查看最新状态',
|
|
|
|
|
+ showCancel:false,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ that.getData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else {
|
|
|
|
|
+ req.msg(event.detail.value?'开启失败':'关闭失败')
|
|
|
|
|
+ this.info.Seting.DHON = this.info.Seting.DHON==1?0:1
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.info.Seting.DHON = this.info.Seting.DHON==1?0:1
|
|
|
|
|
+ // this.getData()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
- // px转换到rpx的比例
|
|
|
|
|
- let pxToRpxScale = 750 / systemInfo.windowWidth;
|
|
|
|
|
- let systems = {
|
|
|
|
|
- ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
|
|
|
|
|
- navigationHeight: 44 * pxToRpxScale // 导航栏的高度
|
|
|
|
|
- };
|
|
|
|
|
- systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
|
|
|
|
|
- this.systems = systems;
|
|
|
|
|
},
|
|
},
|
|
|
onPageScroll: function(e) {
|
|
onPageScroll: function(e) {
|
|
|
- if (e.scrollTop > this.systems.barHeight) {
|
|
|
|
|
- this.isTop = 1;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.isTop = 0;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|