DocProjectList.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /**
  2. * 文档项目列表
  3. */
  4. Ext.define('saas.view.help.DocProjectList', {
  5. extend: 'Ext.container.Container',
  6. xtype: 'help-docproject-list',
  7. viewModel: {
  8. stores: {
  9. list: {
  10. model: 'saas.model.help.DocProject',
  11. autoLoad: true
  12. }
  13. }
  14. },
  15. controller: 'help-docproject-list',
  16. layout: 'border',
  17. items: [{
  18. xtype: 'toolbar',
  19. margin: '0 0 12 0',
  20. padding: '10 4',
  21. region: 'north',
  22. items: [{
  23. xtype: 'tbfill'
  24. }, {
  25. text: '新增',
  26. handler: 'handleAdd'
  27. }]
  28. }, {
  29. region: 'center',
  30. layout: 'fit',
  31. items: [{
  32. xtype: 'grid',
  33. padding: '8 12',
  34. border: true,
  35. bind: {
  36. store: '{list}'
  37. },
  38. listeners: {
  39. itemdblclick: 'onItemDblClick'
  40. },
  41. columns: [{
  42. text: '操作',
  43. width: 80,
  44. align: 'center',
  45. focusCls: null,
  46. resizable: false,
  47. draggable: false,
  48. xtype: 'actioncolumn',
  49. items: [{
  50. iconCls: 'x-fa fa-pencil',
  51. tooltip: '修改',
  52. handler: 'handleEdit'
  53. }, {
  54. iconCls: 'x-fa fa-trash-o fa-fw',
  55. tooltip: '删除',
  56. handler: 'handleDelete'
  57. }]
  58. }, {
  59. text: '编码',
  60. focusCls: null,
  61. resizable: false,
  62. draggable: false,
  63. width: 120,
  64. dataIndex: 'code'
  65. }, {
  66. text: '名称',
  67. focusCls: null,
  68. resizable: false,
  69. draggable: false,
  70. width: 300,
  71. dataIndex: 'name'
  72. }, {
  73. flex: 1
  74. }]
  75. }]
  76. }]
  77. });