实时检测修改样式
This commit is contained in:
parent
2d852d43dd
commit
84e18180a4
@ -24,19 +24,20 @@
|
||||
</div>
|
||||
<el-button v-if="!isRecording" @click="handleStartStop" :disabled="!isConnected" type="primary"
|
||||
class="start-title-btn" style="background-image: linear-gradient(to right, rgb(236, 50, 166), rgb(160, 5, 216));
|
||||
--el-button-border-color: #409EFF;
|
||||
--el-button-border-color: transparent;width: 120px;height: 30px;font-size: 20px;">
|
||||
--el-button-border-color: #409EFF;border:0px;
|
||||
--el-button-border-color: transparent;width: 110px;height: 30px;font-size: 18px;">
|
||||
{{ isConnected ? '开始录像' : '录像中...' }}
|
||||
</el-button>
|
||||
<!-- handleStartStop -->
|
||||
<el-button v-if="isRecording" @click="handleStartStop" type="primary" class="start-title-btn" style="background-image: linear-gradient(to right, rgb(236, 50, 166), rgb(160, 5, 216));
|
||||
--el-button-border-color: #409EFF;
|
||||
--el-button-border-color: transparent;width: 120px;height: 30px;font-size: 20px;">
|
||||
--el-button-border-color: #409EFF;border:0px;
|
||||
--el-button-border-color: transparent;width: 110px;height: 30px;font-size: 18px;">
|
||||
结束录像
|
||||
</el-button>
|
||||
<el-button @click="saveDetectionData" type="primary" class="start-title-btn" style="background-image: linear-gradient(to right, #FBB106, #A817C6);
|
||||
--el-button-border-color: #409EFF;
|
||||
--el-button-border-color: transparent;width: 120px;height: 30px;font-size: 20px;">
|
||||
<el-button @click="saveDetectionData" type="primary" class="start-title-btn" style="
|
||||
background-image: linear-gradient(to right, rgb(236, 50, 166), rgb(160, 5, 216));
|
||||
--el-button-border-color: #409EFF;border:0px;
|
||||
--el-button-border-color: transparent;width: 110px;height: 30px;font-size: 18px;">
|
||||
保存数据
|
||||
</el-button>
|
||||
</div>
|
||||
@ -102,7 +103,7 @@
|
||||
<el-button type="primary" class="start-btn" @click="clearAndStartTracking" :disabled="isRecording"
|
||||
style="background-color: #0099ff;font-size: 14px;margin-left: 15px;
|
||||
--el-button-border-color: transparent !important;border-radius: 20px;height:26px;border:none;width: 100px;">
|
||||
清零并保存
|
||||
清零
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user