diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java index 1d9c91beb..404dc8c54 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java @@ -3,7 +3,10 @@ package com.stdiet.custom.controller; import java.util.List; import com.stdiet.common.utils.StringUtils; +import com.stdiet.custom.domain.SysCustomerPhysicalSigns; +import com.stdiet.custom.domain.SysPhysicalSigns; import com.stdiet.custom.dto.request.HealthyDetailRequest; +import com.stdiet.custom.service.ISysCustomerPhysicalSignsService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -29,6 +32,9 @@ public class SysCustomerHealthyController extends BaseController @Autowired private ISysCustomerHealthyService sysCustomerHealthyService; + @Autowired + private ISysCustomerPhysicalSignsService sysCustomerPhysicalSignsService; + /** * 查询客户健康列表 */ @@ -120,4 +126,14 @@ public class SysCustomerHealthyController extends BaseController { return sysCustomerHealthyService.generateHealthyReport(healthyDetailRequest); } + + /** + * 修改老的体征数据 + * @param sysPhysicalSigns + * @return + */ + @PutMapping("/edit/physical") + public AjaxResult editPhysical(@RequestBody SysCustomerPhysicalSigns sysPhysicalSigns) { + return toAjax(sysCustomerPhysicalSignsService.updateSysCustomerPhysicalSigns(sysPhysicalSigns)); + } } \ No newline at end of file diff --git a/stdiet-ui/public/index.html b/stdiet-ui/public/index.html index 34b70ae6f..40cf9db93 100644 --- a/stdiet-ui/public/index.html +++ b/stdiet-ui/public/index.html @@ -1,208 +1,211 @@ - - - - - - + + + + + + <%= webpackConfig.name %> - + .no-js h1 { + color: #222222; + } + + #loader-wrapper .load_title { + font-family: "Open Sans"; + color: #fff; + font-size: 19px; + width: 100%; + text-align: center; + z-index: 9999999999999; + position: absolute; + top: 60%; + opacity: 1; + line-height: 30px; + } + + #loader-wrapper .load_title span { + font-weight: normal; + font-style: italic; + font-size: 13px; + color: #fff; + opacity: 0.5; + } +
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+ diff --git a/stdiet-ui/src/api/custom/healthy.js b/stdiet-ui/src/api/custom/healthy.js index f4b718818..213b419cb 100644 --- a/stdiet-ui/src/api/custom/healthy.js +++ b/stdiet-ui/src/api/custom/healthy.js @@ -1,74 +1,80 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询客户健康列表 export function listHealthy(query) { return request({ - url: '/custom/healthy/list', - method: 'get', + url: "/custom/healthy/list", + method: "get", params: query - }) + }); } // 查询客户健康详细 export function getHealthy(id) { return request({ - url: '/custom/healthy/' + id, - method: 'get' - }) + url: "/custom/healthy/" + id, + method: "get" + }); } // 新增客户健康 export function addHealthy(data) { return request({ - url: '/custom/healthy', - method: 'post', + url: "/custom/healthy", + method: "post", data: data - }) + }); } // 修改客户健康 export function updateHealthy(data) { return request({ - url: '/custom/healthy', - method: 'put', + url: "/custom/healthy", + method: "put", data: data - }) + }); } // 删除客户健康 export function delHealthy(id) { return request({ - url: '/custom/healthy/' + id, - method: 'delete' - }) + url: "/custom/healthy/" + id, + method: "delete" + }); } // 导出客户健康 export function exportHealthy(query) { return request({ - url: '/custom/healthy/export', - method: 'get', + url: "/custom/healthy/export", + method: "get", params: query - }) + }); } // 下载文件 export function download(fileName) { return request({ - url: '/common/download', - method: 'get', - params: {"fileName": fileName} - }) + url: "/common/download", + method: "get", + params: { fileName: fileName } + }); } // 生成健康体征报告 export function generateHealthyReport(healthyDetail) { return request({ - url: '/custom/healthy/generateHealthyReport', - method: 'post', + url: "/custom/healthy/generateHealthyReport", + method: "post", data: healthyDetail - }) + }); } - - +// 修改老的体征 +export function editPhysicalSigns(data) { + return request({ + url: "/custom/healthy/edit/physical", + method: "put", + data + }); +} diff --git a/stdiet-ui/src/components/BodySignView/index.vue b/stdiet-ui/src/components/BodySignView/index.vue index ed5c404dd..b3a228bc6 100644 --- a/stdiet-ui/src/components/BodySignView/index.vue +++ b/stdiet-ui/src/components/BodySignView/index.vue @@ -2,14 +2,14 @@

{{ this.data.name }}

