From 9eda6cc0827d8a22c41f4654d25bcb7a64fbe404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 20 May 2022 09:08:37 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=BC=80=E6=BA=90=E5=A4=8F=E4=BB=A4?= =?UTF-8?q?=E8=90=A5=E4=BA=8C=E6=9C=9Fissue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/home/award/index.jsx | 2 +- src/glcc/home/timerShaft/index.jsx | 2 +- src/glcc/project/component/projectDetail.jsx | 6 +++--- src/glcc/project/index.jsx | 10 ++++++++-- src/glcc/project/index.scss | 7 ++++++- src/glcc/project/projectList/index.jsx | 2 +- src/glcc/project/taskList/index.jsx | 2 +- src/glcc/project/taskList/index.scss | 3 ++- src/glcc/student/index.jsx | 15 ++++++++++----- 9 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/glcc/home/award/index.jsx b/src/glcc/home/award/index.jsx index 4e8c1e47..70626de6 100644 --- a/src/glcc/home/award/index.jsx +++ b/src/glcc/home/award/index.jsx @@ -10,7 +10,7 @@ function Award() {
丰厚现金奖励
-
根据课题开发耗时,对应奖金从6000元至12000元不等。详细可以课题详情中具体奖金标准
+
根据课题开发耗时,对应奖金从6000元至12000元不等。可在课题详情中查看具体奖金标准
diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx index a4f6b12a..aafad773 100644 --- a/src/glcc/home/timerShaft/index.jsx +++ b/src/glcc/home/timerShaft/index.jsx @@ -46,7 +46,7 @@ const stepArr = [{ { title: "Step2", date: "10.21-11.11", - content: "评选公布优秀项目和学员&学员", + content: "评选公布优秀项目和学员", noArrow: true, } ] diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index b52ebe06..70be8b80 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -56,8 +56,8 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{info.projectName} {info.projectType && {info.projectType}} -

GitLink项目地址: {info.gitlinkUrl}

-
项目简介: {info.projectIntro}
+

GitLink项目地址:  {info.gitlinkUrl}

+
项目简介:  {info.projectIntro}
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{ return
@@ -68,7 +68,7 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{item.taskDesc}
-
课题链接:   {item.taskUrl}
+
课题链接:   {item.taskUrl}
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )}
¥ {item.taskReward}
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 29024186..a5d558ec 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -49,8 +49,8 @@ function Project(propsF) {
- 课题列表 - 项目列表 + 课题列表 + 项目列表
开源夏令营 / @@ -70,6 +70,12 @@ function Project(propsF) { )} > + ( + + )} + >
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index a2cddac0..9da1a995 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -88,6 +88,7 @@ color:#465474; padding-bottom: 12px; border-bottom: 1px dashed #bec5d5; + line-height: 36px; .name{ font-weight:700; color:#3753c5; @@ -99,6 +100,10 @@ border-radius:4px; margin-left: 12px; padding: 4px 6px; + line-height: 26px; + } + .linkUrl{ + color: #466aff; } } .taskItem { @@ -137,7 +142,7 @@ .taskUrl{ color:#465474; font-size:16px; - span{color:#466aff;} + a{color:#466aff;} } .applyBut{ background-color:#466aff; diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index 5f130a6e..dda00dc0 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -35,7 +35,7 @@ function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApply
{data && data.map((item, index)=>{ - return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false} isStudentApplyDate={isStudentApplyDate} studentApplyEnd={studentApplyEnd}> + return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false}>
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index 687b2341..df178029 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -128,7 +128,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial return (
-
{ setKeyword(value) }} />
+
{ setCurrent(1); setKeyword(value) }} />
tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{ background-color:#F1F6FF; diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 54cfcf90..06a1c4bc 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -22,7 +22,7 @@ const gradeList = [ { id: '研二', name: '研二' }, { id: '研三', name: '研三' }]; function Apply(props) { - const { form, current_user, showNotification, isGlccApplyDate, match } = props; + const { form, current_user, showNotification, match } = props; const taskId = Number(match.params.taskId); // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) @@ -43,6 +43,11 @@ function Apply(props) { const [myTaskList, setMyTaskList] = useState([]); const [allTaskList, setAllTaskList] = useState([]); + // 学生报名时间范围内 + const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; + // 已过学生报名时间 + const studentApplyEnd = Date.parse(new Date()) > 1656086400000; + useEffect(() => { // 进入此页面到填写页面 // setTimeout(()=>{ @@ -50,9 +55,9 @@ function Apply(props) { let scrollHeight = 500 * clientWidth / 1920; window.scrollTo(0, scrollHeight); - if (!isGlccApplyDate) { + if (!isStudentApplyDate) { // 不在开源夏令营报名时间之内 - window.location.href = "/glcc"; + window.location.href = "/glcc/student/2"; } else if (current_user && current_user.login) { } else { @@ -342,7 +347,7 @@ function Apply(props) {
开源夏令营 - 查看项目 + 课题及项目列表 学生报名 @@ -401,7 +406,7 @@ function Apply(props) { 'phone', [{ required: true, message: "请正确输入联系电话" }, { max: 14, message: '超出限制长度14位字符,请重新编辑' }, - { pattern: /^(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})$/, message: '请正确输入联系电话' }], + { pattern: /[\d-]{4,14}$/, message: '请正确输入联系电话' }], { verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> )} {helper('邮箱地址', From ea12d924d525521744c72f56ed0c751adbe45dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 27 May 2022 10:29:33 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=BC=80=E6=BA=90=E5=A4=8F=E4=BB=A4?= =?UTF-8?q?=E8=90=A5=E4=BA=8C=E6=9C=9Fissue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/project/component/projectDetail.jsx | 17 ---------------- src/glcc/project/index.jsx | 2 +- src/glcc/project/index.scss | 10 +++++++++- src/glcc/project/taskList/index.jsx | 21 ++++++++++++++++++-- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index 70be8b80..fe4b9ad9 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -34,23 +34,6 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, } },[detail]) - // detail && (detail.registrationTaskList = [{ - // id: 1, - // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // tutorName: 'daoshi', - // tutorMail: 'email', - // taskDesc: 'sfdjhdf,hsldf', - // taskUrl: 'url', - // taskReward: '9000' - // },{ - // id: 2, - // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // tutorName: 'daoshi', - // tutorMail: 'email', - // taskDesc: 'sfdjhdf,hsldfaaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // taskUrl: 'url', - // taskReward: '9000' - // }]) return ( info ?
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index a5d558ec..88dc555b 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -49,7 +49,7 @@ function Project(propsF) {
- 课题列表 + 课题列表 项目列表
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index 9da1a995..4bf7bd27 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -176,7 +176,15 @@ padding: 30px 30px 50px; } } -.lookDetail:hover, .lookDetail:focus{ +.lookDetail{ border-color: #466aff; color: #466aff; + &:hover{ + border-color: #5d7cff; + color: #5d7cff; + } + &:focus{ + border-color: #1140ff; + color: #1140ff; + } } \ No newline at end of file diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index df178029..999f00be 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -17,9 +17,10 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial 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) => index + 1 }, + { 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.location.href=item.taskUrl}}>{text} }, { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '28%', ellipsis: true, render: (text) => {text} }, { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => ¥ {text} }, @@ -54,6 +55,17 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial 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)); + } + // 申请课题按钮点击函数 function applyTask(id){ // 判断用户是否已经登录 @@ -88,6 +100,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial // 改变pagesize function onShowSizeChange(current, pageSize){ + setCurrent(1); setPageSize(pageSize); } @@ -104,6 +117,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial } useEffect(() => { + setExpandedRowKeys([]); setLoading(true); const params = { curPage: current, @@ -137,7 +151,10 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial expandIconColumnIndex={4} expandIconAsCell={false} expandIcon={customExpandIcon} - pagination={{pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} + rowKey={'id'} + expandedRowKeys={expandedRowKeys} + onExpand={onExpand} + pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} />
Date: Fri, 20 May 2022 13:34:29 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=BC=80=E6=BA=90=E5=A4=8F=E4=BB=A4?= =?UTF-8?q?=E8=90=A5=E4=BA=8C=E6=9C=9Fissue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/project/index.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 88dc555b..bfdd7823 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -34,7 +34,7 @@ function Project(propsF) { useEffect(()=>{ // 获取用户课题报名信息current_user user_id - getStudentApplyInfo({userId: current_user && current_user.user_id}).then(response=>{ + current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id}).then(response=>{ if(response && response.message === "success"){ // setData(response.data.rows); const data = {}; @@ -44,12 +44,12 @@ function Project(propsF) { setApplyTaskId(data); } }) - },[studentInfoReset]) + },[studentInfoReset, current_user]) return(
- 课题列表 + 课题列表 项目列表
From 50d92c2bddcf6083c9e3647f7335b86e8693caed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 20 May 2022 14:23:36 +0800 Subject: [PATCH 4/8] issue --- src/glcc/index.jsx | 7 +++++-- src/glcc/project/index.jsx | 4 +--- src/glcc/project/taskList/index.jsx | 2 +- src/glcc/student/index.jsx | 4 +++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index 9bdd9010..ab4a17cc 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -11,6 +11,7 @@ import "./index.scss"; import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; +import { useState } from "react"; // 任务管理审核 @@ -43,6 +44,8 @@ const Project = Loadable({ const Glcc = (propsF) => { // 判断时间是否在开源夏令营报名时间内(4月15日~5月20日) const isGlccApplyDate = Date.parse(new Date()) < 1653062400000; + // 刷新用户课题报名信息 + const [studentInfoReset, setStudentInfoReset] = useState(undefined); return (
@@ -51,7 +54,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 开源夏令营报名页面 */} @@ -72,7 +75,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 首页 */} diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index bfdd7823..7b164118 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, current_user, showLoginDialog} = propsF; + const {location, current_user, showLoginDialog, studentInfoReset, setStudentInfoReset} = propsF; const {pathname} = location; const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; const studentApplyEnd = Date.parse(new Date()) > 1656086400000; @@ -29,8 +29,6 @@ function Project(propsF) { // 用户已报名课题id数组 const [applyTaskId, setApplyTaskId] = useState({}); - // 刷新用户课题报名信息 - const [studentInfoReset, setStudentInfoReset] = useState(undefined); useEffect(()=>{ // 获取用户课题报名信息current_user user_id diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index 999f00be..c5d5d7c1 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -133,7 +133,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial ids.includes(item.id.toString()) && toFirst(data, index); }) setData(response.data.rows); - setTotal(response.data.total) + setTotal(response.data.total); } setLoading(false); }) diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 06a1c4bc..8688b99b 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -22,7 +22,7 @@ const gradeList = [ { id: '研二', name: '研二' }, { id: '研三', name: '研三' }]; function Apply(props) { - const { form, current_user, showNotification, match } = props; + const { form, current_user, showNotification, match, setStudentInfoReset } = props; const taskId = Number(match.params.taskId); // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) @@ -189,6 +189,7 @@ function Apply(props) { studentApplyEdit(params).then(response => { if (response && response.message === "success") { showNotification("修改信息成功"); + setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); } @@ -197,6 +198,7 @@ function Apply(props) { studentApply(params).then(response => { if (response && response.message === "success") { showNotification("报名成功"); + setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); } From 6cabd38d87a38feadbc90e1057064ef58d9ece61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Fri, 20 May 2022 14:25:45 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/version/New.jsx | 2 +- src/glcc/student/index.jsx | 54 +++++++++++++++++----------------- src/glcc/student/index.scss | 24 ++++++++++++++- 3 files changed, 51 insertions(+), 29 deletions(-) diff --git a/src/forge/Main/version/New.jsx b/src/forge/Main/version/New.jsx index 8cfd912d..248c010e 100644 --- a/src/forge/Main/version/New.jsx +++ b/src/forge/Main/version/New.jsx @@ -33,7 +33,7 @@ export default Form.create()( const [fileList, setFileList] = useState(undefined); const [attachment, setAttachment] = useState(undefined); const [options , setOptions] = useState(undefined); - const stable = history && history.location && history.location.state.stable; + const stable = history && history.location && history.location.state&&history.location.state.stable; const { projectsId, versionId , owner } = match.params; useEffect(()=>{ diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 06a1c4bc..0656c390 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -9,7 +9,6 @@ import banner from "../img/banner.png"; import studentSvg from "../img/student.png"; import './index.scss'; import { Link } from 'react-router-dom'; -import { color } from 'echarts/lib/theme/light'; const Option = Select.Option; const gradeList = [ @@ -27,6 +26,8 @@ function Apply(props) { // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) // current_user && (current_user.userName = "创新使者") + const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-26').getTime(); + const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const [imageUrl, setImageUrl] = useState(undefined); const [loading, setLoading] = useState(false); @@ -44,24 +45,24 @@ function Apply(props) { const [allTaskList, setAllTaskList] = useState([]); // 学生报名时间范围内 - const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; // 已过学生报名时间 - const studentApplyEnd = Date.parse(new Date()) > 1656086400000; useEffect(() => { // 进入此页面到填写页面 - // setTimeout(()=>{ + setTimeout(()=>{ let clientWidth = document.body.clientWidth; let scrollHeight = 500 * clientWidth / 1920; window.scrollTo(0, scrollHeight); + }); + // window.scrollTo(0, 50); if (!isStudentApplyDate) { // 不在开源夏令营报名时间之内 - window.location.href = "/glcc/student/2"; + // window.location.href = "/glcc/student/2"; } else if (current_user && current_user.login) { } else { - window.location.href = "/login?go_page=/glcc"; + window.location.href = `/login?go_page=/glcc/student/apply/${taskId}`; } }, []) @@ -260,12 +261,11 @@ function Apply(props) { // 自荐书上传 function bookChange(info, i) { if (info.file.status === 'uploading' || info.file.status === "done" || info.file.status === 'removed') { - setLoading(true); + // setLoading(true); if (info.file.status === "done") { changeTaskItem('memoAttachmentId', info.fileList[0].response && info.fileList[0].response.data.id, i) } if (info.file.status === 'removed') { - console.log(1111) changeTaskItem('memoAttachmentId', '', i); } console.log(info.fileList); @@ -276,9 +276,9 @@ function Apply(props) { } } - if (info.file.status === "done" || info.file.status === 'removed') { - setLoading(false); - } + // if (info.file.status === "done" || info.file.status === 'removed') { + // setLoading(false); + // } } // 支持文件下载 @@ -397,7 +397,7 @@ function Apply(props) { '', 'grade', [], - {gradeList.map(item => { return })} )} @@ -406,7 +406,7 @@ function Apply(props) { 'phone', [{ required: true, message: "请正确输入联系电话" }, { max: 14, message: '超出限制长度14位字符,请重新编辑' }, - { pattern: /[\d-]{4,14}$/, message: '请正确输入联系电话' }], + { pattern: /(^(\d{3,4}-)?\d{7,8})$|([1][3,4,5,6,7,8,9][0-9]{9})/, message: '请正确输入联系电话' }], { verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> )} {helper('邮箱地址', @@ -424,28 +424,28 @@ function Apply(props) { '请以图片的形式上传学生证明,大小不超过5M,格式为png、jpg、jpeg', 'proveAttachmentId', [{ required: true, message: "请正确上传学生证明" }], - userApplyInfo && userApplyInfo.proveAttachmentId ?
- : - {imageUrl ? avatar :
+ + {imageUrl ? avatar : userApplyInfo && userApplyInfo.proveAttachmentId ? +
:
请上传学生证明
} -
+ )}
{ myTaskList.map((item, i) => { return ( -

课题信息({i + 1}/2) {myTaskList.length > 1 && { deleteTask(i) }}>删除}

+

课题信息({i + 1}/2) {myTaskList.length > 1 && { deleteTask(i) }}>删除}

{helper('课题名称', '', 'taskId' + i, @@ -463,7 +463,7 @@ function Apply(props) { )}
{helper('自荐书', -
自荐书示例:https://forum.gitlink.org.cn/forums/7299/detail
, + , 'memo' + i, [{ required: true, message: "请正确输入自荐书" }, { max: 500, message: '超出限制长度500位字符,请重新编辑' }], diff --git a/src/glcc/student/index.scss b/src/glcc/student/index.scss index b6cc89eb..ecd5dccb 100644 --- a/src/glcc/student/index.scss +++ b/src/glcc/student/index.scss @@ -293,7 +293,7 @@ .memoExtra { margin-top: 12px; margin-bottom: -10px; - span { + a { color: #466aff; } } @@ -312,4 +312,26 @@ border: 1px solid #fff; border-radius: 4px; box-shadow: 0px 0px 12px rgba(203, 220, 255, 0.47); + + .ant-select-dropdown-menu-item{ + &:hover{ + background-color: #e9efff; + } + } +} +.glcc_cascader{ + .ant-cascader-menu{ + width: 240px; + + &::-webkit-scrollbar-track{ + background-color: #E2E9FF; + } + + &::-webkit-scrollbar-thumb{ + background-color: #BCCCFF; + } + } + .ant-cascader-menu:first-child{ + width: 250px; + } } From 99d85dbdad711fe8a16df2a52a6618e0179412c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Fri, 20 May 2022 14:31:45 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8F=8A=E6=8A=A5=E5=90=8D=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/student/index.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 0656c390..115f9245 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -33,7 +33,7 @@ function Apply(props) { const [loading, setLoading] = useState(false); const [reload, setReload] = useState(); const [userApplyInfo, setUserApplyInfo] = useState(undefined); - const [editable, setEditable] = useState(true); + const [editable, setEditable] = useState(isStudentApplyDate); const [files, setFiles] = useState([]); const [files1, setFiles1] = useState([]); const initTask = { @@ -56,9 +56,9 @@ function Apply(props) { }); // window.scrollTo(0, 50); - if (!isStudentApplyDate) { + if (new Date().getTime() < new Date('2022-05-26').getTime()) { // 不在开源夏令营报名时间之内 - // window.location.href = "/glcc/student/2"; + window.location.href = "/glcc/student/2"; } else if (current_user && current_user.login) { } else { @@ -390,14 +390,14 @@ function Apply(props) { {getFieldDecorator("location", { rules: [] })( - + )} {helper('所在年级', '', 'grade', [], - {gradeList.map(item => { return })} )} From 424742665b33bea7b5ed16d4c68bc88e80efaa19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 20 May 2022 16:48:08 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E9=80=9A=E9=81=93=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/api.js | 9 +++++ src/glcc/home/index.jsx | 10 +++++- src/glcc/home/lightspot/index.jsx | 10 +++++- src/glcc/index.jsx | 6 ++-- src/glcc/project/component/projectDetail.jsx | 6 ++-- src/glcc/project/index.jsx | 6 ++-- src/glcc/project/index.scss | 26 ++++++++++----- src/glcc/project/taskList/index.jsx | 35 ++++++++++++++++---- src/glcc/project/taskList/index.scss | 11 ++++++ src/glcc/student/index.jsx | 4 +-- 10 files changed, 95 insertions(+), 28 deletions(-) diff --git a/src/glcc/api.js b/src/glcc/api.js index 71130f98..217d7870 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -80,3 +80,12 @@ export function cancelTaskApply(data) { data: data }); } + +// 学生报名课题列表 +export function studentApplyList(params) { + return fetch({ + url: `/api/studentApply/list`, + method: 'get', + params + }); +} \ No newline at end of file diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index 359fa641..c3085b39 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -28,6 +28,14 @@ export default (props) => { } } + function goToStudent(){ + // 学生报名时间 + const studentApply = Date.parse(new Date()) > 1653494400000; + if(!studentApply){ + showNotification("不在报名时间,报名开始时间为5月26日"); + } + } + return (
{/* */} @@ -50,7 +58,7 @@ export default (props) => {
项目报名开启,导师席位虚位以待
{/* 学生报名 */} -
{window.location.href="/glcc/student/2"}}> +
学生报名 > diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx index 8cfdb9ed..b8ba6af0 100644 --- a/src/glcc/home/lightspot/index.jsx +++ b/src/glcc/home/lightspot/index.jsx @@ -27,6 +27,14 @@ function Lightspot(props) { } } + function goToStudent(){ + // 学生报名时间 + const studentApply = Date.parse(new Date()) > 1653494400000; + if(!studentApply){ + showNotification("不在报名时间,报名开始时间为5月26日"); + } + } + return (
@@ -44,7 +52,7 @@ function Lightspot(props) {

你是开源新手,有兴趣参加GLCC吗?

想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。
{/* {!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名 */} -
{window.location.href="/glcc/student/2"}}>学生报名
+
学生报名
{/* */}
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index ab4a17cc..1778b66d 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -44,8 +44,6 @@ const Project = Loadable({ const Glcc = (propsF) => { // 判断时间是否在开源夏令营报名时间内(4月15日~5月20日) const isGlccApplyDate = Date.parse(new Date()) < 1653062400000; - // 刷新用户课题报名信息 - const [studentInfoReset, setStudentInfoReset] = useState(undefined); return (
@@ -54,7 +52,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 开源夏令营报名页面 */} @@ -75,7 +73,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 首页 */} diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index fe4b9ad9..e8575d90 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -50,11 +50,11 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
邮箱地址:   {item.tutorMail}
-
{item.taskDesc}
-
课题链接:   {item.taskUrl}
+
      {item.taskDesc}
+
奖金:   {item.taskReward}
+ {item.taskUrl &&
课题链接:   {item.taskUrl}
}
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )}
-
¥ {item.taskReward}
}) : }
:
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 7b164118..652de14c 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, current_user, showLoginDialog, studentInfoReset, setStudentInfoReset} = propsF; + const {location, current_user, showLoginDialog} = propsF; const {pathname} = location; const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; const studentApplyEnd = Date.parse(new Date()) > 1656086400000; @@ -29,6 +29,8 @@ function Project(propsF) { // 用户已报名课题id数组 const [applyTaskId, setApplyTaskId] = useState({}); + // 刷新用户课题报名信息 + const [studentInfoReset, setStudentInfoReset] = useState(undefined); useEffect(()=>{ // 获取用户课题报名信息current_user user_id @@ -65,7 +67,7 @@ function Project(propsF) { ( - + )} > {(current-1)*pageSize+index + 1} }, { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.location.href=item.taskUrl}}>{text} }, { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '28%', ellipsis: true, render: (text) => {text} }, - { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => ¥ {text} }, + { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => {text} }, { title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => { return ( @@ -132,17 +134,36 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial data.map((item, index)=>{ ids.includes(item.id.toString()) && toFirst(data, index); }) - setData(response.data.rows); + setData(data); setTotal(response.data.total); } setLoading(false); }) - }, [keyword, current, pageSize]) + }, [keyword, current, pageSize, applyTaskId]) + + useEffect(()=>{ + // if(apply){ + // // 判断用户是否已经登录 + // if(current_user && current_user.login){ + // apply && studentApplyList().then(response => { + // if (response && response.message === "success") { + // console.log(response); + // } + // }) + // }else{ + // showLoginDialog(); + // } + // } + },[apply]) return (
-
{ setCurrent(1); setKeyword(value) }} />
+
+ {setApply(e.target.checked)}}>已报名 + { setCurrent(1); setKeyword(value) }} /> +
+
{ if (response && response.message === "success") { showNotification("修改信息成功"); - setStudentInfoReset(Math.random()); + // setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); } @@ -198,7 +198,7 @@ function Apply(props) { studentApply(params).then(response => { if (response && response.message === "success") { showNotification("报名成功"); - setStudentInfoReset(Math.random()); + // setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); } From a4b4f69bb408b65ba15e876a4232e8d3082a9cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Fri, 20 May 2022 17:16:11 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/student/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 6e2710ad..05f4dbf4 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -26,7 +26,7 @@ function Apply(props) { // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) // current_user && (current_user.userName = "创新使者") - const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-26').getTime(); + const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25').getTime(); const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const [imageUrl, setImageUrl] = useState(undefined);