|
|
@@ -63,9 +63,9 @@
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <div class="last-photo" v-show="showlastPhoto" v-key="lastPhoto.image_path">
|
|
|
+ <div class="last-photo" v-show="showlastPhoto" v-key="lastPhoto.file_path">
|
|
|
<div>{{lastPhtotoName[lastPhoto.image_index] || ''}}</div>
|
|
|
- <el-image :src="getFilePath(lastPhoto.image_path)" fit="contain" ></el-image>
|
|
|
+ <el-image :src="getFilePath(lastPhoto.file_path)" fit="contain" ></el-image>
|
|
|
</div>
|
|
|
<div class="history-section flex-col">
|
|
|
<span class="history-title flex between">
|
|
|
@@ -614,6 +614,7 @@ onBeforeUnmount(() => {
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take_finish');
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_update');
|
|
|
/* window.removeEventListener('storage', handleStorageEvent);*/
|
|
|
|
|
|
|
|
|
@@ -632,6 +633,8 @@ const lastPhtotoName = ref({
|
|
|
4:"内里",
|
|
|
})
|
|
|
const getLastPhotoRecord = async ()=>{
|
|
|
+
|
|
|
+ return;
|
|
|
if(goodsList.value && goodsList.value.length === 0) return;
|
|
|
clientStore.ipc.removeAllListeners(icpList.takePhoto.getLastPhotoRecord);
|
|
|
clientStore.ipc.send(icpList.takePhoto.getLastPhotoRecord,);
|
|
|
@@ -657,6 +660,26 @@ const getLastPhotoRecord = async ()=>{
|
|
|
}
|
|
|
|
|
|
|
|
|
+// 监听拍照完成后的最终状态事件
|
|
|
+clientStore.ipc.on(icpList.socket.message + '_run_mcu_update', (event, result) => {
|
|
|
+ console.log('_run_mcu_update')
|
|
|
+ console.log(result)
|
|
|
+
|
|
|
+ if(result.code === 0){
|
|
|
+ if(lastPhoto.value?.file_path){
|
|
|
+ if( lastPhoto.value?.file_path == result.data?.file_path) return;
|
|
|
+
|
|
|
+ if(runAction.value.goods_art_no === result.data?.goods_art_no){
|
|
|
+ showlastPhoto.value = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ lastPhoto.value = result.data
|
|
|
+ }else if(result.msg) {
|
|
|
+ ElMessage.error(result.msg)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 打开主图详情页面。
|
|
|
*/
|