Main.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. Ext.define('erp.view.mobile.Main',{
  2. extend: 'Ext.Viewport',
  3. hideBorders: true,
  4. layout: 'border',
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. xtype: 'tabpanel',
  10. _mobile: true,
  11. cls: 'custom',
  12. region: 'center',
  13. id: 'content-panel',
  14. tabPosition: 'bottom',
  15. items: [{
  16. title: '首页',
  17. xtype: 'container',
  18. autoScroll: true,
  19. items: [{
  20. xtype: 'toolbar',
  21. height: 35,
  22. cls: 'custom-top',
  23. items: [sobText, '->', '<font class="font-face-display">' + em_name + '(' + em_code + ')</font>', '->', {
  24. text: '退出',
  25. id: 'logout',
  26. cls: 'custom-button'
  27. }]
  28. },{
  29. xtype: 'container',
  30. region: 'center',
  31. id: 'card',
  32. layout: 'card',
  33. items: [{
  34. xtype: 'container',
  35. height: 1000,
  36. layout: 'hbox',
  37. items: [{
  38. xtype: 'container',
  39. layout: 'auto',
  40. height: 500,
  41. autoScroll: true,
  42. flex: 1,
  43. margin: '5 5 0 0',
  44. cls: 'custom',
  45. items: [{
  46. xtype: 'toolbar',
  47. region: 'north',
  48. margin: '5 0 0 0',
  49. cls: 'custom-tb',
  50. height: 35,
  51. items: ['->','导航','->']
  52. },{
  53. xtype: 'dataview',
  54. id: 'treeroot',
  55. itemSelector: '.custom-button',
  56. overItemCls : 'tree-node-hover',
  57. enableDragDrop: true,
  58. tpl: Ext.create('Ext.XTemplate',
  59. '<tpl for=".">',
  60. '<div class="custom-button"',
  61. '<font>{text}</font>',
  62. '</div>',
  63. '</tpl>'
  64. ),
  65. store: new Ext.data.Store({
  66. fields: ['text', 'parentId', {name: 'id', type: 'number'}, 'url', 'leaf']
  67. })
  68. }]
  69. }, {
  70. flex: 1,
  71. margin: '5 0 0 0',
  72. xtype: 'container',
  73. cls: 'custom',
  74. height: 1000,
  75. defaults: {
  76. xtype: 'container',
  77. margin: '5 0 0 0',
  78. cls: 'custom'
  79. },
  80. items: [/*{
  81. margin: '0 0 0 0',
  82. layout: 'auto',
  83. items: [{
  84. xtype: 'toolbar',
  85. region: 'north',
  86. margin: '5 0 0 0',
  87. cls: 'custom-tb',
  88. height: 35,
  89. items: ['->','常用模块','->']
  90. },{
  91. xtype: 'dataview',
  92. id: 'commonuse',
  93. itemSelector: '.custom-button-link',
  94. overItemCls : 'tree-node-hover',
  95. enableDragDrop: true,
  96. tpl: Ext.create('Ext.XTemplate',
  97. '<tpl for=".">',
  98. '<div class="custom-button-link"',
  99. '<font>{cu_description}({cu_count})</font>',
  100. '</div>',
  101. '</tpl>'
  102. ),
  103. store: new Ext.data.Store({
  104. fields: [{name: 'cu_count', type: 'number'}, 'cu_description', {name: 'cu_emid', type: 'number'}, {name: 'cu_id', type: 'number'}, 'cu_url', {name: 'cu_snid', type: 'number'}]
  105. })
  106. }]
  107. }, */{
  108. margin: '0 0 0 0',
  109. layout: 'auto',
  110. items: [{
  111. xtype: 'toolbar',
  112. region: 'north',
  113. margin: '5 0 0 0',
  114. cls: 'custom-tb',
  115. height: 35,
  116. items: ['->','我的可选流程','->']
  117. },{
  118. xtype: 'dataview',
  119. id: 'mychoice',
  120. itemSelector: '.custom-button-link',
  121. overItemCls : 'tree-node-hover',
  122. enableDragDrop: true,
  123. tpl: Ext.create('Ext.XTemplate',
  124. '<tpl for=".">',
  125. '<div class="custom-button-link"',
  126. '<font>{taskname}({status})</font>',
  127. '</div>',
  128. '</tpl>'
  129. ),
  130. store: new Ext.data.Store({
  131. fields: [{name: 'id', type: 'number'},'taskname', 'status']
  132. })
  133. }]
  134. },{
  135. margin: '0 0 0 0',
  136. layout: 'auto',
  137. items: [{
  138. xtype: 'toolbar',
  139. region: 'north',
  140. margin: '5 0 0 0',
  141. cls: 'custom-tb',
  142. height: 35,
  143. items: ['->','我的待审批流程','->']
  144. },{
  145. xtype: 'dataview',
  146. id: 'myflow',
  147. itemSelector: '.custom-button-link',
  148. overItemCls : 'tree-node-hover',
  149. enableDragDrop: true,
  150. tpl: Ext.create('Ext.XTemplate',
  151. '<tpl for=".">',
  152. '<div class="custom-button-link"',
  153. '<font>{taskname}({status})</font>',
  154. '</div>',
  155. '</tpl>'
  156. ),
  157. store: new Ext.data.Store({
  158. fields: [{name: 'id', type: 'number'},'taskname', 'status']
  159. })
  160. }]
  161. }]
  162. }]
  163. }]
  164. }]
  165. }]
  166. }]
  167. });
  168. me.callParent(arguments);
  169. }
  170. });