diff --git a/src/AppConfig.js b/src/AppConfig.js index a55649ce..f771b9ea 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Head/NoticeContent.jsx b/src/forge/Head/NoticeContent.jsx index d29dfb72..666e4a0d 100644 --- a/src/forge/Head/NoticeContent.jsx +++ b/src/forge/Head/NoticeContent.jsx @@ -190,11 +190,11 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user: className='hoverNotice-body' // 外部添加className加以区分 onPullRefresh={() => { setNoticePage(noticePage + 1); }} //触发加载ajax的function // type={2} // 传送加载组件的状态 - count={noticeUnreadList.length} // 数据当前的总数量 + count={noticeUnreadList&¬iceUnreadList.length} // 数据当前的总数量 pageSize={10} // > { - noticeUnreadList.map(item => { + Array.isArray(noticeUnreadList)&& noticeUnreadList.map(item => { return (
{ readItem(item) }}>
diff --git a/src/glcc/api.js b/src/glcc/api.js index 8c1a13fd..61a02bab 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -132,4 +132,13 @@ export function auditPassTask(data) { method: 'post', data }); +} + +// 导师审核结果 +export function getPassList(params) { + return fetch({ + url: '/api/studentApply/passList', + method: 'get', + params, + }); } \ No newline at end of file diff --git a/src/glcc/check/index.jsx b/src/glcc/check/index.jsx index 5b66e803..b0583ec3 100644 --- a/src/glcc/check/index.jsx +++ b/src/glcc/check/index.jsx @@ -1,5 +1,5 @@ -import React, { Fragment, useEffect, useState } from 'react'; -import { Checkbox, Input, message, Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd'; import { Link } from 'react-router-dom'; import moment from 'moment'; import './index.scss'; @@ -23,7 +23,7 @@ function Check({ current_user, showNotification, history }) { const [taskId, setTaskId] = useState(); const [havePass, setHavePass] = useState(false); - const disabledCheck = new Date().getTime() > new Date('2022-07-01').getTime(); + const disabledCheck = new Date().getTime() > new Date('2022-07-01 00:00:00').getTime(); const columns = [ { @@ -31,7 +31,7 @@ function Check({ current_user, showNotification, history }) { className: "taskTableColumns", dataIndex: 'studentName', key: 'studentName', - width: '9%', + width: '12%', ellipsis: true, render: (text, record) => { return ( @@ -104,7 +104,7 @@ function Check({ current_user, showNotification, history }) { dataIndex: 'memo', className: 'taskTableColumns', ellipsis: true, - width: '20%', + width: '18%', render: (text, record) => { return ( @@ -124,15 +124,18 @@ function Check({ current_user, showNotification, history }) { title: '操作', dataIndex: 'passStatus', align: 'center', - width: '9%', + width: '11%', className: "actionColumns taskTableColumns", render: ((text, record, index) => { return (
- { - text ? : - - } + {/* 学生已入选并且锁定 */} + {record.locked && !record.used && } + {/* 学生已经被其他导师锁定 */} + {record.locked && record.used && } + {/* 学生未被锁定 */} + {!record.locked && !record.used && (text ? : + )}
) }) @@ -140,6 +143,9 @@ function Check({ current_user, showNotification, history }) { ]; useEffect(() => { + if(new Date().getTime() > new Date('2022-07-01 0:0').getTime()){ + history.push('/403'); + } if (!current_user.user_id) { history.push('/403'); } @@ -176,16 +182,22 @@ function Check({ current_user, showNotification, history }) { }) } + // 数组元素置顶方法 + function toFirst(data, index){ + if(index != 0){ + data.unshift(data.splice(index,1)[0]); + } + } const customExpandIcon = (props) => { if (props.expanded) { return { props.onExpand(props.record, e); - }}>更多详情 + }}>更多详情 } else { return { props.onExpand(props.record, e); - }}>更多详情 + }}>更多详情 } } @@ -221,6 +233,7 @@ function Check({ current_user, showNotification, history }) {
学生证明 { setVisible(true); setPicture(record.proveAttachmentId) }} src={`${window.location.href.indexOf('test') > -1 || window.location.href.indexOf('localhost') > -1 @@ -257,8 +270,15 @@ function Check({ current_user, showNotification, history }) { } taskId && getStudentList(params).then(res => { if (res.data && Array.isArray(res.data.rows)) { - setData(res.data.rows); - let isPass = res.data.rows.some((item) => { return item.passStatus }); + const data = res.data.rows; + // 已入选数据置顶 + data.map((item, index)=>{ + if(item.locked && !item.used){ + toFirst(data, index); + } + }) + setData(data); + let isPass = res.data.rows.some((item) => { return (item.passStatus && !(item.locked&&item.used)) || (item.locked && !item.used) }); setHavePass(isPass); } setLoading(false); @@ -276,8 +296,9 @@ function Check({ current_user, showNotification, history }) {

审核说明:

1、欢迎进入导师审核页!各位导师可查看到您发布课题的全部学生报名信息
2、您可根据学生报名信息与学生进行邮箱或电话沟通了解学生详细情况,选择满意的学生
-
3、每个课题仅允许审核通过一个学生,在审核过程中,您可以随时调整各学生的审核状态
-
4、请各位导师在7.1日前完成课题申请的审核,7.1日将根据各导师审核信息,公布各课题学生入选名单
+
3、每个课题仅允许审核通过一个学生,在审核过程中,您可以随时调整各学生的审核状态,直到与学生匹配成功
+ {/*
4、6月28日后,各导师可访问 https://www.gitlink.org.cn/glcc/result 查询匹配结果(需使用导师账号登录)
*/} +
4、请各位导师在7月1日前完成课题申请的审核,7月1日凌晨1点平台将根据各导师审核信息,正式公布各课题学生入选名单
{ setTaskId(e) }} activeKey={taskId + ''}> @@ -310,7 +331,6 @@ function Check({ current_user, showNotification, history }) { { setVisible(false) }} onOk={() => { setVisible(false) }} className="picture-modal" @@ -318,6 +338,7 @@ function Check({ current_user, showNotification, history }) { footer={null} > -1 || window.location.href.indexOf('localhost') > -1 ? 'https://testforgeplus.trustie.net' diff --git a/src/glcc/check/index.scss b/src/glcc/check/index.scss index e3dfee7f..8f12dc29 100644 --- a/src/glcc/check/index.scss +++ b/src/glcc/check/index.scss @@ -178,6 +178,14 @@ } } } + .redColBor .ant-btn-primary[disabled]{ + border-color: #e44141; + span{color: #e44141;} + } + .greenColBor .ant-btn-primary[disabled]{ + border-color: rgb(40, 190, 108); + span{color: rgb(40, 190, 108);} + } } tr:hover .actionColumns .cancelApply { visibility: visible; diff --git a/src/glcc/checkResult/index.jsx b/src/glcc/checkResult/index.jsx new file mode 100644 index 00000000..8ca925da --- /dev/null +++ b/src/glcc/checkResult/index.jsx @@ -0,0 +1,137 @@ +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"; +import './index.scss'; +import '../project/index.scss'; +const { Search } = Input; + +// 课题列表 +function CheckResult({current_user, history}) { + // 输入搜索框 + const [keyword, setKeyword] = useState(undefined); + 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 time = new Date().getTime() > new Date('2022-06-28 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime(); + + useEffect(()=>{ + // 未到时间 + if(new Date().getTime() < new Date('2022-06-28 1:0').getTime()){ + history.push('/glcc'); + } + hasAuditRole({ userId: current_user.user_id }).then(res => { + // 7.1之前 普通用户不可以进入此页面 + if (!(res && res.message == 'success' && res.data.hasRole) && new Date().getTime() < new Date('2022-07-01 1:0').getTime()) { + history.push('/glcc'); + } + }) + },[]) + + useEffect(() => { + setLoading(true); + setExpandedRowKeys([]); + const params = { + curPage: current, + keyword, + pageSize, + } + getPassList(params).then(response => { + if (response && response.message === "success") { + setData(response.data.rows); + setTotal(response.data.total); + } + setLoading(false); + }) + }, [keyword, current, pageSize]) + + const columns = [ + { 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: '12%', ellipsis: true}, + { title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => {text}}, + { title: '学生年级', dataIndex: 'grade', className:"columnsResult taskName", width: '10%', ellipsis: true}, + { 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.id}?locked=${item.locked}`)}}>{text} }, + { title: '项目名称', dataIndex: 'projectName', className:"columnsResult", ellipsis: true, width: '14%', render: (text) => {text} }, + { title: '操作', dataIndex: 'action', align: 'center', className:"columnsResult actionBox"}, + ] + + 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); + } + + return ( +
+ {time && } + {new Date().getTime() > new Date('2022-07-01 1:0').getTime() && } +
+
+
开源夏令营 / 入选学生名单{time && '预'}公示
+ { setCurrent(1); setKeyword(value) }} /> + + + + + + + ) +} +export default CheckResult; \ No newline at end of file diff --git a/src/glcc/checkResult/index.scss b/src/glcc/checkResult/index.scss new file mode 100644 index 00000000..1824f859 --- /dev/null +++ b/src/glcc/checkResult/index.scss @@ -0,0 +1,88 @@ +.resultListBox{ + background-image:linear-gradient(180deg,#e9f0ff 0%,#dee8ff 51.87%,#f3f4f8 100%); + .bgBox{ + padding-bottom: 115px; + position: relative; + .bgPng3, .bgPng4{ + width: 146px; + position: absolute; + z-index: 0; + top: 210px; + left: 150px; + } + .bgPng4{ + top: 450px; + left: auto; + right: 310px; + } + } + .resultBanner{ + width: 100%; + } + .resultList{ + width: 1200px; + margin: 0 auto; + position: relative; + z-index: 1; + } + .goBackBox{ + padding: 25px 0 8px; + color: #202d40; + font-size: 16px; + border-bottom: 1px dashed #bec5d5; + margin-bottom: 20px; + a{ + color:#a4aabb; + } + } + .search{ + width:509px; + height:48px; + display: block; + margin: 0 auto; + .ant-input-search-button{ + height:48px; + } + } + .resultListTable{ + margin-top: 20px; + background-color:rgba(255, 255, 255, 0.27); + border: 1px solid white; + .ant-table-placeholder{ + background-color: rgba(255, 255, 255, 0.27); + border-bottom: none; + } + th.columnsResult{ + background-color:#DFE8FF; + .ant-table-column-title{ + font-weight:700; + color:#273778; + font-size:16px; + } + &.actionBox .ant-table-column-title{ + visibility: hidden; + } + } + td.columnsResult{ + background-color: #ECF2FF; + border-bottom: 1px dashed #bec5d5; + font-size: 15px; + color:#353f5e; + } + tr:hover td.columnsResult{ + background-color:#fbfbfc; + } + .ant-pagination{ + margin: 26px 20px 0 0; + } + } + .toolTipSpan{ + cursor: default; + &.link{ + color: #2545c9; + cursor: pointer; + &:hover{color:#5d7cff;} + &:active{color: #1140ff;} + } + } +} \ No newline at end of file diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index 656548be..a66a1a5d 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -17,7 +17,7 @@ import { hasAuditRole } from '../api'; import './index.scss'; export default (props) => { - const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, studentApplyEnd } = props; + const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate } = props; // function goToApply() { // if (isGlccApplyDate) { // if (current_user && current_user.login) { @@ -32,6 +32,8 @@ export default (props) => { // } const [hasRole, setHhasRole] = 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(); + const resultTime2 = new Date().getTime() > new Date('2022-07-01 1:0').getTime(); useEffect(() => { if (!current_user.user_id) { @@ -48,7 +50,7 @@ export default (props) => { // 学生报名时间 if (!studentApplyStart) { showNotification("不在报名时间,报名开始时间为5月26日"); - } else if(studentApplyEnd) { + } else if(!isStudentApplyDate && !secondStudentApplyDate) { showNotification("课题申请时间已截止"); } else{ history.push("/glcc/subjects"); @@ -59,6 +61,10 @@ export default (props) => { history.push("/glcc/mentoradmin"); } + function goToCheckResult(){ + history.push("/glcc/result"); + } + return (
{/* */} @@ -78,18 +84,26 @@ export default (props) => { 查看项目 {/* 项目报名已截止 */}
-
查看夏令营各项目,掌握项目课题详细信息
+
掌握项目课题详细信息
- {/* 学生报名 */} + {/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
学生报名
-
选择感兴趣的课题,开启您的开源之旅
+
选择课题,开启您的开源之旅
+ {/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/} + {resultTime2 &&
+
+ + 名单{resultTime1 && '预'}公示 +
+
查看各课题入选学生名单
+
} {/* 导师审核 */} - {hasRole &&
+ {hasRole && new Date().getTime() < new Date('2022-07-01 0:0').getTime() &&
导师审核 @@ -118,7 +132,7 @@ export default (props) => {
- + diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss index 3b70fbd8..2734a0f7 100644 --- a/src/glcc/home/index.scss +++ b/src/glcc/home/index.scss @@ -24,6 +24,7 @@ } .applyBox { + width: 1200px; position: absolute; top: 21vw; left: 17.5vw; @@ -42,7 +43,7 @@ flex-direction: column; justify-content: center; width: 355px; - + height: 118px; &:not(:first-child){ margin-left: 35px; } diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx index aa2daec0..1b52769e 100644 --- a/src/glcc/home/lightspot/index.jsx +++ b/src/glcc/home/lightspot/index.jsx @@ -12,7 +12,7 @@ import { Link } from 'react-router-dom'; function Lightspot(props) { - const {current_user, isGlccApplyDate, showNotification, studentApplyStart, studentApplyEnd} = props; + const {current_user, isGlccApplyDate, showNotification, goToStudent} = props; function goToApply(){ if(isGlccApplyDate){ @@ -27,17 +27,6 @@ function Lightspot(props) { } } - function goToStudent(){ - // 学生报名时间 - if(!studentApplyStart){ - showNotification("不在报名时间,报名开始时间为5月26日"); - } else if(studentApplyEnd) { - showNotification("课题申请时间已截止"); - }else{ - window.location.href="/glcc/subjects"; - } - } - return (
diff --git a/src/glcc/img/resultBanner.png b/src/glcc/img/resultBanner.png new file mode 100644 index 00000000..e589b239 Binary files /dev/null and b/src/glcc/img/resultBanner.png differ diff --git a/src/glcc/img/resultBanner2.png b/src/glcc/img/resultBanner2.png new file mode 100644 index 00000000..e3f598e1 Binary files /dev/null and b/src/glcc/img/resultBanner2.png differ diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index fbc3d20f..f5908e00 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, {useState, useEffect} from "react"; import { Route, Switch } from "react-router-dom"; import { withRouter } from "react-router"; @@ -11,9 +11,8 @@ import "./index.scss"; import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; -import { useState } from "react"; -import { useEffect } from "react"; import { getStudentApplyInfo } from "./api"; +import { message } from "antd"; // 任务管理审核 @@ -57,22 +56,28 @@ const Openmmlab = Loadable({ loader: () => import("./openmmlab"), loading: Loading, }); - +// 开源夏令营审核结果页面 +const Result = Loadable({ + loader: () => import("./checkResult"), + loading: Loading, +}); const Glcc = (propsF) => { - const {current_user} = propsF; + const {current_user, showLoginDialog} = propsF; // 判断时间是否在开源夏令营报名时间内(4月15日~5月20日) const isGlccApplyDate = Date.parse(new Date()) < 1653062400000; - // 学生报名时间new Date().getTime() > new Date('2022-05-26').getTime() + // 学生报名时间 const studentApplyStart = new Date().getTime() > new Date('2022-05-26').getTime(); const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25 0:0').getTime(); - const studentApplyEnd = new Date().getTime() > new Date('2022-06-25 0:0').getTime(); + const secondStudentApplyDate = new Date().getTime() > new Date('2022-06-29 1:0').getTime() && new Date().getTime() < new Date('2022-06-30 0:0').getTime(); // 用户已报名课题id数组 const [applyTaskId, setApplyTaskId] = useState({}); // 刷新用户课题报名信息 const [studentInfoReset, setStudentInfoReset] = useState(undefined); const [cancelCount,setCancelCount]=useState(0); + // 用户是否已经被导师选中 + const [lockedTaskName, setLockedTaskName] = useState(undefined); useEffect(()=>{ // 获取用户课题报名信息current_user user_id @@ -82,6 +87,7 @@ const Glcc = (propsF) => { const data = {}; response.data && response.data.registrationStudentTaskList.map(item=>{ data[item.taskId] = item.id; + item.locked && setLockedTaskName(item.taskName); }) setApplyTaskId(data); response.data&&setCancelCount(Number(response.data.cancelCount)); @@ -89,6 +95,25 @@ const Glcc = (propsF) => { }) },[studentInfoReset, current_user]) + // 申请课题按钮点击函数 + function applyTask(id){ + // 判断用户是否已经登录 + if(current_user && current_user.login){ + // 判断该学生是否已经被某位导师选中 + if(lockedTaskName){ + message.error(`由于你已入选 ${lockedTaskName} 课题,无法申请其他课题`); + }else if(applyTaskId && Object.keys(applyTaskId).length >= 3){ + // 判断用户是否已经报名三个课题 + message.error('最多只能同时报名三个课题'); + }else{ + // 跳转到学生报名页 + window.location.href=`/glcc/student/apply/${id}`; + } + }else{ + showLoginDialog(); + } + } + return (
@@ -123,14 +148,14 @@ const Glcc = (propsF) => { ( - + )} > {/* 项目/课题列表 */} ( - + )} > @@ -138,7 +163,7 @@ const Glcc = (propsF) => { ( - + )} > @@ -146,7 +171,15 @@ const Glcc = (propsF) => { ( - + + )} + > + + {/* 审核结果页面 */} + ( + )} > @@ -154,7 +187,7 @@ const Glcc = (propsF) => { ( - + )} > diff --git a/src/glcc/openmmlab/projectTab/index.jsx b/src/glcc/openmmlab/projectTab/index.jsx index c707ed8f..ba493833 100644 --- a/src/glcc/openmmlab/projectTab/index.jsx +++ b/src/glcc/openmmlab/projectTab/index.jsx @@ -7,7 +7,7 @@ const $ = window.$; const { TabPane } = Tabs; -function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) { +function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate, applyTask }) { useEffect(()=>{ setTimeout(()=>{ @@ -34,7 +34,7 @@ function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog key={i + ''} >
- +
diff --git a/src/glcc/openmmlab/projectTab/projectDetail.jsx b/src/glcc/openmmlab/projectTab/projectDetail.jsx index 206bef69..bea1eefb 100644 --- a/src/glcc/openmmlab/projectTab/projectDetail.jsx +++ b/src/glcc/openmmlab/projectTab/projectDetail.jsx @@ -3,25 +3,9 @@ import { Button, message, Tooltip } from 'antd'; import Nodata from '../../../forge/Nodata'; import { getProjectById } from '../../api'; -export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) => { +export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, applyTask }) => { const [info, setInfo] = useState(detail); - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - useEffect(()=>{ if(!detail && projectId){ // 通过项目Id查询项目详情 @@ -42,7 +26,7 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, {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/subjects/detail/${item.id}?locked=${item.locked}`}}>{item.taskName}
导师姓名:   {item.tutorName}
{item.tutorMail &&
邮箱地址:   {item.tutorMail}
}
@@ -50,8 +34,17 @@ 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 && )} - + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )} + + {/* 查看课题详情按钮 */} +
¥{item.taskReward}
diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index a9d4beb6..9ecf11b5 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -4,27 +4,9 @@ import Nodata from '../../../forge/Nodata'; import { useEffect } from 'react'; import { getProjectById } from '../../api'; -export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, showNotification }) => { +export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, showTask=true, applyTask }) => { const [info, setInfo] = useState(detail); - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(studentApplyEnd) { - showNotification("课题申请时间已截止"); - }else if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - useEffect(()=>{ if(!detail && projectId){ // 通过项目Id查询项目详情 @@ -38,16 +20,17 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, return ( info ?
-
+
{info.projectName} {info.projectType && {info.projectType}}

GitLink项目地址:  {info.gitlinkUrl}

项目简介:  {info.projectIntro}
- {info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{ + {/* 从项目、课题列表展开的显示课题列表,结果公示页展开的不显示课题列表 */} + {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/subjects/detail/${item.id}?locked=${item.locked}`}}>{item.taskName}
导师姓名:   {item.tutorName}
{item.tutorMail &&
邮箱地址:   {item.tutorMail}
}
@@ -55,13 +38,22 @@ 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 && )} - + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )} + + {/* 查看课题详情按钮 */} +
¥{item.taskReward}
- }) : } + }) : )}
:
) } \ No newline at end of file diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 9e54f84f..fab73ba1 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, isStudentApplyDate, studentApplyEnd, applyTaskId, setStudentInfoReset, cancelCount} = propsF; + const {location} = propsF; const {pathname} = location; useEffect(()=>{ window.scrollTo(0, 0); diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index 7bb5ca0f..8f07e342 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -108,6 +108,10 @@ 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; diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index 19d9fd30..e3c6dcf9 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, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, location, showNotification, match }) { +function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondStudentApplyDate, applyTask }) { let gitlinkLastUrl = match.params.gitlinkLastUrl && match.params.gitlinkLastUrl.replace(/\./g, ''); let openmmlab = location.search && location.search.split('=')[1]; // 输入搜索框 @@ -83,19 +83,14 @@ function ProjectList({ applyTaskId, current_user, showLoginDialog, isStudentAppl 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} >
- {!gitlinkLastUrl && !openmmlab && item.recommendFlag ? : ''} + {!gitlinkLastUrl && !openmmlab && item.recommendFlag ? : ''}
diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx index 20d8b44d..9f86363a 100644 --- a/src/glcc/project/taskDetail/index.jsx +++ b/src/glcc/project/taskDetail/index.jsx @@ -1,15 +1,15 @@ import React, {useEffect, useState } from 'react'; -import { Button, message, Spin} from 'antd'; +import { Button, Spin, Tooltip} from 'antd'; +import { getTaskById } from '../../api'; +import bgPng from "../../img/bgPng.png"; import '../index.scss'; import './index.scss'; -import { getTaskById } from '../../api'; -import banner from "../../img/studentProject.png"; -import bgPng from "../../img/bgPng.png"; // 课题列表 function TaskDetail(props) { - const {match, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId, showNotification} = props + const {match, location, isStudentApplyDate, secondStudentApplyDate, applyTaskId, applyTask} = props const taskId = Number(match.params.taskId); + const locked = location.search && location.search.split('=')[1] === 'true'; const [detail, setDetail] = useState(undefined); useEffect(()=>{ @@ -20,24 +20,6 @@ function TaskDetail(props) { }) },[]) - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(studentApplyEnd) { - showNotification("课题申请时间已截止"); - } else if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - return (
{/* */} @@ -66,7 +48,14 @@ function TaskDetail(props) {
课题简介
{detail.taskDesc}
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && taskId && Object.keys(applyTaskId).includes(taskId.toString()) ? : isStudentApplyDate && )} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (locked ? : )}
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index 3a205e1a..c9ed0092 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, studentApplyEnd,cancelCount,showNotification}) { +function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate,cancelCount,showNotification, applyTask}) { const [visible, setVisible] = useState(false); const [deleteTaskId, setDeleteTaskId] = useState(undefined); // 输入搜索框 @@ -24,19 +24,25 @@ 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/subjects/detail/${item.id}?locked=${item.locked}`)}}>{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: `${isStudentApplyDate || studentApplyEnd ? '10%' : ''}`, render: (text) => {text} }, + { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => {text} }, { title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => { return (
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ? - {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情 - {!studentApplyEnd && {deleteItem(item.id)}}>} - :isStudentApplyDate && - {applyTask(item.id)}}>申请课题)} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情} + + {/* 取消按钮5.26-6.25 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && isStudentApplyDate && {deleteItem(item.id)}}>} + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && {applyTask(item.id)}}>申请课题} + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? 申请课题 : {applyTask(item.id, item.locked)}}>申请课题)}
) }) @@ -65,7 +71,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial } const expandRow = (record) => { - return + return } // 展开收起行回调 @@ -79,24 +85,6 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial setExpandedRowKeys(Array.from(keys)); } - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(studentApplyEnd) { - showNotification("课题申请时间已截止"); - } else if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - // 取消课题按钮点击函数 function cancelApply(){ const id = []; diff --git a/src/glcc/project/taskList/index.scss b/src/glcc/project/taskList/index.scss index 058caf89..3ee4811c 100644 --- a/src/glcc/project/taskList/index.scss +++ b/src/glcc/project/taskList/index.scss @@ -38,6 +38,11 @@ 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; diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index d0b0ac14..3077a7fd 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -28,16 +28,19 @@ 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-25 0:0').getTime(); - const studentApplyEnd = new Date().getTime() > new Date('2022-06-25 0:0').getTime(); + const isStudentApplyDate = new Date().getTime() > new Date('2022-06-29 01:00:00').getTime() && new Date().getTime() < new Date('2022-07-01 01:00:00').getTime(); + const studentApplyEnd = new Date().getTime() > new Date('2022-07-01 01:00:00').getTime(); const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const [imageUrl, setImageUrl] = useState(undefined); const [loading, setLoading] = useState(false); const [reload, setReload] = useState(); + const [locked, setLocked] = useState(false); const [userApplyInfo, setUserApplyInfo] = useState(undefined); const [editable, setEditable] = useState(isStudentApplyDate); const [files, setFiles] = useState([]); const [files1, setFiles1] = useState([]); + const [files2, setFiles2] = useState([]); + console.log('isStudentApplyDate:' + isStudentApplyDate) const initTask = { taskId, memo: '', @@ -102,31 +105,40 @@ function Apply(props) { if (Array.isArray(data.registrationStudentTaskList)) { if (data.registrationStudentTaskList.length) { let initTaskList = []; + let lockedCurrent = false; for (const [i, item] of data.registrationStudentTaskList.entries()) { applyInfo['memo' + i] = item.memo; applyInfo['taskId' + i] = item.taskId; applyInfo['memoAttachmentId' + i] = item.memoAttachmentId; - + if (item.locked) { + lockedCurrent = item.locked; + } if (i == 0) { item.memoAttachment && setFiles([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId }]); - } else { + } else if(i==1) { item.memoAttachment && setFiles1([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId, }]); + } else { + item.memoAttachment && setFiles2([{ + name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', + id: item.memoAttachmentId, + uid: item.memoAttachmentId, + }]); } - if(item.enrollFirst){ - applyInfo.enrollFirst=i; - } + // if (item.enrollFirst) { + // applyInfo.enrollFirst = i; + // } - if(item.status==2){ - item.status==2 + if (item.status == 2) { + item.status == 2 } initTaskList.push(item); @@ -138,9 +150,10 @@ function Apply(props) { // }); } setMyTaskList(initTaskList); - - // 如果只有一条报名数据,且课题id与当前id不一致,那么新增一条默认数据 - if (data.registrationStudentTaskList.length === 1 && data.registrationStudentTaskList[0].taskId != taskId) { + setLocked(lockedCurrent); + // 如果未被锁定,且小于3条报名数据,且课题id与当前id不一致,那么新增一条默认数据 + let taskIdArr=data.registrationStudentTaskList.map(i=>{return i.taskId}); + if (!lockedCurrent && data.registrationStudentTaskList.length < 3 && !taskIdArr.includes(taskId)) { addTask(data.registrationStudentTaskList); } } else { @@ -183,15 +196,15 @@ function Apply(props) { validateFieldsAndScroll((err, values) => { if (!err) { setLoading(true); - if (myTaskList.length === 2) { - if(values.enrollFirst==1){ - myTaskList[1].enrollFirst = true; - myTaskList[0].enrollFirst = false; - }else{ - myTaskList[1].enrollFirst = false; - myTaskList[0].enrollFirst = true; - } - } + // if (myTaskList.length === 2) { + // if (values.enrollFirst == 1) { + // myTaskList[1].enrollFirst = true; + // myTaskList[0].enrollFirst = false; + // } else { + // myTaskList[1].enrollFirst = false; + // myTaskList[0].enrollFirst = true; + // } + // } const params = { grade: values.grade, location: Array.isArray(values.location) && values.location.join(), @@ -205,6 +218,7 @@ function Apply(props) { registrationStudentTaskList: myTaskList } + if (userApplyInfo) { params.id = userApplyInfo.id; studentApplyEdit(params).then(response => { @@ -293,8 +307,10 @@ function Apply(props) { changeTaskItem('memoAttachmentId', '', i); } console.log(info.fileList); - if (i) { + if (i==1) { setFiles1(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); + }else if (i==2) { + setFiles2(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); } else { setFiles(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); } @@ -315,46 +331,47 @@ function Apply(props) { let taskListNew = List ? [...List] : [...myTaskList]; if (taskId != taskListNew[0].taskId) { taskListNew.push(initTask); + let newTask = 'taskId' + (taskListNew.length - 1); // 先增加数据再给选择框赋默认值,否则不生效 new Promise((resove) => { setMyTaskList(() => { resove(); return taskListNew }); - }).then(res => setFieldsValue({ 'taskId1': taskId })) + }).then(res => setFieldsValue({ [newTask]: taskId })) } else { taskListNew.push({ ...initTask, taskId: '' }); setMyTaskList(taskListNew); } } - function deleteTask(i) { - let taskListNew = myTaskList.slice(); - let reWriteInfo; - if (i) { - reWriteInfo = { - taskId1: '', - memo1: '', - memoAttachmentId1: '' - } - setFiles1([]); - } else { - reWriteInfo = { - taskId0: taskListNew[1].taskId, - memo0: taskListNew[1].memo, - memoAttachmentId0: taskListNew[1].memoAttachmentId, - taskId1: '', - memo1: '', - memoAttachmentId1: '' - } - setFiles(files1); - setFiles1([]); - } + // function deleteTask(i) { + // let taskListNew = myTaskList.slice(); + // let reWriteInfo; + // if (i) { + // reWriteInfo = { + // taskId1: '', + // memo1: '', + // memoAttachmentId1: '' + // } + // setFiles1([]); + // } else { + // reWriteInfo = { + // taskId0: taskListNew[1].taskId, + // memo0: taskListNew[1].memo, + // memoAttachmentId0: taskListNew[1].memoAttachmentId, + // taskId1: '', + // memo1: '', + // memoAttachmentId1: '' + // } + // setFiles(files1); + // setFiles1([]); + // } - taskListNew.splice(i, 1); - setMyTaskList(taskListNew); - setFieldsValue(reWriteInfo); - } + // taskListNew.splice(i, 1); + // setMyTaskList(taskListNew); + // setFieldsValue(reWriteInfo); + // } function changeTaskItem(field, val, i) { let taskListNew = [...myTaskList]; @@ -390,31 +407,32 @@ function Apply(props) {
申请课题

基本信息

+ {/* className={editable ? "" : "disabledInput"} disabled={editable ?false : true} */} {helper('学生姓名', '', 'studentName', [{ required: true, message: "请正确输入学生姓名" }, { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("studentName") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("studentName") }} className={"disabledInput"} disabled /> )} {helper('所在高校', '', 'school', [{ required: true, message: "请正确输入所在高校" }, { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("school") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("school") }} className={"disabledInput"} disabled /> )} {helper('所学专业', '', 'profession', [{ max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("profession") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("profession") }} className={"disabledInput"} disabled /> )} {getFieldDecorator("location", { rules: [] })( - + )} {helper('所在年级', @@ -431,7 +449,7 @@ function Apply(props) { [{ required: true, message: "请正确输入联系电话" }, { max: 14, message: '超出限制长度14位字符,请重新编辑' }, { 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} /> + { verify("phone") }} className={"disabledInput"} disabled /> )} {helper('邮箱地址', '', @@ -441,7 +459,7 @@ function Apply(props) { { required: true, message: "请输入邮箱地址" }, { max: 50, message: '超出限制长度50位字符,请重新编辑' }, ], - { verify("mail") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("mail") }} className={"disabledInput"} disabled /> )}
{helper('学生证明', @@ -456,7 +474,7 @@ function Apply(props) { accept=".png,.jpg,.jpeg" beforeUpload={beforeUpload} onChange={handleChange} - disabled={studentApplyEnd} + disabled > {imageUrl ? avatar : userApplyInfo && userApplyInfo.proveAttachmentId ?
:
@@ -470,12 +488,12 @@ function Apply(props) { myTaskList.map((item, i) => { return ( -

课题信息({i + 1}/2) +

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

{item.status == 1 && item.auditRemark &&
欢迎您报名CCF GitLink开源编程夏令营,感谢您对GLCC项目及课题的关注和支持!本次您的报名信息未通过初审,原因如下:
-
+
希望您尽快修改并重新提交报名信息,我们将再次审核,万分感谢!
} {helper('课题名称', @@ -495,6 +513,7 @@ function Apply(props) { {allTaskList.map(item => { return })} )} + {item.locked && item.passStatus &&
您已通过审核,成功入选该课题
}
{helper('自荐书', , 'memo' + i, @@ -507,7 +526,10 @@ function Apply(props) { 4、课题实施规划:课题实施拆解、工作规划以及时间安排; 5、个人简介:编程技能、过往经验; 6、提示:文本框表达内容有限,建议您提供内容的pdf或url链接方式展示更精彩的陈述" - onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} rows={7} className={editable ? "memoText disabledInput" : "memoText disabledInput"} disabled={studentApplyEnd} /> + onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} + rows={7} + className={editable ? "memoText disabledInput" : "memoText disabledInput"} + disabled={!(isStudentApplyDate && !item.id)} /> )}
{helper('附件', @@ -517,7 +539,7 @@ function Apply(props) { { bookChange(info, i) }} onDownload={download} beforeUpload={beforeUpload2} @@ -526,9 +548,9 @@ function Apply(props) { downloadIcon: , showRemoveIcon: true }} - disabled={studentApplyEnd} + disabled={!(isStudentApplyDate && !item.id)} > -
上传自荐书
+
上传自荐书
)}
@@ -541,22 +563,23 @@ function Apply(props) { } { - myTaskList.length === 2 && 对您而言,哪个课题的优先级更高?注:优先级将决定您申请课题的入选顺序,若申请的2个课题同时通过审核,将以高优先级的课题作为入选标准} - > - {getFieldDecorator("enrollFirst", { - rules: [{ required: true, message: "请选择课题优先级" },] - })( - - 课题一 - 课题二 - - )} - + // myTaskList.length >= 2 && 对您而言,哪个课题的优先级更高?注:优先级将决定您申请课题的入选顺序,若申请的2个课题同时通过审核,将以高优先级的课题作为入选标准} + // > + // {getFieldDecorator("enrollFirst", { + // rules: [{ required: true, message: "请选择课题优先级" },] + // })( + // + // 课题一 + // 课题二 + // 课题三 + // + // )} + // } {!studentApplyEnd && - + }
diff --git a/src/glcc/student/index.scss b/src/glcc/student/index.scss index 4054a05a..8724fa2f 100644 --- a/src/glcc/student/index.scss +++ b/src/glcc/student/index.scss @@ -12,18 +12,6 @@ .has-error .ant-form-split { position: absolute; } - .ant-btn-primary { - background-color: #466aff; - border-color: #466aff; - &:hover { - background-color: #5d7cff; - border-color: #5d7cff; - } - &:active { - background-color: #1140ff; - border-color: #1140ff; - } - } .apply { width: 1200px; margin: 0 auto; @@ -196,16 +184,6 @@ .sub { width: 200px; height: 36px; - background-color: #466aff; - border-color: #466aff; - &:hover { - background-color: #5d7cff; - border-color: #5d7cff; - } - &:active { - background-color: #1140ff; - border-color: #1140ff; - } } } .explain { @@ -249,12 +227,19 @@ font-size: 14px; line-height: 30px; text-align: center; - cursor: not-allowed; + // cursor: not-allowed; + cursor: pointer; &:hover { opacity: 0.8; } } + .ant-upload-disabled { + .glcc_btn { + cursor: not-allowed; + } + } + .add_task { margin-left: 90px; } @@ -317,6 +302,25 @@ background-color: #466aff; } } + + .task-checked { + display: inline-block; + width: 287px; + height: 32px; + margin-left: 32px; + background-color: rgba(0, 223, 185, 0.1); + border: 1px solid #00be4c; + border-radius: 4px; + color: #00be4c; + font-size: 16px; + font-weight: 500; + line-height: 28px; + margin-top: 4px; + + .iconfont { + margin: 0 9px 0 18px; + } + } } .reject-reason { width: 100%; @@ -326,12 +330,12 @@ border: 1px solid #df4c4c; color: #595e82; font-size: 15px; - padding-left:22px; + padding-left: 22px; margin-bottom: 30px; - .icon-shanchudiao{ + .icon-shanchudiao { position: relative; - top:1px; + top: 1px; color: #e21b1b; margin-right: 5px; font-weight: 600;