-
+
开源夏令营
项目报名
- {userApplyInfo &&
- 您已报名成功,请关注活动后续新闻公告!
-
}
-
-
- }
-
-
+ {userApplyInfo &&
您已报名成功,可实时修改您的报名信息再次提交。请关注夏令营首页新闻公告获得更多活动资讯!
}
+
申请说明
-
1、项目报名时间为4月15日—5月20日,请在报名截止时间(北京时间2022年5月20日24点)前提交报名信息。
-
2、本次夏令营使用Gitlink为代码托管平台,学员基于Gitlink上项目数量完成课程任务。如果您的项目还未在Gitlink中,请现将项目迁移到Gitlink,迁移事项请查看
迁移说明文档。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。
-
3、提交社区和项目信息后,欢迎与组委会联系沟通本次编程夏令营宣传推广和后续合作工作。联系人: _TigerWang(微信号,添加请备注Gitlink编程夏令营)
+
1、项目报名时间为4月29日—5月30日,请在报名截止时间(北京时间2022年5月30日24点)前提交报名信息。
+
2、本次GLCC夏令营建议使用GitLink为代码托管平台,学生基于GitLink上项目完成编程任务。同时也欢迎使用其他代码托管平台的项目参与活动。目前GLCC只对夏令营期间使用GitLink托管的项目提供部分资金支持。
+
3、如果您的项目还未迁移到GitLink上,迁移事项请查看
迁移说明文档。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。
+
4、提交社区和题目信息后,欢迎与组委会联系沟通宣传推广和后续合作工作。联系人微信: _TigerWang(备注GitLink编程夏令营)
+
+

