|
|
@@ -2,7 +2,7 @@
|
|
|
import { h, ref } from 'vue';
|
|
|
|
|
|
import { VxeUI } from 'vxe-pc-ui';
|
|
|
-import { EditOutlined } from '@ant-design/icons-vue';
|
|
|
+import { ArrowDownOutlined, ArrowUpOutlined, EditOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
import { useWatcher } from 'alova/client';
|
|
|
import { getPatientTagsMethod, patientMethod } from '@/request/api/patient.api';
|
|
|
@@ -123,6 +123,50 @@ function openPatientTagEdit(event: MouseEvent) {
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+function openPatientRecordsPreview() {
|
|
|
+ const component = defineAsyncComponent(() => import('@/components/RecordsPatientPreview.vue'));
|
|
|
+ const id = `modal:record-patient:preview`;
|
|
|
+ const onDestroy = () => { VxeUI.modal.close(id); };
|
|
|
+ onDestroy();
|
|
|
+ VxeUI.modal.open({
|
|
|
+ id, remember: true,
|
|
|
+ showMaximize: true, mask: false, lockView: false, padding: false,
|
|
|
+ resize: true, width: Math.floor(window.innerWidth * 0.5), height: Math.floor(window.innerHeight * 0.5),
|
|
|
+ escClosable: true, maskClosable: true,
|
|
|
+ title: `基础信息更新记录`,
|
|
|
+ slots: {
|
|
|
+ default() {
|
|
|
+ return h(component, {
|
|
|
+ patient: patient.value,
|
|
|
+ onDestroy,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function openIndicatorRecordsPreview() {
|
|
|
+ const component = defineAsyncComponent(() => import('@/components/RecordsIndicatorPreview.vue'));
|
|
|
+ const id = `modal:record-indicator:preview`;
|
|
|
+ const onDestroy = () => { VxeUI.modal.close(id); };
|
|
|
+ onDestroy();
|
|
|
+ VxeUI.modal.open({
|
|
|
+ id, remember: true,
|
|
|
+ showMaximize: true, mask: false, lockView: false, padding: false,
|
|
|
+ resize: true, width: Math.floor(window.innerWidth * 0.5), height: Math.floor(window.innerHeight * 0.5),
|
|
|
+ escClosable: true, maskClosable: true,
|
|
|
+ title: `指标信息更新记录`,
|
|
|
+ slots: {
|
|
|
+ default() {
|
|
|
+ return h(component, {
|
|
|
+ patient: patient.value,
|
|
|
+ onDestroy,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -131,7 +175,7 @@ function openPatientTagEdit(event: MouseEvent) {
|
|
|
<section class="flex-auto">
|
|
|
<header class="flex items-center">
|
|
|
<div class="title">基本信息</div>
|
|
|
- <a-button type="link">更新记录</a-button>
|
|
|
+ <a-button type="link" @click="openPatientRecordsPreview">更新记录</a-button>
|
|
|
</header>
|
|
|
<main>
|
|
|
<div class="row">
|
|
|
@@ -232,14 +276,18 @@ function openPatientTagEdit(event: MouseEvent) {
|
|
|
<div class="row" v-if="indicator.length">
|
|
|
<header>
|
|
|
<label>生理指标</label>
|
|
|
+ <a-button type="link" @click="openIndicatorRecordsPreview">更新记录</a-button>
|
|
|
</header>
|
|
|
<main>
|
|
|
<div class="flex flex-wrap">
|
|
|
<div class="text-center w-260px row" v-for="item in indicator" :key="item.id">
|
|
|
- <span
|
|
|
- ><label>{{ item.name }}</label
|
|
|
- >{{ item.value }}{{ item.unit }}</span
|
|
|
- >
|
|
|
+ <div class="flex justify-center">
|
|
|
+ <span><label>{{ item.name }}</label>{{ item.value }}{{ item.unit }}</span>
|
|
|
+ <div class="inline-block ml-2 size-24px">
|
|
|
+ <a-button v-if="item.trend > 0" :icon="h(ArrowUpOutlined)" shape="circle" size="small" class="trend-up" />
|
|
|
+ <a-button v-else-if="item.trend < 0" :icon="h(ArrowDownOutlined)" shape="circle" size="small" class="trend-down" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="text-center mt-1" style="font-size: 14px; color: rgba(0, 0, 0, 0.45)">{{ item.date }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -346,4 +394,14 @@ section {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.trend-up {
|
|
|
+ color: #ff4d4f;
|
|
|
+ border-color: #ff4d4f;
|
|
|
+}
|
|
|
+
|
|
|
+.trend-down {
|
|
|
+ color: #87d068;
|
|
|
+ border-color: #87d068;
|
|
|
+}
|
|
|
</style>
|