diff --git a/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue index 7f10eba8e..119b84075 100644 --- a/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue +++ b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue @@ -74,7 +74,9 @@ export default { }, methods: { handleOnHide() { - this.$emit("onConfirm", { remark: this.nData }); + if (this.nData !== null && this.nData !== undefined) { + this.$emit("onConfirm", { remark: this.nData }); + } }, }, }; diff --git a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue index 1103db21a..688c6b4ae 100644 --- a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue @@ -25,13 +25,25 @@
- {{ mObj.name }} + {{ mObj.igdList[0].name }} + + - {{ mObj.cusStr }} - {{ mObj.weight }}克 + {{ + mObj.igdList[0].cusStr + }} + {{ mObj.igdList[0].weight }}克
@@ -82,24 +94,24 @@ export default { if (!obj[cur.type]) { obj[cur.type] = []; } - let tarMenu = cur; - if ( - !tarMenu.methods && - !tarMenu.remark && - tarMenu.igdList.length === 1 - ) { - tarMenu = tarMenu.igdList[0]; - tarMenu.cusStr = `${this.cusWeightDict[tarMenu.cusWeight] || ""}${ - this.cusUnitDict[tarMenu.cusUnit] || "" + // let tarMenu = cur; + // if ( + // !tarMenu.methods && + // !tarMenu.remark && + // tarMenu.igdList.length === 1 + // ) { + // tarMenu = tarMenu.igdList[0]; + // tarMenu.cusStr = `${this.cusWeightDict[tarMenu.cusWeight] || ""}${ + // this.cusUnitDict[tarMenu.cusUnit] || "" + // }`; + // } else { + cur.igdList.forEach((igd) => { + igd.cusStr = `${this.cusWeightDict[igd.cusWeight] || ""}${ + this.cusUnitDict[igd.cusUnit] || "" }`; - } else { - tarMenu.igdList.forEach((igd) => { - igd.cusStr = `${this.cusWeightDict[igd.cusWeight] || ""}${ - this.cusUnitDict[igd.cusUnit] || "" - }`; - }); - } - obj[cur.type].push(tarMenu); + }); + // } + obj[cur.type].push(cur); return obj; }, {}); const mMenus = Object.keys(mData).map((type) => ({ @@ -107,7 +119,7 @@ export default { typeName: this.menuTypeDict[type], values: mData[type], })); - // console.log(mMenus); + console.log(mMenus); return mMenus; }, ...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]), diff --git a/stdiet-ui/src/views/custom/recipesShow/index.vue b/stdiet-ui/src/views/custom/recipesShow/index.vue index 09a8eff3f..6e816630b 100644 --- a/stdiet-ui/src/views/custom/recipesShow/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/index.vue @@ -7,7 +7,6 @@ class="icon_btn" @click="handleOnPlanClick" /> - {{ curDate }}