diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index b804372..3d3b06d 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -339,19 +339,29 @@ currentRows.fileList = fileList + for (let key in formData) { + let curTd = tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-key=' + key + ']') + + if (curTd.length > 0) { + $(curTd).text(formData[key]); + } else { + console.log('没有找到对应的 td:', key); + } + } + // 更新当前行的表格数据 - let colsNew = tableView.find('tr[data-index=' + rowIndex + ']').find('td'); + // let colsNew = tableView.find('tr[data-index=' + rowIndex + ']').find('td'); // 遍历所有列,更新相应的单元格 - colsNew.each(function (index, td) { - // 获取字段名,和表格列的字段对应 - let fieldName = dialogLabelInfo[index]?.field; + // colsNew.each(function (index, td) { + // // 获取字段名,和表格列的字段对应 + // let fieldName = dialogLabelInfo[index]?.field; - // 如果该列对应的字段存在,则更新该单元格的值 - if (fieldName && currentRows[fieldName] !== undefined) { - $(td).text(currentRows[fieldName]); - } - }) + // // 如果该列对应的字段存在,则更新该单元格的值 + // if (fieldName && currentRows[fieldName] !== undefined) { + // $(td).text(formData[fieldName]); + // } + // }) // let dataForm = { // templateId: getUrlParam('templateId'), // evaluateId: getUrlParam('id'),