From baaa23e17eedd18d62a0e76847ddf618dacd247f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <1261960504@qq.com> Date: Tue, 18 Jan 2022 17:42:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=84=8F=E8=A7=81=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expert/expertUser/taskDetail/index.jsx | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/military/expert/expertUser/taskDetail/index.jsx b/src/military/expert/expertUser/taskDetail/index.jsx index 36ca5d2d..c03c0dcf 100644 --- a/src/military/expert/expertUser/taskDetail/index.jsx +++ b/src/military/expert/expertUser/taskDetail/index.jsx @@ -80,7 +80,10 @@ function ReviewTasks({ showNotification, match, history, current_user }) { key: 'comments', width: 80, render: (text, record, index) => { - return { writeComments(text, index, 'comments') }}>{record.status === 2 ? text ? '编辑' : '填写' : '查看'}意见 + return + { writeComments(text, index, 'comments') }}>{record.status === 2 ? text ? '编辑' : '填写' : '查看'}意见 + + } }, ]; @@ -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; }