新增功能

This commit is contained in:
Your Name
2026-03-09 09:55:04 +08:00
parent 7b76671988
commit 02ae537b4c
12 changed files with 2019 additions and 22 deletions
+23 -9
View File
@@ -188,15 +188,15 @@
>
完成视频面诊
</el-button>
<!-- <el-button
<el-button
v-if="row.status === 1"
v-perms="['doctor.appointment/prescription']"
type="success"
link
@click="handleCreatePrescription(row)"
>
创建处方单
</el-button> -->
聊天
</el-button>
</template>
</el-table-column>
</el-table>
@@ -262,6 +262,9 @@
<!-- 处方单抽屉 -->
<prescription-drawer ref="prescriptionDrawerRef" @success="loadData" />
<!-- 聊天对话框 -->
<chat-dialog ref="chatDialogRef" />
</div>
</template>
@@ -272,6 +275,7 @@ import feedback from '@/utils/feedback'
import EditPopup from '../diagnosis/edit.vue'
import VideoCall from '@/components/video-call/index.vue'
import PrescriptionDrawer from './components/prescription-drawer.vue'
import ChatDialog from '@/components/chat-dialog/index.vue'
import useUserStore from '@/stores/modules/user'
const userStore = useUserStore()
@@ -364,6 +368,7 @@ const detailData = ref<any>(null)
const editRef = ref()
const videoCallRef = ref()
const prescriptionDrawerRef = ref()
const chatDialogRef = ref()
// 查看详情
const handleDetail = async (row: any) => {
@@ -456,13 +461,22 @@ const handleGroupVideoCall = (row: any) => {
// 创建处方单
const handleCreatePrescription = async (row: any) => {
try {
// 获取详细信息
const detail = await appointmentDetail({ id: row.id })
prescriptionDrawerRef.value?.open(detail)
} catch (error) {
feedback.msgError('获取患者信息失败')
if (!row.patient_id) {
feedback.msgWarning('患者信息不完整')
return
}
// 检查是否有诊单ID
if (!row.diagnosis_id && !row.id) {
feedback.msgWarning('预约信息不完整,无法发起聊天')
return
}
chatDialogRef.value?.open({
patientId: row.patient_id,
patientName: row.patient_name,
diagnosisId: row.diagnosis_id || row.id // 使用诊单ID,如果没有则使用预约ID
})
}
loadData()