amanda 3 år sedan
förälder
incheckning
728b9002e8
1 ändrade filer med 8 tillägg och 1 borttagningar
  1. 8 1
      frontend_refactor/src/containers/TaskList.js

+ 8 - 1
frontend_refactor/src/containers/TaskList.js

@@ -73,6 +73,7 @@ function renderResult(x, data) {
     let analysis = []
 
     let advice_element = <></>
+    let points_element = <></>
 
     if (result !== undefined) {
         if (result.file !== undefined) {
@@ -87,10 +88,13 @@ function renderResult(x, data) {
 
         advice = result.advice
 
+
         if (data.type === "PHOTO_STANDING") {
-            advice_element = advice['front'].filter(x => typeof x === 'string').concat(advice['right'].filter(x => typeof x === 'string')).concat(advice['points']).map(x => <>{x}<br/></>)
+            advice_element = advice['front'].filter(x => typeof x === 'string').concat(advice['right'].filter(x => typeof x === 'string')).map(x => <>{x}<br/></>)
+            points_element = advice['points']
         } else {
             advice_element = <p>{advice}</p>
+            points_element= <p>{points}</p>
         }
 
         for (const key in result.data) {
@@ -131,6 +135,9 @@ function renderResult(x, data) {
                         <Card type="inner" title="分析建议">
                             {advice_element}
                         </Card>
+                        <Card type="inner" title="分析建议">
+                            {points_element}
+                        </Card>
 
                         <Card type="inner" title="详细数据">
                             {analysis}