| | |
| | | }); |
| | | }; |
| | | |
| | | // 根据用户要求映射:AfterDTO(生产前), DTO(生产中), BeforeDTO(生产后) |
| | | // 修正字段映射:BeforeVO(生产前), VO(生产中), AfterVO(生产后) |
| | | if ( |
| | | info.commonFileListAfterVO && |
| | | Array.isArray(info.commonFileListAfterVO) |
| | | info.commonFileListBeforeVO && |
| | | Array.isArray(info.commonFileListBeforeVO) |
| | | ) { |
| | | beforeModelValue.value = mapFiles(info.commonFileListAfterVO); |
| | | beforeModelValue.value = mapFiles(info.commonFileListBeforeVO); |
| | | } |
| | | console.log(beforeModelValue.value, "beforeModelValue"); |
| | | |
| | |
| | | afterModelValue.value = mapFiles(info.commonFileListVO); |
| | | } |
| | | if ( |
| | | info.commonFileListBeforeVO && |
| | | Array.isArray(info.commonFileListBeforeVO) |
| | | info.commonFileListAfterVO && |
| | | Array.isArray(info.commonFileListAfterVO) |
| | | ) { |
| | | issueModelValue.value = mapFiles(info.commonFileListBeforeVO); |
| | | issueModelValue.value = mapFiles(info.commonFileListAfterVO); |
| | | } |
| | | |
| | | // 如果有异常描述,也恢复 |
| | |
| | | inspector: taskInfo.value?.inspector, |
| | | hasException: hasException.value, |
| | | inspectionResult: hasException.value ? 0 : 1, // 0-异常,1-正常 |
| | | commonFileListAfterDTO: beforeModelValue.value, |
| | | commonFileListBeforeDTO: beforeModelValue.value, |
| | | commonFileListDTO: afterModelValue.value, |
| | | commonFileListBeforeDTO: issueModelValue.value, |
| | | commonFileListAfterDTO: issueModelValue.value, |
| | | uploadedFiles: { |
| | | before: beforeModelValue.value, |
| | | after: afterModelValue.value, |
| | |
| | | // 提交数据 |
| | | const submitData = { |
| | | ...taskInfo.value, |
| | | commonFileListAfterDTO: beforeModelValue.value, // 生产前 |
| | | commonFileListBeforeDTO: beforeModelValue.value, // 生产前 |
| | | commonFileListDTO: afterModelValue.value, // 生产中 |
| | | commonFileListBeforeDTO: issueModelValue.value, // 生产后 |
| | | commonFileListAfterDTO: issueModelValue.value, // 生产后 |
| | | hasException: hasException.value, |
| | | inspectionResult: hasException.value ? 0 : 1, // 0-异常,1-正常 |
| | | abnormalDescription: abnormalDescription.value, |