Merge remote-tracking branch 'upstream/gitlink_server' into cs_news
This commit is contained in:
commit
ffe559c7ff
|
|
@ -45,8 +45,7 @@ export function studentApplyEdit(data) {
|
|||
});
|
||||
}
|
||||
|
||||
// 获取当前学生用户报名信息
|
||||
// 课题列表
|
||||
// 项目列表
|
||||
export function projectList(params) {
|
||||
return fetch({
|
||||
url: `/api/applyInformation/list`,
|
||||
|
|
@ -55,6 +54,15 @@ export function projectList(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 0元项目列表
|
||||
export function freeProjectList(params) {
|
||||
return fetch({
|
||||
url: `/api/applyInformation/projectListFor0`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 课题列表
|
||||
export function taskList(params) {
|
||||
return fetch({
|
||||
|
|
@ -64,6 +72,15 @@ export function taskList(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 0元课题列表
|
||||
export function freeTaskList(params) {
|
||||
return fetch({
|
||||
url: `/api/applyInformation/taskListFor0`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 项目id查询项目详情
|
||||
export function getProjectById(id, params) {
|
||||
return fetch({
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import React, { useEffect, useState } from 'react';
|
|||
import { Input, Table, Tooltip } from 'antd';
|
||||
import { getPassList, hasAuditRole } from '../api';
|
||||
import ProjectDetail from '../project/component/projectDetail';
|
||||
// 预公示banner
|
||||
import resultBanner from "../img/resultBanner.png";
|
||||
// 公示banner
|
||||
import resultBanner2 from "../img/resultBanner2.png";
|
||||
import bgPng from "../img/bgPng.png";
|
||||
|
|
@ -12,7 +10,7 @@ import '../project/index.scss';
|
|||
const { Search } = Input;
|
||||
|
||||
// 课题列表
|
||||
function CheckResult({current_user, history}) {
|
||||
function CheckResult({current_user, history, round}) {
|
||||
// 输入搜索框
|
||||
const [keyword, setKeyword] = useState(undefined);
|
||||
const [data, setData] = useState([]);
|
||||
|
|
@ -22,7 +20,6 @@ function CheckResult({current_user, history}) {
|
|||
const [pageSize, setPageSize] = useState(20);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
|
||||
const time = new Date().getTime() > new Date('2022/06/28 1:0').getTime() && new Date().getTime() < new Date('2022/07/01 0:0').getTime();
|
||||
|
||||
useEffect(()=>{
|
||||
// 未到时间
|
||||
|
|
@ -44,6 +41,7 @@ function CheckResult({current_user, history}) {
|
|||
curPage: current,
|
||||
keyword,
|
||||
pageSize,
|
||||
round
|
||||
}
|
||||
getPassList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
|
|
@ -58,9 +56,9 @@ function CheckResult({current_user, history}) {
|
|||
{ title: '序号', dataIndex: 'index', align: 'center', className:"columnsResult", width: '6%', render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
{ title: '入选学生', dataIndex: 'studentName', className:"columnsResult taskName", width: '10%', ellipsis: true},
|
||||
{ title: '学生院校', dataIndex: 'school', className:"columnsResult taskName", width: '12%', ellipsis: true,render: (text) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan'>{text}</span></Tooltip>},
|
||||
{ title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan'>{text}</span></Tooltip>},
|
||||
{ title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan'>{text || '-'}</span></Tooltip>},
|
||||
{ title: '课题导师', dataIndex: 'tutorName', className:"columnsResult", width: '10%', ellipsis: true},
|
||||
{ title: '课题名称', dataIndex: 'taskName', className:"columnsResult", width: '20%', ellipsis: true, render: (text, item) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan link' onClick={()=>{window.open(`/glcc/subjects/detail/${item.taskId}`)}}>{text}</span></Tooltip> },
|
||||
{ title: '课题名称', dataIndex: 'taskName', className:"columnsResult", width: '20%', ellipsis: true, render: (text, item) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan link' onClick={()=>{window.open(`/glcc/2023/subjects/detail/${item.taskId}`)}}>{text}</span></Tooltip> },
|
||||
{ title: '项目名称', dataIndex: 'projectName', className:"columnsResult", ellipsis: true, width: '14%', render: (text) => <Tooltip title={text} placement="topLeft"><span className='toolTipSpan'>{text}</span></Tooltip> },
|
||||
{ title: '操作', dataIndex: 'action', align: 'center', className:"columnsResult actionBox"},
|
||||
]
|
||||
|
|
@ -107,11 +105,10 @@ function CheckResult({current_user, history}) {
|
|||
|
||||
return (
|
||||
<div className="resultListBox">
|
||||
{time && <img className="resultBanner" src={resultBanner} alt=""></img>}
|
||||
{new Date().getTime() > new Date('2022/07/01 12:0').getTime() && <img className="resultBanner" src={resultBanner2} alt=""></img>}
|
||||
<img className="resultBanner" src={resultBanner2} alt=""></img>
|
||||
<div className='bgBox'>
|
||||
<div className="resultList">
|
||||
<div className='goBackBox'><a href='/glcc'>开源夏令营 / </a>入选学生名单{time && '预'}公示</div>
|
||||
<div className='goBackBox'><a href='/glcc'>开源夏令营 / </a>入选学生名单公示</div>
|
||||
<Search className='search' placeholder='请输入学生姓名或课题名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
|
||||
<Table
|
||||
loading={loading}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
import React, { useState } from 'react';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import Nodata from '../../../forge/Nodata';
|
||||
import { useEffect } from 'react';
|
||||
import { getProjectById } from '../../api';
|
||||
|
||||
export default ({ detail, projectId }) => {
|
||||
const [info, setInfo] = useState(detail);
|
||||
|
||||
useEffect(()=>{
|
||||
if(!detail && projectId){
|
||||
// 通过项目Id查询项目详情
|
||||
getProjectById(projectId, {round: 2, isFree: true}).then(response=>{
|
||||
if(response && response.message === 'success'){
|
||||
setInfo(response.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
},[detail])
|
||||
|
||||
return (
|
||||
info ? <div className={`projectDetailBox ${detail ? '':'byTask'}`}>
|
||||
<div className={`projectDetailHead`}>
|
||||
<span className='name'>{info.projectName}</span>
|
||||
{info.projectType && <span className='type'>{info.projectType}</span>}
|
||||
<p>GitLink项目地址: <a href={info.gitlinkUrl} className='linkUrl' target={"_blank"}>{info.gitlinkUrl}</a></p>
|
||||
<div>项目简介: {info.projectIntro}</div>
|
||||
</div>
|
||||
{/* 课题列表 */}
|
||||
{info.registrationTaskList && info.registrationTaskList.length ? info.registrationTaskList.map((item, index)=>{
|
||||
return <div className='taskItem mt20' key={index}>
|
||||
<div className="left">
|
||||
<div className="taskTitle" onClick={()=>{window.open(`/glcc/2023/subjects/detail/${item.id}`)}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
|
||||
<div className='mt20 oneLine leftWidth'>导师姓名: {item.tutorName}</div>
|
||||
{item.tutorMail && <div className='mb20 email oneLine leftWidth'>邮箱地址: <span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
|
||||
</div>
|
||||
<div className="center">
|
||||
<div className="taskDesc">{item.taskDesc}</div>
|
||||
{item.taskUrl && <div className="taskUrl oneLine">课题链接: <a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
|
||||
{/* 查看课题详情按钮 */}
|
||||
<div>
|
||||
<Button onClick={()=>{window.open(`/glcc/2023/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="right oneLine taskUrl"><span className='taskReward'>¥{item.taskReward}</span></div>
|
||||
</div>
|
||||
}) : <Nodata _html="课题暂无数据" small={true}/>}
|
||||
</div>: <div className="projectDetailBox nodata"><Nodata _html="暂无数据" small={true}/></div>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import React from 'react';
|
||||
import { Spin } from 'antd';
|
||||
import { Route, Switch } from "react-router-dom";
|
||||
import banner from "../img/studentProject2.png";
|
||||
import './index.scss';
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
// 项目列表页面
|
||||
const ProjectList = Loadable({
|
||||
loader: () => import("./projectList"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 课题列表页面
|
||||
const TaskList = Loadable({
|
||||
loader: () => import("./taskList"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
function FreeProject(propsF) {
|
||||
const {location: {pathname}} = propsF;
|
||||
useEffect(()=>{
|
||||
window.scrollTo(0, 0);
|
||||
},[])
|
||||
console.log('FreeProject');
|
||||
return(
|
||||
<div className="glcc_project">
|
||||
<div className='projectBannerBox'>
|
||||
<img className="glcc-banner" src={banner} alt=''></img>
|
||||
</div>
|
||||
<div className='head'>
|
||||
<Link to={`/glcc/freesubject`} className={!pathname.endsWith('freeproject') ? 'active' : ''}>课题列表</Link>
|
||||
<Link to={`/glcc/freeproject`} className={pathname.endsWith('freeproject') ? 'active' : ''}>项目列表</Link>
|
||||
</div>
|
||||
<div className='gobackBox'>
|
||||
<a href={`/glcc`}>开源夏令营 / </a>
|
||||
0元课题及项目列表
|
||||
</div>
|
||||
<div className="head_introduce mt30 mb30">
|
||||
<h4 className="head_tit">申请说明:</h4>
|
||||
<div className="head_content">1、参与GitLink编程夏令营0资金项目的同学,请通过邮件或电话与课题导师直接沟通并根据导师课题要求完成课题,无需在GLCC平台报名课题。</div>
|
||||
<div className="head_content">2、参与GitLink编程夏令营0资金项目的同学,如完成课题并经导师评定通过,将获得GLCC证书(1份),但无课题资金。</div>
|
||||
<div className="head_content">3、活动最终解释权归GLCC所有。</div>
|
||||
</div>
|
||||
<Spin spinning={false}>
|
||||
<Switch {...propsF}>
|
||||
<Route
|
||||
path="/glcc/freeproject"
|
||||
render={(props) => (
|
||||
<ProjectList {...propsF} {...props}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/glcc/freesubject"
|
||||
render={(props) => (
|
||||
<TaskList {...propsF} {...props}/>
|
||||
)}
|
||||
></Route>
|
||||
</Switch>
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default FreeProject;
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
.glcc_project{
|
||||
background-color: #ebf2ff;
|
||||
.head{
|
||||
background-color:rgba(188, 208, 255, 0.27);
|
||||
border:1px solid #ffffff;
|
||||
text-align: center;
|
||||
a{
|
||||
padding: 18px 20px 20px;
|
||||
display: inline-block;
|
||||
color: #273778;
|
||||
font-size: 18px;
|
||||
font-weight:700;
|
||||
line-height: 30px;
|
||||
&.active{
|
||||
border-bottom: 1px solid #5474df;;
|
||||
}
|
||||
&:last-child{
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.gobackBox{
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 25px 0 12px;
|
||||
color: #202d40;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px dashed #bec5d5;
|
||||
a{
|
||||
color:#a4aabb;
|
||||
}
|
||||
}
|
||||
.listBox{
|
||||
background-image:linear-gradient(180deg,#ebf2ff 0%,#ebf2ff 43.09%,#f3f4f8 100%);
|
||||
position: relative;
|
||||
.bgPng3, .bgPng4{
|
||||
width: 146px;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
top: 162px;
|
||||
left: 100px;
|
||||
}
|
||||
.bgPng4{
|
||||
top: 450px;
|
||||
left: auto;
|
||||
right: 310px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.glcc-banner {
|
||||
width: 100%;
|
||||
}
|
||||
// 项目详情框
|
||||
.projectDetailBox{
|
||||
&.byTask{
|
||||
background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
|
||||
border:1px solid #ffffff;
|
||||
border-radius:4px;
|
||||
box-shadow:0px 0px 10px rgba(100, 141, 255, 0.2);
|
||||
padding: 30px 30px 50px;
|
||||
.taskItem{
|
||||
.center{
|
||||
width: 640px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.nodata{width: 200px;}
|
||||
font-size:15px;
|
||||
line-height:30px;
|
||||
.projectDetailHead{
|
||||
color:#465474;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px dashed #bec5d5;
|
||||
line-height: 36px;
|
||||
&.byResult{
|
||||
margin: -15px -10px -40px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.name{
|
||||
font-weight:700;
|
||||
color:#3753c5;
|
||||
font-size:20px;
|
||||
}
|
||||
.type{
|
||||
display: inline-block;
|
||||
border:1px solid #6680bb;
|
||||
border-radius:4px;
|
||||
margin-left: 12px;
|
||||
padding: 4px 6px;
|
||||
line-height: 26px;
|
||||
}
|
||||
.linkUrl{
|
||||
color: #466aff;
|
||||
}
|
||||
}
|
||||
.taskItem {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border:1px solid #ffffff;
|
||||
&:hover{ box-shadow: 0px 0px 12px rgba(71, 105, 198, 0.4);}
|
||||
.oneLine{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.left{
|
||||
width: 316px;
|
||||
background-image: url('../img/projectDetailTaskBg.png');
|
||||
background-size: 100% 100%;
|
||||
padding: 22px 20px;
|
||||
color:#25304a;
|
||||
.taskTitle{
|
||||
cursor: pointer;
|
||||
color:#1834a7;
|
||||
font-size:18px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.email span{color:#466aff;}
|
||||
.leftWidth{width: 270px;}
|
||||
}
|
||||
.center{
|
||||
width: 665px;
|
||||
text-align: left;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.taskDesc{
|
||||
color:#6b6b6b;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.taskUrl{
|
||||
color:#465474;
|
||||
font-size:16px;
|
||||
line-height: 28px;
|
||||
margin-bottom: 5px;
|
||||
a{color:#466aff;}
|
||||
}
|
||||
.applyBut{
|
||||
background-color:#466aff;
|
||||
border-color: #466aff;
|
||||
&:hover{background-color:#5d7cff;}
|
||||
&:focus{background-color:#1140ff;}
|
||||
}
|
||||
.taskReward{color:#ff8800;}
|
||||
}
|
||||
.right{
|
||||
margin-top: 35px;
|
||||
padding-right: 10px;
|
||||
width: 120px;
|
||||
font-weight:700;
|
||||
color:#ff8800;
|
||||
font-size:24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-popover.projectItemPopover{
|
||||
width: 1200px;
|
||||
z-index: 1000;
|
||||
.ant-popover-content .ant-popover-arrow{
|
||||
border-width: 12px;
|
||||
}
|
||||
}
|
||||
.projectItemPopover .ant-popover-inner{
|
||||
transform: translateY(8px);
|
||||
background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
|
||||
border:1px solid #ffffff;
|
||||
border-radius:4px;
|
||||
box-shadow:0px 0px 10px rgba(100, 141, 255, 0.2);
|
||||
.ant-popover-inner-content{
|
||||
padding: 30px 30px 50px;
|
||||
}
|
||||
}
|
||||
.lookDetail{
|
||||
border-color: #466aff;
|
||||
color: #466aff;
|
||||
&:hover{
|
||||
border-color: #5d7cff;
|
||||
color: #5d7cff;
|
||||
}
|
||||
&:focus{
|
||||
border-color: #1140ff;
|
||||
color: #1140ff;
|
||||
}
|
||||
}
|
||||
.projectBannerBox{
|
||||
position: relative;
|
||||
.stuApplytimeBox{
|
||||
background-image: url('../img/studentProject1.png');
|
||||
position: absolute;
|
||||
color: #FFDC95;
|
||||
font-size: 20px;
|
||||
bottom: 28%;
|
||||
left: 50%;
|
||||
margin-left: -250px;
|
||||
width: 500px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.head_introduce {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background: #e4edff;
|
||||
padding: 20px;
|
||||
}
|
||||
.head_tit {
|
||||
color: #000000;
|
||||
font-size: 15px;
|
||||
line-height: 2;
|
||||
}
|
||||
.head_content {
|
||||
color: #6c7283;
|
||||
font-size: 14px;
|
||||
line-height: 38px;
|
||||
}
|
||||
.head_bold {
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Input, Popover, Spin } from 'antd';
|
||||
import { main_site_url } from '../../fetch';
|
||||
import './index.scss';
|
||||
import { freeProjectList, projectList } from '../../api';
|
||||
import ProjectDetail from '../component/projectDetail';
|
||||
import bgPng from "../../img/bgPng.png";
|
||||
import logo from "../../img/logo.png";
|
||||
import star from "../../img/star.png";
|
||||
import Nodata from '../../../forge/Nodata';
|
||||
const { Search } = Input;
|
||||
|
||||
// 项目列表
|
||||
function ProjectList() {
|
||||
const [data, setData] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
const params = {
|
||||
curPage: 1,
|
||||
pageSize: 10000,
|
||||
round: 2
|
||||
}
|
||||
freeProjectList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
setData(response.data.rows);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [])
|
||||
|
||||
// 修改taskList盒子的高度,防止弹框过高影响整体页面
|
||||
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 (
|
||||
<div id="taskList" className="taskList listBox">
|
||||
<Spin spinning={loading}>
|
||||
<div className='projectListBox'>
|
||||
{data && data.map((item, index) => {
|
||||
return <Popover
|
||||
onVisibleChange={(visible) => { changeVisible(visible, item) }}
|
||||
key={index}
|
||||
placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'}
|
||||
content={<ProjectDetail detail={item}/>}
|
||||
trigger='click'
|
||||
overlayClassName='projectItemPopover'
|
||||
autoAdjustOverflow={false}
|
||||
>
|
||||
<div className={`projectItem ${(index + 1) % 3 === 0 || (index + 1) % 3 % 2 === 0 ? '' : 'firstBox'} ${item.projectName.replace(/ /g, '')} ${item.gitlinkLastUrl}`}>
|
||||
<div className="border"></div>
|
||||
<div className="projectLogo">
|
||||
<img className="projectLogoImg" src={item.projectLogoId ? `${main_site_url}/api/attachments/${item.projectLogoId}` : logo} alt='' />
|
||||
</div>
|
||||
<div className="title">{item.projectName}</div>
|
||||
<div className="intro">{item.projectIntro}</div>
|
||||
</div>
|
||||
</Popover>
|
||||
})}
|
||||
</div>
|
||||
{data && !data.length && <div style={{paddingBottom: '50px'}}><Nodata _html="暂无数据"/></div>}
|
||||
</Spin>
|
||||
<img src={bgPng} alt='' className='bgPng3' />
|
||||
<img src={bgPng} alt='' className='bgPng4' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default ProjectList;
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
.projectListBox{
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
// justify-content: space-between;
|
||||
.projectItem{
|
||||
position: relative;
|
||||
width: 30%;
|
||||
background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%);
|
||||
border: 1px solid;
|
||||
border-color: #ffffff;
|
||||
border-radius: 4px;
|
||||
box-shadow:0px 0px 8px rgba(93, 131, 255, 0.26);
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
background-image: url('../../img/projectBg.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 5%;
|
||||
&.firstBox{
|
||||
margin-left: 0;
|
||||
}
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
// #E8EDFF—#FFFFFF(85%)
|
||||
background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%);
|
||||
}
|
||||
.border{
|
||||
height: 5px;
|
||||
background-color:#657edf;
|
||||
border-radius:2px 2px 0px 0px;
|
||||
}
|
||||
.projectLogoStar{
|
||||
position: absolute;
|
||||
top:30px;
|
||||
right: 130px;
|
||||
width: 28px;
|
||||
z-index: 10;
|
||||
transform: rotate(46deg);
|
||||
}
|
||||
.projectLogo{
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid #fff;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
margin: 25px auto 10px;
|
||||
line-height: 95px;
|
||||
.projectLogoImg{
|
||||
width: 100%;
|
||||
// height: 100%;
|
||||
// display: block;
|
||||
}
|
||||
|
||||
}
|
||||
.title{
|
||||
color:#2a51bf;
|
||||
font-size:17px;
|
||||
line-height:30px;
|
||||
margin-bottom: 15px;
|
||||
padding: 0 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.intro{
|
||||
color:#4f5d84;
|
||||
font-size:15px;
|
||||
margin-bottom: 15px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
text-align: left;
|
||||
padding: 0 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Table, Tooltip } from 'antd';
|
||||
import './index.scss';
|
||||
import { freeTaskList, taskList } from '../../api';
|
||||
import ProjectDetail from '../component/projectDetail';
|
||||
import bgPng from "../../img/bgPng.png";
|
||||
|
||||
// 课题列表
|
||||
function TaskList() {
|
||||
const [data, setData] = useState([]);
|
||||
// table
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [pageSize, setPageSize] = useState(20);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
|
||||
|
||||
const columns = [
|
||||
{ title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
{ title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => <Tooltip title={text} placement="topLeft"><span onClick={()=>{window.open(`/glcc/2023/subjects/detail/${item.id}`)}}>{text}</span></Tooltip> },
|
||||
{ title: '课题类型', dataIndex: 'projectType', className:"taskTableColumns", width: '12%', ellipsis: true, },
|
||||
{ title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '24%', ellipsis: true, render: (text) => <Tooltip title={text} placement="topLeft">{text}</Tooltip> },
|
||||
{ title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => <Tooltip title={text} placement="topLeft"><span>{text}</span></Tooltip> },
|
||||
{ title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns"},
|
||||
]
|
||||
|
||||
const customExpandIcon = (props) => {
|
||||
if (props.expanded) {
|
||||
return <a className='actionBox' style={{marginRight: 8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>项目详情<i className="iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12 ml5 down mr10"></i></a>
|
||||
} else {
|
||||
return <a className='actionBox' style={{marginRight: 8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>项目详情<i className="iconfont icon-jiantou9 font-12 ml5 down mr10"></i></a>
|
||||
}
|
||||
}
|
||||
|
||||
const expandRow = (record) => {
|
||||
return <ProjectDetail detail={null} projectId={record.regId}/>
|
||||
}
|
||||
|
||||
// 展开收起行回调
|
||||
function onExpand(expanded, record){
|
||||
const keys = new Set(expandedRowKeys);
|
||||
if(expanded){
|
||||
keys.add(record.id);
|
||||
}else{
|
||||
keys.delete(record.id);
|
||||
}
|
||||
setExpandedRowKeys(Array.from(keys));
|
||||
}
|
||||
|
||||
// 改变pagesize
|
||||
function onShowSizeChange(current, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
setCurrent(1);
|
||||
setPageSize(pageSize);
|
||||
}
|
||||
|
||||
// 切换页数
|
||||
function changePage(page, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
setCurrent(page);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setExpandedRowKeys([]);
|
||||
setLoading(true);
|
||||
const params = {
|
||||
curPage: current,
|
||||
pageSize,
|
||||
round: 2
|
||||
}
|
||||
freeTaskList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
setData(response.data.rows);
|
||||
setTotal(response.data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [current, pageSize])
|
||||
|
||||
return (
|
||||
<div className="taskList listBox">
|
||||
<div className="listTable">
|
||||
<Table
|
||||
loading={loading}
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
expandedRowRender={expandRow}
|
||||
expandIconColumnIndex={5}
|
||||
expandIconAsCell={false}
|
||||
expandIcon={customExpandIcon}
|
||||
rowKey={'id'}
|
||||
expandedRowKeys={expandedRowKeys}
|
||||
onExpand={onExpand}
|
||||
pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}}
|
||||
/>
|
||||
</div>
|
||||
<img src={bgPng} alt='' className='bgPng3'/>
|
||||
<img src={bgPng} alt='' className='bgPng4'/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default TaskList;
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
.taskList{
|
||||
padding-bottom: 50px;
|
||||
.ant-table{
|
||||
border: 1px solid white;
|
||||
}
|
||||
.ant-pagination-item-active, .ant-pagination-item:hover, .ant-pagination-next:not(.ant-pagination-disabled) .ant-pagination-item-link:hover, .ant-select-selection:hover, .ant-pagination-options-quick-jumper:hover input{
|
||||
border-color: #466aff;
|
||||
a{color: #466aff;}
|
||||
}
|
||||
.ant-pagination-disabled .ant-pagination-item-link:hover .anticon{
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.listTable{
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
.taskTableColumns span div span{
|
||||
font-size: 16px;
|
||||
font-weight:700;
|
||||
color:#273778;
|
||||
}
|
||||
.taskTableColumns span{
|
||||
font-size: 15px;
|
||||
color: #353f5e;
|
||||
}
|
||||
.ant-table-tbody .taskTableColumns.taskName span{
|
||||
color: #2545c9;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ant-table-thead > tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{
|
||||
background-color:#F1F6FF;
|
||||
border-bottom: 1px dashed #bec5d5;
|
||||
}
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > .taskTableColumns{
|
||||
background-color:#fbfbfc;
|
||||
}
|
||||
.actionColumns{
|
||||
display: flex;
|
||||
.actionBox, .actionBox span{
|
||||
cursor: pointer;
|
||||
color: #466aff;
|
||||
&:hover{color:#5d7cff !important;}
|
||||
&:active{color:#1140ff !important;}
|
||||
&.disabled .disabled{
|
||||
&:hover, &:active{color:#a4aabb !important;}
|
||||
color:#a4aabb;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
.applyTask, span.applyTask{
|
||||
color:#eb9350;
|
||||
&:hover{color: #FFB074 !important;}
|
||||
&:active{color:#D66A17 !important;}
|
||||
}
|
||||
.cancelApply{visibility: hidden;}
|
||||
}
|
||||
tr:hover .actionColumns .cancelApply{
|
||||
visibility: visible;
|
||||
color: #E31E1E;
|
||||
}
|
||||
.cancelApplyTask{
|
||||
.ant-modal-close{top: 0px !important;}
|
||||
.ant-modal-header{
|
||||
padding: 8px 20px;
|
||||
background-color: #e9edff;
|
||||
.ant-modal-title{text-align: left;}
|
||||
}
|
||||
.carefulIcon{
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: #ca0002;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.tilTask{
|
||||
color:#333333;
|
||||
font-size:16px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
.tipTask{
|
||||
color:#666666;
|
||||
font-size:14px;
|
||||
margin: 10px 0 10px 37px!important;
|
||||
}
|
||||
.tipTaskTime{
|
||||
font-size: 36px;
|
||||
color: #df0002;
|
||||
}
|
||||
.ant-modal-footer{
|
||||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 50px;
|
||||
.ant-btn{
|
||||
&.ant-btn-default{
|
||||
color: #df0002;
|
||||
}
|
||||
&:hover{
|
||||
border-color: #466aff;
|
||||
color: #466aff;
|
||||
&.ant-btn-default{
|
||||
border-color: #df0002;
|
||||
color: #df0002;}
|
||||
}
|
||||
}
|
||||
.ant-btn-default{
|
||||
margin-left:43px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ import './index.scss';
|
|||
// period: 项目报名阶段("repoApply")
|
||||
// match:{params:{id=2023}} 注意默认值记得每届修改
|
||||
export default (props) => {
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut} = props;
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic} = props;
|
||||
|
||||
useEffect(() => {
|
||||
if (!current_user.user_id) {
|
||||
|
|
@ -30,10 +30,6 @@ export default (props) => {
|
|||
}
|
||||
}, [])
|
||||
|
||||
function goToCheckResult(){
|
||||
history.push("/glcc/result");
|
||||
}
|
||||
|
||||
// 页面跳转,判断是否登录
|
||||
function gotoCheckLogin(url){
|
||||
if(current_user && current_user.login){
|
||||
|
|
@ -91,6 +87,15 @@ export default (props) => {
|
|||
<div className="pt6">掌握项目课题详细信息</div>
|
||||
</Link>}
|
||||
|
||||
{/* 0元项目 */}
|
||||
<Link to={`/glcc/freeproject`} className="apply project" >
|
||||
<div>
|
||||
<img src={apply1} alt="" className="applyIcon" />
|
||||
<span className="hover-none"><span className="til">0元资金项目</span> </span>
|
||||
</div>
|
||||
<div className="pt6">欢迎广大学生踊跃参与</div>
|
||||
</Link>
|
||||
|
||||
{/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
|
||||
{(period === "stuApply" || period === "stuApply1") && <div className="apply" onClick={()=>{gotoCheckLogin(`/glcc/${id}/subjects`)}}>
|
||||
<div>
|
||||
|
|
@ -108,14 +113,15 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="pt6">以赛代筛,挖掘高潜力人才</div>
|
||||
</div>}
|
||||
{/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
|
||||
{/* {resultTime2 && <div className="apply" onClick={goToCheckResult}>
|
||||
|
||||
{/* 学生-课题匹配结果公示 */}
|
||||
{isResultPublic && <div className="apply" onClick={()=>{history.push("/glcc/result");}}>
|
||||
<div>
|
||||
<img src={apply2} alt="" className="applyIcon" />
|
||||
<span className="til">名单{resultTime1 ? '预' : ''}公示</span>
|
||||
<span className="til">名单公示</span>
|
||||
</div>
|
||||
<div className="pt6">查看各课题入选学生名单</div>
|
||||
</div>} */}
|
||||
</div>}
|
||||
|
||||
{/* 学生结项考核 */}
|
||||
{/* {!hasRole && checkedTaskId && <Link className="apply" to={`/glcc/submission`}>
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 291 KiB |
|
|
@ -46,6 +46,12 @@ const Project = Loadable({
|
|||
loader: () => import("./project"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
// 开源夏令营0元项目、课题列表页面
|
||||
const FreeProject = Loadable({
|
||||
loader: () => import("./freeProject"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 课题详情页面
|
||||
const TaskDetail = Loadable({
|
||||
loader: () => import("./project/taskDetail"),
|
||||
|
|
@ -92,6 +98,9 @@ const Glcc = (propsF) => {
|
|||
const [applyRepo, setApplyRepo] = useState(false);
|
||||
// 导师-学生配对阶段
|
||||
const [isMatching, setIsMatching] = useState(false);
|
||||
// 导师-学生配对结果公示阶段
|
||||
const [isResultPublic, setIsResultPublic] = useState(false);
|
||||
console.log('isResultPublic', isResultPublic);
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && id === "2022"){
|
||||
|
|
@ -113,8 +122,11 @@ const Glcc = (propsF) => {
|
|||
// 是否处于导师-学生配对阶段
|
||||
const matching = res.data.filter(item=>item.name === "matching");
|
||||
matching[0] && setIsMatching(judge(nowTime, matching[0].value, "range"))
|
||||
// 过滤掉 项目课题公示时间、项目/课题补录
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1"].indexOf(item.name) === -1);
|
||||
// 是否处于导师-学生配对结果公示阶段
|
||||
const resultPublic = res.data.filter(item=>item.name === "stuPublic");
|
||||
resultPublic[0] && setIsResultPublic(judge(nowTime, resultPublic[0].value, "range"))
|
||||
// 过滤掉 可并行进行的阶段
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1", "matching", "stuPublic"].indexOf(item.name) === -1);
|
||||
const periodIndex = filterRepoPublic.findIndex(item=>judge(nowTime, item.value, "range"));
|
||||
periodIndex !== -1 && setPeriod(filterRepoPublic[periodIndex].name);
|
||||
}
|
||||
|
|
@ -234,6 +246,15 @@ const Glcc = (propsF) => {
|
|||
<Check {...propsF} {...props} currentRound={currentRound}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 导师-学生配对结果公示页面 */}
|
||||
{isResultPublic && <Route
|
||||
path="/glcc/result"
|
||||
render={(props) => (
|
||||
<Result current_user={current_user} history={props.history} round={round}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 帮助中心 */}
|
||||
<Route
|
||||
path="/glcc/help"
|
||||
|
|
@ -263,6 +284,21 @@ const Glcc = (propsF) => {
|
|||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 0元项目/课题列表 */}
|
||||
<Route
|
||||
path="/glcc/freesubject"
|
||||
render={(props) => (
|
||||
<FreeProject {...propsF} {...props}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
<Route
|
||||
path="/glcc/freeproject"
|
||||
render={(props) => (
|
||||
<FreeProject {...propsF} {...props}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* openmmlab列表 */}
|
||||
<Route
|
||||
path="/glcc/openmmlab"
|
||||
|
|
@ -271,14 +307,6 @@ const Glcc = (propsF) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 审核结果页面 */}
|
||||
<Route
|
||||
path="/glcc/result"
|
||||
render={(props) => (
|
||||
<Result current_user={current_user} history={props.history}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* 中期审核-结果公示 */}
|
||||
<Route
|
||||
path="/glcc/:id/final/result"
|
||||
|
|
@ -307,7 +335,7 @@ const Glcc = (propsF) => {
|
|||
<Route
|
||||
path="/glcc/:id"
|
||||
render={(props) => (
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
|
@ -315,7 +343,7 @@ const Glcc = (propsF) => {
|
|||
<Route
|
||||
path="/glcc"
|
||||
render={(props) => (
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
|
|||
useEffect(()=>{
|
||||
if(!detail && projectId){
|
||||
// 通过项目Id查询项目详情
|
||||
getProjectById(projectId, {round}).then(response=>{
|
||||
getProjectById(projectId, {round, isFree: false}).then(response=>{
|
||||
if(response && response.message === 'success'){
|
||||
setInfo(response.data)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
|
||||
// 已报名
|
||||
const [apply, setApply] = useState(false);
|
||||
// 可申请课题
|
||||
const [isAvailable, setIsAvailable] = useState(false);
|
||||
|
||||
const columns = [
|
||||
{ title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
|
|
@ -130,8 +132,10 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
keyword,
|
||||
pageSize,
|
||||
userId: apply ? current_user.user_id : '',
|
||||
round
|
||||
round,
|
||||
locked: isAvailable ? false : undefined
|
||||
}
|
||||
console.log('params', params);
|
||||
taskList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
const data = response.data.rows;
|
||||
|
|
@ -152,13 +156,16 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [keyword, current, pageSize, applyTaskId, apply, round])
|
||||
}, [keyword, current, pageSize, applyTaskId, apply, round, isAvailable])
|
||||
|
||||
return (
|
||||
<div className="taskList listBox">
|
||||
<div className="list">
|
||||
<div className='search task'>
|
||||
{round === 2 && current_user && current_user.login ? <Checkbox onChange={(e)=>{setCurrent(1);setApply(e.target.checked)}}>已报名</Checkbox> : <div></div>}
|
||||
<div>
|
||||
{round === 2 && current_user && current_user.login ? <Checkbox onChange={(e)=>{setCurrent(1);setApply(e.target.checked)}}>已报名</Checkbox> : <div></div>}
|
||||
{round === 2 && period === "stuApply1" && <Checkbox onChange={(e)=>{setCurrent(1);setIsAvailable(e.target.checked)}}>可申请课题</Checkbox>}
|
||||
</div>
|
||||
<Search className='taskSearch' placeholder='请输入课题/项目名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
|
||||
<div></div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue