From 56862467edc141e1c00b6d6543b49b470d76d83d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 6 Aug 2025 15:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E5=8C=85=E5=95=86?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourceAudit/outsourceAuditForm.html | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditForm.html b/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditForm.html index 8c1d9f4..ddec160 100644 --- a/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditForm.html +++ b/src/main/resources/static/pages/evaluate/outsourceAudit/outsourceAuditForm.html @@ -85,7 +85,24 @@ } function setCols(data, msg) { - tableRowList = JSON.parse(msg) + + const tableList = JSON.parse(msg) + let tableListNew = [] + + tableList.forEach(item => { + + let keyList = [] + for (let key in item) { + if (key.indexOf('-') > 0) { + keyList.push(item[key]) + } + } + const isAllNull = keyList.every(item => item != '') + if (isAllNull) { + tableListNew.push(item) + } + }) + tableRowList = tableListNew //重新加载表格 清空之前的表头和内容 table.reload('baseTable', { cols: [] @@ -156,7 +173,7 @@ table.render({ elem: '#baseTable', cols: headerRows, - data: JSON.parse(msg), // 使用从 API 获取的数据 + data: tableListNew, // 使用从 API 获取的数据 //data: msg, // 使用从 API 获取的数据 loading: true, done: function (res) {