提交代码

prv
姜玉琦 2024-03-28 00:22:15 +08:00
parent 266ccb7da6
commit be9d64e88f
3 changed files with 35 additions and 24 deletions

View File

@ -14,6 +14,7 @@
<div class="survey-oil-title">
<div class="survey-oil-hr"></div>
<div class="survey-oil-text">预警类型</div>
<div class="survey-oil-summary" style="position: absolute;right: 0px;top: 8px;font-size: 15px;padding: 0 15px; background: #000b25;"><span style="font-weight: 800;color:red">未完成</span>/<span style="color:#c0dafb">总数</span></div>
</div>
<div class="analyse-number-max" id="afootOverflowType" style="height: unset;">
<div class="glr-login-number-max analyse-num-max" v-for="(item, idx) in warningType" style="height: unset;"
@ -60,11 +61,7 @@ export default {
name: '质量预警',
data: 0,
total: 0
}, {
name: '环境预警',
data: 0,
total: 0
},
}
],
};
},
@ -94,23 +91,23 @@ export default {
let tmps=d.data?.today||[];
let sum=0;
tmps.forEach(it=>{
sum+=it.id;
})
sum+=it.total;
});
this.todayCnt=sum;
sum=0;
tmps=d.data?.week||[];
tmps.forEach(it=>{
sum+=it.id;
})
sum+=it.total;
});
this.weekCnt=sum;
let data=0;
sum=0;
tmps=d.data?.group||[];
let objs=tmps.filter(it=>it.infoType==0);
let objs=tmps.filter(it=>it.infotype=="0");
objs.forEach(it=>{
sum+=it.id;
if(it.checkState==4){
data+=it.id;
sum+=it.total;
if(it.checkState!="4"){
data+=it.total;
}
});
this.warningType[1].data=data;
@ -118,20 +115,30 @@ export default {
data=0;
sum=0;
tmps=d.data?.group||[];
objs=tmps.filter(it=>it.infoType==1);
objs=tmps.filter(it=>it.infotype=="1");
objs.forEach(it=>{
sum+=it.id;
if(it.checkState!=4){
data+=it.id;
sum+=it.total;
if(it.checkState!="4"){
data+=it.total;
}
});
this.warningType[2].data=data;
this.warningType[2].total=sum;
data=0;
sum=0;
tmps=d.data?.group||[];
objs=tmps.filter(it=>it.infotype=="96");
objs.forEach(it=>{
sum+=it.total;
if(it.checkState!="4"){
data+=it.total;
}
});
this.warningType[0].data=data;
this.warningType[0].total=sum;
this.elKey++;
});
},
},
};
</script>
<style lang="scss" scoped></style>
</script>

View File

@ -790,7 +790,11 @@ export default {
tmps.forEach(it => {
sum += it.value;
})
this.overviewTotal = sum;
if(n==0){
this.overviewTotal = sum;
}else{
this.overviewTotal = sum.toFixed(2);
}
this.typeDistributionData = tmps;
this.elKey++;
})

View File

@ -765,14 +765,14 @@ export default {
list.push(item);
}
});
} else if (n == 0) {
list = d || [];
} else {
} else if (n > 0) {
d.data.forEach((item) => {
if (item.measureInfo != "间距" && item.measureInfo != "长度") {
list.push(item);
}
});
} else {
list = d.data || [];
}
}
this.measuredData = list.map((it) => {