修复菜品修改问题

This commit is contained in:
huangdeliang
2021-02-09 14:10:47 +08:00
parent afb7465281
commit 1775b657a7
26 changed files with 257 additions and 137 deletions

View File

@ -64,10 +64,8 @@ export default {
[{ title: "减脂反弹", value: "rebound" }],
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
[{ title: "减脂遇到的困难", value: "difficulty" }],
[
{ title: "湿气数据", value: "moistureDate" },
{ title: "气血数据", value: "bloodData" },
],
[{ title: "湿气数据", value: "moistureDate" }],
[{ title: "气数据", value: "bloodData" }],
[{ title: "病史", value: "signStr" }],
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
[{ title: "方便沟通时间", value: "connectTime" }],

View File

@ -0,0 +1,17 @@
<template>
<div>
<RecipesCom v-for="item in data" :key="item.id" :data="item" />
</div>
</template>
<script>
import RecipesCom from "@/components/RecipesCom";
export default {
name: "RecipesView",
components: {
RecipesCom,
},
props: ["data"],
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

View File

@ -46,7 +46,7 @@ export default {
.value {
/* color: #696969; */
flex: 1;
flex: 1 1 0;
}
}
</style>

View File

@ -1,7 +1,9 @@
<template>
<div class="app-container">
<div class="content">
<div class="left">left</div>
<div class="left">
<RecipesView :data="recipesData" />
</div>
<div class="right">
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
<BodySignView :data="healthyData" v-else />
@ -18,6 +20,7 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
import HealthyView from "./HealthyView";
import BodySignView from "./BodySignView";
import RecipesView from "./RecipesView";
export default {
name: "BuildRecipies",
@ -26,11 +29,11 @@ export default {
},
mounted() {
//
console.log({
cusId: this.cusId,
recipesId: this.recipesId,
});
this.init({ cusId: this.cusId }).catch((err) => {
// console.log({
// cusId: this.cusId,
// recipesId: this.recipesId,
// });
this.init({ cusId: this.cusId, recipesId: this.recipesId }).catch((err) => {
this.$message.error(err.message);
});
},
@ -41,12 +44,14 @@ export default {
components: {
HealthyView,
BodySignView,
RecipesView,
},
props: ["planId", "cusId", "recipesId"],
computed: {
...mapState({
healthyData: (state) => state.healthyData,
healthyDataType: (state) => state.healthyDataType,
recipesData: (state) => state.recipesData,
}),
},
methods: {