|
|
@@ -6,9 +6,65 @@
|
|
|
:close-on-click-modal="false"
|
|
|
@close="handleClose"
|
|
|
>
|
|
|
- <!-- 客户问答信息展示区域(保持不变) -->
|
|
|
+ <!-- 患者基本信息区 -->
|
|
|
+ <div v-if="customerInfo && Object.keys(customerInfo).length" class="customer-info-section">
|
|
|
+ <div class="section-title">患者信息</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <span class="info-label">患者姓名:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.customerName || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <span class="info-label">性别:</span>
|
|
|
+ <span class="info-value">{{ sexText }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <span class="info-label">年龄:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.age || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <span class="info-label">电话:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.phone || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <span class="info-label">会诊时间:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.createTime | formatDate }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <span class="info-label">患者病情主诉:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.patientMainComplaint || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <span class="info-label">现病史:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.presentIllness || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <span class="info-label">过敏史:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.allergyHistory || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <span class="info-label">现用药:</span>
|
|
|
+ <span class="info-value">{{ customerInfo.currentMedication || '-' }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-divider />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 客户问答信息展示区 -->
|
|
|
<div v-if="questionAnswers.length > 0" class="question-answer-section">
|
|
|
- <div class="section-title">患者病情</div>
|
|
|
+ <div class="section-title">患者病情问答</div>
|
|
|
<div class="qa-list">
|
|
|
<div v-for="(item, idx) in questionAnswers" :key="idx" class="qa-item">
|
|
|
<span class="qa-title">{{ item.title }}</span>
|
|
|
@@ -17,6 +73,8 @@
|
|
|
</div>
|
|
|
<el-divider />
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 医生建议及处置表单 -->
|
|
|
<div class="section-title">医生建议及处置</div>
|
|
|
<el-form :model="formData" :rules="formRules" ref="adviceForm" label-width="150px">
|
|
|
<!-- 诊断 -->
|
|
|
@@ -102,7 +160,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDoctorSignInfo, submitDoctorAdvice, getCustomerQuestionAnswer, getDoctorAdvice } from "@/api/his/scrmPrescribe";
|
|
|
+import {
|
|
|
+ getDoctorSignInfo,
|
|
|
+ submitDoctorAdvice,
|
|
|
+ getCustomerInfoAndQuestionAnswer,
|
|
|
+ getDoctorAdvice
|
|
|
+} from "@/api/his/scrmPrescribe";
|
|
|
|
|
|
export default {
|
|
|
name: "DoctorAdviceDialog",
|
|
|
@@ -118,7 +181,8 @@ export default {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
submitLoading: false,
|
|
|
- questionAnswers: [],
|
|
|
+ customerInfo: {}, // 存储客户基本信息
|
|
|
+ questionAnswers: [], // 存储问答列表
|
|
|
formData: {
|
|
|
diagnose: '',
|
|
|
facialDiagnosis: '',
|
|
|
@@ -158,6 +222,21 @@ export default {
|
|
|
},
|
|
|
dialogTitle() {
|
|
|
return this.readonly ? "查看完善信息" : "医生建议及处置";
|
|
|
+ },
|
|
|
+ sexText() {
|
|
|
+ const sex = this.customerInfo.sex;
|
|
|
+ if (sex === '1') return '男';
|
|
|
+ if (sex === '0') return '女';
|
|
|
+ return '未知';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ formatDate(val) {
|
|
|
+ if (!val) return '-';
|
|
|
+ const date = new Date(val);
|
|
|
+ if (isNaN(date)) return '-';
|
|
|
+ const pad = n => String(n).padStart(2, '0');
|
|
|
+ return `${date.getFullYear()}-${pad(date.getMonth()+1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -172,8 +251,8 @@ export default {
|
|
|
}
|
|
|
this.resetFormData();
|
|
|
this.fetchSignInfo();
|
|
|
- this.fetchQuestionAnswers();
|
|
|
- this.fetchDoctorAdvice(); // 新增:获取已保存的建议信息
|
|
|
+ this.fetchCustomerInfoAndQuestions(); // 获取客户信息+问答
|
|
|
+ this.fetchDoctorAdvice();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -225,15 +304,41 @@ export default {
|
|
|
this.$message.error('获取医生签名信息失败');
|
|
|
});
|
|
|
},
|
|
|
- fetchQuestionAnswers() {
|
|
|
- if (!this.companyCustomerId) return;
|
|
|
- getCustomerQuestionAnswer(this.companyCustomerId).then(response => {
|
|
|
- this.questionAnswers = response.data || [];
|
|
|
+ // 新方法:获取客户基本信息 + 问答列表
|
|
|
+ fetchCustomerInfoAndQuestions() {
|
|
|
+ if (!this.companyCustomerId) {
|
|
|
+ this.customerInfo = {};
|
|
|
+ this.questionAnswers = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ getCustomerInfoAndQuestionAnswer(this.companyCustomerId).then(response => {
|
|
|
+ const data = response.data;
|
|
|
+ if (data) {
|
|
|
+ // 存储基本信息
|
|
|
+ this.customerInfo = {
|
|
|
+ customerName: data.customerName,
|
|
|
+ sex: data.sex,
|
|
|
+ age: data.age,
|
|
|
+ phone: data.phone,
|
|
|
+ createTime: data.createTime,
|
|
|
+ patientMainComplaint: data.patientMainComplaint,
|
|
|
+ presentIllness: data.presentIllness,
|
|
|
+ allergyHistory: data.allergyHistory,
|
|
|
+ currentMedication: data.currentMedication
|
|
|
+ };
|
|
|
+ // 存储问答列表
|
|
|
+ this.questionAnswers = data.customerQuestionAnswerVOList || [];
|
|
|
+ } else {
|
|
|
+ this.customerInfo = {};
|
|
|
+ this.questionAnswers = [];
|
|
|
+ }
|
|
|
}).catch(error => {
|
|
|
- console.error('获取问答信息失败', error);
|
|
|
+ console.error('获取客户信息及问答失败', error);
|
|
|
+ this.customerInfo = {};
|
|
|
+ this.questionAnswers = [];
|
|
|
});
|
|
|
},
|
|
|
- // 新增:获取已保存的医生建议
|
|
|
+ // 获取已保存的医生建议
|
|
|
fetchDoctorAdvice() {
|
|
|
getDoctorAdvice(this.prescribeId).then(response => {
|
|
|
const data = response.data;
|
|
|
@@ -242,7 +347,6 @@ export default {
|
|
|
this.formData.facialDiagnosis = data.facialDiagnosis || '';
|
|
|
this.formData.foodAndExerciseGuidance = data.foodAndExerciseGuidance || '';
|
|
|
this.formData.noteTaboos = data.noteTaboos || '';
|
|
|
- // 解析 healingAreaJson
|
|
|
if (data.healingAreaJson) {
|
|
|
try {
|
|
|
const list = JSON.parse(data.healingAreaJson);
|
|
|
@@ -300,36 +404,64 @@ export default {
|
|
|
.dialog-footer {
|
|
|
text-align: right;
|
|
|
}
|
|
|
+
|
|
|
+.customer-info-section {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ padding: 12px 16px;
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+
|
|
|
.question-answer-section {
|
|
|
margin-bottom: 20px;
|
|
|
background-color: #f9f9f9;
|
|
|
padding: 12px 16px;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
+
|
|
|
.section-title {
|
|
|
font-weight: bold;
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 12px;
|
|
|
color: #303133;
|
|
|
}
|
|
|
+
|
|
|
.qa-list {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
gap: 10px;
|
|
|
}
|
|
|
+
|
|
|
.qa-item {
|
|
|
display: flex;
|
|
|
align-items: baseline;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
+
|
|
|
.qa-title {
|
|
|
width: 45%;
|
|
|
color: #606266;
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
+
|
|
|
.qa-answer {
|
|
|
width: 55%;
|
|
|
color: #409EFF;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
+
|
|
|
+/* 新增的患者信息样式 */
|
|
|
+.info-label {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100px;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+.info-value {
|
|
|
+ color: #303133;
|
|
|
+ word-break: break-all;
|
|
|
+}
|
|
|
+.el-row {
|
|
|
+ margin-bottom: 6px;
|
|
|
+}
|
|
|
</style>
|