校准修改
This commit is contained in:
parent
08718766d4
commit
c1cfa71348
@ -77,11 +77,16 @@
|
||||
<div style="display: flex;">
|
||||
<div class="module-header">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div class="module-title">
|
||||
<div class="module-title" style="width:230px">
|
||||
<div class="module-title-bg">
|
||||
<img src="@/assets/svg/u67.svg" alt="" srcset="" style="margin-right: 5px;">
|
||||
头部姿态
|
||||
</div>
|
||||
<el-button type="primary" class="start-btn" @click="calibrationClick" :disabled="isRecording"
|
||||
style="background-color: #0099ff;font-size: 14px;
|
||||
--el-button-border-color: transparent !important;border-radius: 20px;height:26px;border:none;width: 100px;">
|
||||
校准
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -334,7 +339,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog class="tsDialog" v-model="resDialogVisible" center title="诊断信息" width="600" :before-close="reshandleClose">
|
||||
<el-dialog class="tsDialog" v-model="resDialogVisible" center title="诊断信息" width="600"
|
||||
:before-close="reshandleClose">
|
||||
<div style="margin-top:10px">
|
||||
<div class="dialog-title">
|
||||
<div class="dialog-title-item">
|
||||
@ -361,8 +367,10 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button style="background: #323232;border:1px solid #787878;color: #ffffff;" @click="resDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="background:#0099ff;" @click="handleDiagnosticInfo('diagnosed')">暂存</el-button>
|
||||
<el-button style="background: #323232;border:1px solid #787878;color: #ffffff;"
|
||||
@click="resDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="background:#0099ff;"
|
||||
@click="handleDiagnosticInfo('diagnosed')">暂存</el-button>
|
||||
<el-button type="primary" style="background:#0099ff;" @click="handleDiagnosticInfo('completed')">
|
||||
保存
|
||||
</el-button>
|
||||
@ -995,7 +1003,6 @@ const isTrackingMaxValues = ref(false)
|
||||
function handleIMUData(data) {
|
||||
try {
|
||||
if (!data) return
|
||||
console.log('IMU数据:', data)
|
||||
headlist.value.rotation = data.rotation // 旋转角度
|
||||
headlist.value.tilt = data.tilt // 倾斜角度
|
||||
headlist.value.pitch = data.pitch // 俯仰角度
|
||||
@ -2045,7 +2052,24 @@ const initchart = () => {
|
||||
});
|
||||
});
|
||||
}
|
||||
const calibrationClick = async () => {
|
||||
const response = await fetch(`${BACKEND_URL}/api/devices/calibrate/imu`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({})
|
||||
})
|
||||
if (response.ok) {
|
||||
const result = await response.json()
|
||||
if (result.success) {
|
||||
ElMessage.success(result.message)
|
||||
} else {
|
||||
ElMessage.error(result.message)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
// 加载患者信息
|
||||
loadPatientInfo()
|
||||
@ -2700,6 +2724,7 @@ onUnmounted(() => {
|
||||
font-size: 14px;
|
||||
color: #EEF1FA;
|
||||
}
|
||||
|
||||
.chart-titles {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
@ -2730,42 +2755,52 @@ onUnmounted(() => {
|
||||
background-color: #282828 !important;
|
||||
border-right: 1px solid rgb(81, 81, 81) !important;
|
||||
}
|
||||
|
||||
:deep(.el-scrollbar__wrap) {
|
||||
background: #282828 !important;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog) {
|
||||
background-color: #323232;
|
||||
padding: 0px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-input__wrapper) {
|
||||
background-color: #242424;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-select__wrapper) {
|
||||
background-color: #242424;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-input__inner) {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-select__placeholder) {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-dialog__header) {
|
||||
border-bottom: 1px solid #1e1e1e;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
:deep(.tsDialog.el-dialog .el-textarea__inner) {
|
||||
background: #242424;
|
||||
color: #ffffff;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__footer) {
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user