Fix Bug #561: AI修复
This commit is contained in:
73
openhis-ui-vue3/src/views/outpatient/doctor/OrderList.vue
Normal file
73
openhis-ui-vue3/src/views/outpatient/doctor/OrderList.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div class="order-list-container">
|
||||
<el-card header="门诊医嘱管理">
|
||||
<div class="toolbar mb-4">
|
||||
<el-select v-model="selectedPatientId" placeholder="请选择患者" @change="fetchOrders" class="mr-4">
|
||||
<el-option v-for="p in patientList" :key="p.id" :label="p.name" :value="p.id" />
|
||||
</el-select>
|
||||
<el-button type="primary" @click="openSurgeryDialog">手术申请</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="orderList" v-loading="loading" border class="order-table">
|
||||
<el-table-column prop="orderNo" label="医嘱号" width="120" />
|
||||
<el-table-column prop="catalogName" label="项目名称" show-overflow-tooltip />
|
||||
<el-table-column label="总量" width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<span class="total-quantity-cell">
|
||||
{{ row.totalQuantity }} {{ row.totalUnit || '次' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === 0 ? 'info' : 'success'">
|
||||
{{ row.status === 0 ? '待执行' : '已执行' }}
|
||||
</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 { getOrdersByPatientIdApi } from '@/api/outpatient/order';
|
||||
|
||||
const loading = ref(false);
|
||||
const orderList = ref([]);
|
||||
const patientList = ref([]);
|
||||
const selectedPatientId = ref(null);
|
||||
|
||||
const fetchOrders = async () => {
|
||||
if (!selectedPatientId.value) return;
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getOrdersByPatientIdApi(selectedPatientId.value);
|
||||
orderList.value = res.data || [];
|
||||
} catch (e) {
|
||||
console.error('获取医嘱失败', e);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const openSurgeryDialog = () => {
|
||||
// 模拟跳转或弹窗逻辑
|
||||
window.location.href = '/outpatient/doctor/surgery-apply';
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// 初始化患者列表(示例)
|
||||
patientList.value = [{ id: 1, name: '测试患者' }];
|
||||
selectedPatientId.value = 1;
|
||||
fetchOrders();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.order-list-container { padding: 20px; }
|
||||
.toolbar { display: flex; align-items: center; }
|
||||
.total-quantity-cell { font-weight: 500; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user