修改食谱展示

This commit is contained in:
huangdeliang
2021-03-09 18:26:48 +08:00
parent 032b4e8106
commit 7709c85cb0
7 changed files with 70 additions and 9 deletions

View File

@ -19,11 +19,17 @@
</span>
</div>
</section>
<section class="section_zone">
<section class="section_zone" v-if="data.methods">
<div class="section_title">
做法<em class="el-icon-dish" style="margin-left: 8px" />
</div>
<div class="methods">{{ data.methods }}</div>
<div class="section_content">{{ data.methods }}</div>
</section>
<section class="section_zone" v-if="data.remark">
<div class="section_title">
备注<em class="el-icon-warning-outline" style="margin-left: 8px" />
</div>
<div class="section_content">{{ data.remark }}</div>
</section>
</el-dialog>
</template>
@ -74,7 +80,7 @@ export default {
}
}
.methods {
.section_content {
padding: 0 8px;
margin-top: 14px;
}

View File

@ -1,7 +1,10 @@
<template>
<div class="menu_detail_wrapper">
<!-- 营养分析 -->
<NutriComputeCom :date="date" :value="value" />
<!-- <NutriComputeCom :date="date" :value="value" /> -->
<div class="top">
<img :src="logo" style="width: auto; height: 32px" alt="logo" />
</div>
<!-- 食谱详细 -->
<el-card v-for="obj in menus" :key="obj.type" style="margin-top: 12px">
<div slot="header">
@ -12,7 +15,7 @@
</div>
<div v-for="mObj in obj.values" :key="mObj.id">
<div class="dishes_item">
<div v-if="!mObj.methods" class="simple_dishes">
<div v-if="!mObj.methods && !mObj.remark" class="simple_dishes">
<span>{{ mObj.name }}</span>
<span class="weight_style">
<span style="margin-right: 20px">{{ mObj.cusStr }}</span>
@ -31,14 +34,14 @@
</div>
</template>
<script>
import NutriComputeCom from "./NutriComputeCom";
// import NutriComputeCom from "./NutriComputeCom";
import DishesDetailDialog from "./DishesDetailDialog";
import { getDicts } from "@/api/custom/recipesShow";
export default {
name: "menuDetail",
props: ["value", "date"],
components: {
NutriComputeCom,
// NutriComputeCom,
DishesDetailDialog,
},
created() {
@ -63,6 +66,7 @@ export default {
},
data() {
return {
logo: require("@/assets/logo/st_logo.png"),
menuTypeTimeDict: {
2: "10:00 - 10:30",
4: "15:00 - 15:30",
@ -113,6 +117,10 @@ export default {
<style lang="scss" scoped>
.menu_detail_wrapper {
padding: 0 12px 12px 12px;
.top {
text-align: center;
padding: 10px 14px;
}
.header_style {
display: flex;

View File

@ -21,6 +21,7 @@
<div class="title_style">
<span>{{ plan.label }}</span>
<em
v-show="false"
class="el-icon-shopping-cart-full icon_style"
@click="(e) => handleOnShoppingPlanClick(e, plan)"
/>

View File

@ -7,7 +7,8 @@
class="icon_btn"
@click="handleOnPlanClick"
/>
<img :src="logo" style="width: auto; height: 32px" alt="logo" />
<!-- <img :src="logo" style="width: auto; height: 32px" alt="logo" /> -->
<span>{{ curDate }}</span>
<el-button
icon="el-icon-user"
type="text"
@ -45,6 +46,15 @@ import PlanDrawer from "./PlanDrawer";
import MenuDetail from "./MenuDetail";
import dayjs from "dayjs";
import { getProcessMenuData } from "./utils";
import { createNamespacedHelpers } from "vuex";
const {
mapActions,
mapState,
mapMutations,
mapGetters,
} = createNamespacedHelpers("recipesShow");
export default {
name: "recipesShow",
components: {
@ -55,7 +65,7 @@ export default {
props: ["id"],
data() {
return {
logo: require("@/assets/logo/st_logo.png"),
// logo: require("@/assets/logo/st_logo.png"),
planList: [],
curPlanId: 0,
curMenuId: 0,