From 0ac20c71096f6b54c49efbfdfb25006c2e43845b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 6 Jun 2023 09:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=AF=BC=E5=B8=88=E6=8A=A5?= =?UTF-8?q?=E5=90=8D=E9=80=9A=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/index.jsx | 36 ++++++++++++++++++++++++------------ src/glcc/project/index.jsx | 5 +---- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index cf616cf48..894f9e9df 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -86,6 +86,8 @@ const Glcc = (propsF) => { const [glccSettings, setGLccSetting] = useState(undefined); // 是否展示项目、课题列表入口 const [repoPublic, setRepoPublic] = useState(false); + // 是否处于项目/课题补录阶段 + const [applyRepo, setApplyRepo] = useState(false); useEffect(()=>{ if(id && id === "2022"){ @@ -101,8 +103,11 @@ const Glcc = (propsF) => { // 判断是否展示项目、课题 const publicRepoTask = res.data.filter(item=>item.name === "repoPublic"); publicRepoTask[0] && setRepoPublic(judge(nowTime, publicRepoTask[0].value, "range")) - // 过滤掉 项目课题公示时间 - const filterRepoPublic = res.data.filter(item=>item.name !== "repoPublic"); + // 是否处于项目/课题补录阶段 + const repoApply1 = res.data.filter(item=>item.name === "repoApply1"); + repoApply1[0] && setApplyRepo(judge(nowTime, repoApply1[0].value, "range")) + // 过滤掉 项目课题公示时间、项目/课题补录 + const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1"].indexOf(item.name) === -1); const periodIndex = filterRepoPublic.findIndex(item=>judge(nowTime, item.value, "range")); periodIndex !== -1 && setPeriod(filterRepoPublic[periodIndex].name); } @@ -188,12 +193,12 @@ const Glcc = (propsF) => {