forked from Gitlink/forgeplus-react
Merge branch 'gitlink_server' of https://gitlink.org.cn/Gitlink/forgeplus-react into gitlink_server
This commit is contained in:
commit
ae66ecbdf0
|
@ -71,6 +71,52 @@
|
||||||
.contentBox{
|
.contentBox{
|
||||||
padding: 10px 11px 20px
|
padding: 10px 11px 20px
|
||||||
}
|
}
|
||||||
|
&.oneLine{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
input{
|
||||||
|
width:55%;
|
||||||
|
}
|
||||||
|
.ant-form-item-label{
|
||||||
|
width:74px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.labelW{
|
||||||
|
.ant-form-item-label{
|
||||||
|
width:77px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.isEmpower{
|
||||||
|
height:20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-left: 95px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.ant-form-item-control{
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.ant-checkbox-wrapper{
|
||||||
|
font-weight: 500;
|
||||||
|
.ant-checkbox-inner{
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.referTips{
|
||||||
|
font-size: 14px;
|
||||||
|
color:#F52245;
|
||||||
|
margin-left: 95px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-weight: 500;
|
||||||
|
.ant-form-item-children{
|
||||||
|
>p{
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
>p:last-child{
|
||||||
|
margin-left:22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.tutor{
|
&.tutor{
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState, Fragment } from "react";
|
||||||
import { Form, Upload, Input, Icon, Button, message, Modal } from "antd";
|
import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox } from "antd";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import banner from '../img/banner-interim.png';
|
import banner from '../img/banner-interim.png';
|
||||||
import banner1 from '../img/banner-interim1.png';
|
import banner1 from '../img/banner-interim1.png';
|
||||||
|
@ -29,6 +29,8 @@ function StudentSubmit(props){
|
||||||
const [fileList, setFileList] = useState(undefined);
|
const [fileList, setFileList] = useState(undefined);
|
||||||
// 学生提交信息之后按钮置灰(确保无重复提交)
|
// 学生提交信息之后按钮置灰(确保无重复提交)
|
||||||
const [disabled, setDisabled] = useState(false);
|
const [disabled, setDisabled] = useState(false);
|
||||||
|
// 是否授权主办方
|
||||||
|
const [isAuthed, setIsAuthed] = useState(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
// 查询是否已经提交考核材料
|
// 查询是否已经提交考核材料
|
||||||
|
@ -58,6 +60,7 @@ function StudentSubmit(props){
|
||||||
taskId: checkedTaskId,
|
taskId: checkedTaskId,
|
||||||
studentRegId: studentRegId,
|
studentRegId: studentRegId,
|
||||||
round: currentRound,
|
round: currentRound,
|
||||||
|
isAuthed,
|
||||||
term: period === "mediumExamine1" ? 1 : 2
|
term: period === "mediumExamine1" ? 1 : 2
|
||||||
}
|
}
|
||||||
submitMedium(params).then(res=>{
|
submitMedium(params).then(res=>{
|
||||||
|
@ -85,7 +88,16 @@ function StudentSubmit(props){
|
||||||
|
|
||||||
function changeFileList(e) {
|
function changeFileList(e) {
|
||||||
const {file} = e;
|
const {file} = e;
|
||||||
file && file.status && setFileList([file]);
|
if(file && file.response && file.response.message && file.response.message == '文件上传失败'){
|
||||||
|
message.error('文件上传失败,请重新上传');
|
||||||
|
setFileList([])
|
||||||
|
}else{
|
||||||
|
file && file.status && setFileList([file]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeEmpower(e){
|
||||||
|
setIsAuthed(e.target.checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查文件上传是否符合规定
|
// 检查文件上传是否符合规定
|
||||||
|
@ -114,21 +126,53 @@ function StudentSubmit(props){
|
||||||
{period === "mediumExamine1" ? '中期' : '结项'}考核
|
{period === "mediumExamine1" ? '中期' : '结项'}考核
|
||||||
</div>
|
</div>
|
||||||
{period === "mediumExamine1" && !detail ? <Form className="referBox" onSubmit={submit} colon={false}>
|
{period === "mediumExamine1" && !detail ? <Form className="referBox" onSubmit={submit} colon={false}>
|
||||||
<Form.Item label="答辩视频" className="referItem">
|
{
|
||||||
{getFieldDecorator('defenceVideoUrl', {
|
period === "mediumExamine1"?
|
||||||
rules: [{ required: true, message: '请输入视频链接!'}, {pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
<Fragment>
|
||||||
})(<Input placeholder="请输入视频链接" maxLength={900}/>)}
|
<Form.Item label="答辩视频" className="referItem oneCont oneLine">
|
||||||
</Form.Item>
|
{getFieldDecorator('defenceVideoUrl', {
|
||||||
<Form.Item label="代码/pr地址" className="referItem">
|
rules: [{ required: true, message: '请输入视频链接!'}, {pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
||||||
{getFieldDecorator('codeOrPrUrl', {
|
})(<Input placeholder="请输入视频链接" maxLength={900}/>)}
|
||||||
rules: [{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
</Form.Item>
|
||||||
})(<Input placeholder="请输入代码或pr链接" maxLength={900}/>)}
|
<Form.Item className="referItem oneCont isEmpower">
|
||||||
</Form.Item>
|
<Checkbox checked={isAuthed} onChange={changeEmpower}>
|
||||||
|
授权主办方进行下载和剪辑,用作比赛宣传
|
||||||
|
</Checkbox>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="pr地址" className="referItem oneCont oneLine">
|
||||||
|
{getFieldDecorator('codeOrPrUrl', {
|
||||||
|
rules: [{ required: true, message: '请输入视频链接!'},{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
||||||
|
})(<Input placeholder="请输入pr地址" maxLength={900}/>)}
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item className="referItem oneCont referTips">
|
||||||
|
<p>注: 按主办方要求,GLCC官方资助课题最终需要在Gitlink平台进行pr提交。</p>
|
||||||
|
<p>请和导师确认您的课题是否官方赞助,如为官方赞助,请确保终期考核的pr提交在Gitlink平台上进行,否则将会影响您的最终考核。</p>
|
||||||
|
</Form.Item>
|
||||||
|
</Fragment>
|
||||||
|
:
|
||||||
|
<Fragment>
|
||||||
|
<Form.Item label="答辩视频" className="referItem">
|
||||||
|
{getFieldDecorator('defenceVideoUrl', {
|
||||||
|
rules: [{ required: true, message: '请输入视频链接!'}, {pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
||||||
|
})(<Input placeholder="请输入视频链接" maxLength={900}/>)}
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="代码/pr地址" className="referItem">
|
||||||
|
{getFieldDecorator('codeOrPrUrl', {
|
||||||
|
rules: [{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">
|
||||||
{getFieldDecorator('pptAttachment', {
|
{getFieldDecorator('pptAttachment', {
|
||||||
rules: [{ required: true, message: '请上传PPT附件!' }],
|
rules: [{ required: true, message: '请上传PPT附件!' }],
|
||||||
})(<Upload className="avatar-uploader" action={httpUrl + `/busiAttachments/upload`} beforeUpload={beforeUpload} onChange={changeFileList} fileList={fileList}>
|
})(<Upload className="avatar-uploader" action={httpUrl + `/busiAttachments/upload`} beforeUpload={beforeUpload} onChange={changeFileList} fileList={fileList}>
|
||||||
<Button className="uploadBox"><Icon type="upload" /> 上传</Button></Upload>)}
|
{period === "mediumExamine1"?
|
||||||
|
<Button className="uploadBox" style={{color:'#466aff'}}>上传GLCC中期汇报ppt</Button>
|
||||||
|
:
|
||||||
|
<Button className="uploadBox"><Icon type="upload" /> 上传</Button>
|
||||||
|
}
|
||||||
|
</Upload>)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item className="referItem oneCont">
|
<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" type="primary" htmlType="submit" disabled={disabled && !detail}>提交</Button>
|
||||||
|
|
Loading…
Reference in New Issue