调整食谱界面

This commit is contained in:
huangdeliang 2021-04-10 16:20:49 +08:00
parent f28f009086
commit b6e3d8d4bc
2 changed files with 35 additions and 18 deletions

View File

@ -4,7 +4,6 @@
:title="title" :title="title"
width="80%" width="80%"
top="30%" top="30%"
:close-on-click-modal="false"
class="dishes_detail_dialog_wrapper" class="dishes_detail_dialog_wrapper"
> >
<section class="section_zone"> <section class="section_zone">

View File

@ -18,7 +18,7 @@
<el-card v-for="obj in menus" :key="obj.type" style="margin-top: 12px"> <el-card v-for="obj in menus" :key="obj.type" style="margin-top: 12px">
<div slot="header"> <div slot="header">
<div class="header_style"> <div class="header_style">
<span>{{ obj.typeName }}</span> <span style="font-weight: bold">{{ obj.typeName }}</span>
<span class="time">{{ menuTypeTimeDict[obj.type] }}</span> <span class="time">{{ menuTypeTimeDict[obj.type] }}</span>
</div> </div>
</div> </div>
@ -27,16 +27,16 @@
<div <div
v-if="mObj.igdList.length === 1" v-if="mObj.igdList.length === 1"
class="simple_dishes" class="simple_dishes"
@click=" @click="handleOnDetailClick(mObj)"
mObj.remark || mObj.methods ? handleOnDetailClick(mObj) : null
"
> >
<span <span>
>{{ mObj.igdList[0].name }} <span>
{{ mObj.igdList[0].name }}
</span>
<em <em
v-if="mObj.remark || mObj.methods" v-if="mObj.remark || mObj.methods"
class="el-icon-collection-tag" class="el-icon-collection-tag"
style="color: #ababab; margin-left: 8px" style="color: #1890ff; margin-left: 8px"
/> />
</span> </span>
<span class="weight_style"> <span class="weight_style">
@ -46,9 +46,26 @@
<span>{{ mObj.igdList[0].weight }}</span> <span>{{ mObj.igdList[0].weight }}</span>
</span> </span>
</div> </div>
<div v-else class="complex_dishes" @click="handleOnDetailClick(mObj)"> <div v-else style="padding: 8px 0" @click="handleOnDetailClick(mObj)">
<span>{{ mObj.name }}</span> <span>
<em class="el-icon-arrow-right" /> <span style="color: #1890ff">{{ mObj.name }}</span>
<em
class="el-icon-collection-tag"
style="color: #1890ff; margin-left: 8px"
/>
</span>
<div
class="simple_dishes"
style="margin-left: 16px; height: 30px"
v-for="igd in mObj.igdList"
:key="igd.id"
>
<span>{{ igd.name }} </span>
<span class="weight_style">
<span style="margin-right: 20px">{{ igd.cusStr }}</span>
<span>{{ igd.weight }}</span>
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -126,7 +143,9 @@ export default {
}, },
methods: { methods: {
handleOnDetailClick(data) { handleOnDetailClick(data) {
if (data.remark || data.methods) {
this.$refs["detailDialogRef"].showDialog(data); this.$refs["detailDialogRef"].showDialog(data);
}
}, },
handleOnShoppingPlanClick() { handleOnShoppingPlanClick() {
this.$refs["shoppingPlanRef"].showDrawer({ this.$refs["shoppingPlanRef"].showDrawer({
@ -179,7 +198,6 @@ export default {
} }
.dishes_item { .dishes_item {
height: 38px;
padding: 0 8px; padding: 0 8px;
border-bottom: 1px solid #dfe6ec; border-bottom: 1px solid #dfe6ec;
@ -190,12 +208,13 @@ export default {
.simple_dishes { .simple_dishes {
display: flex; display: flex;
height: 100%; height: 38px;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.weight_style { .weight_style {
width: 40%; width: 40%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -203,10 +222,9 @@ export default {
} }
.complex_dishes { .complex_dishes {
display: flex; // display: flex;
height: 100%; // align-items: center;
align-items: center; // justify-content: space-between;
justify-content: space-between;
} }
} }
} }