MoudleConPortal.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Ext.define('erp.view.common.sysinit.MoudleConPortal', {
  2. extend: 'Ext.form.FieldContainer',
  3. alias: 'widget.moudleconportlet',
  4. layout: 'column',
  5. margin: '4 0 0 4',
  6. border:false,
  7. autoScroll:true,
  8. defaults: {
  9. xtype: 'checkbox',
  10. readOnly:true,
  11. columnWidth: .33
  12. },
  13. initComponent: function(){
  14. this.getItems(0);
  15. this.callParent(arguments);
  16. },
  17. getItems:function(pid){
  18. var me = this;
  19. Ext.Ajax.request({// 拿到tree数据
  20. url : basePath + 'system/initTree.action',
  21. params: {
  22. pid:pid,
  23. _noc:1
  24. },
  25. callback : function(options,success,response){
  26. var res = new Ext.decode(response.responseText);
  27. if(res.tree){
  28. Ext.Array.each(res.tree,function(item){
  29. me.add({boxLabel:item.in_desc});
  30. });
  31. me.add({
  32. padding:'10 0 0 17',
  33. xtype:'tbtext',
  34. columnWidth:1,
  35. style:{
  36. padding:'10 0 0 17',
  37. color:'gray ! important'
  38. },
  39. text:'√ 为已启用模块'
  40. })
  41. } else if(res.exceptionInfo){
  42. showError(res.exceptionInfo);
  43. }
  44. }
  45. });
  46. }
  47. });