From faec3b4ba5c49ed0edcbe1dd4914345be2efc8f0 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 6 May 2026 17:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=97=E4=B8=93=E5=8C=BA-=E5=BC=80?= =?UTF-8?q?=E6=BA=90=E9=A1=B9=E7=9B=AE=E9=A6=96=E9=A1=B5=E6=94=B9=E7=89=88?= =?UTF-8?q?+=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Information/Component/addProjects.jsx | 4 +- .../project/cateList/CategorySection.jsx | 21 +++-- .../Pages/project/cateList/index.jsx | 85 +++++++++++++++++-- .../Pages/project/cateList/index.scss | 21 +++++ .../Pages/project/projectCateConfig.js | 8 +- src/forge/Information/Pages/selfList.jsx | 19 +++-- src/forge/Information/fetch.js | 2 +- src/forge/Information/index.scss | 34 ++++++++ 8 files changed, 161 insertions(+), 33 deletions(-) diff --git a/src/forge/Information/Component/addProjects.jsx b/src/forge/Information/Component/addProjects.jsx index 12e6f2b11..a20ce90f3 100644 --- a/src/forge/Information/Component/addProjects.jsx +++ b/src/forge/Information/Component/addProjects.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Modal , Table , Input , Button , Select , message , Popconfirm } from 'antd'; import { getManageProjects , getMemberProjectList , addProjects , addMemberProject , removeProject } from '../api'; const { Option } = Select; -function AddProjects({id,visible,typeList,role,onCancel,onFresh}){ +function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){ const [ dataSource , setDataSource ]= useState([]); const [ searchValue , setSearchValue ] = useState(null); const [ page ,setPage ] = useState(1); @@ -110,7 +110,7 @@ function AddProjects({id,visible,typeList,role,onCancel,onFresh}){ } const res = response.data; if(res && res.code === 200){ - message.success("操作成功"); + message.success(needAudit === 1 ? "操作成功,请等待管理员审核" : "操作成功!"); Init(page,searchValue); onFresh(); }else{ diff --git a/src/forge/Information/Pages/project/cateList/CategorySection.jsx b/src/forge/Information/Pages/project/cateList/CategorySection.jsx index db39b62d3..d1c3be9c0 100644 --- a/src/forge/Information/Pages/project/cateList/CategorySection.jsx +++ b/src/forge/Information/Pages/project/cateList/CategorySection.jsx @@ -10,7 +10,6 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { const cateConfig = projectCateConfig.getCateName(category.name, index); const projects = category.homepageProjects - // 根据分类索引决定布局类型 const getLayoutType = (index) => { const layouts = [ @@ -24,16 +23,15 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { return layouts[index] || 'layout-3'; }; + const layoutType = getLayoutType(index); // 渲染项目卡片 const renderProjects = (showBtn,range) => { - console.log("-------------",category.name,showBtn, range && range[0]); if (!projects || projects.length === 0) { return ; } return projects.map((item, pIndex)=>{ - console.log(category.name,pIndex,range && pIndex === range[0]); return( (!range || (range && pIndex >= range[0] && pIndex < range[1])) ?
@@ -79,7 +77,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {layoutType === 'layout-1' && (
-
+
{nsccTitle(category.name, 0.3, "pt30")}
{cateConfig.description}
@@ -99,8 +97,8 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {layoutType === 'layout-2' && (
{nsccTitle(category.name, 0.3, "pt80 center")} -
{cateConfig.description}
-
+
{cateConfig.description}
+
天文及固体地球物理研究
{["天文地球物理是超算重要应用,研究宇宙及地球深部问题", "研究多尺度耦合,数据量大,向计算驱动转型", "超算助力科研模拟,支撑基础研究与灾害预警"].map((point, pIndex) => ( @@ -123,7 +121,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {layoutType === 'layout-3' && (
{parter_title()} -
+
{renderProjects(true)}
@@ -132,7 +130,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { )} { layoutType ==="layout-4" &&
{parter_title()} -
+
{renderProjects(true,[0,1])}
{renderProjects(false,[1,5])} @@ -142,7 +140,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { { layoutType ==="layout-5" &&
{parter_title()} -
+
@@ -157,9 +155,10 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {nsccTitle(category.name, 0.3)}
{cateConfig.description}
- 查看更多 + 查看更多 + {/* 查看更多 */}
-
+
{renderProjects(false)}
diff --git a/src/forge/Information/Pages/project/cateList/index.jsx b/src/forge/Information/Pages/project/cateList/index.jsx index e6ef98008..1a7a9dcd5 100644 --- a/src/forge/Information/Pages/project/cateList/index.jsx +++ b/src/forge/Information/Pages/project/cateList/index.jsx @@ -12,12 +12,84 @@ import GlowButton, { FlowBorderButton } from '../../../../../components/button'; import AddProjects from '../../../Component/addProjects'; function ProjectCateList(props) { - const { id, role } = props; + const { id, role , data } = props; const [ typeList, setTypeList ] = useState(undefined); const [ statistics, setStatistics ] = useState(undefined); const [ loading, setLoading ] = useState(false); const [ categoryProjects, setCategoryProjects ] = useState({}); const [ visible ,setVisible ] =useState(false); + + useEffect(()=>{ + if(role && typeList){ + setTimeout(()=>{InitObs();InitScaleObs();},200) + setTimeout(()=>{InitContentObs();},1000) + } + },[role,typeList]) + + // 滚动监听元素(放大)位置增加动态效果 + function InitScaleObs(){ + const eles = document.getElementsByClassName("needScale"); + const observer = new IntersectionObserver((entries) => { + const entry = entries[0]; + // 如果元素进入视口 + let name = entries[0].target.className; + if (entry.isIntersecting) { + entries[0].target.className = name + ` fadeScale`; + }else{ + entries[0].target.className = name.replaceAll(" fadeScale",""); + } + }, { + threshold: 0.3 //露出 30% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;i { + const entry = entries[0]; + // 如果元素进入视口 + let name = entries[0].target.className; + if (entry.isIntersecting) { + entries[0].target.className = name + ` fadeUp`; + }else{ + entries[0].target.className = name.replaceAll(" fadeUp",""); + } + }, { + threshold: 0.3 //露出 30% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;i { + const entry = entries[0]; + // 如果元素进入视口 + let name = entries[0].target.className; + if (entry.isIntersecting) { + entries[0].target.className = name + ` fadeInChar`; + }else{ + entries[0].target.className = name.replaceAll(" fadeInChar",""); + } + }, { + threshold: 0.1 //露出 30% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;i
+ const nsccTitle = (title, delay=0.1, classname)=>
{title.split("").map((char, index) => ( {char} @@ -106,12 +179,12 @@ function ProjectCateList(props) { return (
- setVisible(false)} role={role && role.role} onFresh={()=>{getTypeList();}}/> + setVisible(false)} role={role && role.role} onFresh={()=>{getTypeList();}}/> {/* 数据统计部分 */}
{nsccTitle("数聚开源力量,实时见证开源生态的每一次进化", 0.1, "center pt80")}
-
+
{statsData.map((stat, index) => (
@@ -122,11 +195,9 @@ function ProjectCateList(props) {
))}
- {role && role.role !== "None" &&
+ {role && role.role !== "None" &&
{role.role === "Member" ? "我的项目" : "管理项目" } { - console.log("3333333333"); - setVisible(true); e.stopPropagation(); }}>添加项目 diff --git a/src/forge/Information/Pages/project/cateList/index.scss b/src/forge/Information/Pages/project/cateList/index.scss index 6af26ac9e..a4ab7fe04 100644 --- a/src/forge/Information/Pages/project/cateList/index.scss +++ b/src/forge/Information/Pages/project/cateList/index.scss @@ -288,9 +288,30 @@ background-size: 100% 100%; padding:0 60px; height: 182px; + border-radius:15px 15px 0 0 ; .toolCateFlex{ flex: 1; } + .submit-project-btn { + display: inline-flex; + justify-content: center; + width: 160px; + height: 44px; + line-height: 44px; + text-align: center; + background-color: #091221; + color:#fff; + border-radius: 8px; + font-size: 15px; + text-decoration: none; + transition: all 0.3s ease; + + &:hover { + .iconfont { + animation: arrow-move 1.2s ease-in-out infinite; + } + } + } } .cate_project_list_box{ padding:40px 50px; diff --git a/src/forge/Information/Pages/project/projectCateConfig.js b/src/forge/Information/Pages/project/projectCateConfig.js index 8ffa5d1c0..deb724da7 100644 --- a/src/forge/Information/Pages/project/projectCateConfig.js +++ b/src/forge/Information/Pages/project/projectCateConfig.js @@ -45,16 +45,16 @@ export const projectCateConfig = { description: "天文地球物理依托高性能计算,助力科研与灾害预警" }, "工业设计制造": { - description: "工业设计制造是高性能计算的核心应用领域之一,广泛涵盖计算流体力学(CFD)、计算固体力学、高频电磁仿真…" + description: "工业设计制造依托超算,赋能高端装备研发与制造业转型" }, "新能源新材料": { - description: "新能源新材料行业以材料微观结构与宏观性能之间的关系为核心研究对象,依托高性能计算与先进算法,实现材料从…" + description: "新能源新材料借超算实现数字化研发,助力技术突破与材料国产化" }, "生物医药健康": { - description: "生物医药健康是高性能计算与人工智能深度融合的核心应用领域之一,涵盖分子模拟、药物研发、基因数据分析、蛋白质结构预测…" + description: "生物医药融合超算与 AI,助力药物研发与精准医疗保障全民健康" }, "工具": { - description: "工具类软件是高性能计算生态的核心基石,广泛涵盖编译器、并行编程框架、数学与科学计算核心库、性能分析与调优工具…" + description: "工具软件是超算生态核心,夯实算力底座,支撑高效研发应用" } }, diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 2312efd61..042661b1a 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -16,27 +16,30 @@ function SelfList(props){ const [ list , setList ] = useState(undefined); const [ page , setPage ] = useState(1); const [ total , setTotal ] = useState(0); - + const [ needAudit ,setNeedAudit ] = useState(true); const [ visible ,setVisible ] = useState(false); const [ deleId , setDeleId] = useState(undefined); const pathname = props.location.pathname; const { deptId} = props.match.params; const { id , temp , data , role } = props; - const { sectionCmsTitle, sectionResourceTitle , sectionProjectTitle } = data||{}; + const { sectionCmsTitle, sectionResourceTitle , sectionProjectTitle , docNeedAudit , resourceNeedAudit , projectNeedAudit } = data||{}; const limit = 15; useEffect(()=>{ - if(pathname){ + if(pathname && data){ if(pathname.indexOf("/source/self")>-1){ setSource("source"); + setNeedAudit(resourceNeedAudit === 1); }else if(pathname.indexOf("/news/self")>-1){ setSource("news"); + setNeedAudit(docNeedAudit === 1); }else{ setSource("projects"); + setNeedAudit(projectNeedAudit === 1); } } - },[pathname]) + },[pathname,data]) useEffect(()=>{ if(id && role){ @@ -192,10 +195,10 @@ function SelfList(props){ { source==="source"?sectionResourceTitle:source==="news"?sectionCmsTitle:sectionProjectTitle } 我的{source==="source"?"资源":source==="news"?"资讯":"项目"} -
    +
    • setStatus(1)} className={status===1?"active":""}>已发布
    • -
    • setStatus(0)} className={status===0?"active":""}>待审核
    • -
    • setStatus(2)} className={status===2?"active":""}>未通过
    • + { needAudit &&
    • setStatus(0)} className={status===0?"active":""}>待审核
    • } + { needAudit &&
    • setStatus(2)} className={status===2?"active":""}>未通过
    • }
    @@ -224,7 +227,7 @@ function SelfList(props){ {i.domainName || i.dirName} {(i.domainName || i.dirName) && | } - {i.timeAgo || moment(i.createTime).format("YYYY/MM/DD")} + {source==="projects" ? "更新于":"创建于"}{i.timeAgo || moment(i.createTime).format("YYYY/MM/DD")} {source!=="projects" && 编辑 } diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index 5cddf0d4c..36d399937 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -15,7 +15,7 @@ function beforeFetch(actionUrl){ service.interceptors.request.use(request => { let deptId = sessionStorage.getItem('deptId'); - // request.headers.Authorization = 'c2361e926a027ef8f6beeca3bc03daf905b5685e' + // request.headers.Authorization = 'baf748d0570754d3126d1a3fc29b9c456becf93f' if (deptId) { // 用于权限区分 request.headers['Dept-Id'] = deptId diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 0e95edb67..296540856 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -1956,6 +1956,15 @@ display: flex; border-radius: 4px; box-shadow:0px 0px 10px rgba(61, 85, 183, 0.1); + &.onlyFirst{ + background-color: unset; + box-shadow: unset; + justify-content: center; + >li{ + border-radius: 0px!important; + max-width: 180px; + } + } li{ flex: 1; border-right: 1px solid rgba(141, 149, 172, 0.17); @@ -2290,6 +2299,21 @@ animation: fadeInCharZone 0.5s ease-out forwards; } } +.needFadeUp{ + opacity: 0; +} +.fadeUp{ + opacity: 0; + animation-delay: .2s; + animation: fadeUpZone 0.8s ease-out forwards; +} +.needScale{ + transform: scale(.8); + transition: 1s; +} +.fadeScale{ + transform: scale(1); +} @keyframes moveArrow { 0% { @@ -2321,4 +2345,14 @@ opacity: 1; filter: blur(0); } +} +@keyframes fadeUpZone { + from { + opacity: 0; + transform: translateY(50px); + } + to { + opacity: 1; + transform: translateY(0px); + } } \ No newline at end of file