diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index b15521b..43d73fc 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/api/app/lib/controllers/alarm/app.js @@ -36,12 +36,12 @@ async function inspectionList (ctx) { const models = ctx.fs.dc.models; const { clickHouse } = ctx.app.fs const { utils: { anxinStrucIdRange, pomsProjectRange } } = ctx.app.fs - const { timeStart, timeEnd, projectId, appId, noted } = ctx.query + const { pepProjectId, timeStart, timeEnd, projectId, appId, noted } = ctx.query let pomsProjectIds = null if (!projectId && !appId) { let pomsProject = await pomsProjectRange({ - ctx, + ctx, pepProjectId }) pomsProjectIds = pomsProject.map(p => p.id) } diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index ebf354d..02eedf5 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -11,7 +11,7 @@ import { log } from "ezuikit-js"; let projectScrollbar; let timer -const Inspection = ({ dispatch, actions, user, route, statistic }) => { +const Inspection = ({ dispatch, actions, user, route, statistic, pepProjectId }) => { const { problem } = actions const [selectProject, setSelectProject] = useState([]) //所选项目 const [applyFilter, setApplyFilter] = useState([]) //应用筛选 @@ -66,14 +66,14 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { dispatch(problem.getAlarmLnspection({ timeStart: moment().day(moment().day() - 1).startOf('day').format('YYYY-MM-DD HH:mm:ss'), timeEnd: moment().endOf('day').format('YYYY-MM-DD HH:mm:ss') - , ...checkPatrol + , ...checkPatrol, pepProjectId: pepProjectId })).then((res) => { if (res.success) { setPatrolAbnormal(res.payload.data) setNotRead(res.payload.data.filter(v => !v.notedTime).length) } }) - }, [checkPatrol]) + }, [checkPatrol, pepProjectId]) useEffect(() => { @@ -334,7 +334,7 @@ function mapStateToProps (state) { return { user: auth.user, actions: global.actions, - // global: global, + pepProjectId: global.pepProjectId, // members: members.data, }; }