this.refreshTabDate = function(id){
//把规则模块的id赋给unitRuleTabPanel的属性
unitRuleTabPanel.selectBrUnitRuleId = id;
//获得活动中的Tab页
var activeTabPanel = unitRuleTabPanel.getActiveTab();activeTabPanel.selectBrUnitRuleId = id;
//如果在活动中的tab页中有refreshDate方法
if(activeTabPanel.refreshDate){
//执行refreshDate()方法,方法一般写刷刷新的store
activeTabPanel.refreshDate();var activeTabPanel = tabPanel.getActiveTab();
//比对选中的tab的ruleId是否是先前的ruleId,如果不是就刷新
if(unitRuleTabPanel.selectBrUnitRuleId != activeTabPanel.selectBrUnitRuleId){
//把当前的ruleId赋给活动Tab的ruleId
activeTabPanel.selectBrUnitRuleId = unitRuleTabPanel.selectBrUnitRuleId;});
需要在关联交易/步骤、'规则影响分析、影响范围模块中添加refreshDate();方法刷新模块中的store;
各个模块中的stroe需要在beforeLoad之前加ruleId传到后台执行查询
listeners : {
beforeload : {
fn : function(store, options) {
var brUnitRuleId = Ext.getCmp('brUnitRuleTabPanel').selectBrUnitRuleId;
Ext.apply(store.proxy.extraParams, {
'pageNum' : this.pageNum,
'pageSize': this.pageSize,
'effectName':this.condition,
'ruleId':brUnitRuleId
});
}
}
}