text: MWF.xApplication.Selector=MWF.xApplication.Selector||{},MWF.xDesktop.requireApp("Selector","Person",null,!1),MWF.xApplication.Selector.Duty=new Class({Extends:MWF.xApplication.Selector.Person,options:{style:"default",count:0,title:MWF.xApplication.Selector.LP.selectDuty,values:[],expand:!1},_init:function(){this.selectType="duty",this.className="Duty"},loadSelectItems:function(t){this.orgAction.listUnitdutyName(function(t){t.data.nameList.each(function(t){var e=this._newItem(t,this,this.itemAreaNode);this.items.push(e)}.bind(this))}.bind(this))},_scrollEvent:function(t){return!0},_getChildrenItemIds:function(){return null},_newItemCategory:function(t,e,i,n,s){return new MWF.xApplication.Selector.Duty[t](e,i,n,s)},_listItemByKey:function(t,e,i){this.orgAction.listUnitdutyNameByKey(function(e){t&&t.apply(this,[{data:e.data.nameList}])}.bind(this),e,i)},_getItem:function(t,e,i,n){t&&t.apply(this,[{data:{name:i,id:i}}])},_newItemSelected:function(t,e,i){return new MWF.xApplication.Selector.Duty.ItemSelected(t,e,i)},_listItemByPinyin:function(t,e,i){this.orgAction.listUnitdutyNameByKey(function(e){t&&t.apply(this,[{data:e.data.nameList}])}.bind(this),e,i)},_newItem:function(t,e,i,n){return new MWF.xApplication.Selector.Duty.Item({name:t,id:t},e,i,n)}}),MWF.xApplication.Selector.Duty.Item=new Class({Extends:MWF.xApplication.Selector.Person.Item,_getShowName:function(){return this.data.name},_getTtiteText:function(){return this.data.name},_setIcon:function(){var t=this.selector.options.style;this.iconNode.setStyle("background-image","url(../x_component_Selector/$Selector/"+t+"/icon/duty.png)")},checkSelectedSingle:function(){this.selector.options.values.filter(function(t,e){return"object"===typeOf(t)?this.data.id===t.id||this.data.name===t.name:"string"===typeOf(t)&&(this.data.id===t||this.data.name===t)}.bind(this)).length&&this.selectedSingle()},checkSelected:function(){var t=this.selector.selectedItems.filter(function(t,e){return t.data.id===this.data.id||t.data.name===this.data.name}.bind(this));t.length&&(t[0].addItem(this),this.selectedItem=t[0],this.setSelected())}}),MWF.xApplication.Selector.Duty.ItemSelected=new Class({Extends:MWF.xApplication.Selector.Person.ItemSelected,_getShowName:function(){return this.data.name},_setIcon:function(){var t=this.selector.options.style;this.iconNode.setStyle("background-image","url(../x_component_Selector/$Selector/"+t+"/icon/duty.png)")},check:function(){if(this.selector.items.length){var t=this.selector.items.filter(function(t,e){return t.data.id===this.data.id||t.data.name===this.data.name}.bind(this));this.items=t,t.length&&t.each(function(t){t.selectedItem=this,t.setSelected()}.bind(this))}}});