From 0ebb9582b285eb126dc0975f4c8057cfeb700049 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 27 Sep 2022 13:46:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=8C=83=E5=9B=B4=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/utils/dataRange.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/app/lib/utils/dataRange.js b/api/app/lib/utils/dataRange.js index 802e18f..02eb797 100644 --- a/api/app/lib/utils/dataRange.js +++ b/api/app/lib/utils/dataRange.js @@ -39,8 +39,12 @@ module.exports = function (app, opts) { const bindRes = await models.ProjectCorrelation.findAll(findOption) // 获取不重复的 安心云项目id - let pepProjectIds = bindRes.map(b => b.pepProjectId) - + let pepProjectIds = [] + for (let b of bindRes) { + if (b.pepProjectId) { + pepProjectIds.push(b.pepProjectId) + } + } // 查询项企项目的信息 let pepProjectWhereOptions = [] if (keywordTarget == 'pepProject' && keyword) {