diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 371c0f4..b60e9cb 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -24,6 +24,12 @@ .layui-layer-iframe .layui-layer-btn0 { display: none; } + + .td-container { + display: flex; + align-items: center; + justify-content: space-around; + } @@ -203,7 +209,8 @@ if (index > 2 && index != cols.length - 1) { $(this).data('edit', 'false'); $(this).removeAttr('data-edit'); - $(this).addClass('layui-disabled'); + // $(this).addClass('layui-disabled'); + $(this).addClass('td-container'); //将td元素的contentEditable属性设置为false,禁止编辑 $(this).attr('contentEditable', 'false'); //将td元素的style属性设置为pointer-events: none,禁止点击 @@ -212,15 +219,15 @@ let fileDom = ''; // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - // if (item1.fileList && item1.fileList.length > 0) { - // // 根据文件列表的索引判断将哪个文件添加到相应的列 - // fileDom = `${item1.fileList[index - 3]}`; - // } + if (item1.fileList && item1.fileList.length > 0) { + // 根据文件列表的索引判断将哪个文件添加到相应的列 + fileDom = `${item1.fileList[index - 3].name}`; + } - // console.log('fileDomfileDomfileDomfileDom', fileDom) + console.log('fileDomfileDomfileDomfileDom', fileDom) - // // 将fileDom添加到当前单元格 - // $(this).append(fileDom); + // 将fileDom添加到当前单元格 + $(this).append(fileDom); } }); @@ -257,9 +264,48 @@ let formHtml = `
${tableList[rowIndex].proName}
` let innerHtml = '' dialogLabelList.forEach((e, index) => { - fileList.push('') - uploadDom.push('#uploadBtn' + index) - innerHtml += `
+ + if (tableList[rowIndex].tableList && tableList[rowIndex].tableList.length > 0) { + + if (tableList[rowIndex].tableList[index].name && tableList[rowIndex].tableList[index].path) { + fileList.push({ + name: tableList[rowIndex].tableList[index].name, + path: tableList[rowIndex].tableList[index].path, + }) + + uploadDom.push('#uploadBtn' + index) + innerHtml += `
+
${e.title}
+ + +
${tableList[rowIndex].tableList[index].name}
+
` + } else { + fileList.push({ + name: '', + path: '', + }) + uploadDom.push('#uploadBtn' + index) + innerHtml += `
+
${e.title}
+ +
+
` + } + + + } else { + fileList.push({ + name: '', + path: '', + }) + uploadDom.push('#uploadBtn' + index) + innerHtml += `
${e.title}
` + } + }) @@ -298,7 +346,8 @@ console.log('文件上传成功'); console.log(res); var dataIndex = $(this.elem).data('index'); - fileList[dataIndex] = res.obj + fileList[dataIndex].path = res.obj + fileList[dataIndex].name = res.message // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() @@ -382,7 +431,9 @@ var dataIndex = $(this).data('index'); console.log('删除图标被点击,data-index:', dataIndex); - fileList[dataIndex] = '' + fileList[dataIndex].path = '' + fileList[dataIndex].name = '' + // 执行删除操作 // $(this).parent().remove() $(`#upload-success_${dataIndex}`).hide(function () {