Просмотр исходного кода

feat(photography): 添加拍摄点名称和设备移动状态参数

- 在拍摄数据对象中添加 point_name 和 is_move_device 字段
- 修改 this_re_take_picture 函数以接收 data 参数
- 更新 socket 消息发送的数据结构,包含拍摄点名称和设备移动状态
- 修复重拍功能中的参数传递问题
panqiuyao 21 часов назад
Родитель
Сommit
a856997829
1 измененных файлов с 10 добавлено и 3 удалено
  1. 10 3
      frontend/src/views/Photography/mixin/usePhotography.ts

+ 10 - 3
frontend/src/views/Photography/mixin/usePhotography.ts

@@ -337,6 +337,8 @@ export default function usePhotography() {
             action_index: 1,
             number_focus: 0,
             take_picture: false,
+            point_name:data.point_name,
+            is_move_device: data.is_move_device,
             pre_delay: 0,
             after_delay: 0,
           }
@@ -346,10 +348,10 @@ export default function usePhotography() {
         clientStore.ipc.on(icpList.socket.message + '_run_mcu_single', async (event, result) => {
           console.log('_run_mcu_single_row')
           clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_single');
-          this_re_take_picture()
+          this_re_take_picture(data)
         })
       }
-      async function this_re_take_picture() {
+      async function this_re_take_picture(data) {
 
         await ElMessageBox.alert('已复位到该视图下,请把鞋子摆放完毕之后,点击按钮开始重拍', '提示', {
           confirmButtonText: "开始重拍",
@@ -362,7 +364,12 @@ export default function usePhotography() {
 
         socketStore.sendMessage({
           type: 'smart_shooter_photo_take',
-          "data": { "id": img.id, "goods_art_no": img.goods_art_no },
+          "data": {
+            "id": img.id,
+            "goods_art_no": img.goods_art_no,
+            point_name:data.point_name,
+            is_move_device: data.is_move_device
+          },
         })
       }