修改保存数据
This commit is contained in:
parent
6d299008f6
commit
830a5520cb
@ -40,7 +40,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="isStart && isConnected"
|
v-if="isStart && isConnected"
|
||||||
@click="handleDataCollection"
|
@click="handleScreenshot"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="start-btn"
|
class="start-btn"
|
||||||
style="background-image: linear-gradient(to right, #FBB106, #A817C6);
|
style="background-image: linear-gradient(to right, #FBB106, #A817C6);
|
||||||
@ -358,7 +358,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;justify-content: flex-end;">测试医生:李四</div>
|
<div style="display: flex;justify-content: flex-end;color: #ffffff;">测试医生:李四</div>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
@ -740,7 +740,10 @@ async function handleScreenshot() {
|
|||||||
patientId: patientInfo.value.id,
|
patientId: patientInfo.value.id,
|
||||||
patientName: patientInfo.value.name,
|
patientName: patientInfo.value.name,
|
||||||
sessionId: patientInfo.value.sessionId,
|
sessionId: patientInfo.value.sessionId,
|
||||||
imageData: base64Image
|
imageData: base64Image,
|
||||||
|
head_pose:{},
|
||||||
|
body_pose:{},
|
||||||
|
foot_data:{}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 显示成功消息和文件路径
|
// 显示成功消息和文件路径
|
||||||
@ -792,7 +795,8 @@ function generateSessionId() {
|
|||||||
// 调用后端API保存截图
|
// 调用后端API保存截图
|
||||||
async function saveScreenshot(data) {
|
async function saveScreenshot(data) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${BACKEND_URL}/api/screenshots/save`, {
|
const response = await fetch(`${BACKEND_URL}/api/detection/${patientInfo.value.sessionId}/collect`
|
||||||
|
, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@ -998,6 +1002,7 @@ function stopRecording() {
|
|||||||
// 保存录像
|
// 保存录像
|
||||||
async function saveRecording() {
|
async function saveRecording() {
|
||||||
try {
|
try {
|
||||||
|
debugger
|
||||||
if (recordedChunks.length === 0) {
|
if (recordedChunks.length === 0) {
|
||||||
throw new Error('没有录制数据')
|
throw new Error('没有录制数据')
|
||||||
}
|
}
|
||||||
@ -1105,7 +1110,6 @@ async function saveRecording() {
|
|||||||
|
|
||||||
// 处理开始/停止按钮点击
|
// 处理开始/停止按钮点击
|
||||||
async function handleStartStop() {
|
async function handleStartStop() {
|
||||||
patientInfo.value.sessionId = null
|
|
||||||
if (!isConnected.value) {
|
if (!isConnected.value) {
|
||||||
ElMessage.warning('WebSocket未连接,无法操作')
|
ElMessage.warning('WebSocket未连接,无法操作')
|
||||||
return
|
return
|
||||||
@ -1115,6 +1119,7 @@ async function handleStartStop() {
|
|||||||
// 停止检测
|
// 停止检测
|
||||||
await stopDetection()
|
await stopDetection()
|
||||||
} else {
|
} else {
|
||||||
|
patientInfo.value.sessionId = null
|
||||||
// 开始检测
|
// 开始检测
|
||||||
await startDetection()
|
await startDetection()
|
||||||
}
|
}
|
||||||
@ -1737,10 +1742,25 @@ onUnmounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content:space-between ;
|
justify-content:space-between ;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
.dialog-title-item{
|
.dialog-title-item{
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog){
|
||||||
|
background-color: #1D1b26;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__title){
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item__label){
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
:deep(.el-textarea__inner){
|
||||||
|
background: #1D1b26;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
Loading…
Reference in New Issue
Block a user