{"inframe":false,"title":"分组合计总计","hidden":false,"roles":{"demo":1,"dev":1},"children":[{"configs":{"itemId":"module"},"children":[{"configs":{"layout":"fit","itemId":"viewport1"},"children":[{"configs":{"itemId":"grid1"},"children":[{"configs":{"itemId":"tbar"},"children":[{"configs":{"text":"切换分组","itemId":"toggleGroup"},"events":{"click":"var feature = app.grid1.view.findFeature('groupingsummary');\nif (feature.disabled)\n  feature.enable();\nelse\n  feature.disable();"},"children":[],"expanded":false,"type":"item"}],"expanded":true,"type":"toolbar"},{"configs":{"groupField":"DEPT_NAME","pageSize":"-1","autoLoad":"true","itemId":"store","url":"m?xwl=examples/controls/grid/data-source/select-employee"},"children":[],"expanded":false,"type":"store"},{"configs":{"itemId":"features"},"children":[{"configs":{"groupHeaderTpl":"{name}","itemId":"groupingsummary","ftype":"groupingsummary"},"children":[],"expanded":false,"type":"feature"},{"configs":{"ftype":"summary","itemId":"summary"},"children":[],"expanded":false,"type":"feature"}],"expanded":true,"type":"array"},{"configs":{"itemId":"columns"},"children":[{"configs":{"summaryRenderer":"return summaryData._featureObject instanceof Ext.grid.feature.Summary ? '总计：' : '合计：';","text":"名","dataIndex":"FIRST_NAME","itemId":"firstNameCol","renderer":"var sex = record.get('SEX');\nreturn Wb.getIcon(record.get('SEX') == 'M' ? 'user_icon' : 'user1_icon', sex) + value;"},"children":[],"expanded":false,"type":"column"},{"configs":{"summaryRenderer":"return Wb.format('共 {0} 人', value);","text":"姓","dataIndex":"LAST_NAME","itemId":"lastNameCol","summaryType":"count"},"children":[],"expanded":false,"type":"column"},{"configs":{"summaryRenderer":"return '最年轻：' + Wb.dateToText(value);","text":"生日","width":"130","dataIndex":"BIRTH_DATE","itemId":"birthDateCol","summaryType":"max"},"children":[],"expanded":false,"type":"column"},{"configs":{"text":"性别","width":"50","align":"center","dataIndex":"SEX","titleAlign":"left","itemId":"sexCol"},"children":[],"expanded":false,"type":"column"},{"configs":{"summaryRenderer":"return '平均时长： ' + Wb.format(value, '0.#');","text":"休假时长","width":"110","align":"right","dataIndex":"VACATION_HOURS","itemId":"vacationHoursCol","summaryType":"average"},"children":[],"expanded":false,"type":"column"},{"configs":{"summaryRenderer":"//该计算字段在后台模块dataProvider控件中定义\nreturn '平均天数：' + Wb.format(summaryData.VACATION_HOURS / 8, '0.0');","text":"计算字段（休假天数）","width":"150","align":"right","dataIndex":"VACATION_DAYS","format":"0.0","itemId":"vocationDaysCol"},"children":[],"expanded":false,"type":"column"}],"expanded":true,"type":"array"}],"expanded":true,"type":"grid"}],"expanded":true,"type":"viewport"}],"expanded":true,"type":"module"}],"pageLink":"","iconCls":""}