- + >
diff --git a/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue b/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue new file mode 100644 index 000000000..2a0b99129 --- /dev/null +++ b/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue @@ -0,0 +1,507 @@ + + + + + diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index b01a02a5b..532a79f82 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -97,11 +97,7 @@ @queryTable="getList" > - + diff --git a/stdiet-ui/src/views/custom/ingredient/index.vue b/stdiet-ui/src/views/custom/ingredient/index.vue index 8bac238f2..038315fdb 100644 --- a/stdiet-ui/src/views/custom/ingredient/index.vue +++ b/stdiet-ui/src/views/custom/ingredient/index.vue @@ -146,6 +146,16 @@ + + + + + +
") - : [ + : this.view === 1 + ? [ `${marker} ${name}`, `热量:${data[`heat${dim}`].toFixed(1)}千卡`, `供能比:${percent}%`, + ].join("
") + : [ + `${marker} ${name}`, + `质量:${data[`weight${dim}`].toFixed(1)}克`, + `占比:${percent}%`, ].join("
"); }, }, - graphic: - this.view === 1 - ? [ - { - type: "group", - top: 60, - left: 10, - silent: true, - children: [ - { + graphic: !this.view + ? [] + : [ + { + type: "group", + top: 60, + left: 10, + silent: true, + children: [ + { + type: "text", + style: { + text: this.curTotalText, + fill: "#606266", + }, + }, + { + type: "text", + top: 18, + left: 8, + style: { + text: `${ + data[`${this.curTotalName}`] + ? data[`${this.curTotalName}`].toFixed(1) + : 0 + } ${this.curUnit}`, + font: '14px "Microsoft YaHei", sans-serif', + }, + }, + ], + }, + { + type: "group", + top: 36, + right: 10, + silent: true, + children: Object.keys(this.curNameDict).reduce((arr, cur) => { + const tarData = data[this.getDataName(cur)]; + if (tarData) { + arr.push({ type: "text", + top: arr.length * 20, + right: 10, style: { - text: "总热量约", + text: `${this.curNameDict[cur]}:${tarData.toFixed(1)}`, fill: "#606266", }, - }, - { - type: "text", - top: 18, - left: 8, - style: { - text: `${ - data.totalHeat ? data.totalHeat.toFixed(1) : 0 - }千卡`, - font: '14px "Microsoft YaHei", sans-serif', - }, - }, - ], - }, - { - type: "group", - top: 36, - right: 10, - silent: true, - children: Object.keys(this.menuDict).reduce((arr, cur) => { - const tarData = data[`heat${cur}`]; - if (tarData) { - arr.push({ - type: "text", - top: arr.length * 20, - right: 10, - style: { - text: `${this.menuDict[cur]}:${tarData.toFixed(1)}`, - fill: "#606266", - }, - }); - } - return arr; - }, []), - }, - ] - : [], + }); + } + return arr; + }, []), + }, + ], series: [ { name: data.name, type: "pie", radius: [0, !this.view ? 40 : 60], center: ["50%", "55%"], - data: (!this.view - ? Object.keys(this.nameDict) - : Object.keys(this.menuDict) - ).reduce((arr, dim) => { + data: Object.keys(this.curNameDict).reduce((arr, dim) => { if (!this.view || data[`heat${dim}`]) { arr.push({ dim, - value: !this.view ? data[`${dim}Heat`] : data[`heat${dim}`], - name: (!this.view ? this.nameDict : this.menuDict)[dim], + value: data[this.getDataName(dim)], + name: this.curNameDict[dim], oriData: data, }); } diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/IngredientSearchCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/IngredientSearchCom/index.vue new file mode 100644 index 000000000..4308ad74b --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/IngredientSearchCom/index.vue @@ -0,0 +1,147 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/PhysicalSignCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/PhysicalSignCom/index.vue new file mode 100644 index 000000000..e0767867c --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/PhysicalSignCom/index.vue @@ -0,0 +1,132 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue index bb423afbc..aab65ef1f 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue @@ -1,33 +1,29 @@ @@ -99,33 +75,5 @@ export default { .verify_view_wrapper { height: calc(100vh - 32px); overflow: auto; - .content { - margin: 8px 0; - .item { - font-size: 14px; - margin: 4px; - border-radius: 8px; - cursor: pointer; - display: inline-block; - color: #262626; - border: 1px solid #8c8c8c; - padding: 3px 8px; - word-break: normal; - transition: all 0.3s; - - &:hover { - color: white; - background: #d96969; - border-color: #d96969; - } - } - - .selected_item { - color: white; - background: #d96969; - border-color: #d96969; - font-weight: bold; - } - } }