fix: 处方发送
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<script setup>
|
||||
import {computed} from 'vue';
|
||||
import {computed, ref} from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
|
||||
import {Avatar, Image} from 'ant-design-vue';
|
||||
import {Avatar, Button, Image} from 'ant-design-vue';
|
||||
|
||||
import {getPrescriptionCheckStatusApi} from "#/views/business/order/prescription/api";
|
||||
import PrescriptionDetail from '#/views/doctor/doctor-reception/components/PrescriptionDetail.vue';
|
||||
|
||||
import previewMedia from '../composables/useMediaPreview.ts';
|
||||
import {useThemeStore} from '../stores/theme.ts';
|
||||
import AudioMessage from './AudioMessage.vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import PrescriptionDetail from '#/views/doctor/doctor-reception/components/PrescriptionDetail.vue';
|
||||
|
||||
const props = defineProps({
|
||||
message: {
|
||||
@@ -36,6 +38,28 @@ const avatarStyle = computed(() => ({
|
||||
background: props.senderInfo.color,
|
||||
}));
|
||||
|
||||
const statusInfo = ref({
|
||||
status: 0,
|
||||
text: '',
|
||||
});
|
||||
|
||||
|
||||
// 添加处方状态映射
|
||||
const prescriptionStatusMap = {
|
||||
0: '待审核',
|
||||
1: '已审核',
|
||||
2: '未通过',
|
||||
};
|
||||
|
||||
const checkPrescriptionStatus = (id) => {
|
||||
if (!id) return;
|
||||
getPrescriptionCheckStatusApi({id}).then((res) => {
|
||||
statusInfo.value.status = res.status;
|
||||
statusInfo.value.text = prescriptionStatusMap[res.status];
|
||||
return prescriptionStatusMap[res.status]
|
||||
})
|
||||
};
|
||||
|
||||
const bubbleClasses = computed(() => {
|
||||
const baseClasses = ['message-bubble'];
|
||||
|
||||
@@ -103,13 +127,6 @@ const handleVideoError = (event) => {
|
||||
|
||||
|
||||
|
||||
// 添加处方状态映射
|
||||
const prescriptionStatusMap = {
|
||||
0: '待审核',
|
||||
1: '已审核',
|
||||
2: '未通过',
|
||||
};
|
||||
|
||||
const [PrescriptionDetailModal, PrescriptionDetailModalApi] = useVbenModal({
|
||||
connectedComponent: PrescriptionDetail,
|
||||
});
|
||||
@@ -120,6 +137,7 @@ const viewPrescription = (item) => {
|
||||
})
|
||||
PrescriptionDetailModalApi.open();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -227,7 +245,7 @@ const viewPrescription = (item) => {
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="message.text" class="url-text">
|
||||
{{ message.text }}
|
||||
<Button type="link">{{ message.text }}</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -254,16 +272,17 @@ const viewPrescription = (item) => {
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="font-semibold text-gray-800 dark:text-gray-100">电子处方</div>
|
||||
<div
|
||||
class="text-xs px-2 py-1 rounded-full font-medium"
|
||||
:class="{
|
||||
'bg-yellow-100 text-yellow-800': message.content.status === 0,
|
||||
'bg-green-100 text-green-800': message.content.status === 1,
|
||||
'bg-blue-100 text-blue-800': message.content.status === 2,
|
||||
'bg-gray-100 text-gray-800': message.content.status === 3,
|
||||
'bg-red-100 text-red-800': message.content.status === 4
|
||||
'bg-yellow-100 text-yellow-800': statusInfo.status === 0,
|
||||
'bg-green-100 text-green-800': statusInfo.status === 1,
|
||||
'bg-red-100 text-red-800': statusInfo.status === 2,
|
||||
'bg-blue-100 text-blue-800': statusInfo.status === 3,
|
||||
'bg-gray-100 text-gray-800': statusInfo.status === 4
|
||||
}"
|
||||
class="text-xs px-2 py-1 rounded-full font-medium"
|
||||
>
|
||||
{{ prescriptionStatusMap[message.content.status] }}
|
||||
{{ checkPrescriptionStatus(message.content.id) || statusInfo.text || '加载中' }}
|
||||
<!-- {{ statusInfo.text || '加载中' }}-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,3 +15,10 @@ export async function getPrescriptionListApi(data: any) {
|
||||
export async function getPrescriptionSourceApi(data: any) {
|
||||
return requestClient.get<any>(`${prefix}source`, { params: data });
|
||||
}
|
||||
/**
|
||||
* 检查处方状态
|
||||
* @param data
|
||||
*/
|
||||
export async function getPrescriptionCheckStatusApi(data: any) {
|
||||
return requestClient.get<any>(`${prefix}check-status`, { params: data });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user