Merge branch 'main' of http://121.37.111.42:3000/ThbTech/BodyBalanceEvaluation into main
This commit is contained in:
commit
1deb2425b8
BIN
frontend/src/renderer/src/assets/big.png
Normal file
BIN
frontend/src/renderer/src/assets/big.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 754 B |
@ -13,7 +13,7 @@ api.interceptors.request.use(
|
||||
if (window.electronAPI) {
|
||||
config.baseURL = window.electronAPI.getBackendUrl()
|
||||
} else {
|
||||
config.baseURL = 'http://localhost:5000'
|
||||
config.baseURL = 'http://192.168.1.173:5000'
|
||||
}
|
||||
|
||||
// 只为需要发送数据的请求设置Content-Type
|
||||
@ -607,14 +607,23 @@ export const historyAPI = {
|
||||
sessionsPage(params) {
|
||||
return api.get('/api/history/sessions', { params })
|
||||
},
|
||||
// 获取检测数据历史
|
||||
// 删除检测数据记录
|
||||
detectionDelById(id) {
|
||||
return api.delete(`/api/detection/data/${id}`, {})
|
||||
},
|
||||
// 获取检测会话历史
|
||||
sessionById(id) {
|
||||
sessionById(id) {
|
||||
return api.get(`/api/history/sessions/${id}`)
|
||||
},
|
||||
// detectionLatestById(id) {
|
||||
// return api.get(`/api/detection/data/detail/${id}`)
|
||||
// },
|
||||
|
||||
detectionLatestById(id) {
|
||||
return api.get(`/api/detection/data/detail/${id}`)
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 获取后端URL的函数
|
||||
|
@ -763,8 +763,8 @@ function delClick(id) {
|
||||
.content-area {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
padding: 20px;
|
||||
gap: 5px;
|
||||
padding: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
<!-- 顶部工具栏 -->
|
||||
<header class="top-bar">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div v-if="!isRecording" class="top-bar-left" @click="routeTo('/')">
|
||||
<div v-if="!isRecording" class="top-bar-left" @click="routeTo('/')" style="cursor: pointer;">
|
||||
<img src="@/assets/svg/u14.svg" alt="">
|
||||
<!-- <el-icon class="back-icon" @click="handleBack"><ArrowLeft /></el-icon> -->
|
||||
<span class="page-title">实时检测</span>
|
||||
</div>
|
||||
|
||||
<img src="@/assets/sz.png" alt="" title="编辑相机参数" style="margin-left: 20px;cursor: pointer; width: 24px;height: 24px;"
|
||||
<img src="@/assets/sz.png" alt="" title="编辑相机参数" v-if="isConnected == true"
|
||||
style="margin-left: 20px;cursor: pointer; width: 24px;height: 24px;"
|
||||
@click="cameraUpdate">
|
||||
|
||||
|
||||
@ -488,7 +488,7 @@
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog class="tsDialog" v-model="cameraDialogVisible" center title="诊断信息" width="600"
|
||||
<el-dialog class="tsDialog" v-model="cameraDialogVisible" center title="相机参数设置" width="600"
|
||||
:before-close="cameraHandleClose">
|
||||
<div class="form-box" style="margin-top: 20px;">
|
||||
<el-form :model="cameraForm" label-width="100px">
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div class="content-left-text1">{{ index + 1 }}</div>
|
||||
<div class="content-left-text2">{{ item.created_at }}</div>
|
||||
<div class="content-left-text3" v-if="index==0">最近会诊</div>
|
||||
<div class="content-left-text3" v-else>{{ calculateExactDaysDifference(item.created_at) }}</div>
|
||||
<div class="content-left-text3" v-else>{{ getDayNum(item.created_at,index) }}</div>
|
||||
<!-- <el-button type="danger" style="margin-top: 20px;" @click="deleteClick(item,index)">删除</el-button> -->
|
||||
|
||||
</div>
|
||||
@ -33,6 +33,7 @@
|
||||
<video ref="videoPlayerRef" :src=" BACKEND_URL+'/' + item.screen_video_path" controls width="100%" height="100%">
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img src="@/assets/big.png" alt="" class="bigImgBox" @click="bigImgClick(item)">
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<div class="content-right-top">
|
||||
@ -41,7 +42,8 @@
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div class="content-right-top-text2" v-if="item.status != 'completed'">未处理</div>
|
||||
<div class="content-right-top-text3" v-if="item.status == 'completed'">已处理</div>
|
||||
<img v-if="item.status != 'completed'" src="@/assets/svg/edit.svg" alt="" style="margin-left: 10px;cursor: pointer;" @click="editClick(item,index)">
|
||||
<!-- <img v-if="item.status != 'completed'" src="@/assets/svg/edit.svg" alt="" style="margin-left: 10px;cursor: pointer;" @click="editClick(item,index)"> -->
|
||||
<img src="@/assets/svg/edit.svg" alt="" style="margin-left: 10px;cursor: pointer;" @click="editClick(item,index)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right-top-content">
|
||||
@ -66,14 +68,18 @@
|
||||
<div class="content-right-bottom-text">保存数据列表:</div>
|
||||
</div>
|
||||
<div class="content-right-bottom-content">
|
||||
<div v-for="(item2, index2) in item.list" :key="index2" class="content-right-bottom-content-box">
|
||||
<div class="content-right-bottom-img">截图</div>
|
||||
<div v-for="(item2, index2) in item.latest_detection_data" :key="index2" class="content-right-bottom-content-box">
|
||||
<div class="content-right-bottom-img">
|
||||
<img :src="BACKEND_URL+'/' + item2.screen_image" style="width:100% ;height: 100%;cursor: pointer;" alt=""
|
||||
@click="showImage(BACKEND_URL+'/' + item2.screen_image)">
|
||||
|
||||
</div>
|
||||
<div style="margin-top: 15px;">
|
||||
<div @click="patientdetails">
|
||||
<img src="@/assets/svg/datalist.svg" alt="">
|
||||
<div @click="patientdetails(item)">
|
||||
<img src="@/assets/svg/datalist.svg" alt="" style="cursor: pointer;" title="查看详情">
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/assets/svg/del.svg" alt="">
|
||||
<img src="@/assets/svg/del.svg" alt="" style="cursor: pointer;" title="删除" @click="deleteClick(item2,index)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -171,7 +177,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: flex-end;color: #ffffff;">测试医生:李四</div>
|
||||
<div style="display: flex;justify-content: flex-end;color: #ffffff;">检查医生:{{ userInfo.username }}</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
@ -321,6 +327,22 @@
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看视频 -->
|
||||
<el-dialog v-model="dialogVideoVisible" center title="查看视频" top="20px" width="90%" :before-close="handleClose"
|
||||
class="dialogVideobox">
|
||||
<video v-if="videoUrl != ''" :src="videoUrl" controls autoplay style="width: 100%;height:calc(100vh - 120px);">
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
</el-dialog>
|
||||
<el-image
|
||||
ref="imageRef"
|
||||
style="width: 0px; height: 0px"
|
||||
src=""
|
||||
show-progress
|
||||
:preview-src-list="srcList"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -328,9 +350,10 @@
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { patientAPI, detectionAPI,historyAPI } from '../services/api.js'
|
||||
import { patientAPI, detectionAPI,historyAPI,getBackendUrl } from '@/services/api.js'
|
||||
import Header from '@/views/Header.vue'
|
||||
import { getBackendUrl } from '../services/api.js'
|
||||
import { useAuthStore } from '@/stores/index.js'
|
||||
const authStore = useAuthStore()
|
||||
const BACKEND_URL = getBackendUrl()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@ -346,7 +369,12 @@ const currentVideo = ref(null)
|
||||
const currentScreenshots = ref([])
|
||||
const previewScreenshot = ref(null)
|
||||
const videoPlayerRef = ref()
|
||||
|
||||
const dialogVideoVisible = ref(false)
|
||||
const userInfo = reactive({
|
||||
username: '',
|
||||
avatar: ''
|
||||
})
|
||||
|
||||
// 计算属性
|
||||
const filteredRecords = computed(() => {
|
||||
if (!searchKeyword.value) {
|
||||
@ -358,15 +386,30 @@ const filteredRecords = computed(() => {
|
||||
formatDate(record.createdAt).includes(searchKeyword.value)
|
||||
)
|
||||
})
|
||||
const profileInfo = ref([{ list: [{}, {}] }, {}])
|
||||
const profileInfo = ref([])
|
||||
const diagnosticForm = ref({
|
||||
diagnosis_info: '',
|
||||
treatment_info: '',
|
||||
suggestion_info: ''
|
||||
})
|
||||
const srcList = ref([])
|
||||
const imageRef = ref()
|
||||
function showImage(row){ // 显示大屏图片
|
||||
|
||||
srcList.value = [row]
|
||||
setTimeout(() => {
|
||||
if(imageRef.value){
|
||||
imageRef.value.showPreview()
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
function bigImgClick(row) {
|
||||
videoUrl.value = BACKEND_URL + '/' + row.normal_video_path
|
||||
dialogVideoVisible.value = true
|
||||
}
|
||||
|
||||
const calculateExactDaysDifference = (date2) => {
|
||||
function getDayNum(date2,index){
|
||||
console.log(date2,index)
|
||||
// 解析日期字符串
|
||||
const parseDate = (dateStr) => {
|
||||
if (!dateStr) return new Date();
|
||||
@ -414,10 +457,12 @@ const sessionsInit = async () => {
|
||||
}
|
||||
|
||||
|
||||
|
||||
const videoUrl = ref("")
|
||||
const dialogVisible = ref(false)
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
dialogVideoVisible.value = false
|
||||
videoUrl.value = ""
|
||||
}
|
||||
const detailsDialogVisible = ref(false)
|
||||
const selectedPatient = ref({})
|
||||
@ -666,7 +711,9 @@ function editClick(row,index) {
|
||||
dialogVisible.value = true
|
||||
}
|
||||
//数据详情
|
||||
function patientdetails() {
|
||||
function patientdetails(row) {
|
||||
// historyAPI.sessionById(row.id).then(res => {
|
||||
// })
|
||||
detailsDialogVisible.value = true
|
||||
}
|
||||
async function handleDiagnosticInfo(status) {
|
||||
@ -742,7 +789,15 @@ const deleteClick = async (row) => {
|
||||
}
|
||||
).then(() => {
|
||||
historyAPI.detectionDelById(row.id).then((response)=>{
|
||||
console.log(response.data)
|
||||
if(response.success){
|
||||
ElMessage.success({
|
||||
message: response.message,
|
||||
duration: 5000
|
||||
});
|
||||
sessionsInit()
|
||||
}
|
||||
|
||||
|
||||
}).catch(()=>{
|
||||
|
||||
})
|
||||
@ -813,6 +868,12 @@ const deleteClick = async (row) => {
|
||||
onMounted(() => {
|
||||
loadPatientInfo()
|
||||
sessionsInit()
|
||||
if (authStore.currentUser) {
|
||||
Object.assign(userInfo, {
|
||||
username: authStore.currentUser.name,
|
||||
avatar: authStore.currentUser.avatar || ''
|
||||
})
|
||||
}
|
||||
// loadDetectionRecords()
|
||||
})
|
||||
</script>
|
||||
@ -852,6 +913,7 @@ onMounted(() => {
|
||||
.content-left-text3 {}
|
||||
|
||||
.content-center {
|
||||
position: relative;
|
||||
width: calc(100% - 327px);
|
||||
margin: 0px 15px;
|
||||
background-color: rgba(85, 85, 85, 0.6);
|
||||
@ -985,6 +1047,7 @@ onMounted(() => {
|
||||
|
||||
:deep(.el-dialog) {
|
||||
background-color: #1D1b26;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__title) {
|
||||
@ -1388,4 +1451,10 @@ onMounted(() => {
|
||||
.detail-head-text{
|
||||
margin: 0px 20px;
|
||||
}
|
||||
.bigImgBox{
|
||||
position: absolute;
|
||||
bottom: 100px;
|
||||
right: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user