From fedd8da19670aae72c5632a0f98b61269c966c85 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 09:42:45 +0800 Subject: [PATCH 01/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 1bff001..297a5c3 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -229,15 +229,11 @@ // 将自定义元素插入到最后一个单元格 div.append(customElement); customElement.on('click', function (event) { - event.stopPropagation(); // 阻止事件冒泡 + event.stopPropagation() event.preventDefault() - console.log('按钮被点击了'); let rowIndex = $(this).closest('tr').data('index') const tableList = JSON.parse(msg) - - - console.log('rowIndex当前行的索引', rowIndex) - // 在这里添加按钮点击后的逻辑 + let fileList = [] // 组装dom let formHtml = `
${tableList[rowIndex].proName}
` @@ -278,27 +274,22 @@ accept: 'file', // 选择文件类型 multiple: false, // 支持多文件上传 auto: true, // 禁用自动上传,点击确定按钮后上传 - bindAction: '#uploadConfirm', // 确定按钮触发上传 choose: function (obj) { // 当选择文件时会触发这个方法 var files = obj.pushFile(); // 获取文件列表 console.log(files); - obj.pushFile([]) }, done: function (res) { // 上传完毕回调 console.log('文件上传成功'); console.log(res); - var dataIndex = $(this.elem).data('index'); - console.log('当前按钮的 data-index:', dataIndex); + fileList[dataIndex] = res.obj // 隐藏当前上传按钮 - // $(this.elem).hide(); - $(`#uploadBtn${dataIndex}`).hide() - // 插入新的 DOM 元素,例如:显示上传成功的消息或其他操作 + // 插入新的 DOM 元素, var newDom = $(`
${res.message}
`); $(this.elem).parent().append(newDom); }, @@ -315,7 +306,7 @@ // }); }, - yes: function (index, layero) { + yes: function (index) { // 点击"确定"按钮时的逻辑 let formData = {}; @@ -339,7 +330,8 @@ evaluateId: getUrlParam('id'), id: getUrlParam('detailsId'), jsonData: JSON.stringify([currentRows]), - titleFiled: fields.join(',') + titleFiled: fields.join(','), + fileList } console.log('提交时的formDat参数', dataForm) @@ -363,12 +355,9 @@ // 这里可以执行你需要的操作 }, - btn2: function (index, layero) { - // 点击"取消"按钮时的逻辑 - console.log('取消按钮被点击了'); - // 这里可以执行你需要的操作,通常是关闭弹框 - layer.close(index); // 关闭弹框 - return false; // 防止关闭弹框后执行默认的按钮行为 + btn2: function (index) { + layer.close(index) // 关闭弹框 + return false } }) }); From 5c83d091078e83e817db6d5e58178cb8236212f4 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 09:43:55 +0800 Subject: [PATCH 02/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 297a5c3..8f0dc5d 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -269,10 +269,10 @@ var upload = layui.upload; // 执行上传功能 var uploadInst = upload.render({ - elem: '.uploadBtn', // 上传按钮 - url: ctxPath + '/upload/file', // 文件上传接口(这里要根据实际接口替换) - accept: 'file', // 选择文件类型 - multiple: false, // 支持多文件上传 + elem: '.uploadBtn', + url: ctxPath + '/upload/file', + accept: 'file', + multiple: false, auto: true, // 禁用自动上传,点击确定按钮后上传 choose: function (obj) { // 当选择文件时会触发这个方法 From 9f4979a6638ff16d70b261dc7b3f6c8a8435c07d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 10:42:47 +0800 Subject: [PATCH 03/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 8f0dc5d..2546234 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -275,9 +275,14 @@ multiple: false, auto: true, // 禁用自动上传,点击确定按钮后上传 choose: function (obj) { + obj.reset() // 当选择文件时会触发这个方法 + obj.preview(function (index, file, result) { + console.log(file); // 打印当前选择的文件 + }); + var files = obj.pushFile(); // 获取文件列表 - console.log(files); + }, done: function (res) { // 上传完毕回调 @@ -297,8 +302,8 @@ // 请求异常回调 console.log('文件上传失败'); } - }); - }); + }) + }) // $('.uploadBtn').on('click', function (event) { // event.stopPropagation(); // 阻止事件冒泡 // event.preventDefault(); // 阻止默认行为 From c918de5d530c2e1c588b386669d21bd2a996ec16 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 10:46:32 +0800 Subject: [PATCH 04/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 2546234..b46334e 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -275,13 +275,16 @@ multiple: false, auto: true, // 禁用自动上传,点击确定按钮后上传 choose: function (obj) { - obj.reset() + // 当选择文件时会触发这个方法 obj.preview(function (index, file, result) { console.log(file); // 打印当前选择的文件 }); - var files = obj.pushFile(); // 获取文件列表 + var files = obj.pushFile()[obj.pushFile().length - 1] // 获取文件列表 + + console.log(files, 'files') + return files }, done: function (res) { From ba2c5e327b415313010b8f2e812e04904fbc4d21 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 10:54:48 +0800 Subject: [PATCH 05/26] =?UTF-8?q?=E7=BB=84=E8=A3=85=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index b46334e..d6fd2b3 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -239,6 +239,7 @@ let formHtml = `
${tableList[rowIndex].proName}
` let innerHtml = '' dialogLabelList.forEach((e, index) => { + fileList.push('') innerHtml += `
${e.title}
@@ -374,7 +375,7 @@ var dataIndex = $(this).data('index'); console.log('删除图标被点击,data-index:', dataIndex); - + fileList[dataIndex] = '' // 执行删除操作 $(this).parent().remove() $(`#uploadBtn${dataIndex}`).show() From 9d5221fa0be2fa569ad7eed2aaf36c1285daca21 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 11:03:50 +0800 Subject: [PATCH 06/26] =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=BB=84=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index d6fd2b3..1a6b986 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -225,6 +225,7 @@ text: '评价', type: 'button' }); + let fileList = [] // 将自定义元素插入到最后一个单元格 div.append(customElement); @@ -233,7 +234,7 @@ event.preventDefault() let rowIndex = $(this).closest('tr').data('index') const tableList = JSON.parse(msg) - let fileList = [] + // 组装dom let formHtml = `
${tableList[rowIndex].proName}
` @@ -334,13 +335,14 @@ }) const currentRows = tableList[rowIndex] Object.assign(currentRows, formData) + + currentRows.fileList = fileList let dataForm = { templateId: getUrlParam('templateId'), evaluateId: getUrlParam('id'), id: getUrlParam('detailsId'), jsonData: JSON.stringify([currentRows]), titleFiled: fields.join(','), - fileList } console.log('提交时的formDat参数', dataForm) From 1ff32925b345a505417437b552f722fba5596395 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 11:17:28 +0800 Subject: [PATCH 07/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 107 ++++++++++-------- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 1a6b986..2e91b39 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -20,6 +20,10 @@ display: flex; align-items: center; } + + .layui-layer-iframe .layui-layer-btn0 { + display: none; + } @@ -203,10 +207,13 @@ //将td元素的style属性设置为pointer-events: none,禁止点击 $(this).css('pointer-events', 'none'); delete item.dataset.edit + let fileDom = '' + if (JSON.parse(msg).fileList && JSON.parse(msg).fileList.length > 0) { + fileDom = `${JSON.parse(msg).fileList[index - 3]}` + } + $(this).append(fileDom) } - - }); } }); @@ -397,54 +404,54 @@ } }); // 单元格普通编辑事件 - table.on('edit(baseTable)', function (obj) { - var value = obj.value // 得到修改后的值 - var data = obj.data // 得到所在行所有键值 - var field = obj.field; // 得到字段 - //判断修改的是当前行的第几个单元格 - let index = headerRows[2].findIndex(item => item.field === field); - //获取其对应的二级标题 用于计算 - let currentItem = headerRows[1][index]; - let standardScore = Number(currentItem.standardScore); - //是否包含前缀0 - if (value.indexOf('0') === 0 && value.length > 1) { - layer.msg('输入值不能以0开头'); - //清空当前单元格 - obj.update({ - [field]: '' - }); - return; - } - //判断是否数字 - if (value < 0) { - layer.msg('输入值不能小于0'); - //清空当前单元格 - obj.update({ - [field]: '' - }); - return; - } - if (!isPositiveInteger(value)) { - layer.msg('请输入正整数'); - //清空当前单元格 - obj.update({ - [field]: '' - }); - return; - } - if (value > standardScore) { - layer.msg('输入值不能大于标准值'); - //清空当前单元格 - obj.update({ - [field]: '' - }); - return; - } - // // 更新数据中对应的字段 - let update = {}; - update[field] = value; - obj.update(update); - }); + // table.on('edit(baseTable)', function (obj) { + // var value = obj.value // 得到修改后的值 + // var data = obj.data // 得到所在行所有键值 + // var field = obj.field; // 得到字段 + // //判断修改的是当前行的第几个单元格 + // let index = headerRows[2].findIndex(item => item.field === field); + // //获取其对应的二级标题 用于计算 + // let currentItem = headerRows[1][index]; + // let standardScore = Number(currentItem.standardScore); + // //是否包含前缀0 + // if (value.indexOf('0') === 0 && value.length > 1) { + // layer.msg('输入值不能以0开头'); + // //清空当前单元格 + // obj.update({ + // [field]: '' + // }); + // return; + // } + // //判断是否数字 + // if (value < 0) { + // layer.msg('输入值不能小于0'); + // //清空当前单元格 + // obj.update({ + // [field]: '' + // }); + // return; + // } + // if (!isPositiveInteger(value)) { + // layer.msg('请输入正整数'); + // //清空当前单元格 + // obj.update({ + // [field]: '' + // }); + // return; + // } + // if (value > standardScore) { + // layer.msg('输入值不能大于标准值'); + // //清空当前单元格 + // obj.update({ + // [field]: '' + // }); + // return; + // } + // // // 更新数据中对应的字段 + // let update = {}; + // update[field] = value; + // obj.update(update); + // }); } From 683c3f863f90670ec233d9e22363a15594aec324 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 11:25:03 +0800 Subject: [PATCH 08/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 2e91b39..aa49f03 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -207,11 +207,16 @@ //将td元素的style属性设置为pointer-events: none,禁止点击 $(this).css('pointer-events', 'none'); delete item.dataset.edit - let fileDom = '' - if (JSON.parse(msg).fileList && JSON.parse(msg).fileList.length > 0) { - fileDom = `${JSON.parse(msg).fileList[index - 3]}` + let fileDom = ''; + + // 只要有文件列表,并且文件列表数量大于0,添加文件信息 + if (item.fileList && item.fileList.length > 0) { + // 根据文件列表的索引判断将哪个文件添加到相应的列 + fileDom = `${item.fileList[index - 3] || ''}`; } - $(this).append(fileDom) + + // 将fileDom添加到当前单元格 + $(td).append(fileDom); } }); From 138173ac71c2bf7dd81d1db36066158e616bdd7f Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 14:42:02 +0800 Subject: [PATCH 09/26] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/outsourcerEvaluationList.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js index d6e75b5..5508069 100644 --- a/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js +++ b/src/main/resources/static/js/evaluate/outsourcerEvaluation/outsourcerEvaluationList.js @@ -238,11 +238,12 @@ function initTable() { layerOptions.yes = function (index, layero) { //提交子页面时执行 // 获取弹出层中的form表单元素 - const formSubmit = layer.getChildFrame("form", index); + // const formSubmit = layer.getChildFrame("form", index); // 查找class样式为submitBtn的按钮 - const submited = formSubmit.find("button.subBtn"); + // const submited = formSubmit.find("button.subBtn"); // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息 - submited.click(); + // submited.click(); + initTable(); }; layer.open(layerOptions); } From 178b6af0e8b54598f638b0eaa8dfb81ca36e43d7 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:23:08 +0800 Subject: [PATCH 10/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index aa49f03..5b76c66 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -238,6 +238,7 @@ type: 'button' }); let fileList = [] + let uploadDom = [] // 将自定义元素插入到最后一个单元格 div.append(customElement); @@ -253,13 +254,14 @@ let innerHtml = '' dialogLabelList.forEach((e, index) => { fileList.push('') - + uploadDom.push('#uploadBtn_' + index) innerHtml += `
${e.title}
- +
` }) @@ -283,24 +285,10 @@ var upload = layui.upload; // 执行上传功能 var uploadInst = upload.render({ - elem: '.uploadBtn', + elem: uploadDom.join(','), url: ctxPath + '/upload/file', accept: 'file', multiple: false, - auto: true, // 禁用自动上传,点击确定按钮后上传 - choose: function (obj) { - - // 当选择文件时会触发这个方法 - obj.preview(function (index, file, result) { - console.log(file); // 打印当前选择的文件 - }); - - var files = obj.pushFile()[obj.pushFile().length - 1] // 获取文件列表 - - console.log(files, 'files') - return files - - }, done: function (res) { // 上传完毕回调 console.log('文件上传成功'); @@ -310,10 +298,11 @@ // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() + $('#upload-success_${dataIndex}').show() // 插入新的 DOM 元素, - var newDom = $(`
${res.message}
`); - $(this.elem).parent().append(newDom); + // var newDom = $(`
${res.message}
`); + // $(this.elem).parent().append(newDom); }, error: function () { // 请求异常回调 @@ -391,7 +380,8 @@ fileList[dataIndex] = '' // 执行删除操作 - $(this).parent().remove() + // $(this).parent().remove() + $('#upload-success_${dataIndex}').hide() $(`#uploadBtn${dataIndex}`).show() }); tableLoading && layer.close(tableLoading); From 5f4ca1621eda7e61fc76d673e25ee573a11093a3 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:25:13 +0800 Subject: [PATCH 11/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 5b76c66..08c8f41 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -254,7 +254,7 @@ let innerHtml = '' dialogLabelList.forEach((e, index) => { fileList.push('') - uploadDom.push('#uploadBtn_' + index) + uploadDom.push('#uploadBtn' + index) innerHtml += `
${e.title}
From 36b1b20caa70ddcbed5af45aa10aa87d02dfc9cd Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:27:35 +0800 Subject: [PATCH 12/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 08c8f41..299a7df 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -298,7 +298,7 @@ // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() - $('#upload-success_${dataIndex}').show() + $(`#upload-success_${dataIndex}`).show() // 插入新的 DOM 元素, // var newDom = $(`
${res.message}
`); From ea491b81c0ebeb2f661cd6f6f37c8d7e077da1b4 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:31:10 +0800 Subject: [PATCH 13/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 299a7df..0c2b6ee 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -261,7 +261,7 @@ - +
` }) @@ -299,7 +299,7 @@ // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() $(`#upload-success_${dataIndex}`).show() - + $(`#upload-success_${dataIndex}`).text(res.message) // 插入新的 DOM 元素, // var newDom = $(`
${res.message}
`); // $(this.elem).parent().append(newDom); @@ -381,7 +381,7 @@ fileList[dataIndex] = '' // 执行删除操作 // $(this).parent().remove() - $('#upload-success_${dataIndex}').hide() + $(`#upload-success_${dataIndex}`).hide() $(`#uploadBtn${dataIndex}`).show() }); tableLoading && layer.close(tableLoading); From 019cb7e51b1b73490369579c2649d23426a1d850 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:34:20 +0800 Subject: [PATCH 14/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 0c2b6ee..bf3331d 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -299,7 +299,7 @@ // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() $(`#upload-success_${dataIndex}`).show() - $(`#upload-success_${dataIndex}`).text(res.message) + $(`#upload-success_${dataIndex}`).prepend(res.message) // 插入新的 DOM 元素, // var newDom = $(`
${res.message}
`); // $(this.elem).parent().append(newDom); From 442e681353c8ea5ab1db9ce9e9aec625ba33bb8a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:38:14 +0800 Subject: [PATCH 15/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index bf3331d..f14f4c7 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -299,7 +299,7 @@ // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() $(`#upload-success_${dataIndex}`).show() - $(`#upload-success_${dataIndex}`).prepend(res.message) + $(`#upload-success_${dataIndex}`).prepend(`${res.message}`) // 插入新的 DOM 元素, // var newDom = $(`
${res.message}
`); // $(this.elem).parent().append(newDom); @@ -381,7 +381,10 @@ fileList[dataIndex] = '' // 执行删除操作 // $(this).parent().remove() - $(`#upload-success_${dataIndex}`).hide() + $(`#upload-success_${dataIndex}`).hide(function () { + // 当隐藏完之后,移除插入的内容 + $(`#upload-success_${dataIndex} .prepend-content`).remove(); + }) $(`#uploadBtn${dataIndex}`).show() }); tableLoading && layer.close(tableLoading); From 95e95bf1bd50749acf5f8164048825db880b33fb Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:50:17 +0800 Subject: [PATCH 16/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index f14f4c7..37f3b26 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -195,32 +195,34 @@ var tableView = this.elem.next(); layui.each(res.data, function (i, item) { if (item.isApprove == '1') { // Condition to make the row non-editable - var cols = tableView.find('tr[data-index=' + i + ']').find('td'); - cols.each(function (index, item) { - //对field为subName,proName 的列不进行设置 - if (index > 2) { - $(this).data('edit', 'false'); - $(this).removeAttr('data-edit'); - $(this).addClass('layui-disabled'); - //将td元素的contentEditable属性设置为false,禁止编辑 - $(this).attr('contentEditable', 'false'); - //将td元素的style属性设置为pointer-events: none,禁止点击 - $(this).css('pointer-events', 'none'); - delete item.dataset.edit - let fileDom = ''; - // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - if (item.fileList && item.fileList.length > 0) { - // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item.fileList[index - 3] || ''}`; - } + } + var cols = tableView.find('tr[data-index=' + i + ']').find('td'); + cols.each(function (index, item) { + //对field为subName,proName 的列不进行设置 + if (index > 2) { + $(this).data('edit', 'false'); + $(this).removeAttr('data-edit'); + $(this).addClass('layui-disabled'); + //将td元素的contentEditable属性设置为false,禁止编辑 + $(this).attr('contentEditable', 'false'); + //将td元素的style属性设置为pointer-events: none,禁止点击 + $(this).css('pointer-events', 'none'); + delete item.dataset.edit + let fileDom = ''; - // 将fileDom添加到当前单元格 - $(td).append(fileDom); + // 只要有文件列表,并且文件列表数量大于0,添加文件信息 + if (item.fileList && item.fileList.length > 0) { + // 根据文件列表的索引判断将哪个文件添加到相应的列 + fileDom = `${item.fileList[index - 3] || ''}`; } - }); - } + // 将fileDom添加到当前单元格 + $(this).append(fileDom); + } + + }); + }); var columsName = ['subName'];//需要合并的列名称 ['business_tenant_name','land','contract_begin','contract_end','history_arrears','period']; var columsIndex = [1];//需要合并的列索引值 [2,3,5,6,14,15]; From 51afd88648f37078dd92af5bd59a3d81bfdafc72 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 15:54:07 +0800 Subject: [PATCH 17/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 37f3b26..6fedcef 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -200,7 +200,7 @@ var cols = tableView.find('tr[data-index=' + i + ']').find('td'); cols.each(function (index, item) { //对field为subName,proName 的列不进行设置 - if (index > 2) { + if (index > 2 && index != cols.length - 1) { $(this).data('edit', 'false'); $(this).removeAttr('data-edit'); $(this).addClass('layui-disabled'); @@ -214,11 +214,13 @@ // 只要有文件列表,并且文件列表数量大于0,添加文件信息 if (item.fileList && item.fileList.length > 0) { // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item.fileList[index - 3] || ''}`; + fileDom = `${item.fileList[index - 3]}`; } + console.log('fileDomfileDomfileDomfileDom', fileDom) + // 将fileDom添加到当前单元格 - $(this).append(fileDom); + $(this).prepend(fileDom); } }); From 99455f7e23a3d0ac04bc2ae1b794fec18403d674 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:07:21 +0800 Subject: [PATCH 18/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 6fedcef..2908c11 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -193,7 +193,7 @@ loading: true, done: function (res) { var tableView = this.elem.next(); - layui.each(res.data, function (i, item) { + layui.each(res.data, function (i, item1) { if (item.isApprove == '1') { // Condition to make the row non-editable } @@ -212,15 +212,15 @@ let fileDom = ''; // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - if (item.fileList && item.fileList.length > 0) { + if (item1.fileList && item1.fileList.length > 0) { // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item.fileList[index - 3]}`; + fileDom = `${item1.fileList[index - 3]}`; } console.log('fileDomfileDomfileDomfileDom', fileDom) // 将fileDom添加到当前单元格 - $(this).prepend(fileDom); + $(this).append(fileDom); } }); From 920c0fc6ecac3cffb40ba7f39b59d58aacf50c77 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Wed, 26 Feb 2025 16:08:51 +0800 Subject: [PATCH 19/26] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 2908c11..6fedcef 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -193,7 +193,7 @@ loading: true, done: function (res) { var tableView = this.elem.next(); - layui.each(res.data, function (i, item1) { + layui.each(res.data, function (i, item) { if (item.isApprove == '1') { // Condition to make the row non-editable } @@ -212,15 +212,15 @@ let fileDom = ''; // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - if (item1.fileList && item1.fileList.length > 0) { + if (item.fileList && item.fileList.length > 0) { // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item1.fileList[index - 3]}`; + fileDom = `${item.fileList[index - 3]}`; } console.log('fileDomfileDomfileDomfileDom', fileDom) // 将fileDom添加到当前单元格 - $(this).append(fileDom); + $(this).prepend(fileDom); } }); From 06987849ead73566eeced1fb3dfa6817cb4cc635 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:14:46 +0800 Subject: [PATCH 20/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/outsourcerEvaluation/evaluationForm.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 6fedcef..2908c11 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -193,7 +193,7 @@ loading: true, done: function (res) { var tableView = this.elem.next(); - layui.each(res.data, function (i, item) { + layui.each(res.data, function (i, item1) { if (item.isApprove == '1') { // Condition to make the row non-editable } @@ -212,15 +212,15 @@ let fileDom = ''; // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - if (item.fileList && item.fileList.length > 0) { + if (item1.fileList && item1.fileList.length > 0) { // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item.fileList[index - 3]}`; + fileDom = `${item1.fileList[index - 3]}`; } console.log('fileDomfileDomfileDomfileDom', fileDom) // 将fileDom添加到当前单元格 - $(this).prepend(fileDom); + $(this).append(fileDom); } }); From 50cdc73f600bd4351c17d0ff5136111a52890b3c Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:16:17 +0800 Subject: [PATCH 21/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/evaluate/outsourcerEvaluation/evaluationForm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 2908c11..361bc47 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -194,7 +194,7 @@ done: function (res) { var tableView = this.elem.next(); layui.each(res.data, function (i, item1) { - if (item.isApprove == '1') { // Condition to make the row non-editable + if (item1.isApprove == '1') { // Condition to make the row non-editable } var cols = tableView.find('tr[data-index=' + i + ']').find('td'); From aa7c645293fca00f7160186952258924c93aa658 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:19:04 +0800 Subject: [PATCH 22/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 361bc47..371c0f4 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -212,15 +212,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]}`; + // } - console.log('fileDomfileDomfileDomfileDom', fileDom) + // console.log('fileDomfileDomfileDomfileDom', fileDom) - // 将fileDom添加到当前单元格 - $(this).append(fileDom); + // // 将fileDom添加到当前单元格 + // $(this).append(fileDom); } }); From 494e8be87189b464e35b13c2a06de2e94e194e0e Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:31:20 +0800 Subject: [PATCH 23/26] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 77 +++++++++++++++---- 1 file changed, 64 insertions(+), 13 deletions(-) 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 () { From 3e719894f6a7408dcc8e5d1d3be260957c359a90 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:33:57 +0800 Subject: [PATCH 24/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 49 +++---------------- 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index b60e9cb..60e77d2 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -265,47 +265,12 @@ let innerHtml = '' dialogLabelList.forEach((e, index) => { - 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 += `
+ fileList.push({ + name: '', + path: '', + }) + uploadDom.push('#uploadBtn' + index) + innerHtml += `
${e.title}
` - } - }) From a17ee9951bd9913fe5458083e3cd2a79252f6168 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Feb 2025 16:35:49 +0800 Subject: [PATCH 25/26] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 60e77d2..371c0f4 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -24,12 +24,6 @@ .layui-layer-iframe .layui-layer-btn0 { display: none; } - - .td-container { - display: flex; - align-items: center; - justify-content: space-around; - } @@ -209,8 +203,7 @@ if (index > 2 && index != cols.length - 1) { $(this).data('edit', 'false'); $(this).removeAttr('data-edit'); - // $(this).addClass('layui-disabled'); - $(this).addClass('td-container'); + $(this).addClass('layui-disabled'); //将td元素的contentEditable属性设置为false,禁止编辑 $(this).attr('contentEditable', 'false'); //将td元素的style属性设置为pointer-events: none,禁止点击 @@ -219,15 +212,15 @@ let fileDom = ''; // 只要有文件列表,并且文件列表数量大于0,添加文件信息 - if (item1.fileList && item1.fileList.length > 0) { - // 根据文件列表的索引判断将哪个文件添加到相应的列 - fileDom = `${item1.fileList[index - 3].name}`; - } + // if (item1.fileList && item1.fileList.length > 0) { + // // 根据文件列表的索引判断将哪个文件添加到相应的列 + // fileDom = `${item1.fileList[index - 3]}`; + // } - console.log('fileDomfileDomfileDomfileDom', fileDom) + // console.log('fileDomfileDomfileDomfileDom', fileDom) - // 将fileDom添加到当前单元格 - $(this).append(fileDom); + // // 将fileDom添加到当前单元格 + // $(this).append(fileDom); } }); @@ -264,11 +257,7 @@ let formHtml = `
${tableList[rowIndex].proName}
` let innerHtml = '' dialogLabelList.forEach((e, index) => { - - fileList.push({ - name: '', - path: '', - }) + fileList.push('') uploadDom.push('#uploadBtn' + index) innerHtml += `
${e.title}
@@ -309,8 +298,7 @@ console.log('文件上传成功'); console.log(res); var dataIndex = $(this.elem).data('index'); - fileList[dataIndex].path = res.obj - fileList[dataIndex].name = res.message + fileList[dataIndex] = res.obj // 隐藏当前上传按钮 $(`#uploadBtn${dataIndex}`).hide() @@ -394,9 +382,7 @@ var dataIndex = $(this).data('index'); console.log('删除图标被点击,data-index:', dataIndex); - fileList[dataIndex].path = '' - fileList[dataIndex].name = '' - + fileList[dataIndex] = '' // 执行删除操作 // $(this).parent().remove() $(`#upload-success_${dataIndex}`).hide(function () { From 251f9d17580d21fcde4ec547cad8454c8746d60b Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Wed, 26 Feb 2025 16:52:31 +0800 Subject: [PATCH 26/26] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=87=BA=E9=94=99bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/evaluate/summaryAudit/summaryAudit.js | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js b/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js index 2d76da8..0a73281 100644 --- a/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js +++ b/src/main/resources/static/js/evaluate/summaryAudit/summaryAudit.js @@ -33,7 +33,7 @@ function search(type) { curr: 1 }, where: { - type:'audit', + type: 'audit', keyWord: $("#keyWord").val(), evaluateDeptId: $("#evaluateDeptId").val(), evStatus: $("#evStatus").val(), @@ -52,7 +52,7 @@ function initTable() { , method: 'get' //方式默认是get , toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 , where: { - type:'audit', + type: 'audit', } //post请求必须加where ,post请求需要的参数 , cellMinWidth: 80 , cols: [[ //表头 @@ -64,16 +64,24 @@ function initTable() { , {field: 'evaluateMonth', align: 'center', title: '评价年月'} , {field: 'projectNum', align: 'center', title: '项目数量'} , {field: 'outsourcerNum', align: 'center', title: '外包商数量'} - , {field: 'isApprove', align: 'center', title: '评价状态', templet: d =>{ - if (d.rejectReason){ - return '评价驳回' - }else { - return Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') - } + , { + field: 'isApprove', align: 'center', title: '评价状态', templet: d => { + if (d.rejectReason) { + return '评价驳回' + } else { + return Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') + } // Number(d.isApprove) === 0 ? '待评价' : (Number(d.isApprove) === 1 ? '已评价' : '') - }} - , {field: 'status', align: 'center', title: '审核状态', templet: d => - Number(d.status) === 0 ? '待审核' : (Number(d.status) === 1 ? '已审核' : '审核中') + } + } + , { + field: 'status', align: 'center', title: '审核状态', templet: d => { + if (d.rejectReason) { + return '审核驳回' + } else { + return Number(d.status) === 0 ? '待审核' : (Number(d.status) === 1 ? '已审核' : '审核中') + } + } } , {field: 'rejectReason', align: 'center', title: '驳回原因'} , {