Ver Fonte

(remotefix-control): 修复远程控制页面配置切换功能

- 移除左右脚按钮的右键切换配置事件监听
- 为配置按钮添加禁用状态样式控制
- 在配置切换和选择操作前添加canStop属性检查
- 限制菜单项最大高度从250px调整为150px
- 阻止拍摄过程中进行配置切换操作
panqiuyao há 14 horas atrás
pai
commit
a138422f48
1 ficheiros alterados com 12 adições e 5 exclusões
  1. 12 5
      frontend/src/views/RemoteControl/index.vue

+ 12 - 5
frontend/src/views/RemoteControl/index.vue

@@ -10,16 +10,16 @@
 
     <el-row align="middle" class="mar-top-20">
       <el-col :span="3"></el-col>
-      <el-col :span="6"><div class="button up" title="单击鼠标右键可切换配置" @click="runLeft" @contextmenu="handleLeftRightClick($event, 'left')">左脚</div></el-col>
+      <el-col :span="6"><div class="button up" title="单击鼠标右键可切换配置" @click="runLeft" >左脚</div></el-col>
       <el-col :span="6"><div class="button up" @click="run_take_picture">拍照</div></el-col>
-      <el-col :span="6"><div class="button up" title="单击鼠标右键可切换配置" @click="runRight" @contextmenu="handleLeftRightClick($event, 'right')">右脚</div></el-col>
+      <el-col :span="6"><div class="button up" title="单击鼠标右键可切换配置" @click="runRight">右脚</div></el-col>
       <el-col :span="3"></el-col>
     </el-row>
     <el-row align="middle" >
       <el-col :span="3"></el-col>
-      <el-col :span="6"><div class="button up"  @click="handleLeftRightClick($event, 'left')"><span style="font-size: 12px;">左脚配置</span></div></el-col>
+      <el-col :span="6"><div class="button up"  :class="{ disabled: canStop }"   @click="handleLeftRightClick($event, 'left')"><span style="font-size: 12px;">左脚配置</span></div></el-col>
       <el-col :span="6"></el-col>
-      <el-col :span="6"><div class="button up"  @click="handleLeftRightClick($event, 'right')"><span style="font-size: 12px;">右脚配置</span></div></el-col>
+      <el-col :span="6"><div class="button up"  :class="{ disabled: canStop }"   @click="handleLeftRightClick($event, 'right')"><span style="font-size: 12px;">右脚配置</span></div></el-col>
       <el-col :span="3"></el-col>
     </el-row>
     <el-row align="middle">
@@ -137,6 +137,9 @@ const oneClickStop = () => {
 
 // 右击左脚按钮
 const handleLeftRightClick = (event, type) => {
+  if(props.canStop){
+     return
+  }
   event.preventDefault()
   menuPosition.value = { x: event.clientX, y: event.clientY }
 
@@ -180,6 +183,10 @@ const loadRightConfig = async () => {
 // 选择配置
 const selectConfig = async (type, configId) => {
   try {
+    if(props.canStop){
+      ElMessage.error('正在拍摄中,请稍候')
+      return
+    }
     const result = await setLeftRightConfig({
       type: type,
       id: configId
@@ -285,7 +292,7 @@ const closeMenus = () => {
 }
 .menu-items {
 
-  max-height: 250px;
+  max-height: 150px;
   overflow: auto;
 }
 .menu-item {