diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 484d5b5..9213114 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -371,7 +371,14 @@ let curTd = tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-field=' + key + ']') if (curTd.length > 0) { - $(curTd).find('.layui-table-cell').text(formData[key]); + $(curTd).find('.layui-table-cell').text(formData[key]) + let isIcon = $(curTd).find('.layui-table-cell').find('.layui-icon-file-b') > 0 + if (tableRowList[rowIndex][`${key}-file`] && tableRowList[rowIndex][`${key}-file`]['fileName'] != '' && !isIcon) { + $(curTd).find('.layui-table-cell').append(` `) + } + if (tableRowList[rowIndex][`${key}-file`] && tableRowList[rowIndex][`${key}-file`]['fileName'] == '' && isIcon) { + $(curTd).find('.layui-table-cell').find('layui-icon-file-b').remove() + } } } layer.msg('保存成功'); @@ -416,11 +423,6 @@ }) $(`#uploadBtn${Index}`).show() - let hasIcon = tableView.find('tr[data-index=' + dataIndex + ']').find('td[data-field=' + dataId + ']').find('.layui-table-cell').find('.layui-icon') > 0 - - if (hasIcon) { - tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-field=' + dataId + ']').find('.layui-table-cell').find('.layui-icon').remove() - } }) tableLoading && layer.close(tableLoading); }