From 9cd73e4d15e533fdcaa10fea92ea568e6dbb41a6 Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Mon, 13 Jan 2025 19:13:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E9=98=B2=E6=AD=A2=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Index/TestTube/TubeUserId.vue | 4 ++-- src/pages/Index/components/TestTube/Tube.vue | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/pages/Index/TestTube/TubeUserId.vue b/src/pages/Index/TestTube/TubeUserId.vue index ff95774..5a3726a 100644 --- a/src/pages/Index/TestTube/TubeUserId.vue +++ b/src/pages/Index/TestTube/TubeUserId.vue @@ -111,8 +111,8 @@ const tubeGroups = ref([ ]) const projectsAvailable = computed(() => { - const group = R.groupBy((p) => p.projName, consumables.plates) - const pNames = R.keys(group) + const group = R.groupBy((p) => p.projName, consumables.consumableData.reactionPlateGroup) + const pNames = R.keys(group).filter(n => n !== 'null') const projArr = pNames.map((n) => R.reduce( diff --git a/src/pages/Index/components/TestTube/Tube.vue b/src/pages/Index/components/TestTube/Tube.vue index bcd4325..f1a0f3c 100644 --- a/src/pages/Index/components/TestTube/Tube.vue +++ b/src/pages/Index/components/TestTube/Tube.vue @@ -9,14 +9,22 @@
{{ tube.projId.length === 1 - ? projIdMap[tube.projId[0]].projName + ? projIdMap[tube.projId[0]] + ? projIdMap[tube.projId[0]].projName + : '' : tube.projId.length === 2 - ? projIdMap[tube.projId[1]].projName + ? projIdMap[tube.projId[1]] + ? projIdMap[tube.projId[1]].projName + : '' : '' }} {{ bloodKeyMap[tube.bloodType]?.name }} {{ - tube.projId.length === 2 ? projIdMap[tube.projId[0]].projName : '' + tube.projId.length === 2 + ? projIdMap[tube.projId[0]] + ? projIdMap[tube.projId[0]].projName + : '' + : '' }}
@@ -82,7 +90,7 @@ watch( if (canvas.value) { const data = props.tube.projId.map((p) => ({ value: 1, - color: projIdMap.value[p].color, + color: projIdMap.value[p] ? projIdMap.value[p].color : '#FFF', })) const ctx = canvas.value.getContext('2d') drawPieChart(ctx, data)