forked from Gitlink/forgeplus-react
修改意见的显示
This commit is contained in:
parent
1b24a6205c
commit
baaa23e17e
|
@ -80,7 +80,10 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||||
key: 'comments',
|
key: 'comments',
|
||||||
width: 80,
|
width: 80,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <a className="link" onClick={() => { writeComments(text, index, 'comments') }}>{record.status === 2 ? text ? '编辑' : '填写' : '查看'}意见</a>
|
return <Tooltip overlayClassName="expert-tooltip" title={text} placement="top">
|
||||||
|
<a className="link" onClick={() => { writeComments(text, index, 'comments') }}>{record.status === 2 ? text ? '编辑' : '填写' : '查看'}意见</a>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -192,7 +195,7 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||||
}
|
}
|
||||||
setDataList(dataArr);
|
setDataList(dataArr);
|
||||||
disabled && setLoading(false);
|
disabled && setLoading(false);
|
||||||
!disabled && dataArr.length && initScoringDetails(dataArr).then(res => {
|
!disabled && dataArr.length && rules && initScoringDetails(dataArr).then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
setReload(Math.random());
|
setReload(Math.random());
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
@ -326,34 +329,26 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||||
typeof item.gradesFour === 'number' && gradesArr.push(item.gradesFour);
|
typeof item.gradesFour === 'number' && gradesArr.push(item.gradesFour);
|
||||||
typeof item.gradesFive === 'number' && gradesArr.push(item.gradesFive);
|
typeof item.gradesFive === 'number' && gradesArr.push(item.gradesFive);
|
||||||
if (gradesArr.length < gradesNum && gradesArr.length) {
|
if (gradesArr.length < gradesNum && gradesArr.length) {
|
||||||
errorArr.push(index);
|
errorArr.push(index+1);
|
||||||
} else if (!item.comments && gradesArr.length) {
|
} else if (!item.comments && gradesArr.length) {
|
||||||
commentsError.push(index);
|
commentsError.push(index+1);
|
||||||
} else if (gradesArr.length) {
|
} else if (gradesArr.length) {
|
||||||
scoringArr.push(index);
|
scoringArr.push(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorArr.length) {
|
if (errorArr.length) {
|
||||||
let content = '';
|
|
||||||
for (const item of errorArr) {
|
|
||||||
content += `第${item + 1}行数据请填写完整 `;
|
|
||||||
}
|
|
||||||
Info({
|
Info({
|
||||||
title: '提醒',
|
title: '提醒',
|
||||||
content: content,
|
content: `第${errorArr.join(',')}行数据请填写完整`,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commentsError.length) {
|
if (commentsError.length) {
|
||||||
let content = '';
|
|
||||||
for (const item of commentsError) {
|
|
||||||
content += `第${item + 1}行数据请填写意见 `;
|
|
||||||
}
|
|
||||||
Info({
|
Info({
|
||||||
title: '提醒',
|
title: '提醒',
|
||||||
content: content,
|
content: `第${commentsError.join(',')}行数据请填写意见`,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue