forked from Gitlink/forgeplus-react
Merge pull request '8000环境合并专家评审最新代码' (#3) from competition into JKDevelop
This commit is contained in:
commit
03c94525aa
|
@ -221,7 +221,6 @@ export async function assignExperts(data){
|
|||
|
||||
//删除指派专家
|
||||
export function deleteExperts(taskExpertId,isDelete) {
|
||||
console.log('taskExpertId',taskExpertId,'isDelete',isDelete);
|
||||
return fetch({
|
||||
url: `/api/taskExpert/${taskExpertId}?isDelete=${isDelete}`,
|
||||
method: 'delete'
|
||||
|
|
|
@ -222,12 +222,13 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
|||
gradesTwo: '',
|
||||
opsContent: item.works_remark,
|
||||
opsFiles: item.work_file.id,
|
||||
opsFilesAttachments: item.work_file,
|
||||
opsFilesAttachments: new Array(item.work_file),
|
||||
opsId: item.id,
|
||||
opsParentId: containerId,
|
||||
opsParentType: containerType,
|
||||
opsType: containerType,
|
||||
status: 2
|
||||
status: 2,
|
||||
competitionTeamName: item.name
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,9 @@ function GradesModal({ setVisible, visible, taskId, opsDetail, containerType })
|
|||
>
|
||||
<div className="opsDetail">
|
||||
综合排名: {opsDetail && opsDetail.id}
|
||||
<span className="ml30">应征者: </span> {opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)}
|
||||
<span className="ml30">{containerType == 1 ? '应征者': '战队名称'}: </span>
|
||||
{containerType == 1 && opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)}
|
||||
{containerType == 2 && opsDetail && opsDetail.competitionTeamName}
|
||||
<span className="ml30">平均得分: </span> {opsDetail && opsDetail.finalGrades || `--`}
|
||||
<span className="ml30">是否胜出: </span> {opsDetail && opsDetail.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : '未胜出'}
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,7 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
|
|||
dataIndex: 'applicantInfo.nickname',
|
||||
key: 'expertName',
|
||||
render: (text, record) => {
|
||||
return text === null ? record.applicantInfo.login : text
|
||||
return containerType ==1 ? text === null ? record.applicantInfo.login : text : record.competitionTeamName || '--';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -65,6 +65,8 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
|
|||
return record.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : status == 4 ? <Checkbox onChange={(e)=>{changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出</Checkbox> : '未胜出';
|
||||
}
|
||||
});
|
||||
}else{
|
||||
columns[1].title = "战队名称";
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
|
@ -197,16 +199,17 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
|
|||
</p>
|
||||
</div>
|
||||
{status > 3 ? <React.Fragment>
|
||||
<p className="font-16 font-w mb10">应征者排名</p>
|
||||
<p className="font-16 font-w mb10">{containerType ==1 ? '应征者':'战队'}排名</p>
|
||||
<PaginationTable
|
||||
dataSource= {dataList}
|
||||
columns= {columns}
|
||||
scroll={{ y: 384 }}
|
||||
/>
|
||||
<div className="openResult">
|
||||
{status == 4 && <button className={(containerType ==1 && winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
|
||||
{/* 公示结果仅保留给创客使用 */}
|
||||
{containerType == 1 && status == 4 && <button className={(containerType ==1 && winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
|
||||
</div>
|
||||
</React.Fragment>:<div className="nodata font-20">暂无数据,此任务暂未进入成果评选阶段。</div>}
|
||||
</React.Fragment>:<div className="nodata font-20">暂无数据,此任务暂未进入{containerType ==1 ? '成果':'竞赛'}评选阶段。</div>}
|
||||
<Modal
|
||||
title= "请确认公示范围"
|
||||
visible= {openResultVisible}
|
||||
|
|
|
@ -187,11 +187,17 @@ function SelectExpert(props) {
|
|||
};
|
||||
expertList(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
let index = 1;
|
||||
for (const item of data.rows) {
|
||||
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `、${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `、${item.reviewAreaThree}`:''}`;
|
||||
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
|
||||
if(data.rows.length === 0 && curPage > 1 && activeKey == 1){
|
||||
// 当前页数据为空跳转到前一页
|
||||
setCurPage(curPage-1);
|
||||
}else{
|
||||
let index = 1;
|
||||
for (const item of data.rows) {
|
||||
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `、${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `、${item.reviewAreaThree}`:''}`;
|
||||
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
setDataList(data && data.rows);
|
||||
setLoading(false);
|
||||
|
@ -210,13 +216,18 @@ function SelectExpert(props) {
|
|||
}
|
||||
selectExpertList(params).then(response=>{
|
||||
if (response && response.data && Array.isArray(response.data.rows)) {
|
||||
let index = 1;
|
||||
for (const item of response.data.rows) {
|
||||
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `、${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `、${item.reviewAreaThree}`:''}`;
|
||||
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
|
||||
if(response.data.rows.length === 0 && curPage > 1 && activeKey == 0){
|
||||
// 当前页数据为空跳转到前一页
|
||||
setCurPage(curPage-1);
|
||||
}else{
|
||||
let index = 1;
|
||||
for (const item of response.data.rows) {
|
||||
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `、${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `、${item.reviewAreaThree}`:''}`;
|
||||
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
|
||||
}
|
||||
setSelectExperts(response && response.data.rows);
|
||||
setSelectedExpertTotal(response && response.data.total);
|
||||
}
|
||||
setSelectExperts(response && response.data.rows);
|
||||
setSelectedExpertTotal(response && response.data.total);
|
||||
}
|
||||
}).finally(()=>{
|
||||
setLoading(false);
|
||||
|
|
Loading…
Reference in New Issue