|
|
@@ -470,27 +470,90 @@ const reTakePicture = async (img)=>{
|
|
|
cancelButtonText: '取消',
|
|
|
})
|
|
|
|
|
|
- socketStore.sendMessage({
|
|
|
- type: 're_take_picture',
|
|
|
- "data":{"record_id":img.id},
|
|
|
- })
|
|
|
+ runLoading.value = true;
|
|
|
+ runAction.value.goods_art_no = img.goods_art_no
|
|
|
+ runAction.value.action = 're_take_picture'
|
|
|
+ let params = {
|
|
|
+ id: img.action_id
|
|
|
+ }
|
|
|
|
|
|
- clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
|
|
|
|
|
|
- clientStore.ipc.on(icpList.socket.message + '_re_take_picture', (event, result) => {
|
|
|
- console.log('_re_take_picture')
|
|
|
+ clientStore.ipc.send(icpList.setting.getDeviceConfigDetail, params);
|
|
|
+
|
|
|
+
|
|
|
+ clientStore.ipc.on(icpList.setting.getDeviceConfigDetail, (event, result) => {
|
|
|
+
|
|
|
+ console.log('getDeviceConfigDetail')
|
|
|
console.log(result)
|
|
|
- if(result.code === 0){
|
|
|
- getPhotoRecords()
|
|
|
- setTimeout(()=>{
|
|
|
- showlastPhoto.value = false
|
|
|
- },6000)
|
|
|
- }else if(result.msg) {
|
|
|
+ if(result.code == 0 && result.data){
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
|
|
|
+
|
|
|
+ this_run_mcu_single(result.data)
|
|
|
+ }else if(result.msg){
|
|
|
ElMessage.error(result.msg)
|
|
|
}
|
|
|
+ });
|
|
|
+
|
|
|
+ function this_run_mcu_single(data){
|
|
|
+
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message+'_run_mcu_single');
|
|
|
+ socketStore.sendMessage({
|
|
|
+ type: 'run_mcu_single',
|
|
|
+ data: {
|
|
|
+ camera_height: Number(data.camera_height),
|
|
|
+ camera_angle: Number(data.camera_angle),
|
|
|
+ led_switch:data.led_switch,
|
|
|
+ id:0,
|
|
|
+ mode_type:data.mode_type,
|
|
|
+ turntable_position:Number(data.turntable_position),
|
|
|
+ action_name:data.action_name || '测试',
|
|
|
+ turntable_angle: Number(data.turntable_angle),
|
|
|
+ shoe_upturn: Number(data.shoe_upturn),
|
|
|
+ action_index:1,
|
|
|
+ number_focus:0,
|
|
|
+ take_picture:false,
|
|
|
+ pre_delay:0,
|
|
|
+ after_delay:0,
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ 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()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ async function this_re_take_picture(){
|
|
|
+
|
|
|
+ await ElMessageBox.alert('已把鞋子摆放完毕,点击按钮确认开始重拍', '提示')
|
|
|
+
|
|
|
+
|
|
|
+ socketStore.sendMessage({
|
|
|
+ type: 're_take_picture',
|
|
|
+ "data":{"record_id":img.id},
|
|
|
+ })
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
+ clientStore.ipc.on(icpList.socket.message + '_re_take_picture', (event, result) => {
|
|
|
+ console.log('_re_take_picture')
|
|
|
+ console.log(result)
|
|
|
+
|
|
|
+ runLoading.value = false;
|
|
|
+ if(result.code === 0){
|
|
|
+ getPhotoRecords()
|
|
|
+ setTimeout(()=>{
|
|
|
+ showlastPhoto.value = false
|
|
|
+ },6000)
|
|
|
+ }else if(result.msg) {
|
|
|
+ ElMessage.error(result.msg)
|
|
|
+ }
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
const reNosObj = ref({
|