Fix Bug #544: fallback修复
This commit is contained in:
73
openhis-ui-vue3/src/views/outpatient/doctor/QueueList.vue
Normal file
73
openhis-ui-vue3/src/views/outpatient/doctor/QueueList.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div class="queue-list">
|
||||
<!-- 当前排队 -->
|
||||
<el-table :data="currentQueue" style="width: 100%">
|
||||
<el-table-column prop="queueNo" label="排号" width="80"/>
|
||||
<el-table-column prop="patientName" label="患者"/>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusTagType(row.status)">{{ statusLabel(row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 历史排队 -->
|
||||
<el-divider>历史排队</el-divider>
|
||||
<el-table :data="historyQueue" style="width: 100%">
|
||||
<el-table-column prop="queueNo" label="排号" width="80"/>
|
||||
<el-table-column prop="patientName" label="患者"/>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusTagType(row.status)">{{ statusLabel(row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="时间"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useApi } from '@/utils/api';
|
||||
|
||||
const currentQueue = ref([]);
|
||||
const historyQueue = ref([]);
|
||||
|
||||
function statusLabel(status) {
|
||||
const map = {
|
||||
WAIT: '待诊',
|
||||
DIAGNOSE: '已诊',
|
||||
FINISHED: '完诊',
|
||||
CANCELLED: '已取消'
|
||||
};
|
||||
return map[status] || status;
|
||||
}
|
||||
|
||||
function statusTagType(status) {
|
||||
const map = {
|
||||
WAIT: 'info',
|
||||
DIAGNOSE: 'warning',
|
||||
FINISHED: 'success',
|
||||
CANCELLED: 'danger'
|
||||
};
|
||||
return map[status] || 'default';
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// 当前排队(包含完诊)
|
||||
const curRes = await useApi().get('/api/queue/current');
|
||||
currentQueue.value = curRes.data;
|
||||
|
||||
// 历史排队
|
||||
const histRes = await useApi().get('/api/queue/history', {
|
||||
params: { startTime: '', endTime: '' }
|
||||
});
|
||||
historyQueue.value = histRes.data;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.queue-list {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user