调试菜单状态问题
This commit is contained in:
parent
8759bde930
commit
ce23f8933e
|
|
@ -107,6 +107,9 @@
|
|||
tr += "</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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue