|
@@ -1,21 +1,23 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import ReportAnalysisEdit from '@/components/ReportAnalysisEdit.vue';
|
|
|
|
|
-import ReportHistoryPreview from '@/components/ReportHistoryPreview.vue';
|
|
|
|
|
-import type { ReportModel } from '@/model';
|
|
|
|
|
-import { patientMethod } from '@/request/api/patient.api';
|
|
|
|
|
-import { reportMethod, reportSchemeMethod, reportsMethod } from '@/request/api/report.api';
|
|
|
|
|
-import PatientCardWidget from '@/widgets/PatientCardWidget.vue';
|
|
|
|
|
-import PatientTagWidget from '@/widgets/PatientTagWidget.vue';
|
|
|
|
|
-import ReportCardWidget from '@/widgets/ReportCardWidget.vue';
|
|
|
|
|
-import ReportSchemeCardWidget from '@/widgets/ReportSchemeCardWidget.vue';
|
|
|
|
|
-import { useElementSize } from '@vueuse/core';
|
|
|
|
|
-import { useRouteQuery } from '@vueuse/router';
|
|
|
|
|
-import { invalidateCache } from 'alova';
|
|
|
|
|
-import { useWatcher } from 'alova/client';
|
|
|
|
|
-import { h } from 'vue';
|
|
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
|
|
-import { RecycleScroller } from 'vue-virtual-scroller';
|
|
|
|
|
-import { VxeUI } from 'vxe-pc-ui';
|
|
|
|
|
|
|
+import ReportAnalysisEdit from '@/components/ReportAnalysisEdit.vue';
|
|
|
|
|
+import ReportHistoryPreview from '@/components/ReportHistoryPreview.vue';
|
|
|
|
|
+import type { ReportModel } from '@/model';
|
|
|
|
|
+
|
|
|
|
|
+import { patientMethod } from '@/request/api/patient.api';
|
|
|
|
|
+import { confirmSchemeMethod, reportMethod, reportSchemeMethod, reportsMethod } from '@/request/api/report.api';
|
|
|
|
|
+
|
|
|
|
|
+import PatientCardWidget from '@/widgets/PatientCardWidget.vue';
|
|
|
|
|
+import PatientTagWidget from '@/widgets/PatientTagWidget.vue';
|
|
|
|
|
+import ReportCardWidget from '@/widgets/ReportCardWidget.vue';
|
|
|
|
|
+import ReportSchemeCardWidget from '@/widgets/ReportSchemeCardWidget.vue';
|
|
|
|
|
+import { useElementSize } from '@vueuse/core';
|
|
|
|
|
+import { useRouteQuery } from '@vueuse/router';
|
|
|
|
|
+import { invalidateCache } from 'alova';
|
|
|
|
|
+import { useRequest, useWatcher } from 'alova/client';
|
|
|
|
|
+import { h } from 'vue';
|
|
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
|
+import { RecycleScroller } from 'vue-virtual-scroller';
|
|
|
|
|
+import { VxeUI } from 'vxe-pc-ui';
|
|
|
|
|
|
|
|
|
|
|
|
|
const patientId = useRouteQuery<string>('patientId');
|
|
const patientId = useRouteQuery<string>('patientId');
|
|
@@ -39,7 +41,7 @@ const { data: reports, loading: reportsLoading } = useWatcher(
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-const { data: report, loading: reportLoading } = useWatcher(
|
|
|
|
|
|
|
+const { data: report, loading: reportLoading, send: loadReport } = useWatcher(
|
|
|
() => reportMethod(reportId.value!),
|
|
() => reportMethod(reportId.value!),
|
|
|
[ reportId ],
|
|
[ reportId ],
|
|
|
{
|
|
{
|
|
@@ -56,6 +58,12 @@ const { data: scheme, loading: schemeLoading, send: schemeRefresh } = useWatcher
|
|
|
middleware: (_, next) => { if ( reportId.value ) next(); },
|
|
middleware: (_, next) => { if ( reportId.value ) next(); },
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
|
|
+const { loading: confirmSchemeLoading, send: confirmScheme } = useRequest(
|
|
|
|
|
+ () => confirmSchemeMethod(reportId.value),
|
|
|
|
|
+ { immediate: false },
|
|
|
|
|
+).onSuccess(() => {
|
|
|
|
|
+ loadReport(reportId.value!);
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if ( !reportId.value ) {
|
|
if ( !reportId.value ) {
|
|
@@ -149,15 +157,22 @@ const { height } = useElementSize(patientCardRef);
|
|
|
:loading="analysisReportPreviewOpening"
|
|
:loading="analysisReportPreviewOpening"
|
|
|
@click="analysisReportPreviewOpening = true;openAnalysisEditHandle()"
|
|
@click="analysisReportPreviewOpening = true;openAnalysisEditHandle()"
|
|
|
>
|
|
>
|
|
|
- 信息采集-{{ height }}
|
|
|
|
|
|
|
+ 信息采集
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
</ReportCardWidget>
|
|
</ReportCardWidget>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="area flex-auto" v-if="report?.scheme?.show">
|
|
<div class="area flex-auto" v-if="report?.scheme?.show">
|
|
|
- <ReportSchemeCardWidget :dataset="scheme" :loading="schemeLoading" :editable="report.scheme.editable"
|
|
|
|
|
- @refresh="schemeRefreshHandle()"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <ReportSchemeCardWidget
|
|
|
|
|
+ :dataset="scheme" :loading="schemeLoading" :editable="report.scheme.editable"
|
|
|
|
|
+ @refresh="schemeRefreshHandle()"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #footer v-if="report?.scheme?.editable">
|
|
|
|
|
+ <div style="padding: 8px;background-color: #fff;text-align: center;">
|
|
|
|
|
+ <a-button type="primary" :loading="confirmSchemeLoading" @click="confirmScheme()">确认</a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ReportSchemeCardWidget>
|
|
|
</div>
|
|
</div>
|
|
|
<a-result class="area" v-if="!patientId" style="background-color: #fff;" status="warning" title="未选择用户">
|
|
<a-result class="area" v-if="!patientId" style="background-color: #fff;" status="warning" title="未选择用户">
|
|
|
<template #extra>
|
|
<template #extra>
|