|
|
@@ -7,6 +7,7 @@ import {ElMessage} from "element-plus";
|
|
|
const socketStore = socket();
|
|
|
const clientStore = client();
|
|
|
|
|
|
+
|
|
|
export const checkInfo = defineStore('checkInfo', () => {
|
|
|
|
|
|
// 定义设备列表
|
|
|
@@ -37,6 +38,7 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
const checkTime = ref(0)
|
|
|
let CKTimerInterval:any = null
|
|
|
let CKCamControlInterval:any = null
|
|
|
+ let init_mcu_type = ref(true)
|
|
|
const isCheckStatus = ref(true)
|
|
|
const set_isCheckStatus = (value)=>{
|
|
|
isCheckStatus.value = value
|
|
|
@@ -133,7 +135,12 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
console.log(result);
|
|
|
if(result.status === 2 ){
|
|
|
if(!mcu.isInitSend){
|
|
|
- socketStore.sendMessage({ type: 'init_mcu' });
|
|
|
+ socketStore.sendMessage({
|
|
|
+ type: 'init_mcu',
|
|
|
+ data:{
|
|
|
+ value:init_mcu_type.value
|
|
|
+ }
|
|
|
+ });
|
|
|
mcu.isInitSend = true
|
|
|
mcu.status = 1
|
|
|
}
|
|
|
@@ -141,6 +148,7 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
devices[deviceName].status = result.status;
|
|
|
devices[deviceName].msg = result.msg;
|
|
|
mcu.status = 2
|
|
|
+ init_mcu_type.value = false;
|
|
|
}
|
|
|
if(checkTime.value >= 60 && mcu.status !== 2){
|
|
|
mcu.status == -1;
|