From c1de1113c4e71086e4f480cb151d1b650047c543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E6=BA=AA=E5=85=88=E7=94=9F?= Date: Tue, 22 Mar 2022 20:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=A4=9A=E8=A1=A8=E6=A0=BC=E5=A4=84=E7=90=86=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E6=97=B6=E8=8E=B7=E5=8F=96=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=85=8D=E7=BD=AE=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index b110f6fd..cf9e0b5a 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -180,14 +180,15 @@ var table = { if (typeof table.get(this.id).responseHandler == "function") { table.get(this.id).responseHandler(res); } + var thisOptions = table.config[this.id]; if (res.code == web_status.SUCCESS) { - if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') { + if ($.common.isNotEmpty(thisOptions.sidePagination) && thisOptions.sidePagination == 'client') { return res.rows; } else { - if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { - var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; + if ($.common.isNotEmpty(thisOptions.rememberSelected) && thisOptions.rememberSelected) { + var column = $.common.isEmpty(thisOptions.uniqueId) ? thisOptions.columns[1].field : thisOptions.uniqueId; $.each(res.rows, function(i, row) { - row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1; + row.state = $.inArray(row[column], table.rememberSelectedIds[thisOptions.id]) !== -1; }) } return { rows: res.rows, total: res.total };