|
|
@@ -36,7 +36,15 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
const blue_tooth_scan_NO = ref('')
|
|
|
const checkTime = ref(0)
|
|
|
let CKTimerInterval:any = null
|
|
|
-
|
|
|
+ let CKCamControlInterval:any = null
|
|
|
+ const isFirstCheck = ref(true)
|
|
|
+ const set_isFirstCheck = ()=>{
|
|
|
+ isFirstCheck.value = false
|
|
|
+ //开始监听相机软件连接状态
|
|
|
+ CKCamControlInterval = setInterval(()=>{
|
|
|
+ checkcamControl()
|
|
|
+ },3000)
|
|
|
+ }
|
|
|
//mcu 初始化
|
|
|
const mcu = reactive({
|
|
|
isInitSend:false,
|
|
|
@@ -49,7 +57,8 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
for (const device of Object.values(devices)) {
|
|
|
if (device.status === 2) completed++;
|
|
|
}
|
|
|
- return parseFloat((completed / total * 100).toFixed(2));
|
|
|
+ let value = parseFloat((completed / total * 100).toFixed(2));
|
|
|
+ return value
|
|
|
});
|
|
|
|
|
|
// 获取错误信息
|
|
|
@@ -164,6 +173,7 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
for (const deviceName of Object.keys(devices)) {
|
|
|
switch (deviceName){
|
|
|
case 'cam_control':
|
|
|
+ if(CKCamControlInterval) clearInterval(CKCamControlInterval)
|
|
|
await checkcamControl();
|
|
|
break;
|
|
|
case 'camera':
|
|
|
@@ -215,6 +225,8 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
blueTooth: devices.blueTooth,
|
|
|
camControl: devices.camControl,
|
|
|
camera: devices.camera,
|
|
|
+ isFirstCheck,
|
|
|
+ set_isFirstCheck,
|
|
|
blue_tooth_scan_NO,
|
|
|
set_blue_tooth_scan_NO,
|
|
|
checkAction,
|