forked from Gitlink/forgeplus-react
This commit is contained in:
parent
403cb3ad58
commit
b5e69a7de1
File diff suppressed because it is too large
Load Diff
|
|
@ -285,4 +285,13 @@ export function formatParsedResult(setting, type= "range") {
|
|||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否通过中期考核
|
||||
export function hasFinalExam(data) {
|
||||
return fetch({
|
||||
url: `/api/applyInformation/hasFinalExam`,
|
||||
method: 'get',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
|
@ -22,8 +22,7 @@ import './index.scss';
|
|||
// period: 项目报名阶段("repoApply")
|
||||
// match:{params:{id=2023}} 注意默认值记得每届修改
|
||||
export default (props) => {
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic, hasRole, isMediumExamineByToTutor, checkedTaskId} = props;
|
||||
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic, hasRole, isMediumExamineByToTutor, isFinalExamineByToTutor, checkedTaskId} = props;
|
||||
useEffect(() => {
|
||||
if (!current_user.user_id) {
|
||||
history.push('/403');
|
||||
|
|
@ -131,6 +130,16 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="pt6">学生提交考核材料</div>
|
||||
</Link>}
|
||||
|
||||
{/* 学生结项考核 */}
|
||||
{period === "finalExamine1" && checkedTaskId && <Link className="apply" to={`/glcc/submit`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">结项考核</span>
|
||||
</div>
|
||||
<div className="pt6">学生提交考核材料</div>
|
||||
</Link>}
|
||||
|
||||
{/* 导师中期考核 */}
|
||||
{hasRole && isMediumExamineByToTutor && <Link className="apply" to={`/glcc/middle/examination`}>
|
||||
<div>
|
||||
|
|
@ -139,7 +148,17 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="pt6">导师拟定中期考核结果</div>
|
||||
</Link>}
|
||||
{/* 结项考核结果公示页 */}
|
||||
|
||||
{/* 导师结项考核 */}
|
||||
{hasRole && isFinalExamineByToTutor && <Link className="apply" to={`/glcc/final/examination`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">结项考核</span>
|
||||
</div>
|
||||
<div className="pt6">导师拟定结项考核结果</div>
|
||||
</Link>}
|
||||
|
||||
{/* 中期考核结果公示页 */}
|
||||
{period === "mediumExamine3" && <Link className="apply" to={`/glcc/2023/result`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
|
|
@ -147,6 +166,15 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="pt6">中期课题考核结果公示</div>
|
||||
</Link>}
|
||||
|
||||
{/* 结项考核结果公示页 */}
|
||||
{period === "finalExamine3" && <Link className="apply" to={`/glcc/2023/result`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">考核结果</span>
|
||||
</div>
|
||||
<div className="pt6">结项课题考核结果公示</div>
|
||||
</Link>}
|
||||
</div>}
|
||||
{/* </div> */}
|
||||
<div className="introduce">
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ const Glcc = (propsF) => {
|
|||
const [isResultPublic, setIsResultPublic] = useState(false);
|
||||
// 导师中期考核评审阶段
|
||||
const [isMediumExamineByToTutor, setIsMediumExamineByToTutor] = useState(false);
|
||||
// 导师结项考核评审阶段
|
||||
const [isFinalExamineByToTutor, setIsFinalExamineByToTutor] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && id === "2022"){
|
||||
|
|
@ -129,8 +131,11 @@ const Glcc = (propsF) => {
|
|||
// 是否处于导师中期考核评审阶段
|
||||
const mediumExamine2 = res.data.filter(item=>item.name === "mediumExamine2");
|
||||
mediumExamine2[0] && setIsMediumExamineByToTutor(judge(nowTime, mediumExamine2[0].value, "range"))
|
||||
// 是否处于导师结项考核评审阶段
|
||||
const finalExamine2 = res.data.filter(item=>item.name === "finalExamine2");
|
||||
finalExamine2[0] && setIsFinalExamineByToTutor(judge(nowTime, finalExamine2[0].value, "range"))
|
||||
// 过滤掉 可并行进行的阶段
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1", "matching", "stuPublic", "mediumExamine2"].indexOf(item.name) === -1);
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1", "matching", "stuPublic", "mediumExamine2", "finalExamine2"].indexOf(item.name) === -1);
|
||||
const periodIndex = filterRepoPublic.findIndex(item=>judge(nowTime, item.value, "range"));
|
||||
periodIndex !== -1 && setPeriod(filterRepoPublic[periodIndex].name);
|
||||
}
|
||||
|
|
@ -168,17 +173,17 @@ const Glcc = (propsF) => {
|
|||
const [hasRole, setHasRole] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// 登录状态+导师-学生配对阶段/中期审核
|
||||
current_user && current_user.user_id && (isMatching || isMediumExamineByToTutor) && hasAuditRole({ userId: current_user.user_id, round: currentRound }).then(res => {
|
||||
// 登录状态+导师-学生配对阶段/中期审核/结项审核
|
||||
current_user && current_user.user_id && (isMatching || isMediumExamineByToTutor || isFinalExamineByToTutor) && hasAuditRole({ userId: current_user.user_id, round: currentRound }).then(res => {
|
||||
if (res && res.message === 'success' && res.data.hasRole) {
|
||||
setHasRole(true);
|
||||
}
|
||||
})
|
||||
}, [current_user, isMatching, isMediumExamineByToTutor])
|
||||
}, [current_user, isMatching, isMediumExamineByToTutor, isFinalExamineByToTutor])
|
||||
|
||||
useEffect(()=>{
|
||||
// 获取用户课题报名信息
|
||||
(period === "stuApply" || period === "stuApply1" || period === "mediumExamine1") && current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id, round: round}).then(response=>{
|
||||
(period === "stuApply" || period === "stuApply1" || period === "mediumExamine1" || period === "finalExamine1") && current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id, round: round}).then(response=>{
|
||||
if(response && response.message === "success"){
|
||||
// setData(response.data.rows);
|
||||
const data = {};
|
||||
|
|
@ -312,27 +317,36 @@ const Glcc = (propsF) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 中期审核-结果公示 */}
|
||||
{(round === 1 || period === "mediumExamine3" || period === "finalExamine3") && <Route
|
||||
{/* 中期/结项审核-结果公示 */}
|
||||
{(round === 1 || period === "mediumExamine3" || period === "finalExamine3") &&
|
||||
<Route
|
||||
path="/glcc/:id/result"
|
||||
render={(props) => (
|
||||
<MiddleResult id={id} round={round} current_user={current_user} history={props.history}/>
|
||||
<MiddleResult id={id} round={round} period={period} current_user={current_user} history={props.history}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 中期审核-学生 */}
|
||||
{period === "mediumExamine1" && <Route
|
||||
{/* 中期/结项审核-学生 */}
|
||||
{(period === "mediumExamine1" || period === "finalExamine1") && <Route
|
||||
path="/glcc/submit"
|
||||
render={(props) => (
|
||||
<StudentSubmit current_user={current_user} history={props.history} checkedTaskId={checkedTaskId} studentRegId={studentRegId} period={period} currentRound={currentRound} glccSettings={glccSettings} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
<StudentSubmit current_user={current_user} history={props.history} checkedTaskId={checkedTaskId} studentRegId={studentRegId} period={period} currentRound={currentRound} glccSettings={glccSettings} isMediumExamineByToTutor={isMediumExamineByToTutor} isFinalExamineByToTutor={isFinalExamineByToTutor}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 中期审核-导师 */}
|
||||
{isMediumExamineByToTutor && <Route
|
||||
{(isMediumExamineByToTutor) && <Route
|
||||
path="/glcc/middle/examination"
|
||||
render={(props) => (
|
||||
<TutorReview current_user={current_user} history={props.history} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor} currentRound={currentRound} glccSettings={glccSettings}/>
|
||||
<TutorReview current_user={current_user} period={'mediumExamine'} history={props.history} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor} currentRound={currentRound} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 结项审核-导师 */}
|
||||
{(isFinalExamineByToTutor) && <Route
|
||||
path="/glcc/final/examination"
|
||||
render={(props) => (
|
||||
<TutorReview current_user={current_user} period={'finalExamine'} history={props.history} hasRole={hasRole} isMediumExamineByToTutor={isFinalExamineByToTutor} currentRound={currentRound} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
|
|
@ -340,7 +354,7 @@ const Glcc = (propsF) => {
|
|||
<Route
|
||||
path="/glcc/:id"
|
||||
render={(props) => (
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor} isFinalExamineByToTutor={isFinalExamineByToTutor}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
|
@ -348,7 +362,7 @@ const Glcc = (propsF) => {
|
|||
<Route
|
||||
path="/glcc"
|
||||
render={(props) => (
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor} isFinalExamineByToTutor={isFinalExamineByToTutor}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
|
|
|||
|
|
@ -275,4 +275,15 @@
|
|||
.resultListTable .ant-table{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.inputErrColor{
|
||||
.ant-form-item-control-wrapper{
|
||||
.has-error{
|
||||
.ant-form-item-children{
|
||||
input{
|
||||
border-color: #f5222d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ import '../project/index.scss';
|
|||
const { Search } = Input;
|
||||
|
||||
// 课题列表
|
||||
function CheckResult({round, id}) {
|
||||
function CheckResult({round, id, period}) {
|
||||
// 输入搜索框
|
||||
const [keyword, setKeyword] = useState(undefined);
|
||||
const [data, setData] = useState([]);
|
||||
|
|
@ -30,7 +30,7 @@ function CheckResult({round, id}) {
|
|||
curPage: current,
|
||||
keyword,
|
||||
pageSize,
|
||||
term: id === "2023" ? 1 : 2,
|
||||
term: period === 'mediumExamine3' ? 1 : 2,
|
||||
round
|
||||
}
|
||||
getMediumTermExamineInfoList(params).then(response => {
|
||||
|
|
@ -98,10 +98,10 @@ function CheckResult({round, id}) {
|
|||
|
||||
return (
|
||||
<div className="interimBox taskList resultListBox">
|
||||
<img className="bannerInterim" src={id === "2023" ? resultBanner1 : resultBanner} alt=""></img>
|
||||
<img className="bannerInterim" src={period === 'mediumExamine3' ? resultBanner1 : resultBanner} alt=""></img>
|
||||
<div className='bgBox'>
|
||||
<div className="resultList">
|
||||
<div className='goBackBox'><a href={`/glcc/${id}`}>开源夏令营 / </a>{id === "2023" ? '中期' : '结项'}课题考核结果公示</div>
|
||||
<div className='goBackBox'><a href={`/glcc/${id}`}>开源夏令营 / </a>{period === 'mediumExamine3' ? '中期' : '结项'}课题考核结果公示</div>
|
||||
<div className='searchBox'>
|
||||
<Search className='search' placeholder='请输入学生姓名或课题名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
|
||||
<div style={{width: 100}}></div>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,35 @@
|
|||
import React, { useEffect, useState, Fragment } from "react";
|
||||
import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox } from "antd";
|
||||
import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox, notification} from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
import axios from "axios";
|
||||
import banner from '../img/banner-interim.png';
|
||||
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} from '../api';
|
||||
import {getMediumTermExamineInfo, submitMedium, formatParsedResult, hasFinalExam} from '../api';
|
||||
import './index.scss';
|
||||
|
||||
function StudentSubmit(props){
|
||||
const {form, checkedTaskId, studentRegId, period, currentRound, glccSettings, isMediumExamineByToTutor} = props;
|
||||
const {form, checkedTaskId, studentRegId, period, currentRound, glccSettings, isMediumExamineByToTutor, isFinalExamineByToTutor,history, current_user} = props;
|
||||
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");
|
||||
let overtime = false;
|
||||
if(mediumExamine2 && mediumExamine2[0]){
|
||||
if (mediumExamine2 && mediumExamine2[0] && period === "mediumExamine1") {
|
||||
const nowTime = new Date().getTime();
|
||||
const timeArr = mediumExamine2[0].value.split(",").map(item=>{
|
||||
const timeArr = mediumExamine2[0].value.split(",").map((item) => {
|
||||
// replaceAll不兼容低版本浏览器(如搜狗)
|
||||
const data = item && item.replace(/-/g,'/');
|
||||
const data = item && item.replace(/-/g, "/");
|
||||
return new Date(data).getTime();
|
||||
});
|
||||
overtime = nowTime > timeArr[1];
|
||||
} else if (finalExamine2 && finalExamine2[0] && period != "mediumExamine1") {
|
||||
const nowTime = new Date().getTime();
|
||||
const timeArr = finalExamine2[0].value.split(",").map((item) => {
|
||||
// replaceAll不兼容低版本浏览器(如搜狗)
|
||||
const data = item && item.replace(/-/g, '/');
|
||||
return new Date(data).getTime()
|
||||
});
|
||||
overtime = nowTime > timeArr[1];
|
||||
|
|
@ -32,6 +43,15 @@ function StudentSubmit(props){
|
|||
// 是否授权主办方
|
||||
const [isAuthed, setIsAuthed] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
hasFinalExam({round:currentRound,userId:current_user.user_id}).then((res)=>{
|
||||
if(res && res.data && res.data.hasRole) return;
|
||||
history.push("/glcc");
|
||||
}).catch((err)=>{
|
||||
history.push("/glcc");
|
||||
})
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
// 查询是否已经提交考核材料
|
||||
checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: period === "mediumExamine1" ? 1 : 2}).then(res=>{
|
||||
|
|
@ -82,6 +102,10 @@ function StudentSubmit(props){
|
|||
})
|
||||
}else{
|
||||
setDisabled(false);
|
||||
const { codeOrPrUrl } = values;
|
||||
if (codeOrPrUrl) {
|
||||
checkPrLink("", codeOrPrUrl, () => {});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -108,6 +132,41 @@ function StudentSubmit(props){
|
|||
}
|
||||
return isLt100M;
|
||||
}
|
||||
function checkPrLink(rule, value, callback) {
|
||||
if (value) {
|
||||
axios
|
||||
.get(`https://www.gitlink.org.cn/check_pr_url`, {
|
||||
params: {
|
||||
url: value,
|
||||
task: checkedTaskId,
|
||||
term: period === "mediumExamine1" ? 1 : 2,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
if (response) {
|
||||
if (response.data.state && response.data.state.length > 0) {
|
||||
callback("");
|
||||
const description = (
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: response.data.state_html }}
|
||||
></div>
|
||||
);
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description,
|
||||
key:'notificationKey',
|
||||
style: {
|
||||
zIndex: 99999999,
|
||||
},
|
||||
});
|
||||
}
|
||||
callback();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback("请输入视频链接");
|
||||
}
|
||||
}
|
||||
return <div className="interimBox">
|
||||
<img src={period === "mediumExamine1" ? banner1 : banner} alt="" className="bannerInterim"/>
|
||||
<img src={bg} alt="" className="bg1"/>
|
||||
|
|
@ -116,18 +175,18 @@ function StudentSubmit(props){
|
|||
<div className="navBox font-16"><Link to={`/glcc`} className="linkBox">开源夏令营 / </Link>提交{period === "mediumExamine1" ? '中期' : '结项'}考核材料</div>
|
||||
<div className="tipBox mt30">
|
||||
<div className="font-15 spanBox">材料提交说明:</div>
|
||||
<div>1、请各位学生<a href={main_site_url+`/api/attachments/${period === "mediumExamine1" ? '428107' : '427720'}`} className="blueSpan">下载PPT模板</a> ,根据课题开发进展,按照PPT模板要求填写课题学习调研方案、开发进度及开发成果等考核材料;</div>
|
||||
<div>1、请各位学生<a href={`https://www.gitlink.org.cn/api/attachments/${period === "mediumExamine1" ? '428107' : '427720'}`} className="blueSpan">下载PPT模板</a> ,根据课题开发进展,按照PPT模板要求填写课题学习调研方案、开发进度及开发成果等考核材料;</div>
|
||||
<div>2、欢迎各位学生录制本课题答辩视频,将视频链接填写至下方视频介绍填写栏;</div>
|
||||
<div>3、学生提交考核材料的时间为<span className="spanBox">{formatParsedResult(mediumExamine)}</span>,请在截止时间前提交;</div>
|
||||
<div>3、学生提交考核材料的时间为<span className="spanBox">{formatParsedResult( period === "mediumExamine1" ? mediumExamine : finalExamine)}</span>,请在截止时间前提交;</div>
|
||||
<div>4、若导师已给出评分,各位学生可在此页面查看自己的结项考核成绩。对考核成绩有异议的学生请及时联系您的导师。</div>
|
||||
</div>
|
||||
<div className="titleBox mt25 font-18">
|
||||
<img src={img1} alt="" width={24} className="mr5"/>
|
||||
{period === "mediumExamine1" ? '中期' : '结项'}考核
|
||||
</div>
|
||||
{period === "mediumExamine1" && !detail ? <Form className="referBox" onSubmit={submit} colon={false}>
|
||||
{(period === "mediumExamine1" || period === "finalExamine1") && !detail ? <Form className="referBox" onSubmit={submit} colon={false}>
|
||||
{
|
||||
period === "mediumExamine1"?
|
||||
period === "mediumExamine1" || period === "finalExamine1" ?
|
||||
<Fragment>
|
||||
<Form.Item label="答辩视频" className="referItem oneCont oneLine">
|
||||
{getFieldDecorator('defenceVideoUrl', {
|
||||
|
|
@ -139,9 +198,17 @@ function StudentSubmit(props){
|
|||
授权主办方进行下载和剪辑,用作比赛宣传
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
<Form.Item label="pr地址" className="referItem oneCont oneLine">
|
||||
<Form.Item label="pr地址" className="referItem oneCont oneLine inputErrColor">
|
||||
{getFieldDecorator('codeOrPrUrl', {
|
||||
rules: [{ required: true, message: '请输入视频链接!'},{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
checkPrLink(rule, value, callback, checkedTaskId);
|
||||
},
|
||||
},
|
||||
],
|
||||
validateTrigger: "onBlur",
|
||||
})(<Input placeholder="请输入pr地址" maxLength={900}/>)}
|
||||
</Form.Item>
|
||||
<Form.Item className="referItem oneCont referTips">
|
||||
|
|
@ -170,6 +237,9 @@ function StudentSubmit(props){
|
|||
{period === "mediumExamine1"?
|
||||
<Button className="uploadBox" style={{color:'#466aff'}}>上传GLCC中期汇报ppt</Button>
|
||||
:
|
||||
period === 'finalExamine1' ?
|
||||
<Button className="uploadBox" style={{ color: "#466aff" }}>上传GLCC结项汇报ppt</Button>
|
||||
:
|
||||
<Button className="uploadBox"><Icon type="upload" /> 上传</Button>
|
||||
}
|
||||
</Upload>)}
|
||||
|
|
@ -180,11 +250,12 @@ function StudentSubmit(props){
|
|||
</Form> : <div className={`reviewBox referBox resultBox ${!detail ? 'nullData' : ''}`}>
|
||||
<div className="flexBox">
|
||||
<div className="mustSpan mb20"> 答辩视频<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"> 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>
|
||||
{!detail && <div className="nullDateTip font-15">很遗憾,您在指定时间内未提交考核材料</div>}
|
||||
{detail && isMediumExamineByToTutor && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">您的课题导师暂未评分,请提醒导师尽快提交结项考核评分</div>}
|
||||
{detail && (isMediumExamineByToTutor || isFinalExamineByToTutor) && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">您的课题导师暂未评分,请提醒导师尽快提交结项考核评分</div>}
|
||||
{detail && overtime && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">很遗憾,您的导师尚未评分,您未通过结项考核</div>}
|
||||
{detail && detail.glccTutorEvaluation && <div className="tutorRes">
|
||||
<div>您的课题导师对您的结项考核评价如下,如有异议,请及时联系导师进行更改。</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const { TabPane } = Tabs;
|
|||
const { TextArea } = Input;
|
||||
|
||||
function TutorReview(props){
|
||||
const {form, current_user, showNotification, history, hasRole, isMediumExamineByToTutor, currentRound, glccSettings} = props;
|
||||
const {form, current_user, showNotification, history, hasRole, isMediumExamineByToTutor, period, currentRound, glccSettings} = props;
|
||||
const {getFieldDecorator, setFieldsValue, validateFieldsAndScroll, resetFields } = form;
|
||||
const [taskId, setTaskId] = useState();
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
|
@ -24,15 +24,26 @@ function TutorReview(props){
|
|||
const [disabled, setDisabled] = useState(false);
|
||||
const mediumExamine2 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine2");
|
||||
const mediumExamine3 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine3");
|
||||
const finalExamine2 = glccSettings && glccSettings.filter(item=>item.name === "finalExamine2");
|
||||
const finalExamine3 = glccSettings && glccSettings.filter(item=>item.name === "finalExamine3");
|
||||
useEffect(() => {
|
||||
if(!isMediumExamineByToTutor || !hasRole){
|
||||
history.push("/glcc");
|
||||
}else if (!current_user.login) {
|
||||
history.push('/login?go_page=/glcc/middle/examination');
|
||||
if(period === 'mediumExamine'){
|
||||
history.push('/login?go_page=/glcc/middle/examination');
|
||||
}else{
|
||||
history.push('/login?go_page=/glcc/final/examination');
|
||||
}
|
||||
}
|
||||
getLockedAuditList({ userId: current_user.user_id, pass: 1, round: currentRound }).then(res => {
|
||||
if (res.message === 'success') {
|
||||
const filterStuNull = res.data.rows.filter(item=>{return item.studentName !== null})
|
||||
let filterStuNull = [];
|
||||
if(period === 'mediumExamine'){
|
||||
filterStuNull = res.data.rows.filter(item=>{return item.studentName !== null})
|
||||
}else{
|
||||
filterStuNull = res.data.rows.filter(item=>{return item.studentName !== null && item.canSubmitFinalExaminationMaterial})
|
||||
}
|
||||
setTaskList(filterStuNull);
|
||||
filterStuNull.length && setTaskId(filterStuNull[0].id);
|
||||
} else {
|
||||
|
|
@ -44,7 +55,7 @@ function TutorReview(props){
|
|||
useEffect(()=>{
|
||||
// 查询是否已经提交考核材料
|
||||
// 结项考核
|
||||
taskId && getMediumTermExamineInfo(taskId,{round: currentRound, term: isMediumExamineByToTutor ? 1 : 2}).then(res=>{
|
||||
taskId && getMediumTermExamineInfo(taskId,{round: currentRound, term: period === 'mediumExamine' ? 1 : 2}).then(res=>{
|
||||
if(res && res.message === "success"){
|
||||
setDetail(res.data);
|
||||
if(res && res.data && res.data.glccTutorEvaluation){
|
||||
|
|
@ -66,7 +77,7 @@ function TutorReview(props){
|
|||
mediumTermExamineMaterialId: detail.id,
|
||||
tutorUserId: detail.studentRegId,
|
||||
round: currentRound,
|
||||
term: isMediumExamineByToTutor ? 1 : 2
|
||||
term: period === 'mediumExamine' ? 1 : 2
|
||||
}
|
||||
if(detail.glccTutorEvaluation){
|
||||
params['id'] = detail.glccTutorEvaluation.id;
|
||||
|
|
@ -115,9 +126,16 @@ function TutorReview(props){
|
|||
<div className="tipBox mt30">
|
||||
<div className="font-15 spanBox">导师考核说明:</div>
|
||||
<div>1、请各位导师从“工作态度”“开发进度”“项目完成质量”“总体评分”四个角度,根据学生提交的考核材料与实际开发情况客观地进行打分。打分标准分为:S:特别优秀、A:优秀、B:良好、C:合格、D:不合格五个等级。</div>
|
||||
<div>2、“总体评分”这一项将决定学生是否通过本次考核。若总体评分为“S、A、B、C”,则视为通过中期考核。若该结果为“D”,则该课题中期考核不通过,课题将自动终止。请各位导师谨慎做出评价。</div>
|
||||
<div>3、导师提交打分结果后,可对考核结果进行更改,更改考核结果截止日期为<span className="spanBox">{mediumExamine2 && formatParsedResult(mediumExamine2, 'end')}</span>。</div>
|
||||
<div>4、北京时间<span className="spanBox">{mediumExamine3 && formatParsedResult(mediumExamine3, "start")}</span>前GLCC官网将公布中期考核结果,敬请留意。</div>
|
||||
<div>2、“总体评分”这一项将决定学生是否通过本次考核。若总体评分为“S、A、B、C”,则视为通过{period === 'mediumExamine'?'中期':'结项'}考核。若该结果为“D”,则该课题{period === 'mediumExamine'?'中期':'结项'}考核不通过,课题将自动终止。请各位导师谨慎做出评价。</div>
|
||||
<div>3、导师提交打分结果后,可对考核结果进行更改,更改考核结果截止日期为{period === 'mediumExamine' ?
|
||||
<span className="spanBox">{mediumExamine2 && formatParsedResult(mediumExamine2, 'end')}</span>
|
||||
:
|
||||
<span className="spanBox">{finalExamine2 && formatParsedResult(finalExamine2, 'end')}</span>}。</div>
|
||||
<div>4、北京时间{period === 'mediumExamine' ?
|
||||
<span className="spanBox">{mediumExamine3 && formatParsedResult(mediumExamine3, "start")}</span>
|
||||
:
|
||||
<span className="spanBox">{finalExamine3 && formatParsedResult(finalExamine3, "start")}</span>
|
||||
}前GLCC官网将公布{period === 'mediumExamine'?'中期':'结项'}考核结果,敬请留意。</div>
|
||||
{/* 结项考核文案 */}
|
||||
{/* <div>2、“总体评分”这一项将决定学生是否通过本次考核。若总体评分为“S、A、B、C”,则视为通过结项考核。若该结果为“D”,则该课题结项考核不通过,不予发放结项奖金。请各位导师谨慎做出评价。</div>
|
||||
<div>3、导师提交打分结果后,可对考核结果进行更改,期间考核结果也将实时反馈给学生;更改考核结果截止时间为<span className="spanBox">2022年10月20日24点</span>。</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue