forked from Gitlink/forgeplus-react
选择评审专家从后往前空数据bug以及评审结果页显示战队昵称
This commit is contained in:
parent
f71137b8f1
commit
93dfd8d120
|
@ -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.company_name
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 || '--';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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