Kaynağa Gözat

Merge branch 'release/2.0.1' of ssh://121.43.162.141:10022/six.fe/health.admin into release/2.0.1

张田田 7 ay önce
ebeveyn
işleme
162aa06156

+ 1 - 1
src/model/health-report.model.ts

@@ -267,6 +267,6 @@ export function fromHealthIndicatorItem(data: Record<string, any>): HealthIndica
     unit: data.unit,
     value: data.quotaVal,
     trend: data.abnormal ? getTrend(data.abnormalDesc) : 0,
-    date: data.time2,
+    date: data.time4 || data.time2,
   };
 }

+ 15 - 0
src/request/api/report.api.ts

@@ -261,6 +261,21 @@ export function getPatientHealthIndicatorsMethod(patientId: string) {
   });
 }
 
+/**
+ * 患者生理指标(每次提交)记录
+ * @param patientId
+ */
+export function getPatientHealthIndicatorRecordsMethod(patientId: string) {
+  return request.Get<HealthIndicatorVO[], any[]>(`/fdhb-pc/patientQuota/getQuoUpdateStream`, {
+    hitSource: 'update-indicator',
+    name: 'patient-indicator',
+    params: { patientId },
+    transform(data) {
+      return data.map(fromHealthIndicator).filter(indicator => indicator.items.length);
+    },
+  });
+}
+
 export function getPatientHealthIndicatorMethod(patientId: string) {
   return request.Get<HealthIndicatorItemVO[], any[]>(`/fdhb-pc/patientQuota/getCurQuovalByPatId`, {
     hitSource: 'update-indicator',

+ 2 - 2
src/widgets/PatientPhysicalSignRecordsWidget.vue

@@ -2,7 +2,7 @@
 import { ArrowDownOutlined, ArrowUpOutlined, CaretRightOutlined } from '@ant-design/icons-vue';
 import { h, ref } from 'vue';
 import { useRequest } from 'alova/client';
-import { getPatientHealthIndicatorsMethod } from '@/request/api/report.api';
+import { getPatientHealthIndicatorRecordsMethod } from '@/request/api/report.api';
 import type { HealthIndicatorItemVO, HealthIndicatorVO } from '@/model/health-report.model';
 import dayjs from 'dayjs';
 
@@ -11,7 +11,7 @@ const props = defineProps<{ patient: { id: string } }>();
 const indicators = shallowRef<HealthIndicatorVO[]>([]);
 const activeKey = ref<string[]>([]);
 
-const { loading } = useRequest(() => getPatientHealthIndicatorsMethod(props.patient.id)).onSuccess(({ data }) => {
+const { loading } = useRequest(() => getPatientHealthIndicatorRecordsMethod(props.patient.id)).onSuccess(({ data }) => {
   indicators.value = conversionGrouping(data);
   activeKey.value = indicators.value.map((item) => item.name);
 });