diff --git a/src/military/expert/api.js b/src/military/expert/api.js index 183956b4..54b3a6be 100644 --- a/src/military/expert/api.js +++ b/src/military/expert/api.js @@ -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' diff --git a/src/military/expert/expertUser/taskDetail/index.jsx b/src/military/expert/expertUser/taskDetail/index.jsx index 04e020b1..2bf39d60 100644 --- a/src/military/expert/expertUser/taskDetail/index.jsx +++ b/src/military/expert/expertUser/taskDetail/index.jsx @@ -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 }); } } diff --git a/src/military/expert/reviewResult/gradesModal/index.jsx b/src/military/expert/reviewResult/gradesModal/index.jsx index 53f0d2b5..91fbcfcf 100644 --- a/src/military/expert/reviewResult/gradesModal/index.jsx +++ b/src/military/expert/reviewResult/gradesModal/index.jsx @@ -145,7 +145,9 @@ function GradesModal({ setVisible, visible, taskId, opsDetail, containerType }) >
综合排名: {opsDetail && opsDetail.id} - 应征者:   {opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)} + {containerType == 1 ? '应征者': '战队名称'}:   + {containerType == 1 && opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)} + {containerType == 2 && opsDetail && opsDetail.competitionTeamName} 平均得分:   {opsDetail && opsDetail.finalGrades || `--`} 是否胜出:   {opsDetail && opsDetail.isWin ?
胜出
: '未胜出'}
diff --git a/src/military/expert/reviewResult/index.jsx b/src/military/expert/reviewResult/index.jsx index 7aa7e084..80f76c68 100644 --- a/src/military/expert/reviewResult/index.jsx +++ b/src/military/expert/reviewResult/index.jsx @@ -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 ?
胜出
: status == 4 ? {changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出 : '未胜出'; } }); + }else{ + columns[1].title = "战队名称"; } useEffect(()=>{ @@ -197,16 +199,17 @@ function ReviewResult({ history, match, mygetHelmetapi}) {

{status > 3 ? -

应征者排名

+

{containerType ==1 ? '应征者':'战队'}排名

- {status == 4 && } + {/* 公示结果仅保留给创客使用 */} + {containerType == 1 && status == 4 && }
-
:
暂无数据,此任务暂未进入成果评选阶段。
} + :
暂无数据,此任务暂未进入{containerType ==1 ? '成果':'竞赛'}评选阶段。
} { 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);