{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"border","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"tree1","split":"true","width":"300","region":"west","title":"树表格","tools":"Wb.getTreeTools()","rootVisible":"false"},"expanded":true,"children":[{"configs":{"itemId":"store","url":"m?xwl=examples/controls/tree/data-source/tree-select"},"expanded":false,"children":[],"type":"treestore","events":{"success":"//仅在首次加载时选择首个节点\nWb.selFirst(app.tree1);","beforeload":"var node = operation.node;\noperation.params.parentDept = node.isRoot() ? -1 : operation.node.data.DEPT_ID;"}}],"type":"tree","events":{"selectionchange":"//此示例仅演示查询所在本部门人员列表（不含子部门），如需查询子部门人员可以在SQL中使用递归查询功能，具体请参阅指定数据库SQL递归查询文档。\nvar node = selected[0];\nif (!node) return;\napp.employeeStore.load({\n  params: {\n    DEPT_ID: node.data.DEPT_ID //也可以把整个节点数据作为参数，params: node.data\n  }\n});"}},{"configs":{"itemId":"grid1","region":"center"},"expanded":true,"children":[{"configs":{"itemId":"store","normalName":"employeeStore","url":"m?xwl=examples/controls/tree/data-source/select-employee"},"expanded":false,"children":[],"type":"store"},{"configs":{"itemId":"columns"},"expanded":true,"children":[{"configs":{"itemId":"numCol","xtype":"rownumberer"},"expanded":false,"children":[],"type":"column"},{"configs":{"itemId":"realNameCol","renderer":"var sex = record.get('SEX');\nreturn Wb.getIcon(record.get('SEX') == '2' ? 'user1_icon' : 'user_icon', sex) + value;","dataIndex":"REAL_NAME","width":"180","text":"姓名"},"expanded":false,"children":[],"type":"column"},{"configs":{"itemId":"sexCol","dataIndex":"SEX","keyName":"sex","width":"50","text":"性别"},"expanded":false,"children":[],"type":"column"},{"configs":{"itemId":"birthDateCol","dataIndex":"BIRTH_DATE","text":"生日"},"expanded":false,"children":[],"type":"column"}],"type":"array"}],"type":"grid"}],"type":"viewport"}],"type":"module"}],"roles":{"demo":1},"title":"树和表格联动","iconCls":"","inframe":false,"pageLink":""}