{"title":"角色配置","inframe":false,"hidden":false,"roles":{"demo":1},"pageLink":"","children":[{"configs":{"itemId":"module"},"children":[{"configs":{"layout":"border","itemId":"viewport1"},"children":[{"configs":{"region":"north","itemId":"toolbar1"},"children":[{"configs":{"text":"添加","itemId":"newBtn","iconCls":"record_add_icon","tooltip":"添加新的角色"},"events":{"click":"var win = Wb.insert(app.grid1, {\n  win: app.userWin,\n  url: 'm?xwl=admin/role/insert'\n});\nwin.down('#STATUS').setValue(1);"},"children":[],"type":"item","expanded":false},{"configs":{"text":"修改","itemId":"editBtn","iconCls":"record_edit_icon","tooltip":"修改选择的角色"},"events":{"click":"var win = Wb.edit(app.grid1, {\n  url: 'm?xwl=admin/role/update',\n  titleField: 'ROLE_NAME'\n});\nwin.down('#ROLE_ID').setReadOnly(true);\nwin.down('#ROLE_NAME').focus(true, true);"},"children":[],"type":"item","expanded":false},{"configs":{"text":"删除","itemId":"delBtn","iconCls":"record_delete_icon","tooltip":"删除选择的角色"},"events":{"click":"Wb.del(app.grid1, {\n  url: 'm?xwl=admin/role/delete',\n  titleField: 'ROLE_NAME'\n});"},"children":[],"type":"item","expanded":false}],"type":"toolbar","expanded":true},{"configs":{"region":"center","multiSelect":"true","itemId":"grid1","loadColumns":"none"},"events":{"itemdblclick":"app.editBtn.fireEvent('click');"},"children":[{"configs":{"pageSize":"-1","sorters":"'ROLE_ID'","itemId":"store","autoLoad":"true","remoteSort":"true","url":"m?xwl=admin/role/select"},"events":{"success":"if (!store.columnsDone) {\n  var roleIdCol = Wb.getColumn(store, 'ROLE_ID'),\n    roleNameCol = Wb.getColumn(store, 'ROLE_NAME');\n  delete roleIdCol.hidden;\n  delete roleIdCol.showInMenu;\n  roleIdCol.renderer = roleNameCol.renderer;\n  delete roleNameCol.renderer;\n  Wb.loadColumns(store);\n  store.columnsDone = true;\n}"},"children":[],"type":"store","expanded":false}],"type":"grid","expanded":true}],"type":"viewport","expanded":true}],"type":"module","expanded":true}],"iconCls":"user_group_icon"}