HelpDoc.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. Ext.define('erp.view.ma.help.HelpDoc',{
  2. extend: 'Ext.Viewport',
  3. layout: 'border',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items:[{
  9. xtype : 'erpTreePanel',
  10. dockedItems : null,
  11. region : 'west',
  12. width : '28%',
  13. height : '100%',
  14. maxWidth:300,
  15. useArrows: false,
  16. bodyStyle: null
  17. },{
  18. xtype : 'container',
  19. region : 'center',
  20. layout : 'border',
  21. items : [ {
  22. xtype : 'form',
  23. keyField:'CALLER_',
  24. id:'docform',
  25. region : 'center',
  26. autoScroll: true,
  27. title : '帮助文档',
  28. layout: 'column',
  29. bodyStyle : 'background:#f9f9f9;padding:5px 5px 0',
  30. defaults: {
  31. columnWidth: 1,
  32. margin: '4 18 4 18'
  33. },
  34. items:[{
  35. xtype:'textfield',
  36. name:'CALLER_',
  37. fieldLabel:'页面CALLER',
  38. readOnly:true,
  39. allowBlank:false,
  40. maxWidth:300
  41. },{
  42. xtype:'mfilefield',
  43. fieldLabel:'选择文件',
  44. name:'PATH_',
  45. allowBlank:false
  46. },{
  47. xtype:'textfield',
  48. fieldLabel:'流水号',
  49. name:'VERSION_',
  50. maxWidth:200
  51. },{
  52. xtype:'textfield',
  53. fieldLabel:'关键字',
  54. name:'KEYWORDS_',
  55. allowBlank:false
  56. },{
  57. xtype:'textareafield',
  58. fieldLabel:'文档概述',
  59. name:'DESC_',
  60. allowBlank:false
  61. }],
  62. buttonAlign: 'center',
  63. buttons: [{
  64. text: '保存',
  65. itemId: 'btn-save',
  66. formBind:true
  67. },{
  68. text:'查看',
  69. id:'btn-scan',
  70. disabled:true
  71. },{
  72. text: '关闭',
  73. id: 'btn-close'
  74. }]
  75. }, {
  76. xtype: 'grid',
  77. title: '更新日志',
  78. id:'log-grid',
  79. region : 'south',
  80. height: window.innerHeight*0.62,
  81. bodyStyle : 'background:#f9f9f9',
  82. border: false,
  83. collapsible: true,
  84. collapseDirection: 'bottom',
  85. collapsed: true,
  86. columnLines:true,
  87. columns:[{
  88. text:'版本号',
  89. dataIndex:'VERSION_'
  90. },{
  91. text:'更新人',
  92. dataIndex:'MAN_'
  93. },{
  94. text:'更新时间',
  95. dataIndex:'DATE_',
  96. width:150
  97. }],
  98. store:Ext.create('Ext.data.Store',{
  99. fields:['VERSION_','MAN_','DATE_'],
  100. proxy:{
  101. method:'get',
  102. type:'ajax',
  103. url:basePath+'ma/help/getDocLogs.action',
  104. reader: {
  105. type: 'json',
  106. root: 'logs'
  107. }
  108. }
  109. })
  110. } ]
  111. } ]
  112. });
  113. me.callParent(arguments);
  114. }
  115. });