ソースを参照

1. 标签修改在window系统中失效
2. 信息采集患者指标置空

cc12458 1 年間 前
コミット
aff37bc3d4
2 ファイル変更11 行追加7 行削除
  1. 8 4
      src/components/ReportAnalysisEdit.vue
  2. 3 3
      src/widgets/PatientTagWidget.vue

+ 8 - 4
src/components/ReportAnalysisEdit.vue

@@ -1,5 +1,6 @@
 <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 { indicatorByPatientIdMethod, reportMethod } from '@/request/api/report.api';
 import PatientCardWidget                            from '@/widgets/PatientCardWidget.vue';
@@ -32,14 +33,17 @@ const { data: report, loading: reportLoading } = useWatcher(
     middleware: (_, next) => { if ( reportId.value ) next(); },
   },
 );
-const { data: indicator, loading: indicatorLoading } = useWatcher(
+const indicator = ref<ReportIndicatorModel[]>([]);
+const { loading: indicatorLoading } = useWatcher(
   () => indicatorByPatientIdMethod(patientId.value!, false),
   [ () => props.patient?.id ],
   {
     initialData: [], immediate: true,
     middleware: (_, next) => { if ( patientId.value ) next(); },
   },
-);
+).onSuccess(({ data }) => {
+  indicator.value = data.filter(item => !item.editor?.disabled).map(({ value, ...item }) => item);
+});
 </script>
 <template>
   <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-space wrap>
               <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="面象分析结果">
                   {{ report.faceAnalysisResult }}
                 </a-card>

+ 3 - 3
src/widgets/PatientTagWidget.vue

@@ -23,7 +23,7 @@ const { data: options, loading: optionsLoading, send: loadOptions } = useRequest
   { initialData: { total: 0, data: [] }, immediate: false },
 );
 const { send: save, loading: submitting } = useRequest(
-  (data: string[]) => updatePatientTagsMethod(props.dataset.id, selected.value),
+  () => updatePatientTagsMethod(props.dataset.id, selected.value),
   { immediate: false },
 ).onSuccess(() => {
   editing.value = false;
@@ -37,7 +37,7 @@ const selected = ref<string[]>([]);
 const selectRef = ref<HTMLSelectElement | null>(null);
 const onSelectVisibleChange = (visible: boolean) => {
   if ( editing.value && !visible ) {
-    setTimeout(() => editing.value = submitting.value, 20);
+    setTimeout(() => editing.value = submitting.value, 300);
   }
 };
 
@@ -76,7 +76,7 @@ async function edit(value = !editing.value) {
           :open="!optionsLoading" @dropdownVisibleChange="onSelectVisibleChange"
         />
         <a-tooltip title="保存">
-          <a-button type="primary" :icon="h(CheckOutlined)" :loading="submitting" @click="save"></a-button>
+          <a-button type="primary" :icon="h(CheckOutlined)" :loading="submitting" @click="save()"></a-button>
         </a-tooltip>
       </a-space-compact>
       <a-space v-else wrap>