From 79a1c4c554f03c5aea617c6f92ee089dcb60812b Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Sat, 13 Mar 2021 20:00:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=81=A5=E5=BA=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/utils/healthyData.js | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js index c171bb8e4..ebe4e85e1 100644 --- a/stdiet-ui/src/utils/healthyData.js +++ b/stdiet-ui/src/utils/healthyData.js @@ -551,6 +551,59 @@ export function dealHealthy(customerHealthy) { }); customerHealthy.physicalSigns = signs.join(","); } + if (customerHealthy.hasOwnProperty("otherLongEatDrugClassify")) { + customerHealthy.longEatDrugClassify += customerHealthy.otherLongEatDrugClassify + ? `,${customerHealthy.otherLongEatDrugClassify}` + : ""; + } + if (customerHealthy.hasOwnProperty("washVegetablesStyle")) { + customerHealthy.washVegetablesStyle += customerHealthy.otherWashVegetablesStyle + ? `,${customerHealthy.otherWashVegetablesStyle}` + : ""; + } + if (customerHealthy.hasOwnProperty("snacks")) { + customerHealthy.snacks += customerHealthy.otherSnacks + ? `,${customerHealthy.otherSnacks}` + : ""; + } + if (customerHealthy.hasOwnProperty("healthProductsWeekRate")) { + customerHealthy.healthProductsWeekRate = + customerHealthy.healthProductsDayRate + + "次/天," + + customerHealthy.healthProductsWeekRate + + "次/周"; + } + if (customerHealthy.hasOwnProperty("drinkWineClassify")) { + customerHealthy.drinkWineClassify += customerHealthy.otherWineClassify + ? `,${customerHealthy.otherWineClassify}` + : ""; + } + if (customerHealthy.hasOwnProperty("otherMotionClassify")) { + let motionStr = customerHealthy.aerobicMotionClassify + ? `,${customerHealthy.aerobicMotionClassify}` + : ""; + motionStr += customerHealthy.anaerobicMotionClassify + ? `,${customerHealthy.anaerobicMotionClassify}` + : ""; + motionStr += customerHealthy.anaerobicAerobicMotionClassify + ? `,${customerHealthy.anaerobicAerobicMotionClassify}` + : ""; + motionStr += customerHealthy.otherMotionClassify + ? `,${customerHealthy.otherMotionClassify}` + : ""; + customerHealthy.motion = motionStr.replaceAll(",", ","); + } + if (customerHealthy.hasOwnProperty("motionField")) { + customerHealthy.motionField += customerHealthy.otherMotionField + ? `,${customerHealthy.otherMotionField}` + : ""; + } + if (customerHealthy.hasOwnProperty("defecationNum")) { + customerHealthy.defecationNum += "次/天"; + } + if (customerHealthy.hasOwnProperty("motionDuration")) { + customerHealthy.motionDuration += "分钟"; + } if (customerHealthy.hasOwnProperty("tall")) { customerHealthy.tall += "cm"; }