From 5aae3d9b617d72a35a0bfbcd2ba6197d949f8a02 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] =?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
, +
自荐书示例: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; + } }