diff --git a/frontend/src/renderer/src/views/Detection.vue b/frontend/src/renderer/src/views/Detection.vue
index 18928472..6c09487e 100644
--- a/frontend/src/renderer/src/views/Detection.vue
+++ b/frontend/src/renderer/src/views/Detection.vue
@@ -24,19 +24,20 @@
+ --el-button-border-color: #409EFF;border:0px;
+ --el-button-border-color: transparent;width: 110px;height: 30px;font-size: 18px;">
{{ isConnected ? '开始录像' : '录像中...' }}
+ --el-button-border-color: #409EFF;border:0px;
+ --el-button-border-color: transparent;width: 110px;height: 30px;font-size: 18px;">
结束录像
-
+
保存数据
@@ -102,7 +103,7 @@
- 清零并保存
+ 清零
@@ -1228,8 +1229,6 @@ const IMU_MIN_INTERVAL_MS = 33 // 约30Hz
let lastIMUValues = { rotation: null, tilt: null, pitch: null }
const IMU_CHANGE_EPS = 0.1 // 小于0.1°的变化忽略
-// 最值跟踪状态
-const isTrackingMaxValues = ref(false)
// 处理IMU头部姿态数据
function handleIMUData(data) {
@@ -1358,8 +1357,6 @@ function updateHeadPoseMaxValues(headPose) {
// 清零最值并开始跟踪
function clearAndStartTracking() {
try {
- saveMaxValuesToHistory()
-
// 重置所有最值为0
headPoseMaxValues.value = {
rotationLeftMax: 0,
@@ -1369,14 +1366,7 @@ function clearAndStartTracking() {
pitchUpMax: 0,
pitchDownMax: 0
}
-
- // 开始跟踪
- isTrackingMaxValues.value = true
-
- // console.log('🔄 头部姿态最值已清零,开始跟踪')
- // ElMessage.success('头部姿态最值已清零,开始跟踪')
} catch (error) {
- // console.error('❌ 清零最值失败:', error)
ElMessage.error('清零失败')
}
}
@@ -1399,8 +1389,6 @@ function saveMaxValuesToHistory() {
// 添加到历史记录
headPoseHistory.value.push(currentMaxValues)
- // 停止跟踪
- isTrackingMaxValues.value = false
// console.log('💾 头部姿态最值已保存:', currentMaxValues)
// ElMessage.success(`头部姿态最值已保存(第${currentMaxValues.id}组)`)
@@ -1701,9 +1689,7 @@ async function startDetection() {
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
}
-
const result = await response.json()
- debugger
if (result.success) {
console.log('✅ 检测开始成功')
// 保存会话ID和检测开始时间
@@ -1885,6 +1871,7 @@ const calibrationClick = async () => {
},
body: JSON.stringify({})
})
+ clearAndStartTracking()
if (response.ok) {
const result = await response.json()
if (result.success) {
@@ -2003,7 +1990,6 @@ onUnmounted(() => {
const startRecord = async () => { // 开始录屏
try {
console.log('🚀 正在开始录屏...')
- debugger
// 验证患者信息
if (!patientInfo.value || !patientInfo.value.sessionId) {
throw new Error('缺少患者信息,无法开始录屏')
@@ -2285,6 +2271,7 @@ function routerClick(){
height: 100%;
background-image: linear-gradient(to right, #333333 1px, transparent 1px), linear-gradient(to bottom, #333333 1px, transparent 1px);
background-size: 50px 50px;
+ border:0px;
}
.posture-heatmap {