var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(ha,xa,Ca){if(ha==Array.prototype||ha==Object.prototype)return ha;ha[xa]=Ca.value;return ha};
$jscomp.getGlobal=function(ha){ha=["object"==typeof globalThis&&globalThis,ha,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var xa=0;xa<ha.length;++xa){var Ca=ha[xa];if(Ca&&Ca.Math==Math)return Ca}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;
$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(ha,xa){var Ca=$jscomp.propertyToPolyfillSymbol[xa];if(null==Ca)return ha[xa];Ca=ha[Ca];return void 0!==Ca?Ca:ha[xa]};$jscomp.polyfill=function(ha,xa,Ca,U){xa&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(ha,xa,Ca,U):$jscomp.polyfillUnisolated(ha,xa,Ca,U))};
$jscomp.polyfillUnisolated=function(ha,xa,Ca,U){Ca=$jscomp.global;ha=ha.split(".");for(U=0;U<ha.length-1;U++){var sb=ha[U];if(!(sb in Ca))return;Ca=Ca[sb]}ha=ha[ha.length-1];U=Ca[ha];xa=xa(U);xa!=U&&null!=xa&&$jscomp.defineProperty(Ca,ha,{configurable:!0,writable:!0,value:xa})};
$jscomp.polyfillIsolated=function(ha,xa,Ca,U){var sb=ha.split(".");ha=1===sb.length;U=sb[0];U=!ha&&U in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var w=0;w<sb.length-1;w++){var Za=sb[w];if(!(Za in U))return;U=U[Za]}sb=sb[sb.length-1];Ca=$jscomp.IS_SYMBOL_NATIVE&&"es6"===Ca?U[sb]:null;xa=xa(Ca);null!=xa&&(ha?$jscomp.defineProperty($jscomp.polyfills,sb,{configurable:!0,writable:!0,value:xa}):xa!==Ca&&(void 0===$jscomp.propertyToPolyfillSymbol[sb]&&(Ca=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[sb]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(sb):$jscomp.POLYFILL_PREFIX+Ca+"$"+sb),$jscomp.defineProperty(U,$jscomp.propertyToPolyfillSymbol[sb],{configurable:!0,writable:!0,value:xa})))};$jscomp.polyfill("Object.is",function(ha){return ha?ha:function(xa,Ca){return xa===Ca?0!==xa||1/xa===1/Ca:xa!==xa&&Ca!==Ca}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(ha){return ha?ha:function(xa,Ca){var U=this;U instanceof String&&(U=String(U));var sb=U.length;Ca=Ca||0;for(0>Ca&&(Ca=Math.max(Ca+sb,0));Ca<sb;Ca++){var w=U[Ca];if(w===xa||Object.is(w,xa))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(ha,xa,Ca){if(null==ha)throw new TypeError("The 'this' value for String.prototype."+Ca+" must not be null or undefined");if(xa instanceof RegExp)throw new TypeError("First argument to String.prototype."+Ca+" must not be a regular expression");return ha+""};$jscomp.polyfill("String.prototype.includes",function(ha){return ha?ha:function(xa,Ca){return-1!==$jscomp.checkStringArgs(this,xa,"includes").indexOf(xa,Ca||0)}},"es6","es3");
$jscomp.findInternal=function(ha,xa,Ca){ha instanceof String&&(ha=String(ha));for(var U=ha.length,sb=0;sb<U;sb++){var w=ha[sb];if(xa.call(Ca,w,sb,ha))return{i:sb,v:w}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(ha){return ha?ha:function(xa,Ca){return $jscomp.findInternal(this,xa,Ca).v}},"es6","es3");$jscomp.arrayIteratorImpl=function(ha){var xa=0;return function(){return xa<ha.length?{done:!1,value:ha[xa++]}:{done:!0}}};$jscomp.arrayIterator=function(ha){return{next:$jscomp.arrayIteratorImpl(ha)}};
$jscomp.initSymbol=function(){};$jscomp.polyfill("Symbol",function(ha){if(ha)return ha;var xa=function(w,Za){this.$jscomp$symbol$id_=w;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:Za})};xa.prototype.toString=function(){return this.$jscomp$symbol$id_};var Ca="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",U=0,sb=function(w){if(this instanceof sb)throw new TypeError("Symbol is not a constructor");return new xa(Ca+(w||"")+"_"+U++,w)};return sb},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(ha){if(ha)return ha;ha=Symbol("Symbol.iterator");for(var xa="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),Ca=0;Ca<xa.length;Ca++){var U=$jscomp.global[xa[Ca]];"function"===typeof U&&"function"!=typeof U.prototype[ha]&&$jscomp.defineProperty(U.prototype,ha,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return ha},
"es6","es3");$jscomp.iteratorPrototype=function(ha){ha={next:ha};ha[Symbol.iterator]=function(){return this};return ha};$jscomp.iteratorFromArray=function(ha,xa){ha instanceof String&&(ha+="");var Ca=0,U=!1,sb={next:function(){if(!U&&Ca<ha.length){var w=Ca++;return{value:xa(w,ha[w]),done:!1}}U=!0;return{done:!0,value:void 0}}};sb[Symbol.iterator]=function(){return sb};return sb};
$jscomp.polyfill("Array.prototype.keys",function(ha){return ha?ha:function(){return $jscomp.iteratorFromArray(this,function(xa){return xa})}},"es6","es3");$jscomp.polyfill("String.prototype.startsWith",function(ha){return ha?ha:function(xa,Ca){var U=$jscomp.checkStringArgs(this,xa,"startsWith");xa+="";var sb=U.length,w=xa.length;Ca=Math.max(0,Math.min(Ca|0,U.length));for(var Za=0;Za<w&&Ca<sb;)if(U[Ca++]!=xa[Za++])return!1;return Za>=w}},"es6","es3");
$jscomp.owns=function(ha,xa){return Object.prototype.hasOwnProperty.call(ha,xa)};$jscomp.polyfill("Object.values",function(ha){return ha?ha:function(xa){var Ca=[],U;for(U in xa)$jscomp.owns(xa,U)&&Ca.push(xa[U]);return Ca}},"es8","es3");
$jscomp.polyfill("String.prototype.repeat",function(ha){return ha?ha:function(xa){var Ca=$jscomp.checkStringArgs(this,null,"repeat");if(0>xa||1342177279<xa)throw new RangeError("Invalid count value");xa|=0;for(var U="";xa;)if(xa&1&&(U+=Ca),xa>>>=1)Ca+=Ca;return U}},"es6","es3");$jscomp.stringPadding=function(ha,xa){ha=void 0!==ha?String(ha):" ";return 0<xa&&ha?ha.repeat(Math.ceil(xa/ha.length)).substring(0,xa):""};
$jscomp.polyfill("String.prototype.padStart",function(ha){return ha?ha:function(xa,Ca){var U=$jscomp.checkStringArgs(this,null,"padStart");return $jscomp.stringPadding(Ca,xa-U.length)+U}},"es8","es3");$jscomp.polyfill("String.prototype.padEnd",function(ha){return ha?ha:function(xa,Ca){var U=$jscomp.checkStringArgs(this,null,"padStart");return U+$jscomp.stringPadding(Ca,xa-U.length)}},"es8","es3");
$jscomp.polyfill("Array.prototype.fill",function(ha){return ha?ha:function(xa,Ca,U){var sb=this.length||0;0>Ca&&(Ca=Math.max(0,sb+Ca));if(null==U||U>sb)U=sb;U=Number(U);0>U&&(U=Math.max(0,sb+U));for(Ca=Number(Ca||0);Ca<U;Ca++)this[Ca]=xa;return this}},"es6","es3");$jscomp.typedArrayFill=function(ha){return ha?ha:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
$jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
$jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("String.prototype.endsWith",function(ha){return ha?ha:function(xa,Ca){var U=$jscomp.checkStringArgs(this,xa,"endsWith");xa+="";void 0===Ca&&(Ca=U.length);Ca=Math.max(0,Math.min(Ca|0,U.length));for(var sb=xa.length;0<sb&&0<Ca;)if(U[--Ca]!=xa[--sb])return!1;return 0>=sb}},"es6","es3");
(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});var ha=com.kingdee.bos.extreport.datasetdesigner;var xa=com.kingdee.bos.qing.framework.common.AbstractIcons;var Ca=new function(){xa.call(this);var U=this.protectedMethod;
this.protectedInit=function(sb,w){w.setFilePath("qingrpt/dataset-designer/skin/ierp/res/iconSprite0_scaled1.png");w.setGap(0,0);w.setStartPosition(0,0);w.setIconSize(16,16);U.registIcon(0,0,"add");w.setStartPosition(16,0);w.setIconSize(16,16);U.registIcon(0,0,"ArrowDown");w.setStartPosition(32,0);w.setIconSize(16,16);U.registIcon(0,0,"boolean");w.setStartPosition(48,0);w.setIconSize(16,16);U.registIcon(0,0,"boolean_selected");w.setStartPosition(64,0);w.setIconSize(16,16);U.registIcon(0,0,"btn_preview");
w.setStartPosition(80,0);w.setIconSize(16,16);U.registIcon(0,0,"btn_preview_hover");w.setStartPosition(96,0);w.setIconSize(16,16);U.registIcon(0,0,"btn_preview_selected");w.setStartPosition(112,0);w.setIconSize(16,16);U.registIcon(0,0,"btn_preview_selected_hover");w.setStartPosition(128,0);w.setIconSize(16,16);U.registIcon(0,0,"date");w.setStartPosition(144,0);w.setIconSize(16,16);U.registIcon(0,0,"dateTime");w.setStartPosition(160,0);w.setIconSize(16,16);U.registIcon(0,0,"dateTime_selected");w.setStartPosition(176,
0);w.setIconSize(16,16);U.registIcon(0,0,"date_selected");w.setStartPosition(192,0);w.setIconSize(16,16);U.registIcon(0,0,"delete");w.setStartPosition(208,0);w.setIconSize(16,16);U.registIcon(0,0,"down");w.setStartPosition(224,0);w.setIconSize(16,16);U.registIcon(0,0,"downArrow");w.setStartPosition(240,0);w.setIconSize(16,16);U.registIcon(0,0,"downArrow_hover");w.setStartPosition(256,0);w.setIconSize(16,16);U.registIcon(0,0,"ds_datacenter");w.setStartPosition(272,0);w.setIconSize(16,16);U.registIcon(0,
0,"ds_entity");w.setStartPosition(288,0);w.setIconSize(16,16);U.registIcon(0,0,"ds_outdb");w.setStartPosition(304,0);w.setIconSize(16,16);U.registIcon(0,0,"ds_superquery");w.setStartPosition(320,0);w.setIconSize(16,16);U.registIcon(0,0,"entity_head");w.setStartPosition(336,0);w.setIconSize(16,16);U.registIcon(0,0,"entity_head_selected");w.setStartPosition(352,0);w.setIconSize(16,16);U.registIcon(0,0,"entity_sub");w.setStartPosition(368,0);w.setIconSize(16,16);U.registIcon(0,0,"entity_sub_selected");
w.setStartPosition(384,0);w.setIconSize(16,16);U.registIcon(0,0,"f7");w.setStartPosition(400,0);w.setIconSize(400,230);U.registIcon(0,0,"ctrl_prop");w.setStartPosition(0,16);w.setIconSize(16,16);U.registIcon(0,0,"field");w.setStartPosition(16,16);w.setIconSize(16,16);U.registIcon(0,0,"field_selected");w.setStartPosition(32,16);w.setIconSize(16,16);U.registIcon(0,0,"icon_search");w.setStartPosition(48,16);w.setIconSize(16,16);U.registIcon(0,0,"icon_search_hover");w.setStartPosition(64,16);w.setIconSize(16,
16);U.registIcon(0,0,"leftArrow");w.setStartPosition(80,16);w.setIconSize(16,16);U.registIcon(0,0,"leftArrow_hover");w.setStartPosition(96,16);w.setIconSize(16,16);U.registIcon(0,0,"macromanage");w.setStartPosition(112,16);w.setIconSize(16,16);U.registIcon(0,0,"macromanage_hover");w.setStartPosition(128,16);w.setIconSize(16,16);U.registIcon(0,0,"macronoperm");w.setStartPosition(144,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_check");w.setStartPosition(160,16);w.setIconSize(16,16);U.registIcon(0,
0,"micro_date");w.setStartPosition(176,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_f7");w.setStartPosition(192,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_input");w.setStartPosition(208,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_label");w.setStartPosition(224,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_list");w.setStartPosition(240,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_spinner");w.setStartPosition(256,16);w.setIconSize(16,16);U.registIcon(0,0,"micro_switch");w.setStartPosition(272,
16);w.setIconSize(16,16);U.registIcon(0,0,"numerical");w.setStartPosition(288,16);w.setIconSize(16,16);U.registIcon(0,0,"numerical_selected");w.setStartPosition(304,16);w.setIconSize(16,16);U.registIcon(0,0,"outdb");w.setStartPosition(320,16);w.setIconSize(16,16);U.registIcon(0,0,"outdb_hover");w.setStartPosition(336,16);w.setIconSize(16,16);U.registIcon(0,0,"refresh");w.setStartPosition(352,16);w.setIconSize(16,16);U.registIcon(0,0,"refresh_hover");w.setStartPosition(368,16);w.setIconSize(16,16);
U.registIcon(0,0,"rightArrow");w.setStartPosition(384,16);w.setIconSize(16,16);U.registIcon(0,0,"rightArrow_hover");w.setStartPosition(0,32);w.setIconSize(16,16);U.registIcon(0,0,"smallparam");w.setStartPosition(16,32);w.setIconSize(16,16);U.registIcon(0,0,"switch");w.setStartPosition(32,32);w.setIconSize(16,16);U.registIcon(0,0,"switch_hover");w.setStartPosition(48,32);w.setIconSize(16,16);U.registIcon(0,0,"table");w.setStartPosition(64,32);w.setIconSize(16,16);U.registIcon(0,0,"table_selected");
w.setStartPosition(80,32);w.setIconSize(16,16);U.registIcon(0,0,"time");w.setStartPosition(96,32);w.setIconSize(16,16);U.registIcon(0,0,"time_selected");w.setStartPosition(112,32);w.setIconSize(16,16);U.registIcon(0,0,"txt");w.setStartPosition(128,32);w.setIconSize(16,16);U.registIcon(0,0,"txt_selected");w.setStartPosition(144,32);w.setIconSize(16,16);U.registIcon(0,0,"up");w.setStartPosition(160,32);w.setIconSize(16,16);U.registIcon(0,0,"upArrow");w.setStartPosition(176,32);w.setIconSize(16,16);
U.registIcon(0,0,"upArrow_hover");w.setStartPosition(192,32);w.setIconSize(40,40);U.registIcon(0,0,"checkbox");w.setStartPosition(232,32);w.setIconSize(40,40);U.registIcon(0,0,"date_ctrl");w.setStartPosition(272,32);w.setIconSize(40,40);U.registIcon(0,0,"date_f7");w.setStartPosition(312,32);w.setIconSize(40,40);U.registIcon(0,0,"input");w.setStartPosition(352,32);w.setIconSize(40,40);U.registIcon(0,0,"label");w.setStartPosition(0,48);w.setIconSize(40,40);U.registIcon(0,0,"list");w.setStartPosition(40,
48);w.setIconSize(40,40);U.registIcon(0,0,"spinner");w.setStartPosition(80,48);w.setIconSize(40,40);U.registIcon(0,0,"switch_btn");w.setStartPosition(120,48);w.setIconSize(64,64);U.registIcon(0,0,"arrow");w.setStartPosition(184,72);w.setIconSize(66,78);U.registIcon(0,0,"icon_question");w.setStartPosition(250,72);w.setIconSize(60,78);U.registIcon(0,0,"no_source");w.setStartPosition(0,112);w.setIconSize(144,144);U.registIcon(0,0,"boEntity");w.setStartPosition(144,150);w.setIconSize(144,144);U.registIcon(0,
0,"datasource");w.setStartPosition(632,230);w.setIconSize(168,96);U.registIcon(0,0,"marco_error");w.setStartPosition(432,230);w.setIconSize(200,120);U.registIcon(0,0,"NoParam");w.setStartPosition(288,230);w.setIconSize(144,144);U.registIcon(0,0,"oql");w.setStartPosition(0,256);w.setIconSize(144,144);U.registIcon(0,0,"param");w.setStartPosition(144,294);w.setIconSize(144,144);U.registIcon(0,0,"sql");w.setStartPosition(649,326);w.setIconSize(151,86);U.registIcon(0,0,"notable");w.setStartPosition(449,
350);w.setIconSize(200,200);U.registIcon(0,0,"no_data")}};ha.Icons=Ca})();(function(){function ha(){}function xa(){}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common&&(com.kingdee.bos.extreport.datasetdesigner.common={});var Ca=
com.kingdee.bos.extreport.datasetdesigner.common;Ca.DesignerFacade=function(Ab,Ra,Ja,fa){U.call(this,Ab,Ra,Ja,fa);var Cb=this.protectedMethod;this.loadModel=function(pb){Cb.remote("loadModel",{dataSetId:pb})};this.saveModel=function(pb,Ea,Gb){pb={model:JSON.stringify(Gb),dataSetId:pb,modelCacheId:Ea};Cb.remote("saveModel",pb)};this.checkModel=function(pb,Ea){pb={model:JSON.stringify(Ea),dataSetId:pb};Cb.remote("checkModel",pb)};this.cacheModel=function(pb,Ea){pb={model:JSON.stringify(Ea),dataSetId:pb};
Cb.remote("cacheModel",pb)}};Ca.MacroFacade=function(Ab,Ra,Ja,fa){U.call(this,Ab,Ra,Ja,fa);var Cb=this.protectedMethod;this.checkMacroPermission=function(){var pb={};pb.appID=Za.QING_RPT;Cb.remote("checkMacroPermission",pb)};this.loadAllMacros=function(){Cb.remote("loadAllMacros",{})};this.loadMacroPageIndexByUid=function(pb,Ea){Cb.remote("loadPageIndexByUid",{macroUid:pb,pageSize:Ea})};this.loadSelectMacros=function(pb){pb={arrMacroUid:JSON.stringify(pb)};Cb.remote("loadSelectMacros",pb)};this.loadMacros=
function(pb,Ea,Gb,J,eb){Cb.remote("loadMacros",{targetPage:pb,pageSize:Ea,searchText:Gb,mulValueMacro:J,timeStamp:eb})};this.loadMacroFieldsByUid=function(pb){Cb.remote("loadMacroFieldsByUid",{macroUid:pb})};this.previewMacroById=function(pb,Ea){Cb.remote("previewMacroById",{macroId:pb,macroType:Ea})};this.loadMacroByUids=function(pb){pb={macroUids:JSON.stringify(pb)};Cb.remote("loadMacroByUids",pb)}};Ca.RemoteImpl=function(){sb.call(this);var Ab;this.getRemoteUrl=function(){return Ab};this.setRemoteUrl=
function(Ra){Ab=Ra}};Ca.EventListenerMap=function(){var Ab={};this.addListener=function(Ra,Ja){var fa=Ab[Ra];fa||(fa=[],Ab[Ra]=fa);for(Ra=0;Ra<fa.length;Ra++)if(fa[Ra]==Ja)return;fa.push(Ja)};this.removeListener=function(Ra,Ja){if(Ra=Ab[Ra])for(var fa=Ra.length-1;0<=fa;fa--)if(Ra[fa]==Ja){Ra.splice(fa,1);break}};this.fireEvent=function(Ra,Ja){if(Ra=Ab[Ra])for(var fa=Ra.length-1;0<=fa;fa--)Ra[fa](Ja)}};Ca.StringUtil=ha;Ca.LanguageUtil=xa;var U,sb,w,Za,zb;(function(){var Ab=com.kingdee.bos.qing.framework.common;
U=Ab.AbstractFacade;sb=Ab.AbstractRemoteCall;w=Ab.AbstractIcons;Za=Ab.TabbedUiUtil;Ab=com.kingdee.bos.qing;zb=Ab.Seer})();ha.isValidString=function(Ab,Ra){return Ra?Ra.test(Ab):/^([\u4E00-\u9FA5a-zA-Z_])[\u4E00-\u9FA5a-zA-Z0-9_]{0,}$/.test(Ab)};xa.isEnglish=function(){return"en"==zb.getUrlParamValue("language")};ha.isNotEmptyStr=function(Ab){return!!Ab};Ca.EventType={QUERY_AREA_INSERT_TYPE:"QUERY_AREA_INSERT",QUERY_AREA_SET_HINT_TYPE:"QUERY_AREA_SET_HINT",QUERY_AREA_ADD_HINT_TYPE:"QUERY_AREA_ADD_HINT",
QUERY_AREA_ADD_AT_HINT_TYPE:"QUERY_AREA_ADD_AT_HINT",QUERY_AREA_SET_DOLLAR_HINT_TYPE:"QUERY_AREA_SET_DOLLAR_HINT",OUTPUT_AREA_SHOW_EXP:"OUTPUT_AREA_SHOW_EXP",OUTPUT_AREA_REFRESH:"OUTPUT_AREA_REFRESH",DATASOURCE_AREA_SHOW_EXP:"DATASOURCE_AREA_SHOW_EXP"};var Tb=new function(){w.call(this);var Ab=this.protectedMethod;this.protectedInit=function(Ra,Ja){Ra=com.kingdee.bos.extreport.datasetdesigner.ComboIcon;if(!Ra)throw Error("com.kingdee.bos.extreport.datasetdesigner.ComboIcon not found.");Ra.define(Ja,
"extreport");Ja.setGap(1);Ja.setStartPosition(207,78);Ja.setIconSize(65,78);Ab.registIcon(0,0,"icon_question");Ra.define(Ja,"marco_error");Ja.setIconSize(200,200);Ab.registIcon(0,0,"macro_error")}};Ca.Icons=Tb;Tb=new function(){var Ab;this.hookCollector=function(Ra){Ab=Ra};this.occur=function(Ra,Ja){try{Ab&&Ab(Ra,Ja)}catch(fa){window.console&&console.warn(fa)}}};Tb.SAVE_DATASET_DESIGNER_TYPE="ext-save-dataset-designer-type";Tb.SAVEAS_DATASET_DESIGNER_TYPE="ext-saveas-dataset-designer-type";Tb.PREVIEW_DATASET_DESIGNER_TYPE=
"ext-preview-dataset-designer-type";Tb.CHECK_DATASET_DESIGNER_TYPE="ext-check-dataset-designer-type";Ca.UserOperationReporter=Tb})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common&&(com.kingdee.bos.extreport.datasetdesigner.common={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common.query&&
(com.kingdee.bos.extreport.datasetdesigner.common.query={});com.kingdee.bos.extreport.datasetdesigner.common.query.QueryFacade=function(Ca,U,sb,w){xa.call(this,Ca,U,sb,w);var Za=this.protectedMethod;this.getOutDBList=function(){Za.remote("getOutDBList",{})};this.checkOutDBByName=function(zb){Za.remote("checkOutDBByName",{name:zb})};this.getUsableEntities=function(){Za.remote("getUsableEntities",{})};this.getEntityPreviewData=function(zb){Za.remote("getEntityPreviewData",{tableName:zb})};this.getEntityDataCount=
function(zb){Za.remote("getEntityDataCount",{tableName:zb})};this.checkDataSource=function(zb,Tb){zb={dataSetId:zb,model:JSON.stringify(Tb)};Za.remote("checkDataSource",zb)};this.getUsableTableObject=function(zb,Tb){zb={dataSetId:zb,model:JSON.stringify(Tb)};Za.remote("getUsableTableObject",zb)};this.getOutputColumns=function(zb,Tb){zb={dataSetId:zb,modelContent:JSON.stringify(Tb)};Za.remote("getOutputColumns",zb)};this.getTableFields=function(zb,Tb,Ab,Ra,Ja){zb={timeStamp:zb,dataSetType:Tb,dataSourceType:Ab,
dataSourceName:Ra,tableNames:JSON.stringify(Ja)};Za.remote("getTableFields",zb)};this.loadSystemVar=function(zb,Tb,Ab,Ra){Za.remote("loadSystemVar",{searchText:zb,targetPage:Tb,pageSize:Ab,timeStamp:Ra})};this.loadSystemVarPageIndexByName=function(zb,Tb){Za.remote("loadSystemVarPageIndexByName",{sysName:zb,pageSize:Tb})};this.loadSelectSysVars=function(zb){zb={arrSysName:JSON.stringify(zb)};Za.remote("loadSelectSysVars",zb)};this.previewDataSysVar=function(zb){Za.remote("previewDataSysVar",{name:zb})};
this.checkDataSourcePermission=function(){var zb={};zb.appID=ha.getUrlParamValue("appID");zb.dataSetId=ha.getUrlParamValue("dataSetId");Za.remote("checkDataSourcePermission",zb)}};var ha,xa;(function(){var Ca=com.kingdee.bos.qing;ha=Ca.Seer;Ca=com.kingdee.bos.qing.framework.common;xa=Ca.AbstractFacade})()})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common&&(com.kingdee.bos.extreport.datasetdesigner.common={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common.paramctrl&&
(com.kingdee.bos.extreport.datasetdesigner.common.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.common.paramctrl.ParamCtrlFacade=function(xa,Ca,U,sb){ha.call(this,xa,Ca,U,sb);var w=this.protectedMethod;this.loadDataSetMenu=function(Za,zb,Tb,Ab,Ra){w.remote("loadDataSetMenu",{menuName:zb,dataSetName:Za,groupType:Ab,datasetType:Tb,timeStamp:Ra})};this.loadParameterByDataSetId=function(Za){w.remote("loadParameterByDataSetId",{dataSetId:Za})};this.queryTableFieldsByDataSetId=function(Za,zb,
Tb,Ab,Ra){w.remote("loadTableFieldsByDataSetId",{dataSetId:Za,groupId:zb,userId:Tb,sGroupName:Ab,sDBSourceName:Ra})};this.loadDataSetByGroupId=function(Za,zb,Tb,Ab,Ra,Ja){w.remote("loadDataSetByGroupId",{groupId:Tb,pageSize:zb,targetPage:Za,dataSetName:Ab,dataType:Ra,dataSetId:Ja})};this.queryBatchLinkageVO=function(Za){Za={arrSourceId:JSON.stringify(Za)};w.remote("queryBatchLinkageVO",Za)};this.loadDateTimeFunction=function(){w.remote("loadDateTimeFunction",{})};this.checkFormula=function(Za){w.remote("checkFormula",
{formula:Za})};this.queryDataSourceInfo=function(Za,zb,Tb,Ab,Ra){w.remote("queryDataSourceInfo",{sSourceId:Za,sSourceName:zb,sGroupId:Tb,sGroupName:Ab,sUserId:Ra})};this.getConstantValueFromSource=function(Za){w.remote("getConstantValueFromSource",Za)};this.loadVariableValue=function(Za,zb){w.remote("loadVariableValue",{sId:Za,dataType:zb})};this.repairVariableAlias=function(Za,zb){w.remote("repairVariableAlias",{defaultValues:Za,defaultAlias:zb})};this.checkDataSetById=function(Za){w.remote("checkDataSetById",
{dataSetId:Za})}};var ha=com.kingdee.bos.qing.framework.common.AbstractFacade})();(function(){function ha(Ea){function Gb(vb){KTDefaultCellRender.call(this,vb);var tb=this,fb=this.paintCellUI;this.paintCellUI=function(gb,Wa){var Ka=tb.getCurrentRowIdx(),rb=tb.getCurrentRow(),Ga=tb.getCurrentColIdx();rb=rb.getUserObject();var la=db&&eb.getNoPermFieldIndex();la=db&&(!la||-1==la.indexOf(Ga));tb.getCurrentRowIdx()<fa.getHeadRowCount()?db&&!la?($(gb).css("background-color","#DFDFDF"),1==Ka&&(Ka=eb.getFieldTitle(Ga),Wa=Ja.get("noFieldPermTips","\u60a8\u6ca1\u6709\u6743\u9650\u67e5\u770b\u8be5\u5b57\u6bb5\u6570\u636e\u3002"),
Pa(Wa,gb,Ka))):0==Ga?(db&&$(gb).css("background-color","#DFDFDF"),1===Ka&&(Ka=eb.getFieldTitle(Ga),db?(Wa=Ja.get("macroField","\u8be5\u5b57\u6bb5\u4e3a\u5b8f\u7684\u53d6\u503c\u5b57\u6bb5\u3002"),Pa(Wa,gb,Ka)):fb(gb,Wa))):fb(gb,Wa):(Wa=rb.getColumn(Ga).getValue(),db&&!la&&(Wa="***"),Ka=$("<div>"),Ka.text(Wa),Ka.attr("title",Wa),Ka.css({"line-height":"28px","padding-left":"2px","padding-right":"2px",overflow:"hidden"}),Ka.appendTo(gb))}}var J,eb,db=Ea,Ma,ea,W,za,ya,Da,Jb;this.setModel=function(vb){if(eb=
vb)za.hide(),ya.hide();Ma||Ib();if(0!=document.body.clientHeight&&0!=document.body.clientWidth){fa.clear(Ma);if(eb){vb=eb.getActualRowCount();var tb=eb.getTotalRowCount();Ma.addColumns(eb.getFieldCount());for(var fb=fa.createHeadRow(Ma),gb=120,Wa=new Ra,Ka=0;Ka<eb.getFieldCount();Ka++){if(!db){Wa.setFontSize(12);var rb=eb.getFieldTitle(Ka);rb&&(rb=Wa.measureWidth(rb)+50,gb=rb<gb?gb:rb)}Ma.getColumn(Ka).setWidth(gb);fb.getCell(Ka).setValue(eb.getFieldTitle(Ka))}for(Ka=0;Ka<vb;Ka++)fb=eb.getRow(Ka),
fa.createRow(Ma).setUserObject(fb);Ka=Ja.get("previewRowNum","\u5171#1\u884c").replace("#1",tb);vb<tb&&(Ka+=Ja.get("previewRowLimit","\uff0c\u4ec5\u663e\u793a\u524d#1\u884c").replace("#1",vb));W.text(Ka)}else W.empty();fa.refresh(Ma)}};this.showPreviewError=function(vb,tb){za.hide();ya.show();Da&&Da.empty();Da=$("<div>");var fb=$("<div>");Cb.background(fb,"macro_error");Ab.layoutCtrlWithLRTB(fb,0,0,null,0,0,null);fb.css({"background-position":"center"});ya.append(fb);Jb=$("<span>");Jb.text(vb);Jb.appendTo(Da);
tb&&(vb=$("<span>"),vb.text(Ja.get("youCan","\u60a8\u53ef\u4ee5")),vb.appendTo(Da),fb=$("<span>"),fb.text(Ja.get("moreDetailBlank"," \u67e5\u770b\u8be6\u7ec6 ")),fb.addClass("extreport-error-darkmask-button"),fb.on("click",function(gb){Ca(tb,Ja.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"))}),fb.appendTo(vb),fb=$("<span>"),fb.text(Ja.get("fullStop","\u3002")),fb.appendTo(vb));Da.css({"line-height":"20px",
color:"#333","font-size":"14px","text-align":"center"});Ab.layoutCtrlWithLRTB(Da,0,0,null,"68%",null,20);ya.append(Da)};this.getPreviewTable=function(){return Ma};this.getJqUi=function(){J||(J=$("<div>"),Ib(),J.append(ea),W=$("<div>"),Ab.layoutCtrlWithLRTB(W,0,0,null,0,null,20),J.append(W),W.css({"line-height":"20px",color:"#333","font-size":"12px"}),za=$("<div>"),Ab.layoutCtrlWithLRTB(za,0,0,null,0,null,20),J.append(za),za.css({"line-height":"20px",color:"#333","font-size":"14px"}),za.text(Ja.get("loading",
"\u52a0\u8f7d\u4e2d\u2026")),eb&&za.hide(),ya=$("<div>"),J.append(ya),ya.hide());return J};var Ib=function(){Ma=fa.createTable();Ma.setColumnFitVisibleWidth(!1);var vb=new Gb(Ma);vb.setOutsideVisible(!0);Ma.setCellRender(vb);Ma.setSyncUIWhenModelChanged(!0);ea=$(Ma.getUI());Ab.layoutCtrlWithLRTB(ea,0,0,null,20,0,null)},Pa=function(vb,tb,fb){var gb=$("<div>");gb.attr("title",fb);gb.text(fb);gb.css({display:"inline-block","line-height":"20px",height:"20px"});fb=new zb;fb.setIconType(zb.ICON_TYPE_QUESTION);
fb.setTipsText(vb);vb=fb.getJqUi();vb.css({display:"inline-block",margin:"3px 0 0 3px"});gb.appendTo(tb);vb.appendTo(tb)}}function xa(){function Ea(){var ea=[];this.getColumn=function(W){return ea[W]};this.fromJsonObject=function(W){if(W=W.columns)for(var za=0;za<W.length;za++){var ya=new Gb;ya.fromJsonObject(W[za]);ea.push(ya)}}}function Gb(){var ea;this.getValue=function(){return ea};this.fromJsonObject=function(W){ea=W.value}}var J=0,eb=[],db=[],Ma=[];this.getNoPermFieldIndex=function(){return Ma};
this.getFieldCount=function(){return eb.length};this.getFieldTitle=function(ea){return eb[ea]};this.getTotalRowCount=function(){return J};this.getActualRowCount=function(){return db.length};this.getRow=function(ea){return db[ea]};this.fromJsonObject=function(ea){var W=ea.fields;W&&(eb=W);(W=ea.totalRowCount)&&(J=W);(W=ea.noPermFieldIndex)&&(Ma=W);if(ea=ea.rows)for(W=0;W<ea.length;W++){var za=new Ea;za.fromJsonObject(ea[W]);db.push(za)}}}function Ca(Ea,Gb){var J=new Tb;J.setCustomPainter(function(eb,
db){var Ma=$("<div>");Ma.text(Gb);var ea=$('<textarea readonly="true" ></textarea>');ea.text(db);ea.addClass("sa-ctrl-msgdlg-detail");ea.on("click",function(){ea.select()});ea.addClass("extreport-dataset-designer-top-border");Ab.layoutCtrlWithLRTB(ea,0,0,268,35,0,160);Ma.appendTo(eb);ea.appendTo(eb)});J.setOptionType(Tb.OPTION_OK);J.setButtonText(Tb.OPTION_OK,Ja.get("ok","\u786e\u5b9a"));J.setMessage(Ea);J.showDialog(300,300)}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee=
{});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common&&(com.kingdee.bos.extreport.datasetdesigner.common={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.common.ui&&(com.kingdee.bos.extreport.datasetdesigner.common.ui={});
var U=com.kingdee.bos.extreport.datasetdesigner.common.ui;U.AbstractDataSetTabPane=function(Ea,Gb){sb.AbstractTabPane.call(this);var J=this,eb,db;this.getTitle=function(){return Ea};this.setMessageCurtain=function(Ma){db=Ma};this.getMessageCurtain=function(){return db};this.getDataSetModelVO=function(){return Gb.getDataSetModelVO()};this.model2Ui=function(Ma){J.protectedUpdateUi(J.getDataSetModelVO(),Ma)};this.getJqUi=function(){eb||(eb=$("<div>"),J.protectedInit(eb));return eb};this.resize=function(){throw Error("override me");
};this.fireTabChangeEvent=function(){throw Error("override me");};this.protectedInit=function(Ma){throw Error("Override me.");};this.protectedUpdateUi=function(Ma){throw Error("Override me.");}};U.TableCustomExpandor=function(){var Ea,Gb;this.setColumnNotDraggable=function(J){Gb=J};this.setSyncSearchingUI=function(J){Ea=J};this.getTailBlankForDragging=function(){return-1};this.isRowDraggable=function(J,eb){return!1};this.isColumnDraggable=function(J,eb){return J.getColumnsCount()==eb+1||Gb&&Gb.includes(eb)?
!1:!0};this.getMinRowHeightLimited=function(J,eb){return 3};this.getMinColumnWidthLimited=function(J,eb){return 4};this.rowDraggedAction=function(J,eb,db){var Ma=J.isSyncUIWhenModelChanged();J.setSyncUIWhenModelChanged(!0);eb=J.getRow(eb);eb.setHeight(eb.getHeight()+db);J.setSyncUIWhenModelChanged(Ma)};this.setMinColumnWidth=function(J){};this.columnDraggedAction=function(J,eb,db){var Ma=J.isSyncUIWhenModelChanged();J.setSyncUIWhenModelChanged(!0);eb=J.getColumn(eb);eb.setWidth(eb.getWidth()+db);
J.setSyncUIWhenModelChanged(Ma);Ea&&Ea()}};U.SearchBox=function(){com.kingdee.bos.qing.ui.component.SearchBox.call(this);this.setFontSize=function(Ea){this.getJqUi().find("input").css({"font-size":Ea+"px"})}};U.PreviewDialog=function(Ea,Gb,J,eb){Za.call(this);var db=this,Ma=this.protectedMethod,ea,W;(function(){Ma.setTitle(Ja.get("preview","\u9884\u89c8"));db.setSize(700,500);Ma.setSelectable(!0);Ma.setContentPaneCreator(function(){if(ea)var ya=ea.getJqUi();else{ea=new ha(J);ya=ea.getJqUi();Ea.addWindowResizeListener(za);
var Da=function(Ib){var Pa=new xa;Pa.fromJsonObject(Ib);ea.setModel(Pa);W&&W(!0);eb&&eb(Gb,!1)},Jb=function(Ib,Pa){W&&W(!1);if(J){eb&&eb(Gb,!0);switch(Ib){case 1200004:var vb=Ja.get("noConnectionPerm","\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u201c\u6570\u636e\u5e93\u8fde\u63a5\u201d\u7684\u6743\u9650\u3002");break;case 1200013:vb=Ja.get("noEntityPerm","\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u57fa\u7840\u8d44\u6599\u7684\u6743\u9650\u3002");break;case 1200014:vb=Ja.get("entityNotExits","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u57fa\u7840\u8d44\u6599\u4e0d\u5b58\u5728\u3002")}void 0!==
vb?ea.showPreviewError(vb):ea.showPreviewError(Ja.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"),Pa);return!0}};J?(Da=Ea.createMacroManageFacade(Da,Jb),Da.previewMacroById(Gb.getFid(),Gb.getType(),!1)):(Da=Ea.createQueryFacade(Da,Jb),Da.previewDataSysVar(Gb.getText()))}return ya});Ma.setFooterClosingOnly(!0);Ma.setClosingChecker2(function(){Ea.removeWindowResizeListener(za)},function(){Ea.removeWindowResizeListener(za);
Ma.destroy();return!0});Ma.setClosingAction(function(ya){})})();var za=function(){ea&&fa.refresh(ea.getPreviewTable())};this.setFunPreviewCallback=function(ya){W=ya}};U.ShowErrorDialog=Ca;var sb,w,Za,zb,Tb,Ab,Ra,Ja,fa,Cb;(function(){var Ea=com.kingdee.bos.qing.ui.component;sb=Ea.TabContainer;w=Ea.Dialog;Za=Ea.AbstractModalDialog;zb=Ea.HelpIcon;Tb=Ea.MessageDialog;Ea=com.kingdee.bos.qing.common;Ab=Ea.DomUtil;Ra=Ea.TextMeasurer;Ea=com.kingdee.bos.qing.framework.common;Ja=Ea.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);
Ea=com.kingdee.bos.qing.common.ui;fa=Ea.TableUtil;Ea=com.kingdee.bos.extreport.datasetdesigner.common;Cb=Ea.Icons})();var pb=new function(){this.highlightKeyWords=function(Ea,Gb,J){if(Gb&&J){Gb=Gb.toUpperCase();var eb=J.toUpperCase(),db=eb.split(Gb),Ma=Gb.length,ea;for(ea in db){var W=eb.indexOf(db[ea]),za=J.substr(Da,db[ea].length);W+=db[ea].length;var ya=eb.length-W;eb=eb.substr(W,ya);J=J.substr(W,ya);W=$("<span>");W.text(za);W.appendTo(Ea);if(ea!=db.length-1&&1<db.length){var Da=eb.indexOf(Gb);
za=J.substr(Da,Ma);W=Da+Ma;ya=eb.length-W;eb=eb.substr(W,ya);J=J.substr(W,ya);W=$("<span>");W.text(za);W.css("color","red");W.clone().appendTo(Ea)}}}else Ea.text(J);Ea.attr("title",Ea.text())}};U.SearchHelper=pb;pb=new function(){this.showConfirmDialog=function(Ea,Gb){var J=$(document.body),eb=$("<div class='sa-ctrl-common-modallayer'>");eb.appendTo(J);var db=new w(eb),Ma=Ja.get("operateConfirm","\u64cd\u4f5c\u786e\u8ba4");db.setTitle(Ma);Ma=J.prop("clientWidth");var ea=J.prop("clientHeight");db.setBounds(Ma-
400>>1,ea-300>>1,400,300);db.setToolbarVisible(!1);Ma=$("<div>");ea=$("<div>");var W=$("<span>");Cb.background(W,"icon_question");var za=$("<span>");za.text(Ea);za.addClass("extreport-dataset-designer-dialog-confirm-msg");za.attr("title",Ea);Ab.layoutCtrl(ea,null,null,368,185);Ab.layoutCtrl(W,150,10,65,78);Ab.layoutCtrl(za,0,115,370,60);W.appendTo(ea);za.appendTo(ea);ea.appendTo(Ma);db.setContent(Ma);db.addClosingListener(function(ya,Da){Da&&Gb();ya.destroy();eb.remove()});db.showFooterPane();db.show();
eb.appendTo(J)}};U.ConfirmDialogHelper=pb})();(function(){function ha(e){var n=e;this.getModel=function(){return n};this.setModel=function(g){n=g}}function xa(){var e={};this.check=function(){throw Error("Override me.");};this.addException=function(n,g,a){var f=e[n];f||(f={});f[g]=a;e[n]=f};this.addExceptionFromMapCheckResult=function(n,g){if(n){var a=n[g];if(a)for(var f=0;f<a.length;f++){var b=a[f];this.addException(g,b.getCode(),b.getMessage())}delete n[g]}};this.getException=function(n,g){if(n){if(n=e[n]){if(g)return n[g];g=Object.keys(n);
for(var a=0;a<g.length;a++){var f=n[g[a]];if(f)return f}}}else for(var b=Object.keys(e),t=0;t<b.length;t++)if(n=e[b[t]])for(g=Object.keys(n),a=0;a<g.length;a++)if(f=n[g[a]])return f;return null};this.removeException=function(n,g){(n=e[n])&&delete n[g]};this.clearException=function(n){if(n){var g=e[n];g&&(g={},e[n]=g)}else e={}}}function Ca(e,n){xa.call(this);var g=this,a=n,f,b,t,r,F,B;this.check=function(Z){Z&&Z()};this.clearDefaultRelativeChange=function(){g.setDefaultValue(null);g.setDefaultAlias(null);
g.clearException(Aa.PARAM_CTRL_DEFAULT_VALUE)};this.setDefaultAlias=function(Z,Xa){Xa||g.getParameter().getModel().setDirty(B!==Z);B=Z};this.getDefaultAlias=function(){return B};this.repairDefaultAlias=function(Z){B=Z};this.setDefaultValue=function(Z){g.getParameter().getModel().setDirty(F!==Z);F=Z};this.getDefaultValue=function(){return F};this.setDefaultValueType=function(Z){g.getParameter().getModel().setDirty(r!==Z);r=Z};this.getDefaultValueType=function(){return r};this.setCtrlType=function(Z){g.getParameter().getModel().setDirty(a!==
Z);a=Z};this.getCtrlType=function(){return a};this.setCtrlState=function(Z){g.getParameter().getModel().setDirty(f!==Z);f=Z};this.getCtrlState=function(){return f};this.setIsRequired=function(Z){g.getParameter().getModel().setDirty(b!==Z);b=Z};this.getIsRequired=function(){return b};this.repairRequired=function(Z){b=Z};this.setDescription=function(Z){g.getParameter().getModel().setDirty(t!==Z);t=Z};this.getDescription=function(){return t};this.getParameter=function(){return e};this.isConvertibleToOther=
function(){return f!==wa.STANDER||b||t?!1:!0};this.protectedMethod={toJsonObject:function(){var Z={};Z.ctrlType=a;Z.ctrlState=f;Z.isRequired=b;Z.description=t;Z.defaultValueType=r;Z.defaultValue=F;Z.defaultAlias=B;return Z},fromJsonObject:function(Z,Xa){g.addExceptionFromMapCheckResult(Xa,Aa.PARAM_CTRL_DEFAULT_VALUE);g.addExceptionFromMapCheckResult(Xa,Aa.PARAM_CTRL_LINKAGE);g.addExceptionFromMapCheckResult(Xa,Aa.PARAM_CTRL_BIND_SOURCE);a=parseInt(Z.ctrlType);f=parseInt(Z.ctrlState);b=Z.isRequired;
t=Z.description;r=parseInt(Z.defaultValueType);F=Z.defaultValue;B=Z.defaultAlias}}}function U(){var e,n,g;this.getLinkageParamObject=function(){return e};this.setLinkageParamObject=function(a){(e=a)&&e.getName()&&(n=e.getName())};this.getLinkageParamName=function(){return n};this.setLinkageParamName=function(a){n=a};this.getRelatedDSParamName=function(){return g};this.setRelatedDSParamName=function(a){g=a};this.toJsonObject=function(){var a={};a.linkageParamName=e.getName();a.relatedDSParamName=g;
return a};this.fromJsonObject=function(a){n=a.linkageParamName;g=a.relatedDSParamName}}function sb(e,n){Ca.call(this,e,n);var g=this.protectedMethod,a=this,f=[];this.getLinkageParams=function(){return f};this.setLinkageParams=function(t){a.getParameter().getModel().setDirty(f!==t);f=t};this.addLinkageParam=function(t,r){};var b=a.isConvertibleToOther;this.isConvertibleToOther=function(){return b()?!(f&&0<f.length):!1};this.checkLinkage=function(t,r){for(var F=e.getModel().getParameters(),B=a.getLinkageParams(),
Z=0;Z<B.length;Z++){var Xa=B[Z],aa=Xa.getLinkageParamObject();if(aa&&-1!==F.indexOf(aa))if(-1===t.indexOf(aa))a.addException(Aa.PARAM_CTRL_LINKAGE,e.getName()+"$"+Xa.getLinkageParamName()+Hb.LINKAGE_DS,A.get("ctrlError","\u63a7\u4ef6\u201cxx\u201d\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u8be5\u63a7\u4ef6\u7684\u6570\u636e\u6e90\u3002").replace("xx",Xa.getLinkageParamName()));else{aa=aa.getCtrlObject().getBindSource().getId();aa=r[aa];for(var G=Xa.getRelatedDSParamName(),C=!1,O=0;O<aa.length;O++)if(G===
aa[O].getName()){C=!0;break}C||a.addException(Aa.PARAM_CTRL_LINKAGE,e.getName()+"$"+Xa.getLinkageParamName()+Hb.LINKAGE_DS_PARAM,A.get("noFindParam","\u53c2\u6570\u201cxx\u201d\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664").replace("xx",Xa.getRelatedDSParamName()))}else a.addException(Aa.PARAM_CTRL_LINKAGE,e.getName()+"$"+Xa.getLinkageParamName()+Hb.LINKAGE_PARAM,A.get("cantfindParamCtrlName","\u627e\u4e0d\u5230\u539f\u63a7\u4ef6\u201cxx\u201d\u7684\u53c2\u6570\u540d\u79f0\u548c\u63a7\u4ef6\u540d\u79f0\u3002").replace("xx",
Xa.getLinkageParamName()))}};this.protectedMethod={toJsonObject:function(){var t=g.toJsonObject();if(f&&0<f.length){for(var r=[],F=0;F<f.length;F++)r.push(f[F].toJsonObject());t.linkageParams=r}return t},fromJsonObject:function(t,r){g.fromJsonObject(t,r);if(t=t.linkageParams)for(r=0;r<t.length;r++){var F=t[r],B=new U;B.fromJsonObject(F);f.push(B)}}}}function w(e){ha.call(this,e);xa.call(this);var n=this,g;this.getUserId=function(){return g};this.setUserId=function(a){n.getModel().setDirty(g!==a);
g=a};this.protectedMethod={toJsonObject:function(){var a={};a.userId=g;return a},fromJsonObject:function(a){g=a.userId}}}function Za(e){w.call(this,e);var n=this.protectedMethod,g=this,a,f,b,t;this.setId=function(r){g.getModel().setDirty(a!==r);a=r};this.getId=function(){return a};this.setName=function(r){g.getModel().setDirty(f!==r);f=r};this.getName=function(){return f};this.setGroupId=function(r){g.getModel().setDirty(r!==r);b=r};this.getGroupId=function(){return b};this.setGroupName=function(r){g.getModel().setDirty(t!==
r);t=r};this.repairSource=function(r,F,B,Z){t=r;b=F;a=B;f=Z};this.getGroupName=function(){return t};this.toJsonObject=function(){var r=n.toJsonObject();r.id=a;r.name=f;r.groupId=b;r.groupName=t;return r};this.fromJsonObject=function(r){n.fromJsonObject(r);a=r.id;f=r.name;b=r.groupId;t=r.groupName}}function zb(e){w.call(this,e);var n=this.protectedMethod,g=this,a,f;this.setSourceName=function(b){g.getModel().setDirty(a!==b);a=b};this.getSourceName=function(){return a};this.setSourceAlias=function(b){g.getModel().setDirty(f!==
b);f=b};this.getSourceAlias=function(){return f};this.toJsonObject=function(){var b=n.toJsonObject();b.sourceName=a;b.sourceAlias=f;return b};this.fromJsonObject=function(b){n.fromJsonObject(b);a=b.sourceName;f=b.sourceAlias}}function Tb(e){w.call(this,e);var n=this.protectedMethod,g=this,a;this.getMacroId=function(){return a};this.setMacroId=function(f){g.getModel().setDirty(a!==f);a=f};this.toJsonObject=function(){var f=n.toJsonObject();f.macroUid=a;return f};this.fromJsonObject=function(f){n.fromJsonObject(f);
a=f.macroUid}}function Ab(){var e,n;this.getName=function(){return e};this.setName=function(g){e=g};this.getAlias=function(){return n};this.setAlias=function(g){n=g};this.protectedMethod={toJsonObject:function(){var g={};g.left=e;g.right=n;return g},fromJsonObject:function(g){e=g.left;n=g.right}}}function Ra(){Ab.call(this);var e=this.protectedMethod,n=this;this.getPatternText=function(){if(!n.getAlias()&&!n.getName())return"";var g=n.getAlias()?n.getAlias():"",a=n.getAlias()?"("+n.getName()+")":
n.getName();return g+a};this.toJsonObject=function(){return e.toJsonObject()};this.fromJsonObject=function(g){e.fromJsonObject(g)}}function Ja(e){w.call(this,e);var n=this.protectedMethod,g=this,a=[];this.getArrNameAliasPairs=function(){return a};this.setNameAliasPair=function(f){g.getModel().setDirty(a!==f);a=f};this.toJsonObject=function(){var f=n.toJsonObject();if(a&&0<a.length){for(var b=[],t=0;t<a.length;t++){var r=!0,F=a[t],B=F.toJsonObject();if(Na.isNotEmptyStr(F.getAlias())||Na.isNotEmptyStr(F.getName())){for(F=
0;F<b.length;F++)JSON.stringify(b[F])==JSON.stringify(B)&&(r=!1);r&&b.push(B)}}f.nameAliasPairs=b}return f};this.fromJsonObject=function(f){n.fromJsonObject(f);if(f=f.nameAliasPairs)for(var b=0;b<f.length;b++){var t=f[b],r=new Ra;r.fromJsonObject(t);a.push(r)}}}function fa(e,n){sb.call(this,e,n);var g=this.protectedMethod,a=this,f,b,t,r,F,B,Z;this.setBindSource=function(aa){a.getParameter().getModel().setDirty(b!==aa);b=aa};this.getBindSource=function(){return b};this.setBindSourceType=function(aa){a.getParameter().getModel().setDirty(f!==
aa);f=aa};this.clearDataSourcePropAndException=function(){a.getDefaultValueType()===wb.CONSTANT&&(a.clearException(Aa.PARAM_CTRL_DEFAULT_VALUE),a.setDefaultValue(null),a.setDefaultAlias(null));a.setValueFieldName(null);a.setValueFieldAlias(null);a.setDisplayFieldName(null);a.setDisplayFieldAlias(null);e.clearException(Aa.PARAM_CLIENT_ERROR);a.clearException(Aa.PARAM_CTRL_BIND_SOURCE);nb.removeLinkage(e)};this.clearFieldRelativeChange=function(aa){a.getDefaultValueType()==wb.CONSTANT&&(a.setDefaultValue(null),
a.setDefaultAlias(null),a.clearException(Aa.PARAM_CTRL_DEFAULT_VALUE));a.removeException(Aa.PARAM_CTRL_BIND_SOURCE,e.getName()+aa)};this.repairFieldAlias=function(aa){for(var G={},C=0;C<aa.length;C++){var O=aa[C];G[O.getName()]=O.getAlias()}G[t]&&(r=G[t]);G[F]&&(B=G[F]);return G};this.getBindSourceType=function(){return f};this.setValueFieldName=function(aa){a.getParameter().getModel().setDirty(t!==aa);t=aa};this.getValueFieldName=function(){return t};this.setValueFieldAlias=function(aa){a.getParameter().getModel().setDirty(r!==
aa);r=aa};this.getValueFieldAlias=function(){return r};this.setDisplayFieldName=function(aa){a.getParameter().getModel().setDirty(F!==aa);F=aa};this.getDisplayFieldName=function(){return F};this.setDisplayFieldAlias=function(aa){a.getParameter().getModel().setDirty(B!==aa);B=aa};this.getDisplayFieldAlias=function(){return B};this.isAllowEdit=function(){return Z};this.setIsAllowEdit=function(aa){a.getModel().setDirty(Z!==aa);Z=aa};var Xa=a.isConvertibleToOther;this.isConvertibleToOther=function(){return Xa()?
!b:!1};this.buildConstantQueryParams=function(aa){var G={},C=a.getBindSource(),O=a.getBindSourceType();aa&&(G.sTimeStamp=aa);G.iBindSourceType=O;G.sValueField=a.getValueFieldName();G.sDisplayField=a.getDisplayFieldName();switch(O){case Ob.DATA_SET:G.dataSetId=C.getId();break;case Ob.MACRO:G.sMacroUid=C.getMacroId()}return G};this.protectedMethod={toJsonObject:function(){var aa=g.toJsonObject();aa.bindSourceType=f;b&&(aa.bindSource=b.toJsonObject());aa.valueFieldName=t;aa.valueFieldAlias=r;aa.displayFieldName=
F;aa.displayFieldAlias=B;aa.isAllowEdit=Z;return aa},fromJsonObject:function(aa,G){g.fromJsonObject(aa,G);f=parseInt(aa.bindSourceType);if(G=aa.bindSource)b=Ub.createBindSource(f,a.getParameter().getModel()),b.fromJsonObject(G);t=aa.valueFieldName;r=aa.valueFieldAlias;F=aa.displayFieldName;B=aa.displayFieldAlias;Z=aa.isAllowEdit}}}function Cb(e,n){fa.call(this,e,n);var g=this.protectedMethod,a=this;this.check=function(f){e.clearException(Aa.PARAM_CLIENT_ERROR);var b=a.getBindSource();if(!a.getBindSource()||
b.getArrNameAliasPairs&&0==b.getArrNameAliasPairs().length){var t=A.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002");e.addException(Aa.PARAM_CLIENT_ERROR,e.getName(),t)}!t&&(a.getException(Aa.PARAM_CTRL_DEFAULT_VALUE)||a.getException(Aa.PARAM_CTRL_LINKAGE)||a.getException(Aa.PARAM_CTRL_BIND_SOURCE))&&(t=A.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002"));f&&f();return t};this.toJsonObject=
function(){return g.toJsonObject()};this.fromJsonObject=function(f,b){g.fromJsonObject(f,b)}}function pb(e,n){sb.call(this,e,n);var g=this.protectedMethod,a=this,f,b,t=new Ea;this.getDateGranType=function(){return f};this.setDateGranType=function(B){a.getParameter().getModel().setDirty(f!==B);f=B;e.getDataType()!=Ba.TIME&&(t.setDateGran(B),F())};this.getDefaultDateType=function(){return b};this.setDefaultDateType=function(B){a.getParameter().getModel().setDirty(b!==B);b=B;e.getDataType()!=Ba.TIME&&
(t.setDateType(B),F())};this.getDateValue=function(){return Ba.TIME==e.getDataType()?a.getDefaultValue():t.getValue()};this.setDateValue=function(B){if(Ba.TIME==e.getDataType())return a.setDefaultValue(B);t.setValue(B);F()};this.toJsonObject=function(){var B=g.toJsonObject();B.dateGranType=f;B.defaultDateType=b;return B};var r=a.isConvertibleToOther;this.isConvertibleToOther=function(){return r()?!a.getDefaultValue():!1};this.fromJsonObject=function(B,Z){g.fromJsonObject(B,Z);f=B.dateGranType;b=B.defaultDateType;
e.getDataType()!=Ba.TIME&&Na.isNotEmptyStr(a.getDefaultValue())&&t.fromJsonObject(JSON.parse(a.getDefaultValue()))};var F=function(){var B=e.getDataType();B!=Ba.DATE&&B!=Ba.DATETIME||a.setDefaultValue(JSON.stringify(t.toJsonObject()))}}function Ea(){var e=this,n,g,a;this.getVersion=function(){return"2"};this.getDateGran=function(){return n};this.setDateGran=function(f){n=f};this.getDateType=function(){return g};this.setDateType=function(f){g=f};this.getValue=function(){return a};this.setValue=function(f){a=
f};this.fromJsonObject=function(f){e.setDateGran(f.dateGran);e.setDateType(f.dateType);e.setValue(f.value)};this.toJsonObject=function(){var f={version:"2"};f.dateGran=n;f.dateType=g;f.value=a;return f}}function Gb(e,n){fa.call(this,e,n);var g=this.protectedMethod,a=this,f=[],b=Bb.NOT_TREE,t,r,F,B,Z,Xa,aa,G,C,O;this.check=function(Y){e.clearException(Aa.PARAM_CLIENT_ERROR);a.removeException(Aa.PARAM_CTRL_BIND_SOURCE,e.getName()+"$PARENT_FIELD");if(a.getBindSource()){var ob=b==Bb.NOT_TREE?!1:!(G&&
O||B&&Xa);if(ob){b==Bb.PARENT_CHILD&&a.addException(Aa.PARAM_CTRL_BIND_SOURCE,e.getName()+"$PARENT_FIELD",A.get("notNullParent","\u7236\u8282\u70b9\u5b57\u6bb5\u4e0d\u53ef\u4e3a\u7a7a"));var u=A.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002");e.addException(Aa.PARAM_CLIENT_ERROR,e.getName(),u)}else if(a.getException(Aa.PARAM_CTRL_DEFAULT_VALUE)||a.getException(Aa.PARAM_CTRL_LINKAGE)||a.getException(Aa.PARAM_CTRL_BIND_SOURCE))u=A.get("ctrlPropSettingTips",
"\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002")}else u=A.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002"),e.addException(Aa.PARAM_CLIENT_ERROR,e.getName(),u);Y&&Y();return u};var ra=this.clearDataSourcePropAndException;this.clearDataSourcePropAndException=function(){ra();a.getCtrlType()===Ta.F7&&(a.clearAdvancedProp(),Ob.isSupportTreeType(a.getBindSourceType())||(b=Bb.NOT_TREE))};this.clearAdvancedProp=function(){a.setLongNumberField(null);
a.setLongNumberFieldAlias(null);a.setParentField(null);a.setParentFieldAlias(null);a.setCurrentField(null);a.setCurrentFieldAlias(null);a.setTreeExpandLevel(1);a.setSeparator(null)};var Fa=this.buildConstantQueryParams;this.buildConstantQueryParams=function(Y,ob){Y=Fa(Y);if(ob&&0<ob.length){for(var u=JSON,P=u.stringify,N=[],M=a.getHiddenFields(),va=0;va<ob.length;va++){var h=ob[va].getName();-1===M.indexOf(h)&&N.push(h)}Y.arrMoreDisplay=P.call(u,N)}b==Bb.PARENT_CHILD?(Y.treeType=b,Y.currentField=
B,Y.parentField=Xa):b==Bb.LONG_NUMBER&&(Y.treeType=b,Y.longfield=G,Y.separator=O);return Y};var kb=this.repairFieldAlias;this.repairFieldAlias=function(Y){Y=kb(Y);t!=Bb.NOT_TREE&&(t==Bb.LONG_NUMBER?Y[G]&&(C=Y[G]):(Y[B]&&(Z=Y[B]),Y[Xa]&&(aa=Y[Xa])))};this.setSeparator=function(Y){a.getParameter().getModel().setDirty(O!==Y);O=Y};this.getSeparator=function(){return O};this.setLongNumberFieldAlias=function(Y){a.getParameter().getModel().setDirty(C!==Y);C=Y};this.getLongNumberFieldAlias=function(){return C};
this.setLongNumberField=function(Y){a.getParameter().getModel().setDirty(G!==Y);G=Y};this.getLongNumberField=function(){return G};this.setParentFieldAlias=function(Y){a.getParameter().getModel().setDirty(aa!==Y);aa=Y};this.getParentFieldAlias=function(){return aa};this.getParentField=function(){return Xa};this.setParentField=function(Y){a.getParameter().getModel().setDirty(Xa!==Y);Xa=Y};this.getCurrentFieldAlias=function(){return Z};this.setCurrentFieldAlias=function(Y){a.getParameter().getModel().setDirty(Z!==
Y);Z=Y};this.getCurrentField=function(){return B};this.setCurrentField=function(Y){a.getParameter().getModel().setDirty(B!==Y);B=Y};this.getRowLimit=function(){return F};this.setRowLimit=function(Y){a.getParameter().getModel().setDirty(F!==Y);F=Y};this.setIsAllowMultipleSelected=function(Y){a.getParameter().getModel().setDirty(r!==Y);r=Y};this.getIsAllowMultipleSelected=function(){return r};this.getTreeExpandLevel=function(){return t};this.setTreeExpandLevel=function(Y){a.getParameter().getModel().setDirty(t!==
Y);t=Y};this.setTreeType=function(Y){a.getParameter().getModel().setDirty(b!==Y);b=Y};this.getTreeType=function(){return b};this.setHiddenFields=function(Y){a.getParameter().getModel().setDirty(f!==Y);f=Y};this.addHiddenField=function(Y){a.getParameter().getModel().setDirty(!0);f.push(Y)};this.removeHiddenField=function(Y){Y=f.indexOf(Y);-1!==Y&&(a.getParameter().getModel().setDirty(!0),f.splice(Y,1))};this.getHiddenFields=function(){return f};this.toJsonObject=function(){var Y=g.toJsonObject();Y.hiddenFields=
f;Y.treeType=b;Y.treeExpandLevel=t;Y.isAllowMultipleSelected=r;Y.rowLimit=F;Y.currentField=B;Y.currentFieldAlias=Z;Y.parentField=Xa;Y.parentFieldAlias=aa;Y.longNumberField=G;Y.longNumberFieldAlias=C;Y.separator=O;return Y};this.fromJsonObject=function(Y,ob){g.fromJsonObject(Y,ob);Y.hiddenFields&&(f=Y.hiddenFields);b=parseInt(Y.treeType);t=parseInt(Y.treeExpandLevel);r=Y.isAllowMultipleSelected;F=parseInt(Y.rowLimit);B=Y.currentField;Z=Y.currentFieldAlias;Xa=Y.parentField;aa=Y.parentFieldAlias;G=Y.longNumberField;
C=Y.longNumberFieldAlias;O=Y.separator}}function J(e,n){sb.call(this,e,n);var g=this.protectedMethod,a=this;this.toJsonObject=function(){return g.toJsonObject()};this.check=function(b){if(a.getException(Aa.PARAM_CTRL_DEFAULT_VALUE)||a.getException(Aa.PARAM_CTRL_LINKAGE)){var t=A.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002");b&&b()}return t};var f=a.isConvertibleToOther;this.isConvertibleToOther=function(){return f()?!a.getDefaultValue():!1};this.fromJsonObject=
function(b,t){g.fromJsonObject(b,t)}}function eb(e,n){Ca.call(this,e,n);var g=this.protectedMethod;this.toJsonObject=function(){return g.toJsonObject()};this.fromJsonObject=function(a,f){g.fromJsonObject(a,f)}}function db(e,n){fa.call(this,e,n);var g=this.protectedMethod,a=this;this.check=function(f){e.clearException(Aa.PARAM_CLIENT_ERROR);var b=a.getBindSource();if(!a.getBindSource()||b.getArrNameAliasPairs&&0==b.getArrNameAliasPairs().length){var t=A.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002");
e.addException(Aa.PARAM_CLIENT_ERROR,e.getName(),t)}!t&&(a.getException(Aa.PARAM_CTRL_DEFAULT_VALUE)||a.getException(Aa.PARAM_CTRL_LINKAGE)||a.getException(Aa.PARAM_CTRL_BIND_SOURCE))&&(t=A.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002"));f&&f();return t};this.toJsonObject=function(){return g.toJsonObject()};this.fromJsonObject=function(f,b){g.fromJsonObject(f,b)}}function Ma(e,n){sb.call(this,e,n);var g=this.protectedMethod,a=this,f="1000",b="1",t=
"1";this.setMaxValue=function(F){a.getParameter().getModel().setDirty(f!==F);f=F};this.getMaxValue=function(){return f};this.setMinValue=function(F){a.getParameter().getModel().setDirty(b!==F);b=F};this.getMinValue=function(){return b};this.setStepSize=function(F){a.getParameter().getModel().setDirty(t!==F);t=F};this.getStepSize=function(){return t};this.toJsonObject=function(){var F=g.toJsonObject();F.maxValue=f;F.minValue=b;F.stepSize=t;return F};var r=a.isConvertibleToOther;this.isConvertibleToOther=
function(){return r()?!("1000"!==f||"1"!==b||"1"!==t):!1};this.fromJsonObject=function(F,B){g.fromJsonObject(F,B);f=F.maxValue;b=F.minValue;(t=F.stepSize)&&"0"!=t||(t="1")}}function ea(e,n){sb.call(this,e,n);var g=this.protectedMethod,a=this,f="1",b=A.get("switchOn","\u5f00\u542f"),t="0",r=A.get("switchOff","\u5173\u95ed");this.getSwitchOnValue=function(){return f};this.setSwitchOnValue=function(B){a.getParameter().getModel().setDirty(f!==B);f=B};this.getSwitchOnText=function(){return b};this.setSwitchOnText=
function(B){a.getParameter().getModel().setDirty(b!==B);b=B};this.getSwitchOffValue=function(){return t};this.setSwitchOffValue=function(B){a.getParameter().getModel().setDirty(t!==B);t=B};this.getSwitchOffText=function(){return r};this.setSwitchOffText=function(B){a.getParameter().getModel().setDirty(r!==B);r=B};var F=a.isConvertibleToOther;this.isConvertibleToOther=function(){return F()&&"1"===a.getDefaultValue()&&"1"===f&&b===A.get("switchOn","\u5f00\u542f")&&"0"===t&&r===A.get("switchOff","\u5173\u95ed")?
!0:!1};this.toJsonObject=function(){var B=g.toJsonObject();B.switchOnValue=f;B.switchOnText=b;B.switchOffValue=t;B.switchOffText=r;return B};this.fromJsonObject=function(B,Z){g.fromJsonObject(B,Z);f=B.switchOnValue;b=B.switchOnText;t=B.switchOffValue;r=B.switchOffText}}function W(e){ha.call(this,e);xa.call(this);var n=this,g,a,f,b=!0,t,r,F;this.setName=function(B){n.getModel().setDirty(g!==B);g=B};this.getName=function(){return g};this.setAlias=function(B){n.getModel().setDirty(a!==B);a=B};this.getAlias=
function(){return a};this.setDataType=function(B){n.getModel().setDirty(f!==B);f=B};this.getDataType=function(){return f};this.setIsIgnoreNull=function(B){n.getModel().setDirty(b!==B);b=B};this.getIsIgnoreNull=function(){return b};this.setRemark=function(B){n.getModel().setDirty(t!==B);t=B};this.getRemark=function(){return t};this.setCtrlType=function(B){n.getModel().setDirty(F!==B);F=B;r&&r.setCtrlType(F)};this.getCtrlType=function(){return F};this.getCtrlObject=function(){return r};this.setCtrlObject=
function(B){n.getModel().setDirty(r!==B);r=B};this.getPatternText=function(){var B=n.getName(),Z=n.getAlias();return B&&Z?"#A(#B)".replace("#A",B).replace("#B",Z):B?B:Z};this.isLinkableParam=function(){var B=n.getCtrlObject();return B.getBindSource&&B.getBindSourceType()===Ob.DATA_SET&&B.getBindSource()?!0:!1};this.check=function(){n.clearException(Aa.PARAM);if(!r)return null;var B=r.check();B&&n.addException(Aa.PARAM,"ctrl_error",A.get("paramCtrlErrorTips","\u53c2\u6570\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570\u5217\u8868\u9519\u8bef\u63d0\u793a\u5e76\u4fee\u590d\u3002"));
return B};this.getParamLinkageToMe=function(){if(!n.getCtrlObject().getBindSource)return[];for(var B=[],Z=n.getModel().getParameters(),Xa=0;Xa<Z.length;Xa++){var aa=Z[Xa];if(aa!==this){var G=aa.getCtrlObject();if(G.getLinkageParams&&0<G.getLinkageParams().length){G=G.getLinkageParams();for(var C=0;C<G.length;C++)G[C].getLinkageParamObject()===this&&B.push(aa)}}}return B};this.toJsonObject=function(){var B={};B.name=g;B.alias=a;B.dataType=f;B.isIgnoreNull=b;B.remark=t;r&&(B.ctrl=r.toJsonObject());
return B};this.fromJsonObject=function(B,Z){g=B.name;a=B.alias;f=parseInt(B.dataType);b=B.isIgnoreNull;t=B.remark;if(B=B.ctrl){F=parseInt(B.ctrlType);r=Ya.createCtrl(F,this);if(Z)for(var Xa={},aa=Object.keys(Z),G=0;G<aa.length;G++){var C=aa[G];if(C.startsWith("PARAM_")){var O=Z[C];if(O)for(var ra=0;ra<O.length;){var Fa=O[ra].getCode();Fa.startsWith(g+"$")||Fa==g?(Fa=O.splice(ra,1),Xa[C]?Xa[C].push(Fa[0]):Xa[C]=Fa):ra++}}}r.fromJsonObject(B,Xa)}}}function za(e){ha.call(this,e);var n=this,g,a,f;this.getName=
function(){return g};this.setName=function(b){n.getModel().setDirty(g!==b);g=b};this.getAlias=function(){return a};this.setAlias=function(b){n.getModel().setDirty(a!==b);a=b};this.getDataType=function(){return f};this.setDataType=function(b){n.getModel().setDirty(f!==b);f=b};this.toJsonObject=function(){var b={};b.name=g;b.alias=a;b.dataType=f;return b};this.fromJsonObject=function(b){g=b.name;a=b.alias;f=b.dataType}}function ya(){xa.call(this);var e=this,n,g,a,f=[],b=[],t=!1,r=!1;this.getDataSetId=
function(){return n};this.setDataSetId=function(F){n=F};this.getDataSetName=function(){return g};this.setDataSetName=function(F){g=F};this.getDataSetType=function(){return a};this.setDataSetType=function(F){a=F};this.getOutputColumns=function(){return f};this.setOutputColumns=function(F){e.setDirty(f!==F);f=F};this.getParameters=function(){return b};this.isDirty=function(){return t};this.setDirty=function(F,B){r||!B&&!F||((t!=F&&F&&!B||!F&&B)&&com.kingdee.bos.qing.integration.TabStatusHelper.setTabStatus(F),
t=F)};this.isPreset=function(){return r};this.setPreset=function(F){r=F};this.pushParameter=function(F){e.setDirty(!0);b.push(F)};this.removeParameterByIndex=function(F,B){e.setDirty(!0);b.splice(F,B)};this.removeParamByObject=function(F){F=b.indexOf(F);-1!=F&&(e.setDirty(!0),b.splice(F,1))};this.getParamNameSet=function(){for(var F={},B=0;B<b.length;B++){var Z=b[B];Z.getName()&&(F[Z.getName().toLowerCase()]=Z.getName())}return F};this.getContent=function(){throw Error("Override me.");};this.setContent=
function(F){throw Error("Override me.");};this.isEmpty=function(){var F=e.getContent();return!F||0==F.length};this.getParamInSql=function(){var F=ca.removeMark(e.getContent());F=F.replace(/[\r\n]/g,"");for(var B=[],Z=0;Z<F.length;Z++)if("@"===F[Z]){for(var Xa=Z+1,aa=Xa;aa<F.length;aa++)if("'"===F[aa]||" "===F[aa]||")"===F[aa]){var G=F.slice(Xa,aa);!G.startsWith("ExtRpt")&&0<G.length&&-1===B.indexOf(G)&&B.push(G);Z=aa;break}aa===F.length&&(G=F.slice(Xa,aa),!G.startsWith("ExtRpt")&&0<G.length&&-1===
B.indexOf(G)&&B.push(G))}return B};this.protectedMethod={toJsonObject:function(){var F={};F.dataSetName=g;F.dataSetType=a;if(f&&0<f.length){for(var B=[],Z=0;Z<f.length;Z++)B.push(f[Z].toJsonObject());F.outputColumns=B}if(b&&0<b.length){B=[];for(Z=0;Z<b.length;Z++)B.push(b[Z].toJsonObject());F.parameters=B}return F},fromJsonObject:function(F,B){a=parseInt(F.dataSetType);e.addExceptionFromMapCheckResult(B,Aa.DATA_SOURCE);e.addExceptionFromMapCheckResult(B,Aa.OUTPUT_COLUMN);e.addExceptionFromMapCheckResult(B,
Aa.AVAILABLE);var Z=F.outputColumns;if(Z)for(var Xa=0;Xa<Z.length;Xa++){var aa=Z[Xa],G=new za(e);G.fromJsonObject(aa);f.push(G)}if(aa=F.parameters){F={};for(Xa=0;Xa<aa.length;Xa++)G=aa[Xa],Z=new W(e),Z.fromJsonObject(G,B),b.push(Z),F[Z.getName()]=Z;for(B=0;B<b.length;B++)if(Z=b[B],Ta.isLinkageType(Z.getCtrlType())&&(Xa=Z.getCtrlObject().getLinkageParams()))for(Z=0;Z<Xa.length;Z++)aa=Xa[Z],(G=F[aa.getLinkageParamName()])&&aa.setLinkageParamObject(G)}}}}function Da(){ya.call(this);var e=this.protectedMethod,
n=this,g,a,f,b,t;this.getDataSourceType=function(){return g};this.setDataSourceType=function(r){n.setDirty(g!=r);g=r};this.getDataSourceName=function(){return a};this.setDataSourceName=function(r){n.setDirty(a!=r);a=r};this.getSqlType=function(){return f};this.setSqlType=function(r){n.setDirty(f!=r);f=r};this.getDBType=function(){return b};this.setDBType=function(r){n.setDirty(b!=r);b=r};this.getContent=function(){return t};this.setContent=function(r){n.setDirty(t!=r);t=r};this.toJsonObject=function(){var r=
e.toJsonObject();r.dataSourceType=g;r.dataSourceName=a;r.sqlType=f;r.dbType=b;r.sql=t;return r};this.fromJsonObject=function(r,F){e.fromJsonObject(r,F);g=parseInt(r.dataSourceType);a=r.dataSourceName;f=parseInt(r.sqlType);b=r.dbType;t=r.sql}}function Jb(){ya.call(this);var e=this.protectedMethod,n=this,g,a;this.getEntityName=function(){return g};this.setEntityName=function(f){n.setDirty(g!=f);g=f};this.getContent=function(){return a};this.setContent=function(f){n.setDirty(a!=f);a=f};this.toJsonObject=
function(){var f=e.toJsonObject();f.entityName=g;f.oql=a;return f};this.fromJsonObject=function(f,b){e.fromJsonObject(f,b);g=f.entityName;a=f.oql}}function Ib(){ya.call(this);var e=this.protectedMethod,n=this,g;this.getEntityName=function(){return g};this.setEntityName=function(a){n.setDirty(g!=a);g=a};this.toJsonObject=function(){var a=e.toJsonObject();a.entityName=g;return a};this.fromJsonObject=function(a,f){e.fromJsonObject(a,f);g=a.entityName}}function Pa(){var e,n;this.getCode=function(){return e};
this.getMessage=function(){return n};this.fromJsonObject=function(g){e=g.code;n=g.message}}function vb(){var e,n,g,a,f,b=!0;this.setName=function(t){e=t};this.getName=function(){return e};this.setDisplayName=function(t){n=t};this.getDisplayName=function(){return n};this.setCommentInfo=function(t){g=t};this.getCommentInfo=function(){return g};this.setModelId=function(t){a=t};this.getModelId=function(){return a};this.setParentNode=function(t){f=t};this.getParentNode=function(){return f};this.setEnabled=
function(t){b=t};this.isEnabled=function(){return b};this.getSubNodeLevel=function(){for(var t=-1,r=f;r;)t++,r=r.getParentNode();return t}}function tb(){vb.call(this);var e=this,n=[];this.setChildren=function(a){n=a};this.getChildren=function(){return n};this.toJsonObject=function(){var a={};a.children=n;return a};this.fromJsonObject=function(a,f){g(a,f)};var g=function(a,f){e.setName(a.name);e.setDisplayName(a.displayName);e.setCommentInfo(a.commentInfo);if(a=a.children)for(var b=0;b<a.length;b++){var t=
a[b];if(t.parentName||t.fieldNode){var r=new Ka;r.fromJsonObject(t,f);r.setParentNode(e);n.push(r)}else t.tableName?(r=new Wa,r.fromJsonObject(t,f),r.setParentNode(e),n.push(r)):t.type?(r=new fb,r.fromJsonObject(t,f),r.setParentNode(e),n.push(r)):(r=new tb,r.fromJsonObject(t,f),r.setParentNode(e),n.push(r))}};this.protectedMethod={superFromJsonObject:g}}function fb(){vb.call(this);var e=this,n;this.setType=function(a){n=a};this.getType=function(){return n};this.fromJsonObject=function(a,f){g(a,f)};
var g=function(a,f){e.setType(a.type);e.setName(a.name);e.setDisplayName(a.displayName);e.setCommentInfo(a.commentInfo);e.setModelId(a.modelId);f&&(f[e.getName()]=[])};this.protectedMethod={superFromJsonObject:g}}function gb(){tb.call(this);var e=this,n=this.protectedMethod,g;this.getFieldNode=function(){return g};this.fromJsonObject=function(f,b){a(f,b)};var a=function(f,b){n.superFromJsonObject(f,b);if(f=f.fieldNode){var t=e.getName();g=new tb;t&&!b[t]&&(b[t]=[]);g.fromJsonObject(f,b)}};this.protectedMethod=
{tableNodeFromJsonObject:a}}function Wa(){fb.call(this);var e=this,n=this.protectedMethod,g,a;this.getTableName=function(){return g};this.getFullTableName=function(){return a};this.fromJsonObject=function(f,b){g=f.tableName;a=f.fullTableName;n.superFromJsonObject(f);if((f=e.getName())&&b){if(a){b[a]||(b[a]=[]);b[a].push(f);var t=a.substring(a.indexOf(".")+1);b[t]||(b[t]=[]);b[t].push(f)}else b[g]||(b[g]=[]),b[g].push(f);g&&g==a&&(b[f]||(b[f]=[]))}}}function Ka(){gb.call(this);var e=this,n=this.protectedMethod,
g;this.getParentName=function(){return g};this.fromJsonObject=function(a,f){g=a.parentName;n.tableNodeFromJsonObject(a,f);g&&(f[g]||(f[g]=[]),f[g].push(e.getName()))}}function rb(){Ab.call(this);var e=this.protectedMethod,n,g;this.getType=function(){return n};this.getTableName=function(){return g};this.setTableName=function(a){g=a};this.fromJsonObject=function(a){n=a.type;e.fromJsonObject(a)}}function Ga(){var e=-1,n=-1,g;this.getDataSetType=function(){return e};this.setDataSetType=function(a){e=
a};this.getDataSourceType=function(){return n};this.setDataSourceType=function(a){n=a};this.getDataSource=function(){return g};this.setDataSource=function(a){g=a};this.isSameDataSourceModel=function(a){return a?e==a.getDataSetType()&&n==a.getDataSourceType()&&g&&g.getName()==a.getDataSource().getName():!1};this.getDataSourceDisplayName=function(){var a=g.getName(),f=g.getAlias();return e==bb.OQL_DATA_SET?(f&&(a=a+"("+f+")"),a):n==Oa.DATA_CENTER&&f&&0<=f.indexOf("/")?f.split("/")[1]:n==Oa.SUPER_QUERY&&
f?f:a};this.getDataSourceDisplayAlias=function(){var a=g.getName(),f=g.getAlias();if(e==bb.OQL_DATA_SET)return f?A.get("entityNumberComa","\u5b9e\u4f53\u7f16\u7801\uff1a")+a+"\n"+A.get("entityNameComa","\u5b9e\u4f53\u540d\u79f0\uff1a")+f:A.get("nameComa","\u540d\u79f0\uff1a")+a;if(n==Oa.DATA_CENTER&&f&&0<=f.indexOf("/")){var b=f.split("/");f=b[0];b=b[1];return A.get("cloudComa","\u4e91\uff1a")+f+"\n"+A.get("appComa","\u5e94\u7528\uff1a")+b+"\n"+A.get("codeComa","\u7f16\u7801\uff1a")+a}return n==Oa.SUPER_QUERY&&
f?A.get("codeComa","\u7f16\u7801\uff1a")+a+"\n"+A.get("nameComa","\u540d\u79f0\uff1a")+f:A.get("nameComa","\u540d\u79f0\uff1a")+a}}function la(){var e=0,n=[],g,a=!0,f,b;this.setParentNode=function(t){g=t};this.getParentNode=function(){return g};this.setDisPlayName=function(t){b=t};this.getDisPlayName=function(){return b};this.setChildren=function(t){n=t};this.getChildren=function(){return n};this.setShowFolderNode=function(t){f=t};this.getShowFolderNode=function(){return f};this.setIsOpenDir=function(t){a=
t};this.getIsOpenDir=function(){return a};this.setLevel=function(t){e=t};this.getLevel=function(){return e}}function ib(){this.isSystemVar=function(){}}function Ua(){ib.call(this);var e,n,g,a,f,b,t,r,F,B,Z,Xa,aa,G;this.isSystemVar=function(){return!1};this.isUsable=function(){return t==K.MacroStatusEnum.AVAILABLE||t==K.MacroStatusEnum.PROPERTY_ABNORMAL};this.getMacroStatus=function(){return t};this.getEntityFullName=function(){return r};this.setMacroStatus=function(C){t=C};this.getUid=function(){return e};
this.setUid=function(C){e=C};this.getFid=function(){return n};this.setFid=function(C){n=C};this.getName=function(){return g};this.setName=function(C){g=C};this.getCreatorId=function(){return F};this.setCreatorId=function(C){F=C};this.getCreatorName=function(){return B};this.setCreatorName=function(C){B=C};this.getCreateTime=function(){return Z};this.setCreateTime=function(C){Z=C};this.setModifierId=function(C){Xa=C};this.getModifierId=function(){return Xa};this.setModifierName=function(C){aa=C};this.getModifierName=
function(){return aa};this.setModifyTime=function(C){G=C};this.getModifyTime=function(){return G};this.getDesc=function(){return a};this.setDesc=function(C){a=C};this.isMultiValued=function(){return f};this.setMultiValued=function(C){f=C};this.getType=function(){return b};this.setType=function(C){b=C};this.toJsonObject=function(){var C={};C.uid=e;C.fid=n;C.name=g;C.creatorId=F;C.modifierId=Xa;C.desc=a;C.multiValued=f;C.type=b;C.macroStatus=t;C.creatorName=B;C.modifierName=aa;C.createTime=Z&&Z.getTime();
C.modifyTime=G&&G.getTime();return C};this.fromJsonObject=function(C){e=C.uid;n=C.fid;g=C.name;a=C.desc;f=C.multiValued;F=C.creatorId;Xa=C.modifierId;B=C.creatorName;b=C.type;t=C.macroStatus;r=C.entityFullName;Z=new Date(C.createTime);G=new Date(C.modifyTime);aa=C.modifierName};this.getStatusWarning=function(){switch(this.getMacroStatus()){case K.MacroStatusEnum.DB_NOT_EXIST:var C=A.get("macroDeletedTips","\u516c\u5171\u6570\u636e\u6e90\u4e2d\u7684\u6570\u636e\u5e93\u8fde\u63a5\u5df2\u88ab\u5220\u9664\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002");
break;case K.MacroStatusEnum.WITHOUT_DB_PERMISSION:C=A.get("macroNoPermissionTips",'\u516c\u5171\u6570\u636e\u6e90\u4e2d\u7684\u6570\u636e\u5e93\u8fde\u63a5\u5df2\u53d6\u6d88\u6388\u6743\u7ed9\u5b8f\u53d8\u91cf\u7684\u6700\u540e\u4fee\u6539\u4eba"#1"\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002').replace("#1",this.getModifierName());break;case K.MacroStatusEnum.WITHOUT_DB_CENTER_PERMISSION:C=A.get("macroNoDBCenterPermissionTips",'\u5b8f\u53d8\u91cf\u7684\u6700\u540e\u4fee\u6539\u4eba"#1"\u6ca1\u6709\u6570\u636e\u4e2d\u5fc3\u6743\u9650\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002').replace("#1",
this.getModifierName());break;case K.MacroStatusEnum.WITHOUT_SCHEMA_PERMISSION:C=A.get("macroNoSchemaTips",'\u8be5\u53d8\u91cf\u4f7f\u7528\u7684\u8d85\u7ea7\u67e5\u8be2\u6a21\u5f0f\u5df2\u88ab\u5220\u9664\u6216\u53d6\u6d88\u6388\u6743\u7ed9\u6700\u540e\u4fee\u6539\u4eba"#1"\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002').replace("#1",this.getModifierName());break;case K.MacroStatusEnum.ENTITY_NOT_EXIST:C=A.get("macroEntityNotExist",'\u57fa\u7840\u8d44\u6599"#1"\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002').replace("#1",
this.getEntityFullName());break;case K.MacroStatusEnum.MACRO_REJECT:C=A.get("macroReject","\u8be5\u5b8f\u53d8\u91cf\u56e0\u5b58\u5728\u6162\u67e5\u8be2\uff0c\u5df2\u88ab\u4e34\u65f6\u7981\u7528\u3002\u8bf7\u4f18\u5316\u67e5\u8be2\u8bed\u53e5\u540e\uff0c\u63d0\u4ea4\u5de5\u5355\u8054\u7cfb\u8fd0\u7ef4\u56e2\u961f\u5904\u7406\u3002");break;case K.MacroStatusEnum.NOT_AVAILABLE:C=A.get("macroAbnormalTips","\u5f53\u524d\u5b8f\u5b58\u5728\u5f02\u5e38\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002")}return C}}
"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.model&&(com.kingdee.bos.extreport.datasetdesigner.model={});var K=com.kingdee.bos.extreport.datasetdesigner.model,
A,Na,bb={},Oa={},hb={},Va={},Ba={},Ta={},wa={},wb={},Ob={},Mb={},Bb={},Aa={},Hb={},Fb={},ec={},Ha={},cb={};ec.BOOL=1;ec.TEXT=2;ec.NUMBER=3;bb.SQL_DATA_SET=1;bb.OQL_DATA_SET=9;bb.WIZARD_DATA_SET=10;Oa.DATA_CENTER=0;Oa.SUPER_QUERY=1;Oa.USER_SUPER_QUERY=2;Oa.OUT_DB=3;Oa.isSuperQuery=function(e){return e==Oa.SUPER_QUERY||e==Oa.USER_SUPER_QUERY};hb.KSQL=0;hb.SQL=1;Va.BOOLEAN="boolean";Va.BYTE="byte";Va.SHORT="short";Va.INTEGER="integer";Va.LONG="long";Va.DECIMAL="decimal";Va.FLOAT="float";Va.DOUBLE="double";
Va.STRING="string";Va.DATETIME="datetime";Va.CLOB="clob";Va.BLOB="blob";Va.BINARY="binary";Va.NULL="null";Ba.TXT=0;Ba.NUMERICAL=1;Ba.DATE=2;Ba.BOOLEAN=3;Ba.DATETIME=4;Ba.TIME=5;Ba.ALL_DATA_TYPE=[Ba.TXT,Ba.NUMERICAL,Ba.DATE,Ba.DATETIME,Ba.TIME,Ba.BOOLEAN];Ta.INPUT=0;Ta.LIST=1;Ta.DATE=2;Ta.CHECKBOX=3;Ta.F7=4;Ta.SWITCH=6;Ta.SPINNER=7;Ta.LABEL=10;Ta.ALL_CTRL_TYPE=[Ta.INPUT,Ta.LIST,Ta.DATE,Ta.CHECKBOX,Ta.F7,Ta.SWITCH,Ta.SPINNER,Ta.LABEL];wa.STANDER=0;wa.READONLY=1;wa.HIDDEN=2;wa.ALL_STATE_TYPE=[wa.STANDER,
wa.READONLY,wa.HIDDEN];wb.CONSTANT=0;wb.VARIABLE=1;wb.FIRST_DATA=2;wb.SPLIT="0xx1xx";wb.FIRST_DATA_SIGN="#@$firstData$@#";Ob.DATA_SET=0;Ob.SELF=1;Ob.SQL=4;Ob.SYSTEM=6;Ob.MACRO=7;Mb.PERM="PERM";Mb.EXPR="EXPR";Mb.RELATIVE="RELATIVE";Bb.NOT_TREE=-1;Bb.PARENT_CHILD=0;Bb.LONG_NUMBER=1;Bb.ALL_TREE_TYPE=[Bb.NOT_TREE,Bb.LONG_NUMBER,Bb.PARENT_CHILD];Aa.DATA_SOURCE="DATA_SOURCE";Aa.AVAILABLE="AVAILABLE";Aa.OUTPUT_COLUMN="OUTPUT_COLUMN";Aa.PARAM="PARAM";Aa.PARAM_CTRL_DEFAULT_VALUE="PARAM_CTRL_DEFAULT_VALUE";
Aa.PARAM_CTRL_LINKAGE="PARAM_CTRL_LINKAGE";Aa.PARAM_CTRL_BIND_SOURCE="PARAM_CTRL_BIND_SOURCE";Aa.PARAM_CLIENT_ERROR="PARAM_CLIENT_ERROR";Aa.PARAM_NOT_FATAL_ERROR="PARAM_NOT_FATAL_ERROR";Aa.CHECK_EXP_TYPE=[Aa.DATA_SOURCE,Aa.OUTPUT_COLUMN,Aa.PARAM];Aa.SAVE_CHECK_TYPE=[Aa.DATA_SOURCE,Aa.PARAM];Aa.CLIENT_CHECK_TYPE=[Aa.PARAM_CLIENT_ERROR];Hb.DATA_SOURCE_UNDEFINED="1101";Hb.OUTPUT_COLUMNS_NAME_EXP="3302";Hb.LINKAGE_PARAM="$PARAM";Hb.LINKAGE_DS="$DS";Hb.LINKAGE_DS_PARAM="$DS_PARAM";Hb.SOURCE_BIND="$BIND";
Hb.OUTPUT_COLUMN_NAME_DUPLICATED="8077014";Hb.OUTPUT_COLUMN_KSQL_DISABLE_SELECT_ALL="8077015";Hb.OUTPUT_COLUMN_FIELD_CHANGED="8077024";Fb.ACCESS="Access";Fb.SQLITE="SQLite";Fb.HIVE="Apache Hive";Fb.ODPS="ODPS";Fb.REDSHIFT="Amazon Redshift";Fb.APACHEDRILL="Apache Drill";Fb.SPARKSQL="Spark SQL";Fb.IMPALA="Apache Impala";Fb.KYLIN="Apache Kylin";Fb.DORIS="Apache Doris";Fb.HANA="HANA";Ha.SINGLEMACRO=0;Ha.MULTIMACRO=1;Ha.ALLTYPE=2;cb.SYSTEM=1;cb.MACRO=2;K.DataSetType=bb;K.DataSourceType=Oa;K.SqlType=hb;
K.OutputColumDataType=Va;K.ParamDataType=Ba;K.ParamCtrlType=Ta;K.ParamCtrlState=wa;K.ParamDefaultValueType=wb;K.ParamBindSourceType=Ob;K.ParamDefaultDateType=Mb;K.ParamF7TreeType=Bb;K.DataSetModelCheckType=Aa;K.DataSetModelCheckCode=Hb;K.DBType=Fb;K.SwitchCtrlDataType=ec;K.AbstractDataSetModel=ya;K.SQLDataSetModel=Da;K.OQLDataSetModel=Jb;K.WizardDataSetModel=Ib;K.OutputColumn=za;K.Parameter=W;K.AbstractCtrl=Ca;K.LinkageParamPair=U;K.AbstractLinkageCtrl=sb;K.AbstractSource=w;K.DataSetSource=Za;K.SystemVarSource=
zb;K.MacroVarSource=Tb;K.NameAliasPair=Ra;K.DataSourceNameAliasPair=function(){Ra.call(this);var e;this.getDBType=function(){return e};this.setDBType=function(n){e=n}};K.SelfDefineSource=Ja;K.AbstractBindSourceCtrl=fa;K.CheckBoxCtrl=Cb;K.DateCtrl=pb;K.F7Ctrl=Gb;K.InputCtrl=J;K.LabelCtrl=eb;K.ListCtrl=db;K.SpinnerCtrl=Ma;K.SwitchCtrl=ea;K.DataSetModelVO=function(){var e={},n;this.getCheckResult=function(g){return e[g]};this.getDataSetModel=function(){return n};this.fromJsonObject=function(g){var a=
g.checkResult;if(a)for(var f=Object.keys(a),b=0;b<f.length;b++){var t=f[b],r=a[t];if(r){for(var F=[],B=0;B<r.length;B++){var Z=r[B],Xa=new Pa;Xa.fromJsonObject(Z);F.push(Xa)}e[t]=F}}g=g.dataSetModel;a=parseInt(g.dataSetType);a=Sa.createDataSetModel(a);a.fromJsonObject(g,e);n=a}};K.ParameterModelVO=function(){var e={},n=[];this.getCheckResult=function(g){return e[g]};this.getParameters=function(){return n};this.fromJsonObject=function(g){var a=g.checkResult;if(a)for(var f=Object.keys(a),b=0;b<f.length;b++){var t=
f[b],r=a[t];if(r){for(var F=[],B=0;B<r.length;B++){var Z=r[B],Xa=new Pa;Xa.fromJsonObject(Z);F.push(Xa)}e[t]=F}}if(g=g.parameters)for(B=0;B<g.length;B++)a=g[B],f=new W,f.fromJsonObject(a,e),n.push(f)}};K.DataSetModelCheckResult=Pa;K.DataSourceTableObjectVO=function(){var e=this,n,g,a,f,b,t=[],r={};this.getDataSetType=function(){return n};this.getDataSourceType=function(){return g};this.getDataSourceName=function(){return a};this.getDataSourceNameAlias=function(){return f};this.getDataSource=function(){var F=
new Ra;F.setName(a);F.setAlias(f);return F};this.getDataSourceModel=function(){var F=new Ga;F.setDataSetType(n);F.setDataSourceType(g);F.setDataSource(e.getDataSource());return F};this.getTableNode=function(){return b};this.getTables=function(){return t};this.getMapTableFields=function(){return r};this.fromJsonObject=function(F){n=F.dataSetType;g=F.dataSourceType;a=F.dataSourceName;f=F.dataSourceNameAlias;if(F=F.tableNode)b=new tb,b.fromJsonObject(F,r)}};K.FolderNode=tb;K.LeafNode=fb;K.TableNode=
gb;K.EntityNode=Ka;K.FieldNode=Wa;K.EntityPreviewData=function(){var e,n=[],g=[];this.getTableName=function(){return e};this.getFields=function(){return n};this.getData=function(){return g};this.fromJsonObject=function(a){e=a.tableName;var f=a.fields;if(f)for(var b=0;b<f.length;b++){var t=new rb;t.fromJsonObject(f[b]);n[b]=t}g=a.data}};K.DataSourceModel=Ga;K.OutDBVO=function(){var e,n,g,a,f,b;this.getId=function(){return g};this.getSerialNo=function(){return e};this.getName=function(){return n};this.getDbType=
function(){return a};this.getAddress=function(){return f};this.getUserName=function(){return b};this.fromJsonObject=function(t){e=t.serialNo;n=t.name;g=t.id;a=t.dbType;f=t.address;b=t.userName}};K.DataSourceCheckerVO=function(){var e,n,g,a,f=[];this.hasDataCenterPerm=function(){return e};this.hasDBManagePerm=function(){return n};this.hasSuperQuerySchema=function(){return g};this.isSuperQueryNotDeployed=function(){return a};this.getSuperQuerySchemas=function(){return f};this.fromJsonObject=function(b){e=
b.hasDataCenterPerm;n=b.hasDBManagePerm;g=b.hasSuperQuerySchema;a=b.superQueryNotDeployed;b=b.schemas;var t=[],r;for(r in b){var F=new Ra;F.setName(r);F.setAlias(b[r]);t.push(F)}f=t}};K.SystemVar=function(){la.call(this);ib.call(this);var e=this,n,g;this.isSystemVar=function(){return!0};this.setName=function(a){n=a};this.getName=function(){return n};this.setText=function(a){g=a};this.getText=function(){return g};this.fromJsonObject=function(a){e.setName(a._name);e.setText(a._text);e.setLevel(e.getLevel()+
1);e.setDisPlayName(e.getText()+"("+e.getName()+")")}};K.MacroVar=function(){Ua.call(this);la.call(this)};K.Macro=Ua;K.SwitchCheckType={};K.SwitchErrorCode={};K.MacroDialogType=Ha;K.MacroOrSysDialogType=cb;K.DateSettingModel=Ea;(function(){var e=com.kingdee.bos.qing.framework.common;A=e.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);e=com.kingdee.bos.extreport.datasetdesigner.common;Na=e.StringUtil})();K.SplitHelper=new function(){var e=/[\s;\uff1b,\uff0c]|(?:0xx1xx)/g,
n=/[;\uff1b,\uff0c]|(?:0xx1xx)/g;this.split=function(g,a){return g?a==Ba.DATETIME?g.split(n):g.split(e):[]}};var ub,Qa;Ha.macroDialogTypeToName=function(e){ub||(ub={},ub[Ha.SINGLEMACRO]=A.get("singleMacro","\u5355\u503c\u5b8f"),ub[Ha.MULTIMACRO]=A.get("multiMacro","\u591a\u503c\u5b8f"),ub[Ha.ALLTYPE]=A.get("allType","\u5168\u90e8\u7c7b\u578b"));return ub[e]};cb.macroSysDialogTypeToName=function(e){Qa||(Qa={},Qa[cb.MACRO]=A.get("macroVar","\u5b8f\u53d8\u91cf"),Qa[cb.SYSTEM]=A.get("systemVar","\u7cfb\u7edf\u53d8\u91cf"));
return Qa[e]};var R;Fb.isSupportKSQL=function(e){R||(R=[],R.push(Fb.ACCESS),R.push(Fb.SQLITE),R.push(Fb.HIVE),R.push(Fb.ODPS),R.push(Fb.REDSHIFT),R.push(Fb.APACHEDRILL),R.push(Fb.SPARKSQL),R.push(Fb.IMPALA),R.push(Fb.KYLIN),R.push(Fb.DORIS),R.push(Fb.HANA));return-1===R.indexOf(e)};var dc,bc,Vb,Pb,cc,Xb;Ba.dataTypeToIconName=function(e){dc||(dc={},dc[Ba.TXT]="txt",dc[Ba.NUMERICAL]="numerical",dc[Ba.DATE]="date",dc[Ba.BOOLEAN]="boolean",dc[Ba.DATETIME]="dateTime",dc[Ba.TIME]="time");return dc[e]};
Ba.dataTypeToName=function(e){bc||(bc={},bc[Ba.TXT]=A.get("text","\u6587\u672c"),bc[Ba.NUMERICAL]=A.get("decimal","\u6570\u503c"),bc[Ba.DATE]=A.get("date","\u65e5\u671f"),bc[Ba.BOOLEAN]=A.get("bool","\u5e03\u5c14"),bc[Ba.DATETIME]=A.get("dateTime","\u65e5\u671f\u65f6\u95f4"),bc[Ba.TIME]=A.get("time","\u65f6\u95f4"));return bc[e]};Ba.defaultValueCheck=function(e,n){Vb||(Vb={},Vb[Ba.TXT]=/[\s\S]*/,Vb[Ba.NUMERICAL]=/^[-+]?\d+(\.\d+)?$/,Vb[Ba.DATE]=/^(\d){4}-(\d){2}-(\d){2}$/,Vb[Ba.BOOLEAN]=/^\b(?:true|false)\b$/i,
Vb[Ba.TIME]=/^([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/);return e===Ba.DATE?Vb[e].test(n)&&!isNaN(Date.parse(n)):e===Ba.DATETIME?(e=n.split(/\s+/),Ba.defaultValueCheck(Ba.DATE,e[0])&&Ba.defaultValueCheck(Ba.TIME,e[1])):Vb[e].test(n)};Ba.dataTypeToErrorMsg=function(e){Pb||(Pb={},Pb[Ba.TXT]="",Pb[Ba.NUMERICAL]=A.get("numericalTypeTip","xx \u5fc5\u987b\u662f\u6570\u503c\u7c7b\u578b\u3002"),Pb[Ba.DATE]=A.get("dateTypeTip","xx \u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u7c7b\u578b\uff0c\u683c\u5f0f\u5982 2001-03-19\u3002"),
Pb[Ba.BOOLEAN]=A.get("booleanTypeTip","xx \u5fc5\u987b\u662f\u5e03\u5c14\u7c7b\u578b\u3002"),Pb[Ba.DATETIME]=A.get("dateTimeTypeTip","xx \u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u7c7b\u578b\uff0c\u683c\u5f0f\u5982 2001-03-19 13:30:21\u3002"),Pb[Ba.TIME]=A.get("timeTypeTip","xx \u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u7c7b\u578b\uff0c\u683c\u5f0f\u5982 13:30:21\u3002"));return Pb[e]};Ta.ctrlTypeToIconName=function(e){cc||(cc={},cc[Ta.INPUT]="input",cc[Ta.LIST]="list",cc[Ta.DATE]=
"date_ctrl",cc[Ta.CHECKBOX]="checkbox",cc[Ta.F7]="date_f7",cc[Ta.SWITCH]="switch_btn",cc[Ta.SPINNER]="spinner",cc[Ta.LABEL]="label");return cc[e]};var gc;Ta.ctrlTypeToMicroIconName=function(e){gc||(gc={},gc[Ta.INPUT]="micro_input",gc[Ta.LIST]="micro_list",gc[Ta.DATE]="micro_date",gc[Ta.CHECKBOX]="micro_check",gc[Ta.F7]="micro_f7",gc[Ta.SWITCH]="micro_switch",gc[Ta.SPINNER]="micro_spinner",gc[Ta.LABEL]="micro_label");return gc[e]};Ta.ctrlTypeToName=function(e){Xb||(Xb={},Xb[Ta.INPUT]=A.get("inputCtrl",
"\u8f93\u5165\u6846"),Xb[Ta.LIST]=A.get("listCtrl","\u4e0b\u62c9\u5217\u8868"),Xb[Ta.DATE]=A.get("dateCtrl","\u65e5\u671f\u63a7\u4ef6"),Xb[Ta.CHECKBOX]=A.get("checkboxCtrl","\u591a\u9009\u6846\u7ec4"),Xb[Ta.F7]=A.get("f7Ctrl","\u5f39\u7a97\u9009\u62e9\u5668"),Xb[Ta.SWITCH]=A.get("switchCtrl","\u5f00\u5173\u63a7\u4ef6"),Xb[Ta.SPINNER]=A.get("spinnerCtrl","\u6570\u5b57\u5fae\u8c03\u6846"),Xb[Ta.LABEL]=A.get("labelCtrl","\u6807\u7b7e\u63a7\u4ef6"));return Xb[e]};Ta.isBindSourceType=function(e){return Ta.F7==
e||Ta.CHECKBOX==e||Ta.LIST==e};Ta.isLinkageType=function(e){return Ta.isBindSourceType(e)||Ta.DATE==e||Ta.INPUT==e||Ta.SWITCH==e||Ta.SPINNER==e};bb.datesetTypeToName=function(e){if(e==bb.SQL_DATA_SET)return A.get("sqlDataSet","SQL\u6570\u636e\u96c6");if(bb.OQL_DATA_SET)return A.get("oqlDataSet","\u5b9e\u4f53\u67e5\u8be2\u6570\u636e\u96c6")};Ob.sourceTypeToName=function(e){switch(e){case Ob.SQL:case Ob.DATA_SET:return A.get("dataset","\u6570\u636e\u96c6");case Ob.SYSTEM:return A.get("systemVar","\u7cfb\u7edf\u53d8\u91cf");
case Ob.MACRO:return A.get("macroVar","\u5b8f");case Ob.SELF:return A.get("custom","\u81ea\u5b9a\u4e49")}};Ob.isSupportTreeType=function(e){switch(e){case Ob.SQL:case Ob.DATA_SET:case Ob.MACRO:return!0;case Ob.SYSTEM:case Ob.SELF:return!1}};wb.sourceTypeToName=function(e){switch(e){case wb.CONSTANT:return A.get("constant","\u5e38\u91cf");case wb.FIRST_DATA:return A.get("firstData","\u7b2c\u4e00\u6761\u6570\u636e");case wb.VARIABLE:return A.get("variant","\u53d8\u91cf")}};Va.dataTypeToName=function(e){switch(e){case Va.BOOLEAN:return A.get("bool",
"\u5e03\u5c14");case Va.BYTE:return A.get("byte","\u5b57\u8282");case Va.SHORT:return A.get("short","\u77ed\u6574\u578b");case Va.INTEGER:return A.get("integer","\u6574\u578b");case Va.LONG:return A.get("long","\u957f\u6574\u578b");case Va.DECIMAL:return A.get("decimal","\u6570\u503c");case Va.FLOAT:return A.get("float","\u5355\u7cbe\u5ea6\u6d6e\u70b9\u6570");case Va.DOUBLE:return A.get("double","\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570");case Va.STRING:return A.get("string","\u5b57\u7b26\u4e32");case Va.DATETIME:return A.get("datetime",
"\u65e5\u671f\u65f6\u95f4");case Va.CLOB:return A.get("clob","\u5b57\u7b26\u5927\u5bf9\u8c61");case Va.BLOB:return A.get("blob","\u4e8c\u8fdb\u5236\u5927\u5bf9\u8c61");case Va.BINARY:return A.get("binary","\u4e8c\u8fdb\u5236");case Va.NULL:return A.get("null","\u7a7a")}return null};var oa;wb.defaultTypeToName=function(e){oa||(oa={},oa[wb.CONSTANT]=A.get("constant","\u5e38\u91cf"),oa[wb.VARIABLE]=A.get("variant","\u53d8\u91cf"),oa[wb.FIRST_DATA]=A.get("firstData","\u7b2c\u4e00\u6761\u6570\u636e"));
return oa[e]};hb=new function(){var e=/^(?![0-9]+$)[a-zA-Z0-9_]+$/;this.check=function(n){return n&&0!==n.length?e.test(n):!1}};K.ParamNameChecker=hb;var nb=new function(){this.removeLinkage=function(e){for(var n=e.getModel().getParameters(),g=0;g<n.length;g++){var a=n[g].getCtrlObject();if(a.getLinkageParams&&0<a.getLinkageParams().length)for(var f=a.getLinkageParams(),b=0;b<f.length;b++)f[b].getLinkageParamObject()===e&&(f.splice(b,1),a.getException(Aa.PARAM_CTRL_LINKAGE)&&a.clearException(Aa.PARAM_CTRL_LINKAGE),
b--)}}};K.LinkageRemover=nb;hb=new function(){this.moveSelectedUp=function(n,g){var a=Object.keys(g);if(a.length!=n.length){var f=Number(a[0]);0<f&&f--;for(var b=[],t=0;t<n.length;t++)if(t<f)b.push(t);else{for(var r=0;r<a.length;r++)b.push(Number(a[r]));for(;t<n.length;)g[t]||b.push(t),t++}e(n,b);n={};for(t=0;t<a.length;t++)b=Number(a[t]),n[f]=g[b],delete g[b],f++;a=Object.keys(n);for(t=0;t<a.length;t++)f=a[t],g[f]=n[f]}};this.moveSelectedDown=function(n,g){var a=Object.keys(g);if(a.length!=n.length){var f=
Number(a[a.length-1]);f<n.length-1&&f++;for(var b=[],t=n.length-1;0<=t;t--)if(t>f)b.unshift(t);else{for(var r=a.length-1;0<=r;r--)b.unshift(Number(a[r]));for(;0<=t;)g[t]||b.unshift(t),t--}e(n,b);n={};for(t=a.length-1;0<=t;t--)b=Number(a[t]),n[f]=g[b],delete g[b],f--;a=Object.keys(n);for(t=0;t<a.length;t++)f=a[t],g[f]=n[f]}};var e=function(n,g){for(var a=[],f=0;f<g.length;f++)a.push(n[g[f]]);for(f=n.length=0;f<a.length;f++)n.push(a[f])}};K.ParamListUtils=hb;var Ub=new function(){this.createBindSource=
function(e,n){switch(parseInt(e)){case Ob.DATA_SET:case Ob.SQL:return new Za(n);case Ob.SELF:return new Ja(n);case Ob.SYSTEM:return new zb(n);case Ob.MACRO:return new Tb(n)}}};K.BindSourceFactory=Ub;var Ya=new function(){var e;this.createCtrl=function(n,g){e||(e={},e[Ta.INPUT]=J,e[Ta.LIST]=db,e[Ta.DATE]=pb,e[Ta.CHECKBOX]=Cb,e[Ta.F7]=Gb,e[Ta.SWITCH]=ea,e[Ta.SPINNER]=Ma,e[Ta.LABEL]=eb);return new e[n](g,n)}};K.CtrlFactory=Ya;hb=new function(){this.createDefault=function(e){e=new W(e);e.setCtrlType(Ta.INPUT);
e.setDataType(Ba.TXT);e.setIsIgnoreNull(!1);var n=Ya.createCtrl(Ta.INPUT,e);n.setIsRequired(!1);n.setCtrlState(wa.STANDER);n.setDefaultValueType(wb.CONSTANT);e.setCtrlObject(n);return e}};K.ParameterFactory=hb;var ca=new function(){var e=this;this.removeMark=function(g){return Na.isNotEmptyStr(g)?g.trim().replace(/--.*$/gm,"").replace(/\s#.*$/gm,"").replace(/\/\/.*/,"").replace(/\/\*[\s\S]*\*\//,"").trim():g};this.parseTable=function(g){if(g){var a=e.removeMark(g);g=[];var f=n(a,"from");f&&g.push(f);
(a=n(a,"join"))&&g.push(a);return g}return[]};var n=function(g,a){var f=/\bfrom\b/gi;"join"==a.toLowerCase()&&(f=/\bjoin\b/gi);f=f.exec(g);f=null!=f?f.index:-1;if(-1==f)return null;g=g.substring(f+a.length).trim();a=g.indexOf(" ");f=g.indexOf("\n");var b=g.indexOf("\r"),t=g.indexOf(";");if(-1==a&&-1==f&&-1==b&&-1==t)return g.split(",")[0];var r=g.length;-1!=a&&(r=a);-1!=f&&f<r&&(r=f);-1!=b&&b<r&&(r=b);-1!=t&&t<r&&(r=t);return g.substring(0,r).split(",")[0]}};K.SqlContentParser=ca;var Sa=new function(){var e=
{};this.addDataSetModel=function(n,g){e[n]=g};this.createDataSetModel=function(n){return new e[n]}};K.DataSetModelFactory=Sa;Sa.addDataSetModel(bb.SQL_DATA_SET,Da);Sa.addDataSetModel(bb.OQL_DATA_SET,Jb);Sa.addDataSetModel(bb.WIZARD_DATA_SET,Ib);K.MacroStatusEnum={AVAILABLE:"AVAILABLE",NOT_EXIST:"NOT_EXIST",NOT_AVAILABLE:"NOT_AVAILABLE",DB_NOT_EXIST:"DB_NOT_EXIST",ENTITY_NOT_EXIST:"ENTITY_NOT_EXIST",WITHOUT_DB_PERMISSION:"WITHOUT_DB_PERMISSION",WITHOUT_ENTITY_PERMISSION:"WITHOUT_ENTITY_PERMISSION",
WITHOUT_DB_CENTER_PERMISSION:"WITHOUT_DB_CENTER_PERMISSION",WITHOUT_SCHEMA_PERMISSION:"WITHOUT_SCHEMA_PERMISSION",PROPERTY_ABNORMAL:"PROPERTY_ABNORMAL",MACRO_REJECT:"MACRO_REJECT"}})();(function(){function ha(h,d){var l=this,m,p,q;this.getJqUi=function(){if(!m){m=$("<div>");m.addClass("extreport-dataset-designer-param-detail-area");var X=m,ua=$("<div>");ua.css({position:"relative",width:"100%"});var ia=c(ua);ua.css("height",ia);X.append(ua);l.protectedInit(m)}return m};this.protectedInit=function(X){throw Error("Override me");};this.refreshUi=function(){if(p){var X=h.getCtrlObject();p.setChecked(X.getIsRequired())}q.setItemModels(D(h.getDataType()));l.protectedRefreshUi(h)};this.protectedRefreshUi=
function(X){};this.getCtrlGap=function(){return 10};this.getCtrlHeight=function(){return 30};this.getParameter=function(){return h};this.funRefreshAreaByRequirdChanged=function(){};var c=function(X){var ua=l.getCtrlHeight(),ia=l.getCtrlGap(),z=0,v=R.get("basicSetting","\u57fa\u7840\u8bbe\u7f6e"),y=R.get("type","\u7c7b\u578b"),x=R.get("status","\u72b6\u6001"),Q=R.get("require","\u5fc5\u586b"),E=R.get("explain","\u8bf4\u660e");v=l.createTitle(v,z);z+=ia+ua;var k=h.getCtrlObject(),I=new Pb;I.setText(y);
q=new cc;y=h.getDataType();q.setSelected(h.getCtrlType());q.setItemModels(D(y));q.setCustomPainter(function(pa,qa,La){pa=$("<div>");pa.text(Ua.ctrlTypeToName(La));qa.append(pa)});q.addSelectedChangedListener(H);y=I.getJqUi();I=q.getJqUi();l.decorateRow(y,I,z);z+=ia+ua;var ba=new Pb;ba.setText(x);var da=new cc;da.setSelected(k.getCtrlState()?k.getCtrlState():K.STANDER);da.setItemModels(K.ALL_STATE_TYPE);da.setCustomPainter(function(pa,qa,La){pa=$("<div>");La=La==K.STANDER?R.get("standard","\u6807\u51c6"):
La==K.READONLY?R.get("readOnly","\u53ea\u8bfb"):R.get("hide","\u9690\u85cf");pa.text(La);qa.append(pa)});da.addSelectedChangedListener(function(pa,qa,La){qa!==La&&k.setCtrlState(La)});x=ba.getJqUi();ba=da.getJqUi();l.decorateRow(x,ba,z);z+=ia+ua;if(h.getCtrlType()!==Ua.LABEL){var V=new Pb;V.setText(Q);p=new Xb;p.setChecked(k.getIsRequired());V=V.getJqUi();var T=p.getJqUi();p.addCheckedListener(function(pa,qa){qa&&k.setIsRequired(pa.isChecked())});l.decorateRow(V,T,z);T.css("top",z+5);T.css("width",
20);z+=ia+ua;var S=new Pb;S.setText(E);var ma=new gc;ma.setTipsText(R.get("ctrlDesc","\u63a7\u4ef6\u7684\u8865\u5145\u8bf4\u660e\uff0c\u62a5\u8868\u67e5\u770b\u4eba\u5458\u53ef\u4ee5\u5728\u9884\u89c8\u62a5\u8868\u65f6\u67e5\u770b"));Q=new oa;var na=Q.getJqUi();Q.setText(k.getDescription());Q.addBlurListener(function(pa){k.setDescription(pa.getText());na.attr("title",pa.getText())});Q.addAcceptableListener(function(pa,qa){qa&&(k.setDescription(pa.getText()),na.attr("title",pa.getText()))});ma=ma.getJqUi();
S=S.getJqUi();na.attr("title",k.getDescription());na.children().css({overflow:"hidden","text-overflow":"ellipsis"});l.decorateRow(S,na,z);Q=new F;Q.setFontSize(12);E=Q.measureWidth(E);b.layoutCtrl(ma,E+10,z+8);z+=ia+ua}X.append(v);X.append(y);X.append(I);X.append(x);X.append(ba);X.append(V);X.append(T);X.append(S);X.append(ma);X.append(na);X.css("height",z);return z},D=function(X){return X==A.NUMERICAL?[Ua.INPUT,Ua.LIST,Ua.CHECKBOX,Ua.F7,Ua.SWITCH,Ua.LABEL,Ua.SPINNER]:X==A.TXT||X==A.BOOLEAN?[Ua.INPUT,
Ua.LIST,Ua.CHECKBOX,Ua.F7,Ua.SWITCH,Ua.LABEL]:[Ua.INPUT,Ua.LIST,Ua.CHECKBOX,Ua.F7,Ua.DATE,Ua.LABEL]},H=function(X,ua,ia){if(ua!==ia)if(h.getCtrlObject().isConvertibleToOther())L(ia);else{var z=nb.createFeedbackDialog();z.setOptionType(nb.OPTION_OK_CANCEL);z.setMessage(R.get("ctrlChangeDesc","\u6539\u53d8\u63a7\u4ef6\u7c7b\u578b\uff0c\u5c06\u4f1a\u6e05\u7a7a\u539f\u63a7\u4ef6\u7c7b\u578b\u7684\u6240\u6709\u5c5e\u6027\uff0c\u786e\u5b9a\u8981\u6539\u53d8\u5417\uff1f"));z.setClosingChecker(function(v){v==
nb.RETURN_OK&&L(ia);return!0});z.showDialog();X.setSelected(ua)}},L=function(X){h.clearException(wa.PARAM_CLIENT_ERROR);h.clearException(wa.PARAM);h.setCtrlType(X);var ua=h.getDataType();ua=X==Ua.DATE&&ua!=A.DATE&&ua!=A.DATETIME&&ua!=A.TIME?A.DATE:X==Ua.SPINNER?A.NUMERICAL:null;null!==ua&&h.setDataType(ua);X=Na.createCtrl(X,h);X.setIsRequired(!1);X.setCtrlState(K.STANDER);X.setDefaultValueType(Va.CONSTANT);X.setBindSourceType&&X.setBindSourceType(Ba.DATA_SET);h.setCtrlObject(X);ob.removeRender(h);
Ha.removeLinkage(h);d();X.setBindSourceType&&h.addException(wa.PARAM_CLIENT_ERROR,h.getName(),R.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002"));h.check()};this.decorateRow=function(X,ua,ia){X&&(b.layoutCtrl(X,10,ia),X.addClass("extreport-dataset-designer-param-ctrl-prop-detail-name"));ua&&(b.layoutCtrl(ua,110,ia),ua.addClass("extreport-dataset-designer-param-ctrl-prop-detail-value"))};this.createTitle=function(X,ua){return Ca(X,ua)}}
function xa(h,d,l){var m,p,q;this.createAdvancedArea=function(c){q?q.empty():q=$("<div>");q.css({position:"relative",width:"100%",height:"30px"});var D=Ca(R.get("advancedSetting","\u9ad8\u7ea7\u8bbe\u7f6e"),0);m=new U(h,d,l);p=m.getJqUi();p.css("top","40px");q.append(D);q.append(p);c&&c.append(q)};this.refreshLinkageUi=function(){m&&m.refreshUi()};this.getLinkageCtrl=function(){return m};this.getJqLinkage=function(){return p}}function Ca(h,d){var l=$("<div>");l.text(h);l.addClass("extreport-dataset-designer-param-ctrl-prop-title");
l.css("top",d);return l}function U(h,d,l){function m(ua,ia){Ya.call(this);var z=this,v=this.protectedMethod,y,x,Q=ia.getModel().getParameters(),E=ia.getCtrlObject(),k={},I,ba=[],da={},V=[];(function(){v.setTitle(R.get("act","\u4f5c\u7528\u4e8e"));z.setSize(600,500);v.setContentPaneCreator(function(){y||(y=$("<div>"),y.addClass("extreport-dataset-designer-linkage-to-index"),T(y));return y});v.setClosingChecker(function(){for(var $a=0;$a<V.length;++$a){var Eb=V[$a];if(!Eb.getRelatedDSParamName()){if(Eb.getLinkageParamName())return v.getMessageCurtain().showPrompt(R.get("selectParam",
"\u8bf7\u9009\u62e9\u4e00\u4e2a\u53c2\u6570")),!1;V.splice($a,1);$a--}}Eb=Object.values(k);for($a=0;$a<Eb.length;$a++)for(var Qb=Eb[$a],Yb=0;Yb<Qb.length;Yb++){var fc=Qb[Yb];if("none"!=fc.css("display")){var jc=fc.attr("title");break}}if(jc)return v.getMessageCurtain().showPrompt(jc),!1;E.clearException(wa.PARAM_CTRL_LINKAGE);E.setLinkageParams(V);return!0},!1);v.setClosingAction(function(){x()});v.setFooterClosingOnly(!1)})();this.setFunCloseCallBack=function($a){x=$a};var T=function($a){I=$("<div>");
var Eb=new gc;Eb.setTipsText(R.get("ctrlParamTips","\u63a7\u4ef6\uff1a\u53c2\u6570\u5217\u8868\u4e2d\u53c2\u6570\u6240\u8bbe\u7f6e\u7684\u63a7\u4ef6\n\u53c2\u6570\uff1a\u63a7\u4ef6\u7684\u5907\u9009\u503c\u6765\u6e90\u4e8e\u6570\u636e\u96c6\u65f6\uff0c\u6570\u636e\u96c6\u6240\u5305\u542b\u7684\u53c2\u6570"));Eb=Eb.getJqUi();var Qb=$("<div>"),Yb=R.get("addTargetCtrl","\u6dfb\u52a0\u76ee\u6807\u63a7\u4ef6"),fc=new F;fc.setFontSize(12);fc=fc.measureWidth(Yb);Qb.addClass("extreport-dataset-designer-linkage-to-ctrl-add-btn");
Qb.text(Yb);Qb.on("click",function(){var jc=new Oa;V.push(jc);qa(jc);S();jc=120*(V.length-1);$($a).scrollTop(jc)});Qb.css("width",fc+15);I.append(Eb);I.append(Qb);$a.append(I);b.layoutCtrl(Eb,fc+15,2);b.layoutCtrl(I,0,0,fc+30,20);ma()},S=function(){I.css({top:120*V.length+8})},ma=function(){for(var $a=[],Eb=[],Qb=0;Qb<Q.length;++Qb){var Yb=Q[Qb],fc=Yb.getCtrlObject();Yb!==ia&&Yb.isLinkableParam()&&!fc.getException(wa.PARAM_CTRL_BIND_SOURCE)&&(fc=fc.getBindSource(),$a.push(fc.toJsonObject()),Eb.push(Yb))}0<
$a.length?na($a,Eb):pa()},na=function($a,Eb){var Qb=ua.createParamCtrlFacade(function(Yb){if(Yb&&0<Yb.length){for(var fc={},jc=0;jc<Yb.length;jc++){for(var lc=Yb[jc],qc=[],mc=lc.parameters,ka=0;mc&&ka<mc.length;ka++){var sa=new Ta;sa.fromJsonObject(mc[ka]);qc.push(sa)}fc[lc.datasetId]=qc}for(jc=0;jc<Eb.length;jc++)sa=Eb[jc],Yb=sa.getCtrlObject().getBindSource().getId(),(lc=fc[Yb])&&0<lc.length&&ba.push(sa),da[Yb]=fc[Yb]}pa()},function(){pa()});Qb.setBlockingJqUi(y);Qb.queryBatchLinkageVO($a)},pa=
function(){var $a=E.getLinkageParams();if($a)for(var Eb=0;Eb<$a.length;++Eb){var Qb=$a[Eb],Yb=new Oa;Yb.setLinkageParamObject(Qb.getLinkageParamObject());Yb.setLinkageParamName(Qb.getLinkageParamName());Yb.setRelatedDSParamName(Qb.getRelatedDSParamName());V.push(Yb);qa(Yb)}S()},qa=function($a){var Eb=$("<div>");Eb.addClass("extreport-dataset-designer-linkage-to-ctrl-row");var Qb=new Pb;Qb.setText(R.get("targetCtrl","\u76ee\u6807\u63a7\u4ef6"));var Yb=new Pb;Yb.setText(R.get("targetParam","\u76ee\u6807\u53c2\u6570"));
var fc=Qb.getJqUi();fc.addClass("extreport-dataset-designer-linkage-to-ctrl-label");var jc=Yb.getJqUi();jc.addClass("extreport-dataset-designer-linkage-to-ctrl-label");var lc=new cc,qc=new cc,mc=P.getErrorIcon(""),ka=P.getErrorIcon("");mc.hide();ka.hide();lc.setUserObject(mc);qc.setUserObject(ka);La($a,lc,qc,Qb,Yb);var sa=$a.getLinkageParamName()+"^"+$a.getRelatedDSParamName();k[sa]=[mc,ka];Qb=lc.getJqUi();Qb.addClass("extreport-dataset-designer-linkage-to-ctrl-combobox");qc=qc.getJqUi();qc.addClass("extreport-dataset-designer-linkage-to-ctrl-combobox");
Yb=$("<div>");Yb.text("\u00d7");Yb.attr("title",R.get("clean","\u6e05\u9664"));Yb.addClass("extreport-dataset-designer-linkage-to-ctrl-close");Yb.on("click",function(){var lb=V.indexOf($a);V.splice(lb,1);delete k[sa];Eb.remove();S()});b.layoutCtrl(fc,10,17,null,null);b.layoutCtrl(mc,93,27,null,null);b.layoutCtrl(Qb,null,15,null,null);b.layoutCtrl(jc,10,68,null,null);b.layoutCtrl(ka,93,78,null,null);b.layoutCtrl(qc,null,65,null,null);Eb.append(fc);Eb.append(mc);Eb.append(Qb);Eb.append(jc);Eb.append(ka);
Eb.append(qc);Eb.append(Yb);y.append(Eb)},La=function($a,Eb,Qb,Yb,fc){var jc=Yb=null,lc=[];if($a.getLinkageParamName())if(E.getException(wa.PARAM_CTRL_LINKAGE,xb($a)))Ia(Eb,R.get("cantfindParamCtrlName","\u627e\u4e0d\u5230\u539f\u63a7\u4ef6\u201cxx\u201d\u7684\u53c2\u6570\u540d\u79f0\u548c\u63a7\u4ef6\u540d\u79f0\u3002").replace("xx",$a.getLinkageParamName())),Db(fc,Qb);else if(Yb=$a.getLinkageParamObject(),lc=da[$a.getLinkageParamObject().getCtrlObject().getBindSource().getId()],E.getException(wa.PARAM_CTRL_LINKAGE,
Nb($a)))Ia(Eb,E.getException(wa.PARAM_CTRL_LINKAGE,Nb($a))),Db(fc,Qb);else if(-1===ba.indexOf(Yb)&&!lc)Ia(Eb,R.get("ctrlError","\u63a7\u4ef6\u201cxx\u201d\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u8be5\u63a7\u4ef6\u7684\u6570\u636e\u6e90\u3002").replace("xx",$a.getLinkageParamName())),Db(fc,Qb);else if(lc&&0===lc.length)Ia(Eb,R.get("noParmInSource","\u63a7\u4ef6\u201cxx\u201d\u672a\u8bbe\u7f6e\u53c2\u6570\u3002").replace("xx",$a.getLinkageParamName())),Db(fc,Qb);else if(E.getException(wa.PARAM_CTRL_LINKAGE,
ja($a))||!Rb(lc,$a.getRelatedDSParamName()))Ia(Qb,R.get("noFindParam","\u53c2\u6570\u201cxx\u201d\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664").replace("xx",$a.getRelatedDSParamName()));else if(lc)for(var qc=0;qc<lc.length;qc++)if($a.getRelatedDSParamName()===lc[qc].getName()){jc=lc[qc];break}Yb?Eb.setSelected(Yb):(fc.setEnabled(!1),Qb.setEnabled(!1),Eb.setSelected($a.getLinkageParamName()));jc?Qb.setSelected(jc):Qb.setSelected($a.getRelatedDSParamName());Eb.setItemModels(ba);Eb.setCustomPainter(function(mc,
ka,sa){if(sa){mc=$("<div>");var lb=$("<div>");lb.addClass("extreport-dataset-designer-linkage-to-ctrl-icon");C.background(lb,Ua.ctrlTypeToMicroIconName(sa.getCtrlType()));ka.append(lb);"string"===typeof sa?mc.text(sa):mc.text(sa.getPatternText());b.layoutCtrl(mc,30,null,null,null);ka.append(mc)}});Eb.addSelectedChangedListener(function(mc,ka,sa){ka!==sa&&(mc=da[sa.getCtrlObject().getBindSource().getId()],0===mc.length?(fc.setEnabled(!1),Qb.setEnabled(!1),Ia(Eb,R.get("ctrlNoSetParam","\u63a7\u4ef6\u201cxx\u201d\u672a\u8bbe\u7f6e\u53c2\u6570\u3002"))):
($a.setLinkageParamObject(sa),$a.setRelatedDSParamName(""),Qb.setSelected(""),ab(Eb),ab(Qb),fc.setEnabled(!0),Qb.setEnabled(!0)),Qb.setItemModels(mc))});lc&&Qb.setItemModels(lc);Qb.setCustomPainter(function(mc,ka,sa){if(sa)if("string"===typeof sa)ka.text(sa);else{mc=$("<div>");var lb=$("<div>");lb.addClass("extreport-dataset-designer-linkage-to-param-icon");var yb=sa.getDataType();yb=A.dataTypeToIconName(yb);Fa.background(lb,yb);ka.append(lb);mc.text(sa.getPatternText());b.layoutCtrl(mc,30,null,null,
null);ka.append(mc)}});Qb.addSelectedChangedListener(function(mc,ka,sa){if(ka!=sa){mc=$a.getLinkageParamName()+"^"+sa.getName();for(var lb={},yb=0;yb<Q.length;yb++){var Sb=Q[yb];if(Sb!=ia){var Wb=Sb.getCtrlObject();if(Wb.getLinkageParams){Wb=Wb.getLinkageParams();for(var Zb=0;Zb<Wb.length;Zb++){var $b=Wb[Zb];$b=$b.getLinkageParamName()+"^"+$b.getRelatedDSParamName();lb[$b]=Sb.getPatternText()}}}}for(yb=0;yb<V.length;yb++)Sb=V[yb],Sb.getLinkageParamName()&&Sb.getRelatedDSParamName()&&($b=Sb.getLinkageParamName()+
"^"+Sb.getRelatedDSParamName(),lb[$b]=ia.getPatternText());lb[mc]?(Qb.setSelected(ka),ka=R.get("actAlreadyExist","\u76ee\u6807\u53c2\u6570\u201c#1\u201d\u5df2\u5b58\u5728\u201c#2\u201d\u63a7\u4ef6\u7684\u4f5c\u7528\u4e8e\u5173\u7cfb\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002").replace("#1",sa.getName()).replace("#2",lb[mc]),v.getMessageCurtain().showPrompt(ka)):(ab(Qb),$a.setRelatedDSParamName(sa.getName()))}})},xb=function($a){return ia.getName()+"$"+$a.getLinkageParamName()+cb.LINKAGE_PARAM},Nb=
function($a){return ia.getName()+"$"+$a.getLinkageParamName()+cb.LINKAGE_DS},ja=function($a){return ia.getName()+"$"+$a.getLinkageParamName()+cb.LINKAGE_DS_PARAM},Ia=function($a,Eb){$a=$a.getUserObject();$a.attr("title",Eb);$a.show()},ab=function($a){$a=$a.getUserObject();$a.attr("title","");$a.hide()},Db=function($a,Eb){$a.setEnabled(!1);Eb.setEnabled(!1);ab(Eb)},Rb=function($a,Eb){for(var Qb,Yb=0;$a&&Yb<$a.length;Yb++)if(Eb===$a[Yb].getName()){Qb=$a[Yb];break}return Qb}}var p,q,c,D,H=d.getCtrlObject();
this.getJqUi=function(){p||(p=$("<div>"),L());return p};var L=function(){var ua=new Pb;ua.setText(R.get("act","\u4f5c\u7528\u4e8e"));ua=ua.getJqUi();ua.addClass("extreport-dataset-designer-param-ctrl-prop-detail-name");var ia=new gc;ia.setTipsText(R.get("actTips","\u8bbe\u7f6e\u5b8c\u6210\u7684\u201c\u4f5c\u7528\u4e8e\u201d\u5173\u7cfb\u53ef\u4ee5\u5728\u201c\u63a7\u4ef6\u8054\u52a8\u89c6\u56fe\u201d\u4e2d\u67e5\u770b"));D=ia.getJqUi();c=P.getErrorIcon(R.get("actConfigError","\u201c\u4f5c\u7528\u4e8e\u201d\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef"));
H.getException(wa.PARAM_CTRL_LINKAGE)||c.hide();q=new ca;q.setClearable(!0);q.setCustomPainter(function(z){return z?R.get("haveSet","\u5df2\u8bbe\u7f6e"):""});q.addActionListener(X);q.addClearListener(function(){c.hide();H.setLinkageParams([]);H.clearException(wa.PARAM_CTRL_LINKAGE);l();q.setModel(null)});ia=q.getJqUi();ia.addClass("extreport-dataset-designer-param-ctrl-prop-detail-value");0<H.getLinkageParams().length?q.setModel(!0):q.setModel(null);b.layoutCtrl(ua,10,1);b.layoutCtrl(c,90,16);b.layoutCtrl(D,
51,8);b.layoutCtrl(ia,110,0);p.append(ua);p.append(c);p.append(D);p.append(ia);p.css({width:"100%",height:"50px",position:"relative"})},X=function(){var ua=new m(h,d);ua.setFunCloseCallBack(function(){0<H.getLinkageParams().length?q.setModel(!0):q.setModel(!1);H.getException(wa.PARAM_CTRL_LINKAGE)?c.show():c.hide();l()});ua.showDialog()};this.refreshUi=function(){if(H.getLinkageParams()&&0<H.getLinkageParams().length){if(q.setModel(d),H.getException(wa.PARAM_CTRL_LINKAGE)){this.showErrorMsg();return}}else q.setModel(null);
this.hideErrorMsg()};this.showErrorMsg=function(){c.show();D.hide()};this.hideErrorMsg=function(){c.hide();D.show()}}function sb(){function h(y){KTDefaultCellRender.call(this,y);var x=this,Q=this.paintCellUI;this.paintCellUI=function(E,k){var I=x.getCurrentRowIdx(),ba=x.getCurrentRow(),da=x.getCurrentColIdx(),V=ba.getUserObject();I<r.getHeadRowCount()?Q(E,k):0==da?(E=$(E),k=new Ub,k.setChecked(V.getFid()==p?!0:!1),k.setUserObject(V),V=k.getJqUi(),V.addClass("extreport-dataset-designer-import-param-radio-btn"),
E.data("radio",k),E.addClass("import-dataset-table-radio-column"),E.append(V)):D&&D(I,ba,da,V,E)}}function d(){G.call(this);this.protectedMethod.setTotalSelectedRowAndSelectedAllVisual(!1,!1)}var l,m,p="",q,c,D,H=[],L,X,ua=[];this.getJqUi=function(){l||(l=$("<div>"),ia(l));return l};this.createHead=function(y,x){q=y;c=x};var ia=function(y){X=new d;X.setJumpToPageListener(function(Q,E,k){for(var I in H)(0,ua[I])(Q,E,k)});X.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);var x=X.getJqUi();
x.css({padding:"0px 0px",height:"30px"});y.append(x)};this.getPagination=function(){return X};this.setPageChangeListener=function(y){ua.push(y)};this.setSelectedId=function(y){p=y};this.getSelectedId=function(){return p};var z=function(y){m=r.createTable();m.setColumnFitVisibleWidth(!0);m.setSyncUIWhenModelChanged(!1);m.setDraggableAdjusting(!0,3,0,new ib);r.setupSingleRowSelection(m);m.getSelectionModel().addChangeListener(function(Q,E){if(E=E[0]){var k=E.getRowIdx();E=m.getRow(k).getUserObject();
var I=m.searchJqCell(k,0).data("radio");if(I)if(Q==KTSelectionModel.CHANGE_ADD)for(I.setChecked(!0),p=E.getFid(),L=k,Q=0;Q<H.length;Q++)(0,H[Q])(E);else Q==KTSelectionModel.CHANGE_REMOVE&&I.setChecked(!1)}});var x=new h(m);x.setOutsideVisible(!1);m.setCellRender(x);v();x=$(m.getUI());x.addClass("import-dataset-table");y.append(x)},v=function(){m.setSyncUIWhenModelChanged(!1);var y=q&&q.length;m.addColumns(y);for(var x=r.createHeadRow(m),Q=0;Q<y;Q++)m.getColumn(Q).setWidth(c[Q]),x.getCell(Q).setValue(q[Q]);
m.setSyncUIWhenModelChanged(!0)};this.refreshTable=function(){r.refresh(m);if(L){var y=KTSelectionModel.Target.createRow(L);m.getSelectionModel().addSelected(y)}};this.updateTable=function(y){m||z(l);m.getSelectionModel().removeAllSelecteds();r.clear(m);v();if(0===y.length)L=null,r.refresh(m);else{m.setSyncUIWhenModelChanged(!1);var x=-1,Q=new KTBorderStyle;Q.setBottomBorderWidth(1);Q.setBottomBorderPen("solid");Q.setBottomBorderColor("#e5e5e5");for(var E=0;E<y.length;++E){var k=y[E];k.getFid()==
p&&(x=E);var I=r.createRow(m,!1);I.setHeight(35);I.setBorder(Q);I.setUserObject(k)}m.setSyncUIWhenModelChanged(!0);r.refresh(m);-1!=x&&(L=r.getHeadRowCount()+x,y=KTSelectionModel.Target.createRow(L),m.getSelectionModel().addSelected(y),m.scrollCellVisible(L,0,!0))}};this.setFuncCreateTableCell=function(y){D=y};this.addSingleClickListener=function(y){H.push(y)}}function w(){this.protectInit=function(){};this.getResult=function(){};this.repaint=function(h){};this.refreshUi=function(){}}function Za(){var h,
d,l,m,p,q;this.getGroupId=function(){return p};this.setGroupId=function(c){p=c};this.getGroupPath=function(){return q};this.setGroupPath=function(c){q=c};this.getFid=function(){return h};this.getType=function(){return d};this.getName=function(){return l};this.getCreatorId=function(){return m};this.fromJsonObject=function(c){h=c.dataSetID;d=parseInt(c.type);l=c.dataSetName;m=c.creatorId}}function zb(){var h=this,d,l=!1,m=0,p=[],q=!0,c,D,H;this.getParentNode=function(){return c};this.setParentNode=
function(L){c=L};this.getShowNode=function(){return this.getParentNode()?q&&this.getParentNode().getIsOpen():q};this.setShowNode=function(L){q=L};this.getIsOpen=function(){return l};this.setIsOpen=function(L){l=L};this.setLevel=function(L){m=L};this.getLevel=function(){return m};this.getChildren=function(){return p};this.addChild=function(L){p.push(L)};this.getIsPreset=function(){return d};this.getGroupName=function(){return H};this.getGroupID=function(){return D};this.fromJsonObject=function(L,X,
ua){X.push(h);d=L.isPreset;D=L.extreportGroupID;H=L.extreportGroupName;l=ua;L=L.children;for(var ia=0;L&&ia<L.length;ia++){var z=new zb;z.setParentNode(h);z.setLevel(m+1);z.fromJsonObject(L[ia],X,ua);h.addChild(z)}}}function Tb(h,d){Ya.call(this);var l=this,m=this.protectedMethod,p,q,c,D,H=!0;(function(){m.setTitle(R.get("selectMacro","\u9009\u62e9\u5b8f\u53d8\u91cf"));l.setSize(470,410);m.setSelectable(!0);m.setContentPaneCreator(function(){c||(c=$("<div>"));p=new ua;h.addWindowResizeListener(X);
D=p.getJqUi();b.layoutCtrl(D,0,0,"100%",260);D.appendTo(c);D&&D.show();return c});m.setClosingChecker2(function(ia){h.removeWindowResizeListener(X);if(!H)return m.getMessageCurtain().showPrompt(R.get("loadingData1","\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u3002")),!1;if(ia=p.getSelectedModel())return q(ia.getUid()),!0;m.getMessageCurtain().showPrompt(R.get("noImportMacroSelected","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5b8f\u3002"));return!1},function(ia){h.removeWindowResizeListener(X);m.destroy();return!0});
m.setClosingAction(function(ia){})})();var L=function(ia){H=ia},X=function(){if(p){var ia=p.getMacroTable();ia&&r.refresh(ia)}};this.setFunSelectCallBack=function(ia){q=ia};var ua=function(){N.call(this);var ia=this.protectedMethod,z,v=ia.getPagination(),y=ia.getSearchBox(),x,Q;(function(){z=new Ja(h,!1,L);z.setPagination(v);z.setSelectName(d);ia.setTablePanel(z);ia.setSelectListBoxValue([Aa.ALLTYPE,Aa.SINGLEMACRO,Aa.MULTIMACRO]);ia.setFunSelectListCustom(function(E,k,I){E=$("<div>");E.text(Aa.macroDialogTypeToName(I));
k.append(E)});ia.setSearchDescription(R.get("searchTips","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));ia.setSearchListener(function(E){x=y.getText().trim();z.updateMacroDataBySearch(x,Q)});ia.setSelectListBoxChangeListener(function(E,k,I){k!==I&&(Q=I,x=y.getText().trim(),z.updateMacroDataBySearch(x,Q))});ia.setJumpToPageListener(function(E,k,I){x=y.getText().trim();z.updateMacroDataBySearch(x,Q,E,k,I)})})();this.getMacroTable=function(){return z.getTable()}}}function Ab(h,d,l){Ya.call(this);var m=
this,p=this.protectedMethod,q,c,D,H,L=!0,X=Va.SPLIT,ua=m.showDialog;this.showDialog=function(){p.setTitle(R.get("selectVar","\u9009\u62e9\u53d8\u91cf"));d?m.setSize(680,460):m.setSize(470,410);p.setSelectable(!0);p.setContentPaneCreator(function(){D||(D=$("<div>"));q=new v;h.addWindowResizeListener(ia);H=q.getJqUi();b.layoutCtrl(H,0,0,"100%",260);H.appendTo(D);H&&H.show();return D});p.setClosingChecker2(function(y){h.removeWindowResizeListener(ia);if(!L)return p.getMessageCurtain().showPrompt(R.get("loadingData1",
"\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u3002")),!1;if(y=q.getSelectedModel()){var x="",Q="";if(d)for(var E=0;E<y.length;E++){var k=y[E];k.isSystemVar()?E===y.length-1?(x+=k.getText(),Q+="@"+k.getName()):(x+=k.getText()+X,Q+="@"+k.getName()+X):E===y.length-1?(x+=k.getName(),Q+="$"+k.getUid()):(x+=k.getName()+X,Q+="$"+k.getUid()+X)}else y.isSystemVar()?(x=y.getText(),Q="@"+y.getName()):(x=y.getName(),Q="$"+y.getUid());c(x,Q)}else c("","");p.destroy();return!0},function(y){h.removeWindowResizeListener(ia);
p.destroy();return!0});p.setClosingAction(function(y){});ua();d&&q.updateSyncResultPane()};this.setFunSelectCallBack=function(y){c=y};var ia=function(){if(q){var y=q.getMacroTable(),x=q.getSystemVarTable();y&&r.refresh(y);x&&r.refresh(x)}},z=function(y){L=y},v=function(){function y(ma){var na={},pa,qa,La,xb=[];this.getJqUi=function(){pa||(pa=$("<div>"),Nb());return pa};this.syncTableToMap=function(ab,Db){if(Db)for(Db=0;Db<ab.length;Db++){var Rb=ab[Db];Rb.isSystemVar()?na[Rb.getName()]=Rb:na[Rb.getUid()]=
Rb}else for(Db=0;Db<ab.length;Db++)Rb=ab[Db],Rb.isSystemVar()?delete na[Rb.getName()]:delete na[Rb.getUid()];Ia();xb=[];ab=Object.keys(na);for(Db=0;Db<ab.length;Db++)xb.push(na[ab[Db]]);La.setItemModels(xb)};this.containsModel=function(ab){return na[ab]?!0:!1};this.getSelectedModel=function(){return xb};var Nb=function(){qa=$("<div>");Ia();var ab=new e(R.get("allClear","\u5168\u90e8\u6e05\u9664")),Db=ab.getJqUi();ab.addActionListener(function(){xb.length=0;na={};La&&La.setItemModels([]);Ia();ma()});
La=new g;La.setBorderVisible(!1);La.setItemModels([]);La.setCustomItemPainter(function(Rb,$a){var Eb=$("<div>"),Qb=$("<div>"),Yb=180;C.background(Qb,"delete");if($a.isSystemVar())Eb.text($a.getText()),Eb.attr("title",$a.getText()),Qb.on("click",function(){var jc=$a.getName();delete na[jc];ja(jc)});else if(Eb.text($a.getName()),Eb.attr("title",$a.getName()),Qb.on("click",function(){var jc=$a.getUid();delete na[jc];ja(jc)}),!$a.isUsable()){var fc=P.getErrorIcon(R.get("macroAbnormalTips","\u5f53\u524d\u5b8f\u5b58\u5728\u5f02\u5e38\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002"));
b.layoutCtrlWithLRTB(fc,0,0,null,10,null,null);Eb.css("padding-left","18px");Yb=160;Eb.append(fc)}Rb.on("mouseenter",function(){Qb.css("display","block");b.layoutCtrl(Eb,null,null,Yb-13,null)});Rb.on("mouseleave",function(){Qb.css("display","none");b.layoutCtrl(Eb,null,null,Yb,null);b.layoutCtrlWithLRTB(Eb,8,4,null,4,null,22)});Eb.css({"text-overflow":"ellipsis",overflow:"hidden"});Qb.css({display:"none",cursor:"pointer"});Rb.css("height","30");b.layoutCtrlWithLRTB(Qb,178,0,15,6,9,null);b.layoutCtrlWithLRTB(Eb,
8,4,null,4,null,22);Rb.append(Eb);Rb.append(Qb)});ab=La.getJqUi();ab.children(":first-child").css("overflow-x","hidden");qa.css({"line-height":"30px",color:"#404040"});Db.css({"line-height":"20px",cursor:"pointer"});b.layoutCtrl(qa,5,5,120,30);b.layoutCtrl(Db,150,10,55,20);b.layoutCtrl(ab,0,30,205,270);pa.append(qa);pa.append(Db);pa.append(ab);b.layoutCtrl(ab,0,30,205,275)},ja=function(ab){xb=Object.values(na);La.setItemModels(xb);ma(ab);Ia()},Ia=function(){var ab=R.get("seleVar","\u5df2\u9009\u53d8\u91cf (#)");
ab=ab.replace("#",Object.keys(na).length);qa.text(ab);qa.attr("title",ab)}}N.call(this,d);var x=this.protectedMethod,Q=Hb.MACRO,E,k,I,ba=[],da=!1,V=x.getPagination(),T=x.getSearchBox(),S;(function(){if(B.isNotEmptyStr(l)){var ma=l.split(Va.SPLIT)[0];if(ma.startsWith("@")&&!d){Q=Hb.SYSTEM;var na=ma}else{Q=Hb.MACRO;var pa=ma}}d?(I=new y(function(qa){if(qa)for(var La=0;La<ba.length;La++){var xb=ba[La].getUserObject();xb&&(xb.isSystemVar()&&xb.getName()===qa||xb.getUid&&xb.getUid()===qa)&&(ba[La].setChecked(!1),
Q===Hb.SYSTEM?k&&k.updateAllCheckBox():E&&E.updateAllCheckBox())}else{for(La=0;La<ba.length;La++)ba[La].setChecked(!1);da=!1;Q===Hb.SYSTEM?k&&k.updateAllCheckBox():E&&E.updateAllCheckBox()}}),E=new Ja(h,d),k=new fa(h,d),E.setPagination(V),E.setResultPane(I),E.setArrCheckBox(ba),E.setContainAll(da),k.setPagination(V),k.setResultPane(I),k.setArrCheckBox(ba),k.setContainAll(da),x.setMulSelectTablePanel(I)):(E=new Ja(h,d,z),k=new fa(h,d,z),E.setPagination(V),k.setPagination(V));k.setSelectName(na);E.setSelectName(pa);
Q===Hb.SYSTEM?x.setTablePanel(k):x.setTablePanel(E);x.setSelectType(Q);x.setSelectListBoxValue([Hb.MACRO,Hb.SYSTEM]);x.setFunSelectListCustom(function(qa,La,xb){qa=$("<div>");qa.text(Hb.macroSysDialogTypeToName(xb));La.append(qa)});x.setSearchDescription(R.get("searchTips","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));x.setSearchListener(function(qa){S=T.getText().trim();Q===Hb.MACRO?E.updateMacroDataBySearch(S,Q):Q===Hb.SYSTEM&&k.updateSystemDataBySearch(S)});x.setSelectListBoxChangeListener(function(qa,
La,xb){La!==xb&&(Q=xb,S=T.getText().trim(),d&&(da=!1),xb===Hb.MACRO?(x.setTablePanel(E),E.updateMacroDataBySearch(S)):xb===Hb.SYSTEM&&(x.setTablePanel(k),k.updateSystemDataBySearch(S)))});x.setJumpToPageListener(function(qa,La,xb){S=T.getText().trim();Q===Hb.MACRO?E.updateMacroDataBySearch(S,Q,qa,La,xb):Q===Hb.SYSTEM&&k.updateSystemDataBySearch(S,qa,La,xb)})})();this.updateSyncResultPane=function(){var ma=[],na=[];if(B.isNotEmptyStr(l)){for(var pa=l.split(Va.SPLIT),qa=0;qa<pa.length;qa++){var La=
pa[qa];La.startsWith("@")?ma.push(La.substr(1)):na.push(La.substr(1))}0<na.length&&(pa=h.createMacroManageFacade(function(xb){if(xb)for(var Nb=0,ja=xb.length;Nb<ja;Nb++){var Ia=new ec;Ia.fromJsonObject(xb[Nb]);I.syncTableToMap([Ia],!0);E&&E.updateTableByMul()}}),pa.loadSelectMacros(na));0<ma.length&&(pa=h.createQueryFacade(function(xb){if(xb)for(var Nb=0,ja=xb.length;Nb<ja;Nb++){var Ia=new hb;Ia.fromJsonObject(xb[Nb]);I.syncTableToMap([Ia],!0)}}),pa.loadSelectSysVars(ma))}};this.getMacroTable=function(){return E.getTable()};
this.getSystemVarTable=function(){return k.getTable()}}}function Ra(h){var d=this,l,m,p;this.getJqUi=function(){l||(l=$("<div>"),b.layoutCtrlWithLRTB(l,0,-10,null,70,-24,null),d.protectedInitTable());return l};this.protectedInitTable=function(){};this.protectedMethod={showNoDataUI:function(q){p||(p=$("<div>"),p.css({"text-align":"center","font-size":"16px","margin-top":h?"105px":"80px"}),l.append(p));m.hide();p.text(q);p.show()},setJqTableUI:function(q){m=q}}}function Ja(h,d,l){function m(T){KTDefaultCellRender.call(this,
T);var S=this,ma=this.paintCellUI;this.paintCellUI=function(na,pa){var qa=S.getCurrentRowIdx(),La=S.getCurrentRow(),xb=S.getCurrentColIdx(),Nb=La.getUserObject();La=Nb&&Nb.isUsable()?null:R.get("macroAbnormalTips","\u5f53\u524d\u5b8f\u5b58\u5728\u5f02\u5e38\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4f7f\u7528\u3002");qa<r.getHeadRowCount()?(ma(na,pa),D&&1===qa&&0===xb&&(X=new Xb,X.setChecked(ia),X.addCheckedListener(function(ja,Ia){if(Ia){ia=ja.isChecked();for(Ia=0;Ia<ua.length;Ia++)ja=ua[Ia],ja.setChecked(ia);
ja=[];for(Ia=0;Ia<v.length;Ia++){var ab=v[Ia];ab.isUsable()&&ja.push(ab)}L.syncTableToMap(ja,ia)}}),La=X.getJqUi(),b.layoutCtrlCenterAlign(La,14),b.layoutCtrlWithLRTB(La,null,null,16,0,null,null),$(na).css({"z-index":"999",height:"25px"}),$(na).append(La))):(pa=$("<div>"),pa.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),La&&pa.addClass("extreport-dataset-disable"),0==xb?D?(xb=new Xb,xb.setUserObject(Nb),xb.setChecked(L.containsModel(Nb.getUid())),La&&xb.setEnabled(!1),
xb.addCheckedListener(function(ja,Ia){if(!Nb.isUsable()&&(ja.setChecked(!1),Ia))return;Ia&&(ja=ja.isChecked(),L.syncTableToMap([Nb],ja),p.updateAllCheckBox())}),La=xb.getJqUi(),b.layoutCtrlCenterAlign(La,14),b.layoutCtrlWithLRTB(La,null,null,14,3,null,null),$(na).append(La),ua.push(xb)):(k||I||(y=new Sa,I=!0),r.getHeadRowCount(),xb=new Ub,xb.addCheckedListener(function(ja,Ia){Ia&&(x=Nb)}),La?xb.setEnabled(!1):x&&x.getUid()===Nb.getUid()&&xb.setChecked(!0),y.addElement(xb),xb.setUserObject(Nb),La=
xb.getJqUi(),b.layoutCtrlWithLRTB(La,14,0,null,0,0,null),La.appendTo(na)):1==xb?(Xa.highlightKeyWords(pa,Q,Nb.getUid()),La&&(pa.css("padding-left","20px"),La=P.getErrorIcon(La),pa.append(La)),pa.appendTo(na)):2==xb?(Xa.highlightKeyWords(pa,Q,Nb.getName()),pa.appendTo(na)):3==xb?(La=Nb.getDesc()?Nb.getDesc():R.get("noDesc","\u6682\u65e0\u63cf\u8ff0"),Xa.highlightKeyWords(pa,Q,La),pa.appendTo(na)):4==xb?(La=Nb.isMultiValued()?R.get("multiValued","\u591a\u503c"):R.get("singleValued","\u5355\u503c"),
pa.text(La),pa.appendTo(na)):5==xb&&(xb=new e(R.get("preview","\u9884\u89c8")),La&&xb.setEnabled(!1),La=xb.getJqUi(),La.appendTo(na),xb.addActionListener(function(){(new aa(h,Nb,!0,V)).showDialog()}),b.layoutCtrl(La,5,0,50,28),La.css("line-height","28px")))}}Ra.call(this,d);var p=this,q=p.protectedMethod,c,D=d,H,L,X,ua,ia,z,v,y=new Sa,x,Q,E,k=!0,I=!1;this.getSelected=function(){return d?L.getSelectedModel():x};this.updateTableByMul=function(){ba();p.updateAllCheckBox()};this.updateMacroDataBySearch=
function(T,S,ma,na,pa){var qa=!ma;Q=T;E=(new Date).getTime()+"";T=h.createMacroManageFacade(function(La){La.timeStamp===E&&(qa?da(La,S,H.resetPaginationAndJumpToFirstPage):da(La,S,pa),d&&p.updateAllCheckBox())},null,function(){setTimeout(function(){l&&l(!0)},0)});T.setBlockingJqUi($(z.getUI()));l&&l(!1);qa?T.loadMacros(1,H.getPageSize(),Q,S,E):T.loadMacros(ma,na,Q,S,E)};this.updateAllCheckBox=function(){for(var T,S=0;S<ua.length;S++){var ma=ua[S].getUserObject();if(ma&&(T=ma.getUid(),void 0!=T&&ma.isUsable()&&
(ia=L.containsModel(T),!ia)))break}X&&X.setChecked(ia)};this.protectedInitTable=function(){z=r.createTable();z.setColumnFitVisibleWidth(!1);z.setDraggableAdjusting(!0,r.getHeadRowCount(),0,new ib);var T=new m(z);T.setOutsideVisible(!0);z.setCellRender(T);z.setSyncUIWhenModelChanged(!1);z.addColumns(6);z.getColumn(0).setWidth(40);z.getColumn(1).setWidth(85);z.getColumn(2).setWidth(85);z.getColumn(3).setWidth(85);z.getColumn(4).setWidth(71);z.getColumn(5).setWidth(62);T=r.createHeadRow(z);T.getCell(1).setValue(R.get("lowerCode",
"\u7f16\u7801"));T.getCell(2).setValue(R.get("lowerName","\u540d\u79f0"));T.getCell(3).setValue(R.get("desc","\u63cf\u8ff0"));T.getCell(4).setValue(R.get("returnValueType","\u8fd4\u56de\u503c"));T.getCell(5).setValue(R.get("operation","\u64cd\u4f5c"));z.setSyncUIWhenModelChanged(!0);T=$(z.getUI());b.layoutCtrlWithLRTB(T,-1,12,null,0,0,null);T.appendTo(p.getJqUi());q.setJqTableUI(T);if(B.isNotEmptyStr(c))if(D){var S=Aa.ALLTYPE;E=(new Date).getTime()+"";T=h.createMacroManageFacade(function(ma){ma.timeStamp===
E&&da(ma,S,H.resetPaginationAndJumpToFirstPage)});T.setBlockingJqUi(null);T.loadMacros(1,H.getPageSize(),Q,S,E)}else T=h.createMacroManageFacade(function(ma){ma&&(H.resetPaginationAndJumpToFirstPage(ma.count),H.jumpToPage(ma.index))}),T.setBlockingJqUi($(z.getUI())),l&&l(!1),T.loadMacroPageIndexByUid(c.startsWith("$")?c.substr(1):c,H.getPageSize());else p.updateMacroDataBySearch(Q,Aa.ALLTYPE)};this.setPagination=function(T){H=T};this.setSelectName=function(T){c=T&&(T.startsWith("$")?T:"$"+T)};this.setArrCheckBox=
function(T){ua=T};this.setResultPane=function(T){L=T};this.setContainAll=function(T){ia=T};this.getTable=function(){return z};var ba=function(T){z||p.protectedInitTable();r.clearWithoutHead(z);y=new Sa;D?ua.length=0:T||(x=null);if(v&&0<v.length){for(var S=!0,ma,na=0,pa=v.length;na<pa;na++){var qa=v[na],La=r.createRow(z);D||(B.isNotEmptyStr(c)?c==="$"+qa.getUid()&&(ma=La,x=qa,c=null,S=!1):S&&!T&&qa&&qa.isUsable()&&(ma=La,x=qa,S=!1));La.setUserObject(qa)}z.updateUI();I=k=!1;ma&&z.scrollCellVisible(z.getRowIndex(ma),
0,!1)}},da=function(T,S,ma){ma(T.totalRow);T=T.macros;ma=H.getJqUi();T&&0<T.length?ma.show():ma.hide();v=[];ma=0;for(var na=T.length;ma<na;ma++){var pa=new ec;pa.fromJsonObject(T[ma]);v.push(pa)}T&&0!==T.length?z&&$(z.getUI()).show():B.isNotEmptyStr(Q)||void 0!==S&&S!==Aa.ALLTYPE&&S!==Hb.MACRO?q.showNoDataUI(R.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):q.showNoDataUI(R.get("noMyOwnMacro","\u6682\u672a\u521b\u5efa\u5b8f"));H.refreshPagination();ba()},
V=function(T,S){if(S){if(v)for(var ma=0,na=v.length;ma<na;ma++){var pa=v[ma];if(T&&T.getUid()===pa.getUid()){T.setMacroStatus(Fb.NOT_AVAILABLE);x&&x.getUid()==T.getUid()&&(x=null);break}}D&&L&&L.containsModel(T.getUid())&&L&&L.syncTableToMap([T],!0);ba(S)}}}function fa(h,d,l){function m(da){KTDefaultCellRender.call(this,da);var V=this,T=this.paintCellUI;this.paintCellUI=function(S,ma){var na=V.getCurrentRowIdx(),pa=V.getCurrentRow(),qa=V.getCurrentColIdx(),La=pa.getUserObject();na<r.getHeadRowCount()?
(T(S,ma),D&&1===na&&0===qa&&(X=new Xb,X.setChecked(ia),X.addCheckedListener(function(xb,Nb){if(Nb){ia=xb.isChecked();for(Nb=0;Nb<ua.length;Nb++)xb=ua[Nb],xb.setChecked(ia);L.syncTableToMap(v,ia)}}),qa=X.getJqUi(),b.layoutCtrlCenterAlign(qa,14),b.layoutCtrlWithLRTB(qa,null,null,14,0,null,null),$(S).css({"z-index":"999",height:"25px"}),$(S).append(qa))):(ma=$("<div>"),ma.css({"padding-left":"2px","padding-right":"2px","line-height":"28px",overflow:"hidden"}),0==qa?D?(ma=new Xb,ma.setUserObject(La),
ma.setChecked(L.containsModel(La.getName())),ma.addCheckedListener(function(xb,Nb){Nb&&(xb=xb.isChecked(),L.syncTableToMap([La],xb),p.updateAllCheckBox())}),qa=ma.getJqUi(),b.layoutCtrlCenterAlign(qa,14),b.layoutCtrlWithLRTB(qa,null,null,14,3,null,null),$(S).append(qa),ua.push(ma)):(x||Q||(E=new Sa,Q=!0),r.getHeadRowCount(),qa=new Ub,qa.addCheckedListener(function(xb,Nb){Nb&&(k=La)}),k&&k.getName()===La.getName()&&qa.setChecked(!0),E.addElement(qa),qa.setUserObject(La),qa=qa.getJqUi(),b.layoutCtrlWithLRTB(qa,
14,0,null,0,0,null),qa.appendTo(S)):1==qa?(Xa.highlightKeyWords(ma,I,La.getName()),ma.appendTo(S)):2==qa?(Xa.highlightKeyWords(ma,I,La.getText()),ma.appendTo(S)):3==qa&&(qa=new e(R.get("preview","\u9884\u89c8")),ma=qa.getJqUi(),ma.appendTo(S),qa.addActionListener(function(){(new aa(h,La)).showDialog()}),b.layoutCtrlWithLRTB(ma,0,0,null,0,0,null),ma.css("line-height","28px")))}}Ra.call(this,d);var p=this,q=p.protectedMethod,c,D=d,H,L,X,ua,ia,z,v,y,x=!0,Q=!1,E=new Sa,k,I;this.getSelected=function(){return d?
L.getSelectedModel():k};this.updateSystemDataBySearch=function(da,V,T,S){var ma=!V;I=da;y=(new Date).getTime()+"";da=h.createQueryFacade(function(na){na.timeStamp===y&&(ma?ba(na,H.resetPaginationAndJumpToFirstPage):ba(na,S),d&&p.updateAllCheckBox())},null,function(){setTimeout(function(){l&&l(!0)},0)});da.setBlockingJqUi($(z.getUI()));l&&l(!1);ma?da.loadSystemVar(I,1,H.getPageSize(),y):da.loadSystemVar(I,V,T,y)};this.updateAllCheckBox=function(da){var V;for(da=0;da<ua.length;da++)if(V=ua[da].getUserObject())if(V=
V.getName(),void 0!=V&&(ia=L.containsModel(V),!ia))break;X&&X.setChecked(ia)};this.protectedInitTable=function(){z=r.createTable();z.setColumnFitVisibleWidth(!1);z.setDraggableAdjusting(!0,r.getHeadRowCount(),0,new ib);var da=new m(z);da.setOutsideVisible(!0);z.setCellRender(da);z.setSyncUIWhenModelChanged(!1);z.addColumns(4);z.getColumn(0).setWidth(40);z.getColumn(1).setWidth(163);z.getColumn(2).setWidth(163);z.getColumn(3).setWidth(62);da=r.createHeadRow(z);da.getCell(1).setValue(R.get("lowerCode",
"\u7f16\u7801"));da.getCell(2).setValue(R.get("lowerName","\u540d\u79f0"));da.getCell(3).setValue(R.get("operation","\u64cd\u4f5c"));z.setSyncUIWhenModelChanged(!0);da=$(z.getUI());b.layoutCtrlWithLRTB(da,-1,12,null,0,0,null);da.appendTo(p.getJqUi());q.setJqTableUI(da);!d&&B.isNotEmptyStr(c)?(da=h.createQueryFacade(function(V){V&&(H.resetPaginationAndJumpToFirstPage(V.count),H.jumpToPage(V.index))}),da.setBlockingJqUi($(z.getUI())),l&&l(!1),da.loadSystemVarPageIndexByName(c.startsWith("$")?c.substr(1):
c,H.getPageSize())):p.updateSystemDataBySearch("")};this.setPagination=function(da){H=da};this.setSelectName=function(da){c=da&&(da.startsWith("@")?da:"@"+da)};this.setArrCheckBox=function(da){ua=da};this.setResultPane=function(da){L=da};this.setContainAll=function(da){ia=da};this.getTable=function(){return z};var ba=function(da,V){V(da.totalRow);da=da.systemVar;V=H.getJqUi();da&&0<da.length?V.show():V.hide();v=[];V=0;for(var T=da.length;V<T;V++){var S=new hb;S.fromJsonObject(da[V]);v.push(S)}da&&
0!==da.length?z&&$(z.getUI()).show():q.showNoDataUI(R.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"));H.refreshPagination();z||p.protectedInitTable();r.clearWithoutHead(z);E=new Sa;D?ua.length=0:k=null;if(v&&0<v.length){da=!0;V=0;for(T=v.length;V<T;V++){S=v[V];var ma=r.createRow(z);if(!D)if(B.isNotEmptyStr(c)){if(c==="@"+S.getName()){var na=ma;k=S;c=null;da=!1}}else da&&(na=ma,k=S,da=!1);ma.setUserObject(S)}z.updateUI();Q=x=!1;na&&z.scrollCellVisible(z.getRowIndex(na),
0,!1)}}}function Cb(h,d){Ya.call(this);var l=this,m=this.protectedMethod,p,q,c,D,H,L,X;(new F).setFontSize(12);var ua=!1,ia,z,v,y=$("<div>"),x,Q,E,k={},I,ba=new function(){var ja,Ia,ab,Db,Rb,$a;this.hasPermission=function(){return ua};this.getCurrentPath=function(){return I.getCurrentMenuPath()};this.getCurrentGroupId=function(){return Rb};this.setCurrentGroupId=function(Eb){Rb=Eb};this.getGroupType=function(){return ja};this.setGroupType=function(Eb){ja=Eb};this.getDataSetType=function(){return Ia};
this.setDataSetType=function(Eb){Ia=Eb};this.getSearchDataSetName=function(){return ab};this.setSearchDataSetName=function(Eb){ab=Eb};this.getSearchGroupName=function(){return Db};this.setSearchGroupName=function(Eb){Db=Eb};this.getTimeStamp=function(){return $a};this.newTimeStamp=function(){return $a=(new Date).getTime()};this.getDialogJqui=function(){return p}};(function(){m.setSelectable(!0);l.setSize(810,570);m.getDialogCtrl().addResizeListener(function(){});m.setContentPaneCreator(function(){p=
$("<div>");p.css({"border-bottom":"1px solid rgb(204, 204, 204)","z-index":1});da();return p});m.setClosingAction(function(ja){});m.setFooterClosingOnly(!1)})();var da=function(){var ja=h.createParamCtrlFacade(function(Ia){l.setGroupTypeDispaly(Ia.bPermission);H=Ia.sCreatorId;D=Ia.sGroupId},function(){l.setGroupTypeDispaly(!1)},function(){V()});ja.setBlockingJqUi(p);d?ja.queryDataSourceInfo(d.getId(),d.getName(),d.getGroupId(),d.getGroupName(),d.getUserId()):ja.queryDataSourceInfo()},V=function(){T(p);
var ja=pa();v=z.protectInit();y.append(v);var Ia,ab=new n;ab.setHorizontalSplit(!0);ab.setFirstSize(180,120,250);ab.setSecondSize(590,-1,-1);ab.setResizeMode(n.RESIZE_MODE_FIRST_FIXED);ab.setFirstChild(n.createChildWrapper(ja,function(){clearTimeout(Ia);Ia=setTimeout(function(){z.refreshUi()},0)}));ab.setSecondChild(n.createChildWrapper(y));ja=ab.getJqUi();ja.addClass("extreport-dataset-designer-import-param-split-left");p.append(ja);m.setTitle(q);Nb(D);c&&c.unobserve();c=new dc;c.setDelay(50);c.setCallback(function(){z.refreshUi()});
c.observe()},T=function(ja){var Ia=0,ab=$("<div>");ab.addClass("extreport-dataset-designer-import-param-top");Ia=S(ab,Ia);Ia=na(ab,Ia);var Db=new a;Db.setSearchListenerDelay(500);Db.setPlaceholder(R.get("searchDataSetName","\u641c\u7d22\u6570\u636e\u96c6\u540d\u79f0"));Db.setShowSearchIcon(!0);var Rb=Db.getJqUi();Db.addSearchListener(function(){var $a=Db.getText().trim();ba.getSearchDataSetName()!=$a&&(ba.setSearchDataSetName($a),Nb())});Db.addCloseListener(function(){ba.setSearchDataSetName("");
Nb()});b.layoutCtrl(Rb,Ia,-3,200,24);ab.append(Rb);ja.append(ab)},S=function(ja,Ia){var ab=0,Db=[M.USER,M.PRESET];if(ua){ab="100000"===H?1:0;var Rb=new cc;Rb.setSelected(Db[ab]);Rb.setItemModels(Db);Rb.setCustomPainter(function(Eb,Qb,Yb){Qb.text(ma(Yb))});Rb.addSelectedChangedListener(function(Eb,Qb,Yb){if(Qb!==Yb){ba.setGroupType(Yb);Eb=Object.keys(k);for(Qb=0;Qb<Eb.length;Qb++){var fc=k[Eb[Qb]],jc=fc.getJqUi();fc.getMenuType()==Yb?(I=fc,jc.css("display","block"),ba.setCurrentGroupId(I.getCurrentMenuId())):
jc.css("display","none")}Nb()}});var $a=new F;$a.setFontSize(12);$a=$a.measureWidth(ma(Db[ab]))+31;Rb=Rb.getJqUi();Rb.addClass("import-param-menu-type-combo");Rb.css("left",Ia);Rb.css("width",$a);Ia+=$a+20;ja.append(Rb)}ba.setGroupType(Db[ab]);for(ja=0;ja<Db.length;++ja)Rb=Db[ja],$a=new pb(Rb,ba),$a.setFuncShowMatchMenuCountInfo(qa),$a.setFuncShowContextArea(xb),$a.setFuncHideContextArea(La),$a.appendSelectedChangedListener(L),k[Rb]=$a;I=k[Db[ab]];return Ia},ma=function(ja){return ja==M.USER?R.get("myCategory",
"\u6211\u7684\u76ee\u5f55"):R.get("presetCategory","\u9884\u7f6e\u76ee\u5f55")},na=function(ja,Ia){var ab=[va,bb.SQL_DATA_SET,bb.OQL_DATA_SET],Db=new cc;Db.setSelected(ab[0]);ba.setDataSetType(ab[0]);Db.setItemModels(ab);Db.setCustomPainter(function(Rb,$a,Eb){Rb=$("<div>");var Qb;Eb==va?Qb=R.get("allType","\u5168\u90e8\u7c7b\u578b"):Eb==bb.SQL_DATA_SET?Qb=R.get("sqlDataSet","SQL\u6570\u636e\u96c6"):Eb==bb.OQL_DATA_SET&&(Qb=R.get("oqlDataSet","\u5b9e\u4f53\u67e5\u8be2\u6570\u636e\u96c6"));Rb.text(Qb);
$a.append(Rb)});Db.addSelectedChangedListener(function(Rb,$a,Eb){$a!==Eb&&(ba.setDataSetType(Eb),Nb())});ab=Db.getJqUi();ab.addClass("import-param-data-type-combo");ab.css("left",Ia);Ia+=130;ja.append(ab);return Ia},pa=function(){var ja=$("<div>");ja.css("border-right","1px solid #ddd");ia=new a;ia.setPlaceholder(R.get("searchDirectoryname","\u641c\u7d22\u76ee\u5f55\u540d\u79f0"));ia.setShowSearchIcon(!0);X=ia.getJqUi();b.layoutCtrl(X,null,null,"100%","27px");ia.addEnterEventListener(function(){var $a=
ia.getText().trim();ba.getSearchGroupName()==$a?I.scrollToMenuBySearchText($a):""==$a?(ba.setSearchGroupName(""),Nb(),qa(null)):(ba.setSearchGroupName($a),I&&I.refreshMatchedNode())});ia.addClearIconListener(function(){ba.setSearchGroupName("");Nb();qa(null)});ja.append(X);ja.append(I.getJqUi());for(var Ia=Object.keys(k),ab=0;ab<Ia.length;ab++){var Db=k[Ia[ab]],Rb=Db.getJqUi();Db===I?Rb.css("display","block"):Rb.css("display","none");ja.append(Rb)}return ja},qa=function(ja){ja&&ba.getSearchGroupName()?
ia.appendText(ja):ia.hideText(ja)};this.buildContextArea=function(ja){z=ja};this.setTitle=function(ja){q=ja};this.setGroupTypeDispaly=function(ja){ua=ja};this.setFuncBeforeCloseChecker=function(ja){m.setClosingChecker(function(){return ja(m)},!1)};this.closeDialog=function(){m.destroy()};var La=function(){x||(x=$("<div>"),Q=$("<div>"),Q.addClass(),E=$("<div>"),C.background(E,"no_data"),x.addClass("extreport-dataset-designer-import-param-tip"),Q.addClass("extreport-dataset-designer-import-param-tip-text"),
E.addClass("extreport-dataset-designer-import-param-tip-background"),x.append(Q),x.append(E),y.append(x));ba.getSearchDataSetName()||ba.getSearchGroupName()||ba.getDataSetType()!=va?Q.text(R.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):ba.getGroupType()==M.PRESET?Q.text(R.get("noPresetDataset","\u6682\u65e0\u9884\u7f6e\u6570\u636e\u96c6")):Q.text(R.get("noDataSet","\u6682\u65e0\u6570\u636e\u96c6"));x&&x.show();v&&v.hide()},xb=function(){x&&x.hide();v&&
v.show()};this.updateMenu=function(ja,Ia,ab){I.updateMenu(ja,ab,Ia)};this.getDialogParam=function(){return ba};var Nb=function(ja){var Ia=ba.getSearchDataSetName(),ab=ba.getSearchGroupName(),Db=ba.getDataSetType();Db===va&&(Db=null);var Rb=ba.getGroupType(),$a=ba.newTimeStamp(),Eb=h.createParamCtrlFacade(function(Qb){if(ba.getTimeStamp()==Qb[0]){var Yb=Qb[1];Qb=Yb.groups;Yb=Yb.countInMap;for(var fc=[],jc=null,lc=0;lc<Qb.length;lc++)(new zb).fromJsonObject(Qb[lc],fc,ba.getSearchDataSetName()&&0<ba.getSearchDataSetName().length);
for(lc=0;lc<fc.length;lc++)if(ja&&ja===fc[lc].getGroupID()){jc=fc[lc];break}l.updateMenu(fc,Yb,jc)}},function(){});Eb.setBlockingJqUi(p);Eb.loadDataSetMenu(Ia,ab,Db,Rb,$a)};this.setFuncQueryRightAreaByMenu=function(ja){L=ja};this.getResult=function(){return z.getResult()}}function pb(h,d){var l=this,m,p,q,c=[],D,H=[],L=0,X=[],ua=[],ia,z,v,y,x=!0,Q=new F;Q.setFontSize(12);this.getJqUi=function(){m||(m=E());return m};this.getMenuType=function(){return h};var E=function(){var ja=$("<div>");D=$("<div>");
D.text(R.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"));D.addClass("extreport-dataset-designer-import-param-font");D.css("display","block");p=new g;p.setBorderVisible(!1);p.scrollSelectedToVisible();p.setCustomItemPainter(k);p.setCustomSelectedsPainter(ba);p.addSelectedChangedListener(na);p.addSelectedChangedListener(da);var Ia=p.scrollSelectedToVisible;p.scrollSelectedToVisible=function(){x&&Ia()};q=p.getJqUi();q.addClass("extreport-dataset-designer-import-param-menu");
ja.append(D);ja.append(q);return ja},k=function(ja,Ia){if(Ia.getShowNode()){ja.addClass("extreport-dataset-designer-import-param-menu-node");if(0<Ia.getChildren().length)if(d.getSearchDataSetName()){a:{var ab=Ia.getChildren().concat();for(var Db=0;ab&&Db<ab.length;Db++){var Rb=ab[Db];if(ia&&ia[Rb.getGroupID()]){ab=!0;break a}if(Rb.getChildren()&&0<Rb.getChildren().length)for(var $a=0;$a<Rb.getChildren().length;$a++)ab.push(Rb.getChildren()[$a])}ab=!1}ab&&I(ja,Ia)}else I(ja,Ia);ab=$("<div>");Ia.getIsPreset()&&
(Db=$("<div>"),Db.addClass("extreport-dataset-designer-preset"),Db.text(R.get("preset","\u9884\u7f6e")),Db.css("margin-left","20px"),ab.css("padding-left",Q.measureWidth(R.get("preset","\u9884\u7f6e"))+10),Db.css("left",20*Ia.getLevel()+5+"px"),ja.append(Db));ab.addClass("extreport-dataset-designer-import-param-menu-text");Xa.highlightKeyWords(ab,d.getSearchGroupName(),Ia.getGroupName());d.getSearchDataSetName()&&(Db=$("<div>"),Rb=ia&&ia[Ia.getGroupID()]?ia[Ia.getGroupID()]:0,Db.addClass("extreport-dataset-designer-import-param-count"),
Db.text("("+Rb+")"),ja.append(Db));Ia.getGroupID()===l.getCurrentMenuId()&&ja.addClass("sa-ctrl-list-item_selected_enabled");ab.css("left",20*Ia.getLevel()+20+"px");ja.css("padding-left",20*Ia.getLevel()+"px");ja.append(ab)}else ja.hide()},I=function(ja,Ia){var ab=$("<div>"),Db=$("<div>");Ia.getIsOpen()?Db.addClass("list-lower-triangle"):Db.addClass("list-right-triangle");ab.addClass("extreport-dataset-designer-import-param-icon");ab.append(Db);ab.on("mousedown",function(Rb){Rb.preventDefault();Rb.stopPropagation();
Ia.getIsOpen()?(V(Ia),Ia.setIsOpen(!1),Db.removeClass("list-lower-triangle"),Db.addClass("list-right-triangle")):(T(Ia),Ia.setIsOpen(!0),Db.addClass("list-lower-triangle"),Db.removeClass("list-right-triangle"));x=!1;d.getSearchGroupName()||(X=H);S(X);setTimeout(function(){x=!0},0)});ja.append(ab)},ba=function(ja,Ia){(ja=$(ja[0]).find(".extreport-dataset-designer-preset"))&&ja.removeClass("preset-border-text-color");(Ia=$(Ia[0]).find(".extreport-dataset-designer-preset"))&&Ia.addClass("preset-border-text-color")},
da=function(ja,Ia,ab){X&&0<X.length&&(ja=ua.indexOf(X.indexOf(ab[0])),-1!==ja&&(L=ja,z(Nb())))},V=function(ja){ja=ja.getChildren();for(var Ia=0;Ia<ja.length;Ia++)V(ja[Ia]),ja[Ia].setIsOpen(!1),ja[Ia].setShowNode(!1)},T=function(ja){ja=ja.getChildren();for(var Ia=0;Ia<ja.length;Ia++)ja[Ia].setShowNode(!0)},S=function(ja){v();D.css("display","none");q.css("display","block");p.setItemModels(ja,function(Ia,ab){return Ia.getGroupID()==ab.getGroupID()?!0:!1})},ma=function(){d.setCurrentGroupId("");p.setSelecteds([]);
X=[];ua=[];z(null);y();q.css("display","none");D.css("display","block");d.getSearchDataSetName()||d.getSearchGroupName()||d.getDataSetType()!=va?D.text(R.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):d.getGroupType()==M.PRESET?D.text(R.get("noPresetMenu","\u9884\u7f6e\u76ee\u5f55\u4e0b\u6ca1\u6709\u6570\u636e")):D.text(R.get("noMenu","\u6211\u7684\u76ee\u5f55\u4e0b\u6ca1\u6709\u6570\u636e"))};this.setFuncShowMatchMenuCountInfo=function(ja){z=ja};this.setFuncShowContextArea=
function(ja){v=ja};this.setFuncHideContextArea=function(ja){y=ja};this.getCurrentMenuId=function(){var ja=p.getSelecteds();return 0<ja.length?ja[0].getGroupID():""};this.getCurrentMenuPath=function(){var ja=p.getSelecteds();if(0<ja.length){var Ia="";for(ja=ja[0];ja;)Ia=ja.getGroupName()+Ia,(ja=ja.getParentNode())&&(Ia="/"+Ia);return Ia}return""};var na=function(ja,Ia,ab){if(ab&&0<ab.length)for(ja=ab[0].getGroupID(),d.setCurrentGroupId(ja),Ia=0;Ia<c.length;Ia++)(ab=c[Ia])&&ab(ja)};this.appendSelectedChangedListener=
function(ja){c.push(ja)};this.updateMenu=function(ja,Ia,ab){ia=ab;ja&&(H=ja);L=0;0>=H.length?ma():d.getSearchGroupName()?l.refreshMatchedNode():pa(H,H,Ia?Ia:H[0])};this.refreshMatchedNode=function(){X=[];ua=[];for(var ja=0;ja<H.length;ja++)if(!H[ja].getParentNode()){var Ia={};La(H[ja],Ia)&&qa(H[ja],Ia)}if(0>=X.length)ma();else{ja=[];for(Ia=0;Ia<ua.length;Ia++)ja.push(X[ua[Ia]]);ja=pa(X,ja,X[ua[0]]);L=ua.indexOf(X.indexOf(ja));z(Nb());L++}};var pa=function(ja,Ia,ab){var Db;a:{if(Db=l.getCurrentMenuId())for(var Rb=
0;Rb<Ia.length;Rb++)if(Db===Ia[Rb].getGroupID()){Db=Rb;break a}Db=-1}-1!==Db?(Ia=Ia[Db],na(null,null,p.getSelecteds())):Ia=ab;xb(Ia);S(ja);return Ia},qa=function(ja,Ia){ja.setShowNode(!0);X.push(ja);if(-1!==ja.getGroupName().toLowerCase().indexOf(d.getSearchGroupName().toLowerCase())&&(!d.getSearchDataSetName()||0<ia[ja.getGroupID()])){ua.push(X.length-1);for(var ab=ja.getParentNode();ab;)ab.setIsOpen(!0),ab=ab.getParentNode()}ja=ja.getChildren();for(ab=0;ab<ja.length;ab++){var Db=ja[ab];Ia[Db.getGroupID()]||
qa(Db,Ia)}},La=function(ja,Ia){var ab=-1!==ja.getGroupName().toLowerCase().indexOf(d.getSearchGroupName().toLowerCase())&&(!d.getSearchDataSetName()||0<ia[ja.getGroupID()]);if(!d.getSearchDataSetName()&&ab)return!0;ja=ja.getChildren();for(var Db=!1,Rb=0;Rb<ja.length;Rb++)La(ja[Rb],Ia)?Db=!0:(Ia[ja[Rb].getGroupID()]=ja[Rb],ja[Rb].setShowNode(!1));return ab||Db};this.scrollToMenuBySearchText=function(ja){0!==X.length&&ja?(L===ua.length&&(L=0),xb(X[ua[L]]),S(X),L++):z(null)};var xb=function(ja,Ia){ja.setShowNode(!0);
for(var ab=ja;ab.getParentNode();)ab=ab.getParentNode(),ab.setIsOpen(!0),ab.setShowNode(!0),Ia&&T(ab);p.setSelecteds([ja]);p.scrollSelectedToVisible(ja)},Nb=function(){if(0!==ua.length)return"("+(L+1)+"/"+ua.length+")"}}function Ea(h,d,l,m){w.call(this);var p=this,q,c,D=[],H,L,X,ua=m,ia=!0;this.protectInit=function(){q||(z(),q=c.getJqUi());return q};this.getResult=function(){return H};this.repaint=function(E){var k=p.getPagination(),I=k.getCurrentPage();k=k.getPageSize();L=(I-1)*k;E&&Q(E)};this.refreshUi=
function(){Q()};this.getPagination=function(){return c.getPagination()};this.IsInitializing=function(){return ia};var z=function(E){E&&(H=E);c=new sb;E=["","#",R.get("dataSetName","\u6570\u636e\u96c6\u540d\u79f0"),R.get("type","\u7c7b\u578b"),R.get("operation","\u64cd\u4f5c")];c.createHead(E,[10,10,80,50,20]);c.addSingleClickListener(function(k){ua=k.getFid();H=k;H.setGroupId(d.getCurrentGroupId());H.setGroupPath(d.getCurrentPath())});c.setFuncCreateTableCell(x);c.setPageChangeListener(v)};this.queryDataSetsByGroup=
function(E){!ua||X&&E!==X?(E=p.getPagination(),v(1,E.getPageSize(),E.resetPaginationAndJumpToFirstPage)):y()};var v=function(E,k,I){var ba=h.createParamCtrlFacade(function(T){var S=[];if(T){var ma=T.totalRow;T=T.arrDataSetVO;for(var na,pa=0;pa<T.length;pa++){var qa=new Za;qa.fromJsonObject(T[pa]);ua&&ua===qa.getFid()&&(na=qa,ua=null);S.push(qa)}na?c.setSelectedId(na.getFid()):c.setSelectedId(S[0].getFid());I(ma);p.repaint(S);ia=!1}else p.repaint(S),I(0)},function(T,S){ia=!1});X=d.getCurrentGroupId();
var da=d.getSearchDataSetName(),V=d.getDataSetType();V===com.kingdee.bos.extreport.datasetdesigner.ctrl.DATA_SET_ALLTYPE&&(V=null);ba.setBlockingJqUi(d.getDialogJqui());ba.loadDataSetByGroupId(E,k,X,da,V)},y=function(){var E=p.getPagination(),k=h.createParamCtrlFacade(function(V){V&&(E.resetPaginationAndJumpToFirstPage(V.totalRow),E.jumpToPage(V.targetPage))},function(V,T){});X=d.getCurrentGroupId();var I=E.getPageSize(),ba=d.getSearchDataSetName(),da=d.getDataSetType();da===com.kingdee.bos.extreport.datasetdesigner.ctrl.DATA_SET_ALLTYPE&&
(da=null);k.setBlockingJqUi(d.getDialogJqui());k.loadDataSetByGroupId(1,I,X,ba,da,ua)},x=function(E,k,I,ba,da){k=$("<div>");k.addClass("import-dataset-table-row");var V="";2===I?d.getSearchDataSetName()?Xa.highlightKeyWords(k,d.getSearchDataSetName(),ba.getName()):(V=ba.getName(),k.text(V)):1===I?(E=L+E-r.getHeadRowCount()+1,k.addClass("dataset-table-center-content"),k.text(E)):3===I?(E=ba.getType(),V=bb.datesetTypeToName(E),k.text(V)):4===I&&(k.text(R.get("preview","\u9884\u89c8")),k.css("color",
"#5582f3"),k.css("cursor","pointer"),k.addClass("dataset-table-center-content"),k.on("click",function(){var T=ba.getFid(),S=ba.getName(),ma=t.decodeParamFromUrl(window.location.search,"path"),na=O.getUrlParamValue();T=t.appendParamToUrl(ma+"/qing_rpt/dataSetPreview.do","dataSetId",T);T=t.appendParamToUrl(T,"dataSetName",S);T=t.appendParamToUrl(T,"isPreset",l);na&&(T=t.appendParamToUrl(T,"skin",na));bc.openNewTab(S,T)}));$(da).append(k)},Q=function(E){E&&(D=E);0!=document.body.clientHeight&&0!=document.body.clientWidth&&
c.updateTable(D)}}function Gb(){var h=[];this.createJqUi=function(p,q,c){var D=new J;D.setItemModel(h);D.setListItemPainter(d);D.setSearchListener(m);return D.createJqPopup(p,q,c)};this.setAllField=function(p){h=p};var d=function(p,q,c){var D=$("<div>");D.addClass("dm-field-popup-list-item");D.data("model",p);var H=$("<span>");H.addClass("dm-field-popup-list-item-field-name");H.text(p.getPatternText());D.append(H);q.append(D);c&&c.getAlias()==p.getAlias()&&l(q,D)},l=function(p,q){var c=null;0<p.height()?
(clearTimeout(c),q.addClass("dm-list-item_selected_enabled"),p.prop("scrollTop",q.prop("offsetTop"))):c=setTimeout(function(){l(p,q)},0)},m=function(p,q,c,D,H,L){q=q.trim().toLowerCase();for(var X=[],ua,ia=0;ia<p.length;ia++)ua=p[ia],(ua=-1!=ua.getAlias().trim().toLowerCase().indexOf(q)?!0:L&&-1!=ua.getName().trim().toLowerCase().indexOf(q)?!0:!1)&&X.push(p[ia]);c.children().remove();if(0<X.length){for(ia=0;ia<X.length;ia++)H(X[ia],c,D);X.length=0}else p=new Pb,p.setText(R.get("nothingSearched","\u627e\u4e0d\u5230\u7b26\u5408\u7684\u7ed3\u679c")),
p.setEnabled(!1),p.setAlign(Pb.ALIGN_CENTER),p=p.getJqUi(),p.addClass("dm-field-popup-search-result"),p.appendTo(c)}}function J(){var h=[],d,l,m,p;this.setItemModel=function(q){h=q};this.setSearchListener=function(q){d=q};this.setListItemPainter=function(q){l=q};this.createJqPopup=function(q,c,D){m=$("<div>");m.appendTo(q);p=$("<div>");var H=25*Math.max(Math.min(10,h.length),1);q=H+25+4;m.css("height",q+"px");p.css("height",H+"px");m.addClass("dm-field-popup");H=R.get("search","\u641c\u7d22");var L=
new a;L.setSearchListenerDelay(200);L.setPlaceholder(H);L.addSearchListener(function(){d(h,L.getText(),p,c,l,!0)});H=L.getJqUi();H.addClass("dm-field-popup-search");H.appendTo(m);p.addClass("dm-field-popup-list-owner");p.on("click",function(X){var ua=$(X.currentTarget);X=$(X.target);if(X=b.upwardSearchHasClass(X,ua,"dm-field-popup-list-item"))X.addClass("dm-list-item_selected_enabled"),ua=X.data("model"),D(ua)});p.appendTo(m);H=m.find(".sa-ctrl-textfield-input");H.css("top","0px");H.css("height",
"100%");for(H=0;H<h.length;H++)l(h[H],p,c,!0);p.css("bottom","5px");return[-1,q]}}function eb(h,d,l){function m(S,ma){var na=new nb;na.setCustomPainter(function(pa,qa){var La=$("<div>");La.text(ma);var xb=$('<textarea readonly="true" ></textarea>');xb.text(qa);xb.addClass("sa-ctrl-msgdlg-detail");xb.on("click",function(){xb.select()});xb.addClass("extreport-dataset-designer-top-border");b.layoutCtrlWithLRTB(xb,0,0,268,35,0,160);La.appendTo(pa);xb.appendTo(pa)});na.setOptionType(nb.OPTION_OK);na.setButtonText(nb.OPTION_OK,
R.get("ok","\u786e\u5b9a"));na.setMessage(S);na.showDialog(300,300)}Ya.call(this);var p=this,q=this.protectedMethod,c,D=[],H=d.getCtrlObject(),L=!1,X=[],ua=!0,ia=!1,z=1,v,y,x=[],Q,E,k;(function(){q.setTitle(R.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"));p.setSize(640,480);q.setSelectable(!0);q.setContentPaneCreator(function(){Q||(Q=$("<div>"),E=$("<div>"),E.addClass("constant-value-dialog-shadow"),Q.append(E),da());return Q});q.setClosingChecker2(function(){if(!L)return q.getMessageCurtain().showPrompt(R.get("loadingData1",
"\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u3002")),!1;if(!c)return!0;var S=c.getSelected();if(y&&!isNaN(y)&&S.length>y)return S=R.get("exceedMaxSelect","\u9009\u62e9\u6570\u91cf\u8d85\u8fc7\u9650\u5236\uff0c\u6700\u591a\u53ef\u9009#1\u6761\u6570\u636e\u3002").replace("#1",y),q.getMessageCurtain().showPrompt(S),!1;v&&v(S);q.destroy();return!0});q.setClosingAction(function(S){})})();var I=function(){E.hide();ua?ia?c=new Ma(z):c=new ya(D,X):ia?c=new db(z):c=new W(D,X);c.setNoPermFieldIndex&&c.setNoPermFieldIndex(x);
c.setSelectableItems(D);c.setSelected(X);Q.append(c.getJqUi());c.updateTable&&c.updateTable()},ba=function(S,ma){E.hide();var na=$("<div>");kb.background(na,"marco_error");na.addClass("constant-dialog-error-background");var pa=$("<span>"),qa=R.get("constantValueError","\u8be5\u5e38\u91cf\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5e38\u91cf\u7684\u6570\u636e\u6e90\u4fe1\u606f\u662f\u5426\u6b63\u786e\uff0c\u70b9\u51fb");pa.text(qa);qa=$("<span>");qa.text(R.get("moreDetailBlank","\u67e5\u770b\u8be6\u7ec6"));
qa.addClass("extreport-error-darkmask-button");qa.on("click",function(La){m(ma,S)});pa.addClass("constant-dialog-error-tips");pa.append(qa);Q.append(na);Q.append(pa)},da=function(){var S=H.getBindSource();H.getTreeType&&H.getTreeType()!=Qa.NOT_TREE&&(ia=!0,z=H.getTreeExpandLevel());H.getBindSourceType()===Ba.SELF?(T(S),setTimeout(function(){L=!0;I()},0)):(k=(new Date).getTime()+"",S=h.createParamCtrlFacade(function(ma){if(ma&&k==ma[0]){ma=ma[1];var na=ma.entryList,pa=ma.head;x=ma.noPermFieldIndex;
for(ma=0;ma<na.length;ma++){var qa=na[ma],La=new Ka;La.setText(qa.text);La.setValue(qa.value);qa.parentId&&La.setParentId(qa.parentId);La.setId(qa.id);La.setEntry(qa.rows);La.setEntryHeadMap(pa);D.push(La)}ia&&((na=D)&&0!=na.length?(pa=new Ga,pa.buildTree(na),na=pa.getRootArray(),pa=[],V(na,0,pa),D=pa):D=void 0)}I();L=!0},function(ma,na,pa){L=!0;ba(na,pa);return!0}),S.setBlockingJqUi(E),S.getConstantValueFromSource(H.buildConstantQueryParams(k,l)))},V=function(S,ma,na){for(var pa=0;pa<S.length;pa++){var qa=
S[pa];qa.setLevel(ma);na.push(qa);(qa=qa.getChildren())&&V(qa,ma+1,na)}},T=function(S){var ma={};ma.FIELD_ALIAS=R.get("displayText","\u663e\u793a\u6587\u672c");ma.FIELD_NAME=R.get("value","\u503c");S=S.getArrNameAliasPairs();for(var na={},pa=0;pa<S.length;pa++){var qa=S[pa],La=qa.getName();qa=qa.getAlias();var xb={},Nb=La+"_"+qa;na[Nb]||(na[Nb]=!0,xb.FIELD_NAME=La,xb.FIELD_ALIAS=qa,Nb=new Ka,Nb.setText(qa),Nb.setValue(La),Nb.setId(La),Nb.setEntry(xb),Nb.setEntryHeadMap(ma),D.push(Nb))}};this.setMultiSelect=
function(S){ua=S};this.setSelectedModel=function(S){X=S};this.setConfirmCallback=function(S){v=S};this.setMaxSelect=function(S){y=S};this.getDefaultValue=function(){for(var S="",ma=c.getSelected(),na=0;na<ma.length;na++)S=na===ma.length-1?S+ma[na].getValue():S+(ma[na].getValue()+Va.SPLIT);return S};this.getDefaultAlias=function(){for(var S="",ma=c.getSelected(),na=0;na<ma.length;na++)S=na===ma.length-1?S+ma[na].getText():S+(ma[na].getText()+Va.SPLIT);return S}}function db(h){ea.call(this,h);var d=
this.protectedMethod,l=new Sa;this.protectedCreateItemUi=function(m,p,q,c){var D=p.getValue();m=d.isSelected(D);q=new Ub;q.setText(p.getText());q.setChecked(m);q.addCheckedListener(function(H,L){L&&d.selectOnlyOne(D)});l.addElement(q);return q.getJqUi()}}function Ma(h){ea.call(this,h);var d=this,l=this.protectedMethod,m=!0,p,q,c;this.protectedInitBar=function(L,X,ua){c=new Xb;c.setText(R.get("includeSubs","\u9009\u62e9\u65f6\u5305\u542b\u4e0b\u7ea7\u8282\u70b9"));c.setChecked(m);c.addCheckedListener(H);
var ia=c.getJqUi(),z=Z.isEnglish()?161:130;b.layoutCtrlWithLRTB(ia,null,0,z,30,null,21);ia.appendTo(L);p=new Xb;p.setText(R.get("selectAll","\u5168\u9009"));p.setChecked(X);p.addCheckedListener(function(v,y){if(y){v=v.isChecked();for(y=0;y<ua.getRowsCount();y++){var x=ua.getRow(y);if(!x.isHide()||c.isEnabled()&&c.isChecked())x=x.getCell(0).getValue(),l.select(x.getValue(),v)}d.resetScrollStatus(ua);ua.updateUI(!0);D()}});ia=p.getJqUi();X=Z.isEnglish()?26:0;b.layoutCtrlWithLRTB(ia,0,null,50+X,30,null,
21);ia.appendTo(L);q=new Pb;D();ia=q.getJqUi();b.layoutCtrlWithLRTB(ia,60+X,null,110,30,null,21);ia.find(".sa-ctrl-label-text").css({overflow:"visible"});ia.appendTo(L)};this.protectedGetBarHeight=function(){return 58};this.protectedAfterUpdateTree=function(L,X){p.setChecked(L);c.setEnabled(!X)};this.protectedIsIncludeSubs=function(){return m};this.protectedCreateItemUi=function(L,X,ua,ia){var z=X.getValue();z=l.isSelected(z);var v=new Xb;v.setUserObject(ua);v.setText(X.getText());v.setChecked(z);
v.addCheckedListener(function(y,x){if(x){x=y.getUserObject();y=y.isChecked();var Q=L.getRow(x).getCell(0),E=Q.getValue();l.select(E.getValue(),y);if(m&&!ia()){E=Q.getTreeModel();var k=E.getLevel();for(x+=1;x<L.getRowsCount();x++){Q=L.getRow(x).getCell(0);E=Q.getTreeModel();if(E.getLevel()<=k)break;E=Q.getValue();l.select(E.getValue(),y)}}L.updateUI(!0);x=!0;y=!1;for(Q=0;Q<L.getRowsCount();Q++)if(k=L.getRow(Q),!k.isHide()&&(y=!0,k=k.getCell(0).getValue(),!l.isSelected(k.getValue()))){x=!1;break}p.setChecked(y&&
x);D()}});return v.getJqUi()};var D=function(){var L=0;for(var X=d.getSelectableItems(),ua=0;ua<X.length;ua++)l.isSelected(X[ua].getValue())&&L++;L=R.get("selectedCount","(\u5df2\u9009\u62e9#1\u9879)").replace("#1",L);q.setText(L)},H=function(L,X){X&&(m=L.isChecked())}}function ea(h){function d(k){KTDefaultTreeHandlerRender.call(this,k);var I=this.create;this.create=function(ba,da,V,T,S,ma,na){return x()?[]:I(ba,da,V,T,S,ma,na)}}function l(k){KTDefaultCellRender.call(this,k);var I=this;this.paintCellUI=
function(ba,da){var V=I.getCell().getValue(),T=I.getCurrentRowIdx();V=p.protectedCreateItemUi(k,V,T,x);V.css("overflow","visible");V.children().css("overflow","visible");ba=$(ba);ba.css("overflow","visible");da?(da=$(da),da.css("overflow","visible"),V.appendTo(da),b.layoutCtrlWithLRTB(V,4,0,null,0,null,"100%")):(V.appendTo(ba),b.layoutCtrlWithLRTB(V,0,0,null,0,null,"100%"))}}var m=23,p=this,q,c,D,H=!1,L=[],X=[],ua;this.getJqUi=function(){if(!q){q=$("<div>");for(var k={},I=0,ba=X.length;I<ba;I++)X[I].getValue()&&
(k[X[I].getValue()]=!0);c=k;H=!1;k=new KTable;k.setCellRender(new l(k));k.setTreeHandlerRender(new d(k));k.setSyncUIWhenModelChanged(!1);L&&1024<=L.length?k.setLargeDataMode(!0,!1):k.setLargeDataMode(!1);k.addColumn().setWidth(320);I=new KTStyle;I.setVerticalAlign("middle");k.setStyle(I);var da=L;if(0==da.length)I=!1;else{I=!0;var V=E(),T=!V;for(ba=0;ba<da.length;ba++){var S=da[ba],ma=Q(S.getValue()),na=k.addRow();na.setHeight(m);var pa=na.getCell(0);pa.setValue(S);S=S.getLevel();S=new KTCellTreeModel(S);
T&&z(na,S);pa.setTreeModel(S);I=I&&ma}if(V){var qa;da={};for(ba=k.getRowsCount()-1;0<=ba;ba--){na=k.getRow(ba);pa=na.getCell(0);V=pa.getTreeModel();T=V.getLevel();S=pa.getValue();if(Q(S.getValue())){na.setHide(!1);var La=S.getParentId();(pa=da[T])&&0!=pa.length||(pa=[]);pa.push(S);da[T]=pa}if(qa&&qa===T+1)if((pa=da[qa])&&0<pa.length){ma=!1;for(qa=0;qa<pa.length;qa++){var xb=pa[qa];if(La===S.getId()||xb&&xb.getParentId()===S.getId()){ma=!0;break}}if(ma){var Nb=!0;V.setExpanded(!0);na.setHide(!1);(pa=
da[T])&&0!=pa.length||(pa=[]);pa.push(S);da[T]=pa}else V.setExpanded(!1)}else V.setExpanded(!1);0===ba&&Nb&&(na.setHide(!1),V.setExpanded(!0));qa=T}na=0;La=Object.values(da);for(ba=0;ba<La.length;ba++)for(Nb=La[ba],qa=0;qa<Nb.length;qa++)S=Nb[qa],na=S.getLevel()>na?S.getLevel():na;for(ba=k.getRowsCount()-1;0<=ba;ba--)if(na=k.getRow(ba),pa=na.getCell(0),V=pa.getTreeModel(),S=pa.getValue(),La=V.getLevel(),(Nb=da[La])&&0<Nb.length){pa=!1;for(qa=0;qa<Nb.length;qa++)if((T=Nb[qa])&&T.getParentId()===S.getParentId()){pa=
!0;break}pa?(na.setHide(!1),La<h-1&&V.setExpanded(!0)):z(na,V)}else z(na,V)}}k.updateUI();ba=p.protectedGetBarHeight()+6;na=$(k.getUI());b.layoutCtrlWithLRTB(na,0,0,null,ba,0,null);q.append(na);k=[I,k];ia(k[0],k[1])}return q};this.setSelectableItems=function(k){L=k};this.getSelectableItems=function(){return L};this.setSelected=function(k){X=k};this.getSelected=function(){var k=[];if(!c)return k;for(var I=0,ba=L.length;I<ba;I++){var da=L[I].getValue();c[da]&&k.push(L[I])}return k};this.setItemHeight=
function(k){m=k};this.protectedIsIncludeSubs=function(){return!1};this.resetScrollStatus=function(k){if(k&&k.isLargeDataMode()){var I=k.keepScrollStatus();I.v&&(I.v=0);k.restoreScrollStatus(I)}};var ia=function(k,I){var ba=$("<div>");ba.css("border-bottom","1px solid #eee");var da=p.protectedGetBarHeight();b.layoutCtrlWithLRTB(ba,0,0,null,0,null,da);D=new Ib;D.setSearchingHandler(function(){var T=v(I);p.resetScrollStatus(I);I.updateUI(!0);y(T)});da=D.getJqUi();b.layoutCtrlWithLRTB(da,0,null,"66%",
0,null,23);da.css({"min-width":"214px !important","max-width":"500px !important"});da.appendTo(ba);da=new Xb;da.setText(R.get("showOnlySelected","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));da.setChecked(H);da.addCheckedListener(function(T,S){S&&(H=T.isChecked(),T=v(I),p.resetScrollStatus(I),I.updateUI(!0),y(T))});da=da.getJqUi();var V=Z.isEnglish()?139:107;b.layoutCtrlWithLRTB(da,null,23,V,0,null,21);da.appendTo(ba);p.protectedInitBar(ba,k,I);ba.appendTo(q)};this.protectedInitBar=function(k,I,ba){};
this.protectedGetBarHeight=function(){return 30};var z=function(k,I){I.getLevel()<h-1?(I.setExpanded(!0),k.setHide(!1)):I.getLevel()===h-1?(I.setExpanded(!1),k.setHide(!1)):(I.setExpanded(!1),k.setHide(!0))},v=function(k){for(var I=x(),ba=!0,da=!1,V=65535,T=!1,S=0;S<k.getRowsCount();S++){var ma=k.getRow(S),na=ma.getCell(0),pa=na.getTreeModel(),qa=!0;pa.getLevel()<=V&&(qa=!1);var La=na.getValue();na=Q(La.getValue());La=H&&!na||D.isSearching()&&!D.check(La.getText());var xb=qa;xb=I?La:xb;ma.setHide(xb);
xb||(T=!0);La||(da=da||na,ba=ba&&na);qa||(V=pa.isExpanded()?65535:pa.getLevel())}p.protectedAfterUpdateTree(da?ba:!1,I);return T};this.protectedAfterUpdateTree=function(k,I){};this.protectedCreateItemUi=function(k,I,ba,da){throw Error("Override");};var y=function(k){k?(ua&&ua.remove(),ua=null):ua||(k=new Pb,k.setText(R.get("nothingSearched","\u627e\u4e0d\u5230\u7b26\u5408\u7684\u7ed3\u679c")),k.setEnabled(!1),ua=k.getJqUi(),b.layoutCtrlWithLRTB(ua,0,0,null,60,null,16),k.setAlign(Pb.ALIGN_CENTER),
ua.appendTo(q))},x=function(){return H||D&&D.isSearching()},Q=function(k){return 1==c[k]},E=function(){if(c&&0<Object.keys(c).length){var k=L;if(0==k.length)return!1;for(var I=0;I<k.length;I++)if(Q(k[I].getValue()))return!0}return!1};this.protectedMethod={isSelected:Q,select:function(k,I){I?c[k]=!0:delete c[k]},selectOnlyOne:function(k){c={};c[k]=!0}}}function W(h,d){za.call(this);var l=this.protectedMethod,m=h,p=d;this.setSelectableItems=function(q){m=q};this.setSelected=function(q){p=q};this.protectedGetSelectableItems=
function(){return m};this.protectedCloneSelectedValue=function(){var q={};if(p)for(var c=0,D=p.length;c<D;c++)q[p[c].getValue()]=!0;return q};this.getSelected=function(){var q=l.acceptSelectingResult(),c=[];if(!q)return c;for(var D=0,H=m.length;D<H;D++){var L=m[D].getValue();if(q[L]){c.push(m[D]);break}}return c}}function za(){Jb.call(this);var h=this.protectedMethod,d=new Sa;this.protectedItemCreator=function(m){var p=m.getValue();p=h.isSelected(p);var q=new Ub;q.addCheckedListener(l);q.setUserObject(m);
q.setChecked(p);d.addElement(q);return q.getJqUi()};var l=function(m,p){p&&(m.isChecked()?(m=m.getUserObject(),h.selectOnlyOne(m.getValue())):m.setChecked(!0))}}function ya(h,d){Da.call(this);var l=this.protectedMethod,m=h,p=d;this.setSelectableItems=function(q){m=q};this.setSelected=function(q){p=q};this.protectedGetSelectableItems=function(){return m};this.protectedCloneSelectedValue=function(){var q={};if(p)for(var c=0,D=p.length;c<D;c++)q[p[c].getValue()]=!0;return q};this.getSelected=function(){var q=
l.acceptSelectingResult(),c=[];if(!q)return c;for(var D=0,H=m.length;D<H;D++){var L=m[D].getValue();q[L]&&c.push(m[D])}return c}}function Da(){Jb.call(this);var h=this,d=this.protectedMethod,l,m=[],p;this.protectedInitBar=function(L){l=new Xb;l.setText(R.get("selectAll","\u5168\u9009"));l.addCheckedListener(H);var X=l.getJqUi();b.layoutCtrlWithLRTB(X,0,null,80,30,null,21);X.appendTo(L);p=new Pb;X=p.getJqUi();b.layoutCtrlWithLRTB(X,80,0,null,30,null,21);X.find(".sa-ctrl-label-text").css({overflow:"visible"});
X.appendTo(L);q();return 55};this.protectedItemCreator=function(L){var X=L.getValue();X=d.isSelected(X);var ua=new Xb;ua.addCheckedListener(D);ua.setUserObject(L);ua.setChecked(X);h.protectedIsExcludeMode()&&ua.setCustomStyle("text-decoration","line-through");m.push(ua);return ua.getJqUi()};this.protectedIsExcludeMode=function(){return!1};this.protectedAfterUpdateTable=function(){c()};var q=function(){var L=0;for(var X=h.protectedGetSelectableItems(),ua=0;ua<X.length;ua++)d.isSelected(X[ua].getValue())&&
L++;L=R.get("selectedCount","(\u5df2\u9009\u62e9#1\u9879)").replace("#1",L);p.setText(L)},c=function(){var L=!0,X=!1;d.visitAllVisibleSelectableItems(function(ua){var ia=!1;X=!0;d.isSelected(ua.getValue())||(L=!1,ia=!0);return ia});l.setChecked(X&&L)},D=function(L,X){if(X){X=L.getUserObject();L=L.isChecked();for(var ua=0;ua<m.length;ua++)m[ua]&&m[ua].getUserObject().getValue()===X.getValue()&&m[ua].setChecked(L);d.select(X.getValue(),L);c();q()}},H=function(L,X){if(X){var ua=L.isChecked();for(L=0;L<
m.length;L++)m[L]&&m[L].setChecked(ua);d.visitAllVisibleSelectableItems(function(ia){d.select(ia.getValue(),ua)});q()}}}function Jb(){function h(V){KTDefaultCellRender.call(this,V);var T=this,S=this.paintCellUI;this.paintCellUI=function(ma,na){var pa=T.getCurrentRowIdx(),qa=T.getCurrentRow(),La=T.getCurrentColIdx(),xb=qa.getUserObject(),Nb=x&&-1!=x.indexOf(La-1);pa<r.getHeadRowCount()?Nb&&1==pa?(La=qa.getCell(La).getValue(),Nb=new gc,Nb.setIconType(gc.ICON_TYPE_QUESTION),Nb.setTipsText(R.get("noFieldPermTips",
"\u60a8\u6ca1\u6709\u6743\u9650\u67e5\u770b\u8be5\u5b57\u6bb5\u6570\u636e\u3002")),Nb=Nb.getJqUi(),Nb.css({display:"inline-block",margin:"5px 0 0 3px"}),na=$("<div>"),na.attr("title",La),na.text(La),na.css({"margin-top":"5px",display:"inline-block"}),na.appendTo(ma),Nb.appendTo(ma)):S(ma,na):0==La?(La=l.protectedItemCreator(xb),La.css({position:"absolute",left:"30%",top:"2px",width:"23px",height:"23px"}),La.appendTo(ma)):(na=xb.getEntry(),La=Nb?"***":na?na[X[La-1]]:"",Nb=$("<div>"),Nb.attr("title",
La),Nb.text(La),Nb.css({"line-height":"28px","padding-left":"10px","padding-right":"10px","text-align":"left",overflow:"hidden","text-overflow":"ellipsis"}),Nb.appendTo(ma))}}function d(){KTableUIDraggableAdjustingHandler.CustomExpendor.call(this);this.getTailBlankForDragging=function(){return 10}}var l=this,m,p,q,c,D,H,L,X,ua=[],ia,z,v,y={},x=[];this.getJqUi=function(){if(!m){var V=m=$("<div>");p=V;y=l.protectedCloneSelectedValue();z=!1;var T=$("<div>");T.appendTo(V);ia=new Ib;ia.setSearchingHandler(ba);
var S=ia.getJqUi();b.layoutCtrlWithLRTB(S,0,null,"66%",0,null,23);S.css({"min-width":"214px !important","max-width":"500px !important"});S.appendTo(T);S=new Xb;S.setText(R.get("showOnlySelected","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));S.setChecked(z);S.addCheckedListener(da);S=S.getJqUi();var ma=Z.isEnglish()?140:106;b.layoutCtrlWithLRTB(S,null,0,ma,0,null,21);S.appendTo(T);S=l.protectedInitBar(T);b.layoutCtrlWithLRTB(T,0,0,null,0,null,S);c=new KTable;c.setFrozenRows(r.getHeadRowCount());c.setDraggableAdjusting(!0,
r.getHeadRowCount(),0,new d);T=new KTStyle;T.setVerticalAlign("middle");T.setFontSize(Vb.getFontSize());T.setFontUnit("px");T.setFontName(Vb.getFontName());T.setColor(com.kingdee.bos.qing.common.CommonTableSkin.COLOR);c.setStyle(T);T=new h(c);T.setOutsideVisible(!1);c.setCellRender(T);c.setSyncUIWhenModelChanged(!1);T=S+6;D=$(c.getUI());b.layoutCtrlWithLRTB(D,0,0,null,T,0,null);D.appendTo(V)}return m};this.setNoPermFieldIndex=function(V){x=V};this.protectedGetSelectableItems=function(){throw Error("Impl");
};var Q=function(){v&&1024<=v.length?c.setLargeDataMode(!0,!1):c.setLargeDataMode(!1);var V=v[0].getEntryHeadMap();L||(V?(L=Object.values(V),X=Object.keys(V)):((V=v[0].getEntry())||(V=l.protectedGetSelectableItems()[0].getEntry()),L=Object.keys(V),X=Object.keys(V)));H=L.length+1;if(0==ua.length){var T=v,S,ma;V=[];for(S=0;S<L.length;S++)V[S]=0;for(S=0;S<T.length;S++){var na=T[S].getEntry();for(ma=0;ma<L.length;ma++){var pa=na[X[ma]];20>S&&(pa=pa?pa.toString().length:0,pa=200<pa?200:pa,pa=10>pa?10:
pa,V[ma]+=pa)}}if(0==T.length)for(S=0;S<L.length;S++)V[S]+=L[S].length+10;S=0;ma=[];na=20<=v.length?20:v.length;na=0===na?1:na;for(T=0;T<L.length;T++){pa=V[T]/na;var qa=L[T]?L[T].length:0;pa=pa<qa?qa:pa;S+=pa;ma.push(pa)}for(T=0;T<L.length;T++)ua.push(ma[T]/S)}c.addColumns(H);T=r.createHeadRow(c);c.getColumn(0).setWidth(32);for(V=1;V<H;V++)S=V-1,ma=556,na=140,pa=L.length*na,ma||(ma=pa),qa=Math.floor(ma/pa),2<=qa&&(na*=qa,pa=L.length*na),S=pa<ma&&S===L.length-1?ua[S]*na*L.length+(ma-pa):ua[S]*na*L.length,
c.getColumn(V).setWidth(S),T.getCell(V).setValue(L[V-1].toUpperCase());for(V=0;V<v.length;V++)T=v[V],r.createRow(c).setUserObject(T)},E=function(){r.clear(c);var V=l.protectedGetSelectableItems();if(ia.isSearching()||z){var T=ia.getSelectedSearcherImplLogic();v=$.grep(V,function(S){var ma=!1,na=!z||I(S.getValue());S=S.getEntry();for(var pa=Object.keys(S).length,qa=0;qa<pa;qa++)if(S[X[qa]]&&(ma=ia.check(""+S[X[qa]])),T){if(ma)break}else if(!ma)break;return ma&&na})}else v=V;0<v.length&&Q();1<c.getRowsCount()&&
(V=new KTBorderStyle,V.setLeftBorderWidth(0),c.getRow(1).getCell(0).setBorder(V));c.updateUI();l.protectedAfterUpdateTable()};this.protectedAfterUpdateTable=function(){};this.updateTable=function(){E()};this.protectedCloneSelectedValue=function(){throw Error("Impl");};this.protectedItemCreator=function(V){throw Error("Impl");};this.protectedInitBar=function(V){return 28};this.setItemHeight=function(V){};var k=function(){if(0==v.length){if(!q){var V=new Pb;V.setText(R.get("nothingSearched","\u627e\u4e0d\u5230\u7b26\u5408\u7684\u7ed3\u679c"));
V.setEnabled(!1);q=V.getJqUi();b.layoutCtrlWithLRTB(q,0,0,null,60,null,16);V.setAlign(Pb.ALIGN_CENTER);q.appendTo(p)}}else q&&q.remove(),q=null},I=function(V){return 1==y[V]},ba=function(){E();k()},da=function(V,T){z=V.isChecked();E();k()};this.protectedMethod={visitAllVisibleSelectableItems:function(V){for(var T=0;T<v.length&&!V(v[T]);T++);},isSelected:I,select:function(V,T){T?y[V]=!0:delete y[V]},selectOnlyOne:function(V){y={};y[V]=!0},acceptSelectingResult:function(){return y},protectedUpdateTable:E}}
function Ib(){Pa.call(this);var h=this.protectedMethod,d;this.protectedInitUi=function(l,m){var p=new Pb;p.setText(R.get("search","\u641c\u7d22"));var q=h.createAllSearchImpl();d=q[0];h.changeSearchImpl(q[0],!1);var c=new cc;c.setItemModels(q);c.setSelected(q[0]);c.setCustomPainter(function(D,H,L){L&&H.text(L.getCaption())});c.addSelectedChangedListener(function(D,H,L){d=L;h.changeSearchImpl(L,!0)});p=p.getJqUi();c=c.getJqUi();q=Z.isEnglish()?10:0;b.layoutCtrlWithLRTB(p,0,null,40+q,0,null,23);b.layoutCtrlWithLRTB(c,
33+q,null,74,0,null,23);b.layoutCtrlWithLRTB(m,114+q,null,"45%",0,null,23);m.css({"min-width":"100px !important","max-width":"278px !important","margin-right":"5px"});l.append(p);l.append(c);l.append(m)};this.getSelectedSearcherImplLogic=function(){return d.getLogic()}}function Pa(){var h=this,d,l,m,p;this.setSearchingHandler=function(c){p=c};this.isSearching=function(){return l&&l.getText()?!0:!1};this.check=function(c){return!(l&&l.getText())||m.check(c.toLowerCase(),(l?l.getText():null).toLowerCase())};
this.clear=function(){l&&l.clear()};this.getJqUi=function(){d||(d=$("<div>"),h.protectedInitUi(d,q().getJqUi()));return d};this.protectedInitUi=function(c,D){throw Error("Implement");};var q=function(){l=new a;l.setPlaceholder(R.get("searchTips","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));l.addSearchListener(function(c){p()});l.setSearchListenerDelay(1E3);return l};this.protectedMethod={createAllSearchImpl:function(){return[new tb(!0),new tb(!1),new gb(!0),new gb(!1),new Wa(!0),new Wa(!1),new fb(!0),
new fb(!1)]},changeSearchImpl:function(c,D){m=c;D&&p()}}}function vb(h){var d=this;this.getLogic=function(){return h};this.getCaption=function(){return d.protectedGetCaption(!h)};this.protectedGetCaption=function(l){throw Error("Override");};this.check=function(l,m){l=d.protectedCheckImpl(l,m);return h?l:!l};this.protectedCheckImpl=function(l,m){throw Error("Override");}}function tb(h){vb.call(this,h);this.protectedGetCaption=function(d){return d?R.get("searchNotInclude","\u4e0d\u5305\u542b"):R.get("searchInclude",
"\u5305\u542b")};this.protectedCheckImpl=function(d,l){return 0<=d.indexOf(l)}}function fb(h){vb.call(this,h);this.protectedGetCaption=function(d){return d?R.get("searchNotEqual","\u4e0d\u7b49\u4e8e"):R.get("searchEqual","\u7b49\u4e8e")};this.protectedCheckImpl=function(d,l){return d===l}}function gb(h){vb.call(this,h);this.protectedGetCaption=function(d){return d?R.get("searchNotStartOf","\u5f00\u5934\u4e0d\u662f"):R.get("searchStartOf","\u5f00\u5934\u662f")};this.protectedCheckImpl=function(d,l){return 0==
d.indexOf(l)}}function Wa(h){vb.call(this,h);this.protectedGetCaption=function(d){return d?R.get("searchNotEndOf","\u7ed3\u5c3e\u4e0d\u662f"):R.get("searchEndOf","\u7ed3\u5c3e\u662f")};this.protectedCheckImpl=function(d,l){var m=d.lastIndexOf(l);return 0<=m&&m==d.length-l.length}}function Ka(){var h,d,l,m,p,q,c,D;this.setEntry=function(H){c=H};this.getEntry=function(){return c};this.setEntryHeadMap=function(H){D=H};this.getEntryHeadMap=function(){return D};this.setLevel=function(H){q=H};this.getLevel=
function(){return q};this.setValue=function(H){h=H};this.getValue=function(){return h};this.setText=function(H){d=H};this.getText=function(){return d};this.setId=function(H){l=H};this.getId=function(){return l};this.setParentId=function(H){m=H};this.getParentId=function(){return m};this.setChildren=function(H){p=H};this.getChildren=function(){return p};this.addChild=function(H){if(!(H instanceof Ka))throw Error("Illegal argument. Argument should be instanceof ValueTextTreeNodeModel");null==p&&(p=
[]);p.push(H)};this.addChildren=function(H){if(!(H instanceof Array))throw Error("Illegal argument.");null==p&&(p=[]);p.concat(H)};this.toJsonObject=function(){var H={};H.value=this.getValue();H.text=this.getText();H.id=this.getId();H.parentId=this.getParentId();H.children=this.getChildren();return H};this.fromJsonObject=function(H){var L=H.value;L=(new B).fromJsonEscapeString(L);this.setValue("null"==L?null:L);L=H.text;L=(new B).fromJsonEscapeString(L);this.setText("null"==L?null:L);L=H.id;L=(new B).fromJsonEscapeString(L);
this.setId("null"==L?null:L);L=H.parentId;L=(new B).fromJsonEscapeString(L);this.setparentId("null"==L?null:L);H=H.children;this.setChildren("null"==H?null:H)};this.toJsonString=function(){var H='{"value":',L=this.getValue();L||""===L?(L=(new B).toJsonEscapeString(L),H+='"'+L+'"'):H+="null";H+=',"text":';(L=this.getText())||""===L?(L=(new B).toJsonEscapeString(L),H+='"'+L+'"'):H+="null";return H+"}"}}function rb(){var h,d;this.setValue=function(l){h=l};this.getValue=function(){return h};this.setText=
function(l){d=l};this.getText=function(){return d};this.toJsonObject=function(){var l={};l.value=this.getValue();l.text=this.getText();return l};this.fromJsonObject=function(l){var m=l.value;m=(new B).fromJsonEscapeString(m);this.setValue("null"==m?null:m);l=l.text;l=(new B).fromJsonEscapeString(l);this.setText("null"==l?null:l)};this.toJsonString=function(){var l='{"value":',m=this.getValue();m||""===m?(m=JSON.stringify(m),l+=m):l+="null";l+=',"text":';(m=this.getText())||""===m?(m=JSON.stringify(m),
l+=m):l+="null";return l+"}"}}function Ga(){var h;this.getRootArray=function(){return h};this.buildTree=function(d){if(!(d instanceof Array))throw Error("Illegal argument.");h=[];if(d&&0!=d.length){if(!(d[0]instanceof Ka))throw Error("Illegal argument. Elements in Array should be instance of ValueTextTreeNodeModel.");for(var l=d.length,m={},p,q,c=0;c<l;c++)p=d[c],q=p.getId(),q||(q="treeAutoId_"+c,p.setId(q)),m[q]=p;for(c=0;c<l;c++)p=d[c],q=null,p.getParentId()&&(q=m[p.getParentId()]),q?q.addChild(p):
h.push(p)}};this.clear=function(){h=[]}}function la(h,d,l){f.call(this);var m=this;(function(){m.setSelectedModel(h);m.setCustomPainter(function(p,q){if(!p)return q.text(""),"";q.text(p.getPatternText())});m.setDropdownCreator(function(p,q,c){var D=new Gb;D.setAllField(d);return D.createJqUi(p,q,c)});m.addSelectionListener(function(p,q,c){(p=p.getSelectedModel())&&l(p)})})()}function ib(){var h;this.setSyncSearchingUI=function(d){h=d};this.getTailBlankForDragging=function(){return-1};this.isRowDraggable=
function(d,l){return!1};this.isColumnDraggable=function(d,l){return 0===l||d.getColumnsCount()==l+1?!1:!0};this.getMinRowHeightLimited=function(d,l){return 3};this.getMinColumnWidthLimited=function(d,l){return 4};this.rowDraggedAction=function(d,l,m){var p=d.isSyncUIWhenModelChanged();d.setSyncUIWhenModelChanged(!0);l=d.getRow(l);l.setHeight(l.getHeight()+m);d.setSyncUIWhenModelChanged(p)};this.setMinColumnWidth=function(d){};this.columnDraggedAction=function(d,l,m){var p=d.isSyncUIWhenModelChanged();
d.setSyncUIWhenModelChanged(!0);l=d.getColumn(l);l.setWidth(l.getWidth()+m);d.setSyncUIWhenModelChanged(p);h&&h()}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.ctrl&&
(com.kingdee.bos.extreport.datasetdesigner.ctrl={});NS=com.kingdee.bos.extreport.datasetdesigner.ctrl;NS.AbstractTypeRender=ha;NS.NormalAdvancedArea=xa;NS.OptionalTable=sb;NS.DialogMainTable=w;NS.LinkageRender=U;NS.DataSetModel=Za;NS.MacroSelectDialog=Tb;NS.MacroAndSysTemVarSelectDialog=Ab;NS.FieldChoosePane=Gb;NS.AbstractBindSourceRender=function(h,d,l,m){function p(ta){KTDefaultCellRender.call(this,ta);var mb=this,jb=this.paintCellUI,qb;this.paintCellUI=function(Kb,Lb){var ac=mb.getCurrentRowIdx(),
ic=mb.getCurrentRow(),kc=mb.getCurrentColIdx(),nc=ic.getUserObject(),oc=ac-r.getHeadRowCount(),sc=sa();ac<r.getHeadRowCount()?(jb(Kb,Lb),1===ac&&0===kc&&(Lb=qb&&qb.isChecked()?!0:!1,qb=new Xb,qb.setChecked(Lb&&0<sa().length),qb.setUserObject([]),qb.addCheckedListener(function(pc,tc){if(tc)if(tc=pc.isChecked(),pc=pc.getUserObject(),tc){x={};for(var vc=0;vc<sc.length;vc++){x[vc]=sc[vc];var zc=pc[vc];zc.setChecked(tc)}}else for(x={},vc=0;vc<pc.length;vc++)zc=pc[vc],zc.setChecked(tc)}),Lb=qb.getJqUi(),
b.layoutCtrlCenterAlign(Lb,14),b.layoutCtrlWithLRTB(Lb,null,null,14,null,null,null),$(Kb).append(Lb))):0===kc?(Kb=$(Kb),kc=new Xb,kc.setUserObject(nc),(Lb=qb&&qb.isChecked())?(kc.setChecked(Lb),x[oc]=sc[oc]):x[oc]?kc.setChecked(!0):kc.setChecked(!1),Lb=kc.getJqUi(),kc.addCheckedListener(function(pc,tc){tc&&(pc=pc.isChecked(),tc=sa(),pc?(x[oc]=nc,Object.keys(x).length===tc.length&&qb.setChecked(!0)):(delete x[oc],qb.setChecked(!1)))}),qb&&qb.getUserObject().push(kc),b.layoutCtrlCenterAlign(Lb,14),
b.layoutCtrlWithLRTB(Lb,null,null,14,2,null,null),Kb.append(Lb)):(ac=$(Kb),ic=mb.getCell().getValue(),ac.text(ic),ac.css({"text-align":"center","line-height":"25px"}),2!==kc&&3!==kc||rc(),jb(Kb,Lb))}}ha.call(this,d,l);xa.call(this,h,d,m);var q=this,c=d.getCtrlObject(),D,H=[],L=Y.BINDSOURCE_ALIAS,X=Y.BINDSOURCE_NAME,ua=!1,ia,z,v,y,x={},Q={},E,k,I,ba,da=Va.SPLIT,V;this.protectedInit=function(ta){lb()||c.getBindSourceType()===Ba.SYSTEM&&Eb();q.protectedCreateSupplyArea(ta);q.protectedCreateDefaultArea(ta,
!0);q.protectedCreateAdvancedArea(ta);lb()||(c.getBindSource()instanceof wb?(ta=c.getBindSource(),Db(ta.getId(),ta.getGroupId(),ta.getUserId(),ta.getGroupName(),ta.getName())):c.getBindSource()instanceof Ob&&Rb(c.getBindSource().getMacroId()));c.getDefaultValueType()==Va.VARIABLE&&c.getDefaultValue()&&Qb();q.protectedUpdataDefaultUI()};this.protectedRefreshUi=function(){var ta=c.getException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+cb.SOURCE_BIND);ta&&(E.attr("title",ta),E.show());if(ta=yb("$VALUE_FIELD"))k.attr("title",
ta),k.show();if(ta=yb("$DISPLAY_FIELD"))k.attr("title",ta),k.show();if(ta=Wb())ba.attr("title",ta),ba.show();c.getBindSourceType()===Ba.SELF&&0<D.prop("offsetWidth")&&ja();q.refreshLinkageUi()};this.protectedCreateSupplyArea=function(ta){var mb=q.getCtrlGap(),jb=q.getCtrlHeight();D||(D=$("<div>"));D.css({position:"relative",width:"100%"});var qb=q.createTitle(R.get("supplyValueSetting","\u5907\u9009\u503c\u8bbe\u7f6e"),0);D.append(qb);qb=0+(mb+jb);var Kb=new Pb,Lb=R.get("sourceType","\u6765\u6e90\u7c7b\u578b");
Kb.setText(Lb);Lb=new cc;Lb.setItemModels(q.getArrBindType());Lb.setCustomPainter(function(ac,ic,kc){ac=$("<div>");ac.text(Ba.sourceTypeToName(kc));ic.append(ac)});Lb.addSelectedChangedListener(function(ac,ic,kc){ic!==kc&&(c.setBindSourceType(kc),c.clearDataSourcePropAndException(),H=[],kc===Ba.SYSTEM?(ac=Mb.createBindSource(Ba.SYSTEM,d.getModel()),ac.setSourceName(X[0]),ac.setSourceAlias(L[0]),c.setBindSource(ac),Eb(),$a()):(kc===Ba.SELF?(ac=Mb.createBindSource(Ba.SELF,d.getModel()),ac.setNameAliasPair([]),
c.setBindSource(ac)):c.setBindSource(null),d.addException(wa.PARAM_CLIENT_ERROR,d.getName(),R.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002"))),xc(),m())});Lb.setSelected(c.getBindSourceType());Kb=Kb.getJqUi();Lb=Lb.getJqUi();q.decorateRow(Kb,Lb,qb);qb+=mb+jb;D.append(Kb);D.append(Lb);qb=qa(ta,D,qb);qb=La(ta,D,qb);qb=q.funCustomizeSupplyArea(ta,D,qb);D.css("height",qb);ta&&ta.append(D)};this.protectedCreateDefaultArea=function(ta){var mb=
q.getCtrlGap(),jb=q.getCtrlHeight();ia||(ia=$("<div>"));ia.css({position:"relative",width:"100%"});var qb=0,Kb=q.createTitle(R.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),qb);ia.append(Kb);qb+=mb+jb;var Lb=new Pb;Lb.setText(R.get("defaultValueType","\u9ed8\u8ba4\u503c\u7c7b\u578b"));Kb=new cc;Kb.setSelected(c.getDefaultValueType());Kb.setItemModels(q.getArrDefaultType());Kb.setCustomPainter(function(kc,nc,oc){kc=$("<div>");kc.text(Va.defaultTypeToName(oc));nc.append(kc)});Kb.addSelectedChangedListener(function(kc,
nc,oc){nc!==oc&&(c.setDefaultValueType(oc),c.clearDefaultRelativeChange(),m(d),rc())});Lb=Lb.getJqUi();var ac=Kb.getJqUi();q.decorateRow(Lb,ac,qb);qb+=mb+jb;ia.append(Lb);ia.append(ac);Zb();b.layoutCtrl(ba,90,qb+15);ia.append(ba);ac=R.get("defaultValue","\u9ed8\u8ba4\u503c");Lb=new Pb;Lb.setText(ac);Lb=Lb.getJqUi();Z.isEnglish()&&Lb.attr("title",ac);if(c.getDefaultValueType()===Va.CONSTANT){ac=new ca;T(ac);var ic=ac.getJqUi();q.decorateRow(Lb,ic,qb);qb+=mb+jb;ia.append(Lb);ia.append(ic)}else ac=new ca,
na(ac),ic=ac.getJqUi(),q.decorateRow(Lb,ic,qb),qb+=mb+jb,ia.append(Lb),ia.append(ic);pa()&&(Kb.setEnabled(!1),ac.setEnabled(!1));ia.css("height",qb);ta&&ta.append(ia)};var T=function(ta){var mb=ta.getJqUi();if(null!=c.getDefaultValue()){var jb=[];if(c.getBindSourceType()===Ba.SELF){var qb=ma();c.setDefaultValue(qb[0]);c.setDefaultAlias(qb[1])}qb=c.getDefaultValue()?c.getDefaultValue().split(da):[];for(var Kb=c.getDefaultAlias()?c.getDefaultAlias().split(da):qb.concat(),Lb=0;Lb<Math.max(qb.length,
Kb.length);Lb++){var ac=Lb<qb.length?qb[Lb]:"",ic=Lb<Kb.length?Kb[Lb]:"",kc=new rb;kc.setText(ic);kc.setValue(ac);jb.push(kc)}}ta.setClearable(!0);ta.setCustomPainter(function(nc){var oc="";nc&&0<nc.length?(oc=1<nc.length?R.get("moreConstant","\u5df2\u9009\u62e9 #1 \u7b49N\u4e2a\u5e38\u91cf").replace("#1",nc[0].getText()).replace("N",nc.length):R.get("selectConstant","\u5df2\u9009\u62e9\u5e38\u91cf #1").replace("#1",nc[0].getText()),mb.attr("title",oc)):mb.attr("title","");return oc});ta.setModel(jb&&
0<jb.length?jb:null);ta.addActionListener(function(){if(!pa()){var nc=new eb(h,d,H);nc.setMultiSelect(q.IsMultiSelect());nc.setSelectedModel(jb?jb:[]);nc.setMaxSelect(q.getMultiSelected());nc.setConfirmCallback(function(oc){jb=oc;oc=nc.getDefaultValue(jb);var sc=nc.getDefaultAlias(jb);c.setDefaultValue(oc);c.setDefaultAlias(sc);ta.setModel(jb);c.getBindSourceType()===Ba.SELF&&S();0<jb.length?ta.setClearable(!0):ta.setClearable(!1);$b();ba.hide()});nc.showDialog()}});ta.addClearListener(function(){hc();
jb=[];$b();ta.setModel(null);ba.hide()})},S=function(){Q={};for(var ta=c.getDefaultValue()?c.getDefaultValue().split(da):[],mb=c.getDefaultAlias()?c.getDefaultAlias().split(da):ta.concat(),jb=sa(),qb={},Kb=0;Kb<jb.length;Kb++){var Lb=jb[Kb],ac=Lb.getName()+"_"+Lb.getAlias();qb[ac]=Lb}for(Kb=0;Kb<Math.max(ta.length,mb.length);Kb++)ac=(Kb<ta.length?ta[Kb]:"")+"_"+(Kb<mb.length?mb[Kb]:""),qb[ac]&&(Q[ac]=qb[ac])},ma=function(){for(var ta=Object.keys(Q),mb="",jb="",qb={},Kb=0;Kb<ta.length;Kb++){var Lb=
Q[ta[Kb]];if(Lb.getName()||Lb.getAlias())mb+=Lb.getName()?Lb.getName():"",jb+=Lb.getAlias()?Lb.getAlias():"",qb[Lb.getName()+"_"+Lb.getAlias()]=Lb,Kb!=ta.length-1&&(mb+=da,jb+=da)}Q=qb;return[mb,jb]},na=function(ta){var mb=ta.getJqUi();ta.setClearable(!0);ta.setCustomPainter(function(jb){var qb="";jb?(jb=jb.split(da),qb=1<jb.length?qb+R.get("moreVariable","\u5df2\u9009\u62e9 #1 \u7b49N\u4e2a\u53d8\u91cf").replace("#1",jb[0]).replace("N",jb.length):R.get("selectVariable","\u5df2\u9009\u62e9\u53d8\u91cf #1").replace("#1",
jb[0]),mb.attr("title",qb)):mb.attr("title","");return qb});ta.setModel(c.getDefaultAlias());ta.addActionListener(function(){if(!pa()){var jb=new Ab(h,q.IsMultiSelect(),c.getDefaultValue());jb.setFunSelectCallBack(function(qb,Kb){c.setDefaultAlias(qb);c.setDefaultValue(Kb);ta.setModel(qb);$b();ba.hide()});jb.showDialog()}});ta.addClearListener(function(){hc();$b();ta.setModel(c.getDefaultAlias());ba.hide()})},pa=function(){return yc()||c.getBindSourceType()==Ba.SELF&&c.getBindSource().getArrNameAliasPairs&&
0==c.getBindSource().getArrNameAliasPairs().length};this.protectedCreateAdvancedArea=function(ta){q.createAdvancedArea(ta)};this.funCustomizeSupplyArea=function(ta,mb,jb){return jb};this.getOutputColumnsInSource=function(){return H};this.getArrBindType=function(){return[Ba.DATA_SET,Ba.MACRO,Ba.SYSTEM,Ba.SELF]};this.getArrDefaultType=function(){return[Va.CONSTANT,Va.VARIABLE]};this.IsMultiSelect=function(){return!1};this.getMultiSelected=function(){return null};this.protectedInitDefaultField=function(){};
var qa=function(ta,mb,jb){var qb=q.getCtrlGap(),Kb=q.getCtrlHeight(),Lb=new Pb;Lb.setText(R.get("dataSource","\u6570\u636e\u6e90"));Lb.setRequired(!0);if(c.getBindSourceType()===Ba.SELF){Lb.setText(R.get("supplyValue","\u5907\u9009\u503c"));var ac=$("<div>");ac.addClass("extreport-dataset-designer-param-btn-area");var ic=Yb("extreport-dataset-designer-param-btn",fc);ic.css("right","2px");ic.addClass("extreport-dataset-designer-param-btn-remove");C.background(ic,"delete");var kc=Yb("extreport-dataset-designer-param-btn",
jc);kc.css("right","24px");C.background(kc,"add");var nc=Yb("extreport-dataset-designer-param-btn",lc);nc.css("right","44px");C.background(nc,"down");var oc=Yb("extreport-dataset-designer-param-btn",qc);oc.css("right","66px");C.background(oc,"up");ac.append(ic);ac.append(kc);ac.append(nc);ac.append(oc);Lb=Lb.getJqUi();q.decorateRow(Lb,ac,jb);jb+=qb+Kb;mb.append(Lb);mb.append(ac);Nb(ta,mb,jb);S();setTimeout(function(){ja()},0);return jb}if(c.getBindSourceType()===Ba.SYSTEM){ta=new cc;ta.setItemModels(L);
(ac=c.getBindSource())&&ac.getSourceAlias()&&ta.setSelected(L[0]);ta.setCustomPainter(function(pc,tc,vc){tc.text(vc)});var sc=ta.getJqUi()}else c.getBindSourceType()===Ba.MACRO?(ta=new ca,ta.setModel(c.getBindSource()),ta.setCustomPainter(function(pc){return pc&&pc.getMacroId()?pc.getMacroId():""}),ta.addActionListener(function(){xb()}),sc=ta.getJqUi()):(ta=new ca,sc=ta.getJqUi(),ta.setModel(c.getBindSource()),ta.setCustomPainter(function(pc){var tc="";if(!pc||!pc.getId())return tc;pc instanceof wb&&
(tc=pc.getGroupName(),"100000"===pc.getUserId()?tc=R.get("presetDirectory","\u9884\u7f6e\u76ee\u5f55")+"/"+pc.getGroupName():ua&&(tc=R.get("myDirectory","\u6211\u7684\u76ee\u5f55")+"/"+pc.getGroupName()),tc+="/"+pc.getName(),sc.attr("title",tc));return tc}),ta.addActionListener(function(){Ia().showDialog()}));Lb=Lb.getJqUi();ta=c.getException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+cb.SOURCE_BIND);E=P.getErrorIcon(ta);ta||E.hide();b.layoutCtrl(E,90,jb+15);q.decorateRow(Lb,sc,jb);jb+=qb+Kb;mb.append(Lb);
mb.append(E);mb.append(sc);return jb},La=function(ta,mb,jb){ta=q.getCtrlGap();var qb=q.getCtrlHeight();if(c.getBindSourceType()!==Ba.SELF){var Kb=new Bb;Kb.setName(c.getValueFieldName());Kb.setAlias(c.getValueFieldAlias());var Lb=new Bb;Lb.setName(c.getDisplayFieldName());Lb.setAlias(c.getDisplayFieldAlias());var ac=new Pb;ac.setText(R.get("valueField","\u53d6\u503c\u5b57\u6bb5"));var ic=new Pb;ic.setText(R.get("showField","\u663e\u793a\u5b57\u6bb5"));var kc=new la(Kb,H,function(sc){c.getValueFieldName()!==
sc.getName()&&(kc.getJqUi().attr("title",sc.getPatternText()),q.protectedChooseValueField(sc))}),nc=new la(Lb,H,function(sc){c.getDisplayFieldName()!==sc.getName()&&(nc.getJqUi().attr("title",sc.getPatternText()),q.protectedChooseDisplayField(sc))});0===H.length&&(kc.setEnabled(!1),nc.setEnabled(!1));k=Sb("$VALUE_FIELD");I=Sb("$DISPLAY_FIELD");ac=ac.getJqUi();var oc=kc.getJqUi();oc.attr("title",Kb.getPatternText());Kb=ic.getJqUi();ic=nc.getJqUi();ic.attr("title",Lb.getPatternText());q.decorateRow(ac,
oc,jb);k&&(b.layoutCtrl(k,90,jb+15),mb.append(k));jb+=ta+qb;q.decorateRow(Kb,ic,jb);I&&(b.layoutCtrl(I,90,jb+15),mb.append(I));jb+=ta+qb;mb.append(ac);mb.append(oc);mb.append(Kb);mb.append(ic);return jb}};this.protectedChooseValueField=function(ta){c.clearFieldRelativeChange("$VALUE_FIELD");k.hide();c.setValueFieldName(ta.getName());c.setValueFieldAlias(ta.getAlias());m(d);rc()};this.protectedChooseDisplayField=function(ta){c.clearFieldRelativeChange("$DISPLAY_FIELD");I.hide();c.setDisplayFieldName(ta.getName());
c.setDisplayFieldAlias(ta.getAlias());m(d);rc()};var xb=function(){var ta=new Tb(h,c.getBindSource()&&c.getBindSource().getMacroId());ta.setFunSelectCallBack(function(mb){var jb=Mb.createBindSource(Ba.MACRO,d.getModel());jb.setMacroId(mb);c.setBindSource(jb);c.clearDataSourcePropAndException();Rb(mb);m()});ta.showDialog()},Nb=function(ta,mb,jb){z=r.createTable();r.bindTextEditor(z,mc,ka);z.setColumnFitVisibleWidth(!0);z.setSyncUIWhenModelChanged(!1);z.setDraggableAdjusting(!0,2,0,new ib);ta=new p(z);
ta.setOutsideVisible(!1);z.setCellRender(ta);z.setSyncUIWhenModelChanged(!0);v=$(z.getUI());b.layoutCtrlWithLRTB(v,10,10,null,10,10,null);y=$("<div>");y.addClass("extreport-dataset-designer-param-detail-edittable");b.layoutCtrl(y,null,120,null,130);y.append(v);mb.append(y);z.setSyncUIWhenModelChanged(!0)},ja=function(){r.clear(z);z.setSyncUIWhenModelChanged(!1);z.addColumns(4);z.getColumn(0).setWidth(40);z.getColumn(1).setWidth(42);z.getColumn(2).setWidth(80);z.getColumn(3).setWidth(80);var ta=r.createHeadRow(z);
ta.getCell(1).setValue("#");ta.getCell(2).setValue(R.get("displayText","\u663e\u793a\u6587\u672c"));ta.getCell(3).setValue(R.get("value","\u503c"));ta=sa();var mb=ta.length;if(!mb||3>=mb){z.setScrollerVisible(!1,!1);var jb=130}else 10<=mb?(z.setScrollerVisible(!1,"auto"),jb=305):jb=25*(mb-3)+130;y.css("height",+jb);D&&D.css("height",270+jb-130);for(jb=0;jb<mb;++jb){var qb=new Bb,Kb=ta[jb],Lb=r.createRow(z),ac=Kb.getAlias(),ic=Kb.getName();Lb.getCell(1).setValue(jb+1);Lb.getCell(2).setValue(ac);Lb.getCell(3).setValue(ic);
qb.setAlias(ac);qb.setName(ic);Lb.setHeight(25);Lb.setUserObject(Kb)}z.setSyncUIWhenModelChanged(!0);r.refresh(z)},Ia=function(){var ta=c.getBindSource();var mb=ta?new Cb(h,ta):new Cb(h);mb.setTitle(R.get("selectDataSet","\u9009\u62e9\u6570\u636e\u96c6"));var jb=new Ea(h,mb.getDialogParam(),!1,ta&&ta.getId());mb.buildContextArea(jb);mb.setFuncQueryRightAreaByMenu(jb.queryDataSetsByGroup);mb.setFuncBeforeCloseChecker(function(qb){var Kb=mb.getResult();if(jb.IsInitializing())return qb.getMessageCurtain().showPrompt(R.get("loadingData1",
"\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u3002")),!1;if(!Kb)return!0;if(Kb.getFid()===ra.getUrlParamValue("dataSetId"))return qb.getMessageCurtain().showPrompt(R.get("selectSelfError","\u4e0d\u80fd\u5f15\u7528\u5f53\u524d\u6570\u636e\u96c6\u4f5c\u4e3a\u6570\u636e\u6e90\u3002")),!1;var Lb=mb.getDialogParam(),ac=Mb.createBindSource(Ba.SQL,d.getModel());ac.setId(Kb.getFid());ac.setName(Kb.getName());ac.setGroupId(Kb.getGroupId());ac.setUserId(Kb.getCreatorId());ac.setGroupName(Kb.getGroupPath());
ua=Lb.hasPermission();ab(qb,ac);return!1});return mb},ab=function(ta,mb){var jb=h.createParamCtrlFacade(function(qb){qb?(c.setBindSource(mb),c.clearDataSourcePropAndException(),Db(mb.getId()),ta.destroy()):ta.getMessageCurtain().showPrompt(R.get("errorDataSet","\u6570\u636e\u6e90\u201c#1\u201d\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u8be5\u6570\u636e\u6e90\u3002").replace("#1",mb.getName()))},function(){ta.getMessageCurtain().showPrompt(R.get("errorDataSet","\u6570\u636e\u6e90\u201c#1\u201d\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u8be5\u6570\u636e\u6e90\u3002").replace("#1",
mb.getName()));return!0});jb.setBlockingJqUi(D);jb.checkDataSetById(mb.getId())},Db=function(ta,mb,jb,qb,Kb){var Lb=c.getBindSource(),ac=h.createParamCtrlFacade(function(ic){H=[];if(ic.error)c.addException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+cb.SOURCE_BIND,ic.error),d.addException(wa.PARAM_CLIENT_ERROR,d.getName(),R.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002")),m(d);else{ic.path&&(Lb.repairSource(ic.path,ic.groupId,ic.datasetId,ic.datasetName),
ua=ic.permission);if(ic=ic.columns){for(var kc=0;kc<ic.length;kc++){var nc=ic[kc],oc=new Bb;oc.setName(nc.name);oc.setAlias(nc.alias);H.push(oc)}$a();c.repairFieldAlias(H)}m()}xc()},function(){H=[];xc()});ac.setBlockingJqUi(D);ac.queryTableFieldsByDataSetId(ta,mb,jb,qb,Kb)},Rb=function(ta){var mb=h.createMacroManageFacade(function(jb){H=[];if(jb){for(var qb=0;qb<jb.length;qb++){var Kb=new Bb;Kb.setName(jb[qb]);Kb.setAlias(jb[qb]);H.push(Kb)}$a()}xc()},function(jb,qb){switch(jb){case 1200004:jb=R.get("noConnectionPerm",
"\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u201c\u6570\u636e\u5e93\u8fde\u63a5\u201d\u7684\u6743\u9650\u3002");break;case 1200013:jb=R.get("noEntityPerm","\u60a8\u6ca1\u6709\u9009\u62e9\u7684\u57fa\u7840\u8d44\u6599\u7684\u6743\u9650\u3002");break;case 1200014:jb=R.get("entityNotExits","\u5b8f\u53d8\u91cf\u4f7f\u7528\u7684\u57fa\u7840\u8d44\u6599\u4e0d\u5b58\u5728\u3002");break;default:jb=R.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002")}c.addException(wa.PARAM_CTRL_BIND_SOURCE,
d.getName()+cb.SOURCE_BIND,jb);d.addException(wa.PARAM_CLIENT_ERROR,d.getName(),R.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002"));H=[];m(d);xc();return!0});mb.setBlockingJqUi(D);mb.loadMacroFieldsByUid(ta)},$a=function(){if(0<H.length&&!c.getValueFieldName()){var ta=H[0],mb=ta.getName();ta=ta.getAlias();c.setValueFieldName(mb);c.setValueFieldAlias(ta);c.setDisplayFieldName(mb);c.setDisplayFieldAlias(ta);q.protectedInitDefaultField()}},Eb=function(){for(var ta=
Y.BINDFIELD,mb=0;mb<ta.length;mb++){var jb=new Bb;var qb=ta[mb];var Kb=[];Kb.push(qb.slice(0,qb.indexOf(" ")));Kb.push(qb.slice(qb.indexOf("[")+1,qb.indexOf("]")));qb=Kb;jb.setName(qb[0]);jb.setAlias(qb[1]);H.push(jb)}},Qb=function(){var ta=h.createParamCtrlFacade(function(mb){mb&&(c.repairDefaultAlias(mb),rc())},function(){return!0});ta.setBlockingJqUi(ia);ta.repairVariableAlias(c.getDefaultValue(),c.getDefaultAlias())},Yb=function(ta,mb){var jb=$("<div>");jb.addClass(ta);jb.on("click",mb);return jb},
fc=function(ta){var mb=sa();if(0===Object.keys(x).length)ta.preventDefault();else{ta=Object.values(x);for(var jb=0;jb<ta.length;jb++){var qb=mb.indexOf(ta[jb]);if(-1!==qb){var Kb=mb[qb];delete Q[Kb.getName()+"_"+Kb.getAlias()];mb.splice(qb,1)}}0==mb.length&&(rc(),m());x={};ja()}},jc=function(){var ta=sa(),mb=new Bb;mb.setAlias("");mb.setName("");ta.push(mb);ja();m()},lc=function(ta){0===Object.keys(x).length?ta.preventDefault():(ub.moveSelectedDown(sa(),x),ja())},qc=function(ta){0===Object.keys(x).length?
ta.preventDefault():(ub.moveSelectedUp(sa(),x),ja())},mc=function(ta,mb){return 2===mb||3===mb?!0:!1},ka=function(ta,mb,jb,qb,Kb){ta=ta.getUserObject();mb=z.getColumnIndex(mb);3===mb?(mb=ta.getName(),mb!==qb&&ta.setName(qb)):2===mb&&(mb=ta.getAlias(),qb!==mb&&ta.setAlias(qb));jb.setValue(qb);return!0},sa=function(){var ta=c.getBindSource();return ta&&ta.getArrNameAliasPairs&&ta.getArrNameAliasPairs()},lb=function(){return d.getException(wa.PARAM_CLIENT_ERROR)?R.get("requireEmpty","\u5fc5\u586b\u9879\u4e3a\u7a7a"):
c.getException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+cb.SOURCE_BIND)},yb=function(ta){return c.getException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+ta)},Sb=function(ta){ta=yb(ta);var mb=P.getErrorIcon(ta);!lb()&&ta||mb.hide();return mb},Wb=function(){return c.getException(wa.PARAM_CTRL_DEFAULT_VALUE,d.getName())},Zb=function(){var ta=Wb(),mb=P.getErrorIcon(ta);!lb()&&ta||mb.hide();return ba=mb},$b=function(){c.clearException(wa.PARAM_CTRL_DEFAULT_VALUE);m(d);ba&&ba.hide()},hc=function(){c.setDefaultValue(null);
c.setDefaultAlias(null)},uc=function(){D&&D.empty();q.protectedCreateSupplyArea()},rc=function(){ia&&ia.empty();q.protectedCreateDefaultArea()},wc=function(){q.protectedCreateAdvancedArea()},xc=function(){uc();rc();wc()},yc=function(){return!c.getBindSource()||c.getException(wa.PARAM_CTRL_BIND_SOURCE,d.getName()+cb.SOURCE_BIND)||c.getBindSourceType()!=Ba.SELF&&0===H.length};this.protectedUpdataDefaultUI=function(){var ta=c.getDefaultValue();if(c.getBindSourceType()!=Ba.SELF&&!yc()&&B.isNotEmptyStr(ta)){V=
(new Date).getTime()+"";var mb=h.createParamCtrlFacade(function(jb){if(jb&&V==jb[0]){jb=jb[1].entryList;for(var qb=0;qb<jb.length;qb++){var Kb=jb[qb];B.isNotEmptyStr(ta)&&ta==Kb.value&&c.setDefaultAlias(Kb.text,!0)}}rc()},function(){var jb=c.getBindSourceType(),qb=c.getBindSource();switch(jb){case Ba.SYSTEM:var Kb=qb.getSourceAlias();break;case Ba.MACRO:Kb=qb.getMacroId();break;case Ba.DATA_SET:Kb=qb.getName()}c.addException(wa.PARAM_CTRL_DEFAULT_VALUE,d.getName(),R.get("noDataSourceValue","\u6570\u636e\u6e90\u201c#1\u201d\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u8be5\u6570\u636e\u6e90\u3002").replace("#1",
Kb));rc();q.protectedRefreshUi();m();return!0});mb.setBlockingJqUi(ia);mb.getConstantValueFromSource(c.buildConstantQueryParams(V))}};this.protectedMethod={refreshSupplyArea:uc,refreshDefaultArea:rc,getJqDisplayError:function(){return I},getJqDefaultError:function(){return ba},getJqDefaultArea:function(){return ia},initDefaultErrorIcon:Zb,getDefaultException:Wb,clearCtrlConstantValue:hc,clearDefaultException:$b,isNotValidDefaultCtrl:yc,hasErrorInDefaultValue:pa,refreshAdvanced:wc}};NS.SearchFieldSelector=
la;NS.ParamTableCustomExpandor=ib;NS.ConstantValueSelectionPanel=eb;NS.DataSetSelectorDialog=Cb;var Ua,K,A,Na,bb,Oa,hb,Va,Ba,Ta,wa,wb,Ob,Mb,Bb,Aa,Hb,Fb,ec,Ha,cb,ub,Qa,R,dc,bc,Vb,Pb,cc,Xb,gc,oa,nb,Ub,Ya,ca,Sa,e,n,g,a,f,b,t,r,F,B,Z,Xa,aa,G,C,O,ra,Fa,kb;(function(){var h=com.kingdee.bos.extreport.datasetdesigner.model;A=h.ParamDataType;Ua=h.ParamCtrlType;K=h.ParamCtrlState;Na=h.CtrlFactory;bb=h.DataSetType;Oa=h.LinkageParamPair;hb=h.SystemVar;Va=h.ParamDefaultValueType;Ba=h.ParamBindSourceType;Ta=h.Parameter;
wa=h.DataSetModelCheckType;Mb=h.BindSourceFactory;Bb=h.NameAliasPair;Aa=h.MacroDialogType;Hb=h.MacroOrSysDialogType;ec=h.Macro;wb=h.DataSetSource;Ob=h.MacroVarSource;Fb=h.MacroStatusEnum;Ha=h.LinkageRemover;cb=h.DataSetModelCheckCode;ub=h.ParamListUtils;Qa=h.ParamF7TreeType;h=com.kingdee.bos.qing.framework.common;R=h.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);dc=h.WindowResizeObserver;bc=h.TabbedUiUtil;Vb=h.GlobalFont;h=com.kingdee.bos.qing.ui.component;
Pb=h.Label;cc=h.ComboBox;Xb=h.CheckBox;gc=h.HelpIcon;oa=h.TextField;nb=h.MessageDialog;Ub=h.RadioButton;Ya=h.AbstractModalDialog;ca=h.F7Selector;Sa=h.RadioButtonGroup;e=h.WorkButton;n=h.SplitPane;g=h.List;f=h.DropdownSelector;h=com.kingdee.bos.qing.common;b=h.DomUtil;t=h.Util;F=h.TextMeasurer;h=com.kingdee.bos.extreport.datasetdesigner.common.ui;Xa=h.SearchHelper;aa=h.PreviewDialog;h=com.kingdee.bos.extreport.datasetdesigner.common;B=h.StringUtil;Z=h.LanguageUtil;h=com.kingdee.bos.qing.common.ui;
r=h.TableUtil;h=com.kingdee.bos.qing.biz.common;G=h.ComplexPaginationBar;a=h.KeyBoardSearchBox;h=com.kingdee.bos.extreport.datasetdesigner;C=h.Icons;h=com.kingdee.bos.qing;O=h.SkinUtil;ra=h.Seer;h=com.kingdee.bos.extreport.datasetdesigner;Fa=kb=h.Icons})();var Y={BINDSOURCE_ALIAS:[R.get("curUserOrgScope","\u5f53\u524d\u7528\u6237\u4e1a\u52a1\u7ec4\u7ec7\u8303\u56f4")],BINDSOURCE_NAME:[0],BINDFIELD:["id [ID]","number ["+R.get("code","\u7f16\u7801")+"]","name ["+R.get("name","\u540d\u79f0")+"]"]},ob=
new function(){var h=[];this.clearRender=function(){h=[]};this.removeRender=function(d){for(var l=0;l<h.length;l++)h[l].getParameter()===d&&h.splice(l,1)};this.getRender=function(d){if(!d)return null;for(var l=0;l<h.length;l++){var m=h[l];if(m.getParameter()===d)return m}return null};this.cacheRender=function(d){h.push(d)}};NS.CtrlRenderCache=ob;var u=new function(){var h;this.createRender=function(d,l,m,p,q){h||(h={},h[Ua.INPUT]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.InputCtrlRender,
h[Ua.LIST]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.ListCtrlRender,h[Ua.DATE]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.DateRender,h[Ua.CHECKBOX]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.CheckBoxRender,h[Ua.F7]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.F7Render,h[Ua.SWITCH]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.SwitchCtrlRender,h[Ua.SPINNER]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.SpinnerCtrlRender,h[Ua.LABEL]=com.kingdee.bos.extreport.datasetdesigner.paramctrl.LabelCtrlRender);
return new h[d](l,m,p,q)}};NS.CtrlRenderFactory=u;var P=new function(){this.getErrorIcon=function(h){var d=$("<div>");d.text("!");d.addClass("extreport-dataset-designer-param-ctrl-fault-mark");d.attr("title",h);return d}};NS.ErrorIconFactory=P;var N=function(h){var d,l,m=Z.isEnglish(),p=!!h,q,c,D,H=new G,L=new a,X,ua,ia,z,v,y;this.getJqUi=function(){if(!d){d||(d=$("<div>"));var E=new cc;E.setSelected(q?q:X[0]);E.setCustomPainter(ua);E.setItemModels(X);E.addSelectedChangedListener(ia);E=E.getJqUi();
d.append(E);m?b.layoutCtrl(E,0,0,120,20):b.layoutCtrl(E,0,0,80,20);L.addSearchListener(v);L.setSearchListenerDelay(500);L.setPlaceholder(z);L.setShowSearchIcon(!0);E=L.getJqUi();d.append(E);m?b.layoutCtrl(E,140,0,190,20):b.layoutCtrl(E,100,0,160,20);E=$("<div>");if(p){b.layoutCtrl(E,0,32,647,310);l=$("<div>");b.layoutCtrl(l,0,0,440,308);Q(l);x(l);var k=$("<div>");b.layoutCtrlWithLRTB(k,440,0,null,0,0,null);k.css("border-left","1px solid rgb(220, 220, 220)");var I=D.getJqUi();k.append(I);E.append(l);
E.append(k)}else b.layoutCtrl(E,0,32,440,254),l=$("<div>"),b.layoutCtrl(l,0,0,440,252),x(l),Q(l),E.append(l);d.append(E);E.css({"border-top":"1px solid rgba(220,220,220)","border-bottom":"1px solid rgba(220,220,220)"})}return d};this.getSelectedModel=function(){return c.getSelected()};var x=function(E){var k=c.getJqUi();b.layoutCtrlWithLRTB(k,0,-10,null,36,2,null);E.append(k)},Q=function(E){H.setJumpToPageListener(y);H.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);var k=H.protectedMethod;
k.setTotalSelectedRowAndSelectedAllVisual(!1,!1);k.setTotalPageVisual(!1);k.setFirstBtnAndEndBtnVisual(!1);k=H.getJqUi();b.layoutCtrlWithLRTB(k,0,0,null,3,0,null);E.append(k)};this.protectedMethod={setSelectListBoxValue:function(E){X=E},setFunSelectListCustom:function(E){ua=E},setSelectType:function(E){q=E},setTablePanel:function(E){c&&c.getJqUi().remove();c=E;l&&x(l)},setSelectListBoxChangeListener:function(E){ia=E},setJumpToPageListener:function(E){y=E},setSearchDescription:function(E){z=E},setSearchListener:function(E){v=
E;L&&L.addSearchListener(v)},setMulSelectTablePanel:function(E){D=E},getSearchBox:function(){return L},getPagination:function(){return H}}},M={USER:1,PRESET:2};NS.TYPE_MENU=M;var va=-1;NS.DATA_SET_ALLTYPE=va})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.InputCtrlRender=
function(Ea,Gb,J,eb){sb.call(this,Gb,J);w.call(this,Ea,Gb,eb);var db=this,Ma=Gb.getCtrlObject(),ea=[ha.CONSTANT,ha.VARIABLE],W,za;this.protectedInit=function(tb){ya(tb);db.createAdvancedArea(tb)};this.protectedRefreshUi=function(tb){db.refreshLinkageUi()};var ya=function(tb){za?za.empty():za=$("<div>");za.css({position:"relative",width:"100%"});var fb=0,gb=db.getCtrlHeight(),Wa=db.getCtrlGap(),Ka=db.createTitle(Tb.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),fb);fb+=gb+Wa;var rb=Tb.get("defaultValueType",
"\u9ed8\u8ba4\u503c\u7c7b\u578b"),Ga=Tb.get("defaultValue","\u9ed8\u8ba4\u503c"),la=new Ab;la.setText(rb);rb=new Ra;rb.setSelected(Ma.getDefaultValueType());rb.setItemModels(ea);rb.setCustomPainter(function(K,A,Na){K=$("<div>");var bb;Na==ha.CONSTANT?bb=Tb.get("constant","\u5e38\u91cf"):Na==ha.VARIABLE&&(bb=Tb.get("variant","\u53d8\u91cf"));K.text(bb);A.append(K)});rb.addSelectedChangedListener(function(K,A,Na){A!==Na&&(Ma.setDefaultValueType(Na),Ma.setDefaultAlias(""),Ma.setDefaultValue(""),Pa(),
ya())});var ib=Ma.getException(xa.PARAM_CTRL_DEFAULT_VALUE,Gb.getName());W=zb.getErrorIcon(ib);ib||W.hide();Cb.layoutCtrl(W,90,95);za.append(W);ib=new Ab;ib.setText(Ga);if(Ma.getDefaultValueType()===ha.CONSTANT){var Ua=new Ja;Ua.setText(Ma.getDefaultValue());Ua.addBlurListener(function(K){Jb(Ua,K.getText().trim())});Ua.addAcceptableListener(function(K,A){A&&Jb(Ua,K.getText().trim())});Ua.getJqUi().children().css({overflow:"hidden","text-overflow":"ellipsis"});Ib(Ma.getDefaultValue())}else Ua=new fa,
Ua.setClearable(!0),Ua.setCustomPainter(function(K){var A="";K?(A=Tb.get("selectVariable","\u5df2\u9009\u62e9\u53d8\u91cf #1").replace("#1",K),Ua.getJqUi().attr("title",A)):Ua.getJqUi().attr("title","");return A}),Ua.setModel(Ma.getDefaultAlias()),Ua.addActionListener(function(){var K=new Za(Ea,!1,Ma.getDefaultValue());K.setFunSelectCallBack(function(A,Na){Ma.setDefaultAlias(A);Ma.setDefaultValue(Na);Ua.setModel(A);Da(Ua,A,Na)});K.showDialog()}),Ua.addClearListener(function(){Ma.setDefaultAlias("");
Ma.setDefaultValue("");Ua.setModel("");Pa()}),Da(Ua,Ma.getDefaultAlias(),Ma.getDefaultValue());la=la.getJqUi();rb=rb.getJqUi();ib=ib.getJqUi();pb.isEnglish()&&ib.attr("title",Ga);Ga=Ua.getJqUi();db.decorateRow(la,rb,fb);fb+=gb+Wa;db.decorateRow(ib,Ga,fb);fb+=gb+Wa;za.append(Ka);za.append(la);za.append(rb);za.append(ib);za.append(Ga);tb&&tb.append(za);za.css("height",fb)},Da=function(tb,fb,gb){if(gb){var Wa=Ea.createParamCtrlFacade(function(Ka){Ka.alias&&(Ma.repairDefaultAlias(Ka.alias),tb.setModel(Ma.getDefaultAlias()));
Ka.valid?Pa():(Ka=Ca.dataTypeToErrorMsg(Gb.getDataType()).replace("xx",fb),vb(Ka))},function(){(gb+"").startsWith("@")?vb(Tb.get("sysVarCannotExe","\u8be5\u7cfb\u7edf\u53d8\u91cf\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u7cfb\u7edf\u53d8\u91cf\u662f\u5426\u6b63\u786e\u3002")):vb(Tb.get("macroCannotExe","\u8be5\u5b8f\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u5b8f\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"));return!0});Wa.setBlockingJqUi(za);Wa.loadVariableValue(gb,
Gb.getDataType())}},Jb=function(tb,fb){Ma.setDefaultValue(fb);Ma.setDefaultAlias(fb);tb.getJqUi().attr("title",fb);Ib(fb)},Ib=function(tb){if(tb){var fb=!0;for(var gb=U.split(tb,Gb.getDataType()),Wa=0;Wa<gb.length&&fb;Wa++){var Ka=gb[Wa];Ka.startsWith("$")||Ka.startsWith("@ExtRpt")||(fb=fb&&(!Ka||Ca.defaultValueCheck(Gb.getDataType(),Ka)))}}else fb=!tb;fb?Pa():(tb=Ca.dataTypeToErrorMsg(Gb.getDataType()).replace("xx",tb),vb(tb))},Pa=function(){Ma.getException(xa.PARAM_CTRL_DEFAULT_VALUE)&&(Ma.clearException(xa.PARAM_CTRL_DEFAULT_VALUE),
W.attr("title",""),W.hide(),eb())},vb=function(tb){Ma.addException(xa.PARAM_CTRL_DEFAULT_VALUE,Gb.getName(),tb);W.attr("title",tb);W.show();eb()}};var ha,xa,Ca,U,sb,w,Za,zb,Tb,Ab,Ra,Ja,fa,Cb,pb;(function(){var Ea=com.kingdee.bos.extreport.datasetdesigner.model;ha=Ea.ParamDefaultValueType;Ca=Ea.ParamDataType;xa=Ea.DataSetModelCheckType;U=Ea.SplitHelper;Ea=com.kingdee.bos.extreport.datasetdesigner.common;pb=Ea.LanguageUtil;Ea=com.kingdee.bos.qing.framework.common;Tb=Ea.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);
Ea=com.kingdee.bos.extreport.datasetdesigner.ctrl;sb=Ea.AbstractTypeRender;w=Ea.NormalAdvancedArea;Za=Ea.MacroAndSysTemVarSelectDialog;zb=Ea.ErrorIconFactory;Ea=com.kingdee.bos.qing.ui.component;Ab=Ea.Label;Ja=Ea.TextField;fa=Ea.F7Selector;Ra=Ea.ComboBox;Ea=com.kingdee.bos.qing.common;Cb=Ea.DomUtil})()})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.ListCtrlRender=
function(Cb,pb,Ea,Gb){fa.call(this,Cb,pb,Ea,Gb);var J=this,eb=this.protectedMethod,db=pb.getCtrlObject(),Ma=[],ea,W,za,ya=!1,Da;this.getArrDefaultType=function(){return[Ab.CONSTANT,Ab.FIRST_DATA,Ab.VARIABLE]};this.protectedUpdataDefaultUI=function(){};this.protectedCreateDefaultArea=function(vb,tb){var fb=J.getCtrlGap()+J.getCtrlHeight();W||(W=$("<div>"));W&&W.empty();W.css({position:"relative",width:"100%"});var gb=0,Wa=J.createTitle(ha.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),
gb);W.append(Wa);gb+=fb;var Ka=new Ca;Ka.setText(ha.get("defaultValueType","\u9ed8\u8ba4\u503c\u7c7b\u578b"));Wa=new xa;Wa.setSelected(db.getDefaultValueType());Wa.setItemModels(J.getArrDefaultType());Wa.setCustomPainter(function(Ga,la,ib){Ga=$("<div>");Ga.text(Ab.defaultTypeToName(ib));la.append(Ga)});Wa.addSelectedChangedListener(function(Ga,la,ib){la!==ib&&(db.setDefaultValueType(ib),eb.clearCtrlConstantValue(),eb.clearDefaultException(),W&&W.empty(),J.protectedCreateDefaultArea())});Ka=Ka.getJqUi();
var rb=Wa.getJqUi();J.decorateRow(Ka,rb,gb);gb+=fb;W.append(Ka);W.append(rb);Ka=eb.initDefaultErrorIcon();w.layoutCtrl(Ka,90,gb+15);W.append(Ka);Ka=ha.get("defaultValue","\u9ed8\u8ba4\u503c");rb=new Ca;rb.setText(Ka);rb=rb.getJqUi();Tb.isEnglish()&&rb.attr("title",Ka);db.getDefaultValueType()==Ab.FIRST_DATA?(db.setDefaultValue(Ab.FIRST_DATA_SIGN),db.setDefaultAlias("\u7b2c\u4e00\u6761\u6570\u636e"),eb.hasErrorInDefaultValue()&&(Wa.setEnabled(!1),ea&&ea.setEnabled(!1))):(Jb(Wa,tb),tb=ea.getJqUi(),
J.decorateRow(rb,tb,gb),gb+=fb,W.append(rb),W.append(tb));W.css("height",gb);vb&&vb.append(W)};var Jb=function(vb,tb){var fb=db.getDefaultValueType(),gb=db.getBindSourceType(),Wa=db.getBindSource();if(fb==Ab.VARIABLE){ea=new U;ea.setModel(db.getDefaultAlias());ea.setClearable(!0);ea.addClearListener(function(){eb.clearCtrlConstantValue();eb.clearDefaultException()});var Ka=ea.getJqUi();ea.setCustomPainter(function(K){if(K)return K=ha.get("selectVariable","\u5df2\u9009\u62e9\u53d8\u91cf #1").replace("#1",
K),Ka.attr("title",K),K;Ka.attr("title","");return""});ea.addActionListener(function(){var K=new Ja(Cb,!1,db.getDefaultValue());K.setFunSelectCallBack(function(A,Na){db.setDefaultAlias(A);db.setDefaultValue(Na);ea.setModel(A);eb.clearDefaultException()});K.showDialog()})}else{Ma=[];ea=new xa;var rb=db.getDefaultValue();if(eb.isNotValidDefaultCtrl())Ib();else if(gb==Ra.SELF)if(fb=Wa.getArrNameAliasPairs(),0!=fb.length){Ma=[];for(var Ga=0;Ga<fb.length;Ga++){var la=!0,ib=fb[Ga];if(zb.isNotEmptyStr(ib.getAlias())||
zb.isNotEmptyStr(ib.getName())){for(var Ua=0;Ua<Ma.length;Ua++)JSON.stringify(Ma[Ua].toJsonObject())==JSON.stringify(ib.toJsonObject())&&(la=!1);la&&Ma.push(ib)}}Ib()}else eb.clearCtrlConstantValue();else Da=(new Date).getTime()+"",fb=Cb.createParamCtrlFacade(function(K){if(K&&Da==K[0]){K=K[1].entryList;for(var A,Na=0;Na<K.length;Na++){var bb=K[Na];A=new sb;A.setName(bb.value);A.setAlias(bb.text);tb&&zb.isNotEmptyStr(rb)&&rb==A.getName()&&db.setDefaultAlias(A.getAlias(),!0);Ma.push(A)}}Ib()},function(){switch(gb){case Ra.SYSTEM:var K=
Wa.getSourceAlias();break;case Ra.MACRO:K=Wa.getMacroId();break;case Ra.DATA_SET:K=Wa.getName()}db.addException(Za.PARAM_CTRL_DEFAULT_VALUE,pb.getName(),ha.get("noDataSourceValue","\u6570\u636e\u6e90\u201c#1\u201d\u65e0\u6cd5\u6b63\u5e38\u6267\u884c\uff0c\u8bf7\u68c0\u67e5\u8be5\u6570\u636e\u6e90\u3002").replace("#1",K));Ib();J.protectedRefreshUi();Gb();return!0}),fb.setBlockingJqUi(W),fb.getConstantValueFromSource(db.buildConstantQueryParams(Da))}eb.hasErrorInDefaultValue()&&(vb.setEnabled(!1),ea&&
ea.setEnabled(!1))},Ib=function(){if(ea){var vb=db.getDefaultAlias(),tb=db.getDefaultValue(),fb=db.getBindSourceType();if(Ma&&0!=Ma.length){for(var gb=[],Wa=0;Wa<Ma.length;Wa++)gb.push(Ma[Wa]);db.getIsRequired()||(Wa=new sb,Wa.setAlias(""),Wa.setName(""),gb.splice(0,0,Wa));if(zb.isNotEmptyStr(vb))if(fb==Ra.SELF)if(ya)if(za){vb=!0;for(Wa=0;Wa<gb.length;Wa++)za==gb[Wa]&&(vb=!1);vb?(ea.setSelected(""),eb.clearCtrlConstantValue()):(vb=za.getAlias(),ea.setSelected(vb),db.setDefaultAlias(vb),db.setDefaultValue(za.getName()))}else ea.setSelected(vb);
else za=Pa(gb,vb,tb),ya=!0;else ea.setSelected(vb);ea.setItemModels(gb);ea.setCustomPainter(function(Ka,rb,Ga){(Ka=Ga&&Ga.getAlias?Ga.getAlias():Ga)?rb.attr("title",Ka):rb.attr("title","");rb.text(Ka)});ea.addSelectedChangedListener(function(Ka,rb,Ga){rb!==Ga&&(za=Ga,ya=!0,db.setDefaultAlias(za.getAlias()),db.setDefaultValue(za.getName()),eb.clearDefaultException())})}else zb.isNotEmptyStr(vb)?ea.setSelected(vb):ea.setSelected(""),db.getException(Za.PARAM_CTRL_DEFAULT_VALUE)&&ea.setEnabled(!1)}};
this.funRefreshAreaByRequirdChanged=function(){db.getDefaultValueType()==Ab.CONSTANT&&Ib()};var Pa=function(vb,tb,fb){for(var gb=0;gb<vb.length;gb++){var Wa=vb[gb];if(Wa.getAlias()==tb&&Wa.getName()==fb)return Wa}return null}};var ha,xa,Ca,U,sb,w,Za,zb,Tb,Ab,Ra,Ja,fa;(function(){var Cb=com.kingdee.bos.qing.framework.common;ha=Cb.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);Cb=com.kingdee.bos.qing.ui.component;xa=Cb.ComboBox;Ca=Cb.Label;U=Cb.F7Selector;Cb=com.kingdee.bos.qing.common;
w=Cb.DomUtil;Cb=com.kingdee.bos.extreport.datasetdesigner.common;zb=Cb.StringUtil;Tb=Cb.LanguageUtil;Cb=com.kingdee.bos.extreport.datasetdesigner.model;Ab=Cb.ParamDefaultValueType;Ra=Cb.ParamBindSourceType;sb=Cb.NameAliasPair;Za=Cb.DataSetModelCheckType;Cb=com.kingdee.bos.extreport.datasetdesigner.ctrl;Ja=Cb.MacroAndSysTemVarSelectDialog;fa=Cb.AbstractBindSourceRender})()})();(function(){function ha(){var Ga={},la=(Ga[Ea.PERM]=Ca,Ga[Ea.EXPR]=Ja,Ga[Ea.RELATIVE]=U,Ga);this.getDateSetter=function(ib,Ua,K,A){var Na;(ib=la[ib])&&(Na=new ib(Ua,K,A));return Na};this.getDateTypeText=function(ib,Ua){return(ib=la[ib])?ib.getDateTypeText(Ua):""}}function xa(){var Ga=30,la=10;this.getHeight=function(){return Ga};this.getCtrlHeight=function(){return Ga};this.setCtrlHeight=function(ib){Ga=ib};this.getCtrlGap=function(){return la};this.setCtrlGap=function(ib){la=ib};this.supportDateValueSetting=
function(){return!0};this.supportGranTypeSetting=function(){return!0};this.getJqUi=function(){throw Error("Implement");};this.changeGranType=function(ib){throw Error("Implement");}}function Ca(Ga,la,ib){xa.call(this);var Ua,K=this.getCtrlHeight(),A;this.supportGranTypeSetting=function(){return la==pb.DATE};this.getJqUi=function(){A||Na();return A};var Na=function(){A=$("<div>");Ua=new Jb;Ua.setDateChangedListener(function(hb,Va){Ga.setDateValue(hb)});var Oa=Ga.getDateGranType();Ua.setPatternType(bb(Oa));
(Oa=Ga.getDateValue())&&Ua.setDateValue(Oa);Oa=Ua.getJqUi();Oa.css("height",K+"px");A.append(Oa)};this.changeGranType=function(Oa){Ua.changePatternType(bb(Oa))};var bb=function(Oa){if(la==pb.DATE)switch(Oa){case Ka.YEAR_MONTH_DAY:return Ib.YEAR_MONTH_DAY;case Ka.YEAR_MONTH:return Ib.YEAR_MONTH;case Ka.YEAR_SEASON:return Ib.YEAR_SEASON;case Ka.YEAR:return Ib.YEAR}else{if(la==pb.DATETIME)return Ib.DATETIME;if(la==pb.TIME)return Ib.TIME}return null}}function U(Ga,la,ib){xa.call(this);var Ua=this,K,A=
la!=pb.TIME,Na=la==pb.DATE,bb;this.getHeight=function(){return bb?bb.getHeight():0};this.supportDateValueSetting=function(){return A};this.supportGranTypeSetting=function(){return Na};this.getJqUi=function(){K||(bb=Oa(Ga.getDateGranType()),K=$("<div>"),K.append(bb.getJqUi()));return K};this.changeGranType=function(hb){bb=Oa(hb);K.empty();K.append(bb.getJqUi())};var Oa=function(hb){if(la==pb.DATETIME){var Va=new w(Ga);Va.setSupportDaySetting(!0)}else if(la==pb.DATE)switch(hb){case Ka.YEAR_MONTH_DAY:Va=
new Za(Ga);Va.setSupportDaySetting(!0);break;case Ka.YEAR_MONTH:Va=new zb(Ga);break;case Ka.YEAR_SEASON:Va=new Tb(Ga);break;case Ka.YEAR:Va=new Ab(Ga);break;default:return null}else la==pb.TIME&&(Va=new Ra(Ga));Va&&(Va.setCtrlHeight(Ua.getCtrlHeight()),Va.setCtrlGap(Ua.getCtrlGap()),Va.setDateValue(Ga.getDateValue()));return Va}}function sb(){Da.call(this);var Ga=this,la=this.getJqUi,ib;this.getJqUi=function(){ib||(Ga.protectInit(),ib=la());return ib};this.protectInit=function(){throw Error("Implement");
};this.setDateValue=function(Ua){throw Error("Implement");};this.protectMethod={getSeparator:function(){return rb}}}function w(Ga){sb.call(this);var la=this,ib=la.getTimeSettingForSys(),Ua=this.protectMethod.getSeparator(),K=[W.DAY,W.WEEK,W.MONTH,W.SEASON,W.YEAR];this.protectInit=function(){la.setSupportUnitTypeSetting(!0);la.setSupportDaySetting(!0);la.setShowTimeSetting(!0);la.setSupportUnitType(K);la.setChangedListener(A)};this.setDateValue=function(Na){var bb=Na?Na.split(Ua):[],Oa=za.FRONT;1<=
bb.length&&bb[0]==za.BEHIND&&(Oa=za.BEHIND);var hb=0;2<=bb.length&&!isNaN(bb[1])&&(hb=parseInt(bb[1]));var Va=W.DAY;3<=bb.length&&-1!=K.indexOf(bb[2])&&(Va=bb[2]);var Ba=Va==W.DAY?null:ya.FIRST_DAY;Va!=W.DAY&&4<=bb.length&&bb[3]==ya.LAST_DAY&&(Ba=ya.LAST_DAY);var Ta=Ba?4:3;bb=bb.length>Ta?bb[Ta]:"";if(!bb||!Pa.isTimeString(bb)&&bb!=ib)bb=ib;Oa=Oa+Ua+hb+Ua+Va+Ua;Ba&&(Oa+=Ba+Ua);Ba=Oa+bb;Ba!=Na&&Ga.setDateValue(Ba);Na=Ba.split(Ua);Na[2]==W.DAY?(Ba=null,Oa=Na[3]):(Ba=Na[3],Oa=Na[4]);la.setDirection(Na[0]);
la.setOffset(parseInt(Na[1]));la.setUnit(Na[2]);Ba&&la.setDay(Ba);la.setTime(Oa)};var A=function(Na,bb,Oa,hb,Va){Na=Na+Ua+bb+Ua+Oa+Ua;Oa!=W.DAY&&hb&&(Na+=hb+Ua);Ga.setDateValue(Na+Va)}}function Za(Ga){sb.call(this);var la=this,ib=this.protectMethod.getSeparator(),Ua=[W.DAY,W.WEEK,W.MONTH,W.SEASON,W.YEAR];this.protectInit=function(){la.setSupportUnitTypeSetting(!0);la.setSupportDaySetting(!0);la.setShowTimeSetting(!1);la.setSupportUnitType(Ua);la.setChangedListener(K)};this.setDateValue=function(A){var Na=
A?A.split(ib):[],bb=za.FRONT;1<=Na.length&&Na[0]==za.BEHIND&&(bb=za.BEHIND);var Oa=0;2<=Na.length&&!isNaN(Na[1])&&(Oa=parseInt(Na[1]));var hb=W.DAY;3<=Na.length&&-1!=Ua.indexOf(Na[2])&&(hb=Na[2]);var Va=hb==W.DAY?null:ya.FIRST_DAY;hb!=W.DAY&&4<=Na.length&&Na[3]==ya.LAST_DAY&&(Va=ya.LAST_DAY);Na=bb+ib+Oa+ib+hb;Va&&(Na+=ib+Va);Va=Na;Va!=A&&Ga.setDateValue(Va);A=Va.split(ib);Va=A[2]==W.DAY?null:A[3];A[2]!=W.DAY&&(Va=A[3]);la.setDirection(A[0]);la.setOffset(parseInt(A[1]));la.setUnit(A[2]);Va&&la.setDay(Va)};
var K=function(A,Na,bb,Oa,hb){A=A+ib+Na+ib+bb;bb!=W.DAY&&Oa&&(A+=ib+Oa);Ga.setDateValue(A)}}function zb(Ga){sb.call(this);var la=this,ib=this.protectMethod.getSeparator(),Ua=[W.MONTH,W.SEASON,W.YEAR];this.protectInit=function(){la.setSupportUnitTypeSetting(!0);la.setSupportDaySetting(!1);la.setShowTimeSetting(!1);la.setSupportUnitType(Ua);la.setChangedListener(K)};this.setDateValue=function(A){var Na=A?A.split(ib):[];var bb=za.FRONT;1<=Na.length&&Na[0]==za.BEHIND&&(bb=za.BEHIND);var Oa=0;2<=Na.length&&
!isNaN(Na[1])&&(Oa=parseInt(Na[1]));var hb=W.MONTH;3<=Na.length&&-1!=Ua.indexOf(Na[2])&&(hb=Na[2]);Na=bb+ib+Oa+ib+hb;Na!=A&&Ga.setDateValue(Na);A=Na.split(ib);la.setDirection(A[0]);la.setOffset(parseInt(A[1]));la.setUnit(A[2])};var K=function(A,Na,bb,Oa,hb){Ga.setDateValue(A+ib+Na+ib+bb)}}function Tb(Ga){sb.call(this);var la=this,ib=this.protectMethod.getSeparator(),Ua=[W.SEASON,W.YEAR];this.protectInit=function(){la.setSupportUnitTypeSetting(!0);la.setSupportDaySetting(!1);la.setShowTimeSetting(!1);
la.setSupportUnitType(Ua);la.setChangedListener(K)};this.setDateValue=function(A){var Na=A?A.split(ib):[];var bb=za.FRONT;1<=Na.length&&Na[0]==za.BEHIND&&(bb=za.BEHIND);var Oa=0;2<=Na.length&&!isNaN(Na[1])&&(Oa=parseInt(Na[1]));var hb=W.SEASON;3<=Na.length&&-1!=Ua.indexOf(Na[2])&&(hb=Na[2]);Na=bb+ib+Oa+ib+hb;Na!=A&&Ga.setDateValue(Na);A=Na.split(ib);la.setDirection(A[0]);la.setOffset(parseInt(A[1]));la.setUnit(A[2])};var K=function(A,Na,bb,Oa,hb){Ga.setDateValue(A+ib+Na+ib+bb)}}function Ab(Ga){sb.call(this);
var la=this,ib=this.protectMethod.getSeparator();this.protectInit=function(){la.setSupportUnitTypeSetting(!1);la.setSupportDaySetting(!1);la.setShowTimeSetting(!1);la.setChangedListener(Ua)};this.setDateValue=function(K){var A=K?K.split(ib):[];var Na=za.FRONT;1<=A.length&&A[0]==za.BEHIND&&(Na=za.BEHIND);var bb=0;2<=A.length&&!isNaN(A[1])&&(bb=parseInt(A[1]));A=Na+ib+bb+ib+W.YEAR;A!=K&&Ga.setDateValue(A);K=A.split(ib);la.setDirection(K[0]);la.setOffset(parseInt(K[1]));la.setUnit(K[2])};var Ua=function(K,
A,Na,bb,Oa){Ga.setDateValue(K+ib+A+ib+Na)}}function Ra(Ga){sb.call(this);var la=$("<div>"),ib=this.getTimeSettingForSys();this.getJqUi=function(){return la};this.getHeight=function(){return 0};this.protectInit=function(){Ga.setDateValue(ib)};this.setDateValue=function(Ua){Ua!=ib&&Ga.setDateValue(ib)}}function Ja(Ga,la,ib){xa.call(this);var Ua=this,K,A,Na=[],bb=!1,Oa=new fb;this.supportGranTypeSetting=function(){return la==pb.DATE};this.getJqUi=function(){K||hb();return K};this.changeGranType=function(Ta){};
var hb=function(){K=$("<div>");A=new db;A.setCustomPainter(function(wa){return wa});A.addActionListener(function(){bb?Va():ib.createParamCtrlFacade(function(wa){Na=[];if(wa&&0<wa.length)for(var wb=0;wb<wa.length;wb++){var Ob=new Gb;Ob.fromJsonObject(wa[wb]);Na.push(Ob)}bb=!0;Va()},function(wa){}).loadDateTimeFunction()});A.setModel(Ga.getDateValue());var Ta=A.getJqUi();tb.layoutCtrl(Ta,null,null,"100%",Ua.getCtrlHeight());K.append(Ta)},Va=function(){var Ta=new ea;Ta.setFunction(Na);Ta.setFunClosingAction(Ba);
var wa=null,wb=ib.createParamCtrlFacade(function(Mb){var Bb=Mb.errorPos,Aa=Mb.errorMsg;Mb=Mb.executeValue;var Hb=0>Bb;if(Hb&&Mb){Oa.setFormatString(la==pb.DATETIME?Pa.DATETIME:Pa.YEAR_MONTH_DAY);var Fb=Oa.format(Mb)}wa(Hb,Bb,Aa,Fb)});wb.setShowBlocking(!1);Ta.setSyntaxValidator(function(Mb,Bb){wa=Bb;wb.checkFormula(Mb)});var Ob=Ga.getDateValue();Ob&&Ob.startsWith("=")&&(Ob=Ob.slice(1),Ta.setFormula(Ob));Ta.showDialog()},Ba=function(Ta){Ta=Ta?"="+Ta:"";A.setModel(Ta);Ga.setDateValue(Ta)}}"undefined"==
typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.DateRender=
function(Ga,la,ib,Ua){fa.call(this,la,ib);Cb.call(this,Ga,la,Ua);var K=this,A=la.getCtrlObject(),Na=parseInt(la.getDataType()),bb,Oa,hb,Va,Ba,Ta=!1,wa,wb,Ob,Mb=new gb,Bb=K.getCtrlHeight(),Aa=K.getCtrlGap(),Hb=new ha;this.protectedInit=function(Qa){bb=cb();Va=$("<div>");Qa.append(Va);bb.supportGranTypeSetting()&&(Ta||Fb(),Va.show());ec(Qa);K.createAdvancedArea(Qa)};this.protectedRefreshUi=function(Qa){K.refreshLinkageUi()};var Fb=function(){var Qa=K.createTitle(vb.get("supplyValueSetting","\u5907\u9009\u503c\u8bbe\u7f6e"),
0),R=new eb;R.setText(vb.get("dateGran","\u65f6\u95f4\u7c92\u5ea6"));R=R.getJqUi();hb=new J;hb.setItemModels([Ka.YEAR_MONTH_DAY,Ka.YEAR_MONTH,Ka.YEAR_SEASON,Ka.YEAR]);hb.setSelected(A.getDateGranType());hb.setCustomPainter(function(Vb,Pb,cc){Vb=Ka.getTypeText(cc);Pb.text(Vb)});hb.addSelectedChangedListener(function(Vb,Pb,cc){Pb!==cc&&(A.setDateGranType(cc),bb&&bb.changeGranType(cc),Ha())});var dc=hb.getJqUi(),bc=Aa+Bb;K.decorateRow(R,dc,bc);bc+=Aa+Bb;Va.css({position:"relative",width:"100%",height:bc+
"px"});Va.append(Qa);Va.append(R);Va.append(dc);Ta=!0},ec=function(Qa){wa=$("<div>");var R=K.createTitle(vb.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),0),dc=new eb;dc.setText(vb.get("defaultValueType","\u9ed8\u8ba4\u503c\u7c7b\u578b"));dc=dc.getJqUi();var bc=new J;bc.setSelected(A.getDefaultDateType());bc.setItemModels(ub());bc.setCustomPainter(function(Xb,gc,oa){gc.text(Hb.getDateTypeText(oa,Na))});bc.addSelectedChangedListener(function(Xb,gc,oa){gc!==oa&&(A.setDefaultDateType(oa),
A.setDateValue(null),bb=cb(),Oa.empty(),Oa.append(bb.getJqUi()),bb.supportGranTypeSetting()?(Ta||Fb(),Va.show()):Va.hide(),bb.supportDateValueSetting()?Ba&&Ba.show():Ba&&Ba.hide(),wa&&(Xb=2*(Bb+Aa),0!=bb.getHeight()&&(Xb+=Aa+bb.getHeight()),wa.css("height",Xb+"px")),Ha())});bc=bc.getJqUi();var Vb=Aa+Bb;K.decorateRow(dc,bc,Vb);Ba=$("<div>");var Pb=new eb,cc=vb.get("defaultValue","\u9ed8\u8ba4\u503c");Pb.setText(cc);Pb=Pb.getJqUi();Wa.isEnglish()&&Pb.attr("title",cc);Oa=$("<div>");Oa.append(bb.getJqUi());
Vb+=Aa+Bb;K.decorateRow(Pb,Oa,Vb);Mb.setFontSize(12,"Microsoft YaHei");cc=Mb.measureWidth(cc);cc=10+Math.min(cc,73);Ob=$("<div>");tb.layoutCtrl(Ob,cc,88);0!=bb.getHeight()&&(Vb+=Aa+bb.getHeight());wa.css({position:"relative",width:"100%",height:Vb+"px"});Ba.append(Pb);Ba.append(Ob);Ba.append(Oa);wa.append(R);wa.append(dc);wa.append(bc);wa.append(Ba);Qa.append(wa);Ha()},Ha=function(){if(A.getDefaultDateType()!=Ea.EXPR||Na!=pb.DATE)Ob&&Ob.hide();else{wb||(wb=new Ma,Ob.append(wb.getJqUi()));Ob.show();
var Qa=Ka.getTypeText(A.getDateGranType());Qa=vb.get("exprDateSetterTips","\u53d6\u8868\u8fbe\u5f0f\u8fd4\u56de\u65e5\u671f\u503c\u7684#1\u90e8\u5206\u3002").replace("#1",Qa);wb.setTipsText(Qa)}},cb=function(){var Qa=la.getDataType(),R=A.getDefaultDateType(),dc=A.getDateGranType();R||(R=Ea.PERM,A.setDefaultDateType(R));Qa==pb.TIME?(R==Ea.EXPR&&A.setDefaultDateType(Ea.PERM),dc&&(A.setDateGranType(null),A.setDateValue(null))):dc?dc!=Ka.YEAR_MONTH_DAY&&Qa==pb.DATETIME&&A.setDateGranType(Ka.YEAR_MONTH_DAY):
(A.setDateGranType(Ka.YEAR_MONTH_DAY),A.setDefaultDateType(R),A.setDateValue(null));if(Qa=Hb.getDateSetter(A.getDefaultDateType(),A,la.getDataType(),Ga))Qa.setCtrlGap(Aa),Qa.setCtrlHeight(Bb);return Qa},ub=function(){var Qa=[Ea.PERM,Ea.RELATIVE];la.getDataType()!=pb.TIME&&Qa.push(Ea.EXPR);return Qa}};var fa,Cb,pb,Ea,Gb,J,eb,db,Ma,ea,W,za,ya,Da,Jb,Ib,Pa,vb,tb,fb,gb,Wa;(function(){var Ga=com.kingdee.bos.extreport.datasetdesigner.ctrl;fa=Ga.AbstractTypeRender;Cb=Ga.NormalAdvancedArea;Ga=com.kingdee.bos.extreport.datasetdesigner.common;
Wa=Ga.LanguageUtil;Ga=com.kingdee.bos.extreport.datasetdesigner.model;pb=Ga.ParamDataType;Ea=Ga.ParamDefaultDateType;Ga=com.kingdee.bos.qing.ui.component;J=Ga.ComboBox;eb=Ga.Label;db=Ga.F7Selector;Ma=Ga.HelpIcon;Ga=com.kingdee.bos.qing.framework.common;vb=Ga.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);Ga=com.kingdee.bos.qing.common;tb=Ga.DomUtil;fb=Ga.DateFormater;gb=Ga.TextMeasurer;Ga=com.kingdee.bos.extreport.common;ea=Ga.FormulaEditorDialog;Gb=Ga.Function;
W=Ga.DateUnitType;ya=Ga.DateOffsetDayType;za=Ga.DateDirectionType;Da=Ga.RelativeDateSelector;Jb=Ga.DateDropdownSelector;Ib=Ga.DatePatternType;Pa=Ga.DatePattern})();var Ka={YEAR_MONTH_DAY:"Y_M_D",YEAR_MONTH:"Y_M",YEAR_SEASON:"Y_S",YEAR:"Y",getTypeText:function(Ga){switch(Ga){case Ka.YEAR_MONTH_DAY:return vb.get("yearMonthDay","\u5e74\u6708\u65e5");case Ka.YEAR_MONTH:return vb.get("yearMonth","\u5e74\u6708");case Ka.YEAR_SEASON:return vb.get("yearQuarter","\u5e74\u5b63");case Ka.YEAR:return vb.get("year",
"\u5e74");default:return""}}};Ca.getDateTypeText=function(Ga){switch(Ga){case pb.DATE:return vb.get("fixedDate","\u56fa\u5b9a\u65e5\u671f");case pb.DATETIME:return vb.get("fixedDateTime","\u56fa\u5b9a\u65e5\u671f\u65f6\u95f4");case pb.TIME:return vb.get("fixedTime","\u56fa\u5b9a\u65f6\u95f4");default:return""}};U.getDateTypeText=function(Ga){switch(Ga){case pb.DATE:return vb.get("relativeDate","\u76f8\u5bf9\u4e8e\u670d\u52a1\u7aef\u7684\u65e5\u671f");case pb.DATETIME:return vb.get("relativeDateTime",
"\u76f8\u5bf9\u4e8e\u670d\u52a1\u7aef\u7684\u65e5\u671f\u65f6\u95f4");case pb.TIME:return vb.get("relativeTime","\u670d\u52a1\u7aef\u5f53\u524d\u65f6\u95f4");default:return""}};var rb="!@#ORANGE#@!";Ja.getDateTypeText=function(){return vb.get("expressionDefinition","\u8868\u8fbe\u5f0f\u5b9a\u4e49")}})();(function(){function ha(Ja,fa){var Cb,pb,Ea;this.getValue=function(){return pb};this.getText=function(){return Ea};this.setValue=function(Gb){pb=Gb;Ja?fa.setSwitchOnValue(pb):fa.setSwitchOffValue(pb)};this.setText=function(Gb){Ea=Gb;Ja?fa.setSwitchOnText(Ea):fa.setSwitchOffText(Ea)};this.getStatusDesc=function(){return Cb};this.setStatusDesc=function(Gb){Cb=Gb}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos=
{});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.SwitchCtrlRender=function(Ja,fa,Cb,pb){function Ea(gb){KTDefaultCellRender.call(this,gb);var Wa=this,Ka=this.paintCellUI,rb=U.getHeadRowCount();
this.paintCellUI=function(Ga,la){var ib=Wa.getCurrentRowIdx(),Ua=Wa.getCurrentColIdx();ib>=rb&&1==Ua&&J.getDataType()==Ra.BOOLEAN?(la=Wa.getCurrentRow().getUserObject(),ib=Wa.getCellWidth(),Ua=Wa.getCellHeight(),fb(Ga,ib,Ua,la)):Ka(Ga,la)}}w.call(this,fa,Cb);Za.call(this,Ja,fa,pb);var Gb=this,J=fa,eb=J.getCtrlObject(),db=Gb.getCtrlGap(),Ma=Gb.getCtrlHeight(),ea,W,za,ya,Da;this.protectedInit=function(gb){var Wa=eb.getDefaultValue()===eb.getSwitchOffValue();W=ha.create(!0,J);za=ha.create(!1,J);ya=Wa?
za:W;eb.setDefaultValue(ya.getValue());Wa=$("<div>");var Ka=Gb.createTitle(xa.get("supplyValueSetting","\u5907\u9009\u503c\u8bbe\u7f6e"),0),rb=new Tb;rb.setText(xa.get("supplyValue","\u5907\u9009\u503c"));rb=rb.getJqUi();var Ga=db+Ma;Ca.layoutCtrl(rb,10,Ga);Ga+=db+20;var la=$("<div>");Ca.layoutCtrl(la,10,70,null,106);la.css({border:"1px solid #CCCCCC",width:"calc(100% - 23px)"});Ib(la);Ga+=db+106;Wa.css({position:"relative",width:"100%",height:Ga+"px"});Wa.append(Ka);Wa.append(rb);Wa.append(la);gb.append(Wa);
Jb(gb);Gb.createAdvancedArea(gb)};this.protectedRefreshUi=function(gb){Gb.refreshLinkageUi()};var Jb=function(gb){var Wa=$("<div>"),Ka=Gb.createTitle(xa.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),0),rb=xa.get("defaultValue","\u9ed8\u8ba4\u503c"),Ga=new Tb;Ga.setText(rb);Ga=Ga.getJqUi();sb.isEnglish()&&Ga.attr("title",rb);Da=new Ab;Da.setItemModels([W,za]);Da.addSelectedChangedListener(function(ib,Ua,K){ya=K;eb.setDefaultValue(K.getValue())});Da.setSelected(ya);Da.setCustomPainter(function(ib,
Ua,K){Ua.text(K.getText())});rb=Da.getJqUi();var la=db+Ma;Gb.decorateRow(Ga,rb,la);la+=db+Ma;Wa.css({position:"relative",width:"100%",height:la+"px"});Wa.append(Ka);Wa.append(Ga);Wa.append(rb);gb.append(Wa)},Ib=function(gb){if(ea)U.clearWithoutHead(ea);else{ea=U.createTable();var Wa=new Ea(ea);Wa.setPaddingHV(5,1);ea.setCellRender(Wa);ea.setColumnFitVisibleWidth(!0);ea.setSyncUIWhenModelChanged(!0);ea.setDraggableAdjusting(!0,3,0,new zb);U.bindTextEditor(ea,tb,vb);U.bindTableListenerForCtrl(ea);ea.addColumns(3);
ea.getColumn(0).setWidth(80);ea.getColumn(1).setWidth(120);ea.getColumn(2).setWidth(160);Wa=U.createHeadRow(ea);Wa.getCell(0).setValue(xa.get("switchStatus","\u542f\u7528\u72b6\u6001"));Wa.getCell(1).setValue(xa.get("returnValue","\u8fd4\u56de\u503c"));Wa.getCell(2).setValue(xa.get("displayText","\u663e\u793a\u6587\u672c"));Wa=$(ea.getUI());Wa.addClass("extreport-dataset-designer-param-ctrl-switch-table");Wa.appendTo(gb)}setTimeout(function(){ea.setSyncUIWhenModelChanged(!1);Pa(ea,W);Pa(ea,za);ea.setSyncUIWhenModelChanged(!0);
U.refresh(ea)},0)},Pa=function(gb,Wa){gb=U.createRow(gb);gb.getCell(0).setValue(Wa.getStatusDesc());gb.getCell(1).setValue(Wa.getValue());gb.getCell(2).setValue(Wa.getText());gb.setUserObject(Wa)},vb=function(gb,Wa,Ka,rb,Ga){gb=gb.getUserObject();Wa=ea.getColumnIndex(Wa);if(1==Wa){if(J.getDataType()==Ra.NUMERICAL&&!$.isNumeric(rb))return Ka=xa.get("valueTypeTips","\u53c2\u6570\u7684\u6570\u636e\u7c7b\u578b\u4e3a\u6570\u503c\u7c7b\u578b\uff0c\u8bf7\u8f93\u5165\u6570\u503c\u7c7b\u578b\u7684\u6570\u636e\u3002"),
Ja.getMessageCurtain().showPrompt(Ka),!1;gb.setValue(rb);ya==gb&&eb.setDefaultValue(rb)}else if(2==Wa){if(8<rb.length)return!1;gb.setText(rb)}Da.setItemModels([W,za]);Da.setSelected(ya);Ka.setValue(rb);return!0},tb=function(gb,Wa){return 2==Wa||1==Wa&&J.getDataType()!=Ra.BOOLEAN},fb=function(gb,Wa,Ka,rb){gb=U.createCtrlInCell(gb,Wa,Ka,Ab);gb.setItemModels(["true","false"]);gb.setSelected(rb.getValue());gb.setUserObject(rb);gb.addSelectedChangedListener(function(Ga,la,ib){Ga.getUserObject().setValue(ib)});
gb.setCustomPainter(function(Ga,la,ib){la.text(ib)})}};var xa,Ca,U,sb,w,Za,zb,Tb,Ab,Ra;(function(){var Ja=com.kingdee.bos.qing.framework.common;xa=Ja.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);Ja=com.kingdee.bos.extreport.datasetdesigner.ctrl;w=Ja.AbstractTypeRender;Za=Ja.NormalAdvancedArea;Ja=com.kingdee.bos.qing.ui.component;Tb=Ja.Label;Ab=Ja.ComboBox;Ja=com.kingdee.bos.qing.common;Ca=Ja.DomUtil;Ja=com.kingdee.bos.qing.common.ui;U=Ja.TableUtil;Ja=com.kingdee.bos.extreport.datasetdesigner.model;
Ra=Ja.ParamDataType;Ja=com.kingdee.bos.extreport.datasetdesigner.common;sb=Ja.LanguageUtil;Ja=com.kingdee.bos.extreport.datasetdesigner.common.ui;zb=Ja.TableCustomExpandor})();ha.create=function(Ja,fa){var Cb=fa.getCtrlObject(),pb=new ha(Ja,Cb);fa=fa.getDataType();Ja?(pb.setStatusDesc(xa.get("switchOn","\u5f00\u542f")),pb.setText(Cb.getSwitchOnText()),Ja=Cb.getSwitchOnValue(),fa==Ra.BOOLEAN&&"true"!=Ja&&"false"!=Ja?Ja="true":fa!=Ra.NUMERICAL||$.isNumeric(Ja)||(Ja="1")):(pb.setStatusDesc(xa.get("switchOff",
"\u5173\u95ed")),pb.setText(Cb.getSwitchOffText()),Ja=Cb.getSwitchOffValue(),fa==Ra.BOOLEAN&&"true"!=Ja&&"false"!=Ja?Ja="false":fa!=Ra.NUMERICAL||$.isNumeric(Ja)||(Ja="0"));pb.setValue(Ja);return pb}})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.SpinnerCtrlRender=
function(Za,zb,Tb,Ab){xa.call(this,zb,Tb);var Ra=this,Ja=zb.getCtrlObject(),fa=Ra.getCtrlGap(),Cb=Ra.getCtrlHeight(),pb,Ea;this.protectedRefreshUi=function(ea){Ea.refreshUi()};this.protectedInit=function(ea){Ja.getDefaultValue()||Ja.setDefaultValue("1");var W=$("<div>"),za=Ra.createTitle(ha.get("supplyValueSetting","\u5907\u9009\u503c\u8bbe\u7f6e"),0),ya=new U;ya.setText(ha.get("maxValue","\u6700\u5927\u503c"));ya=ya.getJqUi();var Da=new sb,Jb=Ja.getMaxValue();Jb&&Da.setText(Jb);Da.addBlurListener(Gb);
Da.addAcceptableListener(Gb);Da=Da.getJqUi();Jb=fa+Cb;Ra.decorateRow(ya,Da,Jb);var Ib=new U;Ib.setText(ha.get("minValue","\u6700\u5c0f\u503c"));Ib=Ib.getJqUi();var Pa=new sb,vb=Ja.getMinValue();vb&&Pa.setText(vb);Pa.addBlurListener(J);Pa.addAcceptableListener(J);Pa=Pa.getJqUi();Jb+=fa+Cb;Ra.decorateRow(Ib,Pa,Jb);Jb+=fa+Cb;W.css({position:"relative",width:"100%",height:Jb+"px"});W.append(za);W.append(ya);W.append(Da);W.append(Ib);W.append(Pa);ea.append(W);W=$("<div>");za=Ra.createTitle(ha.get("defaultValueSetting",
"\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),0);Da=ha.get("defaultValue","\u9ed8\u8ba4\u503c");ya=new U;ya.setRequired(!0);ya.setText(Da);ya=ya.getJqUi();w.isEnglish()&&ya.attr("title",Da);pb=new sb;pb.setText(Ja.getDefaultValue());pb.addBlurListener(eb);pb.addAcceptableListener(eb);Da=pb.getJqUi();Jb=fa+Cb;Ra.decorateRow(ya,Da,Jb);Jb+=fa+Cb;W.css({position:"relative",width:"100%",height:Jb+"px"});W.append(za);W.append(ya);W.append(Da);ea.append(W);W=$("<div>");za=Ra.createTitle(ha.get("advancedSetting","\u9ad8\u7ea7\u8bbe\u7f6e"),
0);ya=new U;ya.setText(ha.get("stepSize","\u6b65\u957f"));ya.setRequired(!0);ya=ya.getJqUi();Da=new sb;Da.setText(Ja.getStepSize());Da.addBlurListener(db);Da.addAcceptableListener(db);Da=Da.getJqUi();Jb=fa+Cb;Ra.decorateRow(ya,Da,Jb);Ea=new Ca(Za,zb,Ab);Ib=Ea.getJqUi();Jb+=fa+Cb;Ib.css("top",Jb+"px");Jb+=fa+Cb;W.css({position:"relative",width:"100%",height:Jb+"px"});W.append(ya);W.append(Da);W.append(za);W.append(Ib);ea.append(W)};var Gb=function(ea){var W=ea.getText(),za=!0,ya=!1;if(W){za=$.isNumeric(W);
var Da=Ja.getDefaultValue();za&&$.isNumeric(Da)&&(ya=1==Ma(Da,W));za&&!ya?Ja.setMaxValue(W):ea.setText(Ja.getMaxValue())}else Ja.setMaxValue("");za?ya&&Za.getMessageCurtain().showPrompt(ha.get("outOfBounds","\u9ed8\u8ba4\u503c\u8d85\u51fa\u9650\u5236\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")):Za.getMessageCurtain().showPrompt(ha.get("inputNumber","\u8f93\u5165\u503c\u5fc5\u987b\u4e3a\u6570\u503c\u578b\u3002"))},J=function(ea){var W=ea.getText(),za=!0,ya=!1;if(W){za=$.isNumeric(W);var Da=Ja.getDefaultValue();
za&&$.isNumeric(Da)&&(ya=1==Ma(W,Da));za&&!ya?Ja.setMinValue(W):ea.setText(Ja.getMinValue())}else Ja.setMinValue("");za?ya&&Za.getMessageCurtain().showPrompt(ha.get("outOfBounds","\u9ed8\u8ba4\u503c\u8d85\u51fa\u9650\u5236\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")):Za.getMessageCurtain().showPrompt(ha.get("inputNumber","\u8f93\u5165\u503c\u5fc5\u987b\u4e3a\u6570\u503c\u578b\u3002"))},eb=function(ea){var W=ea.getText(),za=$.isNumeric(W),ya=!1;if(za){ya=Ja.getMaxValue();ya=$.isNumeric(ya)?1==Ma(W,
ya):!1;var Da=Ja.getMinValue();!ya&&$.isNumeric(Da)&&(ya=1==Ma(Da,W));ya?ea.setText(Ja.getDefaultValue()):Ja.setDefaultValue(W)}else ea.setText(Ja.getDefaultValue());za?ya&&Za.getMessageCurtain().showPrompt(ha.get("outOfBounds","\u9ed8\u8ba4\u503c\u8d85\u51fa\u9650\u5236\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")):Za.getMessageCurtain().showPrompt(ha.get("inputNumber","\u8f93\u5165\u503c\u5fc5\u987b\u4e3a\u6570\u503c\u578b\u3002"))},db=function(ea){var W=ea.getText(),za=$.isNumeric(W),ya=!0;za&&
0!=Number(W)?(ya=!1,Ja.setStepSize(W)):ea.setText(Ja.getStepSize());za?ya&&Za.getMessageCurtain().showPrompt(ha.get("stepSizeIsZero","\u6b65\u957f\u4e0d\u80fd\u4e3a0\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")):Za.getMessageCurtain().showPrompt(ha.get("inputNumber","\u8f93\u5165\u503c\u5fc5\u987b\u4e3a\u6570\u503c\u578b\u3002"))},Ma=function(ea,W){if(ea===W)return 0;if(!$.isNumeric(ea)||!$.isNumeric(W))throw Error("Illegal argument");var za=ea.startsWith("-"),ya=W.startsWith("-");if(za==ya){ea=ea.trim("-").trim("+");
W=W.trim("-").trim("+");var Da=ea.indexOf("."),Jb=W.indexOf(".");ya=-1!=Da?ea.slice(0,Da):ea;var Ib=-1!=Jb?W.slice(0,Jb):W;ea=-1!=Da?ea.slice(Da+1):"";W=-1!=Jb?W.slice(Jb+1):"";Jb=Math.max(ya.length,Ib.length);ya=ya.padStart(Jb,"0");Ib=Ib.padStart(Jb,"0");Jb=Math.max(ea.length,W.length);ea=ea.padEnd(Jb,"0");W=W.padEnd(Jb,"0");ea=ya+ea;W=Ib+W;return ea==W?0:(za?-1:1)*(ea>W?1:-1)}return za?-1:1}};var ha,xa,Ca,U,sb,w;(function(){var Za=com.kingdee.bos.qing.framework.common;ha=Za.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);
Za=com.kingdee.bos.extreport.datasetdesigner.ctrl;xa=Za.AbstractTypeRender;Ca=Za.LinkageRender;Za=com.kingdee.bos.extreport.datasetdesigner.common;w=Za.LanguageUtil;Za=com.kingdee.bos.qing.ui.component;U=Za.Label;sb=Za.TextField})()})();(function(){function ha(ea,W){function za(tb){KTDefaultCellRender.call(this,tb);var fb=this,gb=this.paintCellUI;this.paintCellUI=function(Wa,Ka){var rb=fb.getCurrentRowIdx(),Ga=fb.getCurrentRow(),la=fb.getCurrentColIdx(),ib=Ga.getUserObject();if(rb<eb.getHeadRowCount())gb(Wa,Ka);else{Ka=$("<div>");if(0===la)rb=rb-eb.getHeadRowCount()+1,Ka.text(rb),Ka.attr("title",rb),Ka.css("text-align","center");else if(1===la)Ka.text(ib.getName()),Ka.attr("title",ib.getName());else if(2===la)Ka.text(ib.getAlias()),
Ka.attr("title",ib.getAlias());else if(3===la){var Ua=ib.getName();rb=new Ea;rb.setChecked(Ib[Ua]);Ua===Jb.getDisplayFieldName()&&(rb.setChecked(!0),rb.setEnabled(!1));rb.addCheckedListener(function(K,A){K.isChecked()?Ib[Ua]=ib:delete Ib[Ua]});rb=rb.getJqUi();Ka.css({left:"40%",top:"18%"});Ka.append(rb)}Ka.addClass("f7-ctrl-more-field-table-row");$(Wa).append(Ka)}}}Gb.call(this);var ya=this.protectedMethod,Da=this,Jb=ea,Ib={},Pa;(function(){for(var tb=Jb.getHiddenFields(),fb=0;fb<W.length;fb++){var gb=
W[fb],Wa=gb.getName();-1===tb.indexOf(Wa)&&(Ib[Wa]=gb)}ya.setTitle(Ra.get("moreDisplayFields","\u66f4\u591a\u663e\u793a\u5b57\u6bb5"));Da.setSize(470,400);ya.setSelectable(!0);ya.setContentPaneCreator(function(){return vb()});ya.setClosingAction(function(Ka){Ka&&Pa(Ib)})})();this.setFuncSetFieldCallBack=function(tb){Pa=tb};var vb=function(){var tb=eb.createTable(),fb=new za(tb);fb.setOutsideVisible(!1);tb.setColumnFitVisibleWidth(!0);tb.setSyncUIWhenModelChanged(!0);tb.setCellRender(fb);tb.addColumns(4);
tb.getColumn(0).setWidth(20);tb.getColumn(1).setWidth(100);tb.getColumn(2).setWidth(100);tb.getColumn(3).setWidth(60);fb=eb.createHeadRow(tb);fb.getCell(0).setValue(Ra.get("","#"));fb.getCell(1).setValue(Ra.get("fieldName","\u5b57\u6bb5\u540d\u79f0"));fb.getCell(2).setValue(Ra.get("displayName","\u663e\u793a\u540d\u79f0"));fb.getCell(3).setValue(Ra.get("visible","\u662f\u5426\u5c55\u793a"));for(fb=0;fb<W.length;fb++){var gb=W[fb];eb.createRow(tb).setUserObject(gb)}fb=$(tb.getUI());fb.css({"border-bottom":"1px solid #ddd"});
setTimeout(function(){eb.refresh(tb)},0);return fb}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl=
{});com.kingdee.bos.extreport.datasetdesigner.paramctrl.F7Render=function(ea,W,za,ya){Ca.call(this,ea,W,za,ya);var Da=this,Jb=this.protectedMethod,Ib,Pa=W.getCtrlObject(),vb,tb,fb=this.protectedRefreshUi;this.protectedRefreshUi=function(K){fb();vb.refreshUi();tb&&Pa.getTreeType()==Za.PARENT_CHILD&&Ka("$PARENT_FIELD")&&(tb.attr("title",Ka("$PARENT_FIELD")),tb.show())};this.protectedInitDefaultField=function(){var K=Da.getOutputColumnsInSource();Ua(Pa.getTreeType(),K);Pa.getTreeType()===Za.LONG_NUMBER?
(Pa.setLongNumberField(K[0].getName()),Pa.setLongNumberFieldAlias(K[0].getAlias())):Pa.getTreeType()===Za.PARENT_CHILD&&(Pa.setCurrentField(K[0].getName()),Pa.setCurrentFieldAlias(K[0].getAlias()),1<K.length&&(Pa.setParentField(K[1].getName()),Pa.setParentFieldAlias(K[1].getAlias())))};this.funCustomizeSupplyArea=function(K,A,Na){if(Pa.getTreeType()!==Za.NOT_TREE)return Na;K=Da.getCtrlGap();var bb=Da.getCtrlHeight(),Oa=Da.getOutputColumnsInSource(),hb=new Ja,Va=Ra.get("moreDisplayFields","\u66f4\u591a\u663e\u793a\u5b57\u6bb5");
hb.setText(Va);var Ba=new Cb,Ta=Ba.getJqUi();Ba.setCustomPainter(function(wa){if(wa&&wa.length+1<Oa.length){wa=[];for(var wb=0;wb<Oa.length;wb++){var Ob=Oa[wb].getName();-1===Pa.getHiddenFields().indexOf(Ob)&&Ob!==Pa.getDisplayFieldName()&&wa.push(Ob)}wa=1===wa.length?Ra.get("singleField","\u5df2\u9009\u62e9\u5b57\u6bb5#1").replace("#1",gb(wa[0])):Ra.get("multiFields","\u5df2\u9009\u62e9#1\u7b49#2\u4e2a\u5b57\u6bb5").replace("#1",gb(wa[0])).replace("#2",wa.length+"");Ta.attr("title",wa);return wa}return""});
Ba.setModel(Pa.getHiddenFields());Pa.getHiddenFields().length+1<Oa.length?Ba.setClearable(!0):Ba.setClearable(!1);Ba.addActionListener(function(wa){var wb=new ha(Pa,Oa);wb.setFuncSetFieldCallBack(function(Ob){for(var Mb=[],Bb=0;Bb<Oa.length;Bb++){var Aa=Oa[Bb].getName();Ob[Aa]||Mb.push(Aa)}Pa.setHiddenFields(Mb);Mb.length+1<Oa.length?Ba.setClearable(!0):Ba.setClearable(!1);wa.setModel(Pa.getHiddenFields())});wb.showDialog()});Ba.addClearListener(function(){for(var wa=[],wb=0;wb<Oa.length;wb++){var Ob=
Oa[wb].getName();Ob!==Pa.getDisplayFieldName()&&wa.push(Ob)}Pa.setHiddenFields(wa);Ba.setModel(Pa.getHiddenFields());Ba.setClearable(!1)});hb=hb.getJqUi();db.isEnglish()&&hb.attr("title",Va);Da.decorateRow(hb,Ta,Na);Na+=K+bb;A.append(hb);A.append(Ta);return Na};var gb=function(K){for(var A=Da.getOutputColumnsInSource(),Na=0;A&&Na<A.length;Na++)if(A[Na].getName()==K)return A[Na].getAlias();return K};this.protectedCreateAdvancedArea=function(K){var A=Da.getCtrlGap(),Na=Da.getCtrlHeight();Ib?Ib.empty():
Ib=$("<div>");Ib.attr("id","advanced");Ib.css({position:"relative",width:"100%"});var bb=0,Oa=Da.createTitle(Ra.get("advancedSetting","\u9ad8\u7ea7\u8bbe\u7f6e"),bb);Ib.append(Oa);bb=Ga(Ib,bb+(A+Na));bb=ib(Ib,bb);vb=new xa(ea,W,ya);Oa=vb.getJqUi();Oa.css("top",bb+"px");bb+=A+Na;Ib.append(Oa);Ib.css("height",bb);K&&K.append(Ib)};this.getArrBindType=function(){return[w.DATA_SET,w.MACRO,w.SYSTEM]};this.IsMultiSelect=function(){return Pa.getIsAllowMultipleSelected()};var Wa=this.protectedChooseDisplayField;
this.protectedChooseDisplayField=function(K){Pa.getTreeType()==Za.NOT_TREE&&(Pa.addHiddenField(Pa.getDisplayFieldName()),Pa.removeHiddenField(K.getName()));Wa(K)};var Ka=function(K){return Pa.getException(zb.PARAM_CTRL_BIND_SOURCE,W.getName()+K)},rb=function(K){Pa.removeException(zb.PARAM_CTRL_BIND_SOURCE,W.getName()+K)};this.getMultiSelected=function(){return Pa.getRowLimit()?Pa.getRowLimit():2E4};var Ga=function(K,A){var Na=Da.getCtrlGap(),bb=Da.getCtrlHeight();if(Pa.getBindSourceType()!==w.SYSTEM){var Oa=
new Ja,hb=Ra.get("treeStruct","\u6811\u72b6\u7ed3\u6784");Oa.setText(hb);var Va=new pb;Va.setSelected(Pa.getTreeType());Va.setItemModels(Za.ALL_TREE_TYPE);Va.addSelectedChangedListener(function(Fb,ec,Ha){if(Ha!==ec){Pa.setTreeType(Ha);Ua(Ha,Da.getOutputColumnsInSource());Pa.clearAdvancedProp();switch(Ha){case Za.NOT_TREE:Pa.getBindSource()&&(W.removeException(zb.PARAM_CLIENT_ERROR,W.getName()),ya(W));break;case Za.LONG_NUMBER:W.addException(zb.PARAM_CLIENT_ERROR,W.getName(),Ra.get("ctrlPropRequiredTips",
"\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002"));break;default:1>=Da.getOutputColumnsInSource().length&&W.addException(zb.PARAM_CLIENT_ERROR,W.getName(),Ra.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002"))}Da.protectedCreateAdvancedArea();Jb.refreshSupplyArea()}});Va.setCustomPainter(function(Fb,ec,Ha){Fb=$("<div>");var cb;Ha===Za.NOT_TREE?cb=Ra.get("empty","\u65e0"):Ha===Za.LONG_NUMBER?cb=Ra.get("longField",
"\u957f\u7f16\u7801"):Ha===Za.PARENT_CHILD&&(cb=Ra.get("parentSonStruct","\u7236\u5b50\u7ed3\u6784"));Fb.text(cb);ec.append(Fb)});Oa=Oa.getJqUi();db.isEnglish()&&Oa.attr("title",hb);hb=Va.getJqUi();Da.decorateRow(Oa,hb,A);A+=bb+Na;K.append(Oa);K.append(hb);if(Pa.getTreeType()!==Za.NOT_TREE){hb=Da.getOutputColumnsInSource();if(Pa.getTreeType()===Za.LONG_NUMBER){if(Pa.getLongNumberField()){var Ba=new Ab;Ba.setName(Pa.getLongNumberField());Ba.setAlias(Pa.getLongNumberFieldAlias())}else 0<hb.length&&
(Ba=hb[0],Pa.setLongNumberField(hb[0].getName()),Pa.setLongNumberFieldAlias(hb[0].getAlias()));var Ta=new Ja;Oa=Ra.get("longFieldStr","\u957f\u7f16\u7801\u5b57\u6bb5");Ta.setText(Oa);var wa=new sb(Ba,hb,function(Fb){wa.getJqUi().attr("title",Fb.getPatternText());Pa.setLongNumberField(Fb.getName());Pa.setLongNumberFieldAlias(Fb.getAlias());Ob&&Ob.hide();rb("$LONGNUM_FIELD");ya(W)});Va=new Ja;Va.setText(Ra.get("separators","\u5206\u9694\u7b26"));Va.setRequired(!0);var wb=new fa;wb.setText(Pa.getSeparator()?
Pa.getSeparator():"");wb.addAcceptableListener(function(Fb){la(Fb)});wb.addBlurListener(function(Fb){la(Fb)});0===hb.length&&(wa.setEnabled(!1),wb.setEnabled(!1));Ta=Ta.getJqUi();db.isEnglish()&&Ta.attr("title",Oa);hb=wa.getJqUi();Ba&&hb.attr("title",Ba.getPatternText());Ba=Va.getJqUi();wb=wb.getJqUi();if(Va=Ka("$LONGNUM_FIELD")){var Ob=U.getErrorIcon(Va);Ma.layoutCtrl(Ob,90,A+15);K.append(Ob)}Da.decorateRow(Ta,hb,A);A+=bb+Na;Da.decorateRow(Ba,wb,A);A+=bb+Na;K.append(Ta);K.append(hb);K.append(Ba);
K.append(wb)}else if(Pa.getTreeType()===Za.PARENT_CHILD){Pa.getCurrentField()?(Ta=new Ab,Ta.setName(Pa.getCurrentField()),Ta.setAlias(Pa.getCurrentFieldAlias())):0<hb.length&&(Ta=hb[0],Pa.setCurrentField(Ta.getName()),Pa.setCurrentFieldAlias(Ta.getAlias()));Pa.getParentField()?(wb=new Ab,wb.setName(Pa.getParentField()),wb.setAlias(Pa.getParentFieldAlias())):1<hb.length&&(wb=hb[1],Pa.setParentField(wb.getName()),Pa.setParentFieldAlias(wb.getAlias()));Ba=new Ja;Ba.setText(Ra.get("sonField","\u8282\u70b9\u5b57\u6bb5"));
var Mb=new sb(Ta,hb,function(Fb){Mb.getJqUi().attr("title",Fb.getPatternText());var ec=Fb.getName();Fb=Fb.getAlias();ec===Pa.getParentField()&&Fb===Pa.getParentFieldAlias()?(ea.getMessageCurtain().showPrompt(Ra.get("noSameField","\u8282\u70b9\u5b57\u6bb5\u548c\u7236\u8282\u70b9\u5b57\u6bb5\u4e0d\u80fd\u9009\u62e9\u76f8\u540c\u7684\u5b57\u6bb5")),Mb.setSelectedModel(null)):(Pa.setCurrentField(ec),Pa.setCurrentFieldAlias(Fb),Aa&&Aa.hide(),rb("$CURRENT_FIELD"),ya(W))});Va=new Ja;Va.setText(Ra.get("parentField",
"\u7236\u8282\u70b9\u5b57\u6bb5"));var Bb=new sb(wb,hb,function(Fb){Bb.getJqUi().attr("title",Fb.getPatternText());var ec=Fb.getName();Fb=Fb.getAlias();ec===Pa.getCurrentField()&&Fb===Pa.getCurrentFieldAlias()?(ea.getMessageCurtain().showPrompt(Ra.get("noSameField","\u8282\u70b9\u5b57\u6bb5\u548c\u7236\u8282\u70b9\u5b57\u6bb5\u4e0d\u80fd\u9009\u62e9\u76f8\u540c\u7684\u5b57\u6bb5")),Bb.setSelectedModel(null)):(Pa.setParentField(ec),Pa.setParentFieldAlias(Fb),tb&&tb.hide(),rb("$PARENT_FIELD"),ya(W))});
0===hb.length&&(Mb.setEnabled(!1),Bb.setEnabled(!1));Ba=Ba.getJqUi();hb=Mb.getJqUi();Ta&&hb.attr("title",Ta.getPatternText());Ta=Va.getJqUi();Va=Bb.getJqUi();wb&&Va.attr("title",wb.getPatternText());if(wb=Ka("$CURRENT_FIELD")){var Aa=U.getErrorIcon(wb);Ma.layoutCtrl(Aa,90,A+15);K.append(Aa)}Da.decorateRow(Ba,hb,A);A+=bb+Na;wb=Ka("$PARENT_FIELD");tb=U.getErrorIcon(wb);tb.hide();wb&&tb.show();Ma.layoutCtrl(tb,90,A+15);K.append(tb);Da.decorateRow(Ta,Va,A);A+=bb+Na;K.append(Ba);K.append(hb);K.append(Ta);
K.append(Va)}wb=new Ja;Ba=Ra.get("defualtLevel","\u9ed8\u8ba4\u5c55\u5f00\u7ea7\u522b");wb.setText(Ba);Ta=new J;var Hb=Ta.getJqUi();Pa.getTreeExpandLevel()||Pa.setTreeExpandLevel(2);Hb.attr("title",Pa.getTreeExpandLevel());Ta.setValue(Pa.getTreeExpandLevel());Ta.setConstraint(1,100,1);Ta.addValueChangedListener(function(Fb,ec,Ha){Pa.setTreeExpandLevel(Ha);Hb.attr("title",Ha)});wb=wb.getJqUi();db.isEnglish()&&wb.attr("title",Ba);Da.decorateRow(wb,Hb,A);A+=Na+bb;K.append(wb);K.append(Hb)}}return A},
la=function(K){var A=Pa.getSeparator(),Na=K.getText();Na||(Na=A);Pa.setSeparator(Na);K.setText(Na?Na:"");ya(W)},ib=function(K,A){var Na=Da.getCtrlGap(),bb=Da.getCtrlHeight(),Oa=new Ja,hb=Ra.get("multiAllow","\u5141\u8bb8\u591a\u9009");Oa.setText(hb);var Va=new Ea;Va.setChecked(Pa.getIsAllowMultipleSelected());Va.addCheckedListener(function(Ba,Ta){Pa.setIsAllowMultipleSelected(Ba.isChecked());Ba.isChecked()?Pa.setRowLimit(10<=Pa.getRowLimit()?Pa.getRowLimit():10):(Pa.setRowLimit(1),(Ba=Pa.getDefaultValue())&&
-1!==Ba.indexOf(Tb.SPLIT)&&Pa.setDefaultValue(Ba.substring(0,Ba.indexOf(Tb.SPLIT))));Pa.getDefaultValueType()===Tb.CONSTANT&&Jb.refreshDefaultArea();Da.protectedCreateAdvancedArea()});Oa=Oa.getJqUi();db.isEnglish()&&Oa.attr("title",hb);hb=Va.getJqUi();Da.decorateRow(Oa,hb,A);hb.css("top",A+5);hb.css("width",20);A+=Na+bb;K.append(Oa);K.append(hb);Pa.getIsAllowMultipleSelected()&&(Oa=new Ja,hb=Ra.get("multiUp","\u591a\u9009\u4e0a\u9650"),Oa.setText(hb),Va=new J,Va.setValue(Pa.getRowLimit()),Va.setConstraint(1,
2E4,1),Va.addValueChangedListener(function(Ba,Ta,wa,wb){Pa.setRowLimit(wa)}),Oa=Oa.getJqUi(),db.isEnglish()&&Oa.attr("title",hb),hb=Va.getJqUi(),Da.decorateRow(Oa,hb,A),A+=Na+bb,K.append(Oa),K.append(hb));return A},Ua=function(K,A){var Na=[];if(K==Za.NOT_TREE)for(K=0;A&&K<A.length;K++){var bb=A[K];bb.getName()!==Pa.getDisplayFieldName()&&Na.push(bb.getName())}Pa.setHiddenFields(Na)}};var xa,Ca,U,sb,w,Za,zb,Tb,Ab,Ra,Ja,fa,Cb,pb,Ea,Gb,J,eb,db,Ma;(function(){var ea=com.kingdee.bos.extreport.datasetdesigner.ctrl;
xa=ea.LinkageRender;Ca=ea.AbstractBindSourceRender;U=ea.ErrorIconFactory;sb=ea.SearchFieldSelector;ea=com.kingdee.bos.extreport.datasetdesigner.common;db=ea.LanguageUtil;ea=com.kingdee.bos.extreport.datasetdesigner.model;w=ea.ParamBindSourceType;Za=ea.ParamF7TreeType;zb=ea.DataSetModelCheckType;Tb=ea.ParamDefaultValueType;Ab=ea.NameAliasPair;ea=com.kingdee.bos.qing.framework.common;Ra=ea.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);ea=com.kingdee.bos.qing.ui.component;
Ja=ea.Label;fa=ea.TextField;Cb=ea.F7Selector;pb=ea.ComboBox;Ea=ea.CheckBox;Gb=ea.AbstractModalDialog;J=ea.Spinner;ea=com.kingdee.bos.qing.common.ui;eb=ea.TableUtil;ea=com.kingdee.bos.qing.common;Ma=ea.DomUtil})()})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.CheckBoxRender=
function(xa,Ca,U,sb){ha.call(this,xa,Ca,U,sb);this.IsMultiSelect=function(){return!0}};var ha=com.kingdee.bos.extreport.datasetdesigner.ctrl.AbstractBindSourceRender})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner.paramctrl&&(com.kingdee.bos.extreport.datasetdesigner.paramctrl={});com.kingdee.bos.extreport.datasetdesigner.paramctrl.LabelCtrlRender=
function(Za,zb,Tb,Ab){Ca.call(this,zb,Tb);var Ra=this,Ja=zb.getCtrlObject(),fa=Ra.getCtrlHeight(),Cb=Ra.getCtrlGap();this.protectedInit=function(Ea){pb(Ea)};var pb=function(Ea){var Gb=$("<div>"),J=Ra.createTitle(ha.get("defaultValueSetting","\u9ed8\u8ba4\u503c\u8bbe\u7f6e"),0),eb=new U;eb.setText(ha.get("labelText","\u663e\u793a\u6587\u5b57"));eb=eb.getJqUi();var db=fa+Cb;xa.layoutCtrl(eb,10,db);var Ma=new sb;Ma.setChapterModifyListener(function(W){var za=W?W.getChapterHtml():"";Ja.setDefaultValue(za);
W=Ja.setDefaultAlias;if(za){za=$(za);var ya=za.children("p");if(ya&&0<ya.length)for(var Da=0;Da<ya.length;Da++){var Jb=$(ya[Da]),Ib=Jb.text();Ib&&0!=Ib.length||Jb.append($("<br>"))}za=za.prop("outerHTML")}W.call(Ja,za);Ja.check(Ab)});var ea=w.create();ea.initFromHtml(Ja.getDefaultValue());Ma.setMaxCharacters(100);Ma.setBackgroundColor("rgb(226, 231, 239)");Ma.setModel(ea);setTimeout(function(){Ma.requestFocus()},0);ea=Ma.getJqUi();db+=22+Cb;xa.layoutCtrl(ea,10,db,"calc(100% - 20px)",340);db+=340+
Cb;Gb.css({position:"relative",width:"100%",height:db+"px"});Gb.append(J);Gb.append(eb);Gb.append(ea);Ea.append(Gb)}};var ha,xa,Ca,U,sb,w;(function(){var Za=com.kingdee.bos.qing.framework.common;ha=Za.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);Za=com.kingdee.bos.extreport.datasetdesigner.ctrl;Ca=Za.AbstractTypeRender;Za=com.kingdee.bos.qing.ui.component;U=Za.Label;ColorChooser=Za.ColorChooser;Za=com.kingdee.bos.qing.common;xa=Za.DomUtil;Za=com.kingdee.bos.extreport.common;
sb=Za.RichEditor;w=Za.Chapter})()})();(function(){function ha(wa){function wb(){KTableSelectionRender.call(this);var u=$("<div>"),P=this;this.show=function(va,h,d,l,m){P.getTable().getUI().addEventListener("mouseup",N);Ma.layoutCtrl(u,h+1,d+2,l-h-1,m-d-3);M();u.css("z-index",0);va.append(u)};var N=function(){for(var va=P.getTable(),h=0,d=0;d<va.getColumnsCount();d++){var l=Qa.getColumn(d);h+=l.getWidth()}u.css("width",h-1)};this.remove=function(){P.getTable().getUI().removeEventListener("mouseup",N);u.remove()};this.current=function(){M()};
this.letOthersOld=function(va){};var M=function(va){u.addClass("sa-common-table-selection");u.addClass("param-ctrl-table-selection-border")}}function Ob(u){KTDefaultCellRender.call(this,u);var P=this,N=this.paintCellUI,M,va=new ea;va.setFontSize(12);this.paintCellUI=function(p,q){var c=P.getCurrentRowIdx(),D=P.getCurrentRow(),H=P.getCurrentColIdx(),L=D.getUserObject();if(c<za.getHeadRowCount())N(p,q),1==c&&(0==H?(D=Object.keys(Aa).length,D=0<D&&D===oa().length?!0:!1,M=new pb,M.setChecked(D),M.addCheckedListener(function(ia,
z){if(z){if(ia.isChecked())for(ob(),ia=0;ia<oa().length;ia++)Aa[ia]=nb(ia);else Aa={},Y();Mb.updateTable()}}),D=M.getJqUi(),Ma.layoutCtrlWithLRTB(D,($(p).outerWidth()>>1)-5,null,16,null,null),$(p).append(D)):4==H&&(D=new J,D.setTipsText(w.get("enablePrompt","\u4e0d\u542f\u7528\u65f6\uff0c\u82e5\u5f53\u524d\u53c2\u6570\u8bbe\u7f6e\u4e3a\u7a7a\u503c\uff0c\u5c06\u6309\u7a7a\u503c\u4f5c\u4e3a\u8fc7\u6ee4\u6761\u4ef6\u5bf9\u6570\u636e\u8fdb\u884c\u8fc7\u6ee4\u3002\n\u542f\u7528\u65f6\uff0c\u82e5\u5f53\u524d\u53c2\u6570\u8bbe\u7f6e\u4e3a\u7a7a\u503c\uff0c\u5c06\u5ffd\u7565\u8fc7\u6ee4\u6761\u4ef6\u3002 \n\u6b64\u65f6\uff0c\u4f7f\u7528\u8be5\u53c2\u6570\u7684SQL\u67e5\u8be2\u8bed\u53e5\u4e4b\u540e\u9700\u52a0\u4e0a\u201cor ? is null\u201d\u624d\u80fd\u751f\u6548\u3002\n\u4f8b\uff1awhere \u5730\u533a in ('@region') or ? is null")),
D=D.getJqUi(),Ma.layoutCtrlWithLRTB(D,($(p).outerWidth()>>1)+(va.measureWidth(w.get("ignoreFilterByNull","\u7a7a\u503c\u65f6\u5ffd\u7565\u8fc7\u6ee4\u6761\u4ef6"))>>1)+5,null,null,3,null,null),$(p).append(D)));else if(0==H){p=$(p);var X;L.getException(fb.PARAM_CLIENT_ERROR)?X=Oa.getErrorIcon(w.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002")):L.getException(fb.PARAM)&&(X=Oa.getErrorIcon(w.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002")));
X&&p.append(X);X&&Ma.layoutCtrl(X,2,21);var ua=c-za.getHeadRowCount();c=new pb;(D=M&&M.isChecked())?c.setChecked(D):Aa[ua]?c.setChecked(!0):c.setChecked(!1);D=c.getJqUi();c.addCheckedListener(function(ia,z){z&&(ia.isChecked()?(ob(),Aa[ua]=L,Object.keys(Aa).length==oa().length&&M.setChecked(!0)):(delete Aa[ua],0==Object.keys(Aa).length&&Y(),M.setChecked(!1)))});Ma.layoutCtrlWithLRTB(D,($(p).outerWidth()>>1)-5,null,16,10,null,null);p.append(D)}else 1==H?(h($(p)),D=$("<div>"),c=L.getCtrlType(),X=Jb.ctrlTypeToIconName(c),
D.attr("title",Jb.ctrlTypeToName(c)),D.addClass("extreport-dataset-designer-param-ctrl-table-name-icon"),K.background(D,X),$(p).append(D)):2==H?(p=$(p),D=P.getCell().getValue(),c=$("<div>"),c.text(D),c.attr("title",D),c.addClass("extreport-dataset-designer-param-ctrl-table-input"),c.css({overflow:"hidden","text-overflow":"ellipsis"}),p.empty(),p.append(c),p.css("cursor","pointer")):3==H?(c=L.getDataType(),p=za.createCtrlInCell(p,P.getCellWidth(),P.getCellHeight(),Ea),p.setSelected(c),p.setItemModels(Da.ALL_DATA_TYPE),
p.setUserObject(D),p.showFeature(!0),p.setCustomPainter(function(ia,z,v){var y=$("<div>"),x=Da.dataTypeToIconName(v);v!=L.getDataType()||ia||(x+="_selected");Ta.background(y,x);y.addClass("extreport-dataset-designer-param-ctrl-table-type-icon");z.append(y);ia=$("<div>");ia.text(Da.dataTypeToName(v));ia.css("margin-left","20px");z.append(ia)}),p.addSelectedChangedListener(d),p.getJqUi().css("box-shadow","none")):4==H?(D=new Gb,D.setOn(L.getIsIgnoreNull()),D.addStateChangeListener(l),D=D.getJqUi(),
D.addClass("extreport-dataset-designer-param-ctrl-table-switch-btn"),$(p).append(D)):5==H&&(p=$(p),D=P.getCell().getValue(),c=$("<div>"),c.text(D),c.attr("title",D),c.addClass("extreport-dataset-designer-param-ctrl-table-input"),c.css({overflow:"hidden","text-overflow":"ellipsis"}),p.empty(),p.append(c),p.css("cursor","pointer"))};var h=function(p){var q=P.getCell().getValue(),c=$("<span>");c.css({overflow:"hidden","text-overflow":"ellipsis"});c.text(q);c.attr("title",q);c.addClass("extreport-dataset-designer-param-ctrl-table-input");
c.addClass("param-ctrl-table-name-text-adjust");p.append(c);p.css("cursor","pointer")},d=function(p,q,c){if(q!==c){var D=Mb.getCurrentParam();Wa.removeRender(D);var H=D.getCtrlType();if(m(H,c))p.setItemModels(Da.ALL_DATA_TYPE),p.setSelected(c),D.setDataType(c),gc.render(D);else{var L=w.get("changeContrlTips","#1\u4e0d\u652f\u6301#2\u6570\u636e\u7c7b\u578b\uff0c\u6539\u53d8\u6570\u636e\u7c7b\u578b\u5c06\u4f1a\u6e05\u7a7a\u5f53\u524d\u63a7\u4ef6\u5c5e\u6027\uff0c\u786e\u5b9a\u8981\u6539\u53d8\u5417\uff1f");
L=L.replace("#1",Jb.ctrlTypeToName(H));L=L.replace("#2",Da.dataTypeToName(c));H=db.createFeedbackDialog();H.setOptionType(db.OPTION_OK_CANCEL);H.setMessage(L);H.setClosingChecker(function(X){X==db.RETURN_OK&&(p.setItemModels(Da.ALL_DATA_TYPE),p.setSelected(c),D.clearException(fb.PARAM_CLIENT_ERROR),D.clearException(fb.PARAM),rb.removeLinkage(D),D.setCtrlType(Jb.INPUT),D.setDataType(c),X=Pa.createCtrl(Jb.INPUT,D),X.setIsRequired(!1),X.setCtrlState(la.STANDER),X.setDefaultValueType(ib.CONSTANT),X.setBindSourceType&&
X.setBindSourceType(vb.DATA_SET),D.setCtrlObject(X),Mb.funcShowErrorIcon(),Mb.updateTable(),p.setBindSourceType&&X.addException(fb.PARAM_CLIENT_ERROR,D.getName(),w.get("ctrlPropRequiredTips","\u63a7\u4ef6\u5c5e\u6027\u5b58\u5728\u672a\u8bbe\u7f6e\u7684\u5fc5\u586b\u9879\u3002")));return!0});H.showDialog();p.setSelected(q)}}},l=function(p,q){Mb.getCurrentParam().setIsIgnoreNull(p.isOn())},m=function(p,q){if(q==Da.TXT||q==Da.BOOLEAN)switch(p){case Jb.DATE:case Jb.SPINNER:return!1}else if(q==Da.NUMERICAL)switch(p){case Jb.DATE:return!1}else switch(p){case Jb.SWITCH:case Jb.SPINNER:return!1}return!0}}
var Mb=this,Bb,Aa={},Hb,Fb,ec,Ha,cb,ub,Qa,R,dc,bc=$("<div>"),Vb,Pb,cc,Xb,gc;this.getJqUi=function(){if(!Bb){Bb=$("<div>");var u=new sb(w.get("paramList","\u53c2\u6570\u5217\u8868")),P=$("<div>"),N=$("<div>");N.addClass("extreport-dataset-designer-toolbar-box");N.append(Sa("extreport-dataset-designer-param-toolbar-btn-menu",w.get("append","\u65b0\u589e"),B,!0));Ub(N);N.append($("<div class='extreport-dataset-designer-param-toolbar-line'>"));Fb=Sa("extreport-dataset-designer-param-toolbar-btn",w.get("del",
"\u5220\u9664"),Z);N.append(Fb);N.append($("<div class='extreport-dataset-designer-param-toolbar-line'>"));N.append(Sa("extreport-dataset-designer-param-toolbar-btn",w.get("importParam","\u5bfc\u5165\u53c2\u6570"),Xa));N.append($("<div class='extreport-dataset-designer-param-toolbar-line'>"));ec=Sa("extreport-dataset-designer-param-toolbar-btn",w.get("up","\u4e0a\u79fb"),C);N.append(ec);N.append($("<div class='extreport-dataset-designer-param-toolbar-line'>"));Ha=Sa("extreport-dataset-designer-param-toolbar-btn",
w.get("down","\u4e0b\u79fb"),O);N.append(Ha);N.append($("<div class='extreport-dataset-designer-param-toolbar-line'>"));N.append(Sa("extreport-dataset-designer-param-toolbar-btn",w.get("paramView","\u53c2\u6570\u8054\u52a8\u89c6\u56fe"),ra));Y();var M=e();P.append(N);P.append(M);P.addClass("extreport-dataset-designer-param-border");Bb.append(u.getJqUi());Bb.append(P);F()}return Bb};this.setParamDetailArea=function(u){gc=u};this.setDataSetModel=function(u){Hb=u;u={};for(var P=Object.keys(Aa),N=0;N<
P.length;N++){var M=Number(P[N]);u[M]=nb(M)}Aa=u};var oa=function(){return Hb?Hb.getParameters():null},nb=function(u){return Hb.getParameters()[u]},Ub=function(u){var P=new fa;ca(P,r,w.get("addParamBySearch","\u6839\u636e\u67e5\u8be2\u8bed\u53e5\u65b0\u589e\u53c2\u6570"),!0);var N=$("<div>");N.addClass("extreport-dataset-designer-param-toolbar-arrow-icon");N.attr("id","arrow-up");K.background(N,"ArrowDown");N.on("click",function(M){Ya(N,u,function(){return P})});u.append(N)},Ya=function(u,P,N){var M=
u.data("menu");M&&M.isShowing()?(u.data("menu",null),M.hide()):(M=new Ja,M.setWidth(120),M.setModel(N()),M.setHideListener(function(){u.data("menu",null)}),u.data("menu",M),M.getJqUi().find(".sa-ctrl-menu-item-text").addClass("impor-menu-text-color"),M.show(Bb,15,60,P,!0))},ca=function(u,P,N,M){P=new Cb(P);M?P.setText(N):P.setText(N+"...");u.addItemModel(P)},Sa=function(u,P,N){var M=$("<div>");M.addClass(u);M.on("click",N);M.text(P);M.attr("title",P);return M},e=function(){Qa=new za.createTable;var u=
new Ob(Qa);u.setOutsideVisible(!1);Qa.setCellRender(u);Qa.addColumns(6);Qa.getColumn(0).setWidth(30);Qa.getColumn(1).setWidth(120);Qa.getColumn(2).setWidth(140);Qa.getColumn(3).setWidth(100);Qa.getColumn(4).setWidth(140);Qa.getColumn(5).setWidth(200);u=za.createHeadRow(Qa);u.getCell(1).setValue(w.get("name","\u540d\u79f0"));u.getCell(2).setValue(w.get("displayName","\u663e\u793a\u540d\u79f0"));u.getCell(3).setValue(w.get("dataType","\u6570\u636e\u7c7b\u578b"));u.getCell(4).setValue(w.get("ignoreFilterByNull",
"\u7a7a\u503c\u65f6\u5ffd\u7565\u8fc7\u6ee4\u6761\u4ef6"));u.getCell(5).setValue(w.get("descr","\u5907\u6ce8"));Qa.setColumnFitVisibleWidth(!0);Qa.setDraggableAdjusting(!0,3,0,new Ba);Fa().setMode(KTSelectionModel.MODE_SINGLE);Fa().setPolicy(KTSelectionModel.POLICY_ROW);Qa.setSelectionRender(wb);Fa().addChangeListener(function(P,N){if(P==KTSelectionModel.CHANGE_ADD)if(P=N[0].getRowIdx(),Qa.getRow(P,!1)){N=nb(P-za.getHeadRowCount());var M;0<Pb&&(M=nb(Pb));M&&N!==M&&n(M);Pb=P-za.getHeadRowCount();gc.render(N)}else gc.render(null)});
Qa.addCellClickListener(function(P,N){N.getCell()?(P=N.getColIdx(),N=N.getRowIdx(),g(N,P)&&a(N,P)):(cb&&cb.remove(),cb=null)});za.bindTableListenerForCtrl(Qa,function(P,N,M,va){(N=P.data("my-ctrl"))&&N.showFeature&&N.showFeature(!0);va?g(M,va)&&(ub=$("<div>"),ub.addClass("param-ctrl-table-mouse-move-line"),1===va&&ub.addClass("param-ctrl-table-name-text-adjust"),P.append(ub)):(ub&&$(ub).remove(),ub=null)});R=$(Qa.getUI());R.addClass("extreport-dataset-designer-param-ctrl-table");return R};this.funcShowErrorIcon=
function(u){if(u)n(u);else for(u=0;u<oa().length;u++)n(nb(u))};var n=function(u){var P=oa().indexOf(u);if(-1!==P){P=za.getHeadRowCount()+P;P=Qa.searchJqCell(P,0);var N=P.find(".extreport-dataset-designer-param-ctrl-fault-mark");u.check();var M;u.getException(fb.PARAM_CLIENT_ERROR)?M=u.getException(fb.PARAM_CLIENT_ERROR):u.getException(fb.PARAM)&&(M=w.get("ctrlPropSettingTips","\u63a7\u4ef6\u5c5e\u6027\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\u3002"));M?0==N.length?(N=Oa.getErrorIcon(M),Ma.layoutCtrl(N,
2,21),P.append(N)):N.attr("title",M):N&&N.remove()}};this.checkAllParam=function(){for(var u=0;u<oa().length;u++)nb(u).check()};var g=function(u,P){return u<za.getHeadRowCount()||3===P||4===P?!1:!0},a=function(u,P,N){if(!cb||Xb!==P||u!==cc){cb&&cb.remove();cc=u;Xb=P;for(var M=Mb.getCurrentParam(),va=Qa.searchJqCell(u,P),h=t(M,P),d=new eb,l=u-2,m="Param"+l,p=Hb.getParamNameSet();p[m.toLowerCase()];)l++,m="Param"+l;h?d.setText(h):1===P&&(M.setName(m),M.setAlias(m),d.setPlaceholder(m));cb=d.getJqUi();
cb.addClass("param-table-textfield-background");1===P&&cb.addClass("param-ctrl-table-name-text-adjust");d.addBlurListener(function(q){cb.remove();cb=null;!f(q,M,u,P,m,N,!0)&&N&&Mb.updateTable()});d.addAcceptableListener(function(q){f(q,M,u,P,m,N,!1)&&(cb.remove(),cb=null)});va.append(cb);d.requestFocus()}},f=function(u,P,N,M,va,h,d){u=u.getText().trim();va=t(P,M);if(1===M){if(!u)return u=wa.getMessageCurtain(),d?h?(Qa.setSyncUIWhenModelChanged(!0),b(P,N,M,P.getName(),h),Mb.refreshTable(),Qa.setSyncUIWhenModelChanged(!1)):
u.showPrompt(w.get("giveUpChangeByEmptyName","\u540d\u79f0\u4e0d\u53ef\u4e3a\u7a7a\uff0c\u5df2\u653e\u5f03\u4fee\u6539\u3002")):u.showPrompt(w.get("giveUpChangeByEmptyNameClick","\u540d\u79f0\u4e0d\u53ef\u4e3a\u7a7a\u3002")),!1;a:{for(var l=wa.getMessageCurtain(),m=0;m<oa().length;m++)if(P!==nb(m)&&u.toUpperCase()===nb(m).getName().toUpperCase()){d?l.showPrompt(w.get("giveUpByRepetitionName","\u91cd\u590d\u7684\u540d\u79f0\uff1a# \uff0c\u5df2\u653e\u5f03\u4fee\u6539\u3002").replace("#",u)):l.showPrompt(w.get("repetitionName",
"\u91cd\u590d\u7684\u540d\u79f0\uff1a# \u3002").replace("#",u));d=!1;break a}gb.check(u)?d=!0:(d?l.showPrompt(w.get("nameErrorGiveUp","\u540d\u79f0\u53ea\u80fd\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e14\u4e0d\u80fd\u662f\u7eaf\u6570\u5b57\uff0c\u5df2\u653e\u5f03\u4fee\u6539")):l.showPrompt(w.get("nameError","\u540d\u79f0\u53ea\u80fd\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e14\u4e0d\u80fd\u662f\u7eaf\u6570\u5b57\u3002")),
d=!1)}if(!d)return!1}if(u===va)return!1;Qa.setSyncUIWhenModelChanged(!0);b(P,N,M,u,h);Mb.refreshTable();Qa.setSyncUIWhenModelChanged(!1);return!0},b=function(u,P,N,M,va){P=Qa.getRow(P);var h=P.getCellForDraw(N);1===N?(u.setName(M),va&&(u.setAlias(M),P.getCellForDraw(N+1).setValue(M))):2===N?(M||(M=u.getName()),u.setAlias(M)):5===N&&u.setRemark(M);h.setValue(M);return!0},t=function(u,P){if(1===P)return u.getName();if(2===P)return u.getAlias();if(5===P)return u.getRemark()},r=function(){for(var u=Hb.getParamInSql(),
P=Hb.getParamNameSet(),N=[],M="",va=0;va<u.length;va++)!P[u[va].toLowerCase()]&&gb.check(u[va])&&(N.push(u[va]),M+=u[va]+w.get("dot","\u3001"));P=db.createFeedbackDialog();0<N.length?(u=w.get("addTips","\u68c0\u6d4b\u5230\u4ee5\u4e0b\u53c2\u6570\u672a\u65b0\u589e\uff0c\u662f\u5426\u65b0\u589e\uff1a#1;"),M=M.slice(0,M.length-1),u=u.replace("#1",M),P.setOptionType(db.OPTION_OK_CANCEL),P.setClosingChecker(function(h){if(h==db.RETURN_OK){h=0===oa().length;for(var d=0;d<N.length;d++){var l=tb.createDefault(Hb);
l.setName(N[d]);l.setAlias(N[d]);Hb.pushParameter(l)}Mb.updateTable();h&&F()}return!0})):(u=w.get("noAddParamBySearch","\u67e5\u8be2\u8bed\u53e5\u4e2d\u6682\u65e0\u672a\u65b0\u589e\u7684\u53c2\u6570\u3002"),P.setOptionType(db.OPTION_OK));P.setMessage(u);P.showDialog()},F=function(){if(0!==oa().length){Fa().removeAllSelecteds();var u=za.getHeadRowCount();u=KTSelectionModel.Target.createRow(u);Fa().addSelected(u)}},B=function(){var u=tb.createDefault(Hb);Hb.pushParameter(u);Fa().removeAllSelecteds();
Mb.updateTable();u=za.getHeadRowCount()+oa().length-1;var P=KTSelectionModel.Target.createRow(u);Fa().addSelected(P);cb&&cb.remove();a(u,1,!0)},Z=function(u){0===Object.keys(Aa).length?u.preventDefault():(u=db.createFeedbackDialog(),u.setOptionType(db.OPTION_OK_CANCEL),u.setMessage(w.get("delTips","\u5220\u9664\u6240\u9009\u53c2\u6570\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u8981\u5220\u9664\u5417\uff1f")),u.setClosingChecker(function(P){if(P==db.RETURN_OK){Aa[Pb]&&(Pb=-1);P=Object.values(Aa);
for(var N=0;N<P.length;N++){var M=P[N];Wa.removeRender(M);rb.removeLinkage(M);Mb.funcShowErrorIcon();Hb.removeParamByObject(M)}Aa={};0==oa().length?(Fa().removeAllSelecteds(),gc.render(null)):(P=Fa().getSelected(),Fa().removeAllSelecteds(),P=P.getRowIdx(),P+1-za.getHeadRowCount()>oa().length&&(P=za.getHeadRowCount()+oa().length-1),P=KTSelectionModel.Target.createRow(P),Fa().addSelected(P));Y();Mb.updateTable()}return!0}),u.showDialog())},Xa=function(){var u=new Va(wa);u.setTitle(w.get("importParam",
"\u5bfc\u5165\u53c2\u6570"));var P=new U(wa,u.getDialogParam());u.buildContextArea(P);u.setFuncQueryRightAreaByMenu(P.loadDataSetByGroupId);u.setFuncBeforeCloseChecker(function(){var N=u.getResult();if(0===N.length)return!0;var M=0===oa().length,va=G(N);if(0<va.length){var h=db.createFeedbackDialog();h.setOptionType(db.OPTION_OK_CANCEL);for(var d=w.get("coverName","\u540d\u79f0#Param\u5df2\u7ecf\u5b58\u5728\uff0c\u786e\u5b9a\u8981\u8986\u76d6\u5417\uff1f"),l="",m=0;m<va.length;++m){var p=va[m].getName();
l+='"'+p+'"'+w.get("dot","\u3001")}l=l.slice(0,l.length-1);d=d.replace("#Param",l);h.setMessage(d);h.setClosingChecker(function(q){if(q==db.RETURN_OK){q={};for(var c=0;c<va.length;c++)q[va[c].getName().toLowerCase()]=!0;for(c=0;c<oa().length;++c){var D=nb(c).getName().toLowerCase();if(q[D]){D=c;var H=nb(D);rb.removeLinkage(H);Mb.funcShowErrorIcon();Hb.removeParameterByIndex(D,1);c--}}aa(N);u.closeDialog();M&&F()}return!0});h.showDialog();return!1}aa(N);M&&F();return!0});u.showDialog()},aa=function(u){for(var P=
0;P<u.length;++P){var N=u[P];N.setModel(Hb);var M=N.getCtrlObject();M.getBindSource&&M.getBindSource()&&M.getBindSource().setModel(Hb);N.check();Hb.pushParameter(N)}Mb.updateTable()},G=function(u){for(var P=[],N=Hb.getParamNameSet(),M=0;M<u.length;++M){var va=u[M],h=va.getName();N[h.toLowerCase()]&&P.push(va)}return P},C=function(u){0===Object.keys(Aa).length?u.preventDefault():(Ga.moveSelectedUp(oa(),Aa),Mb.updateTable())},O=function(u){0===Object.keys(Aa).length?u.preventDefault():(Ga.moveSelectedDown(oa(),
Aa),Mb.updateTable())},ra=function(){(new xa(wa,oa())).showDialog()};this.getCurrentParam=function(){var u=Fa().getSelected();if(!u)return null;u=u.getRowIdx();return Qa.getRow(u)?nb(u-za.getHeadRowCount()):null};var Fa=function(){return Qa&&Qa.getSelectionModel()};this.updateTable=function(){if(oa()&&0<oa().length){if(R.css("display","block"),bc.css("display","none"),0!=Bb.prop("offsetWidth")){za.clear(Qa);Qa.addColumns(6);Qa.getColumn(0).setWidth(30);Qa.getColumn(1).setWidth(120);Qa.getColumn(2).setWidth(140);
Qa.getColumn(3).setWidth(100);Qa.getColumn(4).setWidth(140);Qa.getColumn(5).setWidth(200);var u=za.createHeadRow(Qa);u.getCell(1).setValue(w.get("name","\u540d\u79f0"));u.getCell(2).setValue(w.get("displayName","\u663e\u793a\u540d\u79f0"));u.getCell(3).setValue(w.get("dataType","\u6570\u636e\u7c7b\u578b"));u.getCell(4).setValue(w.get("ignoreFilterByNull","\u7a7a\u503c\u65f6\u5ffd\u7565\u8fc7\u6ee4\u6761\u4ef6"));u.getCell(5).setValue(w.get("descr","\u5907\u6ce8"));Qa.setSyncUIWhenModelChanged(!1);
u=new KTStyle;u.setBackgroundColor(com.kingdee.bos.qing.common.CommonTableSkin.ODD_ROW_BACKGROUND_COLOR);var P=new KTBorderStyle;P.setBottomBorderWidth(1);P.setBottomBorderPen("solid");P.setBottomBorderColor("#e5e5e5");for(var N=0;N<oa().length;++N){var M=nb(N),va=za.createRow(Qa);va.getCell(1).setValue(M.getName());va.getCell(2).setValue(M.getAlias());va.getCell(5).setValue(M.getRemark());va.setBorder(P);va.setStyle(u);va.setHeight(40);va.setUserObject(M)}Qa.setSyncUIWhenModelChanged(!0);za.refresh(Qa);
kb()}}else dc||(bc.addClass("extreport-dataset-designer-param-ctrl-table-tip"),dc=$("<div>"),dc.addClass("extreport-dataset-designer-param-ctrl-tip-text"),dc.text(w.get("noParameter","\u6682\u65e0\u53c2\u6570")),Vb=$("<div>"),Vb.addClass("extreport-dataset-designer-param-ctrl-tip-background"),K.background(Vb,"NoParam"),bc.hide(),bc.append(dc),bc.append(Vb),bc.appendTo(Bb)),R.css("display","none"),bc.css("display","block")};this.refreshTable=function(){za.refresh(Qa);kb()};var kb=function(){if(Fa()&&
Fa().hasSelected()){var u=Fa().getSelected();Fa().removeAllSelecteds();u&&Fa().addSelected(u)}},Y=function(){Fb&&Fb.addClass("extreport-dataset-designer-param-toolbar-btn-disable");ec&&ec.addClass("extreport-dataset-designer-param-toolbar-btn-disable");Ha&&Ha.addClass("extreport-dataset-designer-param-toolbar-btn-disable")},ob=function(){Fb&&Fb.removeClass("extreport-dataset-designer-param-toolbar-btn-disable");ec&&ec.removeClass("extreport-dataset-designer-param-toolbar-btn-disable");Ha&&Ha.removeClass("extreport-dataset-designer-param-toolbar-btn-disable")}}
function xa(wa,wb){function Ob(G){KTDefaultCellRender.call(this,G);var C=this;this.paintCellUI=function(O,ra){ra=C.getCurrentRowIdx();var Fa=C.getCurrentRow().getUserObject();O=$(O);var kb=$("<div>");kb.addClass("extreport-dataset-designer-param-linkage-dialog-left-icon");K.background(kb,Jb.ctrlTypeToMicroIconName(Fa.getCtrlType()));var Y=$("<div>");Fa=Fa.getAlias()?Fa.getAlias():Fa.getName();Y.text(Fa);Ma.layoutCtrlWithLRTB(Y,30,0,null,6);Ma.makeTextOmissible(Y);Y.attr("title",Fa);O.append(kb);O.append(Y);
Xb&&ra===Vb[Xb]&&O.addClass("linkage-dialog-selection-style")}}function Mb(G){KTDefaultCellRender.call(this,G);var C=this;this.paintCellUI=function(O,ra){var Fa=C.getCell().getValue(),kb=C.getCell().getTreeModel(),Y=$("<div>"),ob=$("<div>"),u=Fa.getDisplay()?Fa.getDisplay():Fa.getValue();ob.text(u);Ma.layoutCtrlWithLRTB(ob,30,0,null,6);Ma.makeTextOmissible(ob);ob.attr("title",u);O=$(O);Fa.getParent()?(Y.addClass("param-linkage-tree-leaf-icon"),u=Fa.getType(),u=Da.dataTypeToIconName(u),Xb&&Xb===aa(Fa)?
(O.addClass("linkage-dialog-selection-style"),u+="_selected"):O.addClass("param-linkage-tree-leaf-font-color"),Ta.background(Y,u)):(Y.addClass("param-linkage-tree-root-icon"),K.background(Y,Jb.ctrlTypeToMicroIconName(Fa.getType())),O.addClass("linkage-dialog-tree-root-pointer"),O.on("click",function(){Fa.setExpanded(!Fa.getExpanded());kb.setExpanded(Fa.getExpanded());za.refresh(ub);t();B()}),Xb&&!Pb[Xb]&&Xb.substring(0,Xb.indexOf("^"))===Fa.getValue()&&O.addClass("linkage-dialog-selection-style"));
Ma.layoutCtrl(ob,30,6,null,null);ra=$(ra);ra.append(Y);ra.append(ob)}}function Bb(G){KTDefaultTreeHandlerRender.call(this,G);var C=this;this.create=function(O,ra,Fa,kb,Y,ob,u){var P=20*O.getLevel();var N=P+17;var M=null;if(C.protectedMethod.isTreeNodeHasChildren(O,ra,Fa)||O.isHaveHandlerAlways())M=C.protectedMethod.createAbsoluteHtmlElement("div",P,Y,17,u),M.style.cursor="pointer",ra=$(M),ra.addClass("tree-handler-icon"),Fa=$("<div>"),ra.append(Fa),O.isExpanded()?(Fa.addClass("lower-triangle"),Fa.removeClass("right-triangle")):
(Fa.addClass("right-triangle"),Fa.removeClass("lower-triangle"));ra=[M,N,Y,null];O=ra[0];N=ra[1];M=ra[2];ra=ra[3];kb=C.protectedMethod.createAbsoluteHtmlElement("span",N,M,kb+ob-N,Y+u-M);return[O,kb,ra]}}function Aa(){var G,C,O,ra,Fa,kb;this.getDisplay=function(){return Fa};this.setDisplay=function(Y){Fa=Y};this.getValue=function(){return kb};this.setValue=function(Y){kb=Y};this.setType=function(Y){ra=Y};this.getType=function(){return ra};this.getChildNum=function(){return C?C.length:0};this.getParent=
function(){return O};this.setParent=function(Y){O=Y};this.getExpanded=function(){return G};this.setExpanded=function(Y){G=Y};this.getChildren=function(){return C};this.setChildren=function(Y){C=Y}}function Hb(G,C){var O=0,ra=G,Fa=224,kb=C,Y=!1,ob,u=0,P,N;this.getSlope=function(){return(kb-ra)/(Fa-O)};this.setState=function(M){u=M};this.getState=function(){return u};this.setPairKey=function(M){N=M};this.getPairKey=function(){return N};this.setText=function(M){P=M};this.getText=function(){return P};
this.getTextX=function(){return O+Fa>>1};this.getTextY=function(){return ra+kb>>1};this.getTailX=function(){return O};this.setTailX=function(M){O=M};this.setTailY=function(M){ra=M};this.getTailY=function(){return ra};this.getHeadX=function(){return Fa};this.setHeadX=function(M){Fa=M};this.setHeadY=function(M){kb=M};this.getHeadY=function(){return kb};this.isSelected=function(){return Y};this.setSelected=function(M){Y=M};this.isSolid=function(){return ob};this.setSolid=function(M){ob=M}}Ab.call(this);
var Fb=this,ec=this.protectedMethod,Ha,cb,ub,Qa,R,dc=[],bc=[],Vb={},Pb={},cc={},Xb,gc=0,oa=0,nb,Ub,Ya=[],ca;(function(){ec.setTitle(w.get("ctrlInnerView","\u63a7\u4ef6\u8054\u52a8\u89c6\u56fe"));ec.setSelectable(!0);Fb.setSize(700,500);ec.setContentPaneCreator(function(){Ha=$("<div>");for(var G=[],C=[],O=0;O<wb.length;O++){var ra=wb[O],Fa=ra.getCtrlObject();if(Fa.getLinkageParams)for(var kb=Fa.getLinkageParams(),Y=0;Y<kb.length;Y++){var ob=kb[Y];ob=ob.getLinkageParamName()+"^"+ob.getRelatedDSParamName();
Vb[ob]=O}Fa.getBindSource&&Fa.getBindSource()&&Fa.getBindSourceType()===vb.DATA_SET&&(Fa.getException(fb.PARAM_CTRL_BIND_SOURCE,ra.getName()+Ua.SOURCE_BIND)&&(cc[ra.getName()]=!0),C.push(Fa.getBindSource().toJsonObject()),G.push(ra));dc.push(ra)}Sa(C,G);return Ha});ec.setClosingAction(function(G){});ec.setFooterPaneCreator(null)})();var Sa=function(G,C){var O=wa.createParamCtrlFacade(function(ra){var Fa={};if(ra&&0<ra.length)for(var kb=0;kb<ra.length;kb++){var Y=ra[kb];Fa[Y.datasetId]=Y.parameters}for(kb=
0;kb<C.length;kb++){var ob=C[kb];Y=ob.getCtrlObject().getBindSource().getId();ra=new Aa;ra.setDisplay(ob.getAlias()?ob.getAlias():ob.getName());ra.setValue(ob.getName());ra.setExpanded(!0);ra.setType(ob.getCtrlType());Y=Fa[Y];if(!Y||0===Y.length){a:{for(var u=Object.keys(Vb),P=0;P<u.length;P++)if(u[P].split("^")[0]===ob.getName()){ob=!0;break a}ob=!1}if(!ob)continue}bc.push(ra);ob=[];for(u=0;Y&&u<Y.length;u++){P=Y[u];var N=new Aa;N.setDisplay(P.alias);N.setValue(P.name);N.setType(P.dataType);N.setParent(ra);
ob.push(N);bc.push(N);P=ra.getValue()+"^"+N.getValue();0<=Vb[P]&&(Pb[P]=bc.length-1)}ra.setChildren(ob)}e();Z();0<bc.length&&(g(),ca=$("<div>"),ca.addClass("linkage-dialog-alter-pane"),Ma.layoutCtrlWithLRTB(ca,null,null,null,null,20,20),ca.hide(),Ha.append(ca),t(),B())},function(){e();Z()});O.setBlockingJqUi(Ha);O.queryBatchLinkageVO(G)},e=function(){var G=$("<div>");G.text(w.get("innerSrcCtrl","\u8054\u52a8\u6e90\u63a7\u4ef6"));G.addClass("extreport-dataset-designer-param-linkage-dialog-title");
G.attr("title",w.get("innerSrcCtrl","\u8054\u52a8\u6e90\u63a7\u4ef6"));R=$("<div>");R.addClass("extreport-dataset-designer-param-linkage-dialog-border");R.css({left:"0px"});cb=za.createTable();cb.setColumnFitVisibleWidth(!0);cb.setSyncUIWhenModelChanged(!0);cb.setDraggableAdjusting(!0,3,0,new Tb);cb.setScrollerVisible("unset","unset");var C=new Ob(cb);cb.setCellRender(C);cb.addColumns(1);Ha.append(G);R.append($(cb.getUI()));Ha.append(R);var O=null;R.scroll(function(){window.clearTimeout(O);O=window.setTimeout(function(){if(0!=
Ya.length){var ra=R.scrollTop(),Fa=ra-gc;gc=ra;for(ra=0;ra<Ya.length;ra++){var kb=Ya[ra],Y=kb.getTailY()-Fa;kb.setTailY(Y)}B()}},0)});n(cb)},n=function(G){G.setSyncUIWhenModelChanged(!1);var C=new KTStyle;C.setBackgroundColor(com.kingdee.bos.qing.common.CommonTableSkin.ODD_ROW_BACKGROUND_COLOR);for(var O=0;O<dc.length;O++){var ra=dc[O],Fa=za.createRow(G);Fa.setStyle(C);Fa.setHeight(30);Fa.setUserObject(ra)}G.setSyncUIWhenModelChanged(!0);za.refresh(G)},g=function(){nb=$("<div>");var G=$(W.createCanvas());
G.width=224;G.height=351;nb.on("mousemove",function(C){a:{var O=C.offsetX;C=C.offsetY;for(var ra=0;ra<Ya.length;ra++){var Fa=Ya[ra],kb=Fa.getHeadX()-Fa.getTailX(),Y=Fa.getHeadY()-Fa.getTailY(),ob=Math.sqrt(kb*kb+Y*Y);if(6>Math.abs(Y*(O-Fa.getTailX())-kb*(C-Fa.getTailY()))/ob){Ub=Fa;O=!0;break a}}Ub=null;O=!1}O?nb.css("cursor","pointer"):nb.css("cursor","")});nb.on("click",function(){if(Ub){Xb=Ub.getPairKey();var C=Vb[Xb],O=Pb[Xb];if(0<=O){var ra=bc[O].getParent();ra&&!ra.getExpanded()&&(ra.setExpanded(!0),
Xa())}else for(ra=0;ra<bc.length;ra++)if(bc[ra].getValue()===Xb.substring(0,Xb.indexOf("^"))){O=ra;break}ub.updateUI();za.refresh(cb);$(Qa).animate({scrollTop:a(O+1)});$(R).animate({scrollTop:a(C+1)});ra=Xb;O=Ub.getState();var Fa=ra.split("^");C=new ea;C.setFontSize(12);if(0==O)O=w.get("innerParam","\u201c#1\u201d\u8054\u52a8\u201c#2\u201d\u3002\u76ee\u6807\u53c2\u6570[#3]\u3002"),O=O.replace("#1",b(ra)),ra=bc[Pb[ra]],ra=[ra.getDisplay(),ra.getParent().getDisplay()],O=O.replace("#2",ra[1]).replace("#3",
ra[0]),C=C.measureWidth(O);else{var kb=Fa[0];O=f(kb);-1!==O&&(kb=bc[O].getDisplay());cc[Fa[0]]?(O=w.get("sourceError","\u201d#1\u201d\u8054\u52a8\u201d#2\u201d\u3002\u76ee\u6807\u63a7\u4ef6\u6570\u636e\u6e90\u5b58\u5728\u9519\u8bef\u3002"),O=O.replace("#1",b(ra)),O=O.replace("#2",kb)):(O=w.get("innerNoParam","\u201d#1\u201d\u8054\u52a8\u201d#2\u201d\u3002\u53c2\u6570\u201d#3\u201d\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),O=O.replace("#1",b(ra)).replace("#2",kb).replace("#3",Fa[1]));
kb=Oa.getErrorIcon(O);C=C.measureWidth(O)+10}ca.css("width",C+10);ca.text(O);ca.attr("title",O);kb&&ca.append(kb);ca.show();t();B()}else Xb&&(Xb=null,za.refresh(cb),ub.updateUI(),ca.empty(),ca.hide(),t(),B())});Ma.layoutCtrl(nb,222,30,224,352);nb.append(G);Ha.append(nb)},a=function(G){G=30*G-350;return 0<G?G:0},f=function(G){for(var C=0;C<bc.length;C++){var O=bc[C];if(!O.getParent()&&O.getValue()===G)return C}return-1},b=function(G){G=dc[Vb[G]];return G.getAlias()?G.getAlias():G.getName()},t=function(){Ya=
[];for(var G=Object.keys(Vb),C=0;C<G.length;C++){var O=G[C],ra=O.split("^")[0],Fa=Vb[O],kb=Pb[O];if(void 0==kb)kb=f(ra),0<=kb&&(kb=r(kb),Fa=30*(Fa+.5)-gc,kb=30*(kb+.5)-oa,Ya.push(F(Fa,kb,O,!0,2)));else{var Y=!0,ob=bc[kb].getParent();ob.getExpanded()||(kb=bc.indexOf(ob),Y=!1);kb=r(kb);Fa=30*(Fa+.5)-gc;kb=30*(kb+.5)-oa;Ya.push(F(Fa,kb,O,Y,cc[ra]?2:void 0))}}},r=function(G){for(var C=G-1;0<=C;C--){var O=bc[C];O.getParent()||O.getExpanded()||(G-=O.getChildNum())}return G},F=function(G,C,O,ra,Fa){G=new Hb(G,
C);G.setPairKey(O);G.setSolid(ra);G.setSelected(O===Xb);Fa&&(G.setState(Fa),G.setText("!"));return G},B=function(){var G=nb.children().first(),C=nb.prop("offsetWidth"),O=nb.prop("offsetHeight");G.css({width:C,height:O});G=W.createContext2d(G[0],C,O);for(C=0;C<Ya.length;C++){G.beginPath();O=Ya[C];O.isSolid()?G.setLineDash([]):G.setLineDash([5,5]);O.isSelected()?(G.strokeStyle="#88a7f6",G.fillStyle="#88a7f6"):(G.strokeStyle="#666666",G.fillStyle="#666666");G.moveTo(O.getTailX(),O.getTailY());G.lineTo(O.getHeadX(),
O.getHeadY());G.stroke();var ra=O,Fa=G,kb=ra.getSlope();kb=Math.atan(kb)/(Math.PI/180);kb=Math.round(kb);var Y=(kb+20)*Math.PI/180,ob=(kb-20)*Math.PI/180;kb=ra.getHeadX()-Math.round(10*Math.cos(Y));Y=ra.getHeadY()-Math.round(10*Math.sin(Y));var u=ra.getHeadX()-Math.round(10*Math.cos(ob));ob=ra.getHeadY()-Math.round(10*Math.sin(ob));Fa.beginPath();Fa.setLineDash([]);Fa.moveTo(ra.getHeadX(),ra.getHeadY());Fa.lineTo(kb,Y);Fa.lineTo(u,ob);Fa.lineTo(ra.getHeadX(),ra.getHeadY());Fa.fill();Fa.closePath();
Fa.stroke();O.getState()&&(G.save(),G.lineWidth=.7,G.strokeStyle="rgb(188, 17, 24)",G.fillStyle="yellow",G.beginPath(),G.arc(O.getTextX()+3,O.getTextY(),6.5,0,2*Math.PI),G.fill(),G.fillStyle="rgb(188, 17, 24)",G.lineWidth=1,G.font="normal normal bold 12px \u5fae\u8f6f\u96c5\u9ed1",G.fillText(O.getText(),O.getTextX()+1,O.getTextY()+5),G.stroke(),G.restore())}},Z=function(){Qa=$("<div>");Qa.addClass("extreport-dataset-designer-param-linkage-dialog-border");var G=$("<div>");G.text(w.get("innerActCtrl",
"\u8054\u52a8\u201c\u4f5c\u7528\u4e8e\u201d\u76ee\u6807\u63a7\u4ef6"));G.addClass("extreport-dataset-designer-param-linkage-dialog-title");G.attr("title",w.get("innerActCtrl","\u8054\u52a8\u201c\u4f5c\u7528\u4e8e\u201d\u76ee\u6807\u63a7\u4ef6"));G.css({left:"448px"});ub=new KTable;ub.setColumnFitVisibleWidth(!0);ub.setCellRender(new Mb(ub));ub.setTreeHandlerRender(new Bb(ub));ub.setSyncUIWhenModelChanged(!1);ub.setScrollerVisible("unset","unset");var C=$(ub.getUI());Ha.append(G);Qa.append(C);Ha.append(Qa);
ub.addColumns(1);Xa();ub.updateUI();var O=null;Qa.scroll(function(){window.clearTimeout(O);O=window.setTimeout(function(){if(0!=Ya.length){var ra=Qa.scrollTop(),Fa=ra-oa;oa=ra;for(ra=0;ra<Ya.length;ra++){var kb=Ya[ra];kb.setHeadY(kb.getHeadY()-Fa)}B()}},0)})},Xa=function(){ub.removeAllRows();ub.setSyncUIWhenModelChanged(!1);for(var G=0;G<bc.length;G++){var C=bc[G],O=ub.addRow();O.setHeight(30);var ra=O.getCell(0);ra.setValue(C);var Fa=C.getParent();if(Fa){var kb=new KTCellTreeModel(1);C=Fa.getExpanded();
O.setHide(!C)}else kb=new KTCellTreeModel(0),kb.setExpanded(C.getExpanded());ra.setTreeModel(kb)}ub.setSyncUIWhenModelChanged(!0)},aa=function(G){return G.getParent()?G.getParent().getValue()+"^"+G.getValue():null}}function Ca(wa){var wb=this,Ob,Mb,Bb=$("<div>"),Aa,Hb,Fb,ec;this.getJqUi=function(){if(!Ob){Ob=$("<div>");var Ha=new sb(w.get("ctrlProp","\u63a7\u4ef6\u5c5e\u6027"));Ob.append(Ha.getJqUi());Hb=$("<div>");Hb.addClass("extreport-dataset-designer-param-border");Hb.css({"overflow-x":"hidden",
"overflow-y":"auto"});Ob.append(Hb)}return Ob};this.render=function(Ha){var cb=$(Hb).find(".extreport-dataset-designer-param-detail-area");cb&&$(cb).detach();Ha?(Bb.css("display","none"),(cb=Wa.getRender(Ha))?(Hb.append(cb.getJqUi()),cb.refreshUi(Ha)):(Ha=Ka.createRender(Ha.getCtrlType(),wa,Ha,Fb,ec),Wa.cacheRender(Ha),Hb.append(Ha.getJqUi()))):(Mb||(Bb.addClass("extreport-dataset-designer-param-detail-tip"),Mb=$("<div>"),Mb.text(w.get("selParam","\u8bf7\u9009\u62e9\u53c2\u6570\u8fdb\u884c\u8bbe\u7f6e")),
Mb.addClass("extreport-dataset-designer-param-detail-text"),Aa=$("<div>"),Aa.addClass("extreport-dataset-designer-param-detail-background"),K.background(Aa,"ctrl_prop"),Bb.append(Aa),Bb.append(Mb)),Bb.appendTo(Hb),Bb.css("display","block"))};this.updateUi=function(Ha){Ha&&Ha.check();wb.render(Ha)};this.setFuncRefreshTable=function(Ha){Fb=Ha};this.setFuncShowErrorIcon=function(Ha){ec=Ha}}function U(wa,wb){bb.call(this);var Ob=this,Mb,Bb,Aa,Hb=[],Fb={},ec,Ha={},cb=[],ub,Qa,R,dc;this.protectInit=function(){Mb||
bc();return Mb};this.getResult=function(){return Object.values(Fb)};this.repaint=function(ca){Ub(ca)};this.refreshUi=function(){ub&&ub.resize(!0)};this.getPagination=function(){return Bb.getPagination()};var bc=function(){R=Vb();Qa=gc();var ca;ub=new Ra;ub.setHorizontalSplit(!1);ub.setFirstSize(261,-1,-1);ub.setSecondSize(155,80,350);ub.setResizeMode(Ra.RESIZE_MODE_FIRST_FIXED);ub.setFirstChild(Ra.createChildWrapper(R,function(){clearTimeout(ca);ca=setTimeout(function(){Bb&&Ub();Aa&&nb(Hb)},10)}));
ub.setSecondChild(Ra.createChildWrapper(Qa));Mb=ub.getJqUi();dc&&dc.unobserve();dc=new Za;dc.setDelay(50);dc.setCallback(function(){Bb&&Ub();Aa&&nb(Hb)});dc.observe()},Vb=function(){Bb=new Na;var ca=["",w.get("dataSetName","\u6570\u636e\u96c6\u540d\u79f0"),w.get("type","\u7c7b\u578b")];Bb.createHead(ca,[10,100,100]);ca=Bb.getJqUi();Bb.addSingleClickListener(cc);Bb.setFuncCreateTableCell(Xb);Bb.setPageChangeListener(Ob.loadDataSetByGroupId);return ca},Pb=function(ca){if(Ha[ca])nb(Ha[ca]);else{var Sa=
wa.createParamCtrlFacade(function(e){var n=new ya;n.fromJsonObject(e);e=n.getParameters();Ha[ca]=e;nb(e)},function(e,n){});Sa.setBlockingJqUi(Qa);Sa.loadParameterByDataSetId(ca)}};this.loadDataSetByGroupId=function(ca,Sa,e){var n=Ob.getPagination();e||(ca=1,Sa=n.getPageSize());var g=wa.createParamCtrlFacade(function(t){var r=[];if(t){var F=t.arrDataSetVO;t=t.totalRow;for(var B=!1,Z=0;Z<F.length;Z++){var Xa=new hb;Xa.fromJsonObject(F[Z]);Bb.getSelectedId()===Xa.getFid()&&(B=!0);r.push(Xa)}e?e(t):n.resetPaginationAndJumpToFirstPage(t);
B||Bb.setSelectedId(r[0].getFid())}else n.resetPaginationAndJumpToFirstPage(0),Fb={},nb([]);Ob.repaint(r)},function(t,r){}),a=wb.getCurrentGroupId(),f=wb.getSearchDataSetName(),b=wb.getDataSetType();b===com.kingdee.bos.extreport.datasetdesigner.ctrl.DATA_SET_ALLTYPE&&(b=null);g.setBlockingJqUi(R);g.loadDataSetByGroupId(ca,Sa,a,f,b)};var cc=function(ca){ec&&ec===ca.getFid()||(Fb={},ec=ca.getFid(),Pb(ca.getFid()))},Xb=function(ca,Sa,e,n,g){ca=$("<div>");ca.addClass("import-param-ctrl-table-dataset-cell-text");
1==e?wb.getSearchDataSetName()?A.highlightKeyWords(ca,wb.getSearchDataSetName(),n.getName()):(e=n.getName(),ca.text(e),ca.attr("title",e)):2==e&&(e=n.getType(),e=Ib.datesetTypeToName(e),ca.text(e),ca.attr("title",e));$(g).append(ca)},gc=function(){Aa=za.createTable();Aa.setColumnFitVisibleWidth(!0);Aa.setSyncUIWhenModelChanged(!0);Aa.setDraggableAdjusting(!0,3,0,new Ba);var ca=new Ya(Aa);ca.setOutsideVisible(!1);Aa.setCellRender(ca);oa();return $(Aa.getUI())},oa=function(){Aa.setSyncUIWhenModelChanged(!1);
Aa.addColumns(5);Aa.getColumn(0).setWidth(20);Aa.getColumn(1).setWidth(100);Aa.getColumn(2).setWidth(100);Aa.getColumn(3).setWidth(100);Aa.getColumn(4).setWidth(100);var ca=za.createHeadRow(Aa);ca.getCell(1).setValue(w.get("paramName","\u53c2\u6570\u540d\u79f0"));ca.getCell(2).setValue(w.get("paramAlias","\u53c2\u6570\u522b\u540d"));ca.getCell(3).setValue(w.get("dataType","\u6570\u636e\u7c7b\u578b"));ca.getCell(4).setValue(w.get("ctrlType","\u63a7\u4ef6\u7c7b\u578b"));Aa.setSyncUIWhenModelChanged(!0)},
nb=function(ca){Hb=ca;if(0!==document.body.clientHeight||0!==document.body.clientWidth){za.clear(Aa);oa();Aa.setSyncUIWhenModelChanged(!1);for(var Sa=0;ca&&Sa<ca.length;Sa++){var e=ca[Sa],n=za.createRow(Aa);n.setHeight(30);n.setUserObject(e)}Aa.setSyncUIWhenModelChanged(!0);za.refresh(Aa)}},Ub=function(ca){ca&&(cb=ca);0!==document.body.clientHeight&&0!==document.body.clientWidth&&Bb.updateTable(cb)},Ya=function(ca){KTDefaultCellRender.call(this,ca);var Sa=this,e=this.paintCellUI,n;this.paintCellUI=
function(g,a){var f=Sa.getCurrentRowIdx(),b=Sa.getCurrentRow(),t=Sa.getCurrentColIdx(),r=b.getUserObject();f<za.getHeadRowCount()?(e(g,a),0==t&&1==f&&(a=Hb&&Object.keys(Fb).length===Hb.length&&0<Hb.length,n=new pb,n.setChecked(a),n.addCheckedListener(function(F,B){if(B){if(F.isChecked())for(F=0;F<Hb.length;F++)B=Hb[F],Fb[B.getName()]=B;else Fb=[];nb(Hb)}}),a=n.getJqUi(),a.addClass("extreport-dataset-designer-import-param-check-box"),a.css("top","0px"),$(g).append(a))):0==t?(t=new pb,t.setUserObject(r),
a=!!Fb[r.getName()],f=n&&n.isChecked(),t.setChecked(a||f),t.addCheckedListener(function(F,B){B&&(F.isChecked()?(Fb[r.getName()]=r,Object.keys(Fb).length===Hb.length&&0<Hb.length&&n.setChecked(!0)):(delete Fb[r.getName()],n.setChecked(!1)))}),a=t.getJqUi(),a.addClass("extreport-dataset-designer-import-param-check-box"),$(g).append(a)):(a=$("<div>"),f="",a.addClass("import-param-ctrl-table-cell-text"),1==t?f=r.getName():2==t?f=r.getAlias():3==t?(t=r.getDataType(),f=Da.dataTypeToIconName(t),b=$("<div>"),
Ta.background(b,f),b.addClass("extreport-dataset-designer-param-ctrl-table-type-icon"),b.css("top","7px"),$(g).append(b),f=Da.dataTypeToName(t),a.css("left","25px")):4==t&&(t=r.getCtrlType(),f=Jb.ctrlTypeToName(t)),a.text(f),a.attr("title",f),$(g).append(a))}}}function sb(wa){this.getJqUi=function(){var wb=$("<span>");wb.addClass("extreport-dataset-designer-param-title");wb.addClass("extreport-dataset-designer-param-title-text");wb.text(wa);return wb}}"undefined"==typeof com&&(com={});"undefined"==
typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});com.kingdee.bos.extreport.datasetdesigner.TabParamCtrlPane=function(wa,wb){zb.call(this,w.get("param","\u53c2\u6570"),wb);var Ob=this,Mb,Bb,Aa;this.protectedInit=function(Ha){var cb=$("<div>");cb.addClass("extreport-dataset-designer-tab-panel");
cb.addClass("extreport-dataset-designer-param-tab-index");ec();cb.append(Hb(Bb,Aa));cb.appendTo(Ha)};var Hb=function(Ha,cb){if(!Mb){Mb=new Ra;Mb.setHorizontalSplit(!0);Mb.setFirstSize(1390,-1,-1);Mb.setSecondSize(450,400,550);Mb.setResizeMode(Ra.RESIZE_MODE_FIRST_FIXED);var ub=null;Mb.setFirstChild(Ra.createChildWrapper(Ha.getJqUi(),function(){clearTimeout(ub);ub=setTimeout(function(){Fb()},0)}));Mb.setSecondChild(Ra.createChildWrapper(cb.getJqUi()))}return Mb.getJqUi()};this.resize=function(){Mb&&
Mb.resize(!0)};var Fb=function(){Bb&&Bb.updateTable();Aa&&Aa.updateUi(Bb.getCurrentParam())};this.fireTabChangeEvent=function(){Ob.resize();Bb.checkAllParam()};this.protectedUpdateUi=function(Ha,cb){ec();Wa.clearRender();if(Ha.getDataSetModel()){cb=Ha.getDataSetModel().getParameters();for(var ub=0;ub<cb.length;ub++)cb[ub].check()}Bb.setDataSetModel(Ha.getDataSetModel());wa.isCurrentTab(this)&&Fb()};var ec=function(){Bb||(Bb=new ha(wa),Aa=new Ca(wa),Bb.setParamDetailArea(Aa),Aa.setFuncRefreshTable(Bb.updateTable),
Aa.setFuncShowErrorIcon(Bb.funcShowErrorIcon))}};var w,Za,zb,Tb,Ab,Ra,Ja,fa,Cb,pb,Ea,Gb,J,eb,db,Ma,ea,W,za,ya,Da,Jb,Ib,Pa,vb,tb,fb,gb,Wa,Ka,rb,Ga,la,ib,Ua,K,A,Na,bb,Oa,hb,Va,Ba,Ta;(function(){var wa=com.kingdee.bos.qing.framework.common;w=wa.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);Za=wa.WindowResizeObserver;wa=com.kingdee.bos.extreport.datasetdesigner.common.ui;zb=wa.AbstractDataSetTabPane;Tb=wa.TableCustomExpandor;wa=com.kingdee.bos.qing.ui.component;
Ab=wa.AbstractModalDialog;Ra=wa.SplitPane;Ja=wa.Menu;fa=wa.MenuModel;Cb=wa.MenuItemModel;pb=wa.CheckBox;Ea=wa.ComboBox;J=wa.HelpIcon;Gb=wa.SwitchButton;eb=wa.TextField;db=wa.MessageDialog;wa=com.kingdee.bos.qing.common;Ma=wa.DomUtil;ea=wa.TextMeasurer;W=wa.CanvasUtil;wa=com.kingdee.bos.qing.common.ui;za=wa.TableUtil;wa=com.kingdee.bos.extreport.datasetdesigner.model;ya=wa.ParameterModelVO;Da=wa.ParamDataType;Jb=wa.ParamCtrlType;Ib=wa.DataSetType;Pa=wa.CtrlFactory;vb=wa.ParamBindSourceType;tb=wa.ParameterFactory;
fb=wa.DataSetModelCheckType;gb=wa.ParamNameChecker;rb=wa.LinkageRemover;Ga=wa.ParamListUtils;la=wa.ParamCtrlState;ib=wa.ParamDefaultValueType;Ua=wa.DataSetModelCheckCode;wa=com.kingdee.bos.extreport.datasetdesigner;K=wa.Icons;wa=com.kingdee.bos.extreport.datasetdesigner.common.ui;A=wa.SearchHelper;wa=com.kingdee.bos.extreport.datasetdesigner.ctrl;Na=wa.OptionalTable;bb=wa.DialogMainTable;Oa=wa.ErrorIconFactory;hb=wa.DataSetModel;Wa=wa.CtrlRenderCache;Ka=wa.CtrlRenderFactory;Va=wa.DataSetSelectorDialog;
Ba=wa.ParamTableCustomExpandor;Ta=com.kingdee.bos.extreport.datasetdesigner.Icons})()})();(function(){function ha(oa,nb,Ub){ib.call(this,J.get("query","\u67e5\u8be2"),Ub);var Ya=this,ca,Sa,e,n,g,a,f,b,t,r,F,B,Z,Xa,aa,G,C,O,ra,Fa,kb,Y,ob,u,P,N,M;this.showQueryTitleButton=function(z){z.getDataSetType()==Oa.OQL_DATA_SET?(aa&&aa.css({display:"none"}),Xa&&Xa.css({right:"0px"}),Z&&Z.css({right:"80px"})):ub.isSuperQuery(z.getDataSourceType())||z.getDataSourceType()==ub.OUT_DB&&z.getDataSource&&!cb.isSupportKSQL(z.getDataSource().getDBType())?(Fa&&Fa.setChecked(!0),aa&&aa.css({display:"none"}),
Xa&&Xa.css({right:"0px"}),Z&&Z.css({right:"80px"})):(aa&&aa.css({display:"block"}),Xa&&Xa.css({right:"140px"}),Z&&Z.css({right:"220px"}))};this.resize=function(z){Sa&&Sa.is(":visible")?G&&G.resize(!0):(G&&G.resize(!0),u&&u.resize(),C&&C.resize(!0),O&&O.resize(!0),ra&&ra.resize(!0),M&&M.resize(),!z&&va())};this.fireTabChangeEvent=function(){Ya.resize();var z=Ya.getDataSetModelVO();z&&(z=z.getDataSetModel())&&N&&N.model2Ui(z)};this.setEnableButtonFunCallBack=function(z){Y=z};this.protectedInit=function(z){ca||
(u=Ya.protectedCreatDataSourceArea(),u.setFunAddDataSourceCallback(D),u.setFunGetDataSourceModelCallback(Ya.protectedGetDataSourceModel),u.setEnableButtonFunCallBack(Y),ca=u.getJqUi());h();d();l();m();O=new Da;O.setHorizontalSplit(!1);O.setFirstSize(400,260,-1);O.setSecondSize(260,260,-1);O.setResizeMode(Da.RESIZE_MODE_SECOND_FIXED);O.setFirstChild(Da.createChildWrapper(g,function(){ob.adjustSqlEditorHeight(O.getNonemptyFirstWide())}));O.setSecondChild(Da.createChildWrapper(a));ra=new Da;ra.setHorizontalSplit(!1);
ra.setFirstSize(400,260,-1);ra.setSecondSize(260,260,-1);ra.setResizeMode(Da.RESIZE_MODE_SECOND_FIXED);ra.setFirstChild(Da.createChildWrapper(f));ra.setSecondChild(Da.createChildWrapper(b));C=new Da;C.setHorizontalSplit(!0);C.setFirstChild(Da.createChildWrapper(O.getJqUi(),function(){P&&P.resize()}));C.setSecondChild(ra);C.setFirstSize(400,400,-1);C.setSecondSize(260,200,400);C.setResizeMode(Da.RESIZE_MODE_SECOND_FIXED);n=$("<div>");C.getJqUi().appendTo(n);G=new Da;G.setHorizontalSplit(!0);G.setFirstSize(260,
200,400);G.setSecondSize(600,-1,-1);G.setResizeMode(Da.RESIZE_MODE_FIRST_FIXED);G.setFirstChild(Da.createChildWrapper(ca));G.setSecondChild(Da.createChildWrapper(n,function(){e&&q();C&&C.resize(!0);u&&u.updateUi()}));var v=G.getJqUi();v.addClass("extreport-dataset-designer-tab-pane");v.appendTo(z)};this.protectedUpdateUi=function(z,v){if(z=z.getDataSetModel())if(u.setDataSetModel(z),ob.setDataSetModel(z),M.setDataSetModel(z),z.getSqlType&&(dc.SQL==z.getSqlType()?Fa.setChecked(!0):kb.setChecked(!0)),
Ya.protectedIsNeedShowNoDataSourceUi(z))Sa||p(),C.getJqUi().hide(),c(!1),Sa.show(),u.showNoSourceUi(D),Y&&Y(!1,!1,!1);else{H();var y=z.getContent(),x="text/k-sql";z.getDataSetType()==Oa.OQL_DATA_SET&&(x="text/o-sql");va(y,x);y=Ya.protectedGetDataSourceModel(z);z.getException(hb.DATA_SOURCE)?(Y&&Y(!1,!1,!0),u.showNoTableExceptionUiFromModel(y),M.showNoFieldExceptionUi()):(Y&&Y(!0,!0,!0),u.dataSourceModel2Ui(y,u.isShowNoTableExceptionUi()),M.model2Ui(v));Ya.showQueryTitleButton(y);N.model2Ui(z);P.init()}};
this.protectedCreatDataSourceArea=function(){throw Error("override me");};this.protectedIsNeedShowNoDataSourceUi=function(z){throw Error("override me");};this.protectedGetDataSourceModel=function(z){throw Error("override me");};this.protectedInitNoDataSourcePaneUi=function(z,v){throw Error("override me");};var va=function(z,v){ob.initSqlEditor(z,v,function(){M.addOutputRefreshMasking()});ob.adjustSqlEditorHeight(O.getNonemptyFirstWide())},h=function(){if(!g){g=$("<div>");g.addClass("extreport-dataset-designer-bottom-border");
var z=Xb(J.get("queryStat","\u67e5\u8be2\u8bed\u53e5"));z.addClass("extreport-dataset-designer-bottom-border");var v=new Jb;v.setIconType(Jb.ICON_TYPE_QUESTION);var y=Oa.SQL_DATA_SET==oa?J.get("table","\u6570\u636e\u8868"):J.get("entityTable","\u5b9e\u4f53\u7ed3\u6784");v.setTipsText(J.get("queryStatTips","\u5728#1\u3001\u5b57\u6bb5\u3001\u53ef\u7528\u53c2\u6570\u53ca\u53d8\u91cf\u533a\u57df\u53cc\u51fb\u9f20\u6807\u5de6\u952e\uff0c\u53ef\u4ee5\u5728\u67e5\u8be2\u8bed\u53e5\u8f93\u5165\u6846\u4e2d\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u63d2\u5165\u6307\u5b9a\u503c\u3002").replace("#1",
y));v=v.getJqUi();fa.layoutCtrlWithLRTB(v,null,null,16,4,null,16);v.css({position:"relative","float":"left","margin-left":"4px"});v.appendTo(z);v=J.get("comment","\u6ce8\u91ca/\u53cd\u6ce8\u91ca");y=new vb(v);y.addActionListener(function(){ob.commentSelectedSqlContent()});Xa=y.getJqUi();fa.layoutCtrlWithLRTB(Xa,null,140,78,null,null,24);Xa.attr("title",v);Xa.css({overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"});Xa.appendTo(z);v=J.get("format","\u683c\u5f0f\u5316");y=new vb(v);
y.addActionListener(function(){ob.formatSelectedSqlContent()});Z=y.getJqUi();Z.attr("title",v);fa.layoutCtrlWithLRTB(Z,null,220,48,null,null,24);Z.appendTo(z);aa=$("<div>");v=new Pa;kb=new Ib;kb.setText("KSQL");Fa=new Ib;Fa.setText("SQL");v.addElement(Fa);v.addElement(kb);v.addChangedListener(function(x,Q){(x=Ya.getDataSetModelVO())&&(x=x.getDataSetModel())&&x.setSqlType(Fa.isChecked()?dc.SQL:dc.KSQL);M&&M.addOutputRefreshMasking()});v=Fa.getJqUi();fa.layoutCtrlWithLRTB(v,null,0,60,0,null,24);y=kb.getJqUi();
fa.layoutCtrlWithLRTB(y,null,70,60,0,null,24);y.appendTo(aa);v.appendTo(aa);aa.appendTo(z);z.appendTo(g);ob=new xa(nb);F=ob.getJqUi();F.appendTo(g)}},d=function(){if(!a){a=$("<div>");var z=Xb(J.get("outputColumn","\u8f93\u51fa\u5b57\u6bb5"));L(z,J.get("collapseOutputColumn","\u6536\u8d77\u8f93\u51fa\u5b57\u6bb5\u9762\u677f"),"downArrow");z.appendTo(a);M=new Za(nb,a);M.initOutputTable()}},l=function(){if(!f){f=$("<div>");f.addClass("extreport-dataset-designer-bottom-border");var z=Xb(J.get("usableParam",
"\u53ef\u7528\u53c2\u6570"));z.addClass("extreport-dataset-designer-bottom-border");L(z,J.get("collapseParam","\u6536\u8d77\u53ef\u7528\u53c2\u6570\u53ca\u53d8\u91cf\u9762\u677f"),"rightArrow");z.appendTo(f);N=new Ca(nb);B=N.getJqUi();B.appendTo(f)}},m=function(){if(!b){b=$("<div>");var z=Xb(J.get("variant","\u53d8\u91cf"));P=new zb(nb,b,z);z.appendTo(b)}},p=function(){Sa=$("<div>");Sa.addClass("extreport-dataset-designer");Sa.addClass("extreport-dataset-designer-left-border");Sa.appendTo(n);e=$("<div id='noDatasource'>");
e.appendTo(Sa);var z=n.height()/2-150;z=0<z?z:0;var v=n.width()/2-375;v=0<v?v:0;fa.layoutCtrl(e,0,0,750,300);e.css({"margin-top":z+"px","margin-left":v+"px"});nb.addWindowResizeListener(function(){e&&q()});z=$("<div id='middle'>");z.appendTo(e);fa.layoutCtrlCenterAlign(z,180);fa.layoutCtrlMiddleAlign(z,230);v=$("<div id='left'>");fa.layoutCtrlCenterAlign(v,180);fa.layoutCtrlMiddleAlign(v,230);v.css({transform:"translateX(-280px)"});v.appendTo(e);Ya.protectedInitNoDataSourcePaneUi(v,z);v=$("<div>");
v.text(J.get("sqlDesc","\u7f16\u5199\u67e5\u8be2\u8bed\u53e5"));v.css({color:"rgb(102, 102, 102)","text-align":"center"});fa.layoutCtrlCenterAlign(v,160);fa.layoutCtrlMiddleAlign(v,100);fa.layoutCtrl(v,null,180,null,null);v.appendTo(z);z=$("<div id='arrow1'>");la.background(z,"arrow");fa.layoutCtrlCenterAlign(z,64);fa.layoutCtrlMiddleAlign(z,64);z.css({transform:"translate(-140px, -43px)"});z.appendTo(e);z=$("<div id='arrow2'>");la.background(z,"arrow");fa.layoutCtrlCenterAlign(z,64);fa.layoutCtrlMiddleAlign(z,
64);z.css({transform:"translate(140px, -43px)"});z.appendTo(e);z=$("<div id='right'>");fa.layoutCtrlCenterAlign(z,180);fa.layoutCtrlMiddleAlign(z,230);z.css({transform:"translateX(280px)"});z.appendTo(e);v=$("<div>");v.appendTo(z);la.background(v,"param");fa.layoutCtrlCenterAlign(v,144);fa.layoutCtrl(v,null,0,144,144);v=$("<div>");v.text(J.get("parameterDesc","\u8bbe\u7f6e\u53c2\u6570\u53ca\u63a7\u4ef6"));v.css({color:"rgb(102, 102, 102)","text-align":"center"});fa.layoutCtrlCenterAlign(v,100);fa.layoutCtrlMiddleAlign(v,
100);fa.layoutCtrl(v,null,180,null,null);v.appendTo(z)},q=function(){var z=n.height()/2-150;e.css({"margin-top":(0<z?z:0)+"px"});z=n.width()/2-375;e.css({"margin-left":(0<z?z:0)+"px"})},c=function(z){for(var v=Ya.getJqUi().parent().parent().children(".sa-ctrl-tab-head"),y,x=0;x<v.length;x++){var Q=$(v[x]);Q.text()!=Ya.getTitle()&&(y=Q)}z?y&&y.removeClass("extreport-dataset-designer-disable-param-tab"):y&&y.addClass("extreport-dataset-designer-disable-param-tab")},D=function(z,v){if(v){c(!0);H();v=
"SELECT * FROM";var y="text/k-sql";z.getDataSetType()==Oa.OQL_DATA_SET&&(v=v+" "+z.getDataSource().getName(),y="text/o-sql");va(v,y);u.showPaneUi();Ya.resize();P.init();N.model2Ui(Ya.getDataSetModelVO().getDataSetModel())}u.dataSourceModel2Ui(z);Ya.showQueryTitleButton(z);M.showTableUi();M.addOutputRefreshMasking()},H=function(){Sa&&Sa.hide();C.getJqUi().show()},L=function(z,v,y){var x=$("<div>");x.on("click",function(Q){X(y)});x.attr("title",v);v=$("<div>");v.addClass("extreport-dataset-designer-collapse-icon");
la.backgroundWithHover(v,y);x.append(v);x.appendTo(z)},X=function(z){"downArrow"==z?(O.collapseSecondHalf(!0),a.show(!1),ia(!0),g.removeClass("extreport-dataset-designer-bottom-border")):"rightArrow"==z?(C.collapseSecondHalf(!0),ua(!0)):"upArrow"==z?(O.collapseSecondHalf(!1),a.show(!0),ia(!1),g.addClass("extreport-dataset-designer-bottom-border")):"leftArrow"==z&&(C.collapseSecondHalf(!1),ua(!1))},ua=function(z){if(!t){t=$("<div>");t.addClass("extreport-dataset-designer-show-param-btn");t.on("click",
function(){X("leftArrow")});var v=$("<div>");v.appendTo(t);la.backgroundWithHover(v,"leftArrow");var y=$("<div>");y.text(J.get("paramAndVariant","\u53ef\u7528\u53c2\u6570\u53ca\u53d8\u91cf"));y.appendTo(t);fa.layoutCtrlCenterAlign(y,16);fa.layoutCtrlWithLRTB(y,null,null,null,25,0,null);fa.layoutCtrlCenterAlign(v,16);fa.layoutCtrlWithLRTB(v,null,null,null,5,null,16);t.appendTo(G.getJqUi())}v=r&&!r.is(":hidden");z?(t.show(),C.setSplitLineWide(27),ob&&ob.getJqUi().removeClass("extreport-dataset-designer-right-border"),
v?r.addClass("extreport-dataset-designer-hidden-border-right"):M.hideBorderRight()):(t.hide(),C.setSplitLineWide(8),ob&&ob.getJqUi().addClass("extreport-dataset-designer-right-border"),v?r.removeClass("extreport-dataset-designer-hidden-border-right"):M.showBorderRight());C.resize()},ia=function(z){if(!r){r=$("<div>");r.on("click",function(){X("upArrow")});r.addClass("extreport-dataset-designer-show-output-btn");var v=$("<div>");v.appendTo(r);la.backgroundWithHover(v,"upArrow");var y=$("<div>");y.text(J.get("outputColumn",
"\u8f93\u51fa\u5b57\u6bb5"));y.appendTo(r);fa.layoutCtrlMiddleAlign(y,16);fa.layoutCtrlMiddleAlign(v,16);fa.layoutCtrlWithLRTB(y,5,null,120,null,null,null);fa.layoutCtrlWithLRTB(v,null,5,16,null,null,16);r.appendTo(O.getJqUi())}v=t&&!t.is(":hidden");z?(r.show(),O.setSplitLineWide(27),v&&r.addClass("extreport-dataset-designer-hidden-border-right")):(r.hide(),O.setSplitLineWide(8),v&&r.removeClass("extreport-dataset-designer-hidden-border-right"),v?M.hideBorderRight():M.showBorderRight());O.resize()}}
function xa(oa){var nb=this,Ub,Ya,ca,Sa,e,n={},g={},a=[],f=[],b=[],t=[];this.getJqUi=function(){Ub||(Ub=$("<div>"),Ub.css({"margin-top":"25px","line-height":"150%"}),Ub.addClass("extreport-dataset-designer-left-border"),Ub.addClass("extreport-dataset-designer-right-border"),Ya=$("<textarea>").attr("id","sqlEditor"),Ya.appendTo(Ub));return Ub};this.setDataSetModel=function(aa){e=aa};this.setSqlEditorContent=function(aa){ca.setValue(aa);ca.setCursor(ca.lineCount(),0);B(aa)};this.initSqlEditor=function(aa,
G,C){0!=document.body.clientHeight&&0!=document.body.clientWidth&&(aa||G||!e||(aa=e.getContent(),G="text/k-sql",e.getDataSetType()==Oa.OQL_DATA_SET&&(G="text/o-sql")),ca||(aa||(aa="SELECT * FROM"),G||(G="text/k-sql"),aa=aa.trim(),Ya.val(aa),ca=CodeMirror.fromTextArea(document.getElementById(Ya.attr("id")),{mode:G,lineNumbers:!0,theme:"idea",hint:CodeMirror.hint.sql,lineWrapping:!0,autofocus:!0,foldGutter:{rangeFinder:new CodeMirror.fold.combine(CodeMirror.fold.indent,CodeMirror.fold.comment)},gutters:["CodeMirror-linenumbers",
"CodeMirror-foldgutter"],hintOptions:{tables:{}}}),ca.on("keyup",function(O,ra){B(ca.getValue());!O.state.completionActive&&(65<=ra.keyCode&&90>=ra.keyCode||50==ra.keyCode||52==ra.keyCode||190==ra.keyCode)&&CodeMirror.commands.autocomplete(O,r,{completeSingle:!1})}),ca.on("change",function(O,ra){B(ca.getValue())}),ca.setSize("100%","100%"),ca.setCursor(ca.lineCount(),0),B(aa),oa.addListener(Ka.QUERY_AREA_INSERT_TYPE,function(O){O&&(ca.replaceSelection(O),B(ca.getValue()))}),oa.addListener(Ka.QUERY_AREA_SET_HINT_TYPE,
function(O){O&&nb.setHintTables(O)}),oa.addListener(Ka.QUERY_AREA_ADD_HINT_TYPE,function(O){O&&nb.addHintTables(O)}),oa.addListener(Ka.QUERY_AREA_SET_DOLLAR_HINT_TYPE,function(O){O&&nb.setHintDollarVariables(O)}),oa.addListener(Ka.QUERY_AREA_ADD_AT_HINT_TYPE,function(O){O&&nb.addHintAtVariables(O)})),Sa=C)};this.setHintTables=function(aa){n=aa;g={};for(var G=Object.keys(aa).splice(0,1E3),C=0;C<G.length;C++){var O=G[C];g[O]=aa[O]}Z()};this.addHintTables=function(aa){g=$.extend({},g,aa);Z()};this.addHintAtVariables=
function(aa){var G=aa.hint;"param"==aa.type?b=G:f=G;a=Xa(b,f);ca.setOption("atHintOptions",{atVariables:a})};this.setHintDollarVariables=function(aa){t=aa;ca.setOption("dollarHintOptions",{dollarVariables:t})};this.adjustSqlEditorHeight=function(aa){ca&&ca.setSize("height",aa-26+"px")};this.formatSelectedSqlContent=function(){try{var aa=ca.getSelection();if(aa)ca.replaceSelection(sqlFormatter.format(aa,{language:"mysql"}));else{var G=ca.getValue();ca.setValue(sqlFormatter.format(G,{language:"mysql"}))}B(ca.getValue())}catch(C){}};
this.commentSelectedSqlContent=function(){try{var aa=ca.getSelection(),G=aa;if(rb.isNotEmptyStr(aa))G=aa.startsWith("/*")?aa.replace("/*","").replace("*/",""):"/*"+aa+"*/",ca.replaceSelection(G);else{var C=ca.getCursor();aa=ca.getLine(C.line);rb.isNotEmptyStr(aa)&&(G=aa.startsWith("-- ")?aa.replace("-- ",""):aa.startsWith("--")?aa.replace("--",""):"-- "+aa,ca.replaceRange(G,{line:C.line,ch:0},{line:C.line,ch:aa.length}))}B(ca.getValue())}catch(O){}};var r=function(aa){if(e.getDataSetType()==Oa.OQL_DATA_SET)return aa.showHint({completeSingle:!1});
var G=F();if(G&&0<G.length){for(var C=[],O=0;O<G.length;O++){var ra=G[O],Fa=n[ra];Fa&&0==Fa.length&&((Fa=g[ra])&&0!=Fa.length||C.push(ra))}0<C.length?(G=oa.createQueryFacade(function(kb){if(kb){kb=kb[1];for(var Y=0;Y<kb.length;Y++){var ob={};(new wa).fromJsonObject(kb[Y],ob);nb.addHintTables(ob)}aa.showHint({completeSingle:!1})}},function(kb,Y){return!0}),G.setShowBlocking(!1),G.getTableFields((new Date).getTime()+"",e.getDataSetType(),e.getDataSourceType(),e.getDataSourceName(),C)):aa.showHint({completeSingle:!1})}else aa.showHint({completeSingle:!1})},
F=function(){var aa=ca.getValue();return aa?Pb.parseTable(aa):[]},B=function(aa){aa&&(aa=aa.trim());var G=e.getContent();G&&(G=G.trim());G!=aa&&(e.setContent(aa),Sa&&Sa())},Z=function(){ca.setOption("hintOptions",{tables:g})},Xa=function(aa,G){aa=aa.concat(G);return aa=aa.filter(function(C,O){return aa.indexOf(C)==O})}}function Ca(oa){var nb,Ub,Ya,ca=[],Sa={};this.getJqUi=function(){nb||(nb=$("<div>"),fa.layoutCtrlWithLRTB(nb,0,0,null,25,0,null),nb.addClass("extreport-dataset-designer-left-border"),
nb.addClass("extreport-dataset-designer-right-border"),Ya=new fb,Ya.setBorderVisible(!1),Ya.setToggleSelectingEnabled(!1),Ya.setCustomItemPainter(e),Ya.setItemModels(ca),Ya.getJqUi().appendTo(nb));return nb};this.model2Ui=function(g){g=g.getParameters();Sa={};if(g&&0<g.length){ca=g;for(g=0;g<ca.length;g++){var a=ca[g],f=a.getName();a.check();Sa[f]=a.getException()}Ya.setItemModels(ca);Ub&&Ub.hide();Ya.getJqUi().show()}else Ub||(Ub=gc(nb,J.get("noParam","\u5c1a\u672a\u8bbe\u7f6e\u53c2\u6570"))),Ya.getJqUi().hide(),
Ub.show();g={hint:Object.keys(Sa),type:"param"};oa.fireEvent(Ka.QUERY_AREA_ADD_AT_HINT_TYPE,g)};var e=function(g,a){g.css("height","30px");g.css("cursor","pointer");if(a){var f=a.getName();f=f?f:"";var b=a.getAlias();b=b?b:"";g.data("model",a);g.attr("name",f);var t=!1;Sa[f]&&(n(g,J.get("paramErrorTips","\u53c2\u6570\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u8be5\u53c2\u6570\u3002")),t=!0);var r=$("<div>");r.addClass("extreport-dataset-designer-sourcearea-name");r.css({right:"4px"});
b=b+"("+f+")";r.text(b);r.attr("title",b);r.appendTo(g);b=$("<div>");b.addClass("extreport-dataset-designer-paramarea-icon");var F=Ya.getSelecteds();F&&0<F.length&&F[0]===a?la.background(b,bc.dataTypeToIconName(a.getDataType())+"_selected"):la.background(b,bc.dataTypeToIconName(a.getDataType()));b.appendTo(g);g.on("dblclick",function(B){oa.fireEvent(Ka.QUERY_AREA_INSERT_TYPE,"@"+f)});g.on("mousedown",function(B){var Z=Ya.getJqUi().find(".sa-ctrl-list-item_selected_enabled");B=Z.data("model");Z&&B&&
(Z=Z.find(".extreport-dataset-designer-paramarea-icon"),la.background(Z,bc.dataTypeToIconName(B.getDataType())));Z=g.find(".extreport-dataset-designer-paramarea-icon");la.background(Z,bc.dataTypeToIconName(a.getDataType())+"_selected")});t&&r.css({right:"20px"})}},n=function(g,a){var f=Gb.createWarning();f.attr("title",a);f.addClass("extreport-dataset-designer-warning-icon");f.appendTo(g)}}function U(oa,nb){function Ub(ka){KTDefaultCellRender.call(this,ka);var sa=this;this.paintCellUI=function(yb,
Sb){var Wb=sa.getCurrentRow(),Zb=sa.getCell(),$b=Zb.getValue();Zb=Zb.getUserObject();yb=$(yb);var hc=lb($b),uc=$b.isEnabled();uc||hc.css({color:"#ddd",cursor:"default"});if(!q&&Zb||q&&q.getName()==$b.getName())$b instanceof Mb||(p=Wb),uc&&Qb(hc,$b);yb.on("mousedown",function(rc){$b instanceof Mb||(p=Wb);uc&&Qb(hc,$b)});yb.on("dblclick",function(rc){if(uc){Yb(hc,$b);rc=$b.getName();if($b instanceof Mb){var wc=$b.getFullTableName();wc&&(rc=wc+"."+rc)}Sa.fireEvent(Ka.QUERY_AREA_INSERT_TYPE,rc)}});$b instanceof
Ob&&(Zb=$b.getChildren())&&0<Zb.length&&(Zb=yb.children()[0])&&"DIV"==$(Zb).prop("nodeName").toUpperCase()&&$(Zb).remove();Zb=yb;Sb?(Zb=$(Sb),hc.appendTo(Zb)):hc.appendTo(yb);Sb=Zb.css("left");Sb=parseInt(Sb.substring(0,Sb.lastIndexOf("px")))-16;isNaN(Sb)||Zb.css({left:Sb+"px"});Sb=Zb.width();Zb.css({width:Sb+16+"px"})};var lb=function(yb){var Sb=yb.getName();if(yb instanceof Mb){Sb=ab(Sb,yb.getTableName());var Wb=ob==Oa.OQL_DATA_SET?yb.getDisplayName():yb.getType()}else ob==Oa.OQL_DATA_SET&&(Wb=
yb.getDisplayName());var Zb=$("<div>");Zb.addClass("extreport-dataset-designer-tablearea-table-item");var $b=$("<div>");$b.addClass("extreport-dataset-designer-tablearea-table-icon");la.background($b,fc(yb));$b.appendTo(Zb);$b=$("<div>");var hc=Sb;Wb&&(hc=Sb+"("+Wb+")");$b.attr("title",hc);$b.addClass("extreport-dataset-designer-tablearea-table-name");K.highlightKeyWords($b,yb instanceof Mb?H:D,hc);$b.appendTo(Zb);yb.isEnabled()||Zb.attr("disabled",!0);return Zb}}function Ya(ka,sa,lb){za.call(this);
var yb=this,Sb=this.protectedMethod,Wb,Zb;(function(){Sb.setTitle(ka);yb.setSize(791,515);Sb.setSelectable(!0);Sb.setContentPaneCreator(function(){return sa.getJqUi()});sa.setMessageCurtain(Sb.getMessageCurtain());Sb.setClosingChecker2(function($b){Zb&&Zb();var hc=sa.checkUIInput();if(hc)Sb.getMessageCurtain().showPrompt(hc,2E3),$b(!1);else{hc=lb.model;var uc=hc.getDataSourceType(),rc=hc.getDataSource(),wc=sa.getModelFromUI(),xc=wc.getDataSourceType(),yc=wc.getDataSource().getName();rc&&uc==xc&&rc.getName()==
yc||(wc.setDataSetType(hc.getDataSetType()),Wb&&Wb(wc,!rc));$b(!0)}},function($b){Zb&&Zb();$b(!0)},!0);Sb.setClosingAction(function($b){})})();this.setFunSuccessCallback=function($b){Wb=$b};this.setFunClosedCallback=function($b){Zb=$b}}var ca=this,Sa=nb,e,n,g,a,f,b,t,r,F,B,Z,Xa,aa,G,C,O=null,ra,Fa,kb,Y,ob=oa,u,P,N,M,va=[],h={},d=[],l=[],m=[],p,q,c,D="",H="",L=!1,X=!1,ua=!1,ia=!1,z,v,y,x=!0,Q={},E;this.getJqUi=function(){e||na();return e};this.showNoSourceUi=function(ka){n||qa(ka);e.hide();a&&a.hide();
n.show()};this.showPaneUi=function(){n&&n.hide();a&&a.hide();e.show()};this.showNoTableExceptionUiFromModel=function(ka){u=ka;ca.protectedSyncModel(u,Y);P&&P.setItemModels([u]);ka=Y.getException(hb.DATA_SOURCE);I(ka);Sa.fireEvent(Ka.OUTPUT_AREA_SHOW_EXP,!0)};this.isShowNoTableExceptionUi=function(){return X};this.setDataSetModel=function(ka){Y=ka};this.setFunGetDataSourceModelCallback=function(ka){v=ka};this.setEnableButtonFunCallBack=function(ka){y=ka};this.dataSourceModel2Ui=function(ka,sa){var lb=
!1;ka&&!ka.isSameDataSourceModel(u)&&(lb=!0);if(lb||sa)u=ka,ca.protectedSyncModel(u,Y),sa=Sa.createQueryFacade(function(yb){x=!1;ca.showPaneUi();Y.clearException(hb.DATA_SOURCE);y&&y(!0,!0,!0);C||k();C.hide();var Sb=new Ba;Sb.fromJsonObject(yb);a:if(yb=lb,X&&(X=!1,n&&n.hide(),a&&a.hide(),e.show(),Z.show(),Xa.show(),ra.collapseSecondHalf(!1),pa(),Sa.fireEvent(Ka.OUTPUT_AREA_SHOW_EXP,!1)),u=Sb.getDataSourceModel(),ca.protectedSyncModel(u,Y),P.setItemModels([u]),P.setSelecteds([u]),S(Sb.getTableNode()),
l){var Wb=l[0];yb?c=q=null:Wb=q?q:l[0];$a();if(Wb instanceof Ob&&(S(Wb.getFieldNode(),"field"),d&&0<d.length)){$a("field");break a}Wb?Db(Wb):Ia(!0)}Sa.fireEvent(Ka.QUERY_AREA_SET_HINT_TYPE,Sb.getMapTableFields())},function(yb,Sb){x=!1;Y.clearException(hb.DATA_SOURCE);Y.addException(hb.DATA_SOURCE,"no-sense",Sb);y&&y(!1,!1,!0);ca.showNoTableExceptionUiFromModel(ka);return 8077E3<yb?(Sa.getMessageCurtain().showPrompt(Sb,5E3),!0):!1}),X?sa.setBlockingJqUi(a):sa.setBlockingJqUi(Z),sa.getUsableTableObject(Y.getDataSetId(),
Y.toJsonObject())};this.updateUi=function(){pa();ua?(ja(!0),Ia(!0)):ia?($a(),Ia(!0)):($a(),$a("field"))};this.resize=function(){pa()};this.protectedInit=function(ka){throw Error("override me");};this.protectedCreateDataSourceSelectPane=function(ka){throw Error("override me");};this.protectedSyncModel=function(ka,sa){throw Error("override me");};this.setFunAddDataSourceCallback=function(ka){z=ka};var k=function(){C=Gb.createWarning();var ka=52;Ga.isEnglish()?ob==Oa.SQL_DATA_SET&&(ka+=34):ka=ob==Oa.OQL_DATA_SET?
62:52;fa.layoutCtrl(C,ka,5,12,12);C.appendTo(f)},I=function(ka){if(ka){C||k();var sa=J.get("fullStop","\u3002");ka.endsWith(sa)||(ka+=sa);C.attr("title",ka);C.show()}X=!0;a||(a=$("<div>"),a.appendTo(f),fa.layoutCtrlWithLRTB(a,0,0,null,90,-8,null),a.addClass("extreport-dataset-designer-notable"),ka=$("<div>"),ka.appendTo(a),la.background(ka,"notable"),fa.layoutCtrlCenterAlign(ka,150),fa.layoutCtrlMiddleAlign(ka,150),fa.layoutCtrl(ka,null,"50%",null,86),ka=$("<div>"),sa=ob==Oa.SQL_DATA_SET?J.get("noTableError",
"\u6570\u636e\u6e90\u5b58\u5728\u9519\u8bef\uff0c\u65e0\u6cd5\u83b7\u53d6\u6570\u636e\u8868"):J.get("noEntityError","\u4e1a\u52a1\u5b9e\u4f53\u5b58\u5728\u9519\u8bef\uff0c\u65e0\u6cd5\u83b7\u53d6\u5b9e\u4f53\u7ed3\u6784"),ka.text(sa),fa.layoutCtrlCenterAlign(ka,200),fa.layoutCtrlMiddleAlign(ka,20),fa.layoutCtrl(ka,"52%","56%",210,null),ka.css({"text-align":"center"}),ka.appendTo(a));n&&n.hide();e.show();Z.hide();Xa.hide();ra.collapseSecondHalf(!0);pa();a.show()},ba=function(ka,sa){var lb=!1;sa="field"==
sa;var yb=ob==Oa.OQL_DATA_SET,Sb="",Wb="";sa&&c?Sb=c.getName():q&&(Sb=q.getName(),yb&&(Wb=q.getDisplayName()));for(var Zb=null,$b=0;$b<ka.length;$b++){var hc=ka[$b];yb&&!Zb&&(0<=hc.getName().toUpperCase().indexOf(D.toUpperCase())||0<=hc.getDisplayName().toUpperCase().indexOf(D.toUpperCase()))&&(Zb=hc);if(Sb&&Sb==ka[$b].getName())if(yb){if(0<=Sb.toUpperCase().indexOf(D.toUpperCase())||0<=Wb.toUpperCase().indexOf(D.toUpperCase())){lb=!0;break}}else{lb=!0;break}}lb||(sa?c=null:q=yb&&Zb?Zb:null)},da=
function(ka,sa){var lb=[],yb=!0;if(0<=ka.getName().toUpperCase().indexOf(sa.toUpperCase())||0<=ka.getDisplayName().toUpperCase().indexOf(sa.toUpperCase()))lb.push(ka),yb=!1;for(var Sb=ka.getChildren?ka.getChildren():[],Wb=0;Wb<Sb.length;Wb++){var Zb=da(Sb[Wb],sa);Zb&&0<Zb.length&&(yb&&(lb.push(ka),yb=!1),lb=lb.concat(Zb))}return lb},V=function(){if(""==D)l=va;else for(var ka=0;ka<va.length;ka++){var sa=va[ka];0==sa.getSubNodeLevel()&&(l=l.concat(da(sa,D)))}ba(l)},T=function(){if(""==H)m=d;else{for(var ka=
d.length,sa=0;sa<ka;sa++){var lb=d[sa],yb=ab(lb.getName(),lb.getTableName()).toUpperCase(),Sb;ob==Oa.OQL_DATA_SET&&(Sb=lb.getDisplayName().toUpperCase());(0<=yb.indexOf(H.toUpperCase())||Sb&&0<=Sb.indexOf(H.toUpperCase()))&&m.push(lb)}ba(m,"field")}},S=function(ka,sa){"field"==sa?(m=[],d=[]):(l=[],va=[]);ka=ka.getChildren();for(var lb=0;lb<ka.length;lb++)ma(ka[lb],sa);"field"==sa?T():V()},ma=function(ka,sa){"field"==sa?d.push(ka):va.push(ka);if(ka instanceof wa||ka instanceof Ob)if(ka=ka.getChildren())for(var lb=
0;lb<ka.length;lb++)ma(ka[lb],sa)},na=function(){f=$("<div>");ca.protectedInit(f);var ka=$("<div>");ka.attr("title",J.get("refresh","\u5237\u65b0"));ka.css({cursor:"pointer"});la.backgroundWithHover(ka,"refresh");fa.layoutCtrlWithLRTB(ka,null,4,16,67,null,16);ka.appendTo(f);ka.on("click",function(){ca.dataSourceModel2Ui(v(Y),!0)});B=$("<div>");Nb(B);B.appendTo(f);Z=$("<div>");qc(Z);Z.appendTo(f);Xa=$("<div>");Xb(J.get("field","\u5b57\u6bb5")).appendTo(Xa);qc(Xa,"field");ra=new Da;ra.setHorizontalSplit(!1);
ra.setFirstSize(400,260,-1);ra.setSecondSize(260,260,-1);ra.setResizeMode(Da.RESIZE_MODE_SECOND_FIXED);ra.setFirstChild(Da.createChildWrapper(f));ra.setSecondChild(Da.createChildWrapper(Xa));e=ra.getJqUi();Sa.addListener(Ka.DATASOURCE_AREA_SHOW_EXP,function(sa){I(sa)})},pa=function(){g&&g.is(":visible")?La():(ra.setFirstSize(400,260,-1),ra.setSecondSize(260,260,-1),ra.setResizeMode(Da.RESIZE_MODE_SECOND_FIXED),ra.resize(!0))},qa=function(ka){n=$("<div>");n.appendTo(e.parent());var sa=Xb(ob==Oa.SQL_DATA_SET?
J.get("dataSource","\u6570\u636e\u6e90"):J.get("entity","\u4e1a\u52a1\u5b9e\u4f53"));sa.addClass("extreport-dataset-designer-text-ellipsis");var lb=0;Ga.isEnglish()&&(lb=24);fa.layoutCtrl(sa,null,null,60+lb,null);sa.appendTo(n);g=$("<div>");g.appendTo(n);g.hide();setTimeout(function(){var Sb=e.parent().height()/2-150;Sb=0<Sb?Sb:0;var Wb=e.parent().width()/2-80;Wb=0<Wb?Wb:0;fa.layoutCtrl(g,0,0,160,300);g.css({"margin-top":Sb+"px","margin-left":Wb+"px"});Sa.addWindowResizeListener(function(){g&&La()});
g.show()},0);sa=$("<div>");sa.appendTo(g);la.background(sa,"no_source");fa.layoutCtrlCenterAlign(sa,60);fa.layoutCtrlMiddleAlign(sa,80);fa.layoutCtrl(sa,null,135,null,null);sa=ob==Oa.SQL_DATA_SET?J.get("noAddSourceClick","\u5c1a\u672a\u6dfb\u52a0\u6570\u636e\u6e90\uff0c\u70b9\u51fb\u6dfb\u52a0"):J.get("noAddEntityClick","\u5c1a\u672a\u6dfb\u52a0\u4e1a\u52a1\u5b9e\u4f53\uff0c\u70b9\u51fb\u6dfb\u52a0");lb=new pb;lb.setFontSize(Ma.getFontSize(),Ma.getFontName());var yb=lb.measureWidth(sa);lb=$("<div>");
lb.text(ob==Oa.SQL_DATA_SET?J.get("noAddSource","\u5c1a\u672a\u6dfb\u52a0\u6570\u636e\u6e90\uff0c\u70b9\u51fb"):J.get("noAddEntity","\u5c1a\u672a\u6dfb\u52a0\u4e1a\u52a1\u5b9e\u4f53\uff0c\u70b9\u51fb"));lb.css({color:"rgb(102, 102, 102)"});fa.layoutCtrlCenterAlign(lb,yb+5);fa.layoutCtrlMiddleAlign(lb,100);fa.layoutCtrl(lb,null,213,null,null);lb.appendTo(g);yb=$("<div>");yb.text(J.get("addSource","\u6dfb\u52a0"));yb.attr("title",sa);yb.on("click",function(){mc(ka)});yb.addClass("extreport-dataset-designer-text-add");
yb.appendTo(lb);setTimeout(function(){mc(ka)},0)},La=function(){var ka=e.parent().height()/2-150;g.css({"margin-top":(0<ka?ka:0)+"px"});ka=e.parent().width()/2-80;g.css({"margin-left":(0<ka?ka:0)+"px"})},xb=function(ka){if(!L){L=!0;var sa=Sa.createQueryFacade(function(lb){X&&ca.dataSourceModel2Ui(u,!0)},function(lb,yb){Y.clearException(hb.DATA_SOURCE);Y.addException(hb.DATA_SOURCE,"no-sense",yb);y&&y(!1,!1,!0);ca.showNoTableExceptionUiFromModel(u);return!0},function(){L=!1;ka&&ka()});sa.setBlockingJqUi(e);
sa.setShowBlocking(!1);sa.checkDataSource(Y.getDataSetId(),Y.toJsonObject())}},Nb=function(ka){var sa=new fb;sa.setBorderVisible(!0);sa.setToggleSelectingEnabled(!1);sa.setCustomItemPainter(function(lb,yb){lb.css("height","30px");lb.css("cursor","default");if(yb){var Sb=u.getDataSourceType();lb.attr("name",yb.getDataSource().getName());var Wb=$("<div>");Wb.addClass("extreport-dataset-designer-sourcearea-name");Wb.text(yb.getDataSourceDisplayName());Wb.attr("title",yb.getDataSourceDisplayAlias());
Wb.appendTo(lb);yb=$("<div>");yb.addClass("extreport-dataset-designer-sourcearea-icon");la.background(yb,Sb==ub.DATA_CENTER?"ds_datacenter":Sb==ub.SUPER_QUERY?"ds_superquery":Sb==ub.OUT_DB||Sb==ub.USER_SUPER_QUERY?"ds_outdb":"ds_entity");yb.appendTo(lb)}var Zb=$("<div>");ob==Oa.OQL_DATA_SET?Zb.attr("title",J.get("switchEntity","\u5207\u6362\u4e1a\u52a1\u5b9e\u4f53")):Zb.attr("title",J.get("switchDs","\u5207\u6362\u6570\u636e\u6e90"));Zb.addClass("extreport-dataset-designer-sourcearea-switch-btn");
Zb.on("mousedown",function($b){$b.stopPropagation();xb(function(){mc(z)})});la.backgroundWithHover(Zb,"switch");Zb.appendTo(lb);Zb.hide();lb.mouseenter(function(){Zb.show()}).mouseleave(function(){Zb.hide()})});sa.setCustomSelectedsPainter(function(lb,yb){yb&&0<yb.length&&(lb&&0<lb.length&&(lb=lb[0],lb.css("background-color",""),lb.css("color","")),yb=yb[0],yb.css("background-color","#eff3fd"),yb.css("color","rgb(130, 130, 130)"))});P=sa;P.setItemModels([]);sa=sa.getJqUi();fa.layoutCtrlWithLRTB(sa,
0,0,null,25,0,32);sa.appendTo(ka)},ja=function(ka){ua=ka;D?ka?(b||(b=gc(Z,J.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"),30)),$(N.getUI()).hide(),r&&r.hide(),b.show()):(r&&r.hide(),b&&b.hide(),$(N.getUI()).show()):ka&&!x?(r||(r=gc(Z,J.get("noTable","\u6682\u65e0\u6570\u636e\u8868"),30)),$(N.getUI()).hide(),b&&b.hide(),r.show()):(r&&r.hide(),b&&b.hide(),$(N.getUI()).show())},Ia=function(ka){ia=ka;H?ka?(t||(t=gc(Xa,J.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"),
30)),$(M.getUI()).hide(),aa.hide(),F&&F.hide(),t.show()):(F&&F.hide(),t&&t.hide(),aa.show(),$(M.getUI()).show()):ka&&!x?(F||(F=gc(Xa,J.get("noField","\u6682\u65e0\u5b57\u6bb5"),30)),$(M.getUI()).hide(),aa.hide(),t&&t.hide(),F.show()):(F&&F.hide(),t&&t.hide(),$(M.getUI()).show(),x?aa.hide():aa.show())},ab=function(ka,sa){if(sa){var lb=ka.indexOf(sa);-1!=lb&&(ka=ka.substring(lb+sa.length+1))}return ka},Db=function(ka){var sa=ka.getName();if(!Q[sa]){Q[sa]=!0;E=(new Date).getTime()+"";O&&O.remove();O=
com.kingdee.bos.qing.framework.common.AbstractFacade.block(Xa);var lb=Sa.createQueryFacade(function(yb){Q[sa]=!1;if(yb){var Sb=yb[0];yb=yb[1];var Wb=new wa,Zb={};Wb.fromJsonObject(yb[0],Zb);Sa.fireEvent(Ka.QUERY_AREA_ADD_HINT_TYPE,Zb);h[sa]=Wb;E==Sb&&q&&sa==q.getName()&&(O&&O.remove(),O=null,jc(ka),S(Wb,"field"),$a("field"))}},function(yb,Sb){Q[sa]=!1;E==Sb&&(O&&O.remove(),O=null,ka.setEnabled(!1),Ea.refresh(N),Ia(!0));return!0});lb.setShowBlocking(!1);lb.getTableFields(E,ob,u.getDataSourceType(),
u.getDataSource().getName(),[sa])}},Rb=function(ka){var sa;ka instanceof Ob&&(sa=ka.getFieldNode());sa||(sa=h[ka.getName()]);return sa},$a=function(ka){if("field"==ka)m&&0<m.length?(Ia(!1),ka=Xa.width(),Eb(M,m,ka)):Ia(!0);else if(l&&0<l.length){ja(!1);ka=N;var sa=ka.keepScrollStatus();sa.v&&(sa.v=0);ka.restoreScrollStatus(sa);ka=Z.width();Eb(N,l,ka);lc()}else ja(!0)},Eb=function(ka,sa,lb){Ea.clear(ka);1E3<sa.length&&ka.setLargeDataMode(!0,!1);ka.addColumn().setWidth(lb-4-9);if(0!=sa.length){lb=!1;
for(var yb,Sb=0;Sb<sa.length;Sb++){var Wb=sa[Sb],Zb=ka.addRow();Zb.setHeight(30);Zb.setHide(!1);var $b=Zb.getCell(0);$b.setValue(Wb);Wb instanceof Mb?c&&c.getName()==Wb.getName()&&($b.setUserObject(!0),lb=!0):q&&q.getName()==Wb.getName()&&($b.setUserObject(!0),lb=!0,p=Zb);0==Sb&&(yb=$b);Wb=Wb.getSubNodeLevel();Wb=new KTCellTreeModel(Wb);Wb.setExpanded(!0);$b.setTreeModel(Wb)}!lb&&yb&&yb.setUserObject(!0)}Ea.refresh(ka)},Qb=function(ka,sa){Yb(ka,sa);sa instanceof Mb||((ka=Rb(sa))?(jc(sa),S(ka,"field"),
$a("field")):Db(sa))},Yb=function(ka,sa){if(sa instanceof Mb){var lb=$(M.getUI());if(c){var yb=lb.find(".extreport-dataset-designer-tablearea-table-item_selected");yb&&(yb=yb.find(".extreport-dataset-designer-tablearea-table-icon"),la.background(yb,fc(c)))}c=sa}else lb=$(N.getUI()),q&&(yb=lb.find(".extreport-dataset-designer-tablearea-table-item_selected"))&&(yb=yb.find(".extreport-dataset-designer-tablearea-table-icon"),la.background(yb,fc(q))),q=sa;lb.find(".extreport-dataset-designer-tablearea-table-item").removeClass("extreport-dataset-designer-tablearea-table-item_selected");
ka.addClass("extreport-dataset-designer-tablearea-table-item_selected");ka=ka.find(".extreport-dataset-designer-tablearea-table-icon");la.background(ka,fc(sa)+"_selected")},fc=function(ka){var sa="table";ka instanceof Mb?sa="field":ob==Oa.OQL_DATA_SET&&(sa=0==ka.getSubNodeLevel()?"entity_head":"entity_sub");return sa},jc=function(ka){var sa=ka.getName(),lb;ob==Oa.OQL_DATA_SET&&(lb=ka.getDisplayName());lb&&(sa=lb);G.text(sa);G.attr("title",sa);aa.show()},lc=function(){if(p){var ka=N.getRowIndex(p);
0<=ka&&N.scrollCellVisible(ka,0,!0)}},qc=function(ka,sa){var lb=90;"field"==sa&&(lb=25);var yb=function($b){D=$.trim($b.getText());l=[];if(va&&0<va.length&&(V(),0<l.length)){ja(!1);Ia(!1);$a();$b=q?q:l[0];var hc=Rb($b);hc?(S(hc,"field"),$a("field")):Db($b);return}ja(!0);d=[];Ia(!0)},Sb=function($b){H=$.trim($b.getText());m=[];if(d&&0<d.length&&(T(),0<m.length)){Ia(!1);$a("field");return}Ia(!0)};(function($b){var hc=new W;hc.setSearchListenerDelay(1E3);hc.setShowSearchIcon(!0);hc.setPlaceholder(J.get("searchContent",
"\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));hc.setFontSize(12);"field"==sa?(kb=hc,kb.addSearchListener(Sb)):(Fa=hc,Fa.addSearchListener(yb));hc=hc.getJqUi();hc.addClass("extreport-dataset-designer-tablearea-search-box");fa.layoutCtrlWithLRTB(hc,0,0,null,lb,0,30);hc.appendTo($b)})(ka);"field"==sa&&function($b){var hc=$("<div>");hc.addClass("extreport-dataset-designer-left-border");hc.addClass("extreport-dataset-designer-right-border");aa=$("<div>");aa.addClass("extreport-dataset-designer-field-table-item");
aa.appendTo(hc);var uc=$("<div>");uc.addClass("extreport-dataset-designer-field-table-item-icon");la.background(uc,"table");uc.appendTo(aa);G=$("<div>");G.text("");G.addClass("extreport-dataset-designer-field-table-item-name");G.appendTo(aa);aa.hide();lb+=32;fa.layoutCtrlWithLRTB(hc,0,0,null,lb,0,30);hc.on("click",lc);hc.appendTo($b)}(ka);var Wb=new KTable;Wb.setCellRender(new Ub(Wb));Wb.setSyncUIWhenModelChanged(!1);Wb.setColumnFitVisibleWidth(!1);Wb.setDraggableAdjusting(!0,3,0,new Ua);"field"==
sa?M=Wb:N=Wb;var Zb=$("<div>");Zb.addClass("extreport-dataset-designer-left-border");Zb.addClass("extreport-dataset-designer-right-border");Zb.addClass("extreport-dataset-designer-bottom-border");lb+=30;fa.layoutCtrlWithLRTB(Zb,0,0,null,lb,0,null);Wb=$(Wb.getUI());Wb.children().css("overflow-x","hidden");fa.layoutCtrlWithLRTB(Wb,1,1,null,3,0,null);Wb.appendTo(Zb);Zb.appendTo(ka)},mc=function(ka){var sa=u?u:new Aa;sa.setDataSetType(ob);var lb={model:sa,dataSetModel:Y};sa=ca.protectedCreateDataSourceSelectPane(lb);
lb=ob==Oa.SQL_DATA_SET?new Ya(J.get("selectDataSource","\u9009\u62e9\u6570\u636e\u6e90"),sa,lb):new Ya(J.get("selectEntity","\u9009\u62e9\u4e1a\u52a1\u5b9e\u4f53"),sa,lb);lb.showDialog();lb.setFunSuccessCallback(ka);sa.getClosedCallback&&lb.setFunClosedCallback(sa.getClosedCallback())}}function sb(oa,nb){function Ub(Sa){var e,n,g,a,f,b,t,r,F=0,B=0,Z,Xa,aa,G,C,O=!1;this.getJqUi=function(){e||(e=$("<div>"),Y(kb));return e};this.setMessageCurtain=function(d){n=d};this.getMessageCurtain=function(){return n};
this.checkUIInput=function(){if(O)return $(document.body).find(".sa-common-loading-modallayer").css({"background-color":"transparent"}),J.get("loadingDataSource","\u6570\u636e\u6e90\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u3002");if(g.isChecked()){Z=ub.DATA_CENTER;var d=b.getSelectedValue();d&&(Xa=d.value,aa=d.text)}else if(a.isChecked()){if(Z=ub.SUPER_QUERY,d=t.getSelected())Xa=d.getName(),aa=d.getAlias()}else if(d=r.getSelected())Z="superQuery"==d.getDbType()?ub.USER_SUPER_QUERY:ub.OUT_DB,aa=
Xa=d.getName(),G=d.getDbType();if(void 0==Z||void 0==Xa)return J.get("pleaseSelectDataSource","\u8bf7\u9009\u62e9\u6570\u636e\u6e90\u3002")};this.getModelFromUI=function(){var d=new Aa;d.setDataSetType(Oa.SQL_DATA_SET);d.setDataSourceType(Z);var l=new Ha;l.setName(Xa);l.setAlias(aa);l.setDBType(G);d.setDataSource(l);return d};var ra=function(){var d=Sa.dataSetModel;var l=d?(l=d.getException(hb.DATA_SOURCE,Va.DATA_SOURCE_UNDEFINED))?null:d.getException(hb.DATA_SOURCE):null;d=Sa.model;if(d.getDataSourceType()==
ub.DATA_CENTER){u();g.setChecked(!0);var m=d.getDataSource();d=m.getName();var p=m.getAlias();if(p){var q=p.split("/")[1];q&&(d=q)}m={text:d,value:m.getName()};b.setSelectedValue(m);l?(p||b.setDisplayText(d),Fa(g.getJqUi(),96,l)):ob()}else d.getDataSourceType()==ub.SUPER_QUERY?(ob(),a.setChecked(!0),d=d.getDataSource(),C&&C.hasSuperQuerySchema()&&t.setItemModels(C.getSuperQuerySchemas(),function(c,D){return c&&D?c.getName()==D.getName():!1}),t.setSelected(d),l?Fa(a.getJqUi(),72,l):u()):(ob(),u(),
f.setChecked(!0),r.setSelectedModel(d),l&&Fa(f.getJqUi(),84+B,l));r.loadAllOutDBs()},Fa=function(d,l,m){var p=Gb.createWarning();fa.layoutCtrl(p,l,4,12,12);l=J.get("fullStop","\u3002");m.endsWith(l)||(m+=l);p.attr("title",m);p.appendTo(d)},kb=function(){Ga.isEnglish()&&(F=24,B=64);var d=0,l=new Pa;g=new Ib;var m=J.get("currentDataCenter","\u5f53\u524d\u6570\u636e\u4e2d\u5fc3");g.setText(m);var p=g.getJqUi();p.attr("title",m);p.appendTo(e);fa.layoutCtrl(p,0,d,95,23);l.addElement(g);g.addCheckedListener(function(){});
m=new tb;m.setText(J.get("app","\u5e94\u7528"));m=m.getJqUi();m.appendTo(e);fa.layoutCtrl(m,20,d+=38,50,23);b=new Ya;b.setFunSelectedChangeListener(function(q){va(g,q)});m=b.getJqUi();fa.layoutCtrl(m,80,d,200,23);m.appendTo(e);a=new Ib;m=J.get("superQuery","\u8d85\u7ea7\u67e5\u8be2");a.setText(m);p=a.getJqUi();p.attr("title",m);p.appendTo(e);fa.layoutCtrl(p,0,d+=43,72+F,23);l.addElement(a);a.addCheckedListener(function(){});m=new tb;m.setText(J.get("schema","\u6a21\u5f0f"));m=m.getJqUi();m.appendTo(e);
fa.layoutCtrl(m,20,d+=38,50,23);t=new ea;t.addSelectedChangedListener(function(q,c,D){va(a,D)});t.setCustomPainter(h);m=t.getJqUi();fa.layoutCtrl(m,80,d,200,23);m.appendTo(e);f=new Ib;m=J.get("outDB","\u516c\u5171\u6570\u636e\u6e90");f.setText(m);p=f.getJqUi();p.attr("title",m);p.appendTo(e);fa.layoutCtrl(p,0,d+=43,85+B,23);l.addElement(f);f.addCheckedListener(function(){});m=$("<div>");m.attr("title",J.get("outDB","\u516c\u5171\u6570\u636e\u6e90"));fa.layoutCtrlWithLRTB(m,null,15,16,173,null,16);
C&&C.hasDBManagePerm()?(la.backgroundWithHover(m,"outdb"),m.css({cursor:"pointer",opacity:"1"})):(la.background(m,"outdb"),m.css({cursor:"not-allowed",opacity:"0.5"}));m.appendTo(e);m.on("click",function(){if(C&&C.hasDBManagePerm()){var q=Ja.decodeParamFromUrl(location.search,"path");q=(q?q:"/ierp")+"/qing/dbManageEntrance.do";var c=Ra.getUrlParamValue();c&&(q=Ja.appendParamToUrl(q,"skin",c));(c=Ab.getUrlParamValue("appID"))&&(q=Ja.appendParamToUrl(q,"appID",c));eb.openNewTab(J.get("outDB","\u516c\u5171\u6570\u636e\u6e90"),
q)}});m=$("<div>");m.attr("title",J.get("refresh","\u5237\u65b0"));m.css({cursor:"pointer"});la.backgroundWithHover(m,"refresh");fa.layoutCtrlWithLRTB(m,null,42,16,173,null,16);m.appendTo(e);N(e,170,M);r=new ca;r.setMessageCurtain(n);r.setFunSelectedListener(function(q){va(f,q)});p=r.getJqUi();fa.layoutCtrl(p,20,d+=38,719,198);p.appendTo(e);m.on("click",function(){r.loadAllOutDBs()});l.addChangedListener(function(q,c){g==q?r.unSelected():a==q?(r.unSelected(),C&&(q=C.getSuperQuerySchemas())&&!t.getSelected()&&
t.setSelected(q[0])):r.doAutoSelected(c)});ra()},Y=function(d){O=!0;var l=nb.createQueryFacade(function(m){O=!1;C=new Fb;C.fromJsonObject(m);d&&d()},function(m,p){O=!1;d&&d();return!0});l.setBlockingJqUi(e);l.checkDataSourcePermission()},ob=function(){C&&!C.hasDataCenterPerm()&&(g.setEnabled(!1),b.setEnabled(!1),P(e,J.get("dataCenterTips","\u60a8\u6ca1\u6709\u201c\u6570\u636e\u4e2d\u5fc3\u8fde\u63a5\u201d\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u8fdb\u884c\u6388\u6743\u3002\u6388\u6743\u65b9\u5f0f\u8bf7\u53c2\u8003"),
db.getQingRptSqlDataSetUrl(),96,2,null,!0))},u=function(){if(C&&C.hasSuperQuerySchema())t.setItemModels(C.getSuperQuerySchemas(),function(l,m){return l&&m?l.getName()==m.getName():!1});else{var d=C&&C.isSuperQueryNotDeployed()?J.get("superQueryTips1","\u5f53\u524d\u73af\u5883\u672a\u90e8\u7f72\u8d85\u7ea7\u67e5\u8be2\u670d\u52a1\u6216\u670d\u52a1\u672a\u542f\u52a8\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u68c0\u67e5\u8d85\u7ea7\u67e5\u8be2\u90e8\u7f72\u60c5\u51b5\u3002"):J.get("superQueryTips2",
"\u201c\u8d85\u7ea7\u67e5\u8be2\u201d\u6ca1\u6709\u53ef\u7528\u7684\u6a21\u5f0f\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u8fdb\u884c\u6388\u6743\u3002");P(e,d,db.getQingRptSuperQueryUrl(),72+F,83,56);a.setEnabled(!1);t.setEnabled(!1);(d=t.getJqUi().find(".sa-ctrl-combobox-text").text())&&d!=J.get("selectSchemaTips","\u8bf7\u9009\u62e9\u4e00\u4e2a\u6a21\u5f0f")||t.getJqUi().find(".sa-ctrl-combobox-text").text(J.get("noSchema","\u6ca1\u6709\u53ef\u7528\u7684\u6a21\u5f0f"))}},P=function(d,l,m,p,q,c,
D){var H=new Jb;c?H.setTipsSize(300,c):(c=new pb,c.setFontSize(Ma.getFontSize(),Ma.getFontName()),c=c.measureWidth(l),H.setTipsSize(300,24*Math.ceil(c/300)));H.setIconType(Jb.ICON_TYPE_QUESTION);c=$("<div>");c.text(l);D&&(m=com.kingdee.bos.qing.integration.PageHelper.getIframeUrl(m),l=$("<a onclick='javascript:window.open(\""+m+"\");' href='#'>"),l.css({cursor:"pointer",color:"#5582f3"}),l.text(J.get("helpDoc","\u5e2e\u52a9\u6587\u6863")),c.append(l),l=$("<a>"),l.text(J.get("fullStop","\u3002")),
c.append(l));H.setTipsHtml(c);H=H.getJqUi();fa.layoutCtrlWithLRTB(H,p,null,16,q,null,16);H.appendTo(d)},N=function(d,l,m){var p=new W;p.setSearchListenerDelay(1E3);p.addSearchListener(m);p.setShowSearchIcon(!0);p.setPlaceholder(J.get("searchOutDB","\u641c\u7d22\u540d\u79f0/\u7c7b\u578b/\u5730\u5740/\u7528\u6237"));p.setFontSize(12);var q=p.getJqUi();fa.layoutCtrlWithLRTB(q,null,70,200,l+3,null,18);q.find(":input").on("keydown",function(D){13===(D.keyCode||D.which||D.charCode)&&m()});q.hide();q.appendTo(d);
var c=$("<div>");fa.layoutCtrlWithLRTB(c,null,70,16,l+3,null,16);la.background(c,"icon_search");c.appendTo(d);c.on("mouseenter",function(){c.hide();q.show();p.setFoucs()});d.on("mousedown",function(D){var H=p.getText();H=H?H.trim():H;H=rb.isNotEmptyStr(H);D=$(D.target);q.find(D)[0]||H||(q.hide(),c.show())})},M=function(d){d&&(d=d.getText(),r&&r.doSearchText(d))},va=function(d,l){var m=d.isChecked();l&&!m&&d.setChecked(!0)},h=function(d,l,m){m?(d=m.getName(),m=m.getAlias(),l.text(m?m+"("+d+")":d)):
l.text(J.get("selectSchemaTips","\u8bf7\u9009\u62e9\u4e00\u4e2a\u6a21\u5f0f"))}}function Ya(){var Sa,e,n,g,a,f;this.getJqUi=function(){e||(e=$("<div>"),a=new ya,a.setText(J.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528")),a.setReadonly("readonly"),g=a.getJqUi(),g.find(".sa-ctrl-textfield-input").css({"font-size":"12px"}),g.on("click",t),n=$("<div>"),la.background(n,"f7"),n.css("z-index","1"),n.css("cursor","pointer"),n.on("click",t),fa.layoutCtrl(g,0,0,200,23),fa.layoutCtrl(n,180,5,
16,16),n.appendTo(e),g.appendTo(e));return e};this.setEnabled=function(r){a&&a.setEnabled(r);g&&g.css({"pointer-events":"none"});n&&n.css({"pointer-events":"none"})};this.setFunSelectedChangeListener=function(r){f=r};this.setSelectedValue=function(r){Sa=r;b()};this.setDisplayText=function(r){a&&a.setText(r)};this.getSelectedValue=function(){return Sa};var b=function(){if(a){var r=a,F=r.setText,B=J.get("chooseApp","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5e94\u7528");Sa&&(B=Sa.text);F.call(r,B)}f&&f(Sa)},
t=function(){var r=com.kingdee.bos.qing.integration.AppChooseForm;r.setCallBack(function(F){if(F&&F.content){F=F.content;var B=F.appNumber,Z={};Z.text=F.appName;Z.value=B;Sa=Z;b()}});r.openAppChooseForm(Sa?Sa.value:null)}}function ca(){function Sa(h){KTDefaultCellRender.call(this,h);var d=this,l=this.paintCellUI;this.paintCellUI=function(p,q){var c=d.getCurrentRowIdx(),D=d.getCurrentRow(),H=d.getCurrentColIdx();D=D.getUserObject();if(c<Ea.getHeadRowCount())l(p,q);else if(0==H){O||ra||(M(),ra=!0);
q=c-Ea.getHeadRowCount();H=new Ib;var L=Z&&Z.getName()==D.getName(),X=F&&F.getDataSource()&&F.getDataSource().getName()==D.getName();r&&(L||!Z&&X)&&(Y.setChecked(!1),H.setChecked(!0),Xa=!0,aa=c,L||(Z=D));kb[q]=H;Fa.addElement(H);H.setUserObject(D);c=H.getJqUi();fa.layoutCtrl(c,12,4,23,23);c.appendTo(p)}else 1==H?m(p,D.getSerialNo()):2==H?m(p,D.getName(),!0):3==H?(c=D.getDbType(),"superQuery"==c&&(c=J.get("superQuery","\u8d85\u7ea7\u67e5\u8be2")),m(p,c,!0)):4==H?m(p,D.getAddress(),!0):5==H&&m(p,D.getUserName(),
!0)};var m=function(p,q,c){var D=$("<div>");D.addClass("extreport-dataset-designer-table-cell-text");c?K.highlightKeyWords(D,t,q+""):(D.text(q),D.attr("title",q));D.appendTo(p)}}var e,n,g,a,f,b,t,r=!1,F,B=!1,Z,Xa=!1,aa,G=[],C=[],O=!0,ra=!1,Fa=new Pa,kb=[],Y=new Ib,ob;this.getJqUi=function(){e||(e=$("<div>"),e.css({border:"1px solid #e5e5e5"}),fa.layoutCtrlWithLRTB(e,0,0,null,0,0,null),va(),Fa.addElement(Y),Fa.addChangedListener(u));return e};this.setMessageCurtain=function(h){f=h};this.getSelected=
function(){return Z};this.setSelectedModel=function(h){F=h};this.loadAllOutDBs=function(){var h=function(m){if(m&&0<m.length)for(var p=0;p<m.length;p++){var q=new Hb;q.fromJsonObject(m[p]);G[p]=q}else G=[];Z?(h=function(c){N()},d=function(c,D){return 8077E3<=c?(f.showPrompt(D,5E3),Z&&(B=F&&F.getDataSource()&&F.getDataSource().getName()==Z.getName(),Z=null),N(),!0):!1},m=nb.createQueryFacade(h,d),m.setBlockingJqUi(e),m.checkOutDBByName(Z.getName())):N()},d=function(m,p){G=[];Z=null;N();return 8077E3<=
m?(f.showPrompt(p,5E3),!0):!1},l=nb.createQueryFacade(h,d);l.setBlockingJqUi(e);l.getOutDBList()};this.setFunSelectedListener=function(h){ob=h};this.doSearchText=function(h){t=h?h.trim():null;N()};this.unSelected=function(){r=!1;Y.setChecked(!0)};this.doAutoSelected=function(h){r=!0;if(h)if(Z)for(h=0;h<kb.length;h++){var d=kb[h],l=d.getUserObject();if(Z.getName()==l.getName()){d.setChecked(!0);break}}else(d=kb[0])&&d.setChecked(!0)};var u=function(h,d){var l=Y==h,m=h.isChecked();!l&&m&&(Z=h.getUserObject(),
d&&ob&&ob(h.getUserObject()))},P=function(){document.body.style.height=document.documentElement.clientHeight+"px";N()},N=function(){if(0==document.body.clientHeight||0==document.body.clientWidth)nb.addWindowResizeListener(P);else{var h=!1;b||(va(),h=!0);if(G)if(t){var d=t.toUpperCase();C=[];for(var l=0;l<G.length;l++){var m=G[l];(0<=m.getName().toUpperCase().indexOf(d)||0<=m.getAddress().toUpperCase().indexOf(d)||0<=m.getDbType().toUpperCase().indexOf(d)||0<=m.getUserName().toUpperCase().indexOf(d))&&
C.push(m)}}else C=G;if(C&&0<C.length){kb=[];h||M();a&&a.hide();g&&g.hide();Ea.clearWithoutHead(b);l=0;for(h=C.length;l<h;l++)d=C[l],r&&!Z&&0==l&&(B||F&&!F.getDataSource())&&(Z=d),Ea.createRow(b).setUserObject(d);Xa=!1;1<b.getRowsCount()&&(l=new KTBorderStyle,l.setLeftBorderWidth(0),b.getRow(1).getCell(0).setBorder(l));b.updateUI();ra=O=!1;b.relayoutViews();ra=O=!1;Xa&&aa&&b.scrollCellVisible(aa,0,!1)}else Ea.clearWithoutHead(b),Ea.refresh(b),t?(a||(a=gc(n,J.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"))),
g&&g.hide(),a.show()):(g||(g=gc(n,J.get("noOutDB","\u6682\u65e0\u6570\u636e\u6e90"))),a&&a.hide(),g.show())}},M=function(){Fa=new Pa;Y=new Ib;Fa.addElement(Y);Fa.addChangedListener(u)},va=function(){b=Ea.createTable();b.setColumnFitVisibleWidth(!1);b.setSyncUIWhenModelChanged(!1);var h=new Ua;h.setColumnNotDraggable([0,1]);b.setDraggableAdjusting(!0,3,0,h);b.addColumns(6);b.getColumn(0).setWidth(40);b.getColumn(1).setWidth(40);b.getColumn(2).setWidth(190);b.getColumn(3).setWidth(100);b.getColumn(4).setWidth(200);
b.getColumn(5).setWidth(140);h=Ea.createHeadRow(b);h.getCell(1).setValue(J.get("serial","#"));h.getCell(2).setValue(J.get("name","\u540d\u79f0"));h.getCell(3).setValue(J.get("type","\u7c7b\u578b"));h.getCell(4).setValue(J.get("addr","\u5730\u5740"));h.getCell(5).setValue(J.get("user","\u7528\u6237"));h=new Sa(b);h.setOutsideVisible(!1);b.setCellRender(h);n=$(b.getUI());fa.layoutCtrlWithLRTB(n,0,0,null,0,0,null);n.appendTo(e)}}U.call(this,oa,nb);this.protectedInit=function(Sa){var e=Xb(J.get("dataSource",
"\u6570\u636e\u6e90"));e.addClass("extreport-dataset-designer-text-ellipsis");var n=0;Ga.isEnglish()&&(n=24);fa.layoutCtrl(e,null,null,60+n,null);e.appendTo(Sa);e=Xb(J.get("table","\u6570\u636e\u8868"));fa.layoutCtrl(e,null,65,null,null);e.appendTo(Sa)};this.protectedCreateDataSourceSelectPane=function(Sa){return new Ub(Sa)};this.protectedSyncModel=function(Sa,e){e.setDataSourceType(Sa.getDataSourceType());if(Sa=Sa.getDataSource())e.setDataSourceName(Sa.getName()),Sa.getDBType&&e.setDBType(Sa.getDBType())}}
function w(oa,nb){function Ub(Ya){function ca(v){KTDefaultCellRender.call(this,v);var y=this;this.paintCellUI=function(x,Q){var E=y.getCell().getValue(),k=E.getName(),I=E.getDisplayName(),ba=I+"("+E.getCommentInfo()+")",da=a.find(".sa-ctrl-switcher-thumb").parent();if(E instanceof wa){var V=$("<div>");V.addClass("extreport-dataset-designer-select-entity-table-item");V.attr("table-name",Cb.encode(k));V.attr("title",I);var T=$("<div>");T.addClass("extreport-dataset-designer-select-entity-table-item-text");
T.css("left","0px");T.css("top","-2px");T.text(I);V.append(T);x=$(x);x.css("left","4px");x.append(V)}else{V=$("<div>");V.addClass("extreport-dataset-designer-select-entity-table-item");V.css("margin-left","-16px");V.attr("table-name",Cb.encode(k));V.attr("parent-name",Cb.encode(E.getParentNode().getName()));da.hasClass("sa-ctrl-switcher_on")?V.attr("title",ba):V.attr("title",I);V.on("mousedown",ia);var S=new Ib;T=S.getJqUi();T.attr("table-name-component",Cb.encode(E.getName()));T.addClass("extreport-dataset-designer-select-entity-table-item-component");
T.data("object",E);S.setUserObject(E);T.data("model",S);S.addCheckedListener(z);aa[E.getName()]?(S.setChecked(!1),S.setEnabled(!1)):O==E.getName()&&(Xa=S,S.setChecked(!0));B.addElement(S);var ma=$("<div>");fa.layoutCtrl(ma,25,0,300,23);ma.addClass("extreport-dataset-designer-select-entity-table-item");var na=$("<div>");na.addClass("extreport-dataset-designer-select-entity-table-item-icon");var pa=E.getType();la.background(na,pa+"_head");T=$("<div>");T.addClass("extreport-dataset-designer-select-entity-table-item-text");
aa[k]&&T.css("color","#c0c0c0");da.hasClass("sa-ctrl-switcher_on")?(T.text(ba),T.attr("entity-coding",I)):(T.text(I),T.attr("entity-coding",ba));"xml"==pa&&T.attr("title",ba);I=S.getJqUi();V.append(I);ma.append(na);ma.append(T);V.append(ma);O==E.getName()&&S.setChecked(!0);""!=O&&O==k&&(ma.addClass("extreport-dataset-designer-select-entity-table-item_selected"),la.background(na,pa+"_head_selected"));x=$(x);x.css("overflow","visible")}Q?(Q=$(Q),Q.css("overflow","visible"),V.appendTo(Q)):V.appendTo(x);
fa.layoutCtrlWithLRTB(V,0,0,null,0,0,null)}}function Sa(){var v,y;this.setJqLeftPane=function(x){v=x};this.getSwitchButtonStatus=function(){return y.isOn()};this.displayEntityCodingPane=function(x,Q,E,k,I){var ba=0;Ga.isEnglish()&&(ba=20);var da=new tb;da.setText(E);da=da.getJqUi();da.attr("title",E);fa.layoutCtrlWithLRTB(da,8,null,105+ba,2,10,23);y=new Wa;y.setOn(!1);y.addStateChangeListener(function(){var V=$(x);$(Q);for(var T=0;T<V.length;T++){var S=V.eq(T);if(S.attr("entity-coding")){var ma=S.attr("entity-coding"),
na=S.text();S.text(ma);S.parents(k).attr("title",ma);S.attr("entity-coding",na)}}I(y.isOn())});E=y.getJqUi();fa.layoutCtrlWithLRTB(E,120+ba,null,35,2,10,23);ba=$("<div>");ba.addClass("extreport-dataset-designer-select-entity-show-name");ba.attr("id","extreport-dataset-designer-select-entity-show-comment");ba.css("margin-bottom","-3px");E.appendTo(ba);da.appendTo(ba);ba.appendTo(v);v.parents(".sa-ctrl-dialog-padding").css("overflow","visible")}}function e(){var v,y,x,Q,E;this.getJqUi=function(){if(!v){v=
$("<div>");v.addClass("extreport-dataset-designer-select-entity-preview");var k=(new tb(J.get("preview","\u9884\u89c8"))).getJqUi();k.addClass("extreport-dataset-designer-select-entity-preview-label");E=new gb;E.setText(J.get("enablePreview","\u542f\u7528\u9884\u89c8"));E.setChecked(!0);E.addCheckedListener(Q);var I=E.getJqUi();I.addClass("extreport-dataset-designer-select-entity-preview-checkbox");v.append(k);v.append(I);x=Ea.createTable();k=$(x.getUI());k.addClass("extreport-dataset-designer-select-entity-preview-table");
v.append(k)}return v};this.setSelectedTableName=function(k){y=k};this.getSelectedTableName=function(){return y};this.setEnablePreviewFunction=function(k){Q=k};this.getPreviewTable=function(){return x};this.relayoutViews=function(){x.relayoutViews()};this.getCheckBoxIsChecked=function(){return E.isChecked()}}var n=this,g,a,f,b,t,r,F,B=new Pa,Z=new Ib,Xa,aa={},G=[],C,O,ra={},Fa={},kb={};this.getJqUi=function(){g||(g=$("<div>"),a=$("<div>"),f=$("<div>"),a.append(f),D(),F=new e,F.setEnablePreviewFunction(H),
F.setSelectedTableName(O),b=F.getJqUi(),nb.addWindowResizeListener(X),ua());return g};this.setMessageCurtain=function(v){t=v};this.getMessageCurtain=function(){return t};this.checkUIInput=function(){if(!Xa)return J.get("noEntitySelected","\u8bf7\u9009\u62e9\u4e00\u4e2a\u5b9e\u4f53\u3002");G=[];C=[];O=null;ra={};Fa={}};this.getModelFromUI=function(){var v=Xa.getJqUi().data("object");v||(v=Xa.getUserObject());var y=new Aa;y.setDataSetType(Oa.OQL_DATA_SET);y.setDataSourceType(-1);var x=new ec;x.setName(v.getCommentInfo());
x.setAlias(v.getDisplayName());y.setDataSource(x);return y};this.getClosedCallback=function(){return L};this.getTableSearchBoxPlaceholder=function(v){var y=J.get("searchEntityName","\u641c\u7d22\u5b9e\u4f53\u540d\u79f0");v&&(y=y+"/"+J.get("mark","\u6807\u8bc6"));return y};this.setTableSearchBoxPlaceholder=function(v){r.setPlaceholder(n.getTableSearchBoxPlaceholder(v))};var Y=function(v){v.find(".extreport-dataset-designer-select-entity-waiting").remove()},ob=function(v,y,x){Y(y);var Q=$("<div>");
Q.text(v);Q.addClass("extreport-dataset-designer-select-entity-waiting");Q.css("top",x);Q.appendTo(y)},u=function(v){var y=new KTable,x=$(y.getUI());x.children().css("overflow-x","hidden");y.setCellRender(new ca(y));y.setSyncUIWhenModelChanged(!1);y.setLargeDataMode(!0,!1);y.addColumn().setWidth(300);y.addTreeExpandListener(function(){var Q=y.keepScrollStatus();Q.v&&(Q.v+=1);y.restoreScrollStatus(Q)});P(y,v);B.addElement(Z);y.updateUI();return x},P=function(v,y){var x=C;if(0==x.length)return!1;for(var Q=
0;Q<x.length;Q++){var E=x[Q],k=v.addRow();k.setHeight(23);var I=k.getCell(0);I.setValue(E);var ba=E.getSubNodeLevel(),da=new KTCellTreeModel(ba);var V=E.getName();V=O?-1<O.indexOf(V):!1;y||V?da.setExpanded(!0):da.setExpanded(!1);!y&&0<ba&&(ba=k.setHide,E=(E=E.getParentNode())?!(O&&-1<O.indexOf(E.getName())):!1,ba.call(k,E));I.setTreeModel(da)}},N=function(v){C=[];var y;r&&(y=r.getText().trim());if(y)for(var x=0;x<G.length;x++){var Q=G[x];0==Q.getSubNodeLevel()&&(C=C.concat(M(Q,y)))}else C=G;f.empty();
0==C.length?(Y(f),x=new tb(J.get("nothingSearched","\u627e\u4e0d\u5230\u7b26\u5408\u7684\u7ed3\u679c")),y||x.setText(J.get("noTable","\u6682\u65e0\u6570\u636e\u8868")),x.setAlign(tb.ALIGN_CENTER),y=x.getJqUi(),y.addClass("extreport-dataset-designer-select-entity-table-area-prompt"),f.append(y)):(x=$("<div>"),x.addClass("extreport-dataset-designer-select-entity-table-area"),y=u(y?!0:!1),x.append(y),f.append(x));1==G.length&&1==v&&(v=G[0].getName(),(y=$(r.getJqUi()).parent().find("[table-name='"+Cb.encode(v)+
"']").find(".extreport-dataset-designer-select-entity-table-item-component").data("model"))&&y.setChecked(!0),va(v));O&&va(O)},M=function(v,y){var x=[];if(v instanceof wb){var Q=$(".sa-ctrl-switcher-thumb").parent();0<=v.getDisplayName().toUpperCase().indexOf(y.toUpperCase())?x.push(v):Q.hasClass("sa-ctrl-switcher_on")&&0<=v.getCommentInfo().toUpperCase().indexOf(y.toUpperCase())&&x.push(v)}else{Q=!0;for(var E=v.getChildren(),k=0;k<E.length;k++){var I=M(E[k],y);I&&0<I.length&&(Q&&(x.push(v),Q=!1),
x=x.concat(I))}}return x},va=function(v){O&&c(!1);(O=v)&&c(!0);var y=ra[v];y?m(y,v)||p(y):q(v)},h=function(v){var y=F.getPreviewTable();Ea.clear(y);if(v){for(var x=Ea.createHeadRow(y),Q=v.getFields(),E=Q.length,k=0;k<E;k++){var I=Q[k];y.addColumn(I.getName()).setWidth(100);x.getCell(k).setValue(I.getAlias())}E=v.getData();x=E.length;k=0;for(I=Math.min(x,10);k<I;k++)for(var ba=E[k],da=Ea.createRow(y),V=0;V<ba.length;V++){var T=ba[V];da.getCell(V).setValue(T)}k=10<x;Q=50<=Q.length;0==x?(Q=J.get("noData",
"\u6ca1\u6709\u6570\u636e"),d(Q)):k||Q?!k&&Q?(Q=J.get("totalRows","\u603b\u5171#1\u884c\u6570\u636e").replace("#1",x),Q+=J.get("comma","\uff0c")+J.get("dataShownCols","\u4ec5\u9884\u89c8\u524d#1\u5217\u6570\u636e").replace("#1",50),d(Q,x)):(k&&!Q?(Q=J.get("loadingTotalRows","\u6b63\u5728\u8ba1\u7b97\u603b\u884c\u6570\uff0c\u8bf7\u7a0d\u5019...."),d(Q,x),Q=J.get("dataShownRows","\u4ec5\u9884\u89c8\u524d#1\u884c\u6570\u636e").replace("#1",10)):(Q=J.get("loadingTotalRows","\u6b63\u5728\u8ba1\u7b97\u603b\u884c\u6570\uff0c\u8bf7\u7a0d\u5019...."),
d(Q,x),Q=J.get("dataShownRowsAndCols","\u4ec5\u9884\u89c8\u524d#1\u884c\u3001\u524d#2\u5217\u6570\u636e"),Q=Q.replace("#1",10),Q=Q.replace("#2",50)),Q=J.get("totalRows","\u603b\u5171#1\u884c\u6570\u636e")+J.get("comma","\uff0c")+Q,l(v.getTableName(),Q)):(Q=J.get("totalRows","\u603b\u5171#1\u884c\u6570\u636e").replace("#1",x),d(Q,x))}Ea.refresh(y)},d=function(v,y){var x=F.getPreviewTable(),Q=10;y&&10>y&&(Q=y);x.getRowsCount()-Ea.getHeadRowCount()==Q||0==x.getRowsCount()-Ea.getHeadRowCount()?(y=Ea.createRow(x),
y.getCell(0).setValue(v),v=new KTStyle,v.setBackgroundColor(com.kingdee.bos.qing.common.CommonTableSkin.ODD_ROW_BACKGROUND_COLOR),y.setStyle(v),v=new KTStyle,v.setTextAlign("left"),y.getCell(0).setStyle(v),Ea.refresh(x)):x.getRowsCount()-Ea.getHeadRowCount()==Q+1&&(y=x.getRowsCount()-1,x.getRow(y).getCell(0).setValue(v),Ea.refresh(x))},l=function(v,y){var x=Fa[v];x?(y=y.replace("#1",x),d(y,x)):(x=nb.createQueryFacade(function(Q){O==v&&(Fa[v]=Q,y=y.replace("#1",Q),d(y,Q))},function(Q,E){y=J.get("loadingTotalRowsError",
"\u83b7\u53d6\u603b\u884c\u6570\u5931\u8d25");d(y);return!0}),x.setShowBlocking(!1),x.getEntityDataCount(v))},m=function(v,y){if(0==v.getFields().length){n.getMessageCurtain().showPrompt(J.get("noDataAndUnableToSelect","\u8be5\u8868\u6ca1\u6709\u6570\u636e\uff0c\u65e0\u6cd5\u88ab\u9009\u4e2d\u3002"));v=f.find("[table-name='"+Cb.encode(y)+"']");var x=v.find(".extreport-dataset-designer-select-entity-table-item-component"),Q=x.data("model");Q&&(Q.isChecked()&&(Z.setChecked(!0),Q.setEnabled(!1)),aa[y]=
!0);v.find(".extreport-dataset-designer-select-entity-table-item-text").css("color","#c0c0c0");x.data("object");Xa=null;h(null);ob(J.get("noDataAndUnableToSelect","\u8be5\u8868\u6ca1\u6709\u6570\u636e\uff0c\u65e0\u6cd5\u88ab\u9009\u4e2d\u3002"),b.find(".extreport-dataset-designer-select-entity-preview-table"),10);return!0}return!1},p=function(v){h(null);Y(b.find(".extreport-dataset-designer-select-entity-preview-table"));F.getCheckBoxIsChecked()&&h(v)},q=function(v){F.getCheckBoxIsChecked()&&(h(null),
ob(J.get("loadingPreviewData","\u6b63\u5728\u83b7\u53d6\u9884\u89c8\u6570\u636e\uff0c\u8bf7\u7a0d\u5019\u2026\u2026"),b.find(".extreport-dataset-designer-select-entity-preview-table"),10));if(!kb[v]){kb[v]=!0;var y=nb.createQueryFacade(function(x){kb[v]=!1;var Q=new Bb;x&&Q.fromJsonObject(x);ra[v]=Q;O==v&&!m(Q,v)&&F.getCheckBoxIsChecked()&&(Y(b.find(".extreport-dataset-designer-select-entity-preview-table")),h(Q))},function(x,Q){kb[v]=!1;return O==v?(Y(b.find(".extreport-dataset-designer-select-entity-preview-table")),
!1):!0});y.setShowBlocking(!1);y.getEntityPreviewData(v)}},c=function(v){var y=$(r.getJqUi()).parent().find("[table-name='"+Cb.encode(O)+"']"),x=y.find(".extreport-dataset-designer-select-entity-table-item-component"),Q=y.find(".extreport-dataset-designer-select-entity-table-item");if(x=x.data("object"))x=x.getType(),y=y.find(".extreport-dataset-designer-select-entity-table-item-icon"),v?(Q.addClass("extreport-dataset-designer-select-entity-table-item_selected"),la.background(y,x+"_head_selected")):
v||(Q.removeClass("extreport-dataset-designer-select-entity-table-item_selected"),la.background(y,x+"_head"))},D=function(){f.empty();ob(J.get("loadingData","\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019\u2026\u2026"),f,20);var v=function(x,Q){G.push(x);var E=x.getCommentInfo();E&&E==Q&&(O=x.getName());if(x instanceof wa&&(x=x.getChildren()))for(E=0;E<x.length;E++)v(x[E],Q)},y=nb.createQueryFacade(function(x){var Q=new wa;Q.fromJsonObject(x);var E;Ya&&(x=Ya.model.getDataSource())&&x.getName()&&(E=x.getName());
Q=Q.getChildren();for(x=0;x<Q.length;x++)v(Q[x],E);C=G;0<G.length&&(h(null),r=new W,r.addSearchListener(N),r.setPlaceholder(n.getTableSearchBoxPlaceholder(!1)),r.setShowSearchIcon(!0),r.setFontSize(12),E=r.getJqUi(),E.addClass("extreport-dataset-designer-select-entity-searchbox"),a.prepend(E));N(!0);E=new Sa;E.setJqLeftPane(a);Q=J.get("displayEntityMark","\u663e\u793a\u5b9e\u4f53\u6807\u8bc6");E.displayEntityCodingPane(".extreport-dataset-designer-select-entity-table-item-text",".extreport-dataset-designer-select-entity-table-item-name",
Q,".extreport-dataset-designer-select-entity-table-item",n.setTableSearchBoxPlaceholder)},function(x,Q){return 8077E3<x?(nb.getMessageCurtain().showPrompt(Q,5E3),!0):!1});y.setShowBlocking(!1);y.getUsableEntities()},H=function(){if(F.getCheckBoxIsChecked()){$(F.getPreviewTable().getUI()).show();var v=ra[O];v&&p(v)}else $(F.getPreviewTable().getUI()).hide()},L=function(){nb.removeWindowResizeListener(X)},X=function(){F&&Ea.refresh(F.getPreviewTable())},ua=function(){var v=new Da;v.setHorizontalSplit(!0);
v.setEnabled(!0);v.setFirstSize(200,185,300);v.setSecondSize(550,0,-1);v.setResizeMode(Da.RESIZE_MODE_FIRST_FIXED);v.setFirstChild(Da.createChildWrapper(a));v.setSecondChild(Da.createChildWrapper(b,function(){F.relayoutViews()}));v.getJqUi().appendTo(g)},ia=function(v){v=$(v.currentTarget);v=Cb.decode(v.attr("table-name"));O!=v&&va(v)},z=function(v,y){var x=v.getJqUi().data("object");y&&(v.isChecked()?(Xa&&Xa.setChecked(!1),Xa=v,O=x.getName(),va(O)):Xa&&!Xa.isEnabled()&&(Xa=null))}}U.call(this,oa,
nb);this.protectedInit=function(Ya){var ca=Xb(J.get("entity","\u4e1a\u52a1\u5b9e\u4f53"));ca.addClass("extreport-dataset-designer-text-ellipsis");fa.layoutCtrl(ca,null,null,60,null);ca.appendTo(Ya);ca=Xb(J.get("entityTable","\u5b9e\u4f53\u7ed3\u6784"));fa.layoutCtrl(ca,null,65,null,null);ca.appendTo(Ya)};this.protectedCreateDataSourceSelectPane=function(Ya){return new Ub(Ya)};this.protectedSyncModel=function(Ya,ca){(Ya=Ya.getDataSource())&&ca.setEntityName(Ya.getName())}}function Za(oa,nb){var Ub=
this,Ya,ca=[],Sa,e,n,g,a,f,b,t,r;this.initOutputTable=function(){Sa||(Sa=$("<div>"),Sa.addClass("extreport-dataset-designer-output-fieldtable"),Sa.appendTo(nb));Ya=new KTable;Ya.setDraggableAdjusting(!0,3,0,new Ua);Ea.bindTextEditor(Ya,kb,Y);var u=new Fa(Ya);u.setOutsideVisible(!1);Ya.setCellRender(u);Ya.addColumns(3);Ya.getColumn(0).setWidth(250);Ya.getColumn(1).setWidth(250);Ya.getColumn(2).setWidth(250);u=Ea.createHeadRow(Ya);u.getCell(0).setValue(J.get("fieldName","\u5b57\u6bb5\u540d\u79f0"));
u.getCell(1).setValue(J.get("displayName","\u663e\u793a\u540d\u79f0"));u.getCell(2).setValue(J.get("dataType","\u6570\u636e\u7c7b\u578b"));u=$(Ya.getUI());fa.layoutCtrlWithLRTB(u,10,1,null,10,10,null);u.appendTo(Sa);oa.addListener(Ka.OUTPUT_AREA_SHOW_EXP,function(P){P?Ub.showNoFieldExceptionUi():(Ub.showTableUi(),Ub.addOutputRefreshMasking())});oa.addListener(Ka.OUTPUT_AREA_REFRESH,function(P){if(P.isPreview)var N=P.funCallback;B(N)})};this.setDataSetModel=function(u){r=u};this.model2Ui=function(u){var P=
r.getException(hb.OUTPUT_COLUMN);if(P){u=!1;var N=r.getException(hb.OUTPUT_COLUMN,Va.OUTPUT_COLUMN_NAME_DUPLICATED);N||(N=r.getException(hb.OUTPUT_COLUMN,Va.OUTPUT_COLUMN_KSQL_DISABLE_SELECT_ALL),N||(N=r.getException(hb.OUTPUT_COLUMN,Va.OUTPUT_COLUMN_FIELD_CHANGED),u=!0));N?(u&&F(),Xa(N,u)):aa(P)}else F(u)};var F=function(u){var P=r.getOutputColumns();if(P&&0<P.length){var N;a:{if((N=ca)&&P){if(N.length!=P.length){N=!0;break a}for(var M=0;M<P.length;M++){var va=P[M],h=N[M];if(va.getName()!=h.getName()||
va.getDataType()!=h.getDataType()){N=!0;break a}}}N=!1}ca=P;O();(N||u)&&C()}},B=function(u){var P=oa.collectJsonModel(!1);if(P){C();e&&e.hide();ra(J.get("loadingOutputData","\u6b63\u5728\u83b7\u53d6\u8f93\u51fa\u5b57\u6bb5\uff0c\u8bf7\u7a0d\u5019\u2026\u2026"));var N=oa.createQueryFacade(function(M){r.clearException(hb.OUTPUT_COLUMN);n&&n.hide();var va=new bb;va.fromJsonObject(M);M=va.getDataSetModel();(va=M.getException(hb.OUTPUT_COLUMN,Va.OUTPUT_COLUMNS_NAME_EXP))&&oa.getMessageCurtain().showPrompt(va);
if(M=M.getOutputColumns()){var h=ca;va={};for(var d=0;d<h.length;d++){var l=h[d],m=l.getName();l=l.getAlias();va[m]=l}ca=[];for(h=0;h<M.length;h++)d=new Ta(r),d.fromJsonObject(M[h].toJsonObject()),(m=va[d.getName()])&&d.setAlias(m),ca[h]=d;r.setOutputColumns(ca)}setTimeout(function(){O();u&&u()},0)},function(M,va,h){n&&n.hide();8099101==M||8099007==M||8077016==M||8077020==M||8077021==M||8077022==M||8077023==M||8077017==M||8077018==M||8077019==M?(oa.fireEvent(Ka.DATASOURCE_AREA_SHOW_EXP,va),Ub.showNoFieldExceptionUi()):
8077014==M||8077015==M||8077024==M?Xa(va,8077024==M):aa(h);r.clearException(hb.OUTPUT_COLUMN);r.addException(hb.OUTPUT_COLUMN,M,J.get("getOutputColErr","\u5237\u65b0\u8f93\u51fa\u5b57\u6bb5\u5f02\u5e38\u3002"));return!0});N.setShowBlocking(!1);N.getOutputColumns(r.getDataSetId(),P)}};this.showNoFieldExceptionUi=function(){C();if(!e){e=$("<div>");e.appendTo(nb);e.addClass("extreport-dataset-designer-output-fieldtable");var u=$("<div>");u.appendTo(e);var P=$("<div>");P.appendTo(u);la.background(P,"notable");
fa.layoutCtrlCenterAlign(P,150);fa.layoutCtrlMiddleAlign(P,150);fa.layoutCtrl(P,null,null,null,86);P=$("<div>");var N=r&&r.getDataSetType()==Oa.OQL_DATA_SET?J.get("noEntityField","\u4e1a\u52a1\u5b9e\u4f53\u5b58\u5728\u9519\u8bef\uff0c\u65e0\u6cd5\u5237\u65b0\u8f93\u51fa\u5b57\u6bb5"):J.get("noTableField","\u6570\u636e\u6e90\u5b58\u5728\u9519\u8bef\uff0c\u65e0\u6cd5\u5237\u65b0\u8f93\u51fa\u5b57\u6bb5");P.text(N);fa.layoutCtrlCenterAlign(P,200);fa.layoutCtrlMiddleAlign(P,20);fa.layoutCtrl(P,"52%",
"70%",210,null);P.css({"text-align":"center"});P.appendTo(u);fa.layoutCtrlCenterAlign(u,210);fa.layoutCtrlMiddleAlign(u,210)}Sa&&Sa.hide();e.show()};this.showTableUi=function(){e&&e.hide();Sa&&Sa.show()};this.addOutputRefreshMasking=function(){C();b||Z();b.show()};this.resize=function(){O()};this.hideBorderRight=function(){e&&e.addClass("extreport-dataset-designer-hidden-border-right");Sa&&Sa.addClass("extreport-dataset-designer-hidden-border-right")};this.showBorderRight=function(){e&&e.removeClass("extreport-dataset-designer-hidden-border-right");
Sa&&Sa.removeClass("extreport-dataset-designer-hidden-border-right")};var Z=function(){b=$("<div>");b.addClass("extreport-output-fieldtable-darkmask");b.appendTo($(Ya.getUI()));var u=$("<div>");u.text(J.get("refreshOutputData","\u70b9\u51fb\u6b64\u5904\u5237\u65b0\u8f93\u51fa\u5b57\u6bb5\u3002"));u.on("click",function(P){B()});u.addClass("extreport-output-fieldtable-darkmask-button");u.appendTo(b)},Xa=function(u,P){C();g||G();P?(a.text(u),u=$("<span>"),u.text(J.get("comma","\uff0c")+J.get("youCan",
"\u60a8\u53ef\u4ee5")),u.appendTo(a),P=$("<span>"),P.text(J.get("refreshWithBlank"," \u5237\u65b0 ")),P.addClass("extreport-error-darkmask-button"),P.on("click",function(N){B()}),P.appendTo(u),P=$("<span>"),P.text(J.get("outputColumn","\u8f93\u51fa\u5b57\u6bb5")+J.get("fullStop","\u3002")),P.appendTo(u),u.show()):a.text(u+J.get("cantRefreshOutputFields","\uff0c\u65e0\u6cd5\u5237\u65b0\u201c\u8f93\u51fa\u5b57\u6bb5\u201d\u3002"));a.show();f.hide();g.show()},aa=function(u){t=u;C();g||G();a.text(J.get("execError",
"\u201c\u67e5\u8be2\u8bed\u53e5\u201d\u6267\u884c\u5931\u8d25\uff0c\u65e0\u6cd5\u5237\u65b0\u201c\u8f93\u51fa\u5b57\u6bb5\u201d\u3002"));a.show();f.show();g.show()},G=function(){g=$("<div>");g.addClass("extreport-output-fieldtable-error-darkmask");g.appendTo($(Ya.getUI()));var u=$("<div>");u.addClass("extreport-output-fieldtable-error-darkmask-text");u.appendTo(g);a=$("<p>");a.text(J.get("execError","\u201c\u67e5\u8be2\u8bed\u53e5\u201d\u6267\u884c\u5931\u8d25\uff0c\u65e0\u6cd5\u5237\u65b0\u201c\u8f93\u51fa\u5b57\u6bb5\u201d\u3002"));
a.appendTo(u);f=$("<span>");f.text(J.get("youCan","\u60a8\u53ef\u4ee5"));f.appendTo(u);u=$("<span>");u.text(J.get("moreDetailBlank"," \u67e5\u770b\u8be6\u7ec6 "));u.addClass("extreport-error-darkmask-button");u.on("click",function(P){Na(t,J.get("execError2","\u67e5\u8be2\u8bed\u53e5\u6267\u884c\u5931\u8d25\uff0c\u8bf7\u4fee\u6539\u67e5\u8be2\u8bed\u53e5"))});u.appendTo(f);u=$("<span>");u.text(J.get("or","\u6216"));u.appendTo(f);u=$("<span>");u.text(J.get("refreshWithBlank"," \u5237\u65b0 "));u.addClass("extreport-error-darkmask-button");
u.on("click",function(P){B()});u.appendTo(f);u=$("<span>");u.text(J.get("outputColumn","\u8f93\u51fa\u5b57\u6bb5")+J.get("fullStop","\u3002"));u.appendTo(f)},C=function(){b&&b.hide();g&&g.hide()},O=function(){Ya||Ub.initOutputTable();Ea.clearWithoutHead(Ya);if(ca)for(var u=0,P=ca.length;u<P;u++){var N=Ea.createRow(Ya);N.getCell(0).setValue(ca[u].getName());N.getCell(1).setValue(ca[u].getAlias());N.getCell(2).setValue(ca[u].getDataType());N.setUserObject(ca[u])}Ya.setSyncUIWhenModelChanged(!0);Ea.refresh(Ya)},
ra=function(u){if(!n){var P=$(Ya.getUI());n=$("<div>");n.addClass("extreport-output-fieldtable-darkmask");var N=$("<div>");N.addClass("extreport-output-fieldtable-datapreview-waiting");N.html(u);N.appendTo(n);n.appendTo(P)}n.show()},Fa=function(u){KTDefaultCellRender.call(this,u);var P=this,N=this.paintCellUI;this.paintCellUI=function(M,va){var h=P.getCurrentRowIdx(),d=P.getCurrentColIdx();P.getCurrentRow();var l=P.getCell();h<Ea.getHeadRowCount()?N(M,va):(M=$(M),1===d?(l=l.getValue(),M.attr("title",
l),d=$("<div>"),d.text(l),d.addClass("extreport-dataset-designer-fieldtable-editable"),M.empty(),M.append(d),M.css("cursor","pointer")):(va=l=l.getValue(),2===d&&(d=Vb.dataTypeToName(l))&&d!=l&&(va=d+J.get("leftBracket","\uff08")+l+J.get("rightBracket","\uff09")),M.attr("title",va),d=$("<div>"),d.text(va),d.addClass("extreport-dataset-designer-fieldtable-cell"),M.empty(),M.append(d),M.css("cursor","default")))}},kb=function(u,P){return 1===P},Y=function(u,P,N,M,va){u=u.getUserObject();P=r.getDataSetType()==
Oa.OQL_DATA_SET;if(M&&0!=M.length){if(!P&&32<M.length)return N=J.get("nameTooLong32","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc732\u4e2a\u5b57\u7b26"),oa.getMessageCurtain().showPrompt(ob(N,va)),!1;if(P&&!rb.isValidString(M,/^([\u4E00-\u9FA5a-zA-Z_])[\u4E00-\u9FA5a-zA-Z0-9_\.]{0,}$/)||!P&&!rb.isValidString(M))return N=J.get("invalidName","\u540d\u79f0\u53ea\u80fd\u7531\u6c49\u5b57\u3001\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934"),
oa.getMessageCurtain().showPrompt(ob(N,va)),!1;P=0;for(var h=ca.length;P<h;P++){var d=ca[P],l=d.getAlias();if(u!=d&&l&&M.toLowerCase()==l.toLowerCase())return N=J.get("duplicatedName","\u91cd\u590d\u7684\u663e\u793a\u540d\u79f0\uff1a")+M,oa.getMessageCurtain().showPrompt(ob(N,va)),!1}}else return N=J.get("nameEmpty","\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a"),oa.getMessageCurtain().showPrompt(ob(N,va)),!1;N.setValue(M);u.setAlias(M);return!0},ob=function(u,P){return u=P?u+J.get("fullStop","\u3002"):u+
J.get("abandonModify","\uff0c\u5df2\u653e\u5f03\u4fee\u6539\u3002")}}function zb(oa,nb,Ub){var Ya=this,ca,Sa,e=!1,n,g,a=[],f=[],b="",t,r=[],F=[],B,Z,Xa;this.init=function(){if(!e){var N=aa();t=new W;t.setPlaceholder(J.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));t.setShowSearchIcon(!0);t.setSearchListenerDelay(1E3);t.addSearchListener(G);t.setFontSize(12);Sa=t.getJqUi();Sa.addClass("extreport-dataset-designer-var-select-filter-searchBox");Sa.addClass("extreport-dataset-designer-left-border");
ca=C();ca.addClass("extreport-dataset-designer-left-border");N.on("click",function(){Ya.loadMacroAndSystemVar(n.searchVarMenu,Xa)});N.appendTo(Ub);ca.appendTo(nb);Sa.appendTo(nb);e=!0}};var aa=function(){var N=$("<div>");N.attr("title",J.get("refresh","\u5237\u65b0"));N.css({cursor:"pointer"});la.backgroundWithHover(N,"refresh");fa.layoutCtrlWithLRTB(N,null,4,16,1,null,16);return N},G=function(){b=t.getText().trim().toLowerCase();Ya.searchListener()};this.resize=function(){e&&n&&n.updateUi()};this.searchListener=
function(){g=[];Fa();kb(n.searchVarMenu,Xa)};var C=function(){n=new P;n.setTreeVarModel(g);n.setMessageCurtain(void 0);n.setGlobal(oa);n.setLoadVarNameListener(u);n.setCheckMacroPerm(Y);var N=n.getJqUi();N.addClass("extreport-dataset-designer-var-select-tree-data");N.addClass("extreport-dataset-designer-bottom-border");return N};this.loadMacroAndSystemVar=function(N,M){O(function(){ra(N,M)})};var O=function(N){g=[];var M=oa.createQueryFacade(function(va){F=[];a=[];if(0<va.length){F=va;for(var h=0;h<
va.length;h++){var d=new Qa;d.fromJsonObject(va[h]);a.push(d.getName())}}Fa();oa.fireEvent(Ka.QUERY_AREA_ADD_AT_HINT_TYPE,{hint:a,type:"sysVar"})},function(va,h){return 8077E3<va?(oa.getMessageCurtain().showPrompt(h,5E3),!0):!1},function(){N&&N()});M.setShowBlocking(!1);M.loadSystemVar()},ra=function(N,M){var va=oa.createMacroManageFacade(function(h){r=[];f=[];if(0<h.length){r=h;for(var d=0;d<h.length;d++){var l=new R;l.fromJsonObject(h[d]);l.isUsable()&&f.push(l.getUid())}}kb(N,M);oa.fireEvent(Ka.QUERY_AREA_SET_DOLLAR_HINT_TYPE,
f)},function(h,d){return 8077E3<h?(oa.getMessageCurtain().showPrompt(d,5E3),!0):!1});va.setBlockingJqUi(nb);va.loadAllMacros()},Fa=function(){if(0<F.length){Z=new Qa;Z.setDisPlayName(J.get("systemVar","\u7cfb\u7edf\u53d8\u91cf"));for(var N=Z.getChildren(),M=0;M<F.length;M++){var va=new Qa;va.fromJsonObject(F[M]);var h=va,d=b,l=!1,m=h.getName();h=h.getText();if(m&&-1<m.toUpperCase().indexOf(d.toUpperCase())||h&&-1<h.toUpperCase().indexOf(d.toUpperCase()))l=!0;l&&(va.setParentNode(Z),N.push(va))}0==
N.length&&(Z=null);ob(g,Z)}},kb=function(N,M){if(0<r.length){B=new R;B.setDisPlayName(J.get("macroVar","\u5b8f\u53d8\u91cf"));B.setLevel(0);var va=new R;va.setDisPlayName(J.get("singleMacro","\u5355\u503c\u5b8f"));va.setLevel(1);var h=new R;h.setDisPlayName(J.get("multiMacro","\u591a\u503c\u5b8f"));h.setLevel(1);var d=B.getChildren();d.push(va);d.push(h);va.setParentNode(B);h.setParentNode(B);va=B.getChildren();h=[];d=[];for(var l=va[0],m=va[1],p=0;p<r.length;p++){var q=new R;q.fromJsonObject(r[p]);
q.isUsable()&&f.push(q.getUid());q.setDisPlayName(q.getName()+"("+q.getUid()+")");q.setLevel(2);var c=q,D=b,H=!1,L=c.getName();c=c.getUid();if(L&&-1<L.toUpperCase().indexOf(D.toUpperCase())||c&&-1<c.toUpperCase().indexOf(D.toUpperCase()))H=!0;H&&(q.isMultiValued()?(d.push(q),q.setParentNode(m)):(h.push(q),q.setParentNode(l)))}0<h.length?l.setChildren(h):va.splice(0,1);0<d.length?m.setChildren(d):2==va.length?va.splice(1,1):va.splice(0,1);0==va.length&&(B=null);ob(g,B)}M&&M(g);N&&N()},Y=function(N){var M=
oa.createMacroManageFacade(function(va){N&&N(va)},function(va,h){return 8077E3<va?(oa.getMessageCurtain().showPrompt(h,5E3),!0):!1});M.setBlockingJqUi(nb);M.checkMacroPermission()},ob=function(N,M){if(null!=M)if(Array.isArray(M))for(var va=0;va<M.length;va++)N.push(M[va]),ob(N,M[va].getChildren());else N.push(M),ob(N,M.getChildren())},u=function(N){Xa=N;g?N(g):Ya.loadMacroAndSystemVar(n.searchVarMenu,N)},P=function(){var N=this,M,va,h,d,l,m,p,q;this.getJqUi=function(){M||(M=N.init());return M};this.setGlobal=
function(k){p=k};this.init=function(){var k=$("<div>");m=gc(k,J.get("noVariant","\u6682\u65e0\u53d8\u91cf"));m.hide();h||(l(D),d(c));va=new fb;va.setBorderVisible(!1);va.scrollSelectedToVisible();va.setCustomItemPainter(ua);va.addSelectedChangedListener(Q);va.setUserObject(h);va.setItemModels(h);va.setCustomSelectedsPainter(X);k.append(va.getJqUi());return k};var c=function(k){h=[];N.resetItemModels(k)},D=function(k){q=k};this.resetItemModels=function(k){h=k;va.setUserObject(h);va.setItemModels(h);
N.refreshList(va.getUserObject());k=H(h);va.setSelecteds([]);va.setSelecteds(k)};var H=function(k){var I=[],ba;for(ba in k){var da=k[ba];if(da instanceof Qa&&1==da.getLevel()){I.push(da);break}if(da instanceof R&&da.getUid()){I.push(da);break}}return I};this.searchVarMenu=function(){h&&0!=h.length&&(null!=b&&""!=b||L(va.getUserObject()),0<h.length?L(h):N.refreshList(va.getUserObject()))};var L=function(k){for(var I in k){var ba=k[I];if(!ba.getShowFolderNode()){ba.setShowFolderNode(!0);for(var da=
ba.getParentNode();da;)da.setShowFolderNode(!0),da.setIsOpenDir(!0),ba=da,da=da.getParentNode();E(ba)}}k=H(k);N.jumpToTheSelected(k[0])};this.jumpToTheSelected=function(k){N.refreshList(va.getUserObject());va.setSelecteds([]);va.setSelecteds([k]);va.scrollSelectedToVisible(k)};var X=function(k,I){I&&0<I.length&&(k&&0<k.length&&(k=k[0].find(".extreport-dataset-designer-var-preview-icon"),la.backgroundWithHover(k,"btn_preview")),k=I[0].find(".extreport-dataset-designer-var-preview-icon"),la.backgroundWithHover(k,
"btn_preview_selected"))},ua=function(k,I){k.addClass("extreport-dataset-designer-var-lists-dir");var ba=$("<div>"),da=I.getDisPlayName();ba.css("margin-left",6*I.getLevel()+"px");ia(k,I,ba);var V=I instanceof Qa;if(V=V&&0==I.getLevel()||!V&&1>=I.getLevel())ba.css({cursor:"default"}),fb.undressItem(k);var T=$("<div>");T.addClass("extreport-dataset-designer-var-lists-dir-opt-icon");T.css("margin-left",6*I.getLevel()+"px");T.data("oItemModel",I);var S=z(I,k,ba),ma=y(),na=v();I instanceof R&&0==I.getLevel()&&
(k.append(ma),q?(la.backgroundWithHover(ma,"macromanage"),ma.addClass("extreport-dataset-designer-var-macromanage-icon")):(la.background(ma,"macromanage"),ma.addClass("extreport-dataset-designer-var-macromanage-icon-disabled")));I.getShowFolderNode()?(k.show(),T.on("mousedown",function(qa){qa.stopPropagation();if(qa=$(qa.currentTarget).data("oItemModel")){if(qa.getChildren()&&0<qa.getChildren().length){var La=qa.getIsOpenDir();qa.setIsOpenDir(!La)}else qa.setIsOpenDir(!0);E(qa);N.refreshList(va.getUserObject());
qa=va.getSelecteds();va.setSelecteds([]);va.setSelecteds(qa)}})):k.hide();ma=I.getIsOpenDir();V&&(ma?x(!0,T):x(!1,T));0<I.getChildren().length?(ba.text(da),k.append(T)):(I instanceof Qa?k.append(S):I instanceof R&&(I.isUsable()?k.append(S):k.append(na)),K.highlightKeyWords(ba,b,da));da=I instanceof R&&!I.isUsable();if(!V&&!da){var pa=ba.width();k.on("mouseenter",function(qa){qa=k.width()-60;pa=ba.width();ba.css("width",qa)});k.on("mouseleave",function(qa){ba.css("width",pa)})}k.append(ba);I==va.getSelecteds()[0]&&
(k.addClass("extreport-dataset-designer-var-lists-item-selected"),k.addClass("sa-ctrl-list-item_selected_enabled"),T.addClass("extreport-dataset-designer-var-lists-dir-opt-icon-selected"));k.on("dblclick",function(qa){var La;I.getUid&&I.isUsable&&1<I.getLevel()?I.isUsable()&&(La="$"+I.getUid()):!(I instanceof R)&&0<I.getLevel()&&(La="@"+I.getName());La&&p.fireEvent(Ka.QUERY_AREA_INSERT_TYPE,La)})},ia=function(k,I,ba){1<I.getLevel()?I.isUsable()?ba.addClass("extreport-dataset-designer-var-lists-dir-text"):
(ba.addClass("extreport-dataset-designer-var-lists-dir-text-noperm"),fb.undressItem(k)):ba.addClass("extreport-dataset-designer-var-lists-dir-text")},z=function(k,I,ba){var da=$("<div>");da.addClass("extreport-dataset-designer-var-preview-icon");la.backgroundWithHover(da,"btn_preview");da.attr("title",J.get("preview","\u9884\u89c8"));da.on("click",function(V){V.stopPropagation();k instanceof R?(V=new A(p,k,!0),V.setFunPreviewCallback(function(T){T||(k.setMacroStatus(null),ba.addClass("extreport-dataset-designer-var-lists-dir-text-noperm"),
I.prepend(v()),fb.undressItem(I))})):V=new A(p,k);V.showDialog()});return da},v=function(){var k=$("<div>");k.addClass("extreport-dataset-designer-var-macroperm-icon");la.background(k,"macronoperm");k.attr("title",J.get("previewNoPerm","\u5f02\u5e38\u5b8f\u53d8\u91cf\u65e0\u6cd5\u5728\u67e5\u8be2\u8bed\u53e5\u4e2d\u4f7f\u7528\u3002"));return k},y=function(){var k=$("<div>");k.attr("title",J.get("macroManager","\u5b8f\u5b9a\u4e49"));k.on("click",function(I){I.stopPropagation();if(q){var ba=Ja.decodeParamFromUrl(location.search,
"path");ba=ba?ba:"/ierp";I=Ra.getUrlParamValue();var da=Ab.getUrlParamValue("language");ba=Ja.appendParamToUrl(ba+"/qing/macroDesignerEntrance.do","appID","qing_rpt");ba=Ja.appendParamToUrl(ba,"language",da);I&&(ba=Ja.appendParamToUrl(ba,"skin",I));eb.openNewTab(J.get("macroManager","\u5b8f\u5b9a\u4e49"),ba)}});return k},x=function(k,I){var ba=document.createElement("div"),da=$(ba);da.text("\u25b2");da.addClass("extreport-dataset-designer-header-expand");da.removeClass(k?"extreport-dataset-designer-header-expand_able":
"extreport-dataset-designer-header-expand_ed");da.addClass(k?"extreport-dataset-designer-header-expand_ed":"extreport-dataset-designer-header-expand_able");$(ba).appendTo(I);k&&(k=parseInt(I.css("margin-left")),I.css({"margin-left":k+2+"px"}))},Q=function(k,I,ba){if(k=ba[0]){ba=va;I=I[0];var da=ba.getJqUi().find(".extreport-dataset-designer-var-lists-item-selected");da&&(da.removeClass("extreport-dataset-designer-var-lists-item-selected"),da=da.find(".extreport-dataset-designer-var-lists-dir-opt-icon-selected"),
I&&x(I.getIsOpenDir(),da),da&&0<da.length&&(da.removeClass("extreport-dataset-designer-var-lists-dir-opt-icon-selected"),da.css("color","rgb(138, 158, 191)")));if(ba=ba.getItemUiByModel(k))I=ba.find(".extreport-dataset-designer-var-lists-dir-opt-icon"),ba.addClass("sa-ctrl-list-item_selected_enabled"),ba.addClass("extreport-dataset-designer-var-lists-item-selected"),x(k.getIsOpenDir(),I),I.addClass("extreport-dataset-designer-var-lists-dir-opt-icon-selected"),I.css("color","white"),k.getChildren()&&
0>=k.getChildren().length&&x(!0,I)}},E=function(k){if(null!=k&&(k=k.getChildren())&&0<k.length)for(var I=0;I<k.length;I++)k[I].getParentNode().getIsOpenDir()&&k[I].getParentNode().getShowFolderNode()?k[I].setShowFolderNode(!0):k[I].setShowFolderNode(!1),E(k[I])};this.refreshList=function(k){var I=M.find(".sa-ctrl-list-owner");I.empty();if(1>=k.length)I=J.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"),k=m.find("#noDataText"),k.text(I),I=12*I.length,fa.layoutCtrlCenterAlign(k,
160<I?160:I),m.show();else{m.hide();for(var ba=$(document.createDocumentFragment()),da=ua,V=0;V<k.length;V++){var T=$("<div>");T.addClass("sa-ctrl-list-item");T.addClass("sa-ctrl-list-item_enabled");T.addClass("sa-ctrl-list-item-defaultlayout");var S=k[V];T.data("model",S);da(T,S);ba.append(T)}I.append(ba)}};this.updateUi=function(){var k=M.find(".sa-ctrl-list-owner");k.find(".extreport-dataset-designer-var-lists-dir-text-noperm").css({width:"70%"});k.find(".extreport-dataset-designer-var-lists-dir-text").css({width:"85%"})};
this.setTreeVarModel=function(k){h=k};this.setMessageCurtain=function(k){};this.setLoadVarNameListener=function(k){d=k};this.setCheckMacroPerm=function(k){l=k}}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});var Tb=com.kingdee.bos.extreport.datasetdesigner,
Ab,Ra,Ja,fa,Cb,pb,Ea,Gb,J,eb,db,Ma,ea,W,za,ya,Da,Jb,Ib,Pa,vb,tb,fb,gb,Wa,Ka,rb,Ga,la,ib,Ua,K,A,Na,bb,Oa,hb,Va,Ba,Ta,wa,wb,Ob,Mb,Bb,Aa,Hb,Fb,ec,Ha,cb,ub,Qa,R,dc,bc,Vb,Pb;(function(){var oa=com.kingdee.bos.qing;Ab=oa.Seer;Ra=oa.SkinUtil;oa=com.kingdee.bos.qing.common;Ja=oa.Util;fa=oa.DomUtil;Cb=oa.Base32Util;pb=oa.TextMeasurer;oa=com.kingdee.bos.qing.common.ui;Ea=oa.TableUtil;Gb=oa.CommonIconUtil;oa=com.kingdee.bos.qing.framework.common;J=oa.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);
eb=oa.TabbedUiUtil;db=oa.OfficialArticleUtil;Ma=oa.GlobalFont;oa=com.kingdee.bos.qing.ui.component;ea=oa.ComboBox;za=oa.AbstractModalDialog;ya=oa.TextField;Da=oa.SplitPane;Jb=oa.HelpIcon;Ib=oa.RadioButton;Pa=oa.RadioButtonGroup;vb=oa.WorkButton;tb=oa.Label;fb=oa.List;gb=oa.CheckBox;Wa=oa.SwitchButton;oa=com.kingdee.bos.extreport.datasetdesigner.common;Ka=oa.EventType;rb=oa.StringUtil;Ga=oa.LanguageUtil;la=com.kingdee.bos.extreport.datasetdesigner.Icons;oa=com.kingdee.bos.extreport.datasetdesigner.common.ui;
ib=oa.AbstractDataSetTabPane;Ua=oa.TableCustomExpandor;W=oa.SearchBox;K=oa.SearchHelper;A=oa.PreviewDialog;Na=oa.ShowErrorDialog;oa=com.kingdee.bos.extreport.datasetdesigner.model;bb=oa.DataSetModelVO;Oa=oa.DataSetType;hb=oa.DataSetModelCheckType;Va=oa.DataSetModelCheckCode;Ba=oa.DataSourceTableObjectVO;Ta=oa.OutputColumn;wa=oa.FolderNode;wb=oa.LeafNode;Ob=oa.EntityNode;Mb=oa.FieldNode;Bb=oa.EntityPreviewData;Aa=oa.DataSourceModel;Hb=oa.OutDBVO;Fb=oa.DataSourceCheckerVO;ec=oa.NameAliasPair;Ha=oa.DataSourceNameAliasPair;
cb=oa.DBType;ub=oa.DataSourceType;Qa=oa.SystemVar;R=oa.MacroVar;dc=oa.SqlType;bc=oa.ParamDataType;Vb=oa.OutputColumDataType;Pb=oa.SqlContentParser})();var cc=new function(){var oa={};this.addQueryPane=function(nb,Ub){oa[nb]=Ub};this.createTabQueryPane=function(nb,Ub,Ya){return new oa[nb](nb,Ub,Ya)}};Tb.TabQueryPaneFactory=cc;cc.addQueryPane(Oa.SQL_DATA_SET,function(oa,nb,Ub){ha.call(this,oa,nb,Ub);this.protectedCreatDataSourceArea=function(){return new sb(oa,nb)};this.protectedIsNeedShowNoDataSourceUi=
function(Ya){return!Ya.getDataSourceName()};this.protectedGetDataSourceModel=function(Ya){var ca=new Aa;ca.setDataSetType(Ya.getDataSetType());ca.setDataSourceType(Ya.getDataSourceType());var Sa=new Ha;Sa.setName(Ya.getDataSourceName());Sa.setDBType(Ya.getDBType());ca.setDataSource(Sa);return ca};this.protectedInitNoDataSourcePaneUi=function(Ya,ca){var Sa=$("<div>");la.background(Sa,"sql");fa.layoutCtrlCenterAlign(Sa,144);fa.layoutCtrl(Sa,null,0,144,144);Sa.appendTo(ca);ca=$("<div>");la.background(ca,
"datasource");fa.layoutCtrlCenterAlign(ca,144);fa.layoutCtrl(ca,null,0,144,144);ca.appendTo(Ya);ca=$("<div>");ca.text(J.get("dataSourceDesc","\u6dfb\u52a0\u6570\u636e\u6e90"));ca.css({color:"rgb(102, 102, 102)","text-align":"center"});fa.layoutCtrlCenterAlign(ca,100);fa.layoutCtrlMiddleAlign(ca,100);fa.layoutCtrl(ca,null,180,null,null);ca.appendTo(Ya)}});cc.addQueryPane(Oa.OQL_DATA_SET,function(oa,nb,Ub){ha.call(this,oa,nb,Ub);this.protectedCreatDataSourceArea=function(){return new w(oa,nb)};this.protectedIsNeedShowNoDataSourceUi=
function(Ya){Ya=Ya.getContent();return!Ya||0==Ya.trim().length};this.protectedGetDataSourceModel=function(Ya){var ca=new Aa;ca.setDataSetType(Ya.getDataSetType());var Sa=new ec,e=Pb.parseTable(Ya.getContent());Ya=0<e.length?e[0]:Ya.getEntityName();Sa.setName(Ya);ca.setDataSource(Sa);return ca};this.protectedInitNoDataSourcePaneUi=function(Ya,ca){var Sa=$("<div>");la.background(Sa,"oql");fa.layoutCtrlCenterAlign(Sa,144);fa.layoutCtrl(Sa,null,0,144,144);Sa.appendTo(ca);ca=$("<div>");la.background(ca,
"boEntity");fa.layoutCtrlCenterAlign(ca,144);fa.layoutCtrl(ca,null,0,144,144);ca.appendTo(Ya);ca=$("<div>");ca.text(J.get("boEntityDesc","\u6dfb\u52a0\u4e1a\u52a1\u5b9e\u4f53"));ca.css({color:"rgb(102, 102, 102)","text-align":"center"});fa.layoutCtrlCenterAlign(ca,100);fa.layoutCtrlMiddleAlign(ca,100);fa.layoutCtrl(ca,null,180,null,null);ca.appendTo(Ya)}});cc.addQueryPane(Oa.WIZARD_DATA_SET,function(oa,nb){});var Xb=function(oa){var nb=$("<div>");nb.addClass("extreport-dataset-designer-title");var Ub=
$("<div>");Ub.addClass("extreport-dataset-designer-label");Ub.appendTo(nb);Ub=$("<div>");Ub.addClass("extreport-dataset-designer-text");Ub.text(oa);Ub.appendTo(nb);nb.attr("title",oa);return nb},gc=function(oa,nb,Ub){void 0===Ub&&(Ub=0);var Ya=$("<div>");Ya.appendTo(oa);var ca=$("<div>");ca.appendTo(Ya);la.background(ca,"no_source");fa.layoutCtrlCenterAlign(ca,60);oa=78;ca.css({position:"absolute",top:"50%","margin-top":-(oa>>1)+Ub+"px",height:oa+"px","line-height":oa+"px"});ca=$("<div id='noDataText'>");
ca.text(nb);ca.css({color:"rgb(102, 102, 102)"});nb=12*nb.length;fa.layoutCtrlCenterAlign(ca,160<nb?160:nb);oa=16;ca.css({position:"absolute",top:"50%","margin-top":-(oa>>1)+60+Ub+"px",height:oa+"px","line-height":oa+"px","text-align":"center"});ca.appendTo(Ya);return Ya}})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.datasetdesigner&&(com.kingdee.bos.extreport.datasetdesigner={});com.kingdee.bos.extreport.datasetdesigner.Main=function(){var ya=this,Da=$(document.body),Jb,Ib,Pa,vb,tb,fb,gb,Wa,Ka,rb,Ga,la,ib,Ua,K,A=new function(){var Ha,cb,
ub,Qa=new Ca,R=new Cb;this.collectJsonModel=function(Vb){return Bb(Vb)};this.addWindowResizeListener=function(Vb){Qa.addListener(Vb)};this.removeWindowResizeListener=function(Vb){Qa.removeListener(Vb)};this.fireWindowResizeEvent=function(){Qa.fireEvent(function(Vb){Vb()})};this.addListener=function(Vb,Pb){R.addListener(Vb,Pb)};this.removeListener=function(Vb,Pb){R.removeListener(Vb,Pb)};this.fireEvent=function(Vb,Pb){R.fireEvent(Vb,Pb)};this.getMessageCurtain=function(){Ha||(Ha=new Tb,Ha.getJqUi().appendTo($("body")));
return Ha};var dc=function(Vb){var Pb=xa.decodeParamFromUrl(window.location.search,"path");Vb=(Pb?Pb:"/ierp")+Vb;Pb=new Ja;Pb.setRemoteUrl(Vb);return Pb},bc=function(Vb,Pb,cc,Xb,gc){gc||(cb||(cb=dc("/qing_rpt/datasetDesigner.do")),gc=cb);return new Vb(gc,Pb,function(oa,nb,Ub){return cc?cc(oa,nb,Ub):!1},Xb)};this.createDesignerFacade=function(Vb,Pb,cc){return bc(pb,Vb,Pb,cc)};this.createQueryFacade=function(Vb,Pb,cc){return bc(Ea,Vb,Pb,cc)};this.createParamCtrlFacade=function(Vb,Pb,cc){return bc(Gb,
Vb,Pb,cc)};this.createMacroManageFacade=function(Vb,Pb,cc){var Xb=W;ub||(ub=dc("/qing/macroManage.do"));return bc(Xb,Vb,Pb,cc,ub)};this.isCurrentTab=function(Vb){return gb.getCurrentTabPane()===Vb}};this.start=function(){sb.init();fa.hookCollector(function(Ha,cb){zb.interestInBehavior(Ha,cb)});rb="true"==xa.decodeParamFromUrl(window.location.search,"isPreset");la=xa.decodeParamFromUrl(window.location.search,"dataSetId");ib=xa.decodeParamFromUrl(window.location.search,"dataSetName");zb.interestInBehaviorEntrance(zb.ENTRANCE_EXTREPORT_DATASET_DESIGNER);
Ba()};this.getDataSetModelVO=function(){return Ua};var Na=function(){Pa=new Ab;Ib=Pa.getJqUi();Ib.addClass("extreport-dataset-designer-toolbar");var Ha=U.get("save","\u4fdd\u5b58");vb=Pa.createButton(Ib,!1,Ob,Ha,Ha);Ha=U.get("preview","\u9884\u89c8");tb=Pa.createButton(Ib,!1,Hb,Ha,Ha);Ha=U.get("check","\u6821\u9a8c");fb=Pa.createButton(Ib,!1,function(){Fb()},Ha,Ha);Ha=U.get("close","\u9000\u51fa");Pa.createButton(Ib,!1,ec,Ha,Ha);Ib.appendTo(Jb)},bb=function(){Wa=J.createTabQueryPane(Ga,A,ya);Wa.setEnableButtonFunCallBack(wb);
Ka=new eb(A,ya);gb=new Ra;gb.addTab(Wa,!0);gb.addTab(Ka);gb.addTabChangedListener(Oa);var Ha=gb.getJqUi();Ha.addClass("extreport-dataset-designer-tab");Ha.appendTo(Jb);A.addWindowResizeListener(function(){var cb=gb.getCurrentTabPane();cb&&cb.resize()})},Oa=function(Ha,cb){cb.fireTabChangeEvent()},hb=function(){var Ha=new Za;Ha.setCallbackImmediately(function(){Va();A.fireWindowResizeEvent()});Ha.setDelay(100);Ha.observe()},Va=function(){document.body.style.height=document.documentElement.clientHeight+
"px"},Ba=function(){A.createDesignerFacade(function(Ha){Ha=Ta(Ha);var cb=Ha.getDataSetModel();cb&&(Ga=parseInt(cb.getDataSetType()));Jb=$("<div>");Jb.addClass("extreport-dataset-designer");Na();bb();Va();hb();Jb.appendTo(Da);(cb=Ha.getDataSetModel().getException(Ma.AVAILABLE))&&A.getMessageCurtain().showPrompt(cb,-1);wa(Ha,!0);rb&&A.getMessageCurtain().showPrompt(U.get("cantSavePreset","\u9884\u7f6e\u6570\u636e\u96c6\u4e0d\u5141\u8bb8\u4fdd\u5b58\uff0c\u5982\u6709\u9700\u8981\uff0c\u53ef\u590d\u5236\u540e\u518d\u8fdb\u884c\u64cd\u4f5c\u3002"),
-1)},function(Ha,cb){return 8077E3<Ha?(A.getMessageCurtain().showPrompt(cb,5E3),!0):!1}).loadModel(la)},Ta=function(Ha){var cb=new db;cb.fromJsonObject(Ha);if(Ha=cb.getDataSetModel())Ha.setPreset(rb),Ha.setDataSetId(la),Ha.setDataSetName(ib);return cb},wa=function(Ha,cb){gb.getCurrentTabPane().getJqUi().show();var ub=!1;Ua&&Ua.getDataSetModel().isDirty()&&(ub=!0);Ua=Ha;Wa.model2Ui(cb);Ka.model2Ui();ub&&!cb?Ua.getDataSetModel().setDirty(!0,!0):Ua.getDataSetModel().setDirty(!1,!0)},wb=function(Ha,cb,
ub){vb.setEnabled(rb?!1:Ha);tb.setEnabled(cb);fb.setEnabled(ub)},Ob=function(){rb?A.getMessageCurtain().showPrompt(U.get("cantSavePreset","\u9884\u7f6e\u6570\u636e\u96c6\u4e0d\u5141\u8bb8\u4fdd\u5b58\uff0c\u5982\u6709\u9700\u8981\uff0c\u53ef\u590d\u5236\u540e\u518d\u8fdb\u884c\u64cd\u4f5c\u3002"),-1):Fb(function(){var Ha=A.createDesignerFacade(function(ub){ub=Ta(ub);wa(ub,!0);A.getMessageCurtain().showSuccess(U.get("saveSuccess","\u4fdd\u5b58\u6210\u529f\u3002"))},function(ub,Qa){return 8077E3<ub?
(A.getMessageCurtain().showPrompt(Qa,5E3),!0):!1}),cb=Bb(!0,Ma.SAVE_CHECK_TYPE);cb&&Ha.saveModel(la,K,cb)})},Mb=function(Ha,cb){var ub=Ha==Ma.DATA_SOURCE,Qa=Ha==Ma.OUTPUT_COLUMN,R=Ha==Ma.PARAM;if(Ha==Ma.PARAM_CLIENT_ERROR)Ha=cb;else{var dc;Qa&&(dc=Aa(Ma.OUTPUT_COLUMN,ea.OUTPUT_COLUMNS_NAME_EXP));Ha=ub?cb:Qa?dc?dc.msg:U.get("showExecuteError","\u67e5\u8be2\u8bed\u53e5\u6267\u884c\u5931\u8d25\uff0c\u8bf7\u4fee\u6539\u67e5\u8be2\u8bed\u53e5\u3002"):R?U.get("showParamError","\u53c2\u6570\u8bbe\u7f6e\u5b58\u5728\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570\u3002"):
null}Ha&&(cb=U.get("fullStop","\u3002"),Ha.endsWith(cb)||(Ha+=cb),A.getMessageCurtain().showPrompt(Ha,5E3));ub||Qa?gb.setCurrentTabPane(Wa):gb.setCurrentTabPane(Ka)},Bb=function(Ha,cb){var ub=ya.getDataSetModelVO().getDataSetModel();if(ub.isEmpty())return A.getMessageCurtain().showPrompt(U.get("queryStatNull","\u67e5\u8be2\u8bed\u53e5\u4e0d\u80fd\u4e3a\u7a7a\u3002"),5E3),null;if(Ha){var Qa;if(cb)for(Ha=0;Ha<cb.length&&!(Qa=Aa(cb[Ha]));Ha++);else Qa=Aa();if(Qa)return Mb(Qa.type,Qa.msg),null}return ub.toJsonObject()},
Aa=function(Ha,cb){if(!Ha&&!cb){for(var ub,Qa=0;Qa<Ma.CHECK_EXP_TYPE.length&&!(ub=Aa(Ma.CHECK_EXP_TYPE[Qa]));Qa++);return ub}Qa=ya.getDataSetModelVO().getDataSetModel();if(ub=Qa.getException(Ha,cb))return{type:Ha,msg:ub};var R=Qa.getParameters();if(R)for(Qa=0;Qa<R.length;Qa++)if(ub=R[Qa].getException(Ha,cb))return{type:Ha,msg:ub}},Hb=function(){var Ha=function(){var cb=A.createDesignerFacade(function(Qa){K=Qa;Qa=ha.getUrlParamValue();var R=xa.decodeParamFromUrl(location.search,"path");R=xa.appendParamToUrl((R?
R:"/ierp")+"/qing_rpt/dataSetPreview.do","cacheId",K);R=xa.appendParamToUrl(R,"dataSetId",la);R=xa.appendParamToUrl(R,"dataSetName",ib);R=xa.appendParamToUrl(R,"isPreset",rb);Qa&&(R=xa.appendParamToUrl(R,"skin",Qa));w.openNewTab(ib,R,R)},function(Qa,R){return 8077E3<Qa?(A.getMessageCurtain().showPrompt(R,5E3),!0):!1}),ub=Bb(!0);ub&&cb.cacheModel(la,ub)};Fb(function(){A.fireEvent(za.OUTPUT_AREA_REFRESH,{isPreview:!0,funCallback:Ha})})},Fb=function(Ha){var cb=function(Qa){Qa=Ta(Qa);wa(Qa,void 0);(Qa=
Aa())?Mb(Qa.type,Qa.msg):Ha?Ha():A.getMessageCurtain().showSuccess(U.get("checkSuccess","\u6821\u9a8c\u6210\u529f\u3002"))},ub=function(Qa,R){return 8077E3<Qa?(A.getMessageCurtain().showPrompt(R,5E3),!0):!1};setTimeout(function(){var Qa=A.createDesignerFacade(cb,ub),R=Bb(!0,Ma.CLIENT_CHECK_TYPE);R&&Qa.checkModel(la,R)},0)},ec=function(){!rb&&Ua.getDataSetModel().isDirty()?com.kingdee.bos.qing.integration.TabStatusHelper.showConfirmExitDialog():w.closeCurrentTab()}};var ha,xa,Ca,U,sb,w,Za,zb,Tb,Ab,
Ra,Ja,fa,Cb,pb,Ea,Gb,J,eb,db,Ma,ea,W,za;(function(){var ya=com.kingdee.bos.qing;ha=ya.SkinUtil;ya=com.kingdee.bos.qing.common;xa=ya.Util;Ca=ya.EventListenerList;ya=com.kingdee.bos.qing.framework.common;U=ya.MultilanguageManager.createPackageAccessor(com.kingdee.bos.extreport.datasetdesigner);sb=ya.WebPageInitializer;w=ya.TabbedUiUtil;Za=ya.WindowResizeObserver;ya=com.kingdee.bos.qing.behavior;zb=ya.BehaviorManager;ya=com.kingdee.bos.qing.ui.component;Tb=ya.MessageCurtain;Ab=ya.Toolbar;Ra=ya.TabContainer;
ya=com.kingdee.bos.extreport.datasetdesigner;J=ya.TabQueryPaneFactory;eb=ya.TabParamCtrlPane;ya=com.kingdee.bos.extreport.datasetdesigner.common;Ja=ya.RemoteImpl;fa=ya.UserOperationReporter;Cb=ya.EventListenerMap;pb=ya.DesignerFacade;W=ya.MacroFacade;za=ya.EventType;ya=com.kingdee.bos.extreport.datasetdesigner.common.query;Ea=ya.QueryFacade;ya=com.kingdee.bos.extreport.datasetdesigner.common.paramctrl;Gb=ya.ParamCtrlFacade;ya=com.kingdee.bos.extreport.datasetdesigner.model;db=ya.DataSetModelVO;Ma=
ya.DataSetModelCheckType;ea=ya.DataSetModelCheckCode})()})();
//qingVersionTag: 20250828