Merge branch 'develop' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
commit
77148e9067
@ -14,7 +14,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['orderPause:pause:add']"
|
v-hasPermi="['recipes:pause:add']"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['orderPause:pause:export']"
|
v-hasPermi="['recipes:pause:export']"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['orderPause:pause:edit']"
|
v-hasPermi="['recipes:pause:edit']"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@ -104,7 +104,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['orderPause:pause:remove']"
|
v-hasPermi="['recipes:pause:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
@ -247,17 +247,10 @@
|
|||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" label="食材"></el-table-column>
|
<el-table-column prop="name" label="食材" align="center" />
|
||||||
<el-table-column label="通俗计量">
|
<el-table-column label="通俗计量" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="cus-unit">
|
<span class="cus-unit">
|
||||||
<!-- <el-input-number
|
|
||||||
v-model="scope.row.cusWeight"
|
|
||||||
size="mini"
|
|
||||||
controls-position="right"
|
|
||||||
step="0.5"
|
|
||||||
:min="0.5"
|
|
||||||
/> -->
|
|
||||||
<el-select size="mini" v-model="scope.row.cusWeight">
|
<el-select size="mini" v-model="scope.row.cusWeight">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in cusWeightOptions"
|
v-for="dict in cusWeightOptions"
|
||||||
@ -277,7 +270,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="weight" label="重量(g)">
|
<el-table-column prop="weight" label="重量(g)" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
class="weight"
|
class="weight"
|
||||||
@ -290,11 +283,31 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="proteinRatio" label="蛋白质/100g">
|
<el-table-column
|
||||||
</el-table-column>
|
prop="proteinRatio"
|
||||||
<el-table-column prop="fatRatio" label="脂肪/100g">
|
label="蛋白质/100g"
|
||||||
</el-table-column>
|
align="center"
|
||||||
<el-table-column prop="carbonRatio" label="碳水/100g">
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="fatRatio"
|
||||||
|
label="脂肪/100g"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="carbonRatio"
|
||||||
|
label="碳水/100g"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column label="热量/100g" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
`${(
|
||||||
|
scope.row.proteinRatio * 4 +
|
||||||
|
scope.row.fatRatio * 9 +
|
||||||
|
scope.row.carbonRatio * 4
|
||||||
|
).toFixed(1)} kcal`
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -97,12 +97,10 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索
|
>搜索
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
>重置
|
>重置
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -179,6 +177,17 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="carbonRatio"
|
prop="carbonRatio"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column label="每百克热量(千卡)" align="center" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
(
|
||||||
|
scope.row.proteinRatio * 4 +
|
||||||
|
scope.row.fatRatio * 9 +
|
||||||
|
scope.row.carbonRatio * 4
|
||||||
|
).toFixed(1)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="地域"
|
label="地域"
|
||||||
align="center"
|
align="center"
|
||||||
@ -192,15 +201,15 @@
|
|||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<autohideinfo :data="string2Arr(scope.row.notRec)"/>
|
<autohideinfo :data="string2Arr(scope.row.notRec)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="推荐人群" align="center" prop="rec" width="120">
|
<el-table-column label="推荐人群" align="center" prop="rec" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<autohideinfo :data="string2Arr(scope.row.rec)"/>
|
<autohideinfo :data="string2Arr(scope.row.rec)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark"/>
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
@ -241,7 +250,7 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="食材名称" prop="name" label-width="90px">
|
<el-form-item label="食材名称" prop="name" label-width="90px">
|
||||||
<el-input v-model="form.name" placeholder="请输入食材名称"/>
|
<el-input v-model="form.name" placeholder="请输入食材名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -376,20 +385,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
addIngredient,
|
addIngredient,
|
||||||
delIngredient,
|
delIngredient,
|
||||||
exportIngredient,
|
exportIngredient,
|
||||||
getIngredient,
|
getIngredient,
|
||||||
listIngredient,
|
listIngredient,
|
||||||
updateIngredient,
|
updateIngredient,
|
||||||
} from "@/api/custom/ingredient";
|
} from "@/api/custom/ingredient";
|
||||||
|
|
||||||
import AutoHideInfo from "@/components/AutoHideInfo";
|
import AutoHideInfo from "@/components/AutoHideInfo";
|
||||||
|
|
||||||
import {listPhysicalSigns} from "@/api/custom/physicalSigns";
|
import { listPhysicalSigns } from "@/api/custom/physicalSigns";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Ingredient",
|
name: "Ingredient",
|
||||||
components: {
|
components: {
|
||||||
autohideinfo: AutoHideInfo,
|
autohideinfo: AutoHideInfo,
|
||||||
@ -591,8 +600,7 @@
|
|||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function () {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
@ -608,12 +616,11 @@
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function () {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
string2Arr(str) {
|
string2Arr(str) {
|
||||||
return str ? str.split(',') : []
|
return str ? str.split(",") : [];
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user