glcc学生结项考核增加9个信息提交

This commit is contained in:
谢思 2025-09-11 16:36:51 +08:00
parent 350ae6e450
commit edcf8321b2
3 changed files with 141 additions and 18 deletions

View File

@ -328,4 +328,13 @@ export function getExamineInfoListFor0In(params) {
method: 'get',
params
});
}
// 获取结项学生个人信息
export function getStudentInfo(params) {
return fetch({
url: `/api/glccFinalTermStudentInfo/getMyInfo`,
method: 'get',
params
});
}

View File

@ -137,6 +137,20 @@
}
.referItem{margin-bottom: 5px;}
}
&.referBoxByFinalExamine{
.referItem.oneLine .ant-form-item-label, .pptUpload .ant-form-item-label{
width: 125px;
}
.referItem.isEmpower{
margin-left: 145px;
}
.referItem.oneLine input{
width: 82%;
}
.submitByGLCC{
margin-left: 125px !important;
}
}
}
.tutorContent{
border: 1px solid #fff;
@ -286,4 +300,7 @@
}
}
}
}
.descriptions_glcc table{
background: none;
}

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState, Fragment } from "react";
import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox, notification} from "antd";
import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox, notification, Descriptions} from "antd";
import { Link } from "react-router-dom";
import axios from "axios";
import banner from '../img/banner-interim.png';
@ -7,19 +7,23 @@ import banner1 from '../img/banner-interim1.png';
import img1 from '../img/img1.png';
import bg from '../img/bgPng.png';
import { httpUrl, main_site_url } from '../fetch';
import {getMediumTermExamineInfo, submitMedium, formatParsedResult, hasFinalExam, currentRound} from '../api';
import {getMediumTermExamineInfo, submitMedium, formatParsedResult, hasFinalExam, currentRound, getStudentInfo} from '../api';
import './index.scss';
function StudentSubmit(props){
const label = {
mediumExamine1: '中期',
finalExamine1: '结项'
finalExamine1: '结项',
mediumExamine2: '中期',
finalExamine2: '结项'
}
const {form, checkedTaskId, studentRegId, period, glccSettings, isMediumExamineByToTutor, isFinalExamineByToTutor,history, current_user} = props;
// const period = "finalExamine1"
const mediumExamine = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine1");
const mediumExamine2 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine2");
const finalExamine = glccSettings && glccSettings.filter(item=>item.name === "finalExamine1");
const finalExamine2 = glccSettings && glccSettings.filter(item=>item.name === "finalExamine2");
const isFinal = (period === "finalExamine1" || period === "finalExamine2");
let overtime = false;
if (mediumExamine2 && mediumExamine2[0] && period === "mediumExamine1") {
const nowTime = new Date().getTime();
@ -46,16 +50,25 @@ function StudentSubmit(props){
const [disabled, setDisabled] = useState(false);
//
const [isAuthed, setIsAuthed] = useState(false);
const [studentInfo, setStudentInfo] = useState(undefined);
useEffect(()=>{
//
checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: period === "mediumExamine1" ? 1 : 2}).then(res=>{
checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: isFinal ? 2 : 1}).then(res=>{
if(res && res.message === "success"){
setDetail(res.data);
}
})
},[checkedTaskId, reload])
useEffect(()=>{
isFinal && getStudentInfo({round: currentRound}).then(res=>{
if(res && res.message === "success"){
setStudentInfo(res.data);
}
})
}, [isFinal, reload])
//
function submit(e){
setDisabled(true);
@ -63,10 +76,20 @@ function StudentSubmit(props){
validateFieldsAndScroll((err, values) => {
if(!err){
Modal.confirm({
width: '515px',
title: `确认提交${label[period]}考核材料?`,
content: "提交后将无法修改考核材料,请进行二次确认",
content: isFinal ? <div>
提交后将无法修改请您再次核对以下关键信息<br/><br/>
1. 姓名身份证号是否与本人证件一致<br/>
2. 银行卡号开户银行银行预留手机号是否准确<br/>
3. 证书邮寄地址是否包含完整 / / + 街道 / 小区 / 楼栋 / 房号确保可正常收件<br/><br/>
若因信息填写错误导致<br/>
1. 实体证书无法寄送丢失<br/>
2. 奖金发放失败退回<br/><br/>
<b>组委会将视为您自动放弃相关权益不予补发证书重发奖金</b>
</div> : "提交后将无法修改考核材料,请进行二次确认",
onOk: ()=>{
const {pptAttachment, defenceVideoUrl, codeOrPrUrl} = values;
const {pptAttachment, defenceVideoUrl, codeOrPrUrl, fullName, schoolName, phoneNumber, email, certificateAddress, idCardNumber, bankAccountNumber, bankName, bankReservedPhone } = values;
const pptAttachmentId = pptAttachment.file && pptAttachment.file.response && pptAttachment.file.response.data.id;
const params = {
pptAttachmentId,
@ -76,7 +99,13 @@ function StudentSubmit(props){
studentRegId: studentRegId,
round: currentRound,
isAuthed,
term: period === "mediumExamine1" ? 1 : 2
term: isFinal ? 2 : 1
}
if(isFinal){
params.finalTermStudentInfo = {
studentRegId: studentRegId,
fullName, schoolName, phoneNumber, email, certificateAddress, idCardNumber, bankAccountNumber, bankName, bankReservedPhone
}
}
submitMedium(params).then(res=>{
if(res && res.message === "success"){
@ -89,6 +118,8 @@ function StudentSubmit(props){
}else{
setDisabled(false);
}
}).finally(()=>{
setDisabled(false);
})
},
onCancel:()=>{
@ -139,7 +170,7 @@ function StudentSubmit(props){
params: {
url: value,
task: checkedTaskId,
term: period === "mediumExamine1" ? 1 : 2,
term: isFinal ? 2 : 1,
},
})
.then((response) => {
@ -167,6 +198,57 @@ function StudentSubmit(props){
callback("请输入pr地址");
}
}
const finalExamineFields = ()=>{
return <Fragment>
<Form.Item label="姓名" className="referItem oneCont oneLine">
{getFieldDecorator('fullName', {
rules: [{ required: true, message: '请输入真实姓名!' }],
})(<Input placeholder="需填写与本人身份证完全一致的真实姓名,后续无法修改" maxLength={50} />)}
</Form.Item>
<Form.Item label="学校" className="referItem oneCont oneLine">
{getFieldDecorator('schoolName', {
rules: [{ required: true, message: '请输入学校官方完整名称!' }],
})(<Input placeholder="请填写学校官方完整名称(示例:“北京邮电大学”)" maxLength={100} />)}
</Form.Item>
<Form.Item label="联系电话" className="referItem oneCont oneLine">
{getFieldDecorator('phoneNumber', {
rules: [{ required: true, message: '请输入联系电话!' }, { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请正确输入联系电话!' }],
})(<Input placeholder="请填写本人手机号并于2025年9月26日前注册CCF官网账号电子版证书可登录 CCF 官网查询(注册 CCF 会员不强制缴纳会员费)" maxLength={20} />)}
</Form.Item>
<Form.Item label="邮箱" className="referItem oneCont oneLine">
{getFieldDecorator('email', {
rules: [{ required: true, message: '请输入邮箱!' }],
})(<Input placeholder="仅支持国内邮箱" maxLength={100} />)}
</Form.Item>
<Form.Item label="证书邮寄地址" className="referItem oneCont oneLine">
{getFieldDecorator('certificateAddress', {
rules: [{ required: true, message: '请输入证书邮寄地址!' }],
})(<Input placeholder="需填写完整收件地址(示例:“广东省深圳市南山区科技园路 10 号 XX 小区 2 栋 302 室”),用于实体证书寄送,提交后不可修改" maxLength={500} />)}
</Form.Item>
<Form.Item label="身份证号" className="referItem oneCont oneLine">
{getFieldDecorator('idCardNumber', {
rules: [{ required: true, message: '请输入身份证号!' }, { pattern: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}([0-9]|X)$/, message: "请输入正确的中国大陆身份证号码"}],
})(<Input placeholder="需填写本人真实有效的身份证号" maxLength={50} />)}
</Form.Item>
<Form.Item label="银行账号" className="referItem oneCont oneLine">
{getFieldDecorator('bankAccountNumber', {
rules: [{ required: true, message: '请输入银行账号!' }],
})(<Input placeholder="须填写本人名下银行卡号" maxLength={30} />)}
</Form.Item>
<Form.Item label="开户银行" className="referItem oneCont oneLine">
{getFieldDecorator('bankName', {
rules: [{ required: true, message: '请输入开户银行!' }],
})(<Input placeholder="需精确到可办理转账业务的具体支行,开户银行示例:中国建设银行上海浦东分行张江支行" maxLength={100} />)}
</Form.Item>
<Form.Item label="银行预留手机号" className="referItem oneCont oneLine">
{getFieldDecorator('bankReservedPhone', {
rules: [{ required: true, message: '请输入银行预留手机号!' }, { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请正确输入手机号!' }],
})(<Input placeholder="请确认以上银行相关信息无误,否则将导致奖金发放失败" maxLength={20} />)}
</Form.Item>
</Fragment>
}
return <div className="interimBox">
<img src={period === "mediumExamine1" ? banner1 : banner} alt="" className="bannerInterim"/>
<img src={bg} alt="" className="bg1"/>
@ -184,7 +266,8 @@ function StudentSubmit(props){
<img src={img1} alt="" width={24} className="mr5"/>
{label[period]}考核
</div>
{(period === "mediumExamine1" || period === "finalExamine1") && !detail ? <Form className="referBox" onSubmit={submit} colon={false}>
{(period === "mediumExamine1" || period === "finalExamine1") && !detail ? <Form className={`referBox ${isFinal ? "referBoxByFinalExamine" : ""}`} onSubmit={submit} colon={false} col>
{isFinal && finalExamineFields()}
{
period === "mediumExamine1" || period === "finalExamine1" ?
<Fragment>
@ -203,6 +286,7 @@ function StudentSubmit(props){
rules: [
{
required: true,
message: '请输入pr地址!'
// validator: (rule, value, callback) => {
// checkPrLink(rule, value, callback, checkedTaskId);
// },
@ -225,12 +309,12 @@ function StudentSubmit(props){
</Form.Item>
<Form.Item label="代码/pr地址" className="referItem">
{getFieldDecorator('codeOrPrUrl', {
rules: [{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
rules: [{ required: true, message: '请输入代码/pr地址!'},{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
})(<Input placeholder="请输入代码或pr链接" maxLength={900}/>)}
</Form.Item>
</Fragment>
}
<Form.Item label="PPT附件" className="referItem oneCont">
<Form.Item label="PPT附件" className="referItem oneCont pptUpload">
{getFieldDecorator('pptAttachment', {
rules: [{ required: true, message: '请上传PPT附件!' }],
})(<Upload className="avatar-uploader" action={httpUrl + `/busiAttachments/upload`} beforeUpload={beforeUpload} onChange={changeFileList} fileList={fileList}>
@ -245,15 +329,28 @@ function StudentSubmit(props){
</Upload>)}
</Form.Item>
<Form.Item className="referItem oneCont">
<Button style={{width: '100px', height: '36px'}} className="mt30 ml20" type="primary" htmlType="submit" disabled={disabled && !detail}>提交</Button>
<Button style={{width: '100px', height: '36px'}} className="mt30 ml20 submitByGLCC" type="primary" htmlType="submit" disabled={disabled && !detail}>提交</Button>
</Form.Item>
</Form> : <div className={`reviewBox referBox resultBox ${!detail ? 'nullData' : ''}`}>
<div className="flexBox">
<div className="mustSpan mb20">&nbsp;&nbsp;答辩视频<span className="blueBg ml10"><a href={detail && detail.defenceVideoUrl} target="_blank">{detail && detail.defenceVideoUrl}</a></span></div>
<div style={{ margin: "-10px 0 20px 90px" }}><Checkbox checked={detail && detail.isAuthed ? true: false} disabled></Checkbox><span style={{ marginLeft: "5px" }}>授权主办方进行下载和剪辑用作比赛宣传</span></div>
<div>代码/pr地址<span className="blueBg ml10"><a href={detail && detail.codeOrPrUrl} target="_blank">{detail && detail.codeOrPrUrl}</a></span></div>
<div className="mustSpan ppt mb20 mt20">&nbsp;&nbsp;&nbsp;PPT附件{detail && <i className="iconfont icon-lianjie3 font-13 mr5 ml10"></i>}{detail ? <a className="pptAttachment mr10" href={`${httpUrl}/busiAttachments/download/${detail.pptAttachment.id}`}>{`${detail.pptAttachment.fileName}`}</a> : <Button className="uploadBox ml10" disabled><Icon type="upload" /> 上传</Button>}{detail && detail.pptAttachment && detail.pptAttachment.fileSizeString}</div>
</div>
<Descriptions className="descriptions_glcc">
{studentInfo && <Fragment>
<Descriptions.Item label="姓名">{studentInfo.fullName}</Descriptions.Item>
<Descriptions.Item label="学校">{studentInfo.schoolName}</Descriptions.Item>
<Descriptions.Item label="联系电话">{studentInfo.phoneNumber}</Descriptions.Item>
<Descriptions.Item label="邮箱">{studentInfo.email}</Descriptions.Item>
<Descriptions.Item label="身份证号" span={2}>{studentInfo.idCardNumber}</Descriptions.Item>
<Descriptions.Item label="证书邮寄地址" span={3}>{studentInfo.certificateAddress}</Descriptions.Item>
<Descriptions.Item label="银行账号">{studentInfo.bankAccountNumber}</Descriptions.Item>
<Descriptions.Item label="开户银行">{studentInfo.bankName}</Descriptions.Item>
<Descriptions.Item label="银行预留手机号">{studentInfo.bankReservedPhone}</Descriptions.Item>
</Fragment>}
{detail && <Fragment>
<Descriptions.Item label="答辩视频" span={3}><a href={detail && detail.defenceVideoUrl} target="_blank">{detail && detail.defenceVideoUrl}</a></Descriptions.Item>
<Descriptions.Item label="是否授权" span={3}><Checkbox checked={detail && detail.isAuthed ? true: false} disabled></Checkbox><span style={{ marginLeft: "5px" }}>授权主办方进行下载和剪辑用作比赛宣传</span></Descriptions.Item>
<Descriptions.Item label="代码/pr地址" span={3}><a href={detail && detail.codeOrPrUrl} target="_blank">{detail && detail.codeOrPrUrl}</a></Descriptions.Item>
{detail.pptAttachment && <Descriptions.Item label="PPT附件" span={3}><a className="pptAttachment mr10" href={`${httpUrl}/busiAttachments/download/${detail.pptAttachment.id}`}><i className="iconfont icon-lianjie3 font-13 mr5 ml10"></i>{`${detail.pptAttachment.fileName}`}{detail.pptAttachment.fileSizeString}</a></Descriptions.Item>}
</Fragment>}
</Descriptions>
{!detail && <div className="nullDateTip font-15">很遗憾您在指定时间内未提交考核材料</div>}
{detail && (isMediumExamineByToTutor || isFinalExamineByToTutor) && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">您的课题导师暂未评分请提醒导师尽快提交结项考核评分</div>}
{detail && overtime && !detail.glccTutorEvaluation && isFinalExamineByToTutor && <div className="font-15 nullDateTip">很遗憾您的导师尚未评分您未通过结项考核</div>}