Commit f0718c2a authored by 张俊's avatar 张俊

健康状态

parent 4fbce66b
......@@ -1412,11 +1412,16 @@ export default {
.then(response => {
console.log(response);
let data = response.data.data;
var temp = Math.round(
(data.seriesData[0].value /
(data.seriesData[0].value + data.seriesData[1].value)) *
100
);
var temp = 0
if(data.seriesData[0].value + data.seriesData[1].value==0){
temp = 0
}else{
temp = Math.round(
(data.seriesData[0].value /
(data.seriesData[0].value + data.seriesData[1].value)) *
100
);
}
console.log(temp);
this.init_health(temp);
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment