Fix Bug #544: AI修复
This commit is contained in:
83
openhis-ui-vue3/src/views/outpatient/triage/TriageQueue.vue
Normal file
83
openhis-ui-vue3/src/views/outpatient/triage/TriageQueue.vue
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div class="triage-queue-container">
|
||||||
|
<el-card class="header-card">
|
||||||
|
<el-form :inline="true" class="query-form">
|
||||||
|
<el-form-item label="历史队列查询">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
class="date-range-picker"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleQuery" class="query-btn">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="table-card">
|
||||||
|
<el-table :data="queueList" style="width: 100%" class="queue-table" v-loading="loading">
|
||||||
|
<el-table-column prop="queue_no" label="排队号" width="100" />
|
||||||
|
<el-table-column prop="patient_name" label="患者姓名" />
|
||||||
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="getStatusType(row.status)">{{ row.status }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="triage_time" label="分诊时间" width="180" />
|
||||||
|
<el-table-column prop="dept_name" label="科室" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const queueList = ref([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const fetchQueueData = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
try {
|
||||||
|
const [start, end] = dateRange.value || [];
|
||||||
|
const res = await axios.get('/api/outpatient/triage/queue', {
|
||||||
|
params: { startDate: start, endDate: end }
|
||||||
|
});
|
||||||
|
queueList.value = res.data.data || [];
|
||||||
|
} catch (err) {
|
||||||
|
ElMessage.error('获取队列数据失败');
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleQuery = () => {
|
||||||
|
fetchQueueData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getStatusType = (status) => {
|
||||||
|
const map = { '候诊': 'info', '就诊中': 'warning', '完诊': 'success' };
|
||||||
|
return map[status] || 'info';
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const today = new Date().toISOString().slice(0, 10);
|
||||||
|
dateRange.value = [today, today];
|
||||||
|
fetchQueueData();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.triage-queue-container { padding: 20px; }
|
||||||
|
.header-card { margin-bottom: 16px; }
|
||||||
|
.query-form { display: flex; align-items: center; }
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user