{"title":"高亮","inframe":false,"hidden":false,"roles":{"demo":1,"dev":1},"pageLink":"","children":[{"configs":{"itemId":"module"},"children":[{"configs":{"layout":"fit","itemId":"viewport1"},"children":[{"configs":{"itemId":"grid1"},"children":[{"configs":{"autoLoad":"true","itemId":"store","url":"m?xwl=examples/controls/grid/data-source/select-employee"},"children":[],"type":"store","expanded":false},{"configs":{"itemId":"columns"},"children":[{"configs":{"xtype":"rownumberer","itemId":"numCol"},"children":[],"type":"column","expanded":false},{"configs":{"text":"姓名","itemId":"nameCol"},"children":[{"configs":{"text":"名","width":"150","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":[],"type":"column","expanded":false},{"configs":{"text":"姓","dataIndex":"LAST_NAME","itemId":"lastNameCol"},"children":[],"type":"column","expanded":false}],"type":"column","expanded":true},{"configs":{"text":"生日","dataIndex":"BIRTH_DATE","itemId":"birthDateCol","renderer":"if (value && value.getFullYear() < 1950) {\n  metaData.style = 'background-color:red';\n  return '<span style=\"color:white\">' + Wb.dateToText(value) + '<\/span>';\n} else\n  return Wb.dateToText(value);"},"children":[],"type":"column","expanded":false},{"configs":{"text":"性别","align":"center","width":"50","dataIndex":"SEX","titleAlign":"left","itemId":"sexCol"},"children":[],"type":"column","expanded":false},{"configs":{"text":"休假时长","width":"110","dataIndex":"VACATION_HOURS","itemId":"vacationHoursCol","renderer":"return '<div style=\"width:100px;border:1px solid blue;background-color:gray;\"><div style=\"width:' +\n  value + 'px;color:white;background-color:blue;\"><span class=\"wb_glyph\">&#xf017;<\/span>&nbsp;' + value +\n  'h<\/span><\/div><\/div>';"},"children":[],"type":"column","expanded":false},{"configs":{"width":"50","xtype":"actioncolumn","align":"center","itemId":"actionColumns"},"children":[{"configs":{"itemId":"items"},"children":[{"configs":{"itemId":"addAction","iconCls":"record_add_icon","tooltip":"添加","handler":"Wb.toast('添加：' + record.data.FIRST_NAME);"},"children":[],"type":"column","expanded":false},{"configs":{"itemId":"delAction","iconCls":"delete_icon","tooltip":"删除","handler":"Wb.toast('删除：' + record.data.FIRST_NAME);"},"children":[],"type":"column","expanded":false}],"type":"array","expanded":true}],"type":"column","expanded":true}],"type":"array","expanded":true},{"configs":{"itemId":"viewConfig","getRowClass":"//Wb预定义行背景色种类：wb_red_row, wb_green_row, wb_blue_row, wb_yellow_row, wb_hotpink_row, wb_gold_row, wb_bisque_row, wb_aqua_row\n//样式在style.css中预定义，如果需要动态加载css文件请参考m?xwl=examples/basic/link/dynamic-link示例\nvar cls, hours = record.get('VACATION_HOURS');\nif (hours >= 90)\n  cls = 'wb_gold_row';\nelse if (hours >= 80)\n  cls = 'wb_aqua_row';\nelse cls = '';\nreturn cls;"},"children":[],"type":"tableview","expanded":false}],"type":"grid","expanded":true}],"type":"viewport","expanded":true}],"type":"module","expanded":true}],"iconCls":""}