hsy 1 тиждень тому
батько
коміт
67fde6daa6

+ 2 - 1
src/utils/common.ts

@@ -477,6 +477,7 @@ export function groupArray(arr: [], size: number) {
 export const scrollUp = (tableRef, timer = 100) => {
   const demo =
     tableRef.$refs.bodyWrapper.getElementsByClassName("el-scrollbar__wrap")[0];
+  console.log('scrollUp', demo)
   const tableScroll = ref(true);
   demo.addEventListener("mouseover", () => {
     tableScroll.value = false;
@@ -487,7 +488,7 @@ export const scrollUp = (tableRef, timer = 100) => {
   setInterval(() => {
     if (tableScroll.value) {
       demo.scrollTop += 1;
-      if (demo.clientHeight + demo.scrollTop === demo.scrollHeight) {
+      if (demo.clientHeight + demo.scrollTop >= demo.scrollHeight) {
         demo.scrollTop = 0;
       }
     }

+ 25 - 11
src/views/largeScreen/components/Center1.vue

@@ -109,9 +109,15 @@
             }
           "
         /> -->
-          <el-button type="primary" class="ml-2" @click="search"
-            >搜索</el-button
-          >
+          <div class="flex">
+            <el-input
+              v-model="dialogFilter.archivesId"
+              placeholder="请输入档案号"
+            ></el-input>
+            <el-button type="primary" class="ml-2" @click="search"
+              >搜索</el-button
+            >
+          </div>
         </div>
       </div>
       <div>
@@ -220,7 +226,8 @@
             <template #default="{ row }">
               <el-button type="primary" link @click="openDialogDetail(row)"
                 >风险评估详情</el-button
-              ></template>
+              ></template
+            >
           </el-table-column>
         </el-table>
         <el-pagination
@@ -283,10 +290,20 @@
   </div>
 </template>
 <script setup>
-import { reactive, ref, computed, onMounted, onUnmounted, shallowRef, defineAsyncComponent, nextTick, provide } from "vue";
+import {
+  reactive,
+  ref,
+  computed,
+  onMounted,
+  onUnmounted,
+  shallowRef,
+  defineAsyncComponent,
+  nextTick,
+  provide
+} from "vue";
 import { Filter } from "@element-plus/icons-vue";
 
-import { formatAge, request, scrollUp, parseJsonData  } from "@/utils";
+import { formatAge, request, scrollUp, parseJsonData } from "@/utils";
 
 import { ArrowRight } from "@element-plus/icons-vue";
 import { useLargeScreenStoreHook } from "@/store/modules/largeScreen";
@@ -365,13 +382,10 @@ const getDiseaseNames = async () => {
   diseaseNames.value = data.list;
 };
 
-const openParentDialogDetail = inject("openDialogDetail")
+const openParentDialogDetail = inject("openDialogDetail");
 const openDialogDetail = async row => {
-
-  openParentDialogDetail(row.archives.id)
+  openParentDialogDetail(row.archives.id);
 };
-
-
 </script>
 
 <style lang="scss" scoped>

+ 6 - 4
src/views/largeScreen/components/Left2.vue

@@ -69,7 +69,7 @@ const typeChange = () => {
         value: formatterScale(v.value, seriesMax.value),
         rawVal: v.value
       }
-    });
+    })
   } else {
     let diseaseRiskMap = [...largeScreenGlobalData.value?.diseaseRiskMap];
     diseaseRiskMap.sort((a, b) => a[tabType.value] - b[tabType.value]);
@@ -81,10 +81,12 @@ const typeChange = () => {
         value: formatterScale(v[tabType.value], seriesMax.value),
         rawVal: v[tabType.value]
       }
-    });
+    })
   }
-
-  console.log(xAxisData.value);
+  console.log(xAxisData.value ,seriesData.value );
+  xAxisData.value = xAxisData.value.slice(-10);
+  seriesData.value = seriesData.value.slice(-10);
+  console.log(xAxisData.value ,seriesData.value );
   nextTick(() => {
     initChart();
   });

+ 7 - 6
src/views/largeScreen/components/Left3.vue

@@ -21,7 +21,7 @@
           :data="tableData"
 
           stripe
-          ref="tableRefs"
+          ref="leftTableRefs"
           height="32vh"
           v-if="tableData?.length"
         >
