Update visit-record.vue
This commit is contained in:
parent
c76a552939
commit
4ce5cf33c7
@ -2,8 +2,8 @@
|
||||
<my-layout class="bg-[#f2f3f4]">
|
||||
<layout-item>
|
||||
<div class="flex items-center p-15px bg-white border-b border-gray-200">
|
||||
<el-select v-model="orderType" clearable placeholder="全部类型">
|
||||
<el-option v-for=" i in orderTypes" :key="i.value" :label="i.label" :value="i.value" />
|
||||
<el-select v-model="feeType" clearable placeholder="全部类型">
|
||||
<el-option v-for="i in feeTypes" :key="i.value" :label="i.label" :value="i.value" />
|
||||
</el-select>
|
||||
<el-date-picker clearable v-model="dates" type="daterange" class="ml-10px w-280px flex-grow-0"
|
||||
placeholder="全部日期" />
|
||||
@ -17,10 +17,10 @@
|
||||
<div v-for="i in groups" :key="i.year">
|
||||
<div active-title-bar class="mb-10px">{{ i.year }}</div>
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="item in i.items" :type="current && current._id === item._id ? 'primary':''"
|
||||
<el-timeline-item v-for="item in i.items" :type="current && current._id === item._id ? 'primary' : ''"
|
||||
:timestamp="item.date" placement="top">
|
||||
<el-card class="mr-10px cursor-pointer" @click="current = item">
|
||||
<div>{{ item.orderType }}</div>
|
||||
<div>{{ item.feeType === 'YB' ? '医保处方' : '自费处方' }}</div>
|
||||
<div>{{ item.deptName }} | {{ item.doctorName }}</div>
|
||||
<div>{{ item.drugStoreName }}</div>
|
||||
</el-card>
|
||||
@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</layout-main>
|
||||
</my-layout>
|
||||
<chat-history-drawer :orderId="current ? current.orderId:''" :doctorCode="current ? current.doctorCode:''"
|
||||
<chat-history-drawer :orderId="current ? current.orderId : ''" :doctorCode="current ? current.doctorCode : ''"
|
||||
:visible="chatVisible" @close="chatVisible = false" />
|
||||
</template>
|
||||
|
||||
@ -61,12 +61,12 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const orderTypes = ref([
|
||||
const feeTypes = ref([
|
||||
{ label: '全部类型', value: '' },
|
||||
{ label: '在线复诊', value: 'im' },
|
||||
{ label: '在线续方', value: 'pres' },
|
||||
{ label: '医保处方', value: 'YB' },
|
||||
{ label: '自费处方', value: 'ZF' },
|
||||
]);
|
||||
const orderType = ref('');
|
||||
const feeType = ref('');
|
||||
const dates = ref([]);
|
||||
const list = ref([]);
|
||||
const current = ref(null);
|
||||
@ -94,19 +94,18 @@ const groups = computed(() => {
|
||||
async function getList() {
|
||||
if (props.patient && props.patient.patientId) {
|
||||
loading.value = true
|
||||
const query = { patientId: props.patient.patientId,orderStatus:'finished' };
|
||||
if (orderType.value) {
|
||||
query.isPres = orderType.value === 'pres';
|
||||
}
|
||||
const query = { patientId: props.patient.patientId, orderStatus: 'finished' };
|
||||
if (dates.value && dates.value.length) {
|
||||
query.startDate = dates.value[0];
|
||||
query.endDate = dates.value[1];
|
||||
}
|
||||
if (feeType.value) {
|
||||
query.feeType = feeType.value;
|
||||
}
|
||||
const { data, success, message } = await useHlw({ type: 'getPatientOrderList', ...query });
|
||||
list.value = data && Array.isArray(data.list) ? data.list.map(i => ({
|
||||
...i,
|
||||
date: dayjs(i.createTime).format('MM-DD HH:mm'),
|
||||
orderType: i.preOrderId ? '在线续方' : '在线复诊',
|
||||
})) : [];
|
||||
if (!success) {
|
||||
ElMessage.error(message || '获取数据失败,请稍后重试!')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user