From f28f009086bf54aaefe8e7f993a66fb4dd9f8945 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Sat, 10 Apr 2021 09:05:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HealthyView/RemarkCom/index.vue | 4 +- .../custom/recipesShow/MenuDetail/index.vue | 56 +++++++++++-------- .../src/views/custom/recipesShow/index.vue | 1 - 3 files changed, 37 insertions(+), 24 deletions(-) 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 }} Date: Sat, 10 Apr 2021 16:20:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A3=9F=E8=B0=B1?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MenuDetail/DishesDetailDialog/index.vue | 1 - .../custom/recipesShow/MenuDetail/index.vue | 52 +++++++++++++------ 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/DishesDetailDialog/index.vue b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/DishesDetailDialog/index.vue index f099daa4c..1c652a895 100644 --- a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/DishesDetailDialog/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/DishesDetailDialog/index.vue @@ -4,7 +4,6 @@ :title="title" width="80%" top="30%" - :close-on-click-modal="false" class="dishes_detail_dialog_wrapper" >
diff --git a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue index 688c6b4ae..aca5686bd 100644 --- a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue @@ -18,7 +18,7 @@
- {{ obj.typeName }} + {{ obj.typeName }} {{ menuTypeTimeDict[obj.type] }}
@@ -27,16 +27,16 @@
- {{ mObj.igdList[0].name }} + + + {{ mObj.igdList[0].name }} + @@ -46,9 +46,26 @@ {{ mObj.igdList[0].weight }}克
-
- {{ mObj.name }} - +
+ + {{ mObj.name }} + + +
+ {{ igd.name }} + + {{ igd.cusStr }} + {{ igd.weight }}克 + +
@@ -126,7 +143,9 @@ export default { }, methods: { handleOnDetailClick(data) { - this.$refs["detailDialogRef"].showDialog(data); + if (data.remark || data.methods) { + this.$refs["detailDialogRef"].showDialog(data); + } }, handleOnShoppingPlanClick() { this.$refs["shoppingPlanRef"].showDrawer({ @@ -179,7 +198,6 @@ export default { } .dishes_item { - height: 38px; padding: 0 8px; border-bottom: 1px solid #dfe6ec; @@ -190,12 +208,13 @@ export default { .simple_dishes { display: flex; - height: 100%; + height: 38px; align-items: center; justify-content: space-between; .weight_style { width: 40%; + display: flex; align-items: center; justify-content: space-between; @@ -203,10 +222,9 @@ export default { } .complex_dishes { - display: flex; - height: 100%; - align-items: center; - justify-content: space-between; + // display: flex; + // align-items: center; + // justify-content: space-between; } } }