|
|
@ -48,7 +48,7 @@ const Control = (props) => { |
|
|
|
const [videoBI, setVideoBI] = useState([]); //查询BI分析数据-视频 |
|
|
|
const [appBI, setAppBI] = useState([]); //查询BI分析数据-应用 |
|
|
|
const [efficiencyBI, setEfficiencyBI] = useState({}); //查询BI分析数据-问题处置 |
|
|
|
const [query, setQuery] = useState({ limit: 10, page: 0, projectCorrelationId: '', types: '1,2,3,4' }); //最新动态 |
|
|
|
const [query, setQuery] = useState({ limit: 10, page: 0, projectCorrelationId: '', types: '1' }); //最新动态 |
|
|
|
const [querydata1, setQueryData1] = useState([]); //最新动态数据 |
|
|
|
const [long, setLong] = useState(''); //最新动态设置 |
|
|
|
const [pomsList, setPomsList] = useState([]); //项目 |
|
|
@ -61,7 +61,6 @@ const Control = (props) => { |
|
|
|
const exhibition = useRef({ workbench: [], statistical: [] }) //页面结构 |
|
|
|
const FormApi = useRef() |
|
|
|
const querydata = useRef([])//最新动态数据 |
|
|
|
// const query={ limit: 10, page: 0, projectCorrelationId: '', types: '1,2,3,4' } //最新动态 |
|
|
|
|
|
|
|
// websocket 使用测试 |
|
|
|
useEffect(() => { |
|
|
@ -130,7 +129,6 @@ const Control = (props) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
concentration1() |
|
|
|
|
|
|
|
}, [pepProjectId]) |
|
|
|
|
|
|
|
|
|
|
@ -211,14 +209,16 @@ const Control = (props) => { |
|
|
|
concentration4() |
|
|
|
}, [projectId]) |
|
|
|
|
|
|
|
// console.log(exhibition?.current?.dynamic); |
|
|
|
useEffect(() => { |
|
|
|
//查询最新动态 |
|
|
|
async function concentration3 () { |
|
|
|
if (exhibition?.current?.dynamic?.length > 0) { |
|
|
|
// console.log(query?.page); |
|
|
|
await dispatch(control.getLatestDynamic({ ...query, projectCorrelationId: pepProjectId })).then(res => { |
|
|
|
// console.log(res.payload.data); |
|
|
|
let type = [] |
|
|
|
if (exhibition?.current?.dynamic?.find(v => v.key == 'discovery')) type.push(1) |
|
|
|
if (exhibition?.current?.dynamic?.find(v => v.key == 'confirm')) type.push(4) |
|
|
|
if (exhibition?.current?.dynamic?.find(v => v.key == 'notice')) type.push(2) |
|
|
|
setQuery({ ...query, page: 0 }) |
|
|
|
await dispatch(control.getLatestDynamic({ ...query, projectCorrelationId: pepProjectId, page: 0, types: type.join(','), })).then(res => { |
|
|
|
if (res.payload.data?.appear?.length || 0 + res.payload.data?.confirm?.length + res.payload.data?.notice?.length < 10) setASk(false) |
|
|
|
let data = [] |
|
|
|
if (res.success) { |
|
|
@ -278,14 +278,10 @@ const Control = (props) => { |
|
|
|
const news = document.getElementById("news") |
|
|
|
if (line && news) { |
|
|
|
news.onscroll = () => { |
|
|
|
// console.log(line.clientHeight) |
|
|
|
// console.log(news.clientHeight) |
|
|
|
// console.log(news.scrollTop) |
|
|
|
if ((line.clientHeight - 578) < news.scrollTop + 10) { |
|
|
|
setQuery({ ...query, page: query.page + 1 }) |
|
|
|
if (exhibition?.current?.dynamic?.length > 0) { |
|
|
|
dispatch(control.getLatestDynamic({ ...query, projectCorrelationId: pepProjectId, page: query.page + 1 })).then(res => { |
|
|
|
// console.log(res.payload.data) |
|
|
|
news.scrollTop = news.scrollTop - 640 |
|
|
|
let data = querydata.current |
|
|
|
if (res.success) { |
|
|
@ -330,7 +326,6 @@ const Control = (props) => { |
|
|
|
return -1 |
|
|
|
} |
|
|
|
}) |
|
|
|
// console.log(data) |
|
|
|
querydata.current = data |
|
|
|
setQueryData1(data) |
|
|
|
} |
|
|
|