|
|
@ -150,8 +150,8 @@ const clickBloodTypeItem = (type) => { |
|
|
|
} |
|
|
|
|
|
|
|
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( |
|
|
@ -220,7 +220,6 @@ const getTubeData = async () => { |
|
|
|
const res = await getTestTube() |
|
|
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
|
|
tubeRacks.value = mockData(res.data) |
|
|
|
console.log(tubeRacks.value) |
|
|
|
} else { |
|
|
@ -251,6 +250,10 @@ const handleChangeUser = async (index) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const existValidProject = (tubeRack) => { |
|
|
|
return tubeRack.tubeSettings.some(s => (s.projId || []).length > 0 && !!s.bloodType) |
|
|
|
} |
|
|
|
|
|
|
|
//删除试管架 |
|
|
|
const deleteTubeRack = async (idx) => { |
|
|
|
const rack = tubeRacks.value[idx] |
|
|
@ -303,6 +306,10 @@ const handleActivateChange = async (index) => { |
|
|
|
return |
|
|
|
} |
|
|
|
let destState = rack.state === 'INACTIVE' ? 'ACTIVE' : 'INACTIVE' |
|
|
|
if (destState === 'ACTIVE' && !existValidProject(rack)) { |
|
|
|
ElMessage.error('请为试管配置检测项目') |
|
|
|
return |
|
|
|
} |
|
|
|
const res = await updateTubeActivationStatus({ |
|
|
|
uuid: rack.uuid, |
|
|
|
active: destState === 'ACTIVE', |
|
|
|