forked from Gitlink/forgeplus-react
Merge branch 'pre_gitlink_server' of http://106.75.45.236:3000/Gitlink/forgeplus-react into feature_websiteBuild
This commit is contained in:
commit
cdfb709e0c
|
@ -152,6 +152,15 @@ export function getAuditList(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 审核课题列表(匹配成功)
|
||||
export function getLockedAuditList(params) {
|
||||
return fetch({
|
||||
url: '/api/applyInformation/lockedAuditList',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 导师审核报名课题
|
||||
export function auditPassTask(data) {
|
||||
return fetch({
|
||||
|
@ -249,3 +258,31 @@ export async function findStudentTaskByTaskId(params) {
|
|||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 返回年月日时间
|
||||
export function formatParsedResult(setting, type= "range") {
|
||||
if(setting && setting[0]){
|
||||
const dataMap = setting[0].value.split(',');
|
||||
const startDate = new Date(dataMap[0]);
|
||||
const endDate = new Date(dataMap[1]);
|
||||
|
||||
const startYear = startDate.getFullYear();
|
||||
const startMonth = startDate.getMonth() + 1;
|
||||
const startDay = startDate.getDate();
|
||||
const startHour = startDate.getHours();
|
||||
|
||||
const endYear = endDate.getFullYear();
|
||||
const endMonth = endDate.getMonth() + 1;
|
||||
const endDay = endDate.getDate();
|
||||
const endHour = endDate.getHours();
|
||||
|
||||
let result = `${startYear}年${startMonth}月${startDay}日${startHour}点-${endYear}年${endMonth}月${endDay}日${endHour}点`;
|
||||
if(type === "start"){
|
||||
result= `${startYear}年${startMonth}月${startDay}日${startHour}点`;
|
||||
}else if(type === "end"){
|
||||
result= `${endYear}年${endMonth}月${endDay}日${endHour}点`;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -22,7 +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} = props;
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic, hasRole, isMediumExamineByToTutor, checkedTaskId} = props;
|
||||
|
||||
useEffect(() => {
|
||||
if (!current_user.user_id) {
|
||||
|
@ -51,7 +51,7 @@ export default (props) => {
|
|||
</div> */}
|
||||
{/* 往期回顾 */}
|
||||
{round !== 2 && <div className="applyBox">
|
||||
<Link className="apply" to={`/glcc/${id}/final/result`}>
|
||||
<Link className="apply" to={`/glcc/${id}/result`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">考核结果</span>
|
||||
|
@ -123,30 +123,30 @@ export default (props) => {
|
|||
<div className="pt6">查看各课题入选学生名单</div>
|
||||
</div>}
|
||||
|
||||
{/* 学生结项考核 */}
|
||||
{/* {!hasRole && checkedTaskId && <Link className="apply" to={`/glcc/submission`}>
|
||||
{/* 学生中期考核 */}
|
||||
{period === "mediumExamine1" && checkedTaskId && <Link className="apply" to={`/glcc/submit`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">结项考核</span>
|
||||
<span className="til">中期考核</span>
|
||||
</div>
|
||||
<div className="pt6">学生提交考核材料</div>
|
||||
</Link>} */}
|
||||
{/* 导师结项考核 */}
|
||||
{/* {hasRole && new Date().getTime() > new Date('2022/10/01 8:0').getTime() && <Link className="apply" to={`/glcc/final/examination`}>
|
||||
</Link>}
|
||||
{/* 导师中期考核 */}
|
||||
{hasRole && isMediumExamineByToTutor && <Link className="apply" to={`/glcc/middle/examination`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
<span className="til">结项考核</span>
|
||||
<span className="til">中期考核</span>
|
||||
</div>
|
||||
<div className="pt6">导师拟定结项考核结果</div>
|
||||
</Link>} */}
|
||||
<div className="pt6">导师拟定中期考核结果</div>
|
||||
</Link>}
|
||||
{/* 结项考核结果公示页 */}
|
||||
{/* {<Link className="apply" to={`/glcc/final/result`}>
|
||||
{period === "mediumExamine3" && <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 className="pt6">中期课题考核结果公示</div>
|
||||
</Link>}
|
||||
</div>}
|
||||
{/* </div> */}
|
||||
<div className="introduce">
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 894 KiB |
Binary file not shown.
After Width: | Height: | Size: 895 KiB |
|
@ -100,7 +100,8 @@ const Glcc = (propsF) => {
|
|||
const [isMatching, setIsMatching] = useState(false);
|
||||
// 导师-学生配对结果公示阶段
|
||||
const [isResultPublic, setIsResultPublic] = useState(false);
|
||||
console.log('isResultPublic', isResultPublic);
|
||||
// 导师中期考核评审阶段
|
||||
const [isMediumExamineByToTutor, setIsMediumExamineByToTutor] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && id === "2022"){
|
||||
|
@ -125,8 +126,11 @@ const Glcc = (propsF) => {
|
|||
// 是否处于导师-学生配对结果公示阶段
|
||||
const resultPublic = res.data.filter(item=>item.name === "stuPublic");
|
||||
resultPublic[0] && setIsResultPublic(judge(nowTime, resultPublic[0].value, "range"))
|
||||
// 是否处于导师中期考核评审阶段
|
||||
const mediumExamine2 = res.data.filter(item=>item.name === "mediumExamine2");
|
||||
mediumExamine2[0] && setIsMediumExamineByToTutor(judge(nowTime, mediumExamine2[0].value, "range"))
|
||||
// 过滤掉 可并行进行的阶段
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1", "matching", "stuPublic"].indexOf(item.name) === -1);
|
||||
const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1", "matching", "stuPublic", "mediumExamine2"].indexOf(item.name) === -1);
|
||||
const periodIndex = filterRepoPublic.findIndex(item=>judge(nowTime, item.value, "range"));
|
||||
periodIndex !== -1 && setPeriod(filterRepoPublic[periodIndex].name);
|
||||
}
|
||||
|
@ -164,17 +168,17 @@ const Glcc = (propsF) => {
|
|||
const [hasRole, setHasRole] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// 登录状态+导师-学生配对阶段
|
||||
current_user && current_user.user_id && isMatching && hasAuditRole({ userId: current_user.user_id, round: currentRound }).then(res => {
|
||||
// 登录状态+导师-学生配对阶段/中期审核
|
||||
current_user && current_user.user_id && (isMatching || isMediumExamineByToTutor) && hasAuditRole({ userId: current_user.user_id, round: currentRound }).then(res => {
|
||||
if (res && res.message === 'success' && res.data.hasRole) {
|
||||
setHasRole(true);
|
||||
}
|
||||
})
|
||||
}, [current_user, isMatching])
|
||||
}, [current_user, isMatching, isMediumExamineByToTutor])
|
||||
|
||||
useEffect(()=>{
|
||||
// 获取用户课题报名信息(todo:学生报名阶段请求)
|
||||
(period === "stuApply" || period === "stuApply1") && current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id, round: round}).then(response=>{
|
||||
// 获取用户课题报名信息
|
||||
(period === "stuApply" || period === "stuApply1" || period === "mediumExamine1") && 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 = {};
|
||||
|
@ -182,8 +186,9 @@ const Glcc = (propsF) => {
|
|||
response.data && response.data.registrationStudentTaskList.map(item=>{
|
||||
data[item.taskId] = item.id;
|
||||
item.locked && setLockedTaskName(item.taskName);
|
||||
item.passStatus && item.mediumExaminationPass && setCheckedTaskId(item.taskId);
|
||||
item.passStatus && item.mediumExaminationPass && setStudentRegId(item.studentRegId);
|
||||
// 结项考核: && item.mediumExaminationPass
|
||||
item.locked && setCheckedTaskId(item.taskId);
|
||||
item.locked && setStudentRegId(item.studentRegId);
|
||||
// 取当前报名的课题数()
|
||||
if(item.subRound === 1){
|
||||
data1[item.taskId] = item.id;
|
||||
|
@ -308,34 +313,34 @@ const Glcc = (propsF) => {
|
|||
></Route>
|
||||
|
||||
{/* 中期审核-结果公示 */}
|
||||
<Route
|
||||
path="/glcc/:id/final/result"
|
||||
{(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}/>
|
||||
)}
|
||||
></Route>
|
||||
></Route>}
|
||||
|
||||
{/* 中期审核-学生 */}
|
||||
<Route
|
||||
path="/glcc/submission"
|
||||
{period === "mediumExamine1" && <Route
|
||||
path="/glcc/submit"
|
||||
render={(props) => (
|
||||
<StudentSubmit current_user={current_user} history={props.history} checkedTaskId={checkedTaskId} studentRegId={studentRegId}/>
|
||||
<StudentSubmit current_user={current_user} history={props.history} checkedTaskId={checkedTaskId} studentRegId={studentRegId} period={period} currentRound={currentRound} glccSettings={glccSettings} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
)}
|
||||
></Route>
|
||||
></Route>}
|
||||
|
||||
{/* 中期审核-导师 */}
|
||||
<Route
|
||||
path="/glcc/final/examination"
|
||||
{isMediumExamineByToTutor && <Route
|
||||
path="/glcc/middle/examination"
|
||||
render={(props) => (
|
||||
<TutorReview current_user={current_user} history={props.history} />
|
||||
<TutorReview current_user={current_user} history={props.history} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor} currentRound={currentRound} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>
|
||||
></Route>}
|
||||
|
||||
{/* 首页 */}
|
||||
<Route
|
||||
path="/glcc/:id"
|
||||
render={(props) => (
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
@ -343,7 +348,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}/>
|
||||
<Home repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} checkedTaskId={checkedTaskId} glccSettings={glccSettings} showMatchingBut={isMatching && hasRole} isResultPublic={isResultPublic} hasRole={hasRole} isMediumExamineByToTutor={isMediumExamineByToTutor}/>
|
||||
)}
|
||||
></Route>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Input, Table, Tooltip, Checkbox } from 'antd';
|
|||
import { getMediumTermExamineInfoList } from '../api';
|
||||
import ProjectDetail from '../project/component/projectDetail';
|
||||
import resultBanner from "../img/resultBanner3.png";
|
||||
import resultBanner1 from "../img/resultBanner4.png";
|
||||
import bgPng from "../img/bgPng.png";
|
||||
import './index.scss';
|
||||
import '../checkResult/index.scss';
|
||||
|
@ -11,7 +12,7 @@ import '../project/index.scss';
|
|||
const { Search } = Input;
|
||||
|
||||
// 课题列表
|
||||
function CheckResult({current_user, history, round, id}) {
|
||||
function CheckResult({round, id}) {
|
||||
// 输入搜索框
|
||||
const [keyword, setKeyword] = useState(undefined);
|
||||
const [data, setData] = useState([]);
|
||||
|
@ -29,7 +30,7 @@ function CheckResult({current_user, history, round, id}) {
|
|||
curPage: current,
|
||||
keyword,
|
||||
pageSize,
|
||||
term: 2,
|
||||
term: id === "2023" ? 1 : 2,
|
||||
round
|
||||
}
|
||||
getMediumTermExamineInfoList(params).then(response => {
|
||||
|
@ -97,10 +98,10 @@ function CheckResult({current_user, history, round, id}) {
|
|||
|
||||
return (
|
||||
<div className="interimBox taskList resultListBox">
|
||||
<img className="bannerInterim" src={resultBanner} alt=""></img>
|
||||
<img className="bannerInterim" src={id === "2023" ? resultBanner1 : resultBanner} alt=""></img>
|
||||
<div className='bgBox'>
|
||||
<div className="resultList">
|
||||
<div className='goBackBox'><a href={`/glcc/${id}`}>开源夏令营 / </a>结项课题考核结果公示</div>
|
||||
<div className='goBackBox'><a href={`/glcc/${id}`}>开源夏令营 / </a>{id === "2023" ? '中期' : '结项'}课题考核结果公示</div>
|
||||
<div className='searchBox'>
|
||||
<Search className='search' placeholder='请输入学生姓名或课题名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
|
||||
<div style={{width: 100}}></div>
|
||||
|
|
|
@ -2,28 +2,37 @@ import React, { useEffect, useState } from "react";
|
|||
import { Form, Upload, Input, Icon, Button, message, Modal } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
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} from '../api';
|
||||
import {getMediumTermExamineInfo, submitMedium, formatParsedResult} from '../api';
|
||||
import './index.scss';
|
||||
|
||||
function StudentSubmit(props){
|
||||
const {form, checkedTaskId, studentRegId, history} = props;
|
||||
const {form, checkedTaskId, studentRegId, period, currentRound, glccSettings, isMediumExamineByToTutor} = props;
|
||||
const mediumExamine = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine1");
|
||||
const mediumExamine2 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine2");
|
||||
let overtime = false;
|
||||
if(mediumExamine2 && mediumExamine2[0]){
|
||||
const nowTime = new Date().getTime();
|
||||
const timeArr = mediumExamine2[0].value.split(",").map(item=>{
|
||||
// replaceAll不兼容低版本浏览器(如搜狗)
|
||||
const data = item && item.replace(/-/g,'/');
|
||||
return new Date(data).getTime()
|
||||
});
|
||||
overtime = nowTime > timeArr[1];
|
||||
}
|
||||
const {getFieldDecorator, validateFieldsAndScroll } = form;
|
||||
const [detail, setDetail] = useState(undefined);
|
||||
const [reload, setReload] = useState(undefined);
|
||||
const [fileList, setFileList] = useState(undefined);
|
||||
// 学生提交信息之后按钮置灰(确保无重复提交)
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
// 学生提交材料时间
|
||||
const submitTime = new Date().getTime() < new Date('2022/10/17 24:0').getTime();
|
||||
// 学生提醒导师评分时间
|
||||
const lookTime = new Date().getTime() > new Date('2022/10/15 0:0').getTime() && new Date().getTime() < new Date('2022/10/23 24:0').getTime();
|
||||
|
||||
useEffect(()=>{
|
||||
// 查询是否已经提交考核材料
|
||||
checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{term: 2}).then(res=>{
|
||||
checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: period === "mediumExamine1" ? 1 : 2}).then(res=>{
|
||||
if(res && res.message === "success"){
|
||||
setDetail(res.data);
|
||||
}
|
||||
|
@ -37,18 +46,19 @@ function StudentSubmit(props){
|
|||
validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
Modal.confirm({
|
||||
title: "确认提交结项考核材料?",
|
||||
title: `确认提交${period === "mediumExamine1" ? '中期' : '结项'}考核材料?`,
|
||||
content: "提交后将无法修改考核材料,请进行二次确认",
|
||||
onOk: ()=>{
|
||||
const {pptAttachment, defenceVideoUrl, codeOrPrUrl} = values;
|
||||
const pptAttachmentId = pptAttachment.file.response.data.id;
|
||||
const pptAttachmentId = pptAttachment.file && pptAttachment.file.response && pptAttachment.file.response.data.id;
|
||||
const params = {
|
||||
pptAttachmentId,
|
||||
codeOrPrUrl,
|
||||
defenceVideoUrl,
|
||||
taskId: checkedTaskId,
|
||||
studentRegId: studentRegId,
|
||||
term: 2
|
||||
round: currentRound,
|
||||
term: period === "mediumExamine1" ? 1 : 2
|
||||
}
|
||||
submitMedium(params).then(res=>{
|
||||
if(res && res.message === "success"){
|
||||
|
@ -72,30 +82,38 @@ function StudentSubmit(props){
|
|||
}
|
||||
})
|
||||
}
|
||||
// 检查文件上传是否符合规定
|
||||
|
||||
function changeFileList(e) {
|
||||
const {fileList} = e;
|
||||
const lastFile = fileList.splice(fileList.length-1, fileList.length);
|
||||
setFileList(lastFile);
|
||||
const {file} = e;
|
||||
file && file.status && setFileList([file]);
|
||||
}
|
||||
|
||||
// 检查文件上传是否符合规定
|
||||
function beforeUpload(file){
|
||||
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||
if (!isLt100M) {
|
||||
message.error(`文件大小必须小于${100}MB!`);
|
||||
}
|
||||
return isLt100M;
|
||||
}
|
||||
return <div className="interimBox">
|
||||
<img src={banner} alt="" className="bannerInterim"/>
|
||||
<img src={period === "mediumExamine1" ? banner1 : banner} alt="" className="bannerInterim"/>
|
||||
<img src={bg} alt="" className="bg1"/>
|
||||
<img src={bg} alt="" className="bg2"/>
|
||||
<div className="mainBox">
|
||||
<div className="navBox font-16"><Link to={`/glcc`} className="linkBox">开源夏令营 / </Link>提交结项考核材料</div>
|
||||
<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={httpUrl+`/busiAttachments/download/${main_site_url.indexOf("gitlink") === -1 ? '211' : '743'}`} className="blueSpan">下载PPT模板</a> ,根据课题开发进展,按照PPT模板要求填写课题学习调研方案、开发进度及开发成果等考核材料;</div>
|
||||
<div>1、请各位学生<a href={main_site_url+`/api/attachments/${period === "mediumExamine1" ? '428107' : '427720'}`} className="blueSpan">下载PPT模板</a> ,根据课题开发进展,按照PPT模板要求填写课题学习调研方案、开发进度及开发成果等考核材料;</div>
|
||||
<div>2、欢迎各位学生录制本课题答辩视频,将视频链接填写至下方视频介绍填写栏;</div>
|
||||
<div>3、学生提交考核材料的时间为<span className="spanBox">2022年10月1日8点至2022年10月14日24点</span>,请在截止时间前提交;</div>
|
||||
<div>3、学生提交考核材料的时间为<span className="spanBox">{formatParsedResult(mediumExamine)}</span>,请在截止时间前提交;</div>
|
||||
<div>4、若导师已给出评分,各位学生可在此页面查看自己的结项考核成绩。对考核成绩有异议的学生请及时联系您的导师。</div>
|
||||
</div>
|
||||
<div className="titleBox mt25 font-18">
|
||||
<img src={img1} alt="" width={24} className="mr5"/>
|
||||
结项考核
|
||||
{period === "mediumExamine1" ? '中期' : '结项'}考核
|
||||
</div>
|
||||
{submitTime && !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', {
|
||||
rules: [{ required: true, message: '请输入视频链接!'}, {pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}],
|
||||
|
@ -109,7 +127,7 @@ function StudentSubmit(props){
|
|||
<Form.Item label="PPT附件" className="referItem oneCont">
|
||||
{getFieldDecorator('pptAttachment', {
|
||||
rules: [{ required: true, message: '请上传PPT附件!' }],
|
||||
})(<Upload className="avatar-uploader" action={httpUrl + `/busiAttachments/upload`} 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>)}
|
||||
</Form.Item>
|
||||
<Form.Item className="referItem oneCont">
|
||||
|
@ -122,8 +140,8 @@ function StudentSubmit(props){
|
|||
<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 && lookTime && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">您的课题导师暂未评分,请提醒导师尽快提交结项考核评分</div>}
|
||||
{detail && new Date().getTime() > new Date('2022/10/24 10:0').getTime() && !detail.glccTutorEvaluation && <div className="font-15 nullDateTip">很遗憾,您的导师尚未评分,您未通过结项考核</div>}
|
||||
{detail && isMediumExamineByToTutor && !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>
|
||||
<div className="mt10 mb10 smallTil">
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, {useState, useEffect, useCallback} from "react";
|
|||
import { Form, Input, Icon, Button, Tabs, Radio, message } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
import bg from '../img/bgPng.png';
|
||||
import { getAuditList, getMediumTermExamineInfo, submitTutorEvaluation, updateTutorEvaluation, hasAuditRole } from '../api';
|
||||
import { getLockedAuditList, getMediumTermExamineInfo, submitTutorEvaluation, updateTutorEvaluation, hasAuditRole, formatParsedResult } from '../api';
|
||||
import './index.scss';
|
||||
import '../check/index.scss'
|
||||
import Nodata from "../../forge/Nodata";
|
||||
|
@ -11,7 +11,7 @@ const { TabPane } = Tabs;
|
|||
const { TextArea } = Input;
|
||||
|
||||
function TutorReview(props){
|
||||
const {form, current_user, showNotification, history} = props;
|
||||
const {form, current_user, showNotification, history, hasRole, isMediumExamineByToTutor, currentRound, glccSettings} = props;
|
||||
const {getFieldDecorator, setFieldsValue, validateFieldsAndScroll, resetFields } = form;
|
||||
const [taskId, setTaskId] = useState();
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
@ -22,20 +22,15 @@ function TutorReview(props){
|
|||
const [isEdit, setIsEdit] = useState(false);
|
||||
// 导师提交信息之后按钮置灰(确保无重复提交)
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
|
||||
const mediumExamine2 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine2");
|
||||
const mediumExamine3 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine3");
|
||||
useEffect(() => {
|
||||
if(!new Date().getTime() > new Date('2022/10/01 8:0').getTime()){
|
||||
if(!isMediumExamineByToTutor || !hasRole){
|
||||
history.push("/glcc");
|
||||
}else if (!current_user.login) {
|
||||
history.push('/login?go_page=/glcc/final/examination');
|
||||
}else{
|
||||
hasAuditRole({ userId: current_user.user_id }).then(res => {
|
||||
if (!(res && res.message == 'success' && res.data.hasRole)) {
|
||||
history.push('/glcc');
|
||||
}
|
||||
})
|
||||
history.push('/login?go_page=/glcc/middle/examination');
|
||||
}
|
||||
getAuditList({ userId: current_user.user_id, pass: 1 }).then(res => {
|
||||
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})
|
||||
setTaskList(filterStuNull);
|
||||
|
@ -48,7 +43,8 @@ function TutorReview(props){
|
|||
|
||||
useEffect(()=>{
|
||||
// 查询是否已经提交考核材料
|
||||
taskId && getMediumTermExamineInfo(taskId,{term: 2}).then(res=>{
|
||||
// 结项考核
|
||||
taskId && getMediumTermExamineInfo(taskId,{round: currentRound, term: isMediumExamineByToTutor ? 1 : 2}).then(res=>{
|
||||
if(res && res.message === "success"){
|
||||
setDetail(res.data);
|
||||
if(res && res.data && res.data.glccTutorEvaluation){
|
||||
|
@ -69,7 +65,8 @@ function TutorReview(props){
|
|||
...values,
|
||||
mediumTermExamineMaterialId: detail.id,
|
||||
tutorUserId: detail.studentRegId,
|
||||
term: 2
|
||||
round: currentRound,
|
||||
term: isMediumExamineByToTutor ? 1 : 2
|
||||
}
|
||||
if(detail.glccTutorEvaluation){
|
||||
params['id'] = detail.glccTutorEvaluation.id;
|
||||
|
@ -88,6 +85,8 @@ function TutorReview(props){
|
|||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
setDisabled(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -116,9 +115,13 @@ 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>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”,则视为通过结项考核。若该结果为“D”,则该课题结项考核不通过,不予发放结项奖金。请各位导师谨慎做出评价。</div>
|
||||
<div>3、导师提交打分结果后,可对考核结果进行更改,期间考核结果也将实时反馈给学生;更改考核结果截止时间为<span className="spanBox">2022年10月20日24点</span>。</div>
|
||||
<div>4、北京时间<span className="spanBox">2022年10月24日20点</span>前GLCC官网将公布结项考核结果,敬请留意。</div>
|
||||
<div>4、北京时间<span className="spanBox">2022年10月24日20点</span>前GLCC官网将公布结项考核结果,敬请留意。</div> */}
|
||||
</div>
|
||||
<div className="tutorContent">
|
||||
<Tabs className="task-tabs" onChange={(e) => { resetFields(); setTaskId(e); setIsEdit(false); setWordNum(0); setDisabled(false);}} activeKey={taskId + ''}>
|
||||
|
@ -175,7 +178,7 @@ function TutorReview(props){
|
|||
<div className="wordNum">{wordNum} / 2000</div>
|
||||
</div>
|
||||
{/* 导师结项考核时间为true */}
|
||||
{false && <Form.Item className="referItem oneCont">
|
||||
{isMediumExamineByToTutor && <Form.Item className="referItem oneCont">
|
||||
{(!detail.glccTutorEvaluation || (detail.glccTutorEvaluation && isEdit)) && <Button style={{width: '100px', height: '36px'}} className="mt20" type="primary" htmlType="submit" disabled={disabled}>{detail.glccTutorEvaluation ? '保存' : '提交'}</Button>}
|
||||
{detail.glccTutorEvaluation && !isEdit && <Button style={{width: '100px', height: '36px'}} className="mt20" type="primary" onClick={()=>{setIsEdit(true);setDisabled(false);}}>修改</Button>}
|
||||
</Form.Item>}
|
||||
|
|
Loading…
Reference in New Issue