|
|
@@ -3,7 +3,7 @@ import { ref, reactive, computed } from 'vue';
|
|
|
import socket from "./socket";
|
|
|
import icpList from "../../utils/ipc";
|
|
|
import client from "./client";
|
|
|
-
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
const socketStore = socket();
|
|
|
const clientStore = client();
|
|
|
|
|
|
@@ -33,6 +33,7 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
},*/
|
|
|
});
|
|
|
|
|
|
+ const blue_tooth_scan_NO = ref('')
|
|
|
const checkTime = ref(0)
|
|
|
let CKTimerInterval:any = null
|
|
|
|
|
|
@@ -58,7 +59,7 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
clearInterval(CKTimerInterval)
|
|
|
checkTime.value = 0
|
|
|
mcu.isInitSend = false
|
|
|
- return '相机初始化失败,请重新监测或强制初始化!';
|
|
|
+ return '拍照机初始化失败,请重新监测!';
|
|
|
}
|
|
|
for (const device of Object.values(devices)) {
|
|
|
if (device.status === -1) {
|
|
|
@@ -137,10 +138,18 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
devices[deviceName].status = result.status;
|
|
|
devices[deviceName].msg = result.msg;
|
|
|
}
|
|
|
- }else if([-1,0,2].includes(result.status)){
|
|
|
- devices[deviceName].status = result.status;
|
|
|
- devices[deviceName].msg = result.msg;
|
|
|
}
|
|
|
+ if(deviceName === 'blue_tooth'){
|
|
|
+ if (result.code === 0 && result.data?.data && result.data._type === 0 && typeof(result.data.data) === 'string'){
|
|
|
+ blue_tooth_scan_NO.value = result.data.data
|
|
|
+ // ElMessage.success('商品货号'+result.data.data+'获取成功,请根据左右脚按遥控器上的左右脚按键启动拍摄')
|
|
|
+ }
|
|
|
+ if([-1,0,2].includes(result.status)){
|
|
|
+ devices[deviceName].status = result.status;
|
|
|
+ devices[deviceName].msg = result.msg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
} catch (error) {
|
|
|
@@ -194,6 +203,10 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ function set_blue_tooth_scan_NO(value){
|
|
|
+ blue_tooth_scan_NO.value = value
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
return {
|
|
|
getProgress,
|
|
|
@@ -202,6 +215,8 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
blueTooth: devices.blueTooth,
|
|
|
camControl: devices.camControl,
|
|
|
camera: devices.camera,
|
|
|
+ blue_tooth_scan_NO,
|
|
|
+ set_blue_tooth_scan_NO,
|
|
|
checkAction,
|
|
|
reCheckAction,
|
|
|
};
|