createClassTreeCombo: function (comboConfig) {
comboConfig = Bronze.AES.Form.initConfig(comboConfig);
var uiProvider;
if (comboConfig.checkModel) {
var isRichUI = Bronze.AES.Tree.RichUICheckModel[comboConfig.checkModel] != undefined;
if (isRichUI) {
uiProvider = Ext.ux.TreeNodeRichUI;
}
else {
uiProvider = Ext.ux.TreeCheckNodeUI;
}
}
var loader = new Ext.tree.TreeLoader({
dataUrl: Bronze.Common.ajaxURL,
baseAttrs: {
uiProvider: uiProvider
},
baseParams: {
classname: "ClassSorceStatistics",
methodname: 'GetAllClassByGrade',
// isCondition: false,
gradeId: Bronze.Common.guidEmpty //'dc880bb4-3f36-49c9-ba9f-3110925a585b'
},
requestMethod: 'POST',
jsonData: true
});
var root = new Ext.tree.AsyncTreeNode({
leaf: false,
// loader: loader,
text: "所有班级",
id: Bronze.Common.guidEmpty,
uiProvider: uiProvider,
expandable: true,
expanded: true
});
var treecomboParent = new Ext.ux.TreeCombo(Ext.apply({
editable: false,
name: 'FParentName',
hiddenName: 'FClassID',
root: root,
loader: loader,
rootVisible: true,
listeners: {
afterCreateTree: function (comb, tree) {
tree.expandAll();
}
}
}, comboConfig));
treecomboParent.on('filterNode', function (t, n) {
return n.attributes.value == "class";
});
return treecomboParent;
},
var comClass = Bronze.AES.Form.createClassTreeCombo({ width: 120, fieldLabel: '班级', checkModel: 'cascade' });
comClass.on('afterNodesChecked', function (el, ev) {
store.baseParams.classIds = comClass.getValue();
store.baseParams.subjectIds = comSubject.getValue() == Bronze.Common.guidEmpty ? "" : comSubject.getValue();
store.reload();
});