Browse Source

筛选数据范围应返回 pomsProject

dev
巴林闲侠 2 years ago
parent
commit
d03c8cb7af
  1. 16
      api/app/lib/utils/dataRange.js

16
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
})
}
}

Loading…
Cancel
Save