|
@@ -109,12 +109,12 @@
|
|
|
const getData = (data) => {
|
|
|
const arr = [] as any;
|
|
|
if (data.resultList) {
|
|
|
- const total = data.resultList.reduce((pre, cur) => pre + cur.count, 0);
|
|
|
+ // const total = data.resultList.reduce((pre, cur) => pre + cur.count, 0);
|
|
|
data.resultList.forEach((item) => {
|
|
|
arr.push({
|
|
|
name: item.name,
|
|
|
count: item.count || 0,
|
|
|
- process: (((item.count ? item.count : 0) / total) * 100).toFixed(2),
|
|
|
+ process: (((item.count ? item.count : 0) / item.percentage) * 100).toFixed(2),
|
|
|
});
|
|
|
});
|
|
|
}
|