!146 增加bmi值展示

Merge pull request !146 from 德仔/develop
This commit is contained in:
德仔 2021-03-18 19:18:07 +08:00 committed by Gitee
commit 16ae8663dd
5 changed files with 25 additions and 8 deletions

View File

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

View File

@ -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, [

View File

@ -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 {

View File

@ -312,6 +312,7 @@ export default {
["创建时间", "客户姓名", "手机号"],
["调理项目", "性别", "年龄"],
["身高(厘米)", "体重(斤)", "地域"],
["BMI", "", ""],
],
[
["减脂经历", "减脂遇到的困难", "减脂是否反弹"],
@ -362,6 +363,7 @@ export default {
["createTime", "name", "phone"],
["conditioningProject", "sex", "age"],
["tall", "weight", "position"],
["bmi", "", ""],
],
[
["experience", "difficulty", "rebound"],
@ -722,6 +724,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 = [];

View File

@ -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 -