|
@@ -0,0 +1,430 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="详情"
|
|
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
|
|
+ width="1000px"
|
|
|
|
|
+ top="5vh"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ @close="handleClose"
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- 医生不开方理由(只读) -->
|
|
|
|
|
+ <div class="not-prescribe-reason-section">
|
|
|
|
|
+ <el-form label-width="120px" size="small">
|
|
|
|
|
+ <el-form-item label="不开方理由:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :value="notPrescribeReason"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ disabled
|
|
|
|
|
+ :rows="3"
|
|
|
|
|
+ style="color: #1a1a1a; background-color: #f5f7fa;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <el-divider />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 患者基本信息 -->
|
|
|
|
|
+ <div v-if="customerInfo && Object.keys(customerInfo).length" class="customer-info-section">
|
|
|
|
|
+ <div class="section-title">患者信息</div>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <span class="info-label">姓名:</span>
|
|
|
|
|
+ <span class="info-value">{{ customerInfo.customerName || '-' }}</span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <span class="info-label">性别:</span>
|
|
|
|
|
+ <span class="info-value">{{ sexText }}</span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <span class="info-label">年龄:</span>
|
|
|
|
|
+ <span class="info-value">{{ customerInfo.age || '-' }}</span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <span class="info-label">电话:</span>
|
|
|
|
|
+ <span class="info-value">{{ customerInfo.phone || '-' }}</span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <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.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-row :gutter="20">
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <span class="info-label">患者主诉:</span>
|
|
|
|
|
+ <span class="info-value">{{ customerInfo.patientMainComplaint || '-' }}</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="qa-list" style="max-height: 120px; overflow-y: auto;">
|
|
|
|
|
+ <div v-for="(item, idx) in questionAnswers" :key="idx" class="qa-item">
|
|
|
|
|
+ <span class="qa-title">{{ item.title }}</span>
|
|
|
|
|
+ <span class="qa-answer">{{ item.answerText || '未回答' }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-divider />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 医生建议及处置(只读) -->
|
|
|
|
|
+ <div class="section-title">医生建议及处置</div>
|
|
|
|
|
+ <el-form :model="formData" label-width="120px" size="small">
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="诊断">
|
|
|
|
|
+ <el-input v-model="formData.diagnose" type="textarea" :rows="4" readonly disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="舌诊,面诊,手诊">
|
|
|
|
|
+ <el-input v-model="formData.facialDiagnosis" type="textarea" :rows="4" readonly disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="饮食运动建议">
|
|
|
|
|
+ <el-input v-model="formData.foodAndExerciseGuidance" type="textarea" :rows="4" readonly disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="注意禁忌">
|
|
|
|
|
+ <el-input v-model="formData.noteTaboos" type="textarea" :rows="4" readonly disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="治疗方面">
|
|
|
|
|
+ <el-table :data="formData.healingList" border stripe max-height="300">
|
|
|
|
|
+ <el-table-column label="诊断内容" prop="diagnosisContent" min-width="200" />
|
|
|
|
|
+ <el-table-column label="建议治疗" prop="suggestTreatment" min-width="200" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-divider content-position="left">医生及药师信息</el-divider>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="医生职称" label-width="80px">
|
|
|
|
|
+ <el-input v-model="signInfo.doctorPosition" readonly disabled size="small" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="执业医师证号" label-width="100px">
|
|
|
|
|
+ <el-input :value="displayLicenseNumber" readonly disabled size="small" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="执业医师签字" label-width="100px">
|
|
|
|
|
+ <div v-if="signInfo.doctorSignUrl" style="display: flex; align-items: center;">
|
|
|
|
|
+ <el-image :src="signInfo.doctorSignUrl" style="width: 80px; height: 30px;" fit="contain" />
|
|
|
|
|
+ <span style="margin-left: 6px; color: #606266; font-size: 12px;">({{ signInfo.doctorName || '' }})</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-input v-else :value="signInfo.doctorName || '暂无医生签名'" readonly disabled size="small" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="药师签字" label-width="80px">
|
|
|
|
|
+ <div v-if="signInfo.drugDoctorSignUrl" style="display: flex; align-items: center;">
|
|
|
|
|
+ <el-image :src="signInfo.drugDoctorSignUrl" style="width: 80px; height: 30px;" fit="contain" />
|
|
|
|
|
+ <span style="margin-left: 6px; color: #606266; font-size: 12px;">({{ signInfo.drugDoctorName || '' }})</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-input v-else :value="signInfo.drugDoctorName || '暂无药师签名'" readonly disabled size="small" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="dialogVisible = false">关闭</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import {
|
|
|
|
|
+ getDoctorSignInfo,
|
|
|
|
|
+ getCustomerInfoAndQuestionAnswer,
|
|
|
|
|
+ getDoctorAdvice
|
|
|
|
|
+} from "@/api/his/scrmPrescribe";
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "DoctorNotPrescribeDetail",
|
|
|
|
|
+ props: {
|
|
|
|
|
+ visible: Boolean,
|
|
|
|
|
+ prescribeId: Number,
|
|
|
|
|
+ doctorId: Number,
|
|
|
|
|
+ drugDoctorId: Number,
|
|
|
|
|
+ companyCustomerId: Number,
|
|
|
|
|
+ notPrescribeReason: String
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ dialogVisible: false,
|
|
|
|
|
+ customerInfo: {},
|
|
|
|
|
+ questionAnswers: [],
|
|
|
|
|
+ formData: {
|
|
|
|
|
+ diagnose: '',
|
|
|
|
|
+ facialDiagnosis: '',
|
|
|
|
|
+ foodAndExerciseGuidance: '',
|
|
|
|
|
+ healingList: [],
|
|
|
|
|
+ noteTaboos: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ signInfo: {
|
|
|
|
|
+ doctorPosition: '',
|
|
|
|
|
+ doctorPractiseCode: '',
|
|
|
|
|
+ doctorCertificateCode: '',
|
|
|
|
|
+ doctorName: '',
|
|
|
|
|
+ drugDoctorName: '',
|
|
|
|
|
+ doctorSignUrl: '',
|
|
|
|
|
+ drugDoctorSignUrl: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ displayLicenseNumber() {
|
|
|
|
|
+ return this.signInfo.doctorPractiseCode || this.signInfo.doctorCertificateCode || '暂无证号';
|
|
|
|
|
+ },
|
|
|
|
|
+ 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: {
|
|
|
|
|
+ visible(val) {
|
|
|
|
|
+ this.dialogVisible = val;
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ if (!this.prescribeId) {
|
|
|
|
|
+ this.$message.error('处方ID无效,请刷新页面重试');
|
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
|
+ this.$emit('update:visible', false);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.resetFormData();
|
|
|
|
|
+ this.fetchSignInfo();
|
|
|
|
|
+ this.fetchCustomerInfoAndQuestions();
|
|
|
|
|
+ this.fetchDoctorAdvice();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ resetFormData() {
|
|
|
|
|
+ this.formData = {
|
|
|
|
|
+ diagnose: '',
|
|
|
|
|
+ facialDiagnosis: '',
|
|
|
|
|
+ foodAndExerciseGuidance: '',
|
|
|
|
|
+ healingList: [],
|
|
|
|
|
+ noteTaboos: ''
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ fetchSignInfo() {
|
|
|
|
|
+ const ids = [];
|
|
|
|
|
+ if (this.doctorId) ids.push(this.doctorId);
|
|
|
|
|
+ if (this.drugDoctorId) ids.push(this.drugDoctorId);
|
|
|
|
|
+ if (ids.length === 0) {
|
|
|
|
|
+ this.$message.warning('缺少医生或药师信息,无法获取签名');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ getDoctorSignInfo(ids).then(response => {
|
|
|
|
|
+ const data = response.data;
|
|
|
|
|
+ this.signInfo = {
|
|
|
|
|
+ doctorPosition: data.position || '',
|
|
|
|
|
+ doctorPractiseCode: data.PractiseCode || '',
|
|
|
|
|
+ doctorCertificateCode: data.certificateCode || '',
|
|
|
|
|
+ doctorName: data.doctorName || '',
|
|
|
|
|
+ drugDoctorName: data.drugDoctorName || '',
|
|
|
|
|
+ doctorSignUrl: data.doctorSignUrl || '',
|
|
|
|
|
+ drugDoctorSignUrl: data.drugDoctorSignUrl || ''
|
|
|
|
|
+ };
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('获取签名信息失败', error);
|
|
|
|
|
+ this.$message.error('获取医生签名信息失败');
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ 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);
|
|
|
|
|
+ this.customerInfo = {};
|
|
|
|
|
+ this.questionAnswers = [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ fetchDoctorAdvice() {
|
|
|
|
|
+ getDoctorAdvice(this.prescribeId).then(response => {
|
|
|
|
|
+ const data = response.data;
|
|
|
|
|
+ if (data) {
|
|
|
|
|
+ this.formData.diagnose = data.diagnose || '';
|
|
|
|
|
+ this.formData.facialDiagnosis = data.facialDiagnosis || '';
|
|
|
|
|
+ this.formData.foodAndExerciseGuidance = data.foodAndExerciseGuidance || '';
|
|
|
|
|
+ this.formData.noteTaboos = data.noteTaboos || '';
|
|
|
|
|
+ if (data.healingAreaJson) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const list = JSON.parse(data.healingAreaJson);
|
|
|
|
|
+ if (Array.isArray(list) && list.length > 0) {
|
|
|
|
|
+ this.formData.healingList = list;
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.error('解析治疗方面JSON失败', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('获取医生建议信息失败', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handleClose() {
|
|
|
|
|
+ this.$emit('update:visible', false);
|
|
|
|
|
+ this.$emit('close');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.dialog-footer {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.not-prescribe-reason-section {
|
|
|
|
|
+ margin-bottom: 14px;
|
|
|
|
|
+ background-color: #fdf6ec;
|
|
|
|
|
+ padding: 10px 16px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ border-left: 4px solid #e6a23c;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.customer-info-section {
|
|
|
|
|
+ margin-bottom: 14px;
|
|
|
|
|
+ background-color: #f5f7fa;
|
|
|
|
|
+ padding: 10px 16px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.question-answer-section {
|
|
|
|
|
+ margin-bottom: 14px;
|
|
|
|
|
+ background-color: #f9f9f9;
|
|
|
|
|
+ padding: 10px 16px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.section-title {
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ color: #303133;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qa-list {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 6px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qa-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: baseline;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qa-title {
|
|
|
|
|
+ width: 45%;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qa-answer {
|
|
|
|
|
+ width: 55%;
|
|
|
|
|
+ color: #409EFF;
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.info-label {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 70px;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.info-value {
|
|
|
|
|
+ color: #303133;
|
|
|
|
|
+ word-break: break-all;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.el-row {
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 只读输入框样式 */
|
|
|
|
|
+.el-input__inner,
|
|
|
|
|
+.el-textarea__inner {
|
|
|
|
|
+ color: #1a1a1a !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.el-input.is-disabled .el-input__inner,
|
|
|
|
|
+.el-textarea.is-disabled .el-textarea__inner {
|
|
|
|
|
+ color: #1a1a1a !important;
|
|
|
|
|
+ -webkit-text-fill-color: #1a1a1a !important;
|
|
|
|
|
+ background-color: #f5f7fa !important;
|
|
|
|
|
+ cursor: default;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|