MWF.xApplication.Selector = MWF.xApplication.Selector || {}; MWF.xDesktop.requireApp("Selector", "Person", null, false); MWF.xApplication.Selector.Identity = new Class({ Extends: MWF.xApplication.Selector.Person, options: { "style": "default", "count": 0, "title": MWF.xApplication.Selector.LP.selectIdentity, "units": [], "values": [], "dutys": [], "zIndex": 1000, "expand": false, "noUnit" : false, "include" : [], //增加的可选项 "exclude" : [], //排除的可选项 "resultType" : "", //可以设置成个人,那么结果返回个人 "expandSubEnable" : true, //是否允许展开下一层, "selectAllEnable" : true //分类是否允许全选下一层 }, loadSelectItems: function(addToNext){ debugger; var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); if( this.options.resultType === "person" ){ if( this.titleTextNode ){ this.titleTextNode.set("text", MWF.xApplication.Selector.LP.selectPerson ); }else{ this.options.title = MWF.xApplication.Selector.LP.selectPerson; } } if(this.options.noUnit){ this.loadInclude(afterLoadSelectItemFun); }else if (this.options.units.length){ var loadUnitSuccess = function () { this.unitLoaded = true; if( this.includeLoaded ){ afterLoadSelectItemFun(); } }.bind(this); var loadUnitFailure = loadUnitSuccess; this.loadInclude( function () { this.includeLoaded = true; if( this.unitLoaded ){ afterLoadSelectItemFun(); } }.bind(this)); var unitList = []; for( var i=0 ; i