1 #206

Merged
xiaomeng merged 1 commits from pc-master into portal 2024-12-20 01:19:17 +00:00
1 changed files with 25 additions and 7 deletions

View File

@ -937,19 +937,37 @@ export default {
//3(-400) / 10
//4(-1000) / 10
countType1(data) {
if(data==undefined){
return ''
}
var num = data - 400
return num.toFixed(2)
},
countType5(data) {
if(data==undefined){
return ''
}
var num = data / 100
return num.toFixed(2)
},
countType2(data) {
if(data==undefined){
return ''
}
var num = data / 10
return num.toFixed(2)
},
countType3(data) {
if(data==undefined){
return ''
}
var num = (data - 400) / 10
return num.toFixed(2)
},
countType4(data) {
if(data==undefined){
return ''
}
var num = (data - 1000) / 10
return num.toFixed(2)
},
@ -1477,17 +1495,17 @@ export default {
this.api.getControlGetState(TargetValue).then(res => {
if (res.data.code == 200) {
this.voltData=res.data.data
this.voltData['1208']=this.countType2(res.data.data['1208'])
this.voltData['1208']=this.countType5(res.data.data['1208'])
this.voltData['1209']=this.countType1(res.data.data['1209'])
this.voltData['1210']=this.countType2(res.data.data['1210'])
this.voltData['1210']=this.countType5(res.data.data['1210'])
this.voltData['1211']=this.countType1(res.data.data['1211'])
this.voltData['1212']=this.countType2(res.data.data['1212'])
this.voltData['1212']=this.countType5(res.data.data['1212'])
this.voltData['1213']=this.countType1(res.data.data['1213'])
this.voltData['1214']=this.countType2(res.data.data['1214'])
this.voltData['1214']=this.countType5(res.data.data['1214'])
this.voltData['1215']=this.countType1(res.data.data['1215'])
this.voltData['1216']=this.countType2(res.data.data['1216'])
this.voltData['1216']=this.countType5(res.data.data['1216'])
this.voltData['1217']=this.countType1(res.data.data['1217'])
this.voltData['1218']=this.countType2(res.data.data['1218'])
this.voltData['1218']=this.countType5(res.data.data['1218'])
this.voltData['1219']=this.countType1(res.data.data['1219'])
if (res.data.data["1119"]) {
this.sunrise = this.insertColonEveryTwoDigits(