|
@ -36,7 +36,9 @@ |
|
|
@click="clickProjectItem(proj)" |
|
|
@click="clickProjectItem(proj)" |
|
|
> |
|
|
> |
|
|
<span class="proj-name">{{ proj.projName }}</span> |
|
|
<span class="proj-name">{{ proj.projName }}</span> |
|
|
<span class="proj-num">{{ proj.num }}</span> |
|
|
|
|
|
|
|
|
<span class="proj-num">{{ |
|
|
|
|
|
`${projIdCntMap[proj.projId] || 0}/${proj.num}` |
|
|
|
|
|
}}</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -159,6 +161,31 @@ const projectsAvailable = computed(() => { |
|
|
|
|
|
|
|
|
return projArr |
|
|
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 () => { |
|
|
const getBloodTypeData = async () => { |
|
|
loading.value = true |
|
|
loading.value = true |
|
|
const res = await getBloodTypes() |
|
|
const res = await getBloodTypes() |
|
@ -443,7 +470,7 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { |
|
|
display: flex; |
|
|
display: flex; |
|
|
.project-item { |
|
|
.project-item { |
|
|
border-radius: 8px; |
|
|
border-radius: 8px; |
|
|
padding: 6px 10px; |
|
|
|
|
|
|
|
|
padding: 4px 10px; |
|
|
margin-right: 8px; |
|
|
margin-right: 8px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
@ -451,6 +478,7 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { |
|
|
min-width: 50px; |
|
|
min-width: 50px; |
|
|
.proj-name { |
|
|
.proj-name { |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
|
|
|
font-size: 1.2rem; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -466,6 +494,8 @@ const updateTubeSettingsHandler = async (rackIdx, tubeIdx) => { |
|
|
padding: 10px; |
|
|
padding: 10px; |
|
|
margin-right: 8px; |
|
|
margin-right: 8px; |
|
|
color: @active-color; |
|
|
color: @active-color; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
font-size: 1.2rem; |
|
|
&.active { |
|
|
&.active { |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
background-color: @active-color; |
|
|
background-color: @active-color; |
|
|