|
|
@ -132,6 +132,7 @@ import InitWarn from '../components/Consumables/Warn/InitWarn.vue' |
|
|
|
import { formatScanReports } from '@/utils/errorHandler' |
|
|
|
import { Subject, throttleTime } from 'rxjs' |
|
|
|
import { eMessage } from '../utils' |
|
|
|
import { ElMessageBox } from 'element-plus' |
|
|
|
|
|
|
|
const consumableStore = useConsumablesStore() |
|
|
|
const emergencyStore = useEmergencyStore() |
|
|
@ -237,6 +238,21 @@ const handleUnloadConsumable = async (index: number) => { |
|
|
|
eMessage.error('设备正在运行中,不可操作耗材') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ElMessageBox.confirm('是否卸载耗材?', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
showClose: false |
|
|
|
}) |
|
|
|
.then(async () => { |
|
|
|
await unloadChannel(index) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
// catch error |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const unloadChannel = async (index: number) => { |
|
|
|
const res = await unloadConsumable({ |
|
|
|
group: `CG${index + 1}` as ConsumableGroupNo, |
|
|
|
}) |
|
|
|