Fix Bug #544: AI修复

This commit is contained in:
2026-05-26 23:14:01 +08:00
parent 536a0e7ace
commit 0ba1e1bde8
4 changed files with 156 additions and 58 deletions

View File

@@ -0,0 +1,79 @@
<template>
<div class="triage-queue-container">
<el-card>
<template #header>
<div class="card-header">
<span class="title">智能分诊排队管理 - {{ deptName }}</span>
<div class="query-controls">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:default-value="[today, today]"
class="date-range-picker"
/>
<el-button type="primary" @click="handleQuery">查询历史队列</el-button>
</div>
</div>
</template>
<el-table :data="queueList" border style="width: 100%" v-loading="loading">
<el-table-column prop="queueNo" label="排队号" width="100" />
<el-table-column prop="patientName" label="患者姓名" />
<el-table-column prop="status" label="状态" width="120">
<template #default="{ row }">
<el-tag :type="getStatusType(row.status)">{{ row.status }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="分诊时间" width="180" />
</el-table>
</el-card>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { getQueueList } from '@/api/triage'
const deptName = ref('呼吸内科')
const deptId = ref(101) // 实际应从路由或上下文获取
const dateRange = ref([])
const today = new Date().toISOString().split('T')[0]
const queueList = ref([])
const loading = ref(false)
const getStatusType = (status) => {
const map = { '待诊': 'info', '就诊中': 'warning', '完诊': 'success' }
return map[status] || 'info'
}
const fetchQueue = async () => {
loading.value = true
try {
const [start, end] = dateRange.value || [today, today]
const res = await getQueueList({ deptId: deptId.value, startDate: start, endDate: end })
queueList.value = res.data || []
} finally {
loading.value = false
}
}
const handleQuery = () => {
fetchQueue()
}
onMounted(() => {
dateRange.value = [today, today]
fetchQueue()
})
</script>
<style scoped>
.card-header { display: flex; justify-content: space-between; align-items: center; }
.title { font-size: 16px; font-weight: 600; }
.query-controls { display: flex; gap: 12px; align-items: center; }
</style>