diff --git a/acupuncture-前台/src/api/patientFile.js b/acupuncture-前台/src/api/patientFile.js
index f36a872e..b913488c 100644
--- a/acupuncture-前台/src/api/patientFile.js
+++ b/acupuncture-前台/src/api/patientFile.js
@@ -32,3 +32,11 @@ export function patientDel(data) {
data: data,
});
}
+// 同步身高体重
+export function weightHeight(data) {
+ return request({
+ url: "/api/http/getWeightHeight",
+ method: "post",
+ data: data,
+ });
+}
diff --git a/acupuncture-前台/src/views/patientFile/index.vue b/acupuncture-前台/src/views/patientFile/index.vue
index 1c9297ca..9c1ffc5e 100644
--- a/acupuncture-前台/src/views/patientFile/index.vue
+++ b/acupuncture-前台/src/views/patientFile/index.vue
@@ -163,6 +163,13 @@
min-width="150"
fixed
/>
+
+
+
+ {{ calculateBMI(scope.row.weight, scope.row.height) }}
+
+
-
+
+
+
+
+
+
+
-
-
-
+
{
+ console.log("res", res);
+ this.form.height = res.data.height;
+ this.form.weight = res.data.weight;
+ this.$modal.msgSuccess("同步成功");
+ });
+ },
+ calculateBMI(WEIGHT, HEIGHT) {
+ if (WEIGHT && HEIGHT) {
+ const weight = parseFloat(WEIGHT);
+ const height = parseFloat(HEIGHT);
+ const bmi = weight / (height / 100) ** 2;
+ return bmi.toFixed(2);
+ }
+ },
// 上传成功回 - pdg
handleUploadPdfAdd1(res) {
if (res.code == 200) {
@@ -929,6 +959,24 @@ export default {