Browse Source

mod:一键停止

panqiuyao 7 months ago
parent
commit
31381bc680
1 changed files with 12 additions and 12 deletions
  1. 12 12
      frontend/src/views/Photography/shot.vue

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

@@ -492,6 +492,18 @@ const  next = async function(){
   }
 }
 
+const oneClickStop = ()=>{
+
+  if(!(runLoading.value || takePictureLoading.value)){
+    ElMessage.error('拍摄程序已结束,不需要单独停止!')
+    return
+  }else{
+
+    socketStore.sendMessage({
+      type: 'stop_action',
+    })
+  }
+}
 /**
  * 页面挂载时初始化事件监听器并获取初始数据。
  */
@@ -599,18 +611,6 @@ onMounted(async () => {
 })
 
 
-const oneClickStop = ()=>{
-
-  if(!(runLoading.value || takePictureLoading.value)){
-    ElMessage.error('拍摄程序已结束,不需要单独停止!')
-    return
-  }else{
-
-    socketStore.sendMessage({
-      type: 'stop_action',
-    })
-  }
-}
 const onRemoteControl = (type)=>{
   if(type == 'take_picture'){