修改意见的显示

This commit is contained in:
何童崇 2022-01-18 17:42:48 +08:00
parent 1b24a6205c
commit baaa23e17e
1 changed files with 9 additions and 14 deletions

View File

@ -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;
} }