diff --git a/api/app/lib/utils/dataRange.js b/api/app/lib/utils/dataRange.js index b542b4e..71dbd21 100644 --- a/api/app/lib/utils/dataRange.js +++ b/api/app/lib/utils/dataRange.js @@ -127,15 +127,21 @@ module.exports = function (app, opts) { let undelStruc = [] for (let s of undelStrucRes) { if (!undelStruc.some(us => us.strucId == s.strucId)) { + let pomsProject = [] + for (let br of bindRes) { + if (br.anxinProjectId.some(braId => braId == s.projectId)) { + let corPepProject = pepProjectRes.find(pp => pp.id == br.pepProjectId) + pomsProject.push({ + ...br, + pepProject: corPepProject + }) + } + } undelStruc.push({ strucId: s.strucId, strucName: s.strucName, // projectId: s.projectId, - pepProject: pepProjectRes.filter(pp => { - return bindRes.some(br => { - return br.pepProjectId == pp.id && br.anxinProjectId.some(braId => braId == s.projectId) - }) - }) + pomsProject: pomsProject }) } }