修改档案页和新增修改页面样式
This commit is contained in:
parent
22e6a3f48a
commit
c4cccfd3c2
BIN
frontend/src/renderer/src/assets/new/add.png
Normal file
BIN
frontend/src/renderer/src/assets/new/add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 B |
11
frontend/src/renderer/src/assets/new/bigavatar.svg
Normal file
11
frontend/src/renderer/src/assets/new/bigavatar.svg
Normal file
File diff suppressed because one or more lines are too long
BIN
frontend/src/renderer/src/assets/new/homeedit.png
Normal file
BIN
frontend/src/renderer/src/assets/new/homeedit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 596 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.62:5000'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为需要发送数据的请求设置Content-Type(避免覆盖FormData)
|
// 为需要发送数据的请求设置Content-Type(避免覆盖FormData)
|
||||||
@ -660,7 +660,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.62:5000'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2560,7 +2560,7 @@ function refreshClick(type) {
|
|||||||
.video-preview {
|
.video-preview {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
/* object-fit: cover; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-time {
|
.video-time {
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
|
|
||||||
.header {
|
.header {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
background: #323232;
|
background: #191028;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@ -6,12 +6,12 @@
|
|||||||
<div>{{ patienttitle }} </div>
|
<div>{{ patienttitle }} </div>
|
||||||
<img src="@/assets/new/u264.svg" alt="" style="cursor: pointer;" @click="handleCancel">
|
<img src="@/assets/new/u264.svg" alt="" style="cursor: pointer;" @click="handleCancel">
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="patientFormRef" :model="patientForm" :rules="formRules" label-width="120px" class="patient-form">
|
<el-form ref="patientFormRef" :model="patientForm" :rules="formRules" label-width="80px" class="patient-form">
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="80">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="测试者ID" prop="testerId">
|
<el-form-item label="患者ID" prop="testerId">
|
||||||
<el-input v-model="patientForm.id" disabled placeholder="请输入测试者ID" clearable />
|
<el-input v-model="patientForm.id" disabled placeholder="自动生成患者ID" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -89,8 +89,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="证件号" prop="workplace">
|
<el-form-item label="证件号" prop="idcode">
|
||||||
<el-input v-model="patientForm.workplace" placeholder="请输入" clearable />
|
<el-input v-model="patientForm.idcode" placeholder="请输入" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -100,21 +100,11 @@
|
|||||||
<el-button @click="handleCancel" class="formreturnCancel">退出</el-button>
|
<el-button @click="handleCancel" class="formreturnCancel">退出</el-button>
|
||||||
<el-button type="primary" :loading="saveLoading" @click="handleSave"
|
<el-button type="primary" :loading="saveLoading" @click="handleSave"
|
||||||
class="formsaveCancel">
|
class="formsaveCancel">
|
||||||
保存
|
确定
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" :loading="saveLoading" @click="handleSaveAndDetect"
|
|
||||||
class="formsaveCancel">
|
|
||||||
保存并开始检测
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 底部操作按钮 -->
|
|
||||||
<!-- <div class="footer-actions">
|
|
||||||
<el-button type="success" :loading="saveAndDetectLoading">
|
|
||||||
保存并开始检测
|
|
||||||
</el-button>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -152,19 +142,21 @@ const patientForm = reactive({
|
|||||||
shoe_size: '',
|
shoe_size: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
occupation: '',
|
occupation: '',
|
||||||
workplace: '',
|
idcode: '',
|
||||||
email: ''
|
email: ''
|
||||||
})
|
})
|
||||||
// 加载状态
|
// 加载状态
|
||||||
const saveLoading = ref(false)
|
const saveLoading = ref(false)
|
||||||
const saveAndDetectLoading = ref(false)
|
const saveAndDetectLoading = ref(false)
|
||||||
const patienttitle = ref("新建患者信息")
|
const patienttitle = ref("新建档案")
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 从认证状态管理中加载用户信息
|
// 从认证状态管理中加载用户信息
|
||||||
if (props.patienttype == 'edit') {
|
if (props.patienttype == 'edit') {
|
||||||
patienttitle.value = '编辑患者信息'
|
patienttitle.value = '编辑个人信息'
|
||||||
Object.assign(patientForm, props.selectedPatient)
|
let tempInfo = props.selectedPatient
|
||||||
|
tempInfo.age = calculateAgeres(tempInfo.birth_date )
|
||||||
|
Object.assign(patientForm, tempInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -227,7 +219,7 @@ const calculateAgeres = (date) => {
|
|||||||
calculatedAge.value = age
|
calculatedAge.value = age
|
||||||
}
|
}
|
||||||
const handleCancel = async () => {
|
const handleCancel = async () => {
|
||||||
emit('closecreatbox',false)
|
emit('closecreatbox','关闭','')
|
||||||
}
|
}
|
||||||
|
|
||||||
const validateForm = async () => {
|
const validateForm = async () => {
|
||||||
@ -253,7 +245,7 @@ const savePatient = async () => {
|
|||||||
email: patientForm.email,
|
email: patientForm.email,
|
||||||
nationality: patientForm.nationality,
|
nationality: patientForm.nationality,
|
||||||
residence: patientForm.residence,
|
residence: patientForm.residence,
|
||||||
workplace: patientForm.workplace,
|
idcode: patientForm.idcode,
|
||||||
medical_history: '', // 添加病史字段
|
medical_history: '', // 添加病史字段
|
||||||
notes: '' // 添加备注字段
|
notes: '' // 添加备注字段
|
||||||
}
|
}
|
||||||
@ -261,7 +253,7 @@ const savePatient = async () => {
|
|||||||
try {
|
try {
|
||||||
const response = await patientAPI.create(patientData)
|
const response = await patientAPI.create(patientData)
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
emit('closecreatbox',true)
|
emit('closecreatbox','新建',response.data)
|
||||||
return response.data
|
return response.data
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -274,24 +266,25 @@ const savePatient = async () => {
|
|||||||
}
|
}
|
||||||
const updatePatient = async () => {
|
const updatePatient = async () => {
|
||||||
const patientData = {
|
const patientData = {
|
||||||
id: patientForm.value.id,
|
id: patientForm.id,
|
||||||
name: patientForm.value.name,
|
name: patientForm.name,
|
||||||
gender: patientForm.value.gender,
|
gender: patientForm.gender,
|
||||||
age: calculatedAge.value,
|
age: calculatedAge.value,
|
||||||
birth_date: patientForm.value.birth_date,
|
birth_date: patientForm.birth_date,
|
||||||
height: patientForm.value.height,
|
height: patientForm.height,
|
||||||
weight: patientForm.value.weight,
|
weight: patientForm.weight,
|
||||||
shoe_size: patientForm.value.shoe_size,
|
shoe_size: patientForm.shoe_size,
|
||||||
phone: patientForm.value.phone,
|
phone: patientForm.phone,
|
||||||
occupation: patientForm.value.occupation,
|
occupation: patientForm.occupation,
|
||||||
email: patientForm.value.email,
|
email: patientForm.email,
|
||||||
nationality: patientForm.value.nationality,
|
nationality: patientForm.nationality,
|
||||||
residence: patientForm.value.residence,
|
residence: patientForm.residence,
|
||||||
workplace: patientForm.value.workplace
|
idcode: patientForm.idcode
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await patientAPI.updatePatient(patientForm.value.id, patientData)
|
const response = await patientAPI.updatePatient(patientForm.id, patientData)
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
emit('closecreatbox','编辑',patientData)
|
||||||
return response.data
|
return response.data
|
||||||
} else {
|
} else {
|
||||||
throw new Error(response.message || '修改失败')
|
throw new Error(response.message || '修改失败')
|
||||||
@ -305,35 +298,22 @@ const handleSave = async () => {
|
|||||||
|
|
||||||
saveLoading.value = true
|
saveLoading.value = true
|
||||||
try {
|
try {
|
||||||
if(patientForm.value.id == null){
|
if(patientForm.id == null){
|
||||||
await savePatient()
|
await savePatient()
|
||||||
}else[
|
}else{
|
||||||
await updatePatient ()
|
await updatePatient()
|
||||||
]
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElMessage.success('患者档案保存成功')
|
ElMessage.success('患者档案保存成功')
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('保存失败:' + error.message)
|
ElMessage.error('保存失败:' + error.message)
|
||||||
} finally {
|
} finally {
|
||||||
saveLoading.value = false
|
saveLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSaveAndDetect = async () => {
|
|
||||||
if (!(await validateForm())) return
|
|
||||||
|
|
||||||
saveAndDetectLoading.value = true
|
|
||||||
try {
|
|
||||||
const patient = await savePatient()
|
|
||||||
ElMessage.success('患者档案保存成功,即将开始检测')
|
|
||||||
emit('closecreatbox',patient)
|
|
||||||
// router.push(`/detection/${patient.id}`)
|
|
||||||
} catch (error) {
|
|
||||||
ElMessage.error('保存失败:' + error.message)
|
|
||||||
} finally {
|
|
||||||
saveAndDetectLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -346,7 +326,9 @@ const handleSaveAndDetect = async () => {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
background: #1b1b1b;
|
background: #465367;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 0px 16px rgba(17, 24, 33, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-container {
|
.nav-container {
|
||||||
@ -400,7 +382,6 @@ const handleSaveAndDetect = async () => {
|
|||||||
.patient-form {
|
.patient-form {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-section {
|
.form-section {
|
||||||
@ -460,9 +441,9 @@ const handleSaveAndDetect = async () => {
|
|||||||
:deep(.el-form-item__label) {
|
:deep(.el-form-item__label) {
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
font-family: 'Noto Sans SC';
|
font-family: 'Noto Sans SC';
|
||||||
font-weight: 700 !important;
|
font-weight: 400 !important;
|
||||||
font-style: normal !important;
|
font-style: normal !important;
|
||||||
color: #787878 !important;
|
color: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-form-item__content) {
|
:deep(.el-form-item__content) {
|
||||||
@ -494,7 +475,7 @@ const handleSaveAndDetect = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.patient-create-container :deep(.el-input__wrapper) {
|
.patient-create-container :deep(.el-input__wrapper) {
|
||||||
background-color: #282828;
|
background-color: #2a3649;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: rgb(54, 54, 54);
|
border-color: rgb(54, 54, 54);
|
||||||
@ -504,21 +485,17 @@ const handleSaveAndDetect = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-select__wrapper) {
|
:deep(.el-select__wrapper) {
|
||||||
background-color: #282828;
|
background-color: #2a3649;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: rgb(54, 54, 54);
|
border-color: transparent;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
:deep(.el-select__wrapper:hover){
|
||||||
:deep(.el-form-item__label) {
|
border-color: #3d4c65;
|
||||||
font-size: 14px;
|
box-shadow: 0 0 0 1px transparent inset;
|
||||||
font-family: 'Noto Sans SC';
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-col-12) {
|
:deep(.el-col-12) {
|
||||||
@ -527,22 +504,24 @@ const handleSaveAndDetect = async () => {
|
|||||||
|
|
||||||
:deep(.el-input__inner) {
|
:deep(.el-input__inner) {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
:deep(.el-input.is-disabled .el-input__inner) {
|
||||||
|
color: #787878;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-select__placeholder) {
|
:deep(.el-select__placeholder) {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input.is-disabled .el-input__wrapper) {
|
:deep(.el-input.is-disabled .el-input__wrapper) {
|
||||||
background-color: rgba(127, 127, 127, 1);
|
background-color: #2a3649;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: rgba(215, 215, 215, 1);
|
border-color: transparent;
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
@ -571,13 +550,12 @@ const handleSaveAndDetect = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background-color: rgba(46, 52, 59, 1);
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 20px;
|
padding: 0 30px;
|
||||||
font-family: 'Noto Sans SC';
|
font-family: 'Noto Sans SC';
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 16px;
|
font-size: 20px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@ -589,29 +567,35 @@ const handleSaveAndDetect = async () => {
|
|||||||
.formreturnCancel{
|
.formreturnCancel{
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #313131;
|
background: rgba(89, 113, 148, 1);
|
||||||
border: 1px solid rgb(148, 148, 148);
|
border: 1px solid rgba(89, 113, 148, 1);
|
||||||
font-family: 'Noto Sans SC';
|
font-family: 'Noto Sans SC';
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: rgb(148, 148, 148);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
}
|
}
|
||||||
.formreturnCancel:hover{
|
.formreturnCancel:hover{
|
||||||
background: #1e2c49;
|
background: #425b89;
|
||||||
color: #266fff;
|
color: #266fff;
|
||||||
border: 1px solid #266fff;
|
border: 1px solid #266fff;
|
||||||
}
|
}
|
||||||
.formsaveCancel{
|
.formsaveCancel{
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #266fff;
|
background: #0b94d5;
|
||||||
font-family: 'Noto Sans SC';
|
font-family: 'Noto Sans SC';
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
.formsaveCancel:hover{
|
||||||
|
|
||||||
|
background: #5189ff;
|
||||||
|
border: 1px solid #5189ff;
|
||||||
|
|
||||||
|
}
|
||||||
.el-date-editor.el-input{
|
.el-date-editor.el-input{
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1372,7 +1372,7 @@ onMounted(() => {
|
|||||||
.screenshot-item img {
|
.screenshot-item img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
object-fit: cover;
|
/* object-fit: cover; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.screenshot-overlay {
|
.screenshot-overlay {
|
||||||
|
|||||||
@ -1200,7 +1200,7 @@ onUnmounted(() => {
|
|||||||
.preview-video {
|
.preview-video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: contain;
|
/* object-fit: contain; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-overlay {
|
.recording-overlay {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user