新增功能
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<el-drawer
|
||||
v-model="visible"
|
||||
:title="drawerTitle"
|
||||
size="70%"
|
||||
size="60%"
|
||||
:before-close="handleClose"
|
||||
:z-index="1500"
|
||||
:modal="true"
|
||||
@@ -198,7 +198,6 @@
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
@@ -207,6 +206,20 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在用药物" prop="current_medications">
|
||||
<el-input
|
||||
v-model="formData.current_medications"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请填写患者当前正在使用的药物(如降压药、降糖药等),多种请换行或顿号分隔"
|
||||
maxlength="2000"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="left">主诉</el-divider>
|
||||
|
||||
@@ -475,51 +488,7 @@
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="舌苔" prop="tongue_coating">
|
||||
<el-input
|
||||
v-model="formData.tongue_coating"
|
||||
placeholder="请输入舌苔情况"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="脉象" prop="pulse">
|
||||
<el-input
|
||||
v-model="formData.pulse"
|
||||
placeholder="请输入脉象"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="治则" prop="treatment_principle">
|
||||
<el-input
|
||||
v-model="formData.treatment_principle"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入治则"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="处方" prop="prescription">
|
||||
<el-input
|
||||
v-model="formData.prescription"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入处方"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="医嘱" prop="doctor_advice">
|
||||
<el-input
|
||||
v-model="formData.doctor_advice"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入医嘱"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
|
||||
<el-form-item label="病史补充" prop="remark">
|
||||
<el-input
|
||||
@@ -616,6 +585,35 @@
|
||||
/>
|
||||
<el-empty v-else description="请先保存诊单后再查看聊天记录" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
v-if="
|
||||
hasPermission(['tcm.diagnosis/assign']) ||
|
||||
hasPermission(['tcm.diagnosis/detail'])
|
||||
"
|
||||
label="指派医助记录"
|
||||
name="assignLog"
|
||||
:disabled="!formData.id"
|
||||
lazy
|
||||
>
|
||||
<assign-log-panel
|
||||
v-if="formData.id"
|
||||
:diagnosis-id="Number(formData.id)"
|
||||
/>
|
||||
<el-empty v-else description="请先保存诊单后再查看指派记录" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
v-if="hasPermission(['doctor.appointment/lists'])"
|
||||
label="挂号记录"
|
||||
name="appointmentRecords"
|
||||
:disabled="!formData.id"
|
||||
lazy
|
||||
>
|
||||
<appointment-record-panel
|
||||
v-if="formData.id"
|
||||
:diagnosis-id="Number(formData.id)"
|
||||
/>
|
||||
<el-empty v-else description="请先保存诊单后再查看挂号记录" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 处方详情(查看病历) -->
|
||||
@@ -652,7 +650,13 @@ import BloodRecordList from './components/BloodRecordList.vue'
|
||||
import CaseRecordList from './components/CaseRecordList.vue'
|
||||
import CallRecordPanel from './components/CallRecordPanel.vue'
|
||||
import ImChatRecordPanel from './components/ImChatRecordPanel.vue'
|
||||
import AssignLogPanel from './components/AssignLogPanel.vue'
|
||||
import AppointmentRecordPanel from './components/AppointmentRecordPanel.vue'
|
||||
import TcmPrescription from '@/components/tcm-prescription/index.vue'
|
||||
import {
|
||||
DIAGNOSIS_TONGUE_IMAGES_UPDATED,
|
||||
type DiagnosisTongueImagesUpdatedDetail
|
||||
} from '@/utils/diagnosis-sync-events'
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
const appStore = useAppStore()
|
||||
@@ -676,6 +680,32 @@ watch([visible, activeTab], () => {
|
||||
if (activeTab.value === 'visit' && !hasPermission(['tcm.diagnosis/huifang'])) {
|
||||
activeTab.value = 'basic'
|
||||
}
|
||||
if (
|
||||
activeTab.value === 'assignLog' &&
|
||||
!hasPermission(['tcm.diagnosis/assign']) &&
|
||||
!hasPermission(['tcm.diagnosis/detail'])
|
||||
) {
|
||||
activeTab.value = 'basic'
|
||||
}
|
||||
if (activeTab.value === 'appointmentRecords' && !hasPermission(['doctor.appointment/lists'])) {
|
||||
activeTab.value = 'basic'
|
||||
}
|
||||
})
|
||||
|
||||
function onTongueImagesSyncedFromCall(e: Event) {
|
||||
if (!visible.value) return
|
||||
const d = (e as CustomEvent<DiagnosisTongueImagesUpdatedDetail>).detail
|
||||
if (!d?.diagnosisId || !Array.isArray(d.tongue_images)) return
|
||||
if (Number(formData.value.id) !== Number(d.diagnosisId)) return
|
||||
formData.value.tongue_images = [...d.tongue_images]
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener(DIAGNOSIS_TONGUE_IMAGES_UPDATED, onTongueImagesSyncedFromCall as EventListener)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener(DIAGNOSIS_TONGUE_IMAGES_UPDATED, onTongueImagesSyncedFromCall as EventListener)
|
||||
})
|
||||
|
||||
const formData = ref({
|
||||
@@ -720,7 +750,7 @@ const formData = ref({
|
||||
allergy_history: 0,
|
||||
family_history: 0,
|
||||
pregnancy_history: 0,
|
||||
tongue_images: [],
|
||||
tongue_images: [] as string[],
|
||||
report_files: [],
|
||||
symptoms: '',
|
||||
tongue_coating: '',
|
||||
@@ -729,6 +759,7 @@ const formData = ref({
|
||||
prescription: '',
|
||||
doctor_advice: '',
|
||||
remark: '',
|
||||
current_medications: '',
|
||||
status: 1,
|
||||
external_userid: ''
|
||||
})
|
||||
@@ -761,11 +792,7 @@ const formRules = {
|
||||
gender: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||
age: [{ required: true, message: '请输入年龄', trigger: 'blur' }],
|
||||
fasting_blood_sugar: [{ required: true, message: '请输入空腹血糖', trigger: 'blur' }],
|
||||
diagnosis_date: [{ required: true, message: '请选择诊断日期', trigger: 'change' }],
|
||||
diagnosis_type: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
diabetes_discovery_year: [{ required: true, message: '请输入发现糖尿病病患病史年数', trigger: 'blur' }],
|
||||
local_hospital_diagnosis: [{ required: true, type: 'array', min: 1, message: '请选择当地医院诊断结果', trigger: 'change' }],
|
||||
local_hospital_name: [{ required: true, message: '请输入当地就诊医院名称', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
// 获取字典选项
|
||||
@@ -1015,7 +1042,7 @@ const handleClose = () => {
|
||||
allergy_history: 0,
|
||||
family_history: 0,
|
||||
pregnancy_history: 0,
|
||||
tongue_images: [],
|
||||
tongue_images: [] as string[],
|
||||
report_files: [],
|
||||
symptoms: '',
|
||||
tongue_coating: '',
|
||||
@@ -1024,6 +1051,7 @@ const handleClose = () => {
|
||||
prescription: '',
|
||||
doctor_advice: '',
|
||||
remark: '',
|
||||
current_medications: '',
|
||||
status: 1,
|
||||
external_userid: ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user