From 61a673c862a4f0e36c1d2aa44954955800865844 Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Mon, 1 Sep 2025 18:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=A3=E6=A1=88=E4=B8=AD?= =?UTF-8?q?=E8=B6=B3=E5=BA=95=E5=8E=8B=E5=8A=9B=EF=BC=8C=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E5=A7=BF=E6=80=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/renderer/src/views/Detection.vue | 4 ++ .../src/renderer/src/views/PatientProfile.vue | 38 +++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/frontend/src/renderer/src/views/Detection.vue b/frontend/src/renderer/src/views/Detection.vue index dca583d6..8953e133 100644 --- a/frontend/src/renderer/src/views/Detection.vue +++ b/frontend/src/renderer/src/views/Detection.vue @@ -1571,6 +1571,10 @@ async function saveDetectionData() { if(tempInfo.value.imu_data != null ){ head_pose=tempInfo.value.imu_data } + if(headPoseMaxValues !=null){ + head_pose.headPoseMaxValues = headPoseMaxValues.value + } + let screen_location = contenGridRef.value.getBoundingClientRect() // 调用后端API保存截图 const result = await sendDetectionData({ diff --git a/frontend/src/renderer/src/views/PatientProfile.vue b/frontend/src/renderer/src/views/PatientProfile.vue index fea65d5b..ffeb0306 100644 --- a/frontend/src/renderer/src/views/PatientProfile.vue +++ b/frontend/src/renderer/src/views/PatientProfile.vue @@ -282,13 +282,15 @@
- 最大旋转角:左:-55.2° - 右:-55.2° + 最大旋转角:左:{{headPoseMaxValues.rotationLeftMax.toFixed(1)}}° + 右:{{ headPoseMaxValues.rotationRightMax.toFixed(1) }}°
-
最大倾斜角:左:-55.2° - 右:-55.2°
-
最大俯仰角:俯:-55.2° - 仰:-55.2°
+
最大倾斜角: + 左:{{ headPoseMaxValues.tiltLeftMax.toFixed(1) }}° + 右:{{ headPoseMaxValues.tiltRightMax.toFixed(1) }}°
+
最大俯仰角: + 俯:{{ headPoseMaxValues.pitchDownMax.toFixed(1) }}° + 仰:{{ headPoseMaxValues.pitchUpMax.toFixed(1) }}°
@@ -406,6 +408,13 @@ const currentScreenshots = ref([]) const previewScreenshot = ref(null) const videoPlayerRef = ref() const dialogVideoVisible = ref(false) +const headPoseMaxValues = ref({ + rotationLeftMax: 0, // 旋转-左旋最大值 + rotationRightMax: 0, // 旋转-右旋最大值 + tiltLeftMax: 0, // 倾斜-左倾最大值 + tiltRightMax: 0, // 倾斜-右倾最大值 + pitchUpMax: 0, // 俯仰-上仰最大值 + pitchDownMax: 0 }) const userInfo = reactive({ username: '', avatar: '' @@ -823,14 +832,27 @@ const playNewVideo = () => { const profileForm = ref({}) function detectionById(row) { footPressure.value = {} + headPoseMaxValues.value = { + rotationLeftMax: 0, // 旋转-左旋最大值 + rotationRightMax: 0, // 旋转-右旋最大值 + tiltLeftMax: 0, // 倾斜-左倾最大值 + tiltRightMax: 0, // 倾斜-右倾最大值 + pitchUpMax: 0, // 俯仰-上仰最大值 + pitchDownMax: 0 + } + historyAPI.detectionById(row.id).then((response)=>{ if(response.success){ profileForm.value = response.data if(response.data.foot_data !=null){ footPressure.value = response.data.foot_data } + if(response.data.head_pose !=null){ + headPoseMaxValues.value = response.data.head_pose.headPoseMaxValues + } + } }).catch(()=>{ @@ -1513,7 +1535,7 @@ onMounted(() => { .foot-container-shuline{ width: 0px; height: calc(100% + 20px); - border-top: 1px dashed red; + border-left: 1px dashed red; position: absolute; top: 0; left: 0; @@ -1524,7 +1546,7 @@ onMounted(() => { .foot-container-hengline{ width: calc(100% + 20px); height: 0; - border-left: 1px dashed red; + border-top: 1px dashed red; position: absolute; top: 0; left: -10px;