浏览代码

mod:BUG 修复

panqiuyao 7 月之前
父节点
当前提交
41a9f2e05c

+ 11 - 0
frontend/src/views/Developer/normal.vue

@@ -212,7 +212,9 @@ async function  connect_mcu__init(){
   }
 }
 
+const allTipsCount = ref(0)
 async  function  AllChangeNum (){
+  allTipsCount.value = 8
   changeNum('相机电机','set_deviation','camera_high_motor_deviation',0, 50)
   changeNum('相机舵机','set_deviation','camera_steering_deviation',-90, 90)
   changeNum('转盘舵机','set_deviation','turntable_steering_deviation',-720, 720)
@@ -250,6 +252,15 @@ async function changeNum(action_name, type, key, min, max) {
     console.log('set_deviation')
     console.log(result)
     if(result.code === 0){
+      if(allTipsCount.value === 1){
+        allTipsCount.value--;
+        ElMessage.success('设定成功')
+        return;;
+      }
+      if(allTipsCount.value > 0){
+        allTipsCount.value--;
+        return;
+      }
       ElMessage.success(result.msg)
     }else if(result.msg){
       ElMessage.error(result.msg)

+ 25 - 28
frontend/src/views/Photography/check.vue

@@ -203,45 +203,42 @@ function takePictures() {
       }
     });
 
-    clientStore.ipc.on(icpList.socket.message+'_run_mcu_single', async (event, result) => {
-      console.log('_run_mcu_single_check')
-      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');
-
-          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){
-            if(result.code !== 0) ElMessage.error(result.msg)
-
-          }
-
-
-        });
-
-
+clientStore.ipc.on(icpList.socket.message+'_run_mcu_single', async (event, result) => {
+  console.log('_run_mcu_single_check')
+  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){
-
         if(result.code !== 0) ElMessage.error(result.msg)
       }
+      clientStore.ipc.removeAllListeners(icpList.takePhoto.createMainImage);
+
+
+    });
 
-    })
 
+  }else if(result.msg){
 
+    if(result.code !== 0) ElMessage.error(result.msg)
   }
-}
 
+})
 onMounted(()=>{
   showVideo()
 })

+ 1 - 1
frontend/src/views/Photography/detail.vue

@@ -95,7 +95,7 @@
           </div>
         </div>
 
-        <div class="template-tips c-333 fs-14 line-20 te-l mar-top-20 flex ">
+        <div class="template-tips c-333 fs-14 line-20 te-l mar-top-20 flex left">
           <el-icon><WarningFilled /></el-icon>
           <span class="mar-left-10">该模版图片顺序说明:{{form.selectTemplate.template_image_order}}</span>
         </div>

+ 1 - 1
frontend/src/views/Photography/shot.vue

@@ -645,7 +645,7 @@ const  getLastPhotoRecord = async ()=>{
       if(lastPhoto.value?.image_path){
         if(  lastPhoto.value?.image_path == result.data?.image_path) return;
 
-        if(runAction.value.goods_art_no === result.data.goods_art_no){
+        if(runAction.value.goods_art_no === result.data?.goods_art_no){
           showlastPhoto.value = true
         }
       }