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()