This commit is contained in:
Your Name
2026-03-13 14:08:52 +08:00
parent 08dd9cd307
commit eb283f008b
667 changed files with 8425 additions and 27053 deletions
+10 -57
View File
@@ -55,7 +55,7 @@
<el-card class="!border-none mt-4" shadow="never">
<div class="mb-4 flex justify-between items-center">
<div>
<el-button type="primary" @click="handleAdd" v-perms="['tcm.diagnosis/add']">新增患者</el-button>
<el-button type="primary" @click="handleAdd" v-perms="['tcm.diagnosis/add']">新增诊单</el-button>
<el-button
v-perms="['tcm.diagnosis/assign']"
type="success"
@@ -76,8 +76,8 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="ID" prop="id" width="80" />
<el-table-column label="患者姓名" prop="patient_name" min-width="100" />
<el-table-column label="账户编号" prop="id" width="80" />
<el-table-column label="账户姓名" prop="patient_name" min-width="100" />
<el-table-column label="性别" prop="gender_desc" width="80" />
<el-table-column label="年龄" prop="age" width="80" />
<el-table-column label="诊断日期" prop="diagnosis_date_text" min-width="120" />
@@ -91,7 +91,7 @@
<span>{{ getDictLabel(syndromeTypeOptions, row.syndrome_type) }}</span>
</template>
</el-table-column>
<el-table-column label="指派医助" prop="assistant_name" min-width="100">
<el-table-column label="归属助理" prop="assistant_name" min-width="100">
<template #default="{ row }">
<span>{{ getAssistantName(row.assistant_id || row.assistant) }}</span>
</template>
@@ -120,7 +120,7 @@
>
指派
</el-button>
<el-button
<!-- <el-button
v-perms="['tcm.diagnosis/video-call']"
type="success"
link
@@ -135,14 +135,14 @@
@click="handleGroupVideoCall(row)"
>
群通话
</el-button>
</el-button>-->
<el-button
v-perms="['tcm.diagnosis/guahao']"
type="success"
link
@click="handleAppointment(row)"
>
挂号
>
预约医生
</el-button>
<el-button
v-perms="['tcm.diagnosis/guahao']"
@@ -150,10 +150,10 @@
link
@click="handleMiniProgramQRCode(row)"
>
小程序二维码
确认诊单二维码
</el-button>
<el-button type="primary" link @click="handleEdit(row.id)" v-perms="['tcm.diagnosis/edit']">
编辑
诊单
</el-button>
<el-button type="danger" link @click="handleDelete(row.id)" v-perms="['tcm.diagnosis/delete']">
删除
@@ -168,7 +168,6 @@
<edit-popup ref="editRef" @success="getLists" />
<detail-popup ref="detailRef" />
<video-call ref="videoCallRef" />
<appointment-popup ref="appointmentRef" @success="getLists" />
<!-- 小程序二维码弹窗 -->
@@ -261,7 +260,6 @@ import feedback from '@/utils/feedback'
import { Loading } from '@element-plus/icons-vue'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
import VideoCall from '@/components/video-call/index.vue'
import AppointmentPopup from './appointment.vue'
import useUserStore from '@/stores/modules/user'
import dayjs from 'dayjs'
@@ -339,7 +337,6 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
const editRef = ref()
const detailRef = ref()
const videoCallRef = ref()
const appointmentRef = ref()
const userStore = useUserStore()
@@ -443,50 +440,6 @@ const handleDelete = async (id: number) => {
getLists()
}
// 视频通话(一对一)
const handleVideoCall = (row: any) => {
if (!row.patient_id) {
feedback.msgWarning('患者信息不完整')
return
}
videoCallRef.value?.open({
diagnosisId: row.id,
patientId: row.patient_id,
patientName: row.patient_name,
userId: `patient_${row.patient_id}`, // 患者的用户ID
isGroup: false
})
}
// 群组视频通话(三方通话)
const handleGroupVideoCall = (row: any) => {
if (!row.patient_id) {
feedback.msgWarning('患者信息不完整')
return
}
if (!row.assistant_id) {
feedback.msgWarning('该诊单未指派医助,无法发起群组通话')
return
}
// 群组通话参与者顺序:当前登录用户(发起者)、患者、医助
const userIds = [
`patient_${row.patient_id}`, // 先邀请患者
`doctor_${row.assistant_id}` // 再邀请医助
]
videoCallRef.value?.open({
diagnosisId: row.id,
patientId: row.patient_id,
patientName: row.patient_name,
assistantId: row.assistant_id,
userIds: userIds,
isGroup: true
})
}
// 患者挂号
const handleAppointment = (row: any) => {
if (!row.patient_id) {