diff --git a/src/glcc/api.js b/src/glcc/api.js index 5d930499c..e86f2a6f7 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -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({ diff --git a/src/glcc/checkResult/index.jsx b/src/glcc/checkResult/index.jsx index 5b31d1a86..de5a9d2c8 100644 --- a/src/glcc/checkResult/index.jsx +++ b/src/glcc/checkResult/index.jsx @@ -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) => {(current-1)*pageSize+index + 1} }, { title: '入选学生', dataIndex: 'studentName', className:"columnsResult taskName", width: '10%', ellipsis: true}, { title: '学生院校', dataIndex: 'school', className:"columnsResult taskName", width: '12%', ellipsis: true,render: (text) => {text}}, - { title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => {text}}, + { title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => {text || '-'}}, { title: '课题导师', dataIndex: 'tutorName', className:"columnsResult", width: '10%', ellipsis: true}, - { title: '课题名称', dataIndex: 'taskName', className:"columnsResult", width: '20%', ellipsis: true, render: (text, item) => {window.open(`/glcc/subjects/detail/${item.taskId}`)}}>{text} }, + { title: '课题名称', dataIndex: 'taskName', className:"columnsResult", width: '20%', ellipsis: true, render: (text, item) => {window.open(`/glcc/2023/subjects/detail/${item.taskId}`)}}>{text} }, { title: '项目名称', dataIndex: 'projectName', className:"columnsResult", ellipsis: true, width: '14%', render: (text) => {text} }, { title: '操作', dataIndex: 'action', align: 'center', className:"columnsResult actionBox"}, ] @@ -107,11 +105,10 @@ function CheckResult({current_user, history}) { return (
- {time && } - {new Date().getTime() > new Date('2022/07/01 12:0').getTime() && } +
-
开源夏令营 / 入选学生名单{time && '预'}公示
+
开源夏令营 / 入选学生名单公示
{ setCurrent(1); setKeyword(value) }} /> { + 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 ?
+
+ {info.projectName} + {info.projectType && {info.projectType}} +

GitLink项目地址:  {info.gitlinkUrl}

+
项目简介:  {info.projectIntro}
+
+ {/* 课题列表 */} + {info.registrationTaskList && info.registrationTaskList.length ? info.registrationTaskList.map((item, index)=>{ + return
+
+
{window.open(`/glcc/2023/subjects/detail/${item.id}`)}}>{item.taskName}
+
导师姓名:   {item.tutorName}
+ {item.tutorMail &&
邮箱地址:   {item.tutorMail}
} +
+
+
{item.taskDesc}
+ {item.taskUrl &&
课题链接:   {item.taskUrl}
} + {/* 查看课题详情按钮 */} +
+ +
+
+
¥{item.taskReward}
+
+ }) : } +
:
+ ) +} \ No newline at end of file diff --git a/src/glcc/freeProject/index.jsx b/src/glcc/freeProject/index.jsx new file mode 100644 index 000000000..30a95c591 --- /dev/null +++ b/src/glcc/freeProject/index.jsx @@ -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( +
+
+ +
+
+ 课题列表 + 项目列表 +
+
+ 开源夏令营 / + 0元课题及项目列表 +
+
+

申请说明:

+
1、参与GitLink编程夏令营0资金项目的同学,请通过邮件或电话与课题导师直接沟通并根据导师课题要求完成课题,无需在GLCC平台报名课题。
+
2、参与GitLink编程夏令营0资金项目的同学,如完成课题并经导师评定通过,将获得GLCC证书(1份),但无课题资金。
+
3、活动最终解释权归GLCC所有。
+
+ + + ( + + )} + > + ( + + )} + > + + +
+ ) +} +export default FreeProject; \ No newline at end of file diff --git a/src/glcc/freeProject/index.scss b/src/glcc/freeProject/index.scss new file mode 100644 index 000000000..fc503136f --- /dev/null +++ b/src/glcc/freeProject/index.scss @@ -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; +} \ No newline at end of file diff --git a/src/glcc/freeProject/projectList/index.jsx b/src/glcc/freeProject/projectList/index.jsx new file mode 100644 index 000000000..a10f15f78 --- /dev/null +++ b/src/glcc/freeProject/projectList/index.jsx @@ -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 ( +
+ +
+ {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}
+
+
+ })} +
+ {data && !data.length &&
} +
+ + +
+ ) +} +export default ProjectList; \ No newline at end of file diff --git a/src/glcc/freeProject/projectList/index.scss b/src/glcc/freeProject/projectList/index.scss new file mode 100644 index 000000000..e2a12910b --- /dev/null +++ b/src/glcc/freeProject/projectList/index.scss @@ -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; + } + } +} \ No newline at end of file diff --git a/src/glcc/freeProject/taskList/index.jsx b/src/glcc/freeProject/taskList/index.jsx new file mode 100644 index 000000000..5fa2103de --- /dev/null +++ b/src/glcc/freeProject/taskList/index.jsx @@ -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) => {(current-1)*pageSize+index + 1} }, + { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.open(`/glcc/2023/subjects/detail/${item.id}`)}}>{text} }, + { title: '课题类型', dataIndex: 'projectType', className:"taskTableColumns", width: '12%', ellipsis: true, }, + { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '24%', ellipsis: true, render: (text) => {text} }, + { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => {text} }, + { title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns"}, + ] + + const customExpandIcon = (props) => { + if (props.expanded) { + return { + props.onExpand(props.record, e); + }}>项目详情 + } else { + return { + props.onExpand(props.record, e); + }}>项目详情 + } + } + + const expandRow = (record) => { + return + } + + // 展开收起行回调 + 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 ( +
+
+
+ + + + + ) +} +export default TaskList; \ No newline at end of file diff --git a/src/glcc/freeProject/taskList/index.scss b/src/glcc/freeProject/taskList/index.scss new file mode 100644 index 000000000..328786cff --- /dev/null +++ b/src/glcc/freeProject/taskList/index.scss @@ -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; + } + } +} \ No newline at end of file diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index 1e212ea75..38b2048bf 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -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) => {
掌握项目课题详细信息
} + {/* 0元项目 */} + +
+ + 0元资金项目 +
+
欢迎广大学生踊跃参与
+ + {/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */} {(period === "stuApply" || period === "stuApply1") &&
{gotoCheckLogin(`/glcc/${id}/subjects`)}}>
@@ -108,14 +113,15 @@ export default (props) => {
以赛代筛,挖掘高潜力人才
} - {/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/} - {/* {resultTime2 &&
+ + {/* 学生-课题匹配结果公示 */} + {isResultPublic &&
{history.push("/glcc/result");}}>
- 名单{resultTime1 ? '预' : ''}公示 + 名单公示
查看各课题入选学生名单
-
} */} +
} {/* 学生结项考核 */} {/* {!hasRole && checkedTaskId && diff --git a/src/glcc/img/studentProject2.png b/src/glcc/img/studentProject2.png new file mode 100644 index 000000000..5d8d2217c Binary files /dev/null and b/src/glcc/img/studentProject2.png differ diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index 6d6800029..d33d0bfa9 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -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) => { )} >} + + {/* 导师-学生配对结果公示页面 */} + {isResultPublic && ( + + )} + >} + {/* 帮助中心 */} { )} >} + {/* 0元项目/课题列表 */} + ( + + )} + > + + ( + + )} + > + {/* openmmlab列表 */} { )} > - {/* 审核结果页面 */} - ( - - )} - > - {/* 中期审核-结果公示 */} { ( - + )} > @@ -315,7 +343,7 @@ const Glcc = (propsF) => { ( - + )} > diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index 8a882b184..66a613976 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -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) } diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index 016e56f51..a21f4e248 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -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) => {(current-1)*pageSize+index + 1} }, @@ -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 (
- {round === 2 && current_user && current_user.login ? {setCurrent(1);setApply(e.target.checked)}}>已报名 :
} +
+ {round === 2 && current_user && current_user.login ? {setCurrent(1);setApply(e.target.checked)}}>已报名 :
} + {round === 2 && period === "stuApply1" && {setCurrent(1);setIsAvailable(e.target.checked)}}>可申请课题} +
{ setCurrent(1); setKeyword(value) }} />