diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html index e8ed28ce..3ff1293c 100644 --- a/src/main/resources/templates/pages/depository/table-out.html +++ b/src/main/resources/templates/pages/depository/table-out.html @@ -322,11 +322,12 @@ // 用于给table行上色的方法 function Layui_SetDataTableRowColor(TabDivId, RowIndex, ColorString) { try { - var div = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")"); - if (div != null) //找到对象了 + let rowItem = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")"); + let column = $(rowItem[0].childNodes[7]); + if (column != null) //找到对象了 { // console.log(div); - div.css("color", ColorString); + column.css("background-color", ColorString); } else { console.log('没有找到对象');