JSON Tree ,层级关系,最子节点满足条件,该线显示,最子节点不满足,隐藏改线,但不影响其它线
比如说每个节点都有 iscun
如果为True
显示这条线,不是就隐藏这条线;从每个最子节点反向递归。
{
"id": "26AC1350-E551-4383-BDF2-AE1E4E2ECAD5",
"pid": "F00E1219-E149-4429-8EE8-B54B21E3B74E",
"fullname": "重庆市涪陵区清溪镇青龙村",
"name": "青龙村",
"fullpinyin": "qlc",
"firstpinyin": "qlc",
"iscun": "False",
"isgen": "False",
"children": [
{
"id": "DD093A2B-D8F5-4B42-B167-226349918462",
"pid": "26AC1350-E551-4383-BDF2-AE1E4E2ECAD5",
"fullname": "中共重庆市涪陵区清溪镇青龙村总支委员会",
"name": "青龙村党总支",
"fullpinyin": "qlcdzz",
"firstpinyin": "qlcdzz",
"iscun": "True",
"isgen": "False",
"children": [
{
"id": "23CF016D-1791-45DE-8794-3884AC92A735",
"pid": "DD093A2B-D8F5-4B42-B167-226349918462",
"name": "青龙村第一党支部",
"fullpinyin": "qlcdydzb",
"firstpinyin": "qlcdydzb",
"isHidden": false
},
{
"id": "9DCF0DFB-E396-4E39-ACD6-D11C74F567D9",
"pid": "DD093A2B-D8F5-4B42-B167-226349918462",
"name": "青龙村第二党支部",
"fullpinyin": "qlcdedzb",
"firstpinyin": "qlcdedzb",
"editNameFlag": false,
"isHidden": false
},
{
"id": "9C97767D-6FE4-4AA7-A88A-D414B711E347",
"pid": "DD093A2B-D8F5-4B42-B167-226349918462",
"name": "青龙村第三党支部",
"fullpinyin": "qlcdsdzb",
"firstpinyin": "qlcdsdzb",
"isHidden": false
}
],
"isFirstNode": true,
"isLastNode": true,
"level": 6,
"isHidden": false
}
],
"level": 5,
"tId": "OrganTree_745",
"isHidden": false
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论