<#if !parentId??> [{ "name": "部门列表", "click":"setDepart('','')", "open": true <#if list?size gt 0>, "isParent": true, "children": [ <#list list as depart> { "parentId": "${depart.id}", "name": "${depart.name}", "click":"setDepart('${depart.name}','${depart.id}')", <#if depart.child?size gt 0> "isParent": true, "open": false <#else> "isParent": false }<#if depart_has_next>, ] }] <#else> [ <#list list as depart> { "parentId": "${depart.id}", "name": "${depart.name}", "click":"setDepart('${depart.name}','${depart.id}')", <#if depart.child?size gt 0> "isParent": true, "open": false <#else> "isParent": false }<#if depart_has_next>, ]