From 13c698bc31548f75dbe9620c61be16c7ebca38df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 21 Oct 2024 17:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=89=E4=B8=AD=E7=9A=84id?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/js/ry-ui.js | 7 +++++++ .../templates/nanjing/ProcessRoute/add.html | 13 ++++++++----- 2 files changed, 15 insertions(+), 5 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 ee70b680..88866045 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 @@ -138,6 +138,12 @@ var table = { detailFormatter: options.detailFormatter, // 在行下面展示其他数据列表 }); }, + selectRow: function() { + var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) { + return row; + }); + return rows; + }, // 获取实例ID,如存在多个返回#id1,#id2 delimeter分隔符 getOptionsIds: function(separator) { var _separator = $.common.isEmpty(separator) ? "," : separator; @@ -466,6 +472,7 @@ var table = { // 获取当前页选中或者取消的行ID affectedRowIds: function(rows) { var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; + console.log(column) var rowIds; if ($.isArray(rows)) { rowIds = $.map(rows, function(row) { diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/ProcessRoute/add.html b/ruoyi-admin/src/main/resources/templates/nanjing/ProcessRoute/add.html index fea03613..ce76e7ed 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/ProcessRoute/add.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/ProcessRoute/add.html @@ -55,10 +55,13 @@ }); function submitHandler() { - checkItem(); - if ($.validate.form()) { - $.operate.save(prefix + "/add", $('#form-ProcessRoute-add').serialize()); - } + // checkItem(); + let rows = $.table.selectRow() ||[] + let ids = rows.map(e=>e.stationID) + console.log(ids) + // if ($.validate.form()) { + // $.operate.save(prefix + "/add", $('#form-ProcessRoute-add').serialize()); + // } } var editFlag = [[${@permission.hasPermi('nanjing:SubStation:edit')}]]; var removeFlag = [[${@permission.hasPermi('nanjing:SubStation:remove')}]]; @@ -191,4 +194,4 @@ } - \ No newline at end of file +