diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java
index 46523212a..e18f40614 100644
--- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java
+++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java
@@ -54,8 +54,8 @@ public class SysRecipesServiceImpl implements ISysRecipesService {
// 更新食谱计划
SysRecipesPlan sysRecipesPlan = new SysRecipesPlan();
sysRecipesPlan.setId(sysRecipes.getPlanId());
+ sysRecipesPlan.setReviewStatus(3);// 设置制作中
sysRecipesPlan.setRecipesId(sysRecipes.getId());
- sysRecipesPlan.setReviewStatus(1);
sysRecipesPlanMapper.updateSysRecipesPlan(sysRecipesPlan);
}
diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesTemplateMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesTemplateMapper.xml
index 6a212f21b..dac9aa98a 100644
--- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesTemplateMapper.xml
+++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesTemplateMapper.xml
@@ -31,7 +31,7 @@
left join sys_user su_nutritionist on su_nutritionist.user_id = srt.nutritionist_id and su_nutritionist.del_flag = 0
left join sys_user su_nutritionist_assis on su_nutritionist_assis.user_id = srt.nutri_assis_id and su_nutritionist_assis.del_flag = 0
where srt.del_flag = 0
- and srt.name like concat('%', #{name}, '%')
+ and srt.name like concat('%', #{name}, '%') or srt.remark like concat('%', #{name}, '%')
and srt.nutri_assis_id = #{nutriAssisId}
and srt.nutritionist_id = #{nutritionistId}
and srp.review_status = #{reviewStatus}
diff --git a/stdiet-ui/src/components/BodySignView/index.vue b/stdiet-ui/src/components/BodySignView/index.vue
index c8ce84013..b7f1cdffc 100644
--- a/stdiet-ui/src/components/BodySignView/index.vue
+++ b/stdiet-ui/src/components/BodySignView/index.vue
@@ -104,8 +104,9 @@ export default {
[{ title: "方便沟通时间", value: "connectTime" }],
];
if (this.dev) {
- basicInfo.splice(3, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
- basicInfo.splice(4, 0, [
+ basicInfo.splice(3, 0, [{ title: "蛋白范围", value: "recProtein" }]);
+ basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
+ basicInfo.splice(5, 0, [
{ title: "不运动总热量", value: "notSportHeat" },
]);
basicInfo.splice(basicInfo.length, 0, [
diff --git a/stdiet-ui/src/components/HealthyView/index.vue b/stdiet-ui/src/components/HealthyView/index.vue
index 298c19881..3f33b25fe 100644
--- a/stdiet-ui/src/components/HealthyView/index.vue
+++ b/stdiet-ui/src/components/HealthyView/index.vue
@@ -90,11 +90,12 @@ export default {
[{ title: "地域", value: "position" }],
];
if (this.dev) {
- basicInfo.splice(3, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
- basicInfo.splice(4, 0, [
+ basicInfo.splice(3, 0, [{ title: "推荐蛋白范围", value: "recProtein" }]);
+ basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
+ basicInfo.splice(5, 0, [
{ title: "不运动总热量", value: "notSportHeat" },
]);
- basicInfo.splice(6, 0, [{ title: "备注", value: "remark" }]);
+ basicInfo.splice(basicInfo.length, 0, [{ title: "备注", value: "remark" }]);
}
return {
diff --git a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue
index 2953e26dd..664a1d27c 100644
--- a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue
+++ b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue
@@ -60,24 +60,9 @@
- {{
- `${
- scope.row.reviewStatus === 0
- ? "未制作"
- : scope.row.reviewStatus === 2
- ? "已审核"
- : "未审核"
- }`
- }}
+
+ {{ getReviewStatusName(scope.row.reviewStatus) }}
+
@@ -226,6 +211,32 @@ export default {
};
this.resetForm("form");
},
+ getReviewStatusName(status) {
+ switch (status) {
+ case 1:
+ return "未审核";
+ case 2:
+ return "已审核";
+ case 3:
+ return "制作中";
+ case 0:
+ default:
+ return "未制作";
+ }
+ },
+ getReviewType(status) {
+ switch (status) {
+ case 1:
+ return "danger";
+ case 2:
+ return "success";
+ case 3:
+ return "";
+ case 0:
+ default:
+ return "info";
+ }
+ },
handleOnClosed() {
this.data = undefined;
this.cusOutId = "";
diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js
index 8c8ab2448..e03bd6c20 100644
--- a/stdiet-ui/src/store/modules/recipes.js
+++ b/stdiet-ui/src/store/modules/recipes.js
@@ -132,6 +132,7 @@ const actions = {
recipesId,
reviewStatus,
temId: payload.temId,
+ name: payload.name,
planId: payload.planId,
startNum: startNumDay,
endNum: endNumDay
@@ -302,7 +303,7 @@ const actions = {
const recipesId = result.data;
if (!payload.planId) {
// 非保存模板
- commit("updateStateData", { recipesId });
+ commit("updateStateData", { recipesId, reviewStatus: 3 });
dispatch("getRecipesInfo", { recipesId });
}
payload.callback &&
diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js
index f915a3242..ebe4e85e1 100644
--- a/stdiet-ui/src/utils/healthyData.js
+++ b/stdiet-ui/src/utils/healthyData.js
@@ -200,7 +200,7 @@ export const familyIllnessHistoryArray = [
{ name: "冠心病", value: "3" },
{ name: "外周血管病", value: "4" },
{ name: "心力衰竭", value: "5" },
- { name: "冠心病", value: "6" },
+ { name: "糖尿病", value: "6" },
{ name: "肥胖症", value: "7" },
{ name: "慢性肾脏疾病", value: "8" },
{ name: "骨质疏松", value: "9" },
@@ -482,6 +482,10 @@ export function dealHealthy(customerHealthy) {
customerHealthy.notSportHeat = (customerHealthy.basicBMR * 1.3).toFixed(1);
customerHealthy.basicBMR += "千卡";
customerHealthy.notSportHeat += "千卡";
+ const lowRecProtein = customerHealthy.tall - 105;
+ customerHealthy.recProtein = `${(lowRecProtein * 0.8).toFixed(1)} - ${(
+ lowRecProtein * 1.5
+ ).toFixed(1)}`;
needAttrName.forEach(name => {
if (customerHealthy.hasOwnProperty(name)) {
@@ -538,6 +542,68 @@ export function dealHealthy(customerHealthy) {
}
});
+ if (customerHealthy.hasOwnProperty("physicalSignsId")) {
+ const signs = customerHealthy.otherPhysicalSigns
+ ? [customerHealthy.otherPhysicalSigns]
+ : [];
+ customerHealthy.signList.forEach(obj => {
+ signs.push(obj.name);
+ });
+ 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";
}
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
index 43501e00d..a1f8f1414 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
@@ -9,7 +9,7 @@
:step="5"
:value="value"
@blur="handleOnBlur"
- @keydown.enter="handleEnterClick"
+ @keydown.enter.native="handleEnterClick"
/>
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesHeaderCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesHeaderCom/index.vue
index b856ccf51..c18ce21fd 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesHeaderCom/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesHeaderCom/index.vue
@@ -37,37 +37,43 @@
/>
- 返回
+
+ 返回
+
审核通过已审核
未审核通过未审核
+ 制作中
- {{ reviewStatus === 1 ? "未审核" : "已审核" }}
+ {{ getReviewStatusName(reviewStatus) }}
{
// console.log(query);
+ let path = "/recipes/build/" + query.name + "/" + query.planId;
+ if (this.$route.query.temId) {
+ path += "?temId=" + this.$route.query.temId;
+ }
this.$router.replace({
- path: "/recipes/build/" + query.name + "/" + query.planId,
+ path,
});
},
});
@@ -135,7 +145,8 @@ export default {
this.updateStateData({ recipesData: [] });
},
handleOnTemplateClick() {
- this.$refs.templateRef.showDialog();
+ // this.$refs.templateRef.showDialog();
+ console.log(this.$route.query);
},
handleOnCopy(form) {
this.loading = true;
@@ -157,6 +168,32 @@ export default {
}
});
},
+ getReviewStatusName(status) {
+ switch (status) {
+ case 1:
+ return "未审核";
+ case 2:
+ return "已审核";
+ case 3:
+ return "制作中";
+ case 0:
+ default:
+ return "未制作";
+ }
+ },
+ getReviewType(status) {
+ switch (status) {
+ case 1:
+ return "danger";
+ case 2:
+ return "success";
+ case 3:
+ return "primary";
+ case 0:
+ default:
+ return "info";
+ }
+ },
...mapActions(["saveRecipes", "updateReviewStatus"]),
...mapMutations(["updateStateData", "updateFontSize", "toggleLeftShow"]),
},
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecommendView/TemplateView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecommendView/TemplateView/index.vue
index 4f2af9a4b..84d8d5c88 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecommendView/TemplateView/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecommendView/TemplateView/index.vue
@@ -7,11 +7,11 @@
-
+
diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
index 0c8cb7eb6..e0baf0641 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
@@ -3,10 +3,12 @@
忌口
{{ item.name }}
@@ -18,14 +20,38 @@ const { mapActions, mapState, mapGetters } = createNamespacedHelpers("recipes");
export default {
name: "VerifyView",
data() {
- return {};
+ return {
+ selectedNotRec: [],
+ };
},
computed: {
...mapGetters(["verifyNotRecData"]),
},
methods: {
handleOnClick(data) {
- console.log({ data, verifyNotRecData: this.verifyNotRecData });
+ if (this.selectedNotRec.some((str) => data.name === str)) {
+ this.selectedNotRec = this.selectedNotRec.filter(
+ (str) => str !== data.name
+ );
+ } else {
+ this.selectedNotRec.push(data.name);
+ this.selectedNotRec = JSON.parse(JSON.stringify(this.selectedNotRec));
+ }
+
+ const notRecIgds = this.selectedNotRec.reduce((arr, cur) => {
+ this.verifyNotRecData[cur].data.forEach((obj) => {
+ if (!arr.includes(obj.igdId)) {
+ arr.push(obj.igdId);
+ }
+ });
+ return arr;
+ }, []);
+
+ console.log({
+ data,
+ notRecIgds,
+ verifyNotRecData: this.verifyNotRecData,
+ });
},
},
};
@@ -44,12 +70,21 @@ export default {
border: 1px solid #8c8c8c;
padding: 3px 8px;
word-break: normal;
+ transition: all 0.3s;
&:hover {
- color: #d96969;
+ color: white;
+ background: #d96969;
border-color: #d96969;
}
}
+
+ .selected_item {
+ color: white;
+ background: #d96969;
+ border-color: #d96969;
+ font-weight: bold;
+ }
}
}
diff --git a/stdiet-ui/src/views/custom/recipesPlan/index.vue b/stdiet-ui/src/views/custom/recipesPlan/index.vue
index d21a3722f..3f15d2125 100644
--- a/stdiet-ui/src/views/custom/recipesPlan/index.vue
+++ b/stdiet-ui/src/views/custom/recipesPlan/index.vue
@@ -108,24 +108,9 @@
- {{
- `${
- !scope.row.reviewStatus
- ? "未制作"
- : scope.row.reviewStatus == 1
- ? "未审核"
- : "已审核"
- }`
- }}
+
+ {{ getReviewStatusName(scope.row.reviewStatus) }}
+
@@ -338,6 +323,32 @@ export default {
};
this.resetForm("form");
},
+ getReviewStatusName(status) {
+ switch (status) {
+ case 1:
+ return "未审核";
+ case 2:
+ return "已审核";
+ case 3:
+ return "制作中";
+ case 0:
+ default:
+ return "未制作";
+ }
+ },
+ getReviewType(status) {
+ switch (status) {
+ case 1:
+ return "danger";
+ case 2:
+ return "success";
+ case 3:
+ return "";
+ case 0:
+ default:
+ return "info";
+ }
+ },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
diff --git a/stdiet-ui/src/views/custom/recipesTemplate/index.vue b/stdiet-ui/src/views/custom/recipesTemplate/index.vue
index 995d31ab1..e387c57c3 100644
--- a/stdiet-ui/src/views/custom/recipesTemplate/index.vue
+++ b/stdiet-ui/src/views/custom/recipesTemplate/index.vue
@@ -6,8 +6,12 @@
:inline="true"
v-show="showSearch"
>
-
-
+
+
- {{
- `${
- !scope.row.reviewStatus
- ? "未制作"
- : scope.row.reviewStatus == 1
- ? "未审核"
- : "已审核"
- }`
- }}
+
+ {{ getReviewStatusName(scope.row.reviewStatus) }}
+