diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue
index 4f8eb85..18f4ee6 100644
--- a/src/pages/Index/Index.vue
+++ b/src/pages/Index/Index.vue
@@ -1045,7 +1045,8 @@ const untilDeviceReady = async () => {
const startTest = async () => {
const res = await getInitState()
if (res.ecode === 'SUC' && !res.data.deviceInited) {
- eventBus.emit('initDevice')
+ warnMessage.value = '设备未初始化, 请先初始化设备'
+ showWarnModal.value =true
return
}
try {
diff --git a/src/pages/Index/Regular/Consumables.vue b/src/pages/Index/Regular/Consumables.vue
index 5745c48..1bf27ed 100644
--- a/src/pages/Index/Regular/Consumables.vue
+++ b/src/pages/Index/Regular/Consumables.vue
@@ -108,6 +108,17 @@
@close="confirmWarn"
@confirm="confirmWarn"
/>
+
@@ -180,6 +191,8 @@ onActivated(() => {
// }
})
+const warnModal = ref(false)
+
const handleIsLoad = async () => {
if (deviceStore.deviceState.workState === 'WORKING') {
eMessage.error('设备正在运行中,不可操作耗材')
@@ -187,7 +200,7 @@ const handleIsLoad = async () => {
}
const res = await getInitState()
if (res.ecode === 'SUC' && !res.data.deviceInited) {
- eventBus.emit('initDevice')
+ warnModal.value = true
return
}
try {