优化评查详情通过/不通过 重新审核按钮切换的操作:只有点击通过/不通过才更新列表
This commit is contained in:
@@ -132,6 +132,12 @@ export function ReviewPointsList({
|
||||
// 重新审核时,不更新结果状态,只更新审核意见和审核状态
|
||||
// console.log('重新审核-------', reviewPointResultId, editAuditStatusId || '', 'review', message);
|
||||
onStatusChange(reviewPointResultId, editAuditStatusId || '', 'review', message);
|
||||
|
||||
// 找到当前评查点并更新其editAuditStatus为0,使其立即显示通过/不通过按钮
|
||||
const updatedReviewPoint = reviewPoints.find(point => point.id === reviewPointResultId);
|
||||
if (updatedReviewPoint) {
|
||||
updatedReviewPoint.editAuditStatus = 0;
|
||||
}
|
||||
} else {
|
||||
// 通过/不通过时,更新结果状态和审核意见
|
||||
// console.log('通过/不通过-------', reviewPointResultId, editAuditStatusId || '', action === 'approve' ? 'true' : 'false', message);
|
||||
@@ -585,7 +591,11 @@ export function ReviewPointsList({
|
||||
{value ? '' : '缺失'}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs text-left select-text">{value || (value === '' ? <span className="invisible">占位符</span> : '')}</p>
|
||||
<p className="text-xs text-left select-text">
|
||||
{typeof value === 'object' && value !== null
|
||||
? (value.value || (value.value === '' ? <span className="invisible">占位符</span> : ''))
|
||||
: (value || (value === '' ? <span className="invisible">占位符</span> : ''))}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
{/* 修改评查结果的结构之后,显示新的结构 */}
|
||||
@@ -685,7 +695,11 @@ export function ReviewPointsList({
|
||||
{value ? '' : '缺失'}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs text-left select-text">{value || (value === '' ? <span className="invisible">占位符</span> : '')}</p>
|
||||
<p className="text-xs text-left select-text">
|
||||
{typeof value === 'object' && value !== null
|
||||
? (value.value || (value.value === '' ? <span className="invisible">占位符</span> : ''))
|
||||
: (value || (value === '' ? <span className="invisible">占位符</span> : ''))}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
{/* 修改评查结果的结构之后,显示新的结构 */}
|
||||
@@ -803,7 +817,11 @@ export function ReviewPointsList({
|
||||
{value ? '' : '缺失'}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs text-left select-text">{value || (value === '' ? <span className="invisible">占位符</span> : '')}</p>
|
||||
<p className="text-xs text-left select-text">
|
||||
{typeof value === 'object' && value !== null
|
||||
? (value.value || (value.value === '' ? <span className="invisible">占位符</span> : ''))
|
||||
: (value || (value === '' ? <span className="invisible">占位符</span> : ''))}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
{/* 修改评查结果的结构之后,显示新的结构 */}
|
||||
|
||||
@@ -413,7 +413,7 @@ export default function ReviewDetails() {
|
||||
});
|
||||
|
||||
// 从API获取最新数据刷新列表
|
||||
if (document && document.id) {
|
||||
if (document && document.id && newStatus !== 'review') {
|
||||
await refreshReviewData(document.id.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user