|
|
@@ -147,9 +147,6 @@ async function checkConfirm(init){
|
|
|
}
|
|
|
if(init){
|
|
|
await configInfoStore.getAppConfig()
|
|
|
- console.log('configInfoStore.appConfig');
|
|
|
- console.log(configInfoStore.appConfig);
|
|
|
- console.log(configInfoStore.appConfig.controlType);
|
|
|
if(configInfoStore.appConfig.controlType === "SmartShooter"){
|
|
|
preview.value = configInfoStore.appConfig.userDataPath + "\\preview\\liveview.png"
|
|
|
}
|
|
|
@@ -180,7 +177,7 @@ function showVideo(){
|
|
|
interval = setInterval(()=>{
|
|
|
previewKey.value++;
|
|
|
},200)
|
|
|
- },2000)
|
|
|
+ },500)
|
|
|
|
|
|
})
|
|
|
|
|
|
@@ -232,33 +229,49 @@ function takePictures() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 获取主图
|
|
|
+function createMainImage (file_path){
|
|
|
+
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.takePhoto.createMainImage);
|
|
|
+ clientStore.ipc.send(icpList.takePhoto.createMainImage,{
|
|
|
+ file_path:file_path
|
|
|
+ });
|
|
|
+ clientStore.ipc.on(icpList.takePhoto.createMainImage, async (event, result) => {
|
|
|
+ if(result.code === 0 && result.data?.main_out_path){
|
|
|
+ imageTplPath.value = result.data?.main_out_path
|
|
|
+ hideVideo()
|
|
|
+ step.value = 2
|
|
|
+ loading.value = false;
|
|
|
+ }else if(result.msg){
|
|
|
+ loading.value = false;
|
|
|
+ showVideo()
|
|
|
+ if(result.code !== 0) ElMessage.error(result.msg)
|
|
|
+ }
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.takePhoto.createMainImage);
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//拍照成功 SmartShooter
|
|
|
+clientStore.ipc.on(icpList.socket.message+'_smart_shooter_photo_take', async (event, result) => {
|
|
|
+
|
|
|
+ if(result.code === 1 && result.data?.photo_file_name){
|
|
|
+ createMainImage(result.data?.photo_file_name)
|
|
|
+ }
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+//运行的时候 直接拍照 digiCamControl
|
|
|
clientStore.ipc.on(icpList.socket.message+'_run_mcu_single', async (event, result) => {
|
|
|
- console.log('_run_mcu_single_check')
|
|
|
+ console.log('_run_mcu_single_check_on')
|
|
|
console.log(result)
|
|
|
|
|
|
if(result.code === 0 && result.data?.file_path){
|
|
|
- clientStore.ipc.removeAllListeners(icpList.takePhoto.createMainImage);
|
|
|
- clientStore.ipc.send(icpList.takePhoto.createMainImage,{
|
|
|
- file_path:result.data.file_path
|
|
|
- });
|
|
|
- clientStore.ipc.on(icpList.takePhoto.createMainImage, async (event, result) => {
|
|
|
- console.log('icpList.utils.createMainImage');
|
|
|
- console.log(result);
|
|
|
- if(result.code === 0 && result.data?.main_out_path){
|
|
|
- imageTplPath.value = result.data?.main_out_path
|
|
|
- hideVideo()
|
|
|
- step.value = 2
|
|
|
- loading.value = false;
|
|
|
- }else if(result.msg){
|
|
|
- loading.value = false;
|
|
|
- showVideo()
|
|
|
- if(result.code !== 0) ElMessage.error(result.msg)
|
|
|
- }
|
|
|
- clientStore.ipc.removeAllListeners(icpList.takePhoto.createMainImage);
|
|
|
-
|
|
|
-
|
|
|
- });
|
|
|
|
|
|
+ createMainImage(result.data?.file_path)
|
|
|
|
|
|
}else if(result.msg){
|
|
|
if( result.msg.indexOf('处理失败,请重试') >= 0){
|