修改检查回放方法
This commit is contained in:
parent
7d671048b9
commit
60569d8f47
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) {
|
if (window.electronAPI) {
|
||||||
config.baseURL = window.electronAPI.getBackendUrl()
|
config.baseURL = window.electronAPI.getBackendUrl()
|
||||||
} else {
|
} else {
|
||||||
config.baseURL = 'http://localhost:5000'
|
config.baseURL = 'http://192.168.1.173:5000'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只为需要发送数据的请求设置Content-Type
|
// 只为需要发送数据的请求设置Content-Type
|
||||||
@ -607,14 +607,23 @@ export const historyAPI = {
|
|||||||
sessionsPage(params) {
|
sessionsPage(params) {
|
||||||
return api.get('/api/history/sessions', { params })
|
return api.get('/api/history/sessions', { params })
|
||||||
},
|
},
|
||||||
// 获取检测数据历史
|
// 删除检测数据记录
|
||||||
detectionDelById(id) {
|
detectionDelById(id) {
|
||||||
return api.delete(`/api/detection/data/${id}`, {})
|
return api.delete(`/api/detection/data/${id}`, {})
|
||||||
},
|
},
|
||||||
// 获取检测会话历史
|
// 获取检测会话历史
|
||||||
sessionById(id) {
|
sessionById(id) {
|
||||||
return api.get(`/api/history/sessions/${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的函数
|
// 获取后端URL的函数
|
||||||
@ -622,7 +631,7 @@ export const getBackendUrl = () => {
|
|||||||
if (window.electronAPI) {
|
if (window.electronAPI) {
|
||||||
return window.electronAPI.getBackendUrl()
|
return window.electronAPI.getBackendUrl()
|
||||||
} else {
|
} else {
|
||||||
return 'http://localhost:5000'
|
return 'http://192.168.1.173:5000'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,8 +763,8 @@ function delClick(id) {
|
|||||||
.content-area {
|
.content-area {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 5px;
|
||||||
padding: 20px;
|
padding: 5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
<!-- 顶部工具栏 -->
|
<!-- 顶部工具栏 -->
|
||||||
<header class="top-bar">
|
<header class="top-bar">
|
||||||
<div style="display: flex;align-items: center;">
|
<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="">
|
<img src="@/assets/svg/u14.svg" alt="">
|
||||||
<!-- <el-icon class="back-icon" @click="handleBack"><ArrowLeft /></el-icon> -->
|
<!-- <el-icon class="back-icon" @click="handleBack"><ArrowLeft /></el-icon> -->
|
||||||
<span class="page-title">实时检测</span>
|
<span class="page-title">实时检测</span>
|
||||||
</div>
|
</div>
|
||||||
|
<img src="@/assets/sz.png" alt="" title="编辑相机参数" v-if="isConnected == true"
|
||||||
<img src="@/assets/sz.png" alt="" title="编辑相机参数" style="margin-left: 20px;cursor: pointer; width: 24px;height: 24px;"
|
style="margin-left: 20px;cursor: pointer; width: 24px;height: 24px;"
|
||||||
@click="cameraUpdate">
|
@click="cameraUpdate">
|
||||||
|
|
||||||
|
|
||||||
@ -488,7 +488,7 @@
|
|||||||
</el-dialog>
|
</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">
|
:before-close="cameraHandleClose">
|
||||||
<div class="form-box" style="margin-top: 20px;">
|
<div class="form-box" style="margin-top: 20px;">
|
||||||
<el-form :model="cameraForm" label-width="100px">
|
<el-form :model="cameraForm" label-width="100px">
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div class="content-left-text1">{{ index + 1 }}</div>
|
<div class="content-left-text1">{{ index + 1 }}</div>
|
||||||
<div class="content-left-text2">{{ item.created_at }}</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-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> -->
|
<!-- <el-button type="danger" style="margin-top: 20px;" @click="deleteClick(item,index)">删除</el-button> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -33,6 +33,7 @@
|
|||||||
<video ref="videoPlayerRef" :src=" BACKEND_URL+'/' + item.screen_video_path" controls width="100%" height="100%">
|
<video ref="videoPlayerRef" :src=" BACKEND_URL+'/' + item.screen_video_path" controls width="100%" height="100%">
|
||||||
您的浏览器不支持视频播放
|
您的浏览器不支持视频播放
|
||||||
</video>
|
</video>
|
||||||
|
<img src="@/assets/big.png" alt="" class="bigImgBox" @click="bigImgClick(item)">
|
||||||
</div>
|
</div>
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<div class="content-right-top">
|
<div class="content-right-top">
|
||||||
@ -41,7 +42,8 @@
|
|||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<div class="content-right-top-text2" v-if="item.status != 'completed'">未处理</div>
|
<div class="content-right-top-text2" v-if="item.status != 'completed'">未处理</div>
|
||||||
<div class="content-right-top-text3" 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>
|
</div>
|
||||||
<div class="content-right-top-content">
|
<div class="content-right-top-content">
|
||||||
@ -66,14 +68,18 @@
|
|||||||
<div class="content-right-bottom-text">保存数据列表:</div>
|
<div class="content-right-bottom-text">保存数据列表:</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-right-bottom-content">
|
<div class="content-right-bottom-content">
|
||||||
<div v-for="(item2, index2) in item.list" :key="index2" class="content-right-bottom-content-box">
|
<div v-for="(item2, index2) in item.latest_detection_data" :key="index2" class="content-right-bottom-content-box">
|
||||||
<div class="content-right-bottom-img">截图</div>
|
<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 style="margin-top: 15px;">
|
||||||
<div @click="patientdetails">
|
<div @click="patientdetails(item)">
|
||||||
<img src="@/assets/svg/datalist.svg" alt="">
|
<img src="@/assets/svg/datalist.svg" alt="" style="cursor: pointer;" title="查看详情">
|
||||||
</div>
|
</div>
|
||||||
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -171,7 +177,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
@ -321,6 +327,22 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -328,9 +350,10 @@
|
|||||||
import { ref, reactive, computed, onMounted } from 'vue'
|
import { ref, reactive, computed, onMounted } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
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 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 BACKEND_URL = getBackendUrl()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@ -346,7 +369,12 @@ const currentVideo = ref(null)
|
|||||||
const currentScreenshots = ref([])
|
const currentScreenshots = ref([])
|
||||||
const previewScreenshot = ref(null)
|
const previewScreenshot = ref(null)
|
||||||
const videoPlayerRef = ref()
|
const videoPlayerRef = ref()
|
||||||
|
const dialogVideoVisible = ref(false)
|
||||||
|
const userInfo = reactive({
|
||||||
|
username: '',
|
||||||
|
avatar: ''
|
||||||
|
})
|
||||||
|
|
||||||
// 计算属性
|
// 计算属性
|
||||||
const filteredRecords = computed(() => {
|
const filteredRecords = computed(() => {
|
||||||
if (!searchKeyword.value) {
|
if (!searchKeyword.value) {
|
||||||
@ -358,15 +386,30 @@ const filteredRecords = computed(() => {
|
|||||||
formatDate(record.createdAt).includes(searchKeyword.value)
|
formatDate(record.createdAt).includes(searchKeyword.value)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
const profileInfo = ref([{ list: [{}, {}] }, {}])
|
const profileInfo = ref([])
|
||||||
const diagnosticForm = ref({
|
const diagnosticForm = ref({
|
||||||
diagnosis_info: '',
|
diagnosis_info: '',
|
||||||
treatment_info: '',
|
treatment_info: '',
|
||||||
suggestion_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) => {
|
const parseDate = (dateStr) => {
|
||||||
if (!dateStr) return new Date();
|
if (!dateStr) return new Date();
|
||||||
@ -414,10 +457,12 @@ const sessionsInit = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const videoUrl = ref("")
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
dialogVideoVisible.value = false
|
||||||
|
videoUrl.value = ""
|
||||||
}
|
}
|
||||||
const detailsDialogVisible = ref(false)
|
const detailsDialogVisible = ref(false)
|
||||||
const selectedPatient = ref({})
|
const selectedPatient = ref({})
|
||||||
@ -666,7 +711,9 @@ function editClick(row,index) {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
//数据详情
|
//数据详情
|
||||||
function patientdetails() {
|
function patientdetails(row) {
|
||||||
|
// historyAPI.sessionById(row.id).then(res => {
|
||||||
|
// })
|
||||||
detailsDialogVisible.value = true
|
detailsDialogVisible.value = true
|
||||||
}
|
}
|
||||||
async function handleDiagnosticInfo(status) {
|
async function handleDiagnosticInfo(status) {
|
||||||
@ -742,7 +789,15 @@ const deleteClick = async (row) => {
|
|||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
historyAPI.detectionDelById(row.id).then((response)=>{
|
historyAPI.detectionDelById(row.id).then((response)=>{
|
||||||
console.log(response.data)
|
if(response.success){
|
||||||
|
ElMessage.success({
|
||||||
|
message: response.message,
|
||||||
|
duration: 5000
|
||||||
|
});
|
||||||
|
sessionsInit()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -813,6 +868,12 @@ const deleteClick = async (row) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadPatientInfo()
|
loadPatientInfo()
|
||||||
sessionsInit()
|
sessionsInit()
|
||||||
|
if (authStore.currentUser) {
|
||||||
|
Object.assign(userInfo, {
|
||||||
|
username: authStore.currentUser.name,
|
||||||
|
avatar: authStore.currentUser.avatar || ''
|
||||||
|
})
|
||||||
|
}
|
||||||
// loadDetectionRecords()
|
// loadDetectionRecords()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -852,6 +913,7 @@ onMounted(() => {
|
|||||||
.content-left-text3 {}
|
.content-left-text3 {}
|
||||||
|
|
||||||
.content-center {
|
.content-center {
|
||||||
|
position: relative;
|
||||||
width: calc(100% - 327px);
|
width: calc(100% - 327px);
|
||||||
margin: 0px 15px;
|
margin: 0px 15px;
|
||||||
background-color: rgba(85, 85, 85, 0.6);
|
background-color: rgba(85, 85, 85, 0.6);
|
||||||
@ -985,6 +1047,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
:deep(.el-dialog) {
|
:deep(.el-dialog) {
|
||||||
background-color: #1D1b26;
|
background-color: #1D1b26;
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-dialog__title) {
|
:deep(.el-dialog__title) {
|
||||||
@ -1388,4 +1451,10 @@ onMounted(() => {
|
|||||||
.detail-head-text{
|
.detail-head-text{
|
||||||
margin: 0px 20px;
|
margin: 0px 20px;
|
||||||
}
|
}
|
||||||
|
.bigImgBox{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100px;
|
||||||
|
right: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user