|
|
@ -163,8 +163,6 @@ interface ScanReport { |
|
|
|
} |
|
|
|
const formattedReports = ref<ScanReport[]>([]) |
|
|
|
|
|
|
|
//是否加载 |
|
|
|
const isAlreadyLoad = ref(false) //?? |
|
|
|
// 临时状态管理小球激活数量 |
|
|
|
const tempTipNum = ref<number[]>([ |
|
|
|
...moveLiquids.value.map((liquid) => liquid.tipNum), |
|
|
@ -233,7 +231,6 @@ const handleConfirmScan = () => { |
|
|
|
if (formattedReports.value.some((report) => report.isError)) { |
|
|
|
isHandleScan.value = false |
|
|
|
isLoadedConsumables.value = false |
|
|
|
isAlreadyLoad.value = false |
|
|
|
ElMessage.warning('存在错误,请检查耗材') |
|
|
|
} else { |
|
|
|
isHandleScan.value = true |
|
|
@ -257,7 +254,7 @@ const handleSensorState = (data: SensorStateMessage['data']) => { |
|
|
|
|
|
|
|
//处理耗材状态 |
|
|
|
const handleConsumablesState = (data: ConsumablesStateMessage['data']) => { |
|
|
|
if (isAlreadyLoad.value && isHandleScan.value) { |
|
|
|
if (isHandleScan.value) { |
|
|
|
consumableStore.setConsumablesData(data) |
|
|
|
if (!isDragging.value) { |
|
|
|
moveLiquids.value = data.tips |
|
|
@ -351,7 +348,7 @@ const handleIsLoad = async () => { |
|
|
|
} catch (error) { |
|
|
|
console.error('加载耗材失败:', error) |
|
|
|
isLoading.value = false |
|
|
|
isAlreadyLoad.value = false |
|
|
|
isHandleScan.value = false |
|
|
|
ElMessage.error('加载耗材失败') |
|
|
|
} |
|
|
|
} |
|
|
@ -366,7 +363,6 @@ watch(isHandleScan, (newVal) => { |
|
|
|
bufferBig.value = consumablesData.value.larBottleGroup as BottleGroup[] |
|
|
|
tempTipNum.value = [...moveLiquids.value.map((liquid) => liquid.tipNum)] |
|
|
|
isLoadedConsumables.value = true |
|
|
|
isAlreadyLoad.value = true |
|
|
|
consumableStore.setConsumablesData(consumablesData.value) |
|
|
|
} |
|
|
|
} else { |
|
|
@ -377,7 +373,6 @@ watch(isHandleScan, (newVal) => { |
|
|
|
const handleIsUnload = () => { |
|
|
|
isLoadedConsumables.value = !isLoadedConsumables.value |
|
|
|
isLoading.value = false |
|
|
|
isAlreadyLoad.value = false |
|
|
|
isHandleScan.value = false |
|
|
|
// 重置 moveLiquids 和 tempTipNum |
|
|
|
moveLiquids.value = [ |
|
|
|