!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=15)}([function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Helper=t.Resources=t.XMLOperate=t.StringUtil=t.Sequence=t.Graphics=t.AuxiliaryLine=t.Archor=t.Api=void 0;var r=i(18),s=n(r),a=i(19),o=n(a),l=i(20),h=n(l),u=i(10),p=n(u),c=i(21),g=n(c),d=i(22),f=n(d),y=i(23),m=n(y),v=i(44),b=n(v),x=i(45),w=n(x);t.Api=s.default,t.Archor=o.default,t.AuxiliaryLine=h.default,t.Graphics=p.default,t.Sequence=g.default,t.StringUtil=f.default,t.XMLOperate=m.default,t.Resources=b.default,t.Helper=w.default},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i=this.element[t].y?e:this.element[t];return e}},{key:"getPrevChunkBaseline",value:function(){return this.top-this.height}},{key:"getNodeConfigInfo",value:function(){var e={};if(e.text=this.getChineseName(),e.uuid=this.getProp("id"),e.instance=this,e.idOne=this.idOne||null,e.field=this.field||null,e.option=this.option||null,e.scope=this.scope||null,this.element.length>0){e.nodes=[];for(var t=0,i=this.element.length;t0||(e.icon="glyphicon glyphicon-cloud"),e}},{key:"getElementConnectionPoint",value:function(e){var t={};if(this.element.length>0){for(var i=0,n=this.element.length;i");)e=e.replace(/&/g,"@amp;"),e=e.replace(/\"/g,"@quot;"),e=e.replace(//g,"@gt;");return e}return""}},{key:"replaceXML",value:function(e){if(null!=e){for(;-1!=e.indexOf('"');)e=e.replace(/\"/g,"@quot;");return e}return""}},{key:"isSelected",value:function(e){return e=Math.round(this.top-this.height)}},{key:"isInChunkBaseline",value:function(e){return e>this.top-5&&e0}},{key:"hasSelectedElement",value:function(e,t){for(var i=0,n=this.element.length;i0))return!1;for(var n=0,r=this.element.length;n0)for(var t=0;tthis.top-5&&ethis.top-5&&e+t0)for(var p=0;p0)for(var l=0;l=this.y?{beginPoint:{x:this.x,y:this.y},endPoint:{x:e.x,y:e.y+e.height}}:parseInt(e.x)==parseInt(this.x)&&e.y<=this.y?{beginPoint:{x:e.x,y:e.y},endPoint:{x:this.x,y:this.y+this.height}}:parseInt(e.x)==parseInt(this.x+this.width)&&e.y>=this.y?{beginPoint:{x:this.x+this.width,y:this.y},endPoint:{x:e.x,y:e.y+e.height}}:parseInt(e.x)==parseInt(this.x+this.width)&&e.y<=this.y?{beginPoint:{x:e.x,y:e.y},endPoint:{x:this.x+this.width,y:this.y+this.height}}:parseInt(e.x+e.width)==parseInt(this.x)&&e.y>=this.y?{beginPoint:{x:this.x,y:this.y},endPoint:{x:e.x+e.width,y:e.y+e.height}}:parseInt(e.x+e.width)==parseInt(this.x)&&e.y<=this.y?{beginPoint:{x:e.x+e.width,y:e.y},endPoint:{x:this.x,y:this.y+this.height}}:parseInt(e.x+e.width)==parseInt(this.x+this.width)&&e.y>=this.y?{beginPoint:{x:this.x+this.width,y:this.y},endPoint:{x:e.x+e.width,y:e.y+e.height}}:parseInt(e.x+e.width)==parseInt(this.x+this.width)&&e.y<=this.y?{beginPoint:{x:e.x+e.width,y:e.y},endPoint:{x:this.x+this.width,y:this.y+this.height}}:null}},{key:"getOrdinateConnectionPoint",value:function(e){return parseInt(e.y)==parseInt(this.y)&&e.x>=this.x?{beginPoint:{x:this.x,y:this.y},endPoint:{x:e.x+e.width,y:e.y}}:parseInt(e.y)==parseInt(this.y)&&e.x<=this.x?{beginPoint:{x:e.x,y:e.y},endPoint:{x:this.x+this.width,y:this.y}}:parseInt(e.y)==parseInt(this.y+this.height)&&e.x>=this.x?{beginPoint:{x:this.x,y:this.y+this.height},endPoint:{x:e.x+e.width,y:e.y}}:parseInt(e.y)==parseInt(this.y+this.height)&&e.x<=this.x?{beginPoint:{x:e.x,y:e.y},endPoint:{x:this.x+this.width,y:this.y+this.height}}:parseInt(e.y+e.height)==parseInt(this.y)&&e.x>=this.x?{beginPoint:{x:this.x,y:this.y},endPoint:{x:e.x+e.width,y:e.y+e.height}}:parseInt(e.y+e.height)==parseInt(this.y)&&e.x<=this.x?{beginPoint:{x:e.x,y:e.y+e.height},endPoint:{x:this.x+this.width,y:this.y}}:parseInt(e.y+e.height)==parseInt(this.y+this.height)&&e.x>=this.x?{beginPoint:{x:this.x,y:this.y+this.height},endPoint:{x:e.x+e.width,y:e.y+e.height}}:parseInt(e.y+e.height)==parseInt(this.y+this.height)&&e.x<=this.x?{beginPoint:{x:e.x,y:e.y+e.height},endPoint:{x:this.x+this.width,y:this.y+this.height}}:null}},{key:"toXML",value:function(){var e="";if(e+="\n",0!=this.property.length)for(var n=0,r=this.property;n\n"),e+="\n"}else e+="/>\n";return e}},{key:"handleReportElement",value:function(e){var i=this,n={property:[],printWhenExpression:""};if("reportElement"==e.tagName&&(n.x=parseInt(e.getAttribute("x")),n.printedY=parseInt(e.getAttribute("y")),n.width=parseInt(e.getAttribute("width")),n.height=parseInt(e.getAttribute("height")),n.id=e.getAttribute("uuid"),n.key=u.StringUtil.dencodeHTML(e.getAttribute("key")),n.forecolor=e.getAttribute("forecolor")?e.getAttribute("forecolor"):t.DEF_COLOR,n.backcolor=e.getAttribute("backcolor")?e.getAttribute("backcolor"):t.DEF_BGCOLOR,n.printWhenGroupChanges=e.getAttribute("printWhenGroupChanges"),n.mode=e.getAttribute("mode")?e.getAttribute("mode"):t.DEF_MODE,n.isRemoveLineWhenBlank="true"===e.getAttribute("isRemoveLineWhenBlank"),n.isPrintRepeatedValues="true"===e.getAttribute("isPrintRepeatedValues"),n.isPrintWhenDetailOverflows="true"===e.getAttribute("isPrintWhenDetailOverflows"),n.isPrintInFirstWholeBand="true"===e.getAttribute("isPrintInFirstWholeBand"),n.positionType=e.getAttribute("positionType")?e.getAttribute("positionType"):t.DEF_POSTYPE,n.stretchType=e.getAttribute("stretchType")?e.getAttribute("stretchType"):t.DEF_STRETCHTYPE,e.hasChildNodes()))for(var r=0,s=e.children.length;r=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}},{key:"changeElementPosition",value:function(e){if("object"!=(void 0===e?"undefined":a(e)))return!1;var t=void 0,i=0,n={};if(e.x&&!e.y)t=e.x-this._handlePointX,n.x=this.x+t,this.setProps({x:n.x,_handlePointX:e.x});else if(e.y&&!e.x)i=e.y-this._handlePointY,n.y=this.y+i,this.setProps({y:n.y,_handlePointY:e.y});else{if(!e.y||!e.x)return!1;t=e.x-this._handlePointX,i=e.y-this._handlePointY,n.x=this.x+t,n.y=this.y+i,this.setProps({x:n.x,y:n.y,_handlePointX:e.x,_handlePointY:e.y})}}},{key:"changeElementWhenDragArchor",value:function(e,t,i){var n=void 0,r=void 0,s=void 0,a=void 0,o={};s=Math.abs(t-this._handlePointX),a=Math.abs(i-this._handlePointY),o.x=this.x+t-this._handlePointX,o.y=this.y+i-this._handlePointY,this._handlePointX>=t&&this._handlePointY>=i&&0==e.x&&0==e.y?(n=this.width+s,r=this.height+a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,x:o.x,y:o.y})):this._handlePointX<=t&&this._handlePointY<=i&&0==e.x&&0==e.y?(n=this.width-s,r=this.height-a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,x:o.x,y:o.y})):this._handlePointX<=t&&this._handlePointY>=i&&1==e.x&&0==e.y?(n=this.width+s,r=this.height+a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,y:o.y})):this._handlePointX>=t&&this._handlePointY<=i&&1==e.x&&0==e.y?(n=this.width-s,r=this.height-a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,y:o.y})):this._handlePointX>=t&&this._handlePointY<=i&&0==e.x&&1==e.y?(n=this.width+s,r=this.height+a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,x:o.x})):this._handlePointX<=t&&this._handlePointY>=i&&0==e.x&&1==e.y?(n=this.width-s,r=this.height-a,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i,x:o.x})):1==e.x&&1==e.y&&(n=this.width+t-this._handlePointX,r=this.height+i-this._handlePointY,this.setProps({width:n,height:r,_handlePointX:t,_handlePointY:i}))}}]),t}(h.default);p.DEF_WIDTH=100,p.DEF_HEIGHT=24,p.DEF_MODE="Opaque",p.DEF_COLOR="#000000",p.DEF_BGCOLOR="#ffffff",p.DEF_POSTYPE="FixRelativeToTop",p.DEF_STRETCHTYPE="NoStretch",t.default=p},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i7&&t.chunk.forEach(function(e){"GroupHeader"==e.scope&&(y[e.name]="false")});for(var m in y)m==a.resetGroup?y[m]="true":y[m]="false";$.when(i.getTemplete("editVariable-tmpl"),i.getJSON()).done(function(t,i){var r={title:"Variable",name:a.text,field:a.field,idOne:l,str:h,cls:c,resetTypeOption:d,resetType:a.resetType,initialValueExpression:a.initialValueExpression,resetGroupNames:y,varExpression:a.varExpression};s=o.Helper.getInstance().handleTemplete(t[0],r,"editVariable-tmpl"),n.html(s),n.find("select[name='resetType']").on("change",function(){e.changeEditContentPanel(this)})})}else if("Parameter"==a.scope)$.when(i.getTemplete("editParameter-tmpl"),i.getJSON()).done(function(e,t){var i={"java.lang.String":"true","java.lang.Integer":"false","java.lang.Double":"false"};for(var r in i)r==a.cls?i[r]="true":i[r]="false";var l={title:"Parameter",name:a.text,cls:i,idOne:a.idOne};s=o.Helper.getInstance().handleTemplete(e[0],l,"editParameter-tmpl"),n.html(s)});else{var v=a.getClassName();if("Title"==v||"PageHeader"==v||"ColumnHeader"==v||"Detail"==v||"ColumnFooter"==v||"PageFooter"==v||"Summary"==v||"GroupFooter"==v)$.when(i.getTemplete("editChunk-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.splitType[a.getProp("splitType")]="true";var r={title:v,height:parseInt(a.getProp("height")),splitType:i.splitType,printWhenExpression:a.getProp("printWhenExpression")};s=o.Helper.getInstance().handleTemplete(e[0],r,"editChunk-tmpl"),n.html(s)});else if("GroupHeader"==v){var b={};""==a.field&&(a.field="$F{"+t.field[0].columnName+"}"),t.field.forEach(function(e){"$F{"+e.columnName+"}"==a.field?b["$F{"+e.columnName+"}"]="true":b["$F{"+e.columnName+"}"]="false"}),$.when(i.getTemplete("editGroup-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.splitType[a.getProp("splitType")]="true";var r={title:v,height:parseInt(a.getProp("height")),splitType:i.splitType,printWhenExpression:a.getProp("printWhenExpression"),name:a.getProp("name"),fields:b};s=o.Helper.getInstance().handleTemplete(e[0],r,"editChunk-tmpl"),n.html(s)})}else{var x={x:Math.round(a.getProp("x")),printedY:Math.round(a.getProp("printedY")),height:Math.round(a.getProp("height")),width:Math.round(a.getProp("width")),key:a.getProp("key"),forecolor:a.getProp("forecolor"),backcolor:a.getProp("backcolor"),mode:"Transparent"==a.getProp("mode")?"true":"false",isPrintWhenDetailOverflows:a.getProp("isPrintWhenDetailOverflows")?"true":"false",isPrintRepeatedValues:a.getProp("isPrintRepeatedValues")?"true":"false",isPrintInFirstWholeBand:a.getProp("isPrintInFirstWholeBand")?"true":"false",isRemoveLineWhenBlank:a.getProp("isRemoveLineWhenBlank")?"true":"false",lineWidth:a.getProp("lineWidth"),lineStyle:a.getProp("lineStyle"),lineColor:a.getProp("lineColor"),lineStyleOption:a.getProp("lineStyleOption")},w={},T={},k={Now:!0,Report:!1,Page:!1},P={None:!0,Report:!1,Page:!1};switch(v){case"staticText":$.when(i.getTemplete("editStaticText-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",markup:i.markup,lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent"),firstLineIndent:a.getProp("firstLineIndent"),printWhenExpression:a.getProp("printWhenExpression"),islineSpacing:"Fixed"==a.getProp("lineSpacing")?"false":"true"},T={text:a.getProp("text")};var l=$.extend({},x,w,T);console.log(l),s=o.Helper.getInstance().handleTemplete(e[0],l,"editStaticText-tmpl"),n.html(s)});break;case"textField":var C={"java.lang.String":"true","java.lang.Integer":"false","java.lang.Double":"false"};for(var g in C)g==a.cls?C[g]="true":C[g]="false";for(var E in k)E==a.getProp("evaluationTime")?k[E]=!0:k[E]=!1;$.when(i.getTemplete("editTextField-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",printWhenExpression:a.getProp("printWhenExpression"),lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent"),firstLineIndent:a.getProp("firstLineIndent"),islineSpacing:"Fixed"==a.getProp("lineSpacing")?"false":"true"},T={text:a.text,isBlankWhenNull:a.getProp("isBlankWhenNull")?"true":"false",isStretchWithOverflow:a.getProp("isStretchWithOverflow")?"true":"false",pattern:a.getProp("pattern"),evaluationTime:a.getProp("evaluationTime"),expression:a.getProp("expression"),cls:C,evaluationTimeOption:k};var l=$.extend({},x,w,T);s=o.Helper.getInstance().handleTemplete(e[0],l,"editTextField-tmpl"),n.html(s)});break;case"line":var S=a.getProp("directionOption");for(var _ in S)_==a.getProp("direction")?S[_]="true":S[_]="false";$.when(i.getTemplete("editLine-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={printWhenExpression:a.getProp("printWhenExpression")},T={direction:a.getProp("direction"),directionOption:S};var l=$.extend({},x,w,T,{text:v});s=o.Helper.getInstance().handleTemplete(e[0],l,"editLine-tmpl"),n.html(s)});break;case"rectangle":$.when(i.getTemplete("editRectangle-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={printWhenExpression:a.getProp("printWhenExpression")},T={radius:a.getProp("radius")};var l=$.extend({},x,w,T,{text:v});s=o.Helper.getInstance().handleTemplete(e[0],l,"editRectangle-tmpl"),n.html(s)});break;case"ellipse":$.when(i.getTemplete("editEllipse-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={printWhenExpression:a.getProp("printWhenExpression")},T={};var l=$.extend({},x,w,T,{text:v});s=o.Helper.getInstance().handleTemplete(e[0],l,"editEllipse-tmpl"),n.html(s)});break;case"variable":$.when(i.getTemplete("editVari-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType,w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",markup:i.markup,lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent")},T={text:a.getProp("text"),key:""==a.getProp("key")?a.getProp("text"):a.getProp("key")};var r=$.extend({},x,w,T);s=o.Helper.getInstance().handleTemplete(e[0],r,"editVari-tmpl"),n.html(s)});break;case"Image":var O=a.getProp("scaleImageOption");for(var A in O)A==a.getProp("scaleImage")?O[A]=!0:O[A]=!1;var N=a.getProp("hAlignOption");for(var M in N)M==a.getProp("hAlign")?N[M]=!0:N[M]=!1;var I=a.getProp("vAlignOption");for(var L in I)L==a.getProp("vAlign")?I[L]=!0:I[L]=!1;$.when(i.getTemplete("editImage-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),src:a.getProp("srcT"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",markup:i.markup,lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent"),printWhenExpression:a.getProp("printWhenExpression")},T={text:a.getProp("text"),scaleImageOption:O,hAlignOption:N,vAlignOption:I};var l=$.extend({},x,w,T);s=o.Helper.getInstance().handleTemplete(e[0],l,"editImage-tmpl"),n.html(s)});break;case"CurrentDate":var W=a.getProp("categoryOption"),F=!1;for(var D in W)D==a.getProp("Category")?(F=!0,W[D]="true"):W[D]="false";if(0==F)for(var R in W){W[R]="true";break}var j=void 0;j="Date"==a.getProp("Category")&&F?a.getProp("typeOption"):0==F?a.getProp("typeOption"):a.getProp("type2Option");for(var B in j)B==a.getProp("type")?(F=!0,j[B]="true"):j[B]="false";for(var X in j){j[X]="true";break}for(var H in k)H==a.getProp("evaluationTime")?k[H]=!0:k[H]=!1;$.when(i.getTemplete("editCurrentDate-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",printWhenExpression:a.getProp("printWhenExpression"),lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent"),firstLineIndent:a.getProp("firstLineIndent"),islineSpacing:"Fixed"==a.getProp("lineSpacing")?"false":"true"},T={text:v,date:a.getProp("text"),isBlankWhenNull:a.getProp("isBlankWhenNull")?"true":"false",isStretchWithOverflow:a.getProp("isStretchWithOverflow")?"true":"false",pattern:a.getProp("pattern"),evaluationTime:a.getProp("evaluationTime"),Category:W,type:j,evaluationTimeOption:k};var l=$.extend({},x,w,T);s=o.Helper.getInstance().handleTemplete(e[0],l,"editCurrentDate-tmpl"),n.html(s)});break;case"PageNumber":for(var z in k)z==a.getProp("evaluationTime")?k[z]=!0:k[z]=!1;$.when(i.getTemplete("editPageNumber-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.stretchType[a.getProp("stretchType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={fontName:i.fontName,textAlignment:i.textAlignment,verticalAlignment:i.verticalAlignment,size:a.getProp("size"),isBold:a.getProp("isBold")?"true":"false",isItalic:a.getProp("isItalic")?"true":"false",printWhenExpression:a.getProp("printWhenExpression"),lineSpacing:i.lineSpacing,lineSpacingSize:a.getProp("lineSpacingSize"),leftIndent:a.getProp("leftIndent"),rightIndent:a.getProp("rightIndent"),firstLineIndent:a.getProp("firstLineIndent"),islineSpacing:"Fixed"==a.getProp("lineSpacing")?"false":"true"},T={text:v,biao:a.getProp("text"),isBlankWhenNull:a.getProp("isBlankWhenNull")?"true":"false",isStretchWithOverflow:a.getProp("isStretchWithOverflow")?"true":"false",pattern:a.getProp("pattern"),evaluationTimeOption:k};var l=$.extend({},x,w,T);s=o.Helper.getInstance().handleTemplete(e[0],l,"editPageNumber-tmpl"),n.html(s)});break;case"Chart":for(var V in k)V==a.getProp("evaluationTime")?k[V]=!0:k[V]=!1;var G={Top:!0,Bottom:!1,Right:!1,Left:!1};for(var U in G)U==a.getProp("titlePosition")?G[U]=!0:G[U]=!1;var Y={Top:!0,Bottom:!1,Right:!1,Left:!1};for(var q in Y)q==a.getProp("legendPosition")?Y[q]=!0:Y[q]=!1;var J={"垂直":!0,"水平":!1};"Vertical"==a.getProp("orientation")?(J["垂直"]=!0,J["水平"]=!1):(J["垂直"]=!1,J["水平"]=!0);for(var Q in P)Q==a.getProp("resetType")?P[Q]=!0:P[Q]=!1;var K={"垂直":!0,"水平":!1};a.getProp("categoryVerticalTickLabels")?(K["垂直"]=!0,K["水平"]=!1):(K["垂直"]=!1,K["水平"]=!0);var Z={"垂直":!0,"水平":!1};a.getProp("valueVerticalTickLabels")?(Z["垂直"]=!0,Z["水平"]=!1):(Z["垂直"]=!1,Z["水平"]=!0),$.when(i.getTemplete("editChart-tmpl"),i.getJSON()).done(function(e,t){var i=t[0];i.fontName[a.getProp("fontName")]="true",i.textAlignment[a.getProp("textAlignment")]="true",i.verticalAlignment[a.getProp("verticalAlignment")]="true",i.positionType[a.getProp("positionType")]="true",i.lineSpacing[a.getProp("lineSpacing")]="true",i.markup[a.getProp("markup")]="true",x.positionType=i.positionType,x.stretchType=i.stretchType;for(var r in x.lineStyleOption)r==x.lineStyle?x.lineStyleOption[r]=!0:x.lineStyleOption[r]=!1;w={chartType:a.chartType,chartTypeChina:a.chartTypeChina,evaluationTimeOption:k,title:a.title,titleFontName:a.titleFontName,titleFontColor:a.titleFontColor,titleFontSize:a.titleFontSize,titlePositionOption:G,subtitle:a.subtitle,subtitleFontName:a.subtitleFontName,subtitleFontColor:a.subtitleFontColor,subtitleFontSize:a.subtitleFontSize,legendFontName:a.legendFontName,legendColor:a.legendColor,legendFontSize:a.legendFontSize,legendPositionOption:Y,orientationOption:J,keyExpression:a.keyExpression,valueExpression:a.valueExpression,labelExpression:a.labelExpression,resetTypeOption:P,isShowLabels:a.isShowLabels,labelFontName:a.labelFontName,labelFontSize:a.labelFontSize,labelFontColor:a.labelFontColor,labelFormat:a.labelFormat,pielegendLabelFormat:a.pielegendLabelFormat,categoryVerticalTickLabelsOption:K,valueVerticalTickLabelsOption:Z,categoryAxisLabelExpression:a.categoryAxisLabelExpression,valueAxisLabelExpression:a.valueAxisLabelExpression,isShowShapes:a.isShowShapes,isShowLines:a.isShowLines,isShowLegend:a.isShowLegend,rangeAxisMinValueExpression:a.rangeAxisMinValueExpression,rangeAxisMaxValueExpression:a.rangeAxisMaxValueExpression,printWhenExpression:a.printWhenExpression},T={text:a.getProp("text")};var l=$.extend({},x,w,T);console.log(l),s=o.Helper.getInstance().handleTemplete(e[0],l,"editChart-tmpl"),n.html(s)});break;case"SubReport":t.myId||(t.myId=$("#parentId").val()),$.when(i.getTemplete("editSubReport-tmpl"),i.getSubReport(t.myId)).done(function(e,t){for(var i,l=t[0].data.datas,h=[{id:"",name:"选择",checked:!0}],u=0;u999&&r.val("1000");var h=Math.round(r.val()*(72/2.54));t.canvas.width=h,t.width=h,t.pageWidth=h,t.changeChunkSize({width:parseInt(h)}),t.repaint()}else if("pageHeight"==s){r.val()>999?r.val("1000"):r.val()"}else{var d=i.getProp("type2Option");for(var f in d)p+=""}r.siblings().parent().siblings(".input-group").eq(0).find("select").html(p)}else"lineSpacing"==s&&("Fixed"==r.val()?r.parent().siblings(".input-group").find("#lineSpacingSize").removeAttr("readonly"):r.parent().siblings(".input-group").find("#lineSpacingSize").prop("readonly","true"),l.paragraph={},l.paragraph[s]=r.val());l[s]=r.val()}"categoryVerticalTickLabels"!=s&&"valueVerticalTickLabels"!=s||("垂直"==r.val()?l[s]=!0:"水平"==r.val()&&(l[s]=!1)),"orientation"==s&&("垂直"==r.val()?l[s]="Vertical":"水平"==r.val()&&(l[s]="Horizontal"));var y=void 0;if("option"==s){switch(r.val()){case"计数":y="Count";break;case"非重复计数":y="DistinctCount";break;case"总数":y="Sum";break;case"平均数":y="Average";break;case"最低数":y="Lowest";break;case"最高数":y="Highest";break;case"标准偏差":y="StandardDeviation";break;case"方差":y="Variance";break;case"Nothing":y="Nothing";break;case"第一个":y="First";break;default:y="Nothing"}l[s]=y}if("subreportExpression"==s&&(l[s]=r.children("option:selected").attr("rid"),t.subReportId=r.children("option:selected").attr("rid")),r.siblings().val(r.val()),t.variable){var m=void 0;"SPAN"==r.siblings()[0].nodeName?(m=parseInt(r.parent().parent().attr("idOne")),r.parent().parent().find("input[name='name']").prop("value")):(m=parseInt(r.parent().parent().parent().attr("idOne")),r.parent().parent().parent().find("input[name='name']").prop("value"));for(var v=t.variable,b=v.length,x=0;x0&&(e.remove(),this.setProps({isShowMenu:!1}))}},{key:"registerEvent",value:function(){var t=$(this.container),i=this;t.off("click","a").on("click","a",function(t){switch($(this).text()){case"添加变量":i.hideMenu(),e.getInstance().addTreeElement(i);break;case"删除变量":i.hideMenu(),e.getInstance().delTreeElement();break;case"删除分组":i.hideMenu(),e.getInstance().delGroup();break;case"添加参数":i.hideMenu(),e.getInstance().addTreeElement2(i);break;case"删除参数":i.hideMenu(),e.getInstance().delTreeElement2()}})}},{key:"initTreeMenu",value:function(){var e=new g.default,t=e.getNodeConfigInfo();this.variable=t,this.variable.nodes=[]}},{key:"initTreeMenu2",value:function(){var e=new f.default,t=e.getNodeConfigInfo();this.parameter=t,this.parameter.nodes=[]}},{key:"backTreeMenu",value:function(){return this.variable||this.initTreeMenu(),this.variable}},{key:"backTreeMenu2",value:function(){return this.parameter||this.initTreeMenu2(),this.parameter}},{key:"getNum",value:function(e){this.num=e}},{key:"getNum2",value:function(e){this.num2=e}},{key:"delTreeElement",value:function(){var e=[].concat(r(this.preVar));if(this.preVar.length>0)for(var t=0;t0)for(var t=0;t0&&"Detail"==this.report.chunk[s].scope?this.report.chunk[s].element.forEach(function(e){e.y+=t.height}):this.report.chunk[s].element.forEach(function(e){e.y=e.y+t.height+i.height});this.report.height=this.report.height+t.height+i.height,this.report.canvas.height=this.report.canvas.height+t.height+i.height,this.report.repaint(),p.default.getInstance().render()}},{key:"delGroup",value:function(){var e=this,t=this;console.log(this.whichGroup);for(var i=0;i4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Solid",a=arguments[6];if(this.ctx.beginPath(),this.ctx.lineWidth=r,this.ctx.strokeStyle=a,"Solid"==s)this.ctx.setLineDash([]);else if("Dashed"==s)this.ctx.setLineDash([20,10]);else if("Dotted"==s)this.ctx.setLineDash([r,r]);else if("Double"==s)return this.ctx.moveTo(e,t-r),this.ctx.lineTo(i,n-r),this.ctx.moveTo(e,t+r),this.ctx.lineTo(i,n+r),void this.ctx.stroke();this.ctx.moveTo(e,t),this.ctx.lineTo(i,n),this.ctx.stroke()}},{key:"setStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Solid",i=arguments[2];"Solid"==t?this.ctx.setLineDash([]):"Dashed"==t?this.ctx.setLineDash([20,10]):"Dotted"==t&&this.ctx.setLineDash([e,e]),this.ctx.lineWidth=e,this.ctx.strokeStyle=i}},{key:"setLineStyle",value:function(){this.ctx.setLineDash([]),this.ctx.lineWidth=1,this.ctx.strokeStyle="#000"}},{key:"drawImage",value:function(e,t,i,n,r){this.ctx.drawImage(e,t,i,n,r)}},{key:"drawRect",value:function(e,t,i,n){this.ctx.strokeRect(e,t,i,n)}},{key:"drawRuondRect",value:function(e,t,i,n,r){this.ctx.translate(e,t),this.ctx.beginPath(),this.ctx.arc(i-r,n-r,r,0,Math.PI/2),this.ctx.lineTo(r,n),this.ctx.arc(r,n-r,r,Math.PI/2,Math.PI),this.ctx.lineTo(0,r),this.ctx.arc(r,r,r,Math.PI,3*Math.PI/2),this.ctx.lineTo(i-r,0),this.ctx.arc(i-r,r,r,3*Math.PI/2,2*Math.PI),this.ctx.lineTo(i,n-r),this.ctx.closePath()}},{key:"stroke",value:function(){this.ctx.stroke()}},{key:"fill",value:function(){this.ctx.fill()}},{key:"drawString",value:function(e,t,i){this.ctx.strokeText(e,t,i)}},{key:"drawTextWithRow",value:function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24,s=arguments[5],a=arguments[6],o=arguments[7],l=arguments[8],h=arguments[9],u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0;if("string"==typeof e&&"number"==typeof t&&"number"==typeof i){void 0===n&&(n=142),void 0===s&&(s=12),0!=l&&(t+=l,n-=l),0!=h&&(n-=h);var p=e.split(""),c="",g="",d=!0,f=void 0;f="bottom"==this.ctx.textBaseline?s+a*s/2:s+u;for(var y=0;yn-o){if(f>r)return!1;d?(this.ctx.fillText(c,t+o,i),d=!1):this.ctx.fillText(c,t,i),c=p[y],f+=s+a*s/2,i+=s+a*s/2}else c=g}f5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2*Math.PI,o=arguments.length>7&&void 0!==arguments[7]&&arguments[7];this.ctx.beginPath(),this.ctx.arc(e,t,i,s,a,o),this.ctx.closePath(),this.setColor(r),this.setLineWidth(1),this.ctx.stroke(),this.setColor(n),this.ctx.fill()}},{key:"drawEllipse",value:function(e,t,i,n,r,s){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:2*Math.PI,h=arguments.length>9&&void 0!==arguments[9]&&arguments[9];this.ctx.beginPath(),this.ctx.ellipse(e,t,i,n,a,o,l,h),this.ctx.closePath(),"Opaque"==r?(this.setColor(s.backcolor),this.ctx.fill()):this.setColor(s.forecolor)}},{key:"drawEllipseLine",value:function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2*Math.PI,o=arguments.length>7&&void 0!==arguments[7]&&arguments[7];this.ctx.beginPath(),this.ctx.ellipse(e,t,i,n,r,s,a,o),this.ctx.closePath(),this.ctx.stroke()}},{key:"clearRect",value:function(e,t,i,n){this.ctx.clearRect(e,t,i,n)}},{key:"getTextWidth",value:function(e){return this.ctx.measureText(e).width}},{key:"save",value:function(){this.ctx.save()}},{key:"restore",value:function(){this.ctx.restore()}}]),e}();t.default=s},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]&&arguments[1]&&(this.oldProps=this.cloneProps(this)),!e.font&&!e.paragraph||e.mode?Object.assign(this,e):e.font?Object.assign(this.font,e.font):e.paragraph&&Object.assign(this.paragraph,e.paragraph),void 0===e.printedY?this.printedY=this.y-this.prevChunkBaseline:this.y=this.prevChunkBaseline+this.printedY}},{key:"getProp",value:function(e){return null!==this[e]&&void 0!==this[e]?this[e]:this.font&&null!==this.font[e]&&void 0!==this.font[e]?this.font[e]:this.paragraph&&null!==this.paragraph[e]&&void 0!==this.paragraph[e]?this.paragraph[e]:void 0}},{key:"cloneProps",value:function(e){var t=Array.isArray(e)?[]:{};if(e&&"object"==(void 0===e?"undefined":r(e)))for(var i in e)e.hasOwnProperty(i)&&"oldProps"!=i&&(e[i]&&"object"==r(e[i])?t[i]=this.cloneProps(e[i]):t[i]=e[i]);return t}},{key:"replaceCharacter",value:function(e){if(null!=e){for(;-1!=e.indexOf("&")||-1!=e.indexOf('"')||-1!=e.indexOf("<")||-1!=e.indexOf(">");)e=e.replace(/&/g,"@amp;"),e=e.replace(/\"/g,"@quot;"),e=e.replace(//g,"@gt;");return e}return""}},{key:"replaceXML",value:function(e){if(null!=e){for(;-1!=e.indexOf('"');)e=e.replace(/\"/g,"@quot;");return e}return""}},{key:"replaceText",value:function(e){return null!=e?(e+="",e=e.replace(/\!/,""),e=e.replace(/\[/,""),e=e.replace(/\]/,""),e=e.replace(/\/,""),e=e.replace(/(CDATA)/,"")):""}}]),e}();t.default=a},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0))return!1;for(var t=0;t0){for(var n=0;n/,""),e=e.replace(/(CDATA)/,"")):""},s.encodeHTML=function(e){var t=e;return null!=t&&(t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"&"),t=t.replace(/"/g,"@quot;"),t=t.replace(//g,"@gt;"),t=t.replace(/'/g,"@#146;"),t=t.replace(/ /g,"@nbsp;"),t=t.replace(/\r/g," "),t=t.replace(/\n/g," ")),t},s.dencodeHTML=function(e){var t=e;return null!=t&&(t=t.replace(/&/g,"&"),t=t.replace(/@amp;/g,"&"),t=t.replace(/"/g,'"'),t=t.replace(/@quot;/g,'"'),t=t.replace(/</g,"<"),t=t.replace(/@lt;/g,"<"),t=t.replace(/>/g,">"),t=t.replace(/@gt;/g,">"),t=t.replace(/’/g,"'"),t=t.replace(/@#146;/g,"'"),t=t.replace(/ /g," "),t=t.replace(/@nbsp;/g," "),t=t.replace(/ /g,"\r"),t=t.replace(/ /g,"\n"),t=t.replace(/ /g," "),t=t.replace(/%23/g,"#"),t=t.replace("\n\r","\n"),t=t.replace("\r\n","\n")),t},t.default=s},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i/,"");break;case"groupHeader":var r=new s.GroupHeader(e.report.width,e.report.height);r.field=g,r.tip=p,r.name=c,r.parseXML(t),i.push(r);break;case"groupFooter":var a=new s.GroupFooter(e.report.width,e.report.height);a.tip=p,a.name=c,a.parseXML(t),n.push(a)}}(a.children[d]);break;case"detail":var f=new s.Detail(e.report.width,e.report.height);f.parseXML(a),t.push(f);break;case"columnFooter":var y=new s.ColumnFooter(e.report.width,e.report.height);y.parseXML(a),t.push(y);break;case"pageFooter":var m=new s.PageFooter(e.report.width,e.report.height);m.parseXML(a),t.push(m);break;case"summary":var v=new s.Summary(e.report.width,e.report.height);v.parseXML(a),t.push(v);break;default:r.parseOwnProperty(a)}}(a.children[l]);if(o){for(var h=null,u=0;u0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;tthis.width?this.y+this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*(p-1):this.y+this.height):(e.textBaseLine("middle"),l>this.width?(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h>this.height?(c=(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*p)/2,r=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+c):r=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h)/2:r=(this.y+this.height)/2+this.y/2),e.drawTextWithRow(this.text,n,r,this.width,this.height,parseInt(this.font.size),this.paragraph.lineSpacingSize,this.paragraph.firstLineIndent,this.paragraph.leftIndent,this.paragraph.rightIndent,c),this.error){var g=new Image;g.src=this.errorImgSrc,g.onload=function(){e.drawImage(g,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var d=u.Archor.getInstance(),f=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],y={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:f};d.setProps(y),d.paint(e)}}},{key:"toXML",value:function(){var e="\n";return e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML2",this).call(this),e+="\n",e+='\n',e+='\n',e+='\n',e+='\n',e+='\n',e+="\n",e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML3",this).call(this),e+="\n",e+="\n"}},{key:"parseXML",value:function(e){var t=this,i={};if(e.hasChildNodes())for(var n=0,r=e.children.length;nthis.width?this.y+this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*(h-1):this.y+this.height):(e.textBaseLine("middle"),o>this.width?(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*l>this.height?(p=(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h)/2,n=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+p):n=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*l)/2:n=(this.y+this.height)/2+this.y/2),e.drawTextWithRow(this.expression,i,n,this.width,this.height,parseInt(this.font.size),this.paragraph.lineSpacingSize,this.paragraph.firstLineIndent,this.paragraph.leftIndent,this.paragraph.rightIndent,p),this.error){var c=new Image;c.src=this.errorImgSrc,c.onload=function(){e.drawImage(c,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var g=u.Archor.getInstance(),d=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],f={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:d};g.setProps(f),g.paint(e)}}},{key:"toXML",value:function(){this.scope&&"Variables"==this.scope&&(this.pattern="###0.00;-###0.00");var e="\n",e+='\n',e+='\n',e+='\n',e+='\n',e+='\n',e+="\n",e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML3",this).call(this),e+="\n",e+="\n"}},{key:"parseXML",value:function(e){var i=this,n={};if(e.hasChildNodes()&&"textField"==e.tagName){n.isBlankWhenNull="true"===e.getAttribute("isBlankWhenNull"),n.isStretchWithOverflow="true"===e.getAttribute("isStretchWithOverflow"),n.pattern=e.getAttribute("pattern")?e.getAttribute("pattern"):"",n.evaluationTime=e.getAttribute("evaluationTime")?e.getAttribute("evaluationTime"):t.DEF_EVALUATION_TIME;for(var r=0;r\n",e+='0&&(n.lineWidth=parseInt(s[0].getAttribute("lineWidth")),n.lineStyle=s[0].getAttribute("lineStyle"),n.lineColor=s[0].getAttribute("lineColor"))}}(e.children[r]);return this.setProps(i),i}}]),t}(h.default);t.default=p},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i\n",e+='0&&(n.lineWidth=parseInt(s[0].getAttribute("lineWidth")),n.lineStyle=s[0].getAttribute("lineStyle"),n.lineColor=s[0].getAttribute("lineColor"))}}(e.children[r])}return this.setProps(i),i}}]),t}(h.default);p.DEF_DIRECTION="TopDown",t.default=p},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;ithis.width||2*this.radius>this.height)return alert("四边形的圆角直径必须要小于四边形的宽高"),!1;if(e.save(),e.setColor(this.backcolor),e.setLineWidth(.5),"Opaque"==this.mode?(e.setStyle(this.lineWidth,this.lineStyle,this.lineColor),"Double"==this.lineStyle?(e.strokeRect(this.x+2*this.lineWidth,this.y+2*this.lineWidth,this.width-4*this.lineWidth,this.height-4*this.lineWidth),e.fillRect(this.x+2.5*this.lineWidth,this.y+2.5*this.lineWidth,this.width-5*this.lineWidth,this.height-5*this.lineWidth)):(e.drawRuondRect(this.x+this.lineWidth/2,this.y+this.lineWidth/2,this.width-this.lineWidth,this.height-this.lineWidth,parseInt(this.radius)),e.stroke())):(e.setStyle(this.lineWidth,this.lineStyle,this.lineColor),e.drawRuondRect(this.x,this.y,this.width,this.height,parseInt(this.radius)),e.stroke(),"Double"==this.lineStyle&&(e.drawRuondRect(2*this.lineWidth,2*this.lineWidth,this.width-4*this.lineWidth,this.height-4*this.lineWidth,parseInt(this.radius)),e.stroke())),e.setLineStyle(),this.error){var n=new Image;n.src=this.errorImgSrc,n.onload=function(){e.drawImage(n,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var r=u.Archor.getInstance(),s=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],a={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:s};r.setProps(a),r.paint(e)}}},{key:"toXML",value:function(){var e="\n",e+='0&&(n.lineWidth=parseInt(s[0].getAttribute("lineWidth")),n.lineStyle=s[0].getAttribute("lineStyle"),n.lineColor=s[0].getAttribute("lineColor"))}}(e.children[r]);return this.setProps(i),i}}]),t}(h.default);t.default=p},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;it.nowH?t.nowH:n.height,t.imgW=n.width*t.imgH/n.height>t.nowW?t.nowW:n.width*t.imgH/n.height):"RetainShape"==t.scaleImage?(t.imgW=n.width>t.nowW?t.nowW:n.width,t.imgW==n.width?(t.imgH=t.nowH,t.imgW=t.imgH*n.width/n.height):t.imgH=t.imgW*n.height/n.width>t.nowH?t.nowH:t.imgW*n.height/n.width):"FillFrame"==t.scaleImage&&(t.imgX=t.nowX,t.imgY=t.nowY,t.imgW=t.nowW,t.imgH=t.nowH),"Center"==t.hAlign&&"FillFrame"!=t.scaleImage?t.imgX=t.nowX+t.nowW/2-t.imgW/2:"Right"==t.hAlign&&"FillFrame"!=t.scaleImage?t.imgX=t.nowX+t.nowW-t.imgW:"Left"==t.hAlign&&"FillFrame"!=t.scaleImage&&(t.imgX=t.nowX),"Middle"==t.vAlign&&"FillFrame"!=t.scaleImage?t.imgY=t.nowY+t.nowH/2-t.imgH/2:"Bottom"==t.vAlign&&"FillFrame"!=t.scaleImage?t.imgY=t.nowY+t.nowH-t.imgH:"Top"==t.vAlign&&"FillFrame"!=t.scaleImage&&(t.imgY=t.nowY),e.drawImage(n,t.imgX,t.imgY,t.imgW,t.imgH)},""!=this.src?n.src=this.src:n.src="../report/ReportDesign/images/auto.gif",this.error){var r=new Image;r.src=this.errorImgSrc,r.onload=function(){e.drawImage(r,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var s=u.Archor.getInstance(),a=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],o={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:a};s.setProps(o),s.paint(e)}}},{key:"CheckImgExists",value:function(e){var t=new Image;return t.src=e,t.fileSize>0||t.width>0&&t.height>0}},{key:"toXML",value:function(){this.srcT;var e="\n",e+='\n",e+="\n"}},{key:"parseXML",value:function(e){var t=this,i={},n=this;this.scaleImage=e.getAttribute("scaleImage"),this.hAlign=e.getAttribute("hAlign"),this.vAlign=e.getAttribute("vAlign");if(e.hasChildNodes())for(var r=0,s=e.children.length;r0&&(n.lineWidth=parseInt(s[0].getAttribute("lineWidth")),n.lineStyle=s[0].getAttribute("lineStyle"),n.lineColor=s[0].getAttribute("lineColor"));break;case"imageExpression":var a=e.innerHTML;a=a.replace(/\<\!\[CDATA\[/,""),a=a.replace(/\]\]\>/,""),n.srcT=a,a=a.replace(/^\"/,""),a=a.replace(/\"$/,"");var o=a.substr(a.indexOf("/uploads"));o="../../../designer"+o,n.src=o}}(e.children[r]);return this.setProps(i),i}}]),t}(h.default);p.DEF_TEXT="image",t.default=p},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;ithis.width?this.y+this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*(p-1):this.y+this.height):(e.textBaseLine("middle"),l>this.width?(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h>this.height?(c=(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*p)/2,r=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+c):r=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h)/2:r=(this.y+this.height)/2+this.y/2),e.drawTextWithRow(this.text,n,r,this.width,this.height,parseInt(this.font.size),this.paragraph.lineSpacingSize,this.paragraph.firstLineIndent,this.paragraph.leftIndent,this.paragraph.rightIndent,c),this.error){var g=new Image;g.src=this.errorImgSrc,g.onload=function(){e.drawImage(g,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var d=u.Archor.getInstance(),f=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],y={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:f};d.setProps(y),d.paint(e)}}},{key:"toXML",value:function(){this.pattern=this.type;var e="\n",e+='\n',e+='\n',e+='\n',e+='\n',e+='\n',e+="\n",e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML3",this).call(this),e+="\n",e+="\n"}},{key:"parseXML",value:function(e){var i=this,n={},r=e.getAttribute("pattern");n.type=r;for(var s in this.typeOption)s==r&&(n.Category="Date");for(var a in this.type2Option)a==r&&(n.Category="Time");if(e.hasChildNodes()&&"textField"==e.tagName){n.isBlankWhenNull="true"===e.getAttribute("isBlankWhenNull"),n.isStretchWithOverflow="true"===e.getAttribute("isStretchWithOverflow"),n.pattern=e.getAttribute("pattern")?e.getAttribute("pattern"):"",n.evaluationTime=e.getAttribute("evaluationTime")?e.getAttribute("evaluationTime"):t.DEF_EVALUATION_TIME;for(var o=0;othis.width?this.y+this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*(h-1):this.y+this.height):(e.textBaseLine("middle"),o>this.width?(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*l>this.height?(p=(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*h)/2,n=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+p):n=this.y+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2/2+parseInt(this.font.size)/2+(this.height-(parseInt(this.font.size)+this.paragraph.lineSpacingSize*parseInt(this.font.size)/2)*l)/2:n=(this.y+this.height)/2+this.y/2),e.drawTextWithRow(this.text,i,n,this.width,this.height,parseInt(this.font.size),this.paragraph.lineSpacingSize,this.paragraph.firstLineIndent,this.paragraph.leftIndent,this.paragraph.rightIndent,p),this.error){var c=new Image;c.src=this.errorImgSrc,c.onload=function(){e.drawImage(c,t.x,t.y,15,15)}}if(e.restore(),this.isOpenArchor){var g=u.Archor.getInstance(),d=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],f={x:this.x,y:this.y,targetW:this.width,targetH:this.height,openArchorPos:d};g.setProps(f),g.paint(e)}}},{key:"toXML",value:function(){this.pattern=this.type;var e="\n",e+='\n',e+='\n',e+='\n',e+='\n',e+='\n',e+="\n",e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML3",this).call(this),e+="\n",e+="\n"}},{key:"parseXML",value:function(e){var i=this,n={};if(e.hasChildNodes()&&"textField"==e.tagName){n.isBlankWhenNull="true"===e.getAttribute("isBlankWhenNull"),n.isStretchWithOverflow="true"===e.getAttribute("isStretchWithOverflow"),n.pattern=e.getAttribute("pattern")?e.getAttribute("pattern"):"",n.evaluationTime=e.getAttribute("evaluationTime")?e.getAttribute("evaluationTime"):t.DEF_EVALUATION_TIME;for(var r=0;r\n";return e+='\n',e+=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toXML2",this).call(this),e+="\n",e+='\n',e+='\n',e+='\n',e+='\n',e+='\n',e+="\n",e+='\n',e+='\n',e+="",e+="\n",e+='\n',e+='\n',e+="",e+="\n",e+='\n',e+='\n',e+="\n",e+="\n","pie"==this.chartType?(e+="\n",e+='\n',this.seriesArr.length>0?(this.chartDateNull=!0,e+="\n",e+="\n",""!=this.seriesArr[0].label&&(e+="\n")):this.chartDateNull=!1,e+="\n",e+='\n',null==this.orientation&&(this.orientation="Vertical"),e+='\n',e+='\n',e+='\n',e+="\n",e+="\n"):(this.seriesArr.length>0?(this.chartDateNull=!0,e+="\n",e+='\n',this.seriesArr.forEach(function(t,i){e+="\n",e+="\n",e+="\n",e+="\n",""!=t.labelBar&&(e+="\n"),e+="\n"}),e+="\n"):this.chartDateNull=!1,"bar"==this.chartType?e+="<"+this.chartType+'Plot isShowLabels="'+this.isShowLabels+'">\n':(this.chartType="line")?e+="<"+this.chartType+'Plot isShowLines="'+this.isShowLines+'" isShowShapes="'+this.isShowShapes+'">\n':e+="<"+this.chartType+"Plot>\n",null==this.orientation&&(this.orientation="Vertical"),e+='\n',"bar"==this.chartType&&(e+='\n',e+='\n',e+="\n"),e+="\n",e+="\n",e+='\n',e+="\n",e+="\n",e+="\n",e+="\n",e+='\n',e+="\n",e+="\n",this.rangeAxisMinValueExpression&&(e+="\n"),this.rangeAxisMaxValueExpression&&(e+=""),e+="\n"),e+="\n"}},{key:"parseXML",value:function(e){var t=this,i={},n=this;i.seriesArr=[];if(e.hasChildNodes())for(var r=0,s=e.children.length;r/,"");break;case"chartSubtitle":i.subtitleFontColor=e.getAttribute("color"),i.subtitleFontName=e.getElementsByTagName("font")[0].getAttribute("fontName"),i.subtitleFontSize=e.getElementsByTagName("font")[0].getAttribute("size"),i.subtitle=e.getElementsByTagName("subtitleExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"");break;case"chartLegend":i.legendColor=e.getAttribute("textColor"),i.legendBgColor=e.getAttribute("backgroundColor"),i.legendPosition=e.getAttribute("position"),i.legendFontName=e.getElementsByTagName("font")[0].getAttribute("fontName"),i.legendFontSize=e.getElementsByTagName("font")[0].getAttribute("size");break;case"box":i.lineWidth=e.getElementsByTagName("pen")[0].getAttribute("lineWidth")?e.getElementsByTagName("pen")[0].getAttribute("lineWidth"):0,i.lineColor=e.getElementsByTagName("pen")[0].getAttribute("lineColor")?e.getElementsByTagName("pen")[0].getAttribute("lineColor"):"#000000",i.lineStyle=e.getElementsByTagName("pen")[0].getAttribute("lineStyle")?e.getElementsByTagName("pen")[0].getAttribute("lineStyle"):"solid"}}(e.children[s]);break;case"pieDataset":i.resetType=e.getElementsByTagName("dataset")[0].getAttribute("resetType");var o=e.getElementsByTagName("keyExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),l=e.getElementsByTagName("valueExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),h="";e.getElementsByTagName("labelExpression").length>0&&(h=e.getElementsByTagName("labelExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""));var u={key:o,value:l,label:h};i.seriesArr.push(u);break;case"categoryDataset":;if(e.hasChildNodes())for(var p=0,c=e.children.length;p/,""),n=e.getElementsByTagName("categoryExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),r=e.getElementsByTagName("valueExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),s="";e.getElementsByTagName("labelExpression").length>0&&(s=e.getElementsByTagName("labelExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""));var a={series:t,category:n,valBar:r,labelBar:s};i.seriesArr.push(a)}}(e.children[p]);break;case t.chartType+"Plot":if("piePlot"==r){i.pielegendLabelFormat=e.getAttribute("legendLabelFormat"),i.labelFormat=e.getAttribute("labelFormat"),i.isShowLabels=e.getAttribute("isShowLabels");if(e.hasChildNodes())for(var g=0,d=e.children.length;g/,"");break;case"categoryAxisFormat":i.categoryVerticalTickLabels=e.getElementsByTagName("axisFormat")[0].getAttribute("verticalTickLabels"),"true"==i.categoryVerticalTickLabels?i.categoryVerticalTickLabels=!0:"false"==i.categoryVerticalTickLabels&&(i.categoryVerticalTickLabels=!1);break;case"valueAxisLabelExpression":i.valueAxisLabelExpression=e.innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"");break;case"valueAxisFormat":i.valueVerticalTickLabels=e.getElementsByTagName("axisFormat")[0].getAttribute("verticalTickLabels"),"true"==i.valueVerticalTickLabels?i.valueVerticalTickLabels=!0:"false"==i.valueVerticalTickLabels&&(i.valueVerticalTickLabels=!1);break;case"rangeAxisMinValueExpression":i.rangeAxisMinValueExpression=e.innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"");break;case"rangeAxisMaxValueExpression":i.rangeAxisMaxValueExpression=e.innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"")}}(e.children[f])}}}(e.children[r]);return this.setProps(i),i}}]),t}(h.default);p.DEF_TEXT="chart",t.default=p},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&this.subParameter.forEach(function(e){n+='\n',n+="\n",n+="\n"}),n+=" \n",n+='\n',n+="\n"}},{key:"parseXML",value:function(e){var t=this,i=new u.Api,n={};n.subParameter=[];this.scaleImage=e.getAttribute("scaleImage"),this.hAlign=e.getAttribute("hAlign"),this.vAlign=e.getAttribute("vAlign");if(e.hasChildNodes())for(var r=0,s=e.children.length;r/,""),n.subParameter.push({expression:o,name:a,checked:!1});break;case"subreportExpression":var l=params.subReportId.split(","),h=e.innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"");h=h.substring(1,h.length-1);for(var u=0;u0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0)for(var t=0;t\n";if(e+="\n",e+='\n',this.element.length>0)for(var t=0;t0)for(var t=0;t\n',this.element.length>0)for(var t=0;t0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0)for(var t=0;t\n',""!=this.printWhenExpression&&(e+=""),this.element.length>0)for(var t=0;t0?this.noChunkElement.forEach(function(i,n){e.id!=i.id&&(e.error=!0,e.belong="",t.delElementFromChunk(e),t.noChunkElement.push(e))}):(e.error=!0,e.belong="",this.delElementFromChunk(e),this.noChunkElement.push(e)))}},{key:"delElementFromChunk",value:function(e){for(var t=0,i=this.chunk.length;t0)for(var n=0;n0&&(console.log(this.noChunkElement.length),this.noChunkElement.forEach(function(e,i){e.paint(t)})),null!=this.elem&&this.elem.paint(t),h.AuxiliaryLine.getInstance().getProp("points")&&h.AuxiliaryLine.getInstance().paint(t),this._currToElem){var r=h.Archor.getInstance(),s=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],a={x:this._currToElem.getProp("x"),y:this._currToElem.getProp("y"),targetW:this._currToElem.getProp("width"),targetH:this._currToElem.getProp("height"),openArchorPos:s};r.setProps(a),r.paint(t)}t.clearRect(0,i,this.width,this.canvas.height-i)}},{key:"repaint",value:function(){this.paint()}},{key:"addStaticText",value:function(){var e=new l.StaticText;this.elem=e,this.isAllowDraw=!0}},{key:"addCurrentDate",value:function(){var e=new l.CurrentDate;this.elem=e,this.isAllowDraw=!0}},{key:"addPageNumber",value:function(){var e=new l.PageNumber;this.elem=e,this.isAllowDraw=!0}},{key:"addImage",value:function(e){var t=new l.imgEle;this.elem=t,this.elem.uploadImage=e,this.isAllowDraw=!0}},{key:"addVariable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new l.TextField;n.text="$V{"+e+"}",n.field=t,n.option=i,n.scope="Variables",this.elem=n,this.isAllowDraw=!0}},{key:"addParameter",value:function(e){var t=new l.TextField;t.text="$P{"+e+"}",t.scope="Parameter",this.elem=t,this.isAllowDraw=!0}},{key:"addTextField",value:function(e){var t=new l.TextField;this.elem=t,this.isAllowDraw=!0,e&&t.setProps({text:"$F{"+e+"}"})}},{key:"addLine",value:function(){var e=new l.Line;this.elem=e,this.isAllowDraw=!0}},{key:"addRectangle",value:function(){var e=new l.Rectangle;this.elem=e,this.isAllowDraw=!0}},{key:"addEllipse",value:function(){var e=new l.Ellipse;this.elem=e,this.isAllowDraw=!0}},{key:"addChart",value:function(){var e=new l.Chart;this.elem=e,this.isAllowDraw=!0}},{key:"addSubReport",value:function(){var e=new l.SubReport;this.elem=e,this.isAllowDraw=!0}},{key:"delElement",value:function(){this.elem=null,this.isAllowDraw=!1}},{key:"init",value:function(){var e=this;this.loadChunk(),this.canvas.onmousemove=function(t){e.handleMouseMove(t)},this.canvas.onmousedown=function(t){e.handleMouseDown(t)},this.canvas.onmouseup=function(t){e.handleMouseUp(t)},this.canvas.onkeydown=function(t){e.handleKeyDown(t)},this.paint()}},{key:"loadChunk",value:function(){if(0!=this.chunk.length)return!1;this.chunk.push(new o.Title(this.width,this.height)),this.chunk.push(new o.PageHeader(this.width,this.height)),this.chunk.push(new o.ColumnHeader(this.width,this.height)),this.chunk.push(new o.Detail(this.width,this.height)),this.chunk.push(new o.ColumnFooter(this.width,this.height)),this.chunk.push(new o.PageFooter(this.width,this.height)),this.chunk.push(new o.Summary(this.width,this.height))}},{key:"changeChunkSize",value:function(e){for(var t=this.chunk.length,i=0;i7&&this.chunk.forEach(function(e){"GroupHeader"!=e.scope&&"GroupFooter"!=e.scope||(c+=e.height)}),r-this._currToChunk.top+p>this.pageHeight+c+20)return this._currToChunk.changeSelectedChunk(r),this.repaint(),this.handleMouseUp(t),alert("画布高度必须小于页面高度"),!1;this._currToChunk.changeSelectedChunk(r)}else if(this.selectedArchor&&this._currToElem)console.log(1),this._currToElem.changeElementWhenDragArchor(this.selectedArchor,n,r);else{if(!this._currToElem)return!1;var g=h.AuxiliaryLine.getInstance().getProp("points"),d=Math.abs(this._currToElem.getProp("_handlePointX")-n),f=Math.abs(this._currToElem.getProp("_handlePointY")-r);if(g&&g.abscissa&&!g.ordinate&&d<5)this._currToElem.changeElementPosition({y:r});else if(g&&!g.abscissa&&g.ordinate&&f<5)this._currToElem.changeElementPosition({x:n});else{if(g&&g.abscissa&&g.ordinate&&f<5&&d<5)return!1;this._currToElem.changeElementPosition({x:n,y:r})}var y=this.getDrawAuxiliaryLinePoint(this._currToElem);y?h.AuxiliaryLine.getInstance().setProps({points:y}):h.AuxiliaryLine.getInstance().setProps({points:null});for(var m=void 0,v=0;v0)return alert("请将区域中未放置正确的组件重新放置"),"haveNoChunkElement";var t='\n';if(t+='\n',t+='\n',t+='\n',this.parameter.length>0)for(var i=0;i\n';if(""!=this.queryString&&(t+='\n"),this.field.length>0)for(var n=0;n\n',t+="\n",t+="\n";if(this.variable)for(var r=0;r\n\t\t\t\t\t\n":""!=this.variable[r].resetGroup&&"Group"==this.variable[r].resetType?t+='\n\n\t\t\t\t\t\t\n":t+='\n\n\t\t\t\t\t\t\n",t+="\n";if(""!=this.filterexpression&&(t+="\n"),this.chunk.length>7){var s=null,a=!1;if(this.chunk.forEach(function(i){if("GroupHeader"==i.scope&&null==s&&(""!=i.name&&i.name||(a=!0),s=i.tip,t+='\n',t+=i.toXML()),s)for(var n=0;n\n";break}}),a)return"haveGroupNoName"}t+='\n';for(var o=0;o0)for(var u=0;u0){e.nodes=[];for(var t=0,i=this.field.length;t0?e.collapseIcon="glyphicon glyphicon-euro":e.icon="glyphicon glyphicon-cloud",e}},{key:"getVariableToTree",value:function(){this.variables=this.tree2.backTreeMenu().backTreeMenu();var e={text:"变量",scope:"Variables"},t=[].concat(r(this.variable));if(this.variable&&this.variables.nodes)if(0==this.variable.length)this.variable=this.variables.nodes;else for(var i=0,n=this.variables.nodes.length;i0&&(e.nodes=[]);for(var l=0,h=this.variable.length;l0||(e.icon="glyphicon glyphicon-cloud"),e}},{key:"getParameterToTree",value:function(){this.parameters=this.tree2.backTreeMenu().backTreeMenu2();var e={text:"参数",scope:"Parameters"},t=[].concat(r(this.parameter));if(this.parameter&&this.parameters.nodes)if(0==this.parameter.length)this.parameter=this.parameters.nodes;else for(var i=0,n=this.parameters.nodes.length;i0&&(e.nodes=[]);for(var l=0,h=this.parameter.length;l0||(e.icon="glyphicon glyphicon-cloud"),e}},{key:"parseOwnProperty",value:function(e){switch(e.tagName){case"queryString":var t=h.StringUtil.replaceText(e.childNodes[0].nodeValue);this.queryString=t;break;case"field":var i={};i.columnName=e.getAttribute("name"),i.columnClassName=e.getAttribute("class"),e.getElementsByTagName("fieldDescription")[0]?(i.description=e.getElementsByTagName("fieldDescription")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),"undefined"==i.description&&(i.description="")):i.description="",this.field.push(i);break;case"filterExpression":var n=e.innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,"");this.filterexpression=n;break;case"variable":var r={};r.text=e.getAttribute("name").replace(/\ /,""),r.scope="Variable",r.resetType=e.getAttribute("resetType"),r.idOne=parseInt((Math.random()+"").slice(2)),"null"==e.getAttribute("calculation")?r.option="Nothing":r.option=e.getAttribute("calculation"),"null"!=e.getAttribute("resetGroup")&&"undefined"!=e.getAttribute("resetGroup")&&e.getAttribute("resetGroup")?r.resetGroup=e.getAttribute("resetGroup"):r.resetGroup="",r.varExpression=e.getElementsByTagName("variableExpression")[0].innerHTML.replace(/\<\!\[CDATA\[/,"").replace(/\]\]\>/,""),r.cls=e.getAttribute("class"),this.variable.push(r),f.default.getInstance().getNum(this.variable.length);break;case"parameter":var s={};s.text=e.getAttribute("name").replace(/\ /,""),s.scope="Parameter",s.idOne=parseInt((Math.random()+"").slice(2)),s.cls=e.getAttribute("class"),this.parameter.push(s),f.default.getInstance().getNum2(this.parameter.length)}}},{key:"isOpenDefaultStyle",value:function(){for(var e=0,t=this.chunk.length;e