52,797
社区成员
发帖
与我相关
我的任务
分享
//基本信息
var topBase=new Ext.Panel({
height : 330,
title : "<center><b>公司基本情况</b></center>",
html:" <iframe id='dows' src='/common/showtop.jsp'></iframe>",
});
var bottomBase=new Ext.Panel({
height : 330,
title : "<center><b>基本情况</b></center>",
html:" <iframe id='dos'src='/common/showbott.jsp'></iframe>",
});
var myBus = new Ext.Panel({
title : '<center><b>业务信息</b></center>',
html:" <iframe id='text' src='/common/showbus.jsp'></iframe>",
});
//检 索
var search = new Ext.Panel({
title : '<center><b>检 索</b></center>',
html:"<iframe id='search' src='/gridareas/search.jsp'></iframe>",
});
//基本信息
var baseInfo = new Ext.Panel({
height : 530,
items : [topBase,bottomBase]
});
//业务
var mybusInfo = new Ext.Panel({
height : 530,
items : [myBus]
});
//搜索
var searchInfo = new Ext.Panel({
height : 530,
items : [search]
});
//总页签
var tabs = new Ext.TabPanel({
border : false,
activeTab : 0,
renderTo : 'SearchNav',
frame : true,
height : 580,
deferredRender : false,
layoutOnTabChange : true,
items : [{
items : baseInfo,
title : '基本'
},{
items : mybusInfo,
title : '业务'
},{
items : searchInfo,
title : '检索
}]
});
我们这个是这么做的,是因为tabpanel里嵌套太多tabpanel加载太慢
所以刚开始没设iframe的src,当点击某个页签时再加载。
items: [{
title: '资金链风险',
iconCls: 'icon-028',
layout: 'fit',
border: false,
html: '<iframe id="test01" name="test01" height="100%"
width="100%" frameborder="0" src=""></iframe>'
},{
title: '存量资金风险',
iconCls: 'icon-029',
layout: 'fit',
border: false,
html: '<iframe id="test02" name="test02" height="100%" width="100%" frameborder="0" src=""></iframe>'
}
listeners: {
tabchange: function (tab,panel) {
var title = tab.getActiveTab().title;
if(title == '资金链风险'){
document.getElementById('test01').src = ROOT_PATH+'/pages/monitorwarnning/fundchainwarning/warningdetail/cashflow/cashflow.jsp';
}else if(title == '存量资金风险'){
document.getElementById('test02').src = ROOT_PATH+'/pages/monitorwarnning/fundchainwarning/warningdetail/depositfund/depositfund.jsp';
},
var tabs = new Ext.TabPanel({
renderTo: 'tabAccept',
activeTab:0 ,
frame:true,
defaults:{autoHeight: true},
items:[
{contentEl:'acceptanceAccept', title: '受理',status:'0'},
{contentEl:'finishAccept', title:'处理',status:'1'},
{contentEl:'defeasanceAccept',title:'作废',status:'2'},
{contentEl:'allAccept',title:'全部',status:'-1'}
],
listeners:{'tabchange':
function(statu,tab)
{
// get status
var stu=tab.status ;
//disable tbar button
store.load({params:{start:0,status:stu}});
}
else if(stu==0)
{
store.load();
}
else if(stu==-1)
{
store.load({params:{start:0,status:stu,searchKey:searchKeyValue,startTime:startTimeAccept,endTime:endTimeAccept}});
}
}
}
});
//总页签
var tabs = new Ext.TabPanel({
border : false,
activeTab : 0,
renderTo : 'SearchNav',
frame : true,
height : 580,
deferredRender : false,
layoutOnTabChange : true,
items : [{
items : baseInfo,//就是执行更新,添加一个id。更新这些组件即可
title : '基本'
},{
items : mybusInfo,
title : '业务'
},{
items : searchInfo,
title : '检索
}]
});
你不要更新tabpanel,你更新tabpanel中的items的items就可以了