diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index 4717ce06..68aa8e7d 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -107,7 +107,7 @@ export default (props) => {
- 活动特邀合作单位 openMMlab + 活动特邀合作单位 OpenMMlab
diff --git a/src/glcc/openmmlab/sliderLeft/index.jsx b/src/glcc/openmmlab/sliderLeft/index.jsx index 608dbd5f..b3d13bf4 100644 --- a/src/glcc/openmmlab/sliderLeft/index.jsx +++ b/src/glcc/openmmlab/sliderLeft/index.jsx @@ -14,12 +14,12 @@ const arithmeticArr = [ name: "MMPose算法演示", describe: "MMPose 是 OpenMMLab 中的姿态估计算法库,目前已经支持了近 30 个算法和 300+ 预训练模型,涵盖了人体、人脸、人手、动物等多类目标的姿态估计。秉承 OpenMMLab 系列的结构化框架设计,MMPose 很适合作为算法复现和创新的平台", // source: 'https://www.gitlink.org.cn/preview/d2d62f65d08a22bcc257c5a24cf750fa_1654781749389.mp4', - source: 'https://www.gitlink.org.cn/api/attachments/387956.mp4', + source: 'https://www.gitlink.org.cn/api/attachments/388257.mp4', type: 'mp4', - img: 'https://www.gitlink.org.cn/api/attachments/388006' + img: 'https://www.gitlink.org.cn/api/attachments/388256' }, { - name: "MMMOCR算法演示", + name: "MMOCR算法演示", describe: "MMOCR 作为 OpenMMLab 家族的一员,支持众多 OCR 相关的模型,涵盖了文本检测、文本识别以及关键信息提取等多个主要方向。通过在 MMOCR 中复现相关算法,你将可以了解到 OCR 领域的前沿知识,熟练掌握 MM 系列框架的整体流程,并积累深度学习相关的学术及工程经验", source: 'https://www.gitlink.org.cn/api/attachments/388005', type: 'img', @@ -51,7 +51,7 @@ const arithmeticArr = [ { name: "MMFlow算法演示", describe: "MMFlow是一款基于 PyTorch 和 MMCV 的光流估计开源工具箱,提供了多个 SOTA 光流估计算法,并支持光流领域主流学术数据集,以及光流可视化和评估方法", - source: 'https://www.gitlink.org.cn/api/attachments/387954', + source: 'https://www.gitlink.org.cn/api/attachments/388258', type: 'img', }, { diff --git a/src/glcc/openmmlab/sliderRight/index.jsx b/src/glcc/openmmlab/sliderRight/index.jsx index 6f78cc4b..fd9a817e 100644 --- a/src/glcc/openmmlab/sliderRight/index.jsx +++ b/src/glcc/openmmlab/sliderRight/index.jsx @@ -25,7 +25,7 @@ function SliderLeft({list,history}) { // pathname:'/glcc/projects', // state:{projectName:projectName.replace(/ /g,'-')} // }) - window.open(`/glcc/projects?projectName=${projectName}`); + window.open(`/glcc/projects?projectName=${projectName.replace(/ /g,'')}`); } return ( diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index a326a93f..9e54f84f 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -39,6 +39,12 @@ function Project(propsF) {
+ ( + + )} + > ( diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index d2f9053e..f9c141bb 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -33,6 +33,7 @@ .listBox{ background-image:linear-gradient(180deg,#ebf2ff 0%,#ebf2ff 43.09%,#f3f4f8 100%); position: relative; + // min-height: 1200px; .list{ width: 1200px; margin: 0 auto; diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index 13134d32..a9aa48b8 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -1,4 +1,4 @@ -import React , { useEffect , useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { Input, Popover, Spin } from 'antd'; import { main_site_url } from '../../fetch'; import './index.scss'; @@ -6,48 +6,94 @@ import { projectList } from '../../api'; import ProjectDetail from '../component/projectDetail'; import bgPng from "../../img/bgPng.png"; import logo from "../../img/logo.png"; -const {Search} = Input; +const { Search } = Input; // 项目列表 -function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, location,history}) { - let openmmlab =location.search&&location.search.split('=')[1]; +function ProjectList({ applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, location, history, match }) { + let gitlinkLastUrl = match.params.gitlinkLastUrl && match.params.gitlinkLastUrl.replace(/\./g, ''); + let openmmlab = location.search && location.search.split('=')[1]; // 输入搜索框 - const [keyword, setKeyword] = useState(openmmlab?'openmmlab':undefined); + const [keyword, setKeyword] = useState(openmmlab ? 'openmmlab' : undefined); const [data, setData] = useState([]); const [loading, setLoading] = useState(false); - useEffect(()=>{ + useEffect(() => { setLoading(true); const params = { curPage: 1, keyword, pageSize: 10000 } - projectList(params).then(response=>{ - if(response && response.message === "success"){ - setData(response.data.rows); - openmmlab&&setTimeout(()=>{ - let openProject=document.querySelector(`.${openmmlab}`); - openProject.click(); - let height=document.documentElement.clientWidth/1920*500+71+70+100+openProject.offsetTop; - window.scrollTo(0, height); - },100) + projectList(params).then(response => { + if (response && response.message === "success") { + let dataArr = response.data.rows; + dataArr.forEach(i => { + let urlArr = i.gitlinkUrl.split('/'); + i.gitlinkLastUrl = urlArr.pop() || urlArr.pop(); + i.gitlinkLastUrl = i.gitlinkLastUrl.replace(/\./g, ''); + }); + if (gitlinkLastUrl) { + let thisProjectArr = dataArr.filter(item => { return item.gitlinkLastUrl == gitlinkLastUrl }) + setData(thisProjectArr); + setTimeout(() => { + let openProject = document.querySelector(`.${gitlinkLastUrl}`); + if (openProject) { + openProject.click(); + let height = document.documentElement.clientWidth / 1920 * 500 + 71 + 70 + openProject.offsetTop; + if (thisProjectArr.length) { + document.querySelector('#taskList').style.height = (468 + thisProjectArr[0].registrationTaskList.length * 330 + 'px'); + } + window.scrollTo(0, height); + } + }, 100) + } else { + setData(response.data.rows); + } + openmmlab && setTimeout(() => { + let openProject = document.querySelector(`.${openmmlab}`); + if(openProject){ + openProject.click(); + let height = document.documentElement.clientWidth / 1920 * 500 + 71 + 70 + 100 + openProject.offsetTop; + window.scrollTo(0, height); + } + }, 100) } setLoading(false); }) - },[keyword]) + }, [keyword]) - return( -
+ function changeVisible(visible, item) { + if (visible) { + let height = document.documentElement.clientWidth / 1920 * 500 + 70 + document.querySelector(`.${item.gitlinkLastUrl}`).offsetTop + item.registrationTaskList.length*320; + document.querySelector('#taskList').style.height = height + 'px'; + }else{ + document.querySelector('#taskList').style.height = 'auto'; + } + } + + return ( +
-
{setKeyword(value)}}/>
+ {!gitlinkLastUrl &&
{ setKeyword(value) }} />
}
- {data && data.map((item, index)=>{ - return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false}> -
+ {data && data.map((item, index) => { + return { changeVisible(visible, item) }} + key={index} + placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'} + content={} + trigger='click' + overlayClassName='projectItemPopover' + autoAdjustOverflow={false} + > +
-
+
{item.projectName}
{item.projectIntro}
@@ -56,8 +102,8 @@ function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApply
- - + +
) }