diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java index 78d6da74b..6b95a7420 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java @@ -77,4 +77,22 @@ public class DemoDialogController { return prefix + "/table/parent"; } + + /** + * 多层窗口frame1 + */ + @GetMapping("/frame1") + public String frame1() + { + return prefix + "/table/frame1"; + } + + /** + * 多层窗口frame2 + */ + @GetMapping("/frame2") + public String frame2() + { + return prefix + "/table/frame2"; + } } diff --git a/ruoyi-admin/src/main/resources/templates/demo/modal/table.html b/ruoyi-admin/src/main/resources/templates/demo/modal/table.html index 18c16be9f..f573615d0 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/modal/table.html +++ b/ruoyi-admin/src/main/resources/templates/demo/modal/table.html @@ -24,49 +24,97 @@
弹层框
-

弹出复选框表格及单选框表格(点击提交后得到数据并回显到父窗体)。

- - +

弹出层,点击提交后得到数据并回显到父窗体。

+ + +

+
+
+
+
弹层框
+
+
+

多层弹出,点击提交后得到数据并回显到父窗体。

+ +

+
+
+
+ + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/demo/modal/table/frame2.html b/ruoyi-admin/src/main/resources/templates/demo/modal/table/frame2.html new file mode 100644 index 000000000..b4940fefb --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/demo/modal/table/frame2.html @@ -0,0 +1,24 @@ + + + + + + +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/demo/modal/table/parent.html b/ruoyi-admin/src/main/resources/templates/demo/modal/table/parent.html index 766061702..b6347a168 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/modal/table/parent.html +++ b/ruoyi-admin/src/main/resources/templates/demo/modal/table/parent.html @@ -4,6 +4,7 @@ +
@@ -81,15 +82,21 @@ } $.modal.close(); // 父页面的方法 - // parent.selectUsers(); + // activeWindow().selectUsers(); // 父页面的变量 - parent.$('#userids').html(rows.join()); + activeWindow().$('#userids').html('我是通过方式一来的:' + rows.join()); } /* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */ function getSelections() { return $.table.selectFirstColumns(); } + + $("#bootstrap-table").on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) { + var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter; + var rowIds = $.table.affectedRowIds(rows); + $("#rowIds").val(rowIds); + }); \ No newline at end of file