95-门诊医生站开立会诊申请单界面PRD_2026-01-15,全部功能。
This commit is contained in:
@@ -0,0 +1,402 @@
|
||||
<template>
|
||||
<div class="app-container consultation-confirmation">
|
||||
<div class="page-header">
|
||||
<span class="tab-title">会诊确认</span>
|
||||
</div>
|
||||
|
||||
<div class="action-bar no-print">
|
||||
<el-button type="success" @click="handlePrint">打印</el-button>
|
||||
<el-button @click="handleRefresh">刷新</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!currentRow"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
{{ confirmButtonText }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!canSign"
|
||||
@click="handleSign"
|
||||
>
|
||||
签名
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="list-section no-print">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
highlight-current-row
|
||||
@current-change="handleRowChange"
|
||||
>
|
||||
<el-table-column type="index" width="60" label="序号" align="center" />
|
||||
<el-table-column label="紧急" width="70" align="center">
|
||||
<template #default="scope">
|
||||
<el-checkbox v-model="scope.row.urgent" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="consultationId" label="申请单号" min-width="160" />
|
||||
<el-table-column prop="patientName" label="病人姓名" min-width="100" />
|
||||
<el-table-column prop="consultationTime" label="会诊时间" min-width="160" />
|
||||
<el-table-column prop="invitee" label="邀请对象" min-width="120" />
|
||||
<el-table-column prop="applyDept" label="申请科室" min-width="120" />
|
||||
<el-table-column prop="applyDoctor" label="申请医师" min-width="120" />
|
||||
<el-table-column prop="applyTime" label="申请时间" min-width="160" />
|
||||
<el-table-column label="确认" width="70" align="center">
|
||||
<template #default="scope">
|
||||
<el-checkbox v-model="scope.row.confirmed" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签名" width="70" align="center">
|
||||
<template #default="scope">
|
||||
<el-checkbox v-model="scope.row.signed" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-title">会诊记录单</div>
|
||||
<el-form :model="formData" label-width="110px">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="病人姓名">
|
||||
<el-input v-model="formData.patientName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="性别">
|
||||
<el-input v-model="formData.gender" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄">
|
||||
<el-input v-model="formData.age" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="就诊卡号">
|
||||
<el-input v-model="formData.cardNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="申请单号">
|
||||
<el-input v-model="formData.consultationId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="申请科室">
|
||||
<el-input v-model="formData.applyDept" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="会诊时间">
|
||||
<el-input v-model="formData.consultationTime" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="紧急标志">
|
||||
<el-input :model-value="formData.urgent ? '是' : '否'" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="会诊邀请对象">
|
||||
<el-input v-model="formData.invitee" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="提交医生">
|
||||
<el-input v-model="formData.applyDoctor" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="提交时间">
|
||||
<el-input v-model="formData.applyTime" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="病史及目的">
|
||||
<el-input v-model="formData.history" type="textarea" :rows="3" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会诊确认参加医师" required>
|
||||
<el-input v-model="formData.confirmingPhysician" placeholder="请输入会诊确认参加医师" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会诊意见" required>
|
||||
<el-input v-model="formData.opinion" type="textarea" :rows="4" placeholder="请输入会诊意见" />
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="所属医生">
|
||||
<el-input v-model="formData.confirmDoctor" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="代表科室">
|
||||
<el-input v-model="formData.confirmDept" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="签名医生">
|
||||
<el-input v-model="formData.signDoctor" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="签名时间">
|
||||
<el-input v-model="formData.signTime" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="consultationConfirmation">
|
||||
import { computed, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const buildMockRows = () => ([
|
||||
{
|
||||
consultationId: 'CS20250812001',
|
||||
urgent: false,
|
||||
patientName: '陈明',
|
||||
gender: '男',
|
||||
age: '45',
|
||||
cardNo: 'CARD20250812001',
|
||||
consultationTime: '2025-08-12 17:48',
|
||||
invitee: '演示测试',
|
||||
applyDept: '内科',
|
||||
applyDoctor: '徐斌',
|
||||
applyTime: '2025-08-12 16:30',
|
||||
history: '胸闷、气短一周,既往有高血压史。',
|
||||
confirmingPhysician: '',
|
||||
opinion: '',
|
||||
confirmed: false,
|
||||
signed: false
|
||||
},
|
||||
{
|
||||
consultationId: 'CS20250812002',
|
||||
urgent: true,
|
||||
patientName: '赵敏',
|
||||
gender: '女',
|
||||
age: '32',
|
||||
cardNo: 'CARD20250812002',
|
||||
consultationTime: '2025-08-12 18:10',
|
||||
invitee: '李医生',
|
||||
applyDept: '神经内科',
|
||||
applyDoctor: '王婷',
|
||||
applyTime: '2025-08-12 16:50',
|
||||
history: '头晕伴视物模糊3天。',
|
||||
confirmingPhysician: '',
|
||||
opinion: '',
|
||||
confirmed: false,
|
||||
signed: false
|
||||
}
|
||||
])
|
||||
|
||||
const tableData = ref(buildMockRows())
|
||||
const currentRow = ref(null)
|
||||
|
||||
const formData = ref({
|
||||
consultationId: '',
|
||||
urgent: false,
|
||||
patientName: '',
|
||||
gender: '',
|
||||
age: '',
|
||||
cardNo: '',
|
||||
consultationTime: '',
|
||||
invitee: '',
|
||||
applyDept: '',
|
||||
applyDoctor: '',
|
||||
applyTime: '',
|
||||
history: '',
|
||||
confirmingPhysician: '',
|
||||
opinion: '',
|
||||
confirmDoctor: '',
|
||||
confirmDept: '',
|
||||
signDoctor: '',
|
||||
signTime: ''
|
||||
})
|
||||
|
||||
const confirmButtonText = computed(() => {
|
||||
if (!currentRow.value) {
|
||||
return '确认'
|
||||
}
|
||||
return currentRow.value.confirmed ? '取消确认' : '确认'
|
||||
})
|
||||
|
||||
const canSign = computed(() => {
|
||||
return !!currentRow.value && currentRow.value.confirmed && !currentRow.value.signed
|
||||
})
|
||||
|
||||
const formatDateTime = (date = new Date()) => {
|
||||
const pad = (value) => String(value).padStart(2, '0')
|
||||
const yyyy = date.getFullYear()
|
||||
const mm = pad(date.getMonth() + 1)
|
||||
const dd = pad(date.getDate())
|
||||
const hh = pad(date.getHours())
|
||||
const mi = pad(date.getMinutes())
|
||||
const ss = pad(date.getSeconds())
|
||||
return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}`
|
||||
}
|
||||
|
||||
const getDoctorName = () => userStore.nickName || userStore.name || '当前医生'
|
||||
const getDoctorDept = () => userStore.orgName || '当前科室'
|
||||
|
||||
const applyRowToForm = (row) => {
|
||||
if (!row) {
|
||||
Object.keys(formData.value).forEach((key) => {
|
||||
formData.value[key] = key === 'urgent' ? false : ''
|
||||
})
|
||||
return
|
||||
}
|
||||
formData.value.consultationId = row.consultationId
|
||||
formData.value.urgent = row.urgent
|
||||
formData.value.patientName = row.patientName
|
||||
formData.value.gender = row.gender
|
||||
formData.value.age = row.age
|
||||
formData.value.cardNo = row.cardNo
|
||||
formData.value.consultationTime = row.consultationTime
|
||||
formData.value.invitee = row.invitee
|
||||
formData.value.applyDept = row.applyDept
|
||||
formData.value.applyDoctor = row.applyDoctor
|
||||
formData.value.applyTime = row.applyTime
|
||||
formData.value.history = row.history
|
||||
formData.value.confirmingPhysician = row.confirmingPhysician
|
||||
formData.value.opinion = row.opinion
|
||||
formData.value.confirmDoctor = row.confirmDoctor || ''
|
||||
formData.value.confirmDept = row.confirmDept || ''
|
||||
formData.value.signDoctor = row.signDoctor || ''
|
||||
formData.value.signTime = row.signTime || ''
|
||||
}
|
||||
|
||||
const handleRowChange = (row) => {
|
||||
currentRow.value = row
|
||||
applyRowToForm(row)
|
||||
}
|
||||
|
||||
const handleConfirm = () => {
|
||||
if (!currentRow.value) {
|
||||
return
|
||||
}
|
||||
if (!currentRow.value.confirmed) {
|
||||
if (!formData.value.opinion.trim()) {
|
||||
ElMessage.warning('请先填写会诊意见')
|
||||
return
|
||||
}
|
||||
if (!formData.value.confirmingPhysician.trim()) {
|
||||
ElMessage.warning('请先填写会诊确认参加医师')
|
||||
return
|
||||
}
|
||||
currentRow.value.confirmed = true
|
||||
currentRow.value.confirmingPhysician = formData.value.confirmingPhysician
|
||||
currentRow.value.opinion = formData.value.opinion
|
||||
currentRow.value.confirmDoctor = getDoctorName()
|
||||
currentRow.value.confirmDept = getDoctorDept()
|
||||
formData.value.confirmDoctor = currentRow.value.confirmDoctor
|
||||
formData.value.confirmDept = currentRow.value.confirmDept
|
||||
ElMessage.success('会诊已确认')
|
||||
return
|
||||
}
|
||||
if (currentRow.value.signed) {
|
||||
ElMessage.warning('已签名的会诊无法取消确认')
|
||||
return
|
||||
}
|
||||
currentRow.value.confirmed = false
|
||||
currentRow.value.confirmDoctor = ''
|
||||
currentRow.value.confirmDept = ''
|
||||
formData.value.confirmDoctor = ''
|
||||
formData.value.confirmDept = ''
|
||||
ElMessage.success('已取消确认')
|
||||
}
|
||||
|
||||
const handleSign = () => {
|
||||
if (!currentRow.value) {
|
||||
return
|
||||
}
|
||||
if (!currentRow.value.confirmed) {
|
||||
ElMessage.warning('请先确认会诊申请')
|
||||
return
|
||||
}
|
||||
currentRow.value.signed = true
|
||||
currentRow.value.signDoctor = getDoctorName()
|
||||
currentRow.value.signTime = formatDateTime()
|
||||
formData.value.signDoctor = currentRow.value.signDoctor
|
||||
formData.value.signTime = currentRow.value.signTime
|
||||
ElMessage.success('签名完成')
|
||||
}
|
||||
|
||||
const handlePrint = () => {
|
||||
if (!currentRow.value) {
|
||||
ElMessage.warning('请先选择会诊申请')
|
||||
return
|
||||
}
|
||||
window.print()
|
||||
}
|
||||
|
||||
const handleRefresh = () => {
|
||||
tableData.value = buildMockRows()
|
||||
currentRow.value = null
|
||||
applyRowToForm(null)
|
||||
ElMessage.success('已刷新')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.consultation-confirmation .page-header {
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.consultation-confirmation .tab-title {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #4a89dc;
|
||||
border-bottom: 2px solid #4a89dc;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
margin: 16px 0;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.list-section {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
.consultation-confirmation {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user