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) {