diff --git a/src/views/devices/Device_Data_Components/ECG_datas.vue b/src/views/devices/Device_Data_Components/ECG_datas.vue index 574ac1ee6..9ccf79855 100644 --- a/src/views/devices/Device_Data_Components/ECG_datas.vue +++ b/src/views/devices/Device_Data_Components/ECG_datas.vue @@ -178,6 +178,26 @@ + +
+ +
+ + 保存结论 + + + 清空 + +
+
+
@@ -275,6 +295,7 @@ export default { dateFilter: null, // 新增:日期筛选值 currentEcgIndex: 0, // 新增:当前心电图索引 ecgImages: [], // 新增:心电图图片数组 + conclusionText: '', // 新增:结论文本 } }, computed: { @@ -310,6 +331,7 @@ export default { this.doctorMessage = '' // 重置医生通知内容 this.currentEcgIndex = 0 // 重置心电图索引 this.ecgImages = [] // 重置心电图数组 + this.conclusionText = '' // 重置结论文本 // 打开对话框并设置设备信息 this.dialogVisible = true @@ -586,6 +608,45 @@ export default { this.currentEcgIndex = index } }, + // 新增:保存结论 + async saveConclusion() { + if (!this.conclusionText.trim()) { + this.message.warning('请输入结论内容') + return + } + + if (!this.selectedPerson) { + this.message.warning('请先选择人员') + return + } + + try { + // 这里可以调用API保存结论到后端 + // 暂时使用本地存储模拟 + const conclusionData = { + userid: this.selectedPerson.userid, + username: this.selectedPerson.username, + deviceid: this.currentDeviceId, + conclusion: this.conclusionText, + createtime: new Date().getTime(), + createby: this.userProfile ? this.userProfile.nickname : '医生' + } + + // TODO: 调用后端API保存结论 + // await ConclusionApi.saveConclusion(conclusionData) + + this.message.success('结论保存成功') + console.log('保存的结论数据:', conclusionData) + } catch (error) { + console.error('保存结论失败:', error) + this.message.error('保存结论失败') + } + }, + // 新增:清空结论 + clearConclusion() { + this.conclusionText = '' + this.message.info('已清空结论内容') + }, } } @@ -887,4 +948,36 @@ export default { line-height: 1.1; padding: 0 16px; } + +.conclusion-container { + padding: 20px; + display: flex; + flex-direction: column; + gap: 15px; +} + +.conclusion-textarea { + width: 100%; +} + +.conclusion-textarea :deep(.el-textarea__inner) { + font-size: 14px; + line-height: 1.6; + border-radius: 8px; + border: 1px solid #DCDFE6; + transition: border-color 0.3s ease; +} + +.conclusion-textarea :deep(.el-textarea__inner):focus { + border-color: #409EFF; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1); +} + +.conclusion-actions { + display: flex; + justify-content: flex-end; + gap: 10px; + padding-top: 10px; + border-top: 1px solid #EBEEF5; +}