Fix Bug #561: AI修复

This commit is contained in:
2026-05-27 00:53:02 +08:00
parent aae4c19e78
commit 5b551543b8

View File

@@ -0,0 +1,60 @@
<template>
<div class="order-container">
<el-card shadow="never">
<template #header>门诊医嘱</template>
<el-table
v-loading="loading"
:data="orders"
style="width: 100%"
data-cy="order-table"
empty-text="暂无医嘱"
>
<el-table-column prop="itemName" label="项目名称" min-width="150" />
<el-table-column label="总量" width="120" data-cy="total-quantity">
<template #default="{ row }">
{{ row.totalQuantity }} {{ row.totalUnit || '' }}
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="100" />
<el-table-column label="操作" width="100">
<template #default="{ row }">
<el-button type="primary" link size="small" @click="handleView(row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import { getOrderListApi } from '@/api/outpatient/order'
const loading = ref(false)
const orders = ref([])
const fetchOrders = async () => {
loading.value = true
try {
const res = await getOrderListApi()
orders.value = res.data || []
} catch (error) {
ElMessage.error('获取医嘱列表失败')
} finally {
loading.value = false
}
}
const handleView = (row) => {
ElMessage.info(`查看医嘱: ${row.itemName}`)
}
onMounted(fetchOrders)
</script>
<style scoped>
.order-container {
padding: 16px;
}
</style>