One of the bugs submitted by the page test: the
area value in the floating box does not display abnormally
. The code for data processing at the front desk: loop to find the data item and then count
count = json[DEFECT_CNAME[X]][j][2];
count+=parseFloat(list[i].DEFECT_AREA);
json[DEFECT_CNAME[X]][j][2]=count;
The test found that...this calculation will indeed cause abnormal accuracy. The
solution is as follows:
count = json[DEFECT_CNAME[X]][j][2];
count=Math.floor((parseFloat(list[i].DEFECT_AREA+count))*100)/100;
json[DEFECT_CNAME[X]][j][2]=count;
Test passed: