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 ec1185bd..606bb52c 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.company_name }); } } diff --git a/src/military/expert/reviewResult/index.jsx b/src/military/expert/reviewResult/index.jsx index 47950aad..94a5bc69 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 || '--'; } }, { diff --git a/src/military/expert/selectExpert/index.jsx b/src/military/expert/selectExpert/index.jsx index 15d7d998..48c50ff6 100644 --- a/src/military/expert/selectExpert/index.jsx +++ b/src/military/expert/selectExpert/index.jsx @@ -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);