diff --git a/stdiet-ui/src/components/BodySignView/index.vue b/stdiet-ui/src/components/BodySignView/index.vue index 89b1f13bf..417dc8b4c 100644 --- a/stdiet-ui/src/components/BodySignView/index.vue +++ b/stdiet-ui/src/components/BodySignView/index.vue @@ -1,7 +1,15 @@ - diff --git a/stdiet-ui/src/components/HealthyView/index.vue b/stdiet-ui/src/components/HealthyView/index.vue index a6b0135ac..ee00f0956 100644 --- a/stdiet-ui/src/components/HealthyView/index.vue +++ b/stdiet-ui/src/components/HealthyView/index.vue @@ -1,7 +1,15 @@ - diff --git a/stdiet-ui/src/components/PhysicalSignsRemark/index.vue b/stdiet-ui/src/components/PhysicalSignsRemark/index.vue index 8c3d57b71..a2d43b832 100644 --- a/stdiet-ui/src/components/PhysicalSignsRemark/index.vue +++ b/stdiet-ui/src/components/PhysicalSignsRemark/index.vue @@ -4,7 +4,7 @@ 新增 @@ -24,7 +24,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['orderPause:pause:export']" + v-hasPermi="['recipes:pause:export']" >导出 @@ -96,7 +96,7 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['orderPause:pause:edit']" + v-hasPermi="['recipes:pause:edit']" >修改 删除 diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js index 9023a81a1..c2c6ee0da 100644 --- a/stdiet-ui/src/utils/healthyData.js +++ b/stdiet-ui/src/utils/healthyData.js @@ -471,6 +471,16 @@ const moduleObj = { //健康信息处理,将数组转为字符串 export function dealHealthy(customerHealthy) { + customerHealthy.basicBMR = ( + (10 * customerHealthy.weight) / 2 + + 6.25 * customerHealthy.tall - + 5 * customerHealthy.age - + customerHealthy.sex * 161 + ).toFixed(1); + customerHealthy.notSportHeat = (customerHealthy.basicBMR * 1.3).toFixed(1); + customerHealthy.basicBMR += "千卡"; + customerHealthy.notSportHeat += "千卡"; + needAttrName.forEach(name => { if (customerHealthy.hasOwnProperty(name)) { customerHealthy[name] = (String(customerHealthy[name]) || "") diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index 2293142c8..8f0bb00d1 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -247,17 +247,10 @@ :summary-method="getSummaries" style="width: 100%" > - - + + - + - - - - - + + + + + @@ -740,21 +754,25 @@ export default { }, getSummaries(param) { const { columns, data } = param; + console.log(data); return columns.reduce( (arr, cur, idx) => { if (idx > 1) { if (idx === 6) { - // 备注 - return arr; + arr[6] = arr[3] * 4 + arr[4] * 9 + arr[5] * 4 + ' kcal'; + } else { + arr[idx] = data.reduce((acc, dAcc) => { + if (idx === 2) { + return acc + parseFloat(dAcc.weight); + } + return parseFloat( + ( + acc + + (dAcc[cur.property] * parseFloat(dAcc.weight)) / 100 + ).toFixed(1) + ); + }, 0); } - arr[idx] = data.reduce((acc, dAcc) => { - if (idx === 2) { - return acc + parseFloat(dAcc.weight); - } - return parseFloat( - (acc + (dAcc[cur.property] * dAcc.weight) / 100).toFixed(1) - ); - }, 0); } return arr; }, diff --git a/stdiet-ui/src/views/custom/ingredient/index.vue b/stdiet-ui/src/views/custom/ingredient/index.vue index b44ef216f..61fbff02c 100644 --- a/stdiet-ui/src/views/custom/ingredient/index.vue +++ b/stdiet-ui/src/views/custom/ingredient/index.vue @@ -96,13 +96,11 @@ icon="el-icon-search" size="mini" @click="handleQuery" - >搜索 - + >搜索 + 重置 - + >重置 + @@ -114,7 +112,7 @@ size="mini" @click="handleAdd" v-hasPermi="['custom:ingredient:add']" - >新增 + >新增 @@ -124,7 +122,7 @@ size="mini" @click="handleExport" v-hasPermi="['custom:ingredient:export']" - >导出 + >导出 + + + - + 修改 + >修改 删除 + >删除 @@ -241,7 +250,7 @@ - + @@ -376,244 +385,242 @@ diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/BarChart.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/BarChart.vue index 91fd440ad..531961636 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/BarChart.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/BarChart.vue @@ -30,6 +30,10 @@ export default { type: Array, default: [], }, + max: { + type: Number, + default: 0, + }, }, data() { return { @@ -64,6 +68,7 @@ export default { this.updateChart(this.data.length > 0 ? this.data : {}); }, updateChart(source) { + console.log(this.max); this.chart.clear(); this.chart.setOption({ title: { @@ -112,7 +117,7 @@ export default { grid: { top: 55, left: 20, - right: 20, + right: 50, bottom: 10, containLabel: true, }, @@ -135,6 +140,13 @@ export default { y: dim, x: 0, }, + markLine: { + data: [{ name: "BMR", yAxis: this.max - 400 }], + symbol: "none", + lineStyle: { + color: "red", + }, + }, itemStyle: { borderWidth: 2, borderColor: "#fff", diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue index 9c7705d47..65b73303b 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue @@ -58,6 +58,16 @@ :data="data" height="170px" width="500px" + :max=" + healthyData.basicBMR + ? parseFloat( + healthyData.basicBMR.substring( + 0, + healthyData.basicBMR.indexOf('千卡') + ) + ) + : 0 + " />
- - + +