diff --git a/js/pages/newDataAnalysis/projectProgress.js b/js/pages/newDataAnalysis/projectProgress.js index 16f68e1..2b57d8a 100644 --- a/js/pages/newDataAnalysis/projectProgress.js +++ b/js/pages/newDataAnalysis/projectProgress.js @@ -29,7 +29,7 @@ function setCols(type) { { title: "延误因素分析", align: "center", - templet: (d) => { + templet: (d, index) => { let text = ""; text += '查看'; @@ -144,8 +144,8 @@ function initTable(type, bidCode) { $(".layui-table-body table.layui-table tbody tr #viewBtn").on( "click", function () { - // 获取当前行的数据 - var index = $(this).index(); + const index = $(this).closest("tr").data("index"); + console.log(index, "index"); var rowData = res.rows[index]; // 获取对应行的数据 // 弹框配置