Fix Bug #561: AI修复
This commit is contained in:
60
openhis-ui-vue3/src/views/outpatient/doctor/order/index.vue
Normal file
60
openhis-ui-vue3/src/views/outpatient/doctor/order/index.vue
Normal 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>
|
||||
Reference in New Issue
Block a user