Browse Source

巡检查询修改

dev
wenlele 2 years ago
parent
commit
b78cdcdd3c
  1. 12
      web/client/src/sections/problem/components/inspection.jsx

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

Loading…
Cancel
Save