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