From e3cb827f0049135166f6fe554368f90eeecf432d Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Thu, 9 Jan 2025 14:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=95=E7=AE=A1=E6=9E=B6?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=EF=BC=8C=E5=BD=93=E5=89=8D=E5=B7=B2=E9=A2=84?= =?UTF-8?q?=E8=AE=A2=E9=A1=B9=E7=9B=AE=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icon_cross.svg | 3 ++ src/pages/Index/Regular/TestTube.vue | 34 ++++++++++++++++++++-- .../components/Running/EmergencyResultDialog.vue | 4 +-- .../Index/components/TestTube/TestTubeRack.vue | 14 ++++++++- 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 src/assets/icon_cross.svg diff --git a/src/assets/icon_cross.svg b/src/assets/icon_cross.svg new file mode 100644 index 0000000..955e969 --- /dev/null +++ b/src/assets/icon_cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/Index/Regular/TestTube.vue b/src/pages/Index/Regular/TestTube.vue index 3b1a0f7..c8cb72d 100644 --- a/src/pages/Index/Regular/TestTube.vue +++ b/src/pages/Index/Regular/TestTube.vue @@ -36,7 +36,9 @@ @click="clickProjectItem(proj)" > {{ proj.projName }} - {{ proj.num }} + {{ + `${projIdCntMap[proj.projId] || 0}/${proj.num}` + }} @@ -159,6 +161,31 @@ const projectsAvailable = computed(() => { return projArr }) + +const projIdCntMap = computed(() => { + return R.reduce( + (acc, curr) => { + const projIdCntRack = R.reduce( + (ac, cur) => { + cur.projId.forEach((pId) => { + ac[pId] = (ac[pId] || 0) + 1 + }) + return ac + }, + {}, + curr.tubeSettings, + ) + + Object.keys(projIdCntRack).forEach((k) => { + acc[k] = (acc[k] || 0) + projIdCntRack[k] + }) + return acc + }, + {}, + tubeRacks.value, + ) +}) + const getBloodTypeData = async () => { loading.value = true const res = await getBloodTypes() @@ -443,7 +470,7 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { display: flex; .project-item { border-radius: 8px; - padding: 6px 10px; + padding: 4px 10px; margin-right: 8px; display: flex; flex-direction: column; @@ -451,6 +478,7 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { min-width: 50px; .proj-name { font-weight: 600; + font-size: 1.2rem; } } } @@ -466,6 +494,8 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { padding: 10px; margin-right: 8px; color: @active-color; + font-weight: 600; + font-size: 1.2rem; &.active { color: #fff; background-color: @active-color; diff --git a/src/pages/Index/components/Running/EmergencyResultDialog.vue b/src/pages/Index/components/Running/EmergencyResultDialog.vue index f03f360..0abeb24 100644 --- a/src/pages/Index/components/Running/EmergencyResultDialog.vue +++ b/src/pages/Index/components/Running/EmergencyResultDialog.vue @@ -42,11 +42,11 @@ defineProps({ result: { type: Object, - required: true, + // required: true, }, visible: { type: Boolean, - required: true, + // required: true, }, }) diff --git a/src/pages/Index/components/TestTube/TestTubeRack.vue b/src/pages/Index/components/TestTube/TestTubeRack.vue index 645e23a..bb76c72 100644 --- a/src/pages/Index/components/TestTube/TestTubeRack.vue +++ b/src/pages/Index/components/TestTube/TestTubeRack.vue @@ -18,7 +18,10 @@
修改试管架
编辑患者信息
-
删除试管架
+
+ del + 删除试管架 +
@@ -73,6 +76,15 @@ const onClickTubeItem = (idx) => { .rack-op { align-self: stretch; line-height: @op-bar-height; + &.rack-del { + display: flex; + align-items: center; + img { + width: 20px; + margin-right: 8px; + } + color: red; + } } }