项目报名
+
+
项目信息
+
+
+
+
diff --git a/src/glcc/apply/index.scss b/src/glcc/apply/index.scss
index 75e126678..1d4109dfe 100644
--- a/src/glcc/apply/index.scss
+++ b/src/glcc/apply/index.scss
@@ -8,6 +8,7 @@
.glcc_info_form{
display: flex;
flex-wrap: wrap;
+ padding: 10px 25px 10px 0;
.ant-row.ant-form-item{
margin-bottom: 20px;
display: flex;
@@ -15,7 +16,7 @@
justify-content: flex-end;
}
.ant-col.ant-form-item-control-wrapper {
- width: 78%;
+ width: 77%;
}
.ant-form-item-label{
margin-right: 15px;
@@ -90,11 +91,10 @@
}
}
.explain{
- background-color:#f6f9fe;
- border:2px solid;
- border-color:#ffffff;
+ margin-top: 35px;
+ background-color:#e4edff;
color:#6c7283;
- padding: 20px 30px 30px 20px;
+ padding: 10px 30px 2px 20px;
.c000{color: #000000;}
div>.c000{font-weight: bold;}
>div{margin: 10px 0;}
@@ -105,13 +105,68 @@
}
.applySuccess{
height: 45px;
- border: 1px solid;
- border-color: #466aff;
line-height: 45px;
padding-left: 20px;
- color:#466aff;
+ color:#2dab4d;
+ border: 1px solid rgba(36, 167, 67, 0.61);
+ background-color:rgba(82, 206, 152, 0.11);
+ }
+ .applyInfoBox{
+ background-color:rgba(255, 255, 255, 0.27);
+ border:1px solid #ffffff;
+ .titleG{
+ background-color:#e1e8ff;
+ padding: 10px 0;
+ text-align: center;
+ }
}
}
.glcc-banner {
width: 100%;
+}
+.breadcrumbGlcc{
+ padding-bottom: 15px;
+ border-bottom: 1px dashed #bec5d5;
+}
+.taskApplyBox{
+ width: 100%;
+ margin-left: 50px;
+ .taskApplyTitleBox{
+ padding-bottom: 15px;
+ border-bottom: 1px dashed #bec5d5;
+ }
+ .taskApplyTitle{
+ color:#333333;
+ padding-left: 15px;
+ position: relative;
+ &::before{
+ content: "";
+ width:5px;
+ height:14px;
+ background-color:$primary-color;
+ position: absolute;
+ left: 0;
+ top: 6px;
+ }
+ &>span{
+ color: $primary-color;
+ }
+ }
+}
+.taskApplyForm{
+ .glcc_info_form{
+ position: relative;
+ left: -20px;
+ .ant-row.ant-form-item{
+ justify-content: space-between;
+ }
+ .ant-form-item-label{
+ margin-right: 0px;
+ }
+ }
+ .introArea .ant-form-item-label{
+ width: 100px;
+ position: relative;
+ left: -17px;
+ }
}
\ No newline at end of file
diff --git a/src/glcc/apply/taskApply.jsx b/src/glcc/apply/taskApply.jsx
new file mode 100644
index 000000000..83b2a8ce7
--- /dev/null
+++ b/src/glcc/apply/taskApply.jsx
@@ -0,0 +1,79 @@
+import React , { useCallback, useEffect , useState } from 'react';
+import { Breadcrumb, Button, Form, Input, Select, Upload, Modal, InputNumber } from 'antd';
+import TextArea from 'antd/lib/input/TextArea';
+const Option = Select.Option;
+function TaskApply(props) {
+ const emailreg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
+ const {helper, disabled, taskKey} = props;
+ // 低、中、高
+ const difficultyList = [
+ {id: 1, name: "低"},
+ {id: 2, name: "中"},
+ {id: 3, name: "高"}
+ ]
+
+ return(
+
+
+ {helper('课题名称',
+ '',
+ `taskName${taskKey}`,
+ [{ required: true, message: "请输入课题名称,长度限制32个字符" },
+ { max: 32, message: '超出限制长度32位字符,请重新编辑' }],
+
+ )}
+ {helper('课题链接',
+ '',
+ `taskUrl${taskKey}`,
+ [{ required: true, message: "请输入课题链接" },
+ { max: 252, message: '超出限制长度252位字符,请重新编辑' }],
+
+ )}
+ {helper('课题难度',
+ '',
+ `taskDifficulty${taskKey}`,
+ [{ required: true, message: "请选择课题难度" }],
+
+ )}
+ {helper('课题奖金',
+ '',
+ `taskReward${taskKey}`,
+ [{ required: true, message: "请输入课题奖金" },
+ {pattern: /^[1-9]+[0-9]*]*$/, message: "请输入正整数" },
+ { validator: (rule,val,callback) =>{
+ if(val>=6000 && val<=12000){
+ callback();
+ }else{
+ callback("区间为6000-12000元");
+ }
+ }}],
+
+ )}
+ {helper('导师姓名',
+ '',
+ `tutorName${taskKey}`,
+ [{ required: true, message: "请输入导师姓名" },
+ { max: 32, message: '超出限制长度32位字符,请重新编辑' }],
+
+ )}
+ {helper('导师邮箱地址',
+ '',
+ `tutorMail${taskKey}`,
+ [{ required: true, message: "请输入导师邮箱地址" },
+ { pattern: emailreg, message: "请输入正确的邮箱地址"},],
+
+ )}
+
{helper('课题简介',
+ '',
+ `taskDesc${taskKey}`,
+ [{ required: true, message: "请输入课题简介" },
+ { max: 200, message: '超出限制长度200位字符,请重新编辑' }],
+
+ )}
+
+
+ )
+}
+export default Form.create()(TaskApply);
\ No newline at end of file
diff --git a/src/glcc/components/taskApply/index.jsx b/src/glcc/components/taskApply/index.jsx
new file mode 100644
index 000000000..cd156e652
--- /dev/null
+++ b/src/glcc/components/taskApply/index.jsx
@@ -0,0 +1,206 @@
+import React from "react";
+import { Table, Input, Button, Popconfirm, Form } from 'antd';
+import { Base64 } from 'js-base64';
+
+import './index.scss';
+import apply_delete from "../../img/apply_delete.png";
+
+const EditableContext = React.createContext();
+
+const EditableRow = ({ form, index, ...props }) => (
+
+
+
+);
+
+const EditableFormRow = Form.create()(EditableRow);
+
+class EditableCell extends React.Component {
+
+ save = (dataIndex, e) => {
+ const { record, handleSave } = this.props;
+ this.form.validateFields([dataIndex],(error, values) => {
+ handleSave({ ...record, ...values });
+ if (error && error[e.currentTarget.id]) {
+ return;
+ }
+ });
+ };
+
+ renderCell = form => {
+ this.form = form;
+ const {record, dataIndex, title } = this.props;
+ return
+ {form.getFieldDecorator(dataIndex, {
+ rules: [
+ {required: true,message: `${title}不能为空.`,},
+ {max: 32, message: '超出限制长度32位字符,请重新编辑' }
+ ],
+ validateFirst: true,
+ initialValue: record[dataIndex],
+ })({this.save(dataIndex,e)}} onBlur={(e)=>{this.save(dataIndex,e)}} placeholder="请输入"/>)}
+
+ };
+
+ render() {
+ const {
+ editable,
+ dataIndex,
+ title,
+ record,
+ index,
+ handleSave,
+ children,
+ ...restProps
+ } = this.props;
+ return (
+
+ {editable ? (
+ {this.renderCell}
+ ) : (
+ children
+ )}
+ |
+ );
+ }
+}
+
+class EditableTable extends React.Component {
+ constructor(props) {
+ super(props);
+ this.columns = [
+ {
+ title: '姓名',
+ dataIndex: 'real_name',
+ editable: true,
+ width: "40%"
+ },
+ {
+ title: '单位',
+ dataIndex: 'org_name',
+ editable: true,
+ width: '50%',
+ },
+ {
+ title: '操作',
+ dataIndex: 'operation',
+ width: '10%',
+ render: (text, record) =>
+ this.state.dataSource.length >= 1 ? (
+
this.handleDelete(record.key)}>
+
+
+ ) : null,
+ },
+ ];
+ if(props.isLocal){
+ this.columns = [{
+ title: '姓名',
+ dataIndex: 'real_name',
+ editable: true,
+ },
+ {
+ title: '单位',
+ dataIndex: 'org_name',
+ editable: true,
+ width: '30%',
+ },{
+ title: '职务',
+ dataIndex: 'org_job',
+ editable: true,
+ },
+ {
+ title: Base64.decode('5Yab6KGU'),
+ dataIndex: 'org_rank',
+ editable: true,
+ },
+ {
+ title: '操作',
+ dataIndex: 'operation',
+ width: '10%',
+ render: (text, record) =>
+ this.state.dataSource.length >= 1 ? (
+
this.handleDelete(record.key)}>
+
+
+ ) : null,
+ },];
+ }
+ this.state = {
+ dataSource: this.props.members,
+ count: this.props.members.length,
+ };
+ }
+
+ handleDelete = key => {
+ const dataSource = [...this.state.dataSource];
+ const newData = dataSource.filter(item => item.key !== key);
+ this.setState({ dataSource: newData });
+ this.props.setMembers(newData);
+ };
+
+ handleAdd = () => {
+ const { count, dataSource } = this.state;
+ const newData = {
+ key: count,
+ };
+ this.setState({
+ dataSource: [...dataSource, newData],
+ count: count + 1,
+ });
+ };
+
+ handleSave = row => {
+ const newData = [...this.state.dataSource];
+ const index = newData.findIndex(item => row.key === item.key);
+ const item = newData[index];
+ newData.splice(index, 1, {
+ ...item,
+ ...row,
+ });
+ this.setState({ dataSource: newData });
+ this.props.setMembers(newData);
+ };
+
+ render() {
+ const { dataSource } = this.state;
+ const components = {
+ body: {
+ row: EditableFormRow,
+ cell: EditableCell,
+ },
+ };
+ const columns = this.columns.map(col => {
+ if (!col.editable) {
+ return col;
+ }
+ return {
+ ...col,
+ onCell: record => ({
+ record,
+ editable: col.editable,
+ dataIndex: col.dataIndex,
+ title: col.title,
+ handleSave: this.handleSave,
+ }),
+ };
+ });
+ return (
+
+
+
+
'editable-row'}
+ dataSource={dataSource}
+ columns={columns}
+ />
+
+
+ );
+ }
+}
+
+export default EditableTable;
\ No newline at end of file
diff --git a/src/glcc/components/taskApply/index.scss b/src/glcc/components/taskApply/index.scss
new file mode 100644
index 000000000..094cc029c
--- /dev/null
+++ b/src/glcc/components/taskApply/index.scss
@@ -0,0 +1,24 @@
+.editable-cell {
+ position: relative;
+}
+
+.editable-cell-value-wrap {
+ padding: 5px 12px;
+ cursor: pointer;
+}
+
+.editable-row .editable-cell-value-wrap {
+ height: 30px;
+ border: 1px solid #d9d9d9;
+ border-radius: 4px;
+ padding: 4px 11px;
+}
+
+.member_info table{
+ border: 1px solid #d9d9d9;
+ border-radius: 4px;
+}
+
+.member_info table tr:last-child td{
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx
index 862650e18..39bf210be 100644
--- a/src/glcc/home/index.jsx
+++ b/src/glcc/home/index.jsx
@@ -18,20 +18,22 @@ import logo from "../img/openmmlab/logo1.png";
import { hasAuditRole } from '../api';
import './index.scss';
+// round:2022届(1) 2023届(2)
+// period: 项目报名阶段(0)
export default (props) => {
- const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate, checkedTaskId, checkTime1, checkTime2, checkTime3 } = props;
- // function goToApply() {
- // if (isGlccApplyDate) {
- // if (current_user && current_user.login) {
- // window.location.href = "https://wj.qq.com/s2/10175205/e8df/";
- // } else {
- // window.location.href = "/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
- // }
- // } else {
- // showNotification("不在报名时间,报名时间为4月15日~5月20日");
- // window.location.href = "/glcc";
- // }
- // }
+ const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate, checkedTaskId, checkTime1, checkTime2, checkTime3, round, match:{params:{id}}, period} = props;
+ function goToApply() {
+ if (isGlccApplyDate) {
+ if (current_user && current_user.login) {
+ window.location.href = "https://wj.qq.com/s2/10175205/e8df/";
+ } else {
+ window.location.href = "/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
+ }
+ } else {
+ showNotification("不在报名时间,报名时间为4月15日~5月20日");
+ window.location.href = "/glcc";
+ }
+ }
const [hasRole, setHasRole] = useState(false);
const resultTime1 = new Date().getTime() > new Date('2022/06/28 1:0').getTime() && new Date().getTime() < new Date('2022/07/01 0:0').getTime();
@@ -74,54 +76,79 @@ export default (props) => {
{/* */}
{/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}> */}
{/*
*/}
- {/* 报名入口 */}
-
- {/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
- {resultTime2 &&
-
-

-
名单{resultTime1 ? '预' : ''}公示
-
-
查看各课题入选学生名单
-
}
-
- {/* 学生结项考核 */}
- {!hasRole && checkTime1 && checkedTaskId &&
-
-

-
结项考核
-
-
学生提交考核材料
- }
- {/* 导师结项考核 */}
- {hasRole && new Date().getTime() > new Date('2022/10/01 8:0').getTime() &&
-
-

-
结项考核
-
-
导师拟定结项考核结果
- }
- {/* 结项考核结果公示页 */}
- {checkTime3 &&
+
立即报名
+
+
*/}
+ {/* 往期回顾 */}
+ {round !== 2 &&
+
考核结果
结项课题考核结果公示
- }
-
- {/* 项目报名 */}
-
+
+
查看项目
- {/*
项目报名已截止 */}
掌握项目课题详细信息
+
}
+ {/* 当前glcc */}
+ {round === 2 &&
+ {/* 项目报名入口 */}
+ {period === 0 &&
+
+

+
项目报名
+ {/*
项目报名已截止 */}
+
+
项目报名开启,导师席位虚位以待
+ }
+ {/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
+ {/* {resultTime2 &&
+
+

+
名单{resultTime1 ? '预' : ''}公示
+
+
查看各课题入选学生名单
+
} */}
+
+ {/* 学生结项考核 */}
+ {/* {!hasRole && checkTime1 && checkedTaskId &&
+
+

+
结项考核
+
+
学生提交考核材料
+ } */}
+ {/* 导师结项考核 */}
+ {/* {hasRole && new Date().getTime() > new Date('2022/10/01 8:0').getTime() &&
+
+

+
结项考核
+
+
导师拟定结项考核结果
+ } */}
+ {/* 结项考核结果公示页 */}
+ {/* {checkTime3 &&
+
+

+
考核结果
+
+
结项课题考核结果公示
+ } */}
+
+ {/* 项目报名 */}
+ {/*
+
+

+
查看项目
+
+
掌握项目课题详细信息
+ */}
{/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
{/*
@@ -139,7 +166,7 @@ export default (props) => {
以赛代筛,挖掘高潜力人才
} */}
-
+
}
{/* */}
@@ -149,7 +176,7 @@ export default (props) => {
{/* 活动特邀合作单位 */}
-
+ {/*
活动特邀合作单位 OpenMMLab
@@ -158,10 +185,10 @@ export default (props) => {
OpenMMLab是深度学习时代最完整的计算机视觉开源算法体系。自开源以来,累计发布了超过20个算法库,有超过300个算法2300多个预训练模型。所有算法均具备风格统一、模型丰富、质量高、易复现等特点。在社区生态上,OpenMMLab一直秉持开放、认真、持续成长的原则,积极推动社区建设发展
-
+
*/}
-
+
diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx
index 1b52769e1..48762e67f 100644
--- a/src/glcc/home/lightspot/index.jsx
+++ b/src/glcc/home/lightspot/index.jsx
@@ -12,19 +12,14 @@ import { Link } from 'react-router-dom';
function Lightspot(props) {
- const {current_user, isGlccApplyDate, showNotification, goToStudent} = props;
+ const {current_user, isGlccApplyDate, showNotification, goToStudent, period, history} = props;
function goToApply(){
- if(isGlccApplyDate){
- if(current_user && current_user.login){
- window.location.href="https://wj.qq.com/s2/10175205/e8df/";
- }else{
- window.location.href="/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
- }
- }else{
- showNotification("不在报名时间,报名时间为4月15日~5月20日");
- window.location.href="/glcc";
+ if(current_user && !current_user.login){
+ history.push(`/login?go_page=/glcc/apply`);
+ return;
}
+ history.push(period === 0 ? `/glcc/apply` : `/glcc/subjects`);
}
return (
@@ -36,15 +31,12 @@ function Lightspot(props) {
有兴趣成为GLCC的导师吗?
想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣
- {/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名 */}
- {/* onClick={goToApply} */}
-
项目报名项目报名已截止
+ {period === 0 ?
立即报名
:
项目报名项目报名已截止
}
你是开源新手,有兴趣参加GLCC吗?
想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。
- {/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名 */}
-
学生报名
+ {period === 2 ?
学生报名
:
学生报名{period<2 ? "敬请期待" : "已结束"}
}
{/*
*/}
diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx
index 83c3cc16c..ae045815e 100644
--- a/src/glcc/home/partner/index.jsx
+++ b/src/glcc/home/partner/index.jsx
@@ -12,8 +12,8 @@ import sponsor31 from '../../img/sponsor31.png';
import sponsor32 from '../../img/sponsor32.png';
import sponsor33 from '../../img/sponsor33.png';
import sponsor41 from '../../img/sponsor41.png';
-
-
+import sponsor42 from '../../img/sponsor42.png';
+import sponsor43 from '../../img/sponsor43.png';
import log34 from '../../img/34@2x.png';
import log35 from '../../img/35@2x.png';
import log36 from '../../img/36@2x.png';
@@ -51,7 +51,7 @@ function Partner() {
承办方
-
{ window.open("https://www.ccf.org.cn/kyfzwyh/") }} className='div8b9'>

+
{ window.open("https://www.zhejianglab.com/home") }} className='div8b9'>

协办方
@@ -63,12 +63,12 @@ function Partner() {
- 特邀合作单位
+ 钻石赞助商
-
{ window.open("https://github.com/open-mmlab") }}>

+
{ window.open("https://www.bytedance.com/") }}>

-
+{/*
白金赞助商
@@ -92,7 +92,7 @@ function Partner() {
{ window.open(" https://www.cloudwego.io/") }}>

-
+
*/}
diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx
index 89b4f764a..130249eeb 100644
--- a/src/glcc/home/timerShaft/index.jsx
+++ b/src/glcc/home/timerShaft/index.jsx
@@ -4,22 +4,22 @@ import './index.scss';
const stepArr = [{
title: "Step1",
- date: "4.15",
+ date: "4.29",
content: "GLCC夏令营活动发布"
},
{
title: "Step2",
- date: "4.15-5.19",
+ date: "4.29-5.30",
content: "社区项目报名,提交课题"
},
{
title: "Step2",
- date: "5.20-5.25",
- content: "公示社区项目名单"
+ date: "5.30-6.5",
+ content: "公示项目、课题名单"
},
{
title: "Step2",
- date: "5.26-6.24",
+ date: "6.5-6.23",
content: "学生报名,提交Proposal"
},
{
@@ -30,23 +30,28 @@ const stepArr = [{
},
{
title: "Step2",
- date: "7.1-8.12",
+ date: "7.1-8.15",
content: "项目开发第一阶段",
},
{
title: "Step2",
- date: "8.12-9.30",
+ date: "8.16-8.25",
+ content: "中期考核,公示考核结果",
+},
+{
+ title: "Step2",
+ date: "8.26-10.08",
content: "项目开发第二阶段",
},
{
title: "Step2",
- date: "10.1-10.24",
- content: "结项审核,并公示考核结果",
+ date: "10.09-10.16",
+ content: "结项审核,公示考核结果",
},
{
title: "Step2",
- date: "10.24-11.11",
- content: "评选公布优秀项目和学员",
+ date: "10.22",
+ content: "开源大赛闭幕式",
noArrow: true,
}
]
diff --git a/src/glcc/img/apply_delete.png b/src/glcc/img/apply_delete.png
new file mode 100644
index 000000000..e14b905c3
Binary files /dev/null and b/src/glcc/img/apply_delete.png differ
diff --git a/src/glcc/img/sponsor42.png b/src/glcc/img/sponsor42.png
new file mode 100644
index 000000000..cb80df278
Binary files /dev/null and b/src/glcc/img/sponsor42.png differ
diff --git a/src/glcc/img/sponsor43.png b/src/glcc/img/sponsor43.png
new file mode 100644
index 000000000..ec7653e63
Binary files /dev/null and b/src/glcc/img/sponsor43.png differ
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index fbb622fcd..ecdc96d9e 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -11,7 +11,7 @@ import "./index.scss";
import Loadable from "react-loadable";
import Loading from "../Loading";
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
-import { getStudentApplyInfo } from "./api";
+import { getGlccSettings, getStudentApplyInfo } from "./api";
import { message } from "antd";
@@ -77,7 +77,32 @@ const MiddleResult = Loadable({
loading: Loading,
});
const Glcc = (propsF) => {
- const {current_user, showLoginDialog} = propsF;
+ const {current_user, showLoginDialog, match:{params:{id}}} = propsF;
+ // round:2022届(1) 2023届(2)
+ const [round, setRound] = useState(2);
+ const [period, setPeriod] = useState(undefined);
+
+ useEffect(()=>{
+ if(id && id === "2022"){
+ setRound(1);
+ }
+ }, [id])
+ useEffect(()=>{
+ // 获取当前glcc配置
+ getGlccSettings({round: 2}).then(res=>{
+ if(res && res.message === "success"){
+ const nowTime = new Date().getTime();
+ setPeriod(res.data.findIndex(item=>judge(nowTime, item.value)));
+ }
+ })
+ }, [])
+
+ // 判断是否处于此段时间范围内
+ function judge(nowTime, timeRnge){
+ const timeArr = timeRnge.split(",").map(item=>{return new Date(item).getTime()});
+ return nowTime > timeArr[0] && nowTime < timeArr[1]
+ }
+
// 判断时间是否在开源夏令营报名时间内(4月15日~5月20日)
const isGlccApplyDate = Date.parse(new Date()) < 1653062400000;
@@ -155,12 +180,12 @@ const Glcc = (propsF) => {
)}
>
{/* 开源夏令营报名页面 */}
-
(
-
+
)}
- >
+ >}
{/* 教师审核 */}
{
)}
>
(
)}
>
{/* 项目/课题列表 */}
(
-
+
)}
>
{/* 课题列表 */}
(
)}
>
{/* openmmlab列表 */}
-
(
)}
- >
+ > */}
{/* 审核结果页面 */}
{
{/* 中期审核-结果公示 */}
(
-
+
)}
>
@@ -237,11 +262,19 @@ const Glcc = (propsF) => {
)}
>
+ {/* 首页 */}
+
(
+
+ )}
+ >
+
{/* 首页 */}
(
-
+
)}
>
diff --git a/src/glcc/index.scss b/src/glcc/index.scss
index 21e49ade4..69f5be197 100644
--- a/src/glcc/index.scss
+++ b/src/glcc/index.scss
@@ -37,8 +37,8 @@
}
.-task-sidebar .glccHelp {
height: auto;
- width: 48px;
- padding: 6px 16px;
+ width: 38px;
+ padding: 6px 10px;
text-align: center;
background-color: #f6f9fe;
border: 1px solid #ffffff;
@@ -46,22 +46,31 @@
box-shadow: 0px 0px 8px rgba(55, 148, 255, 0.16);
color: #1e1e1e;
font-size: 14px;
- line-height: 35px;
+ line-height: 20px;
word-break: break-word;
cursor: pointer;
.icon-bangzhuzhongxinicon,
- .icon-bangzhuzhongxinicon1 {
+ .icon-bangzhuzhongxinicon1{
color: #0654d6;
margin-left: -3px;
}
+ .icon-zanting {
+ color: #0654d6;
+ }
&:hover {
color: #ffffff;
background-color: #466aff;
.icon-bangzhuzhongxinicon,
- .icon-bangzhuzhongxinicon1 {
+ .icon-bangzhuzhongxinicon1,
+ .icon-zanting {
color: #ffffff;
}
}
+ .glccList{
+ width: 21px;
+ position: relative;
+ left: -2px;
+ }
}
.qqChatBox {
position: fixed;
diff --git a/src/glcc/interimReview/result.jsx b/src/glcc/interimReview/result.jsx
index fee70e325..0f79b9d53 100644
--- a/src/glcc/interimReview/result.jsx
+++ b/src/glcc/interimReview/result.jsx
@@ -11,7 +11,7 @@ import '../project/index.scss';
const { Search } = Input;
// 课题列表
-function CheckResult({current_user, history, checkTime3}) {
+function CheckResult({current_user, history, checkTime3, round}) {
// 输入搜索框
const [keyword, setKeyword] = useState(undefined);
const [data, setData] = useState([]);
@@ -36,7 +36,8 @@ function CheckResult({current_user, history, checkTime3}) {
curPage: current,
keyword,
pageSize,
- term: 2
+ term: 2,
+ round
}
getMediumTermExamineInfoList(params).then(response => {
if (response && response.message === "success") {
diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx
index 0963c1270..5c153bafd 100644
--- a/src/glcc/project/component/projectDetail.jsx
+++ b/src/glcc/project/component/projectDetail.jsx
@@ -4,7 +4,7 @@ import Nodata from '../../../forge/Nodata';
import { useEffect } from 'react';
import { getProjectById } from '../../api';
-export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, showTask=true, applyTask }) => {
+export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, showTask=true, applyTask, id }) => {
const [info, setInfo] = useState(detail);
useEffect(()=>{
@@ -30,7 +30,7 @@ export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStud
{showTask && (info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{
return
-
{window.location.href=`/glcc/subjects/detail/${item.id}`}}>{item.taskName}
+
{window.location.href=`/glcc/${id}/subjects/detail/${item.id}`}}>{item.taskName}
导师姓名: {item.tutorName}
{item.tutorMail &&
邮箱地址: {item.tutorMail}
}
@@ -48,7 +48,7 @@ export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStud
{secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ?
:
)}
{/* 查看课题详情按钮 */}
-
+
¥{item.taskReward}
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx
index fab73ba1a..1960172dc 100644
--- a/src/glcc/project/index.jsx
+++ b/src/glcc/project/index.jsx
@@ -20,7 +20,7 @@ const TaskList = Loadable({
});
function Project(propsF) {
- const {location} = propsF;
+ const {location, match:{params:{id}}} = propsF;
const {pathname} = location;
useEffect(()=>{
window.scrollTo(0, 0);
@@ -30,8 +30,8 @@ function Project(propsF) {
- 课题列表
- 项目列表
+ 课题列表
+ 项目列表
开源夏令营 /
@@ -40,25 +40,25 @@ function Project(propsF) {
(
)}
>
(
)}
>
(
)}
>
(
)}
diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx
index e3c6dcf90..70e1524ce 100644
--- a/src/glcc/project/projectList/index.jsx
+++ b/src/glcc/project/projectList/index.jsx
@@ -10,7 +10,7 @@ import star from "../../img/star.png";
const { Search } = Input;
// 项目列表
-function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondStudentApplyDate, applyTask }) {
+function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondStudentApplyDate, applyTask, round, match:{params:{id}}}) {
let gitlinkLastUrl = match.params.gitlinkLastUrl && match.params.gitlinkLastUrl.replace(/\./g, '');
let openmmlab = location.search && location.search.split('=')[1];
// 输入搜索框
@@ -23,7 +23,8 @@ function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondS
const params = {
curPage: 1,
keyword,
- pageSize: 10000
+ pageSize: 10000,
+ round
}
projectList(params).then(response => {
if (response && response.message === "success") {
@@ -83,7 +84,7 @@ function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondS
onVisibleChange={(visible) => { changeVisible(visible, item) }}
key={index}
placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'}
- content={}
+ content={}
trigger='click'
overlayClassName='projectItemPopover'
autoAdjustOverflow={false}
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx
index c38161de6..a1a017dfa 100644
--- a/src/glcc/project/taskList/index.jsx
+++ b/src/glcc/project/taskList/index.jsx
@@ -7,7 +7,7 @@ import bgPng from "../../img/bgPng.png";
const { Search } = Input;
// 课题列表
-function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate,cancelCount,showNotification, applyTask}) {
+function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate,cancelCount,showNotification, applyTask, round, match:{params:{id}}}) {
const [visible, setVisible] = useState(false);
const [deleteTaskId, setDeleteTaskId] = useState(undefined);
// 输入搜索框
@@ -24,7 +24,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
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: '24%', ellipsis: true, render: (text, item) => {window.open(`/glcc/subjects/detail/${item.id}`)}}>{text} },
+ { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '24%', ellipsis: true, render: (text, item) => {window.open(`/glcc/${id}/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} },
@@ -71,7 +71,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
}
const expandRow = (record) => {
- return
+ return
}
// 展开收起行回调
@@ -128,7 +128,8 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
curPage: current,
keyword,
pageSize,
- userId: apply ? current_user.user_id : ''
+ userId: apply ? current_user.user_id : '',
+ round
}
taskList(params).then(response => {
if (response && response.message === "success") {
@@ -149,7 +150,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
- {current_user && current_user.login ?
{setCurrent(1);setApply(e.target.checked)}}>已报名 :
}
+ {round === 2 && current_user && current_user.login ?
{setCurrent(1);setApply(e.target.checked)}}>已报名 :
}
{ setCurrent(1); setKeyword(value) }} />
diff --git a/src/glcc/siderBarHelp.js b/src/glcc/siderBarHelp.js
index 7079133c7..e7e9c1639 100644
--- a/src/glcc/siderBarHelp.js
+++ b/src/glcc/siderBarHelp.js
@@ -25,6 +25,10 @@ function SiderBar() {
帮助中心
+
window.open("/glcc/2022")}>
+
+ 往期回顾
+
)
}