修改样式

This commit is contained in:
limengnan 2025-08-19 15:28:33 +08:00
parent 298f4f5aa5
commit f93e58f482
8 changed files with 231 additions and 53 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -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.58:5000'
}
// 只为需要发送数据的请求设置Content-Type

View File

@ -7,8 +7,8 @@
起始页
</div>
<div class="main-dashboard-top-info">
<div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div>
<!-- <div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div> -->
</div>
</div>
<!-- 左侧功能导航 -->
@ -29,7 +29,7 @@
</div>
<div class="search-box">
<el-input v-model="searchKeyword" placeholder="搜索患者姓名" prefix-icon="Search" clearable
@input="handleSearch" />
@input="handleSearch" class="search-input"/>
</div>
</div>
<el-table ref="tableRef" :data="filteredPatients" style="width: 100%" border @cell-click="selectPatient"
@ -139,7 +139,8 @@
<!-- 无选中患者时的提示 -->
<div class="no-selection" v-else>
<el-empty description="请选择一个患者查看详情">
<el-button type="primary" @click="createNewPatient">新建患者档案</el-button>
<!-- <el-button type="primary" @click="createNewPatient">新建患者档案</el-button> -->
<div class="action-view-buttons" style="width:338px;" @click="createNewPatient">+新患者建档</div>
</el-empty>
</div>
</div>
@ -183,8 +184,8 @@
<el-col :span="12">
<el-form-item label="民族" prop="nationality">
<el-select v-model="patientForm.nationality" placeholder="请选择">
<el-option v-for="item in nationalityOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in nationalityOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -228,8 +229,8 @@
<el-col :span="12">
<el-form-item label="职业" prop="occupation">
<el-select v-model="patientForm.occupation" placeholder="请选择">
<el-option v-for="item in occupationOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in occupationOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -294,15 +295,23 @@ const patientForm = ref({
workplace: '',
email: ''
})
const occupationOptions = ref([
{ label: '学生', value: '学生' }
])
const occupationOptions = ref(["学生", "教师", "医生", "护士", "工程师", "程序员", "设计师",
"会计师", "律师", "警察", "消防员", "军人", "公务员", "销售", "市场营销",
"人力资源", "行政", "财务", "咨询师", "建筑师", "科研人员", "记者", "编辑",
"作家", "艺术家", "音乐家", "演员", "导演", "摄影师", "厨师", "服务员",
"司机", "快递员", "外卖员", "农民", "工人", "电工", "焊工", "机械师",
"飞行员", "空乘", "船员", "导游", "翻译", "心理咨询师", "社会工作者",
"运动员", "教练", "经纪人", "投资人", "企业家", "自由职业者"])
const residenceOptions = ref([
{ label: '北京', value: '北京' }
])
const nationalityOptions = ref([
{ label: '汉族', value: '汉族' }
])
const nationalityOptions = ref(["汉族", "满族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族",
"布依族", "朝鲜族", "侗族", "瑶族", "白族", "土家族", "哈尼族", "哈萨克族", "傣族",
"黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族",
"景颇族", "柯尔克孜族", "土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族",
"毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族",
"俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族",
"鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"])
//
const formRules = {
name: [
@ -1073,10 +1082,12 @@ function delClick(id) {
:deep(.el-input__inner) {
color: #ffffff;
font-size: 16px;
}
:deep(.el-select__placeholder) {
color: #ffffff;
font-size: 16px;
}
:deep(.el-input.is-disabled .el-input__wrapper) {
@ -1191,4 +1202,7 @@ function delClick(id) {
font-size: 20px;
font-family: 'Arial Normal', 'Arial', sans-serif;
}
.search-input{
font-size: 16px;
}
</style>

View File

@ -11,24 +11,29 @@
<!-- <el-icon class="back-icon" @click="handleBack"><ArrowLeft /></el-icon> -->
<span class="page-title">实时检测</span>
</div>
<img src="@/assets/sz.png" alt="" style="margin-left: 20px;cursor: pointer;"
@click="cameraUpdate">
<!-- 录制时间 -->
<div v-if="isRecording" class="icon-container">
<img src="@/assets/record.png" class="blink-icon" :class="{ blinking: isRunning }" alt="">
<div style="font-size: 18px;">{{ formattedTime }}</div>
</div>
<el-button v-if="!isRecording" @click="handleStartStop" :disabled="!isConnected" type="primary"
class="start-btn" style="background-image: linear-gradient(to right, rgb(236, 50, 166), rgb(160, 5, 216));
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;">
{{ isConnected ? '开始' : '连接中...' }}
</el-button>
<!-- handleStartStop -->
<el-button v-if="isRecording" @click="handleStartStop" type="primary" class="start-btn" style="background-image: linear-gradient(to right, rgb(236, 50, 166), rgb(160, 5, 216));
<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>
<el-button v-if="isStart && isConnected" @click="saveDetectionData" type="primary" class="start-btn" style="background-image: linear-gradient(to right, #FBB106, #A817C6);
<el-button v-if="isStart && isConnected" @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;">
保存数据
@ -36,8 +41,6 @@
</div>
<div class="top-bar-right">
<span class="info-item">测试时间2025/5/28 下午14:38</span>
<span class="info-item">测试医生李四</span>
<el-icon class="top-icon">
<Clock />
</el-icon>
@ -415,8 +418,8 @@
<el-col :span="12">
<el-form-item label="民族" prop="nationality">
<el-select v-model="patientForm.nationality" placeholder="请选择">
<el-option v-for="item in nationalityOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in nationalityOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -460,8 +463,8 @@
<el-col :span="12">
<el-form-item label="职业" prop="occupation">
<el-select v-model="patientForm.occupation" placeholder="请选择">
<el-option v-for="item in occupationOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in occupationOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -483,6 +486,74 @@
</span>
</template>
</el-dialog>
<el-dialog class="tsDialog" v-model="cameraDialogVisible" center title="诊断信息" width="600"
:before-close="cameraHandleClose">
<div class="form-box" style="margin-top: 20px;">
<!-- device_index: '', //
depth_mode: '', //
depth_range_min: '', //
depth_range_max: '', //
imu_port: '', // IMU -->
<el-form :model="cameraForm" label-width="100px">
<div class="cameraFormTitle">足部相机</div>
<el-form-item label="序号">
<el-radio-group v-model="cameraForm.device_index">
<el-radio value="0">0</el-radio>
<el-radio value="1">1</el-radio>
<el-radio value="2">2</el-radio>
<el-radio value="3">3</el-radio>
<el-radio value="4">4</el-radio>
<el-radio value="5">5</el-radio>
</el-radio-group>
</el-form-item>
<div class="cameraFormTitle">深度相机</div>
<el-form-item label="相机模式">
<el-select v-model="cameraForm.depth_mode" placeholder="请选择">
<el-option label="NFOV_UNBINNED" value="NFOV_UNBINNED" />
<!-- <el-option label="NFOV_UNBINNED" value="NFOV_UNBINNED" /> -->
</el-select>
</el-form-item>
<el-form-item label="距离范围">
<div >
<el-input v-model="diagnosticForm.depth_range_min" placeholder="请输入最小值" style="width: 216px;" />
<span> </span>
<el-input v-model="diagnosticForm.depth_range_max" placeholder="请输入最大值" style="width: 218px;"/>
</div>
</el-form-item>
<div class="cameraFormTitle">头部IMU</div>
<el-form-item label="IMU串口号">
<el-select v-model="cameraForm.imu_port" placeholder="请选择">
<el-option label="COM1" value="COM1" />
<el-option label="COM2" value="COM2" />
<el-option label="COM3" value="COM3" />
<el-option label="COM4" value="COM4" />
<el-option label="COM5" value="COM5" />
<el-option label="COM6" value="COM6" />
<el-option label="COM7" value="COM7" />
<el-option label="COM8" value="COM8" />
<el-option label="COM9" value="COM9" />
<el-option label="COM10" value="COM10" />
</el-select>
</el-form-item>
</el-form>
</div>
<template #footer>
<span class="dialog-footer">
<el-button style="background: #323232;border:1px solid #787878;color: #ffffff;"
@click="cameraDialogVisible = false">取消</el-button>
<el-button type="primary" style="background:#0099ff;" @click="cameraSubmit('cameraForm')">
保存
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
@ -507,6 +578,7 @@ const depthCameraImgSrc = ref('') // 深度相机视频流
const screenshotLoading = ref(false)
const dataCollectionLoading = ref(false)
const isRecording = ref(false)
const cameraDialogVisible =ref(false) //
//
let mediaRecorder = null
@ -545,6 +617,9 @@ const resDialogVisible = ref(false)
const reshandleClose = () => {
resDialogVisible.value = false
}
const cameraHandleClose = () => {
cameraDialogVisible.value = false
}
const dialogVisible = ref(false)
const handleClose = () => {
dialogVisible.value = false
@ -568,17 +643,32 @@ const patientForm = ref({
workplace: '',
email: ''
})
const occupationOptions = ref([
{ label: '学生', value: '学生' }
])
const nationalityOptions = ref([
{ label: '汉族', value: '汉族' }
])
const occupationOptions = ref(["学生", "教师", "医生", "护士", "工程师", "程序员", "设计师",
"会计师", "律师", "警察", "消防员", "军人", "公务员", "销售", "市场营销",
"人力资源", "行政", "财务", "咨询师", "建筑师", "科研人员", "记者", "编辑",
"作家", "艺术家", "音乐家", "演员", "导演", "摄影师", "厨师", "服务员",
"司机", "快递员", "外卖员", "农民", "工人", "电工", "焊工", "机械师",
"飞行员", "空乘", "船员", "导游", "翻译", "心理咨询师", "社会工作者",
"运动员", "教练", "经纪人", "投资人", "企业家", "自由职业者"])
const nationalityOptions = ref(["汉族", "满族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族",
"布依族", "朝鲜族", "侗族", "瑶族", "白族", "土家族", "哈尼族", "哈萨克族", "傣族",
"黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族",
"景颇族", "柯尔克孜族", "土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族",
"毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族",
"俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族",
"鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"])
const diagnosticForm = ref({
diagnosis_info: '',
treatment_info: '',
suggestion_info: ''
})
const cameraForm = ref({ //
device_index: '', //
depth_mode: '', //
depth_range_min: '', //
depth_range_max: '', //
imu_port: '', // IMU
})
const calculatedAge = ref(null)
//
@ -782,6 +872,9 @@ const savePatient = async () => {
function routeTo(path) {
router.push(`/`)
}
function cameraUpdate() { //
cameraDialogVisible.value = true
}
const calculateAge = (birthDate) => {
if (!birthDate) return '-'
const today = new Date()
@ -2152,6 +2245,29 @@ const calibrationClick = async () => {
}
}
const cameraSubmit = async () => {
const response = await fetch(`${BACKEND_URL}/api/devices/calibrate/imu`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(cameraForm.value)
})
if (response.ok) {
const result = await response.json()
if (result.success) {
ElMessage.success(result.message)
} else {
ElMessage.error(result.message)
}
}
}
onMounted(() => {
//
loadPatientInfo()
@ -2294,6 +2410,12 @@ onUnmounted(() => {
margin-left: 40px;
}
.start-title-btn {
font-size: 16px;
padding: 8px 24px;
margin-left: 20px;
}
.top-bar-right {
display: flex;
align-items: center;
@ -2722,11 +2844,11 @@ onUnmounted(() => {
}
:deep(.el-form-item__label) {
color: #ffffff !important;
font-size: 14px !important;
font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif !important;
font-weight: 700 !important;
font-style: normal !important;
color: #ffffff ;
font-size: 16px ;
font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif ;
/* font-weight: 700 ; */
font-style: normal ;
}
@ -2870,6 +2992,7 @@ onUnmounted(() => {
}
:deep(.tsDialog.el-dialog .el-select__wrapper) {
font-size: 16px;
background-color: #242424;
border: none;
box-shadow: none;
@ -2901,6 +3024,18 @@ onUnmounted(() => {
:deep(.el-dialog__footer) {
padding: 0px 20px;
}
:deep(.el-radio__label){
font-size: 16px;
color: #fff;
}
.cameraFormTitle{
font-size: 18px;
color: #fff;
font-weight: 700;
margin: 30px 0px;
}
</style>
<style>
.dashboard-container.dashboard-container-home .el-table--border .el-table__inner-wrapper:after,
@ -2958,4 +3093,5 @@ onUnmounted(() => {
border-radius: 20px;
width: 220px;
}
</style>

View File

@ -9,6 +9,8 @@
<div class="system-title">平衡体态检测系统</div>
</div>
<div class="header-right">
<div style="color:#fff;margin-right: 20px;">登录时间{{ time }} </div>
<div class="user-info">
<el-avatar :size="40" :src="userInfo.avatar">
<el-icon>
@ -44,6 +46,7 @@
const router = useRouter()
const authStore = useAuthStore()
const time = ref("");
const userInfo = reactive({
username: '医生',
avatar: ''
@ -63,7 +66,21 @@
break
}
}
function dateFormat(row) {
const daterc = row;
if (daterc != null) {
var date = new Date(daterc);
var year = date.getFullYear();
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
//
return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
}
}
const handleLogout = async () => {
try {
await ElMessageBox.confirm('确定要退出登录吗?', '提示', {
@ -91,7 +108,7 @@
avatar: authStore.currentUser.avatar || ''
})
}
time.value = dateFormat(new Date())
})
</script>

View File

@ -9,8 +9,8 @@
</div>
</div>
<div class="nav-container-info">
<div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div>
<!-- <div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div> -->
</div>
</div>
<!-- 表单内容 -->
@ -59,8 +59,8 @@
<el-col :span="12">
<el-form-item label="民族" prop="nationality">
<el-select v-model="patientForm.nationality" placeholder="请选择">
<el-option v-for="item in nationalityOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in nationalityOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -104,8 +104,8 @@
<el-col :span="12">
<el-form-item label="职业" prop="occupation">
<el-select v-model="patientForm.occupation" placeholder="请选择">
<el-option v-for="item in occupationOptions" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in occupationOptions" :key="item" :label="item"
:value="item" />
</el-select>
</el-form-item>
</el-col>
@ -163,15 +163,23 @@ const patientForm = reactive({
workplace: '',
email: ''
})
const occupationOptions = ref([
{ label: '学生', value: '学生' }
])
const occupationOptions = ref(["学生", "教师", "医生", "护士", "工程师", "程序员", "设计师",
"会计师", "律师", "警察", "消防员", "军人", "公务员", "销售", "市场营销",
"人力资源", "行政", "财务", "咨询师", "建筑师", "科研人员", "记者", "编辑",
"作家", "艺术家", "音乐家", "演员", "导演", "摄影师", "厨师", "服务员",
"司机", "快递员", "外卖员", "农民", "工人", "电工", "焊工", "机械师",
"飞行员", "空乘", "船员", "导游", "翻译", "心理咨询师", "社会工作者",
"运动员", "教练", "经纪人", "投资人", "企业家", "自由职业者"])
const residenceOptions = ref([
{ label: '北京', value: '北京' }
])
const nationalityOptions = ref([
{ label: '汉族', value: '汉族' }
])
const nationalityOptions = ref(["汉族", "满族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族",
"布依族", "朝鲜族", "侗族", "瑶族", "白族", "土家族", "哈尼族", "哈萨克族", "傣族",
"黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族",
"景颇族", "柯尔克孜族", "土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族",
"毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族",
"俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族",
"鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"])
//
const formRules = {
name: [
@ -504,10 +512,12 @@ const handleSaveAndDetect = async () => {
:deep(.el-input__inner) {
color: #ffffff;
font-size: 16px;
}
:deep(.el-select__placeholder) {
color: #ffffff;
font-size: 16px;
}
:deep(.el-input.is-disabled .el-input__wrapper) {

View File

@ -10,8 +10,8 @@
</div>
</div>
<div class="nav-container-info">
<div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div>
<!-- <div>测试时间2025-08-03 17:13:18<span></span></div>
<div style="margin-left: 15px;">测试医生<span>李医生</span></div> -->
</div>
</div>
<div class="main-content">

View File

@ -1473,6 +1473,7 @@ onUnmounted(() => {
:deep(.el-input__inner) {
color: #fff;
font-size: 16px;
}
:deep(.el-textarea__inner) {