From ce23f8933eceb7040fbb26e8604bc73f2e88de91 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 19 Feb 2025 14:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E8=8F=9C=E5=8D=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/pages/menu/menuList.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/pages/menu/menuList.html b/src/main/resources/static/pages/menu/menuList.html index 368f1f0..dabd4cb 100644 --- a/src/main/resources/static/pages/menu/menuList.html +++ b/src/main/resources/static/pages/menu/menuList.html @@ -107,6 +107,9 @@ tr += "" $("#dt-table").append(tr); } + // 递归获取菜单状态 + getIsCheckFun(data) + } }); } @@ -143,6 +146,18 @@ $("#dt-table").treetable(option); - // 递归函数 + function getIsCheckFun(list) { + if (list && list.length > 0) { + list.forEach((e) => { + if (e.isCheck === 1) { + console.log('有待审数据', e) + } + if (e.child && e.child.length > 0) { + getIsCheckFun(e.child) + } + }) + } + } + \ No newline at end of file