医生通知框

This commit is contained in:
Flow 2025-06-16 16:49:57 +08:00
parent ed421f94fc
commit 094bbc2477

View File

@ -122,6 +122,25 @@
</div>
</div>
</div>
<!-- 添加医生通知输入框和发送按钮 -->
<div class="doctor-notification">
<el-input
v-model="doctorMessage"
type="textarea"
:rows="3"
placeholder="请输入医生通知内容"
resize="none"
/>
<el-button
type="primary"
@click="sendDoctorNotification"
:disabled="!doctorMessage.trim()"
class="doctor-send-btn"
>
<span>发送</span>
<span>通知</span>
</el-button>
</div>
</el-card>
</div>
</div>
@ -146,6 +165,7 @@ export default {
currentDeviceName: '',
selectedPersonData: null, //
activeTab: 'basic', //
doctorMessage: '', //
basicFields: [
{ key: 'heartrate', label: '心率(次/分)' },
{ key: 'rhythm', label: '心律类型' },
@ -208,6 +228,7 @@ export default {
this.activeTime = ''
this.timeList = []
this.dateFilter = null //
this.doctorMessage = '' //
//
this.dialogVisible = true
@ -267,6 +288,26 @@ export default {
this.selectedPersonData = null
this.hasData = false
},
//
async sendDoctorNotification() {
if (!this.doctorMessage.trim()) {
this.$message.warning('请输入通知内容')
return
}
try {
// TODO: API
// await NotificationApi.sendDoctorNotification({
// userId: this.selectedPerson.userid,
// message: this.doctorMessage,
// deviceId: this.currentDeviceId
// })
this.$message.success('通知发送成功')
this.doctorMessage = '' //
} catch (error) {
console.error('发送通知失败:', error)
this.$message.error('发送通知失败')
}
},
}
}
</script>
@ -330,10 +371,13 @@ export default {
.data-display {
flex: 1;
position: relative;
}
.box-card {
height: 100%;
display: flex;
flex-direction: column;
}
.card-header {
@ -355,6 +399,9 @@ export default {
.ecg-data-content {
min-height: 200px;
flex: 1;
overflow-y: auto;
padding-bottom: 120px;
}
.el-scrollbar {
@ -377,7 +424,7 @@ export default {
border-radius: 8px;
padding: 12px;
transition: all 0.3s ease;
min-width: 0; /* 防止内容溢出 */
min-width: 0;
}
.ecg-grid-item:hover {
@ -446,4 +493,35 @@ export default {
color: #909399;
font-size: 14px;
}
.doctor-notification {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
background-color: #fff;
display: flex;
gap: 15px;
align-items: flex-start;
z-index: 1;
margin-top: 20px;
}
.doctor-notification :deep(.el-textarea__inner) {
flex: 1;
height: 80px !important;
}
.doctor-send-btn {
height: 80px !important;
min-width: 60px;
white-space: pre-line;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
line-height: 1.1;
padding: 0 16px;
}
</style>