Compare commits

...

2 Commits

Author SHA1 Message Date
xiaomeng e91d03de73 Merge pull request '1' (#206) from pc-master into portal
Reviewed-on: #206
2024-12-20 01:19:17 +00:00
sunmeng 54922e39c1 1 2024-12-20 09:04:55 +08:00
1 changed files with 25 additions and 7 deletions

View File

@ -937,19 +937,37 @@ export default {
//3(-400) / 10 //3(-400) / 10
//4(-1000) / 10 //4(-1000) / 10
countType1(data) { countType1(data) {
if(data==undefined){
return ''
}
var num = data - 400 var num = data - 400
return num.toFixed(2) return num.toFixed(2)
}, },
countType5(data) {
if(data==undefined){
return ''
}
var num = data / 100
return num.toFixed(2)
},
countType2(data) { countType2(data) {
if(data==undefined){
return ''
}
var num = data / 10 var num = data / 10
return num.toFixed(2) return num.toFixed(2)
}, },
countType3(data) { countType3(data) {
if(data==undefined){
return ''
}
var num = (data - 400) / 10 var num = (data - 400) / 10
return num.toFixed(2) return num.toFixed(2)
}, },
countType4(data) { countType4(data) {
if(data==undefined){
return ''
}
var num = (data - 1000) / 10 var num = (data - 1000) / 10
return num.toFixed(2) return num.toFixed(2)
}, },
@ -1477,17 +1495,17 @@ export default {
this.api.getControlGetState(TargetValue).then(res => { this.api.getControlGetState(TargetValue).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.voltData=res.data.data 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['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['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['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['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['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']) this.voltData['1219']=this.countType1(res.data.data['1219'])
if (res.data.data["1119"]) { if (res.data.data["1119"]) {
this.sunrise = this.insertColonEveryTwoDigits( this.sunrise = this.insertColonEveryTwoDigits(