医生通知框
This commit is contained in:
parent
ed421f94fc
commit
094bbc2477
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user