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: [
diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js
index 3f3d903d7..94e4ed2d9 100644
--- a/stdiet-ui/src/store/modules/recipes.js
+++ b/stdiet-ui/src/store/modules/recipes.js
@@ -254,21 +254,28 @@ const actions = {
const tarDetail = cur.detail.find(
obj => obj.id === igdData.id
);
- if (tarDetail) {
- igdArr.push({
- id: igdData.id,
- name: igdData.name,
- carbonRatio: igdData.carbonRatio,
- fatRatio: igdData.fatRatio,
- proteinRatio: igdData.proteinRatio,
- cusUnit: tarDetail.cus_unit,
- cusWeight: tarDetail.cus_weight,
- weight: parseFloat(tarDetail.weight),
- notRec: igdData.notRec,
- rec: igdData.rec,
- type: igdData.type
- });
+ if (tarDetail && tarDetail.weight === -1) {
+ return igdArr;
}
+ igdArr.push({
+ id: igdData.id,
+ name: igdData.name,
+ carbonRatio: igdData.carbonRatio,
+ fatRatio: igdData.fatRatio,
+ proteinRatio: igdData.proteinRatio,
+ cusUnit: tarDetail
+ ? tarDetail.cus_unit
+ : igdData.cusUnit,
+ cusWeight: tarDetail
+ ? tarDetail.cus_weight
+ : igdData.cusWeight,
+ weight: parseFloat(
+ tarDetail ? tarDetail.weight : igdData.weight
+ ),
+ notRec: igdData.notRec,
+ rec: igdData.rec,
+ type: igdData.type
+ });
}
return igdArr;
}, [])
@@ -400,17 +407,12 @@ const actions = {
}));
} else if (actionType === "delIgd") {
// 删除某食材
- params.detail = mTarDishes.igdList.reduce((arr, igd) => {
- if (igd.id !== payload.igdId) {
- arr.push({
- id: igd.id,
- weight: igd.weight,
- cus_unit: igd.cusUnit,
- cus_weight: igd.cusWeight
- });
- }
- return arr;
- }, []);
+ params.detail = mTarDishes.igdList.map(igd => ({
+ id: igd.id,
+ weight: igd.id === payload.igdId ? -1 : igd.weight,
+ cus_unit: igd.cusUnit,
+ cus_weight: igd.cusWeight
+ }));
} else if (actionType === "unit" || actionType === "weight") {
// 修改食材
params.detail = mTarDishes.igdList.map(igd => {
@@ -512,13 +514,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 +534,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 +556,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..bf5d37a9b
--- /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..7945362bf
--- /dev/null
+++ b/stdiet-ui/src/views/custom/recipesBuild/InfoView/DailyAnalyzeCom/index.vue
@@ -0,0 +1,115 @@
+
+