MWF.xApplication.Report.StrategyExplorer.Deployment = new Class({ Implements: [Options, Events], options: { "style": "default", "isEdited" : true, "isKeyworkEdited" : true }, initialize: function (container, explorer, data, options) { this.setOptions( options ); this.container = container; this.explorer = explorer; this.app = this.explorer.app; this.lp = this.app.lp; this.css = this.explorer.css; this.actions = this.app.restActions; this.data = data; this.path = "/x_component_Report/$StrategyExplorer/"; }, load: function () { this.month = parseInt(this.data.month); this.node = new Element("div", { styles : this.css.deplymentNode }).inject( this.container ); this.loadPerson(); this.keyWorkContainer = new Element("div").inject( this.node ); this.keyworkList = []; this.data.thisMonth_workList.each( function( data, i ){ this.loadKeyWork( data, i+1 ); }.bind(this)) }, loadPerson: function(){ this.personNode = new Element("div.personDeployNode",{ styles : this.css.personDeployNode }).inject( this.node ); var html = "" + "" + " " + " "+ "" + "
汇报填写人员
"; this.personNode.set("html", html); MWF.xDesktop.requireApp("Template", "MForm", function () { this.peronform = new MForm(this.personNode, this.data, { verifyType : "single", isEdited: this.options.isEdited, style : "report", itemTemplate: { workreportPersonList: { text : this.lp.targetPerson, type : "org", orgType : "identity", isEdited : this.options.isEdited, count : 0, notEmpty : true, units : [this.data.targetUnit.split("@")[0]], event :{ change : function( item ){ this.save( item.getElements()[0] ); }.bind(this) } } } }, this.app ); this.peronform.load(); }.bind(this), true); }, loadKeyWork : function( data, index ){ var keywork = new MWF.xApplication.Report.StrategyExplorer.Deployment.KeyWorkItem( this.keyWorkContainer, this, data, { reportId : this.data.id, isEdited : this.options.isKeyworkEdited && this.options.isEdited, orderNumber : this.data.orderNumber || index } ); keywork.load(); this.keyworkList.push( keywork ); }, getPersonString : function(){ }, arrayIsContains : function( array, identity ){ for( var i=0; i