|
@@ -1,5 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import type { PatientModel, ReportModel } from '@/model';
|
|
|
|
|
|
|
+import type { PatientModel, ReportIndicatorModel, ReportModel } from '@/model';
|
|
|
|
|
+
|
|
|
import { patientMethod } from '@/request/api/patient.api';
|
|
import { patientMethod } from '@/request/api/patient.api';
|
|
|
import { indicatorByPatientIdMethod, reportMethod } from '@/request/api/report.api';
|
|
import { indicatorByPatientIdMethod, reportMethod } from '@/request/api/report.api';
|
|
|
import PatientCardWidget from '@/widgets/PatientCardWidget.vue';
|
|
import PatientCardWidget from '@/widgets/PatientCardWidget.vue';
|
|
@@ -32,14 +33,17 @@ const { data: report, loading: reportLoading } = useWatcher(
|
|
|
middleware: (_, next) => { if ( reportId.value ) next(); },
|
|
middleware: (_, next) => { if ( reportId.value ) next(); },
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
-const { data: indicator, loading: indicatorLoading } = useWatcher(
|
|
|
|
|
|
|
+const indicator = ref<ReportIndicatorModel[]>([]);
|
|
|
|
|
+const { loading: indicatorLoading } = useWatcher(
|
|
|
() => indicatorByPatientIdMethod(patientId.value!, false),
|
|
() => indicatorByPatientIdMethod(patientId.value!, false),
|
|
|
[ () => props.patient?.id ],
|
|
[ () => props.patient?.id ],
|
|
|
{
|
|
{
|
|
|
initialData: [], immediate: true,
|
|
initialData: [], immediate: true,
|
|
|
middleware: (_, next) => { if ( patientId.value ) next(); },
|
|
middleware: (_, next) => { if ( patientId.value ) next(); },
|
|
|
},
|
|
},
|
|
|
-);
|
|
|
|
|
|
|
+).onSuccess(({ data }) => {
|
|
|
|
|
+ indicator.value = data.filter(item => !item.editor?.disabled).map(({ value, ...item }) => item);
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
<template>
|
|
<template>
|
|
|
<div id="page-container-scroller" class="page-container flex flex-col">
|
|
<div id="page-container-scroller" class="page-container flex flex-col">
|
|
@@ -65,7 +69,7 @@ const { data: indicator, loading: indicatorLoading } = useWatcher(
|
|
|
<a-descriptions-item v-if="report.faceAnalysisResult">
|
|
<a-descriptions-item v-if="report.faceAnalysisResult">
|
|
|
<a-space wrap>
|
|
<a-space wrap>
|
|
|
<a-space align="start">
|
|
<a-space align="start">
|
|
|
- <a-image :width="200" :height="200" :src="report.faceImg" :preview="true" />
|
|
|
|
|
|
|
+ <a-image v-if="report.faceImg" :width="200" :height="200" :src="report.faceImg" :preview="true" />
|
|
|
<a-card size="small" title="面象分析结果">
|
|
<a-card size="small" title="面象分析结果">
|
|
|
{{ report.faceAnalysisResult }}
|
|
{{ report.faceAnalysisResult }}
|
|
|
</a-card>
|
|
</a-card>
|