@@ -147,7 +147,7 @@ const largeScreenGlobalData = computed(() => {
 const tableData = computed(() => {
   return useLargeScreenHook?.largeScreenGlobalData?.archivesList;
 });
-const tableRefs = ref();
+const leftTableRefs = ref();
 
 const level2Class = {
   重点关爱人群: {
@@ -164,10 +164,11 @@ const level2Class = {
   }
 };
 onMounted(() => {
-  if (tableData.value?.length && tableRefs?.value) {
-
-    scrollUp(tableRefs.value);
-  }
+  setTimeout(() => {
+    if (tableData.value?.length && leftTableRefs?.value) {
+      scrollUp(leftTableRefs.value);
+    }
+  }, 5e2);
 });
 
 const dialogVisible = ref(false);

+ 12 - 8
src/views/largeScreen/components/RightChartCard.vue

@@ -32,8 +32,8 @@
         <div>
           <el-select v-model="dialogData.abnormal">
             <el-option label="全部异常情况" :value="''"></el-option>
-            <el-option label="指标检查异常" value="指标检查异常"></el-option>
-            <el-option label="影像检查异常" value="影像检查异常"></el-option>
+            <el-option label="血检指标异常" value="血检指标异常"></el-option>
+            <el-option label="影像检查异常" value="影像检查异常"></el-option>
             <el-option label="其他异常" value="其他异常"></el-option>
           </el-select>
           <el-button type="primary" class="ml-2" @click="dialogPageChange(1)"
@@ -65,26 +65,28 @@
             {{ formatAge(row.archives?.birthday) }}
           </template>
         </el-table-column>
-        <el-table-column label="指标检查异常">
+        <el-table-column label="血检指标异常">
           <template #default="{ row }">
             <el-tag
               v-for="(item, index) in formatAbnormalIndicatorGroupList(
                 row,
-                '指标检查异常'
+                '血检指标异常'
               )"
+              class="mr-1 mb-1"
               :key="index"
               type="danger"
               >{{ item.indicatorName }}</el-tag
             >
           </template>
         </el-table-column>
-        <el-table-column label="影像检查异常">
+        <el-table-column label="影像检查异常">
           <template #default="{ row }">
             <el-tag
               v-for="(item, index) in formatAbnormalIndicatorGroupList(
                 row,
-                '影像检查异常'
+                '影像检查异常'
               )"
+              class="mr-1 mb-1"
               :key="index"
               type="danger"
               >{{ item.indicatorName }}</el-tag
@@ -98,6 +100,7 @@
                 row,
                 '其他异常'
               )"
+              class="mr-1 mb-1"
               :key="index"
               type="danger"
               >{{ item.indicatorName }}</el-tag
@@ -149,7 +152,7 @@ const useLargeScreenHook = useLargeScreenStoreHook();
 const largeScreenGlobalData = computed(() => {
   return useLargeScreenHook?.largeScreenGlobalData;
 });
-import { formatAge, parseJsonData, request } from "@/utils";
+import { formatAge, parseJsonData, request, unique } from "@/utils";
 import { ElLoading } from "element-plus";
 import { nextTick } from "vue";
 const imgs = [
@@ -265,7 +268,8 @@ const formatAbnormalIndicatorGroupList = (row, groupName) => {
   const item = row.abnormalIndicatorGroupList.find(
     v => v.groupName == groupName
   );
-  return item?.list || [];
+
+  return unique(item?.list || [], 'indicatorId');
 };
 const dialogPageChange = (page = 1) => {
   dialogData.page = page;

+ 16 - 1
src/views/largeScreen/index.vue

@@ -131,6 +131,9 @@ provide("resultRawJson", resultRawJson);
 provide("latestResultRawJson", latestResultRawJson);
 const compareReportData = ref();
 provide("compareReportData", compareReportData);
+const compareSuggestion = ref();
+provide("compareSuggestion", compareSuggestion);
+
 const getAnalysisData = async archivesId => {
   const { data } = await request.get(
     `/idcService/agency/medicalData/compareReport/data/v2`,
@@ -155,6 +158,17 @@ const getArchivesReportDetail = async archivesId => {
 
   latestResultRawJson.value = resultRawJson.value;
 };
+const getCompareReport = async (archivesId) => {
+  const { data } = await request.get(
+    `/idcService/agency/medicalData/compareReport/detail`,
+    {
+      params: {
+        archivesId
+      }
+    }
+  );
+  compareSuggestion.value = data.detail.suggestion
+};
 const openDialogDetail = async archivesId => {
   const loading = ElLoading.service({
     lock: true,
@@ -163,7 +177,8 @@ const openDialogDetail = async archivesId => {
   });
   await Promise.all([
     getArchivesReportDetail(archivesId),
-    getAnalysisData(archivesId)
+    getAnalysisData(archivesId),
+    getCompareReport(archivesId)
   ]);
   dialogDetail.visible = true;
   nextTick(() => {