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