更新
This commit is contained in:
@@ -308,6 +308,15 @@ const formRules = reactive({
|
||||
trigger: ['change']
|
||||
}
|
||||
],
|
||||
dept_id: [
|
||||
{
|
||||
required: true,
|
||||
type: 'array',
|
||||
min: 1,
|
||||
message: '请选择归属部门',
|
||||
trigger: ['change']
|
||||
}
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
validator: phoneValidator,
|
||||
|
||||
@@ -105,6 +105,16 @@
|
||||
<el-input v-model="formData.license_no" placeholder="请输入执业证书编号" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 医生资质图片 -->
|
||||
<el-form-item label="资质图片">
|
||||
<div>
|
||||
<div>
|
||||
<material-picker v-model="formData.qualification_images" :limit="9" />
|
||||
</div>
|
||||
<div class="form-tips">上传医生资质证书、荣誉证书等图片,最多9张,建议尺寸:800*600px</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 图文问诊 -->
|
||||
<el-form-item label="图文问诊">
|
||||
<el-switch
|
||||
@@ -273,6 +283,7 @@ const formData = reactive({
|
||||
avatar: '',
|
||||
title: '', // 职称
|
||||
license_no: '', // 执业证书编号
|
||||
qualification_images: '', // 医生资质图片
|
||||
enable_image_consult: 1, // 是否开启图文问诊
|
||||
enable_video_consult: 1, // 是否开启视频问诊
|
||||
enable_charge: 0, // 是否开启收费
|
||||
@@ -340,6 +351,15 @@ const formRules = reactive({
|
||||
trigger: ['change']
|
||||
}
|
||||
],
|
||||
dept_id: [
|
||||
{
|
||||
required: true,
|
||||
type: 'array',
|
||||
min: 1,
|
||||
message: '请选择归属部门',
|
||||
trigger: ['change']
|
||||
}
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
validator: phoneValidator,
|
||||
@@ -403,6 +423,7 @@ const open = (type = 'add') => {
|
||||
avatar: '',
|
||||
title: '',
|
||||
license_no: '',
|
||||
qualification_images: '',
|
||||
enable_image_consult: 1,
|
||||
enable_video_consult: 1,
|
||||
enable_charge: 0,
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<el-table-column label="操作" width="380" fixed="right" align="left">
|
||||
<template #default="{ row }">
|
||||
<div class="action-btns">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
v-perms="['doctor.appointment/detail']"
|
||||
type="primary"
|
||||
link
|
||||
@@ -185,17 +185,17 @@
|
||||
@click="handleDetail(row)"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button
|
||||
v-perms="['tcm.diagnosis/kaifang']"
|
||||
v-perms="['tcm.diagnosis/edit']"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleViewCase(row)"
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
病历
|
||||
编辑患者
|
||||
</el-button>
|
||||
<template v-if="row.status === 1">
|
||||
|
||||
<el-button
|
||||
v-perms="['tcm.diagnosis/videoQr']"
|
||||
type="warning"
|
||||
@@ -234,7 +234,7 @@
|
||||
>
|
||||
开方
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<el-dropdown trigger="click" @command="(cmd) => handleAction(cmd, row)" placement="bottom-end">
|
||||
<el-button type="info" link size="small">
|
||||
更多
|
||||
@@ -243,11 +243,11 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
v-perms="['tcm.diagnosis/edit']"
|
||||
command="edit"
|
||||
v-perms="['tcm.diagnosis/kaifang']"
|
||||
command="viewCase"
|
||||
>
|
||||
<el-icon><Edit /></el-icon>
|
||||
编辑患者
|
||||
<el-icon><Document /></el-icon>
|
||||
病历
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="row.status === 1"
|
||||
@@ -761,6 +761,9 @@ const handleAction = (command: string, row: any) => {
|
||||
case 'edit':
|
||||
handleEditPatient(row)
|
||||
break
|
||||
case 'viewCase':
|
||||
handleViewCase(row)
|
||||
break
|
||||
case 'complete':
|
||||
handleComplete(row)
|
||||
break
|
||||
@@ -832,6 +835,11 @@ const handleEditPatient = (row: any) => {
|
||||
editRef.value?.open('edit', row.patient_id)
|
||||
}
|
||||
|
||||
// 编辑患者(按钮直接调用)
|
||||
const handleEdit = (row: any) => {
|
||||
handleEditPatient(row)
|
||||
}
|
||||
|
||||
// 聊天
|
||||
const handleChat = async (row: any) => {
|
||||
if (!row.patient_id) {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div class="case-record-list">
|
||||
<div class="mb-3 flex justify-end">
|
||||
<el-button type="primary" size="small" @click="handleOpenPrescription">开方</el-button>
|
||||
</div>
|
||||
<el-table :data="caseList" border v-loading="loading">
|
||||
<el-table-column prop="prescription_date" label="就诊日期" width="120" />
|
||||
<el-table-column prop="visit_no" label="门诊号" width="120" />
|
||||
@@ -46,7 +49,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['view'])
|
||||
const emit = defineEmits(['view', 'openPrescription'])
|
||||
|
||||
const caseList = ref<any[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -75,6 +78,10 @@ const handleView = (row: any) => {
|
||||
emit('view', row)
|
||||
}
|
||||
|
||||
const handleOpenPrescription = () => {
|
||||
emit('openPrescription')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCases()
|
||||
})
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发现糖尿病病患病史" prop="diabetes_discovery_year">
|
||||
<el-form-item label="发现糖尿病患病史" prop="diabetes_discovery_year">
|
||||
<el-input-number
|
||||
v-model="formData.diabetes_discovery_year"
|
||||
:min="0"
|
||||
@@ -241,8 +241,8 @@
|
||||
<el-form-item label="当地医院诊断结果" prop="local_hospital_diagnosis" class="checkbox-form-item">
|
||||
<el-checkbox-group v-model="formData.local_hospital_diagnosis">
|
||||
<el-checkbox-button label="糖尿病">糖尿病</el-checkbox-button>
|
||||
<el-checkbox-button label="高血压">高血压</el-checkbox-button>
|
||||
<el-checkbox-button label="糖尿病高血压">糖尿病高血压</el-checkbox-button>
|
||||
<el-checkbox-button label="消渴病">消渴病</el-checkbox-button>
|
||||
<el-checkbox-button label="糖尿病前期">糖尿病前期</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
@@ -519,12 +519,12 @@
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-form-item label="病史补充" prop="remark">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入备注"
|
||||
placeholder="请输入病史补充"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -581,6 +581,7 @@
|
||||
ref="caseRecordListRef"
|
||||
:diagnosis-id="Number(formData.id)"
|
||||
@view="handleViewCase"
|
||||
@openPrescription="handleOpenPrescription"
|
||||
/>
|
||||
</div>
|
||||
<el-empty v-else description="请先保存诊单,开方后病历将在此显示" />
|
||||
@@ -715,6 +716,7 @@ const formRules = {
|
||||
phone: [{ required: true, validator: validatePhone, trigger: 'blur' }],
|
||||
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' }],
|
||||
@@ -914,6 +916,21 @@ const handleViewCase = (row: any) => {
|
||||
prescriptionRef.value?.openById(row.id)
|
||||
}
|
||||
|
||||
// 开方:传入当前诊单数据,包含详细病历(深拷贝避免响应式引用)
|
||||
const handleOpenPrescription = () => {
|
||||
const data = {
|
||||
id: formData.value.id,
|
||||
diagnosis_id: formData.value.id,
|
||||
appointment_id: 0,
|
||||
patient_name: formData.value.patient_name,
|
||||
patient_phone: formData.value.phone,
|
||||
patient_gender: formData.value.gender,
|
||||
patient_age: formData.value.age,
|
||||
case_record: JSON.parse(JSON.stringify(formData.value))
|
||||
}
|
||||
prescriptionRef.value?.open(data)
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
formRef.value?.resetFields()
|
||||
formData.value = {
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/assign'])" command="assign"><el-icon><User /></el-icon>指派</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.has_appointment && hasPermission(['tcm.diagnosis/videoQr'])" command="videoQr"><el-icon><Picture /></el-icon>视频二维码</el-dropdown-item>
|
||||
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/guahao'])" command="confirmQr"><el-icon><Picture /></el-icon>二维码</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.has_appointment && hasPermission(['tcm.diagnosis/guahao'])" command="cancelApt"><el-icon><CircleClose /></el-icon>取消挂号</el-dropdown-item>
|
||||
<el-dropdown-item command="order" v-if="hasPermission(['tcm.diagnosis/order'])"><el-icon><Document /></el-icon>创建订单</el-dropdown-item>
|
||||
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/delete'])" command="delete" divided><el-icon><Delete /></el-icon><span class="text-danger">删除</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -454,12 +455,13 @@
|
||||
<script setup lang="ts" name="tcmDiagnosis">
|
||||
import { tcmDiagnosisLists, tcmDiagnosisDelete, tcmDiagnosisAssign, getAssistants, generateMiniProgramQrcode, generateOrderQrcode, getWechatChatRecords, addWechatChatRecord, deleteWechatChatRecord, getWechatExternalContact, fillIdCard } from '@/api/tcm'
|
||||
import { orderCreate } from '@/api/order'
|
||||
import { cancelAppointment } from '@/api/doctor'
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { getDictData } from '@/api/app'
|
||||
import { getWeappConfig } from '@/api/channel/weapp'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { hasPermission } from '@/utils/perm'
|
||||
import { Loading, Warning, List, CircleCheck, Clock, ArrowDown, RefreshRight, Picture, User, Document, Delete } from '@element-plus/icons-vue'
|
||||
import { Loading, Warning, List, CircleCheck, Clock, ArrowDown, RefreshRight, Picture, User, Document, Delete, CircleClose } from '@element-plus/icons-vue'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
import AppointmentPopup from './appointment.vue'
|
||||
@@ -862,11 +864,29 @@ const handleRowAction = (cmd: string, row: any) => {
|
||||
handleVideoQRCode(row)
|
||||
break
|
||||
case 'confirmQr': handleMiniProgramQRCode(row); break
|
||||
case 'cancelApt': handleCancelAppointment(row); break
|
||||
case 'order': handleCreateOrder(row); break
|
||||
case 'delete': handleDelete(row.id); break
|
||||
}
|
||||
}
|
||||
|
||||
// 取消挂号
|
||||
const handleCancelAppointment = async (row: any) => {
|
||||
if (!row.has_appointment || !row.appointment_id) {
|
||||
feedback.msgWarning('该诊单未挂号或挂号信息异常')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await feedback.confirm(`确定要取消患者「${row.patient_name}」的挂号吗?`)
|
||||
await cancelAppointment({ id: row.appointment_id })
|
||||
feedback.msgSuccess('取消挂号成功')
|
||||
getLists()
|
||||
fetchDateCounts()
|
||||
} catch (e: any) {
|
||||
if (e !== 'cancel') feedback.msgError(e?.msg || '取消挂号失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 患者挂号
|
||||
const handleAppointment = (row: any) => {
|
||||
if (!row.patient_id) {
|
||||
|
||||
Reference in New Issue
Block a user