From 5f84333c30d8d86ff931ba22a0141b0408937401 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Mon, 22 Mar 2021 16:58:19 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/store/modules/recipes.js | 32 +- .../recipesBuild/InfoView/BarChart/index.vue | 180 ------------ .../DailyAnalyzeCom/PieChart/index.vue | 276 ++++++++++++++++++ .../InfoView/DailyAnalyzeCom/index.vue | 110 +++++++ .../WeaklyAnalyzeCom/BarChart/index.vue | 221 ++++++++++++++ .../InfoView/WeaklyAnalyzeCom/index.vue | 110 +++++++ .../custom/recipesBuild/InfoView/index.vue | 62 ++-- 7 files changed, 763 insertions(+), 228 deletions(-) delete mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/BarChart/index.vue create mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue create mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue create mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/BarChart/index.vue create mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 3f3d903d7..ba1e69807 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -512,13 +512,13 @@ const getters = { (obj, cur) => { cur.igdList.forEach(igd => { obj.pWeight += (igd.weight / 100) * igd.proteinRatio; - obj.pHeat = obj.pWeight * 4; + obj.pCalories = obj.pWeight * 4; obj.fWeight += (igd.weight / 100) * igd.fatRatio; - obj.fHeat = obj.fWeight * 9; + obj.fCalories = obj.fWeight * 9; obj.cWeight += (igd.weight / 100) * igd.carbonRatio; - obj.cHeat = obj.cWeight * 4; - obj.totalHeat = obj.pHeat + obj.fHeat + obj.cHeat; - obj[`heat${cur.type}`] += + obj.cCalories = obj.cWeight * 4; + obj.totalCalories = obj.pCalories + obj.fCalories + obj.cCalories; + obj[`calories${cur.type}`] += (igd.weight / 100) * igd.proteinRatio * 4 + (igd.weight / 100) * igd.fatRatio * 9 + (igd.weight / 100) * igd.carbonRatio * 4; @@ -532,17 +532,17 @@ const getters = { pWeight: 0, fWeight: 0, cWeight: 0, - pHeat: 0, - fHeat: 0, - cHeat: 0, + pCalories: 0, + fCalories: 0, + cCalories: 0, // - totalHeat: 0, - heat1: 0, - heat2: 0, - heat3: 0, - heat4: 0, - heat5: 0, - heat6: 0, + totalCalories: 0, + calories1: 0, + calories2: 0, + calories3: 0, + calories4: 0, + calories5: 0, + calories6: 0, // totalWeight: 0, weight1: 0, @@ -554,7 +554,7 @@ const getters = { } ) ); - console.log(nutriData); + // console.log(nutriData); return nutriData; }, verifyNotRecData: state => { diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/BarChart/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/BarChart/index.vue deleted file mode 100644 index 6fdfab1c9..000000000 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/BarChart/index.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue new file mode 100644 index 000000000..00c9a7c7c --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue @@ -0,0 +1,276 @@ + + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue new file mode 100644 index 000000000..d072c16a1 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue @@ -0,0 +1,110 @@ + + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/BarChart/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/BarChart/index.vue new file mode 100644 index 000000000..cc9489a3e --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/BarChart/index.vue @@ -0,0 +1,221 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue new file mode 100644 index 000000000..4b32c5999 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue @@ -0,0 +1,110 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue index 80f9ef9f2..a380e04f6 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue @@ -1,50 +1,46 @@ From 8328cbab3ae4c1e2c8568cc48e190ed98043b475 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Mon, 22 Mar 2021 17:00:39 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=84=E4=BC=B0?= =?UTF-8?q?=E9=A1=B9=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/HealthyView/index.vue | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/stdiet-ui/src/components/HealthyView/index.vue b/stdiet-ui/src/components/HealthyView/index.vue index 298d9abac..a9003f686 100644 --- a/stdiet-ui/src/components/HealthyView/index.vue +++ b/stdiet-ui/src/components/HealthyView/index.vue @@ -105,6 +105,24 @@ export default { open: false, basicInfo, healthyInvestigate: [ + { + title: "既往病史/用药史评估", + content: [ + { title: "病史体征", value: "physicalSigns" }, + { title: "湿气数据", value: "moistureDate" }, + { title: "气血数据", value: "bloodData" }, + { title: "家族疾病史", value: "familyIllnessHistory" }, + { title: "手术史", value: "operationHistory" }, + { title: "近期是否做过手术", value: "nearOperationFlag" }, + { title: "手术恢复情况", value: "recoveryeSituation" }, + { title: "是否长期服用药物", value: "longEatDrugFlag" }, + { title: "长期服用的药物", value: "longEatDrugClassify" }, + { title: "是否出现过过敏症状", value: "allergyFlag" }, + { title: "过敏症状", value: "allergySituation" }, + { title: "过敏源", value: "allergen" }, + { title: "忌口过敏食物", value: "dishesIngredient" }, + ], + }, { title: "减脂经历评估", content: [ @@ -198,24 +216,7 @@ export default { { title: "熬夜频次", value: "stayupLateWeekNum" }, ], }, - { - title: "既往病史/用药史评估", - content: [ - { title: "病史体征", value: "physicalSigns" }, - { title: "湿气数据", value: "moistureDate" }, - { title: "气血数据", value: "bloodData" }, - { title: "家族疾病史", value: "familyIllnessHistory" }, - { title: "手术史", value: "operationHistory" }, - { title: "近期是否做过手术", value: "nearOperationFlag" }, - { title: "手术恢复情况", value: "recoveryeSituation" }, - { title: "是否长期服用药物", value: "longEatDrugFlag" }, - { title: "长期服用的药物", value: "longEatDrugClassify" }, - { title: "是否出现过过敏症状", value: "allergyFlag" }, - { title: "过敏症状", value: "allergySituation" }, - { title: "过敏源", value: "allergen" }, - { title: "忌口过敏食物", value: "dishesIngredient" }, - ], - }, + { title: "体检报告", content: [ From 6d912988ac8c21549303da473825bed75067687d Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Mon, 22 Mar 2021 17:57:44 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A3=9F=E8=B0=B1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DailyAnalyzeCom/PieChart/index.vue | 4 +- .../InfoView/DailyAnalyzeCom/index.vue | 1 + .../recipesBuild/InfoView/PieChart/index.vue | 421 ------------------ .../InfoView/WeaklyAnalyzeCom/index.vue | 4 + .../custom/recipesBuild/InfoView/index.vue | 17 +- .../src/views/custom/recipesShow/utils.js | 7 +- 6 files changed, 21 insertions(+), 433 deletions(-) delete mode 100644 stdiet-ui/src/views/custom/recipesBuild/InfoView/PieChart/index.vue diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue index 00c9a7c7c..b85925331 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/PieChart/index.vue @@ -70,7 +70,7 @@ export default { this.resetCurrentDay({ currentDay: -1 }); }, getTooltipArr(params) { - console.log(params); + // console.log(params); let tooltips; const { name, marker, percent, value } = params; switch (this.type) { @@ -101,7 +101,7 @@ export default { return tooltips.join("
"); }, updateChart(source) { - console.log(source); + // console.log(source); const total = source.reduce((acc, cur) => acc + cur[1], 0); this.chart.clear(); const option = { diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue index d072c16a1..ffe6d75e2 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue @@ -95,6 +95,7 @@ export default { diff --git a/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue index 4b32c5999..2a3dae557 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/WeaklyAnalyzeCom/index.vue @@ -5,18 +5,21 @@ :max="max" title="营养统计" type="nutrition" + width="364px" @onClick="handleOnClick" /> @@ -103,6 +106,7 @@ export default {