|
|
@@ -42,6 +42,21 @@ Ext.define('school.view.interaction.notice.SchoolNoticeController', {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ onNotifyClassComboReady: function(classCombo) {
|
|
|
+ var classStore = Ext.StoreMgr.get('store_class');
|
|
|
+ if(classStore.getCount() === 0 || classCombo.store.getCount() === 2) {
|
|
|
+ classStore.load(function(records) {
|
|
|
+ var classData = records.map(function(record) {
|
|
|
+ var name = record.get('clazz_grade') + ' | '+ record.get('clazz_name');
|
|
|
+ var value = record.get('clazz_id');
|
|
|
+ return {name: name, value: value};
|
|
|
+ });
|
|
|
+ classCombo.store.insert(2, classData);
|
|
|
+ classCombo.setValue(classCombo.value); // 重新触发一次setValue以正确显示值
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
onNotifyClassComboExpand: function(combo) {
|
|
|
var classStore = Ext.StoreMgr.get('store_class');
|
|
|
if(classStore.getCount() === 0 || combo.store.getCount() === 2) {
|
|
|
@@ -53,6 +68,7 @@ Ext.define('school.view.interaction.notice.SchoolNoticeController', {
|
|
|
return {name: name, value: value};
|
|
|
});
|
|
|
combo.store.insert(2, classData);
|
|
|
+ classCombo.setValue(classCombo.value);
|
|
|
combo.setLoading(false);
|
|
|
});
|
|
|
}
|