增加bmi值展示

This commit is contained in:
huangdeliang 2021-03-18 19:16:06 +08:00
parent a10b8715ce
commit 871f3dc056
5 changed files with 25 additions and 8 deletions
stdiet-admin/src/main/java/com/stdiet/web/controller/custom
stdiet-ui/src
components
BodySignView
HealthyView
PhysicalSignsDialog
utils

@ -30,7 +30,6 @@ public class SysFoodHeatStatisticsController extends BaseController
/**
* 查询外食热量统计列表
*/
@PreAuthorize("@ss.hasPermi('custom:foodHeatStatistics:list')")
@GetMapping("/list")
public TableDataInfo list(SysCustomerHeatStatistics sysCustomerHeatStatistics)
{

@ -104,9 +104,10 @@ export default {
[{ title: "方便沟通时间", value: "connectTime" }],
];
if (this.dev) {
basicInfo.splice(3, 0, [{ title: "蛋白范围", value: "recProtein" }]);
basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
basicInfo.splice(5, 0, [
basicInfo.splice(3, 0, [{ title: "BMI", value: "bmi" }]);
basicInfo.splice(4, 0, [{ title: "蛋白范围", value: "recProtein" }]);
basicInfo.splice(5, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
basicInfo.splice(6, 0, [
{ title: "不运动总热量", value: "notSportHeat" },
]);
basicInfo.splice(basicInfo.length, 0, [

@ -90,12 +90,15 @@ export default {
[{ title: "地域", value: "position" }],
];
if (this.dev) {
basicInfo.splice(3, 0, [{ title: "推荐蛋白范围", value: "recProtein" }]);
basicInfo.splice(4, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
basicInfo.splice(5, 0, [
basicInfo.splice(3, 0, [{ title: "BMI", value: "bmi" }]);
basicInfo.splice(4, 0, [{ title: "推荐蛋白范围", value: "recProtein" }]);
basicInfo.splice(5, 0, [{ title: "基础代谢BMR", value: "basicBMR" }]);
basicInfo.splice(6, 0, [
{ title: "不运动总热量", value: "notSportHeat" },
]);
basicInfo.splice(basicInfo.length, 0, [{ title: "备注", value: "remark" }]);
basicInfo.splice(basicInfo.length, 0, [
{ title: "备注", value: "remark" },
]);
}
return {

@ -305,6 +305,7 @@ export default {
["创建时间", "客户姓名", "手机号"],
["调理项目", "性别", "年龄"],
["身高(厘米)", "体重(斤)", "地域"],
["BMI", "", ""],
],
[
["减脂经历", "减脂遇到的困难", "减脂是否反弹"],
@ -355,6 +356,7 @@ export default {
["createTime", "name", "phone"],
["conditioningProject", "sex", "age"],
["tall", "weight", "position"],
["bmi", "", ""],
],
[
["experience", "difficulty", "rebound"],
@ -711,6 +713,12 @@ export default {
}
return arr;
}, []);
detailHealthy.bmi = (
detailHealthy.weight /
2 /
(detailHealthy.tall / 100) /
(detailHealthy.tall / 100)
).toFixed(1);
this.detailHealthy = detailHealthy;
for (let i = 0; i < this.healthyTitleData.length; i++) {
let stepArray = [];

@ -473,6 +473,12 @@ const moduleObj = {
//健康信息处理,将数组转为字符串
export function dealHealthy(customerHealthy) {
customerHealthy.bmi = (
customerHealthy.weight /
2 /
(customerHealthy.tall / 100) /
(customerHealthy.tall / 100)
).toFixed(1);
customerHealthy.basicBMR = (
(10 * customerHealthy.weight) / 2 +
6.25 * customerHealthy.tall -