Viewport.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Ext.define('erp.view.common.JProcessDeploy.Viewport',{
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. BaseUtil: Ext.create('erp.util.BaseUtil'),// 获得 参数 。
  6. initComponent : function(){
  7. var me = this;
  8. var formPanel = Ext.create("erp.view.core.form.Panel",{
  9. anchor: '100% 10%' ,
  10. id:'form' ,
  11. _noc:1
  12. /*hidden:'true'*/
  13. });
  14. Ext.apply(me, {
  15. items: [{
  16. id:'JProcessViewport',
  17. layout: 'anchor',
  18. items: [formPanel]
  19. }]
  20. });
  21. me.callParent(arguments);
  22. },
  23. listeners:{
  24. afterrender:function(){
  25. formCondition = this.BaseUtil.getUrlParam('formCondition');//从url解析参数
  26. formCondition = (formCondition == null) ? "" : formCondition.replace(/IS/g,"=");
  27. var strArr = formCondition.split("=");
  28. /*var xmlInfo='';*/
  29. /*Ext.Ajax.request({
  30. url: basePath + 'common/getJProcessDeployInfo.action',
  31. params: {
  32. jdId: strArr[1]
  33. },
  34. success: function(response){
  35. var text = new Ext.decode(response.responseText);
  36. console.log(text);
  37. xmlInfo = text.xmlInfo;
  38. console.log(xmlInfo);
  39. }
  40. });*/
  41. panel = {
  42. /*title : '单据信息',*/
  43. tag : 'iframe',
  44. style:{
  45. background:'transparent',
  46. border:'none'
  47. },
  48. /*tabConfig:{tooltip:main.getActiveTab().tabConfig.tooltip+'('+keyField + "=" + value+')'},*/
  49. frame : true,
  50. border : false,
  51. /*bodyBorder:false,*/
  52. layout : 'fit',
  53. height:window.innerHeight*0.9,
  54. iconCls : 'x-tree-icon-tab-tab',
  55. html : '<iframe id="iframe_maindetail_" src="../../workfloweditor/workfloweditor2.jsp?jdId='+strArr[1]+'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
  56. };
  57. Ext.getCmp("JProcessViewport").add(panel);
  58. }
  59. }
  60. });