|
@@ -35,15 +35,15 @@
|
|
|
|
|
|
|
|
<view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
|
|
<view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
|
|
|
<view class="p1">
|
|
<view class="p1">
|
|
|
- <view v-if="portDetail.portStatus == 2">
|
|
|
|
|
|
|
+ <view v-if="portStatus == 2">
|
|
|
{{$t('charge.charging')}}
|
|
{{$t('charge.charging')}}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view v-else-if="portDetail.portStatus == 6">
|
|
|
|
|
|
|
+ <view v-else-if="portStatus == 6">
|
|
|
{{$t('charge.planed')}}
|
|
{{$t('charge.planed')}}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view v-else-if="portDetail.portStatus == 5">
|
|
|
|
|
|
|
+ <view v-else-if="portStatus == 5">
|
|
|
{{$t('charge.connected')}}
|
|
{{$t('charge.connected')}}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -58,39 +58,44 @@
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view style="display: flex;flex-direction: row;margin:0 33%;" v-if="curPort.length>1">
|
|
|
|
|
+ <view class="port_item" :class="item.id==choosePort?'selected_item':''" v-for="item in curPort" @click="selectPort(item.id);">{{ i18(item.text )}}</view>
|
|
|
|
|
+ </view>
|
|
|
<view class="dstatus">
|
|
<view class="dstatus">
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/tmp.png"/>
|
|
<image class="itemimg" src="/static/images/new/tmp.png"/>
|
|
|
- <view class="item-value">{{portDetail.dev_temper}}℃</view>
|
|
|
|
|
|
|
+ <view class="item-value">{{deviceTemp}}℃</view>
|
|
|
<span class="item-text">{{$t('charge.devtemper')}}</span>
|
|
<span class="item-text">{{$t('charge.devtemper')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/dianya.png"/>
|
|
<image class="itemimg" src="/static/images/new/dianya.png"/>
|
|
|
- <view class="item-value">{{ portDetail.voltage }}V</view>
|
|
|
|
|
|
|
+ <view class="item-value">{{ deviceV }}V</view>
|
|
|
<span class="item-text">{{$t('charge.voltage')}}</span>
|
|
<span class="item-text">{{$t('charge.voltage')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/dianliu.png"/>
|
|
<image class="itemimg" src="/static/images/new/dianliu.png"/>
|
|
|
- <view class="item-value" v-if="portDetail.voltage == 0">0A</view>
|
|
|
|
|
- <view class="item-value" v-else>{{portDetail.POWER/portDetail.voltage}}A</view>
|
|
|
|
|
|
|
+ <view class="item-value" v-if="deviceV==0">0A</view>
|
|
|
|
|
+ <view class="item-value" v-else>
|
|
|
|
|
+ {{currentValue}}A
|
|
|
|
|
+ </view>
|
|
|
<span class="item-text">{{$t('charge.current')}}</span>
|
|
<span class="item-text">{{$t('charge.current')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/shjian.png"/>
|
|
<image class="itemimg" src="/static/images/new/shjian.png"/>
|
|
|
- <view class="item-value">{{ portDetail.time }}{{ i18('分钟') }}</view>
|
|
|
|
|
|
|
+ <view class="item-value" >{{ chargeTime }}{{ i18('分钟') }}</view>
|
|
|
<span class="item-text">{{$t('charge.chargetime')}}</span>
|
|
<span class="item-text">{{$t('charge.chargetime')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/gonglv.png"/>
|
|
<image class="itemimg" src="/static/images/new/gonglv.png"/>
|
|
|
- <view class="item-value">{{ portDetail.power }}W</view>
|
|
|
|
|
|
|
+ <view class="item-value" >{{ gonglv }}W</view>
|
|
|
<span class="item-text">{{$t('charge.power')}}</span>
|
|
<span class="item-text">{{$t('charge.power')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="ditem">
|
|
<view class="ditem">
|
|
|
<image class="itemimg" src="/static/images/new/dianliang.png"/>
|
|
<image class="itemimg" src="/static/images/new/dianliang.png"/>
|
|
|
- <view class="item-value">{{ portDetail.elec }} {{ i18('度') }}</view>
|
|
|
|
|
|
|
+ <view class="item-value" >{{ dianliang}} {{ i18('度') }}</view>
|
|
|
<span class="item-text">{{$t('charge.elec')}}</span>
|
|
<span class="item-text">{{$t('charge.elec')}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -191,47 +196,60 @@ let isCheckRevHex = false
|
|
|
let isCheckSendHex = false
|
|
let isCheckSendHex = false
|
|
|
let sendData = ''
|
|
let sendData = ''
|
|
|
export default {
|
|
export default {
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- locale:"",
|
|
|
|
|
- oldPwd:"",
|
|
|
|
|
- pwd:"",
|
|
|
|
|
- showPwd:false,
|
|
|
|
|
- planCols:[ ],
|
|
|
|
|
- columnData:[],
|
|
|
|
|
- showPlan:false,
|
|
|
|
|
- deviceInfo:{},
|
|
|
|
|
- visitTime:"",
|
|
|
|
|
- timer:null,
|
|
|
|
|
- showPort:false,
|
|
|
|
|
- portDetail:{portStatus:0,POWER:0,voltage:0},
|
|
|
|
|
- statusTimer:"",
|
|
|
|
|
- connected:false,
|
|
|
|
|
- scriptTask:null,
|
|
|
|
|
- choosePort:1,
|
|
|
|
|
- portList:[[{port:1,text:"端口一"}]],
|
|
|
|
|
- planInfo:null,
|
|
|
|
|
- days:["","周一","周二","周三","周四","周五","周六","周日"],
|
|
|
|
|
- textRevData: '',
|
|
|
|
|
- picker:null,
|
|
|
|
|
- firstInit:false,
|
|
|
|
|
- hasRight:false,
|
|
|
|
|
- startAutoCharge:true,
|
|
|
|
|
- initPwd:"123456",
|
|
|
|
|
- showInitPwd:false,
|
|
|
|
|
- uuid:"",
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- imgUrl() {
|
|
|
|
|
- return getApp().globalData.config.imgUrl;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- onLoad() {
|
|
|
|
|
- this.locale = uni.getLocale();
|
|
|
|
|
- console.log("status comeing")
|
|
|
|
|
- this.checkPassword();
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ chargeTime:0,
|
|
|
|
|
+ deviceTemp:0,
|
|
|
|
|
+ deviceV:0,
|
|
|
|
|
+ currentValue:0,
|
|
|
|
|
+ gonglv:0,
|
|
|
|
|
+ dianliang:0,
|
|
|
|
|
+ portStatus:0,
|
|
|
|
|
+ locale:"",
|
|
|
|
|
+ oldPwd:"",
|
|
|
|
|
+ pwd:"",
|
|
|
|
|
+ showPwd:false,
|
|
|
|
|
+ planCols:[ ],
|
|
|
|
|
+ columnData:[],
|
|
|
|
|
+ showPlan:false,
|
|
|
|
|
+ deviceInfo:{},
|
|
|
|
|
+ visitTime:"",
|
|
|
|
|
+ timer:null,
|
|
|
|
|
+ showPort:false,
|
|
|
|
|
+ portDetail:{portStatus:0,power:0,voltage:0,time:0,dev_temper:0,elec:0,dev_temper:0},
|
|
|
|
|
+ statusTimer:"",
|
|
|
|
|
+ connected:false,
|
|
|
|
|
+ scriptTask:null,
|
|
|
|
|
+ choosePort:1,
|
|
|
|
|
+ portList:[[{port:1,text:"端口一"}]],
|
|
|
|
|
+ planInfo:null,
|
|
|
|
|
+ days:["","周一","周二","周三","周四","周五","周六","周日"],
|
|
|
|
|
+ textRevData: '',
|
|
|
|
|
+ picker:null,
|
|
|
|
|
+ firstInit:false,
|
|
|
|
|
+ hasRight:false,
|
|
|
|
|
+ startAutoCharge:true,
|
|
|
|
|
+ initPwd:"123456",
|
|
|
|
|
+ showInitPwd:false,
|
|
|
|
|
+ uuid:"",
|
|
|
|
|
+ curPort:[],
|
|
|
|
|
+ firstRender:false,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ imgUrl() {
|
|
|
|
|
+ return getApp().globalData.config.imgUrl;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ // #ifdef MP
|
|
|
|
|
+ this.firstRender = true;
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ this.locale = uni.getLocale();
|
|
|
|
|
+ console.log("status comeing")
|
|
|
|
|
+ this.checkPassword();
|
|
|
|
|
+ // this.messageCallback({"type":103,"real_data":{"port_first_status":1,"power":0,"elec":0,"money":0,"time":0,"port_second_status":2,"power_1":0,"elec_1":3,"money_1":50000,"time_1":367,"dev_temper":17,"voltage":228,"":249,"portStatus":1,"currentValue":"0.0"}})
|
|
|
|
|
+ },
|
|
|
onShow(){
|
|
onShow(){
|
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
|
title: this.$t('page.detail')
|
|
title: this.$t('page.detail')
|
|
@@ -240,9 +258,14 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
onUnload (){
|
|
onUnload (){
|
|
|
- this.closeSocket();
|
|
|
|
|
|
|
+ this.closeSocket();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selectPort(id){
|
|
|
|
|
+ this.choosePort = id;
|
|
|
|
|
+ console.log(this.choosePort)
|
|
|
|
|
+ this.getInfo();
|
|
|
|
|
+ },
|
|
|
copyPwd(){
|
|
copyPwd(){
|
|
|
uni.setClipboardData({
|
|
uni.setClipboardData({
|
|
|
data: this.uuid,
|
|
data: this.uuid,
|
|
@@ -251,9 +274,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- i18(text){
|
|
|
|
|
- return i18(text)
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ i18(text){
|
|
|
|
|
+ return i18(text)
|
|
|
|
|
+ },
|
|
|
toPage(){
|
|
toPage(){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: '/pages/weitiandi/bluetooth/index'
|
|
url: '/pages/weitiandi/bluetooth/index'
|
|
@@ -263,7 +286,7 @@ export default {
|
|
|
this.showPwd = false;
|
|
this.showPwd = false;
|
|
|
},
|
|
},
|
|
|
modifyPwd(){
|
|
modifyPwd(){
|
|
|
- this.showPwd = true;
|
|
|
|
|
|
|
+ this.showPwd = true;
|
|
|
},
|
|
},
|
|
|
inputPwd(){
|
|
inputPwd(){
|
|
|
let rightPwd = uni.getStorageSync("pwd");
|
|
let rightPwd = uni.getStorageSync("pwd");
|
|
@@ -283,17 +306,17 @@ export default {
|
|
|
this.$modal.showToast("密码不能设置为123456");
|
|
this.$modal.showToast("密码不能设置为123456");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(!this.pwd){
|
|
|
|
|
- this.$modal.showToast("密码不能为空");
|
|
|
|
|
- }else {
|
|
|
|
|
- setPwd(this.pwd);
|
|
|
|
|
- this.oldPwd = this.pwd;
|
|
|
|
|
- uni.removeStorageSync("pwd");
|
|
|
|
|
- this.$modal.showToast("密码修改成功");
|
|
|
|
|
- this.showPwd = false;
|
|
|
|
|
- this.showInitPwd = false;
|
|
|
|
|
- // this.goBack();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(!this.pwd){
|
|
|
|
|
+ this.$modal.showToast("密码不能为空");
|
|
|
|
|
+ }else {
|
|
|
|
|
+ setPwd(this.pwd);
|
|
|
|
|
+ this.oldPwd = this.pwd;
|
|
|
|
|
+ uni.removeStorageSync("pwd");
|
|
|
|
|
+ this.$modal.showToast("密码修改成功");
|
|
|
|
|
+ this.showPwd = false;
|
|
|
|
|
+ this.showInitPwd = false;
|
|
|
|
|
+ // this.goBack();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
confirm(e) {
|
|
confirm(e) {
|
|
@@ -432,28 +455,74 @@ export default {
|
|
|
})
|
|
})
|
|
|
self.getInfo();
|
|
self.getInfo();
|
|
|
},
|
|
},
|
|
|
- messageCallback(data){
|
|
|
|
|
|
|
+ messageCallback(data,flag){
|
|
|
let self = this;
|
|
let self = this;
|
|
|
- console.log(data);
|
|
|
|
|
let type = data.type;
|
|
let type = data.type;
|
|
|
let real_data = data.real_data;
|
|
let real_data = data.real_data;
|
|
|
if(type == 103){
|
|
if(type == 103){
|
|
|
- self.portDetail = real_data
|
|
|
|
|
|
|
+ self.portDetail = real_data;
|
|
|
self.portList = [[]];
|
|
self.portList = [[]];
|
|
|
|
|
+ self.curPort = [];
|
|
|
let port_first_status = self.portDetail["port_first_status"];
|
|
let port_first_status = self.portDetail["port_first_status"];
|
|
|
let port_second_status = self.portDetail["port_second_status"]
|
|
let port_second_status = self.portDetail["port_second_status"]
|
|
|
if(port_first_status){
|
|
if(port_first_status){
|
|
|
self.portList[0].push({port:1,text:"端口一"});
|
|
self.portList[0].push({port:1,text:"端口一"});
|
|
|
|
|
+ self.curPort.push({
|
|
|
|
|
+ text:"端口一",
|
|
|
|
|
+ status:port_first_status,
|
|
|
|
|
+ id:1,
|
|
|
|
|
+ })
|
|
|
|
|
+ let power = self.portDetail.power;
|
|
|
|
|
+ let voltage = parseInt(self.portDetail.voltage);
|
|
|
|
|
+ if(voltage >0){
|
|
|
|
|
+ let current = power/voltage;
|
|
|
|
|
+ current = current.toFixed(1);
|
|
|
|
|
+ self.portDetail.currentValue = current;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if(port_second_status){
|
|
if(port_second_status){
|
|
|
self.portList[0].push({port:2,text:"端口二"});
|
|
self.portList[0].push({port:2,text:"端口二"});
|
|
|
|
|
+ self.curPort.push({
|
|
|
|
|
+ text:"端口二",
|
|
|
|
|
+ status:port_second_status,
|
|
|
|
|
+ id:2
|
|
|
|
|
+ })
|
|
|
|
|
+ let power = self.portDetail.power_1;
|
|
|
|
|
+ let voltage = parseInt(self.portDetail.voltage);
|
|
|
|
|
+ if(voltage >0){
|
|
|
|
|
+ let current = power/voltage;
|
|
|
|
|
+ current = current.toFixed(1);
|
|
|
|
|
+ self.portDetail.currentValue_1 = current;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
let choosePort = self.choosePort
|
|
let choosePort = self.choosePort
|
|
|
|
|
+ /**
|
|
|
|
|
+ * chargeTime:0,
|
|
|
|
|
+ * deviceTemp:0,
|
|
|
|
|
+ * deviceV:0,
|
|
|
|
|
+ * currentValue:0,
|
|
|
|
|
+ * gonglv:0,
|
|
|
|
|
+ * dianliang:0,
|
|
|
|
|
+ * portStatus:0,
|
|
|
|
|
+ */
|
|
|
if(choosePort == 1){
|
|
if(choosePort == 1){
|
|
|
self.portDetail.portStatus = port_first_status;
|
|
self.portDetail.portStatus = port_first_status;
|
|
|
|
|
+ self.chargeTime = self.portDetail.time;
|
|
|
|
|
+ self.gonglv = self.portDetail.power;
|
|
|
|
|
+ self.dianliang = self.portDetail.elec/100;
|
|
|
|
|
+ self.currentValue = self.portDetail.currentValue;
|
|
|
}else if(choosePort == 2){
|
|
}else if(choosePort == 2){
|
|
|
self.portDetail.portStatus = port_second_status;
|
|
self.portDetail.portStatus = port_second_status;
|
|
|
|
|
+ self.chargeTime = self.portDetail.time_1;
|
|
|
|
|
+ self.gonglv = self.portDetail.power_1;
|
|
|
|
|
+ self.dianliang = self.portDetail.elec_1/100;
|
|
|
|
|
+ self.currentValue = self.portDetail.currentValue_1;
|
|
|
}
|
|
}
|
|
|
|
|
+ self.portStatus = self.portDetail.portStatus;
|
|
|
|
|
+ self.deviceTemp = self.portDetail.dev_temper;
|
|
|
|
|
+ self.deviceV = self.portDetail.voltage;
|
|
|
self.$modal.closeLoading();
|
|
self.$modal.closeLoading();
|
|
|
}
|
|
}
|
|
|
if(type == 116){
|
|
if(type == 116){
|
|
@@ -471,7 +540,11 @@ export default {
|
|
|
self.uuid = real_data.substr(0,6);
|
|
self.uuid = real_data.substr(0,6);
|
|
|
}
|
|
}
|
|
|
self.$forceUpdate();
|
|
self.$forceUpdate();
|
|
|
- console.log('收到服务器内容:' + JSON.stringify(data));
|
|
|
|
|
|
|
+ if(!flag){
|
|
|
|
|
+ console.log('收到服务器内容:' + JSON.stringify(data));
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("当前对象内容")
|
|
|
|
|
+ console.log(self.portDetail)
|
|
|
if(!this.firstInit){
|
|
if(!this.firstInit){
|
|
|
this.firstInit = true;
|
|
this.firstInit = true;
|
|
|
let autoCharge = self.getAutoChargeValue()
|
|
let autoCharge = self.getAutoChargeValue()
|
|
@@ -511,10 +584,10 @@ export default {
|
|
|
if(data != null){
|
|
if(data != null){
|
|
|
let planType = data.planType;
|
|
let planType = data.planType;
|
|
|
if(planType == 1){//单次预约
|
|
if(planType == 1){//单次预约
|
|
|
- let planInfo = {};
|
|
|
|
|
- planInfo.runTime = data.runTime;
|
|
|
|
|
- this.planInfo = planInfo;
|
|
|
|
|
- this.planInfo.id = data.id;
|
|
|
|
|
|
|
+ let planInfo = {};
|
|
|
|
|
+ planInfo.runTime = data.runTime;
|
|
|
|
|
+ this.planInfo = planInfo;
|
|
|
|
|
+ this.planInfo.id = data.id;
|
|
|
}else{
|
|
}else{
|
|
|
let planInfo = {};
|
|
let planInfo = {};
|
|
|
planInfo.runTime = data.runTime;
|
|
planInfo.runTime = data.runTime;
|
|
@@ -522,10 +595,10 @@ export default {
|
|
|
let days = repeatDays.split(",")
|
|
let days = repeatDays.split(",")
|
|
|
let strs = "";
|
|
let strs = "";
|
|
|
for (let i = 0; i < days.length; i++) {
|
|
for (let i = 0; i < days.length; i++) {
|
|
|
- if(strs.length>0){
|
|
|
|
|
- strs+=",";
|
|
|
|
|
- }
|
|
|
|
|
- strs +=this.days[days[i]];
|
|
|
|
|
|
|
+ if(strs.length>0){
|
|
|
|
|
+ strs+=",";
|
|
|
|
|
+ }
|
|
|
|
|
+ strs +=this.days[days[i]];
|
|
|
}
|
|
}
|
|
|
this.planInfo = planInfo;
|
|
this.planInfo = planInfo;
|
|
|
this.planInfo.runTime = strs+" "+data.repeatTime;
|
|
this.planInfo.runTime = strs+" "+data.repeatTime;
|
|
@@ -577,7 +650,7 @@ export default {
|
|
|
let portStatus = this.portDetail.portStatus;
|
|
let portStatus = this.portDetail.portStatus;
|
|
|
if(portStatus == 2){//需要停止充电
|
|
if(portStatus == 2){//需要停止充电
|
|
|
this.$modal.confirm("需要停止充电么?").then(res=>{
|
|
this.$modal.confirm("需要停止充电么?").then(res=>{
|
|
|
- this.stopCharge();
|
|
|
|
|
|
|
+ this.stopCharge();
|
|
|
})
|
|
})
|
|
|
}else{
|
|
}else{
|
|
|
if(portStatus == 1){
|
|
if(portStatus == 1){
|
|
@@ -593,27 +666,37 @@ export default {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- getInfo(flag) {
|
|
|
|
|
-
|
|
|
|
|
- // let str = "AA 67 0D 01 00 00 00 00 00 00 00 00 00 25 E2 00 80";
|
|
|
|
|
- // let data = parseDataObj(str);
|
|
|
|
|
- // this.messageCallback(data);
|
|
|
|
|
- //
|
|
|
|
|
- //
|
|
|
|
|
- this.$modal.loading("正在获取状态,请稍等...");
|
|
|
|
|
- if(flag){
|
|
|
|
|
|
|
+ getInfo(flag) {
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ // setTimeout(function (){
|
|
|
|
|
+ // self.messageCallback({"type":103,"real_data":{"port_first_status":1,"power":0,"elec":0,"money":0,"time":0,"port_second_status":2,"power_1":0,"elec_1":3,"money_1":50000,"time_1":367,"dev_temper":17,"voltage":228,"":249,"portStatus":1,"currentValue":"0.0"}})
|
|
|
|
|
+ //
|
|
|
|
|
+ // },50);
|
|
|
|
|
+ //
|
|
|
|
|
+ // setTimeout(function (){
|
|
|
|
|
+ // self.messageCallback({"type":103,"real_data":{"port_first_status":1,"power":0,"elec":0,"money":0,"time":0,"port_second_status":2,"power_1":0,"elec_1":3,"money_1":50000,"time_1":367,"dev_temper":17,"voltage":228,"":249,"portStatus":1,"currentValue":"0.0"}})
|
|
|
|
|
+ //
|
|
|
|
|
+ // },150);
|
|
|
|
|
+ //
|
|
|
|
|
+ // setTimeout(function (){
|
|
|
|
|
+ // self.messageCallback({"type":103,"real_data":{"port_first_status":1,"power":0,"elec":0,"money":0,"time":0,"port_second_status":2,"power_1":0,"elec_1":3,"money_1":50000,"time_1":367,"dev_temper":17,"voltage":228,"":249,"portStatus":1,"currentValue":"0.0"}})
|
|
|
|
|
+ //
|
|
|
|
|
+ // },250);
|
|
|
|
|
+
|
|
|
|
|
+ this.$modal.loading("正在获取状态,请稍等...");
|
|
|
|
|
+ if(flag){
|
|
|
setTimeout(function (){
|
|
setTimeout(function (){
|
|
|
sendPortDetailCmd().then(res => {
|
|
sendPortDetailCmd().then(res => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
},500)
|
|
},500)
|
|
|
- }else{
|
|
|
|
|
- sendPortDetailCmd().then(res => {
|
|
|
|
|
|
|
+ }else{
|
|
|
|
|
+ sendPortDetailCmd().then(res => {
|
|
|
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
stopCharge(){
|
|
stopCharge(){
|
|
|
let self = this;
|
|
let self = this;
|
|
|
this.deviceInfo.port = this.choosePort;
|
|
this.deviceInfo.port = this.choosePort;
|
|
@@ -638,17 +721,17 @@ export default {
|
|
|
this.startPortDetailTimer();
|
|
this.startPortDetailTimer();
|
|
|
},
|
|
},
|
|
|
startPortDetailTimer(){
|
|
startPortDetailTimer(){
|
|
|
- let self = this;
|
|
|
|
|
|
|
+ let self = this;
|
|
|
this.timer = setTimeout(function (){
|
|
this.timer = setTimeout(function (){
|
|
|
getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
|
|
getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
|
|
|
- let data = res.data;
|
|
|
|
|
- if(data != null){
|
|
|
|
|
- self.portDetail = data;
|
|
|
|
|
- self.checkStatusCheck();
|
|
|
|
|
- self.$modal.closeLoading();
|
|
|
|
|
- }else{
|
|
|
|
|
- self.startPortDetailTimer();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let data = res.data;
|
|
|
|
|
+ if(data != null){
|
|
|
|
|
+ self.portDetail = data;
|
|
|
|
|
+ self.checkStatusCheck();
|
|
|
|
|
+ self.$modal.closeLoading();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ self.startPortDetailTimer();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
},1000);
|
|
},1000);
|
|
|
},
|
|
},
|
|
@@ -677,9 +760,9 @@ export default {
|
|
|
statusChangeTimer(){
|
|
statusChangeTimer(){
|
|
|
let self = this;
|
|
let self = this;
|
|
|
this.statusTimer = setTimeout(function(){
|
|
this.statusTimer = setTimeout(function(){
|
|
|
- if(!this.checkOnPage()){
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(!this.checkOnPage()){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
|
|
checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
|
|
|
let data = res.data;
|
|
let data = res.data;
|
|
|
if(data != null){
|
|
if(data != null){
|
|
@@ -872,7 +955,7 @@ export default {
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
}
|
|
}
|
|
|
.body-bottom{
|
|
.body-bottom{
|
|
|
-padding:0 22px;
|
|
|
|
|
|
|
+ padding:0 22px;
|
|
|
}
|
|
}
|
|
|
.body-bottom .info-content{
|
|
.body-bottom .info-content{
|
|
|
width: 30%;
|
|
width: 30%;
|
|
@@ -1199,4 +1282,14 @@ padding:0 22px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
z-index: 9999;
|
|
z-index: 9999;
|
|
|
}
|
|
}
|
|
|
|
|
+.port_item{
|
|
|
|
|
+ color: #1A87FF;
|
|
|
|
|
+ padding: 5px;
|
|
|
|
|
+ border: 1px solid #1A87FF;
|
|
|
|
|
+}
|
|
|
|
|
+.selected_item{
|
|
|
|
|
+ color: white !important;
|
|
|
|
|
+ padding: 5px;
|
|
|
|
|
+ background: #1A87FF !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|