修改意见的显示

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',
width: 80,
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);
disabled && setLoading(false);
!disabled && dataArr.length && initScoringDetails(dataArr).then(res => {
!disabled && dataArr.length && rules && initScoringDetails(dataArr).then(res => {
if (res) {
setReload(Math.random());
setLoading(false);
@ -326,34 +329,26 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
typeof item.gradesFour === 'number' && gradesArr.push(item.gradesFour);
typeof item.gradesFive === 'number' && gradesArr.push(item.gradesFive);
if (gradesArr.length < gradesNum && gradesArr.length) {
errorArr.push(index);
errorArr.push(index+1);
} else if (!item.comments && gradesArr.length) {
commentsError.push(index);
commentsError.push(index+1);
} else if (gradesArr.length) {
scoringArr.push(index);
}
}
if (errorArr.length) {
let content = '';
for (const item of errorArr) {
content += `${item + 1}行数据请填写完整 `;
}
Info({
title: '提醒',
content: content,
content: `${errorArr.join('')}行数据请填写完整`,
});
return;
}
if (commentsError.length) {
let content = '';
for (const item of commentsError) {
content += `${item + 1}行数据请填写意见 `;
}
Info({
title: '提醒',
content: content,
content: `${commentsError.join('')}行数据请填写意见`,
});
return;
}