Browse Source

巡检查询修改

dev
wenlele 3 years ago
parent
commit
b99e9ae574
  1. 4
      api/app/lib/controllers/alarm/app.js
  2. 8
      web/client/src/sections/problem/components/inspection.jsx

4
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)
}

8
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,
};
}

Loading…
Cancel
Save