From b78cdcdd3cd30a87b63049fac0561da10c65898a Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 14 Oct 2022 09:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E6=9F=A5=E8=AF=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/problem/components/inspection.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index 02eedf5..d2c8b24 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -26,22 +26,24 @@ const Inspection = ({ dispatch, actions, user, route, statistic, pepProjectId }) const api = useRef(); const unfoldApi = useRef(false); - +console.log(pepProjectId); useEffect(() => { - dispatch(problem.getProjectPoms()).then((res) => { + dispatch(problem.getProjectPoms({ global: 1 })).then((res) => { if (res.success) { let project = [] let apply = [] res.payload.data?.rows?.map(v => { - project.push({ name: v.pepProjectName || v.name || v.id, value: v.id }) - v.apps.map(app => apply.push({ name: app.name, value: app.id })) + if (!pepProjectId || v.pepProjectId == pepProjectId) { + project.push({ name: v.pepProjectName || v.name || v.id, value: v.id }) + v.apps.map(app => apply.push({ name: app.name, value: app.id })) + } }) setSelectProject(project) setApplyFilter(apply) } }) - }, []) + }, [pepProjectId]) useEffect(() => { if (projectScrollbar) projectScrollbar.destroy()