Commit 07463e79 authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent 461cefb0
......@@ -58,7 +58,7 @@ const CommentDetailed: React.FC = () => {
switch (item.star) {
case 1:
case 2: {
target = ret[0];
target = ret[2];
break;
}
......@@ -69,7 +69,7 @@ const CommentDetailed: React.FC = () => {
case 4:
case 5: {
target = ret[2];
target = ret[0];
break;
}
......@@ -104,9 +104,9 @@ const CommentDetailed: React.FC = () => {
const getSummaryEvaluatePie = (data: EstimateSumItems[]) => {
const source = data || [];
const count = source.reduce((pre, now: any) => now.sum + pre, 0);
const bad = source[0] && source[0].sum ? source[0].sum : 0;
const good = source[0] && source[0].sum ? source[0].sum : 0;
const notBad = source[1] && source[1].sum ? source[1].sum : 0;
const good = source[2] && source[2].sum ? source[2].sum : 0;
const bad = source[2] && source[2].sum ? source[2].sum : 0;
const ret = [
{
......
......@@ -348,7 +348,7 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
switch (item.star) {
case 1:
case 2: {
target = ret[0];
target = ret[2];
break;
}
......@@ -359,7 +359,7 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
case 4:
case 5: {
target = ret[2];
target = ret[0];
break;
}
......@@ -394,9 +394,9 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
const getSummaryEvaluatePie = (data: EstimateSumItems[]) => {
const source = data || [];
const count = source.reduce((pre, now) => (now.sum || 0) + pre, 0);
const bad = source[0] && source[0].sum ? source[0].sum : 0;
const good = source[0] && source[0].sum ? source[0].sum : 0;
const notBad = source[1] && source[1].sum ? source[1].sum : 0;
const good = source[2] && source[2].sum ? source[2].sum : 0;
const bad = source[2] && source[2].sum ? source[2].sum : 0;
const ret = [
{
......
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