@ecan-bi/datav 1.5.71 → 1.5.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.5.71 */
1
+ /*! @ecan-bi/datav@1.5.72 */
2
2
  (function(fi,Ei){typeof exports=="object"&&typeof module<"u"?Ei(exports,require("vue"),require("echarts/core"),require("resize-detector"),require("ant-design-vue"),require("ant-design-vue/es/spin/style"),require("ant-design-vue/es/skeleton/style"),require("lodash-es"),require("dayjs"),require("axios"),require("mitt"),require("echarts/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/style"),require("ant-design-vue/es/progress/style"),require("ant-design-vue/es/input/style"),require("ant-design-vue/es/date-picker/style"),require("ant-design-vue/es/date-picker/locale/zh_CN"),require("ant-design-vue/es/button/style"),require("ant-design-vue/es/checkbox/style"),require("ant-design-vue/es/select/style"),require("ant-design-vue/es/tree-select/style"),require("echarts"),require("ant-design-vue/es/table/style"),require("ant-design-vue/es/notification/style"),require("xlsx"),require("big.js")):typeof define=="function"&&define.amd?define(["exports","vue","echarts/core","resize-detector","ant-design-vue","ant-design-vue/es/spin/style","ant-design-vue/es/skeleton/style","lodash-es","dayjs","axios","mitt","echarts/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","ant-design-vue/es/progress/style","ant-design-vue/es/input/style","ant-design-vue/es/date-picker/style","ant-design-vue/es/date-picker/locale/zh_CN","ant-design-vue/es/button/style","ant-design-vue/es/checkbox/style","ant-design-vue/es/select/style","ant-design-vue/es/tree-select/style","echarts","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],Ei):(fi=typeof globalThis<"u"?globalThis:fi||self,Ei(fi["@ecan/bi-datav"]={},fi.Vue,fi["echarts/core"],fi.ResizeDetector,fi.AntDesignVue,null,null,fi.LodashEs,fi.Dayjs,fi.Axios,fi.Mitt,fi["echarts/renderers"],fi["echarts/charts"],fi["echarts/components"],null,null,null,null,fi["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,fi.Echarts,null,null,fi.Xlsx,fi.big.js))})(this,function(exports,vue,core$1,resizeDetector,antDesignVue,style$1,style$2,lodashEs,dayjs,axios,mitt,renderers,charts,components$1,style$3,style$4,style$5,style$6,locale,style$7,style$8,style$9,style$a,echarts,style$b,style$c,xlsx,big_js){var fi,Ei,Ii,Di;"use strict";function _interopNamespaceDefault(c){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const f in c)if(f!=="default"){const d=Object.getOwnPropertyDescriptor(c,f);Object.defineProperty(u,f,d.get?d:{enumerable:!0,get:()=>c[f]})}}return u.default=c,Object.freeze(u)}const echarts__namespace=_interopNamespaceDefault(echarts),METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(c,u){function f(h){return(...v)=>{if(c.value||u(),!c.value)throw new Error("ECharts is not initialized yet.");return c.value[h].apply(c.value,v)}}function d(){const h=Object.create(null);return METHOD_NAMES.forEach(v=>{h[v]=f(v)}),h}return d()}function useAutoresize(c,u,f){let d=null;vue.watch([f,c,u],([h,v,p],m,g)=>{h&&v&&p&&(d=core$1.throttle(()=>{v.resize()},100),resizeDetector.addListener(h,d)),g(()=>{d&&h&&resizeDetector.removeListener(h,d)})})}const autoresizeProps={autoresize:Boolean},LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(c,u,f){const d=vue.inject(LOADING_OPTIONS_KEY,{}),h=vue.computed(()=>({...vue.unref(d),...f==null?void 0:f.value}));vue.watchEffect(()=>{const v=c.value;v&&(u.value?v.showLoading(h.value):v.hideLoading())})}const loadingProps$1={loading:Boolean,loadingOptions:Object},style="",onRE=/^on[^a-z]/,isOn=c=>onRE.test(c);function omitOn(c){const u={};for(const f in c)isOn(f)||(u[f]=c[f]);return u}const TAG_NAME="x-vue-echarts",THEME_KEY="ecTheme",INIT_OPTIONS_KEY="ecInitOptions",UPDATE_OPTIONS_KEY="ecUpdateOptions",Echarts=vue.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...autoresizeProps,...loadingProps$1},inheritAttrs:!1,setup(c,{attrs:u,listeners:f}){const d=vue.shallowRef(),h=vue.shallowRef(),v=vue.shallowRef(),p=vue.inject(THEME_KEY,null),m=vue.inject(INIT_OPTIONS_KEY,null),g=vue.inject(UPDATE_OPTIONS_KEY,null),{autoresize:y,manualUpdate:b,loading:Pn,loadingOptions:x}=vue.toRefs(c),gn=vue.computed(()=>v.value||c.option||Object.create(null)),J=vue.computed(()=>c.theme||vue.unref(p)||{}),j=vue.computed(()=>c.initOptions||vue.unref(m)||{}),Rn=vue.computed(()=>c.updateOptions||vue.unref(g)||{}),Bn=vue.computed(()=>omitOn(u));function w(Yn){if(h.value||!d.value)return;const Wn=h.value=core$1.init(d.value,J.value,j.value);c.group&&(Wn.group=c.group);let Jn=f;Jn||(Jn={},Object.keys(u).filter(Xn=>Xn.indexOf("on")===0&&Xn.length>2).forEach(Xn=>{const ar=Xn.charAt(2).toLowerCase()+Xn.slice(3);Jn[ar]=u[Xn]})),Object.keys(Jn).forEach(Xn=>{const ar=Jn[Xn];ar&&(Xn.indexOf("zr:")===0?Wn.getZr().on(Xn.slice(3).toLowerCase(),ar):Wn.on(Xn.toLowerCase(),ar))});function er(){if(Wn&&!Wn.isDisposed())try{Wn.resize()}catch(Xn){if(Xn.message==="Cannot read property 'get' of undefined")return;throw Xn}}function tr(){Wn.setOption(Yn||gn.value,Rn.value)}y.value?vue.nextTick(()=>{er(),tr()}):tr()}function vn(Yn,Wn){c.manualUpdate&&(v.value=Yn),h.value?h.value.setOption(Yn,Wn||{}):w(Yn)}function re(){h.value&&(h.value.dispose(),h.value=void 0)}let qn=null;vue.watch(b,Yn=>{typeof qn=="function"&&(qn(),qn=null),Yn||(qn=vue.watch(()=>c.option,Wn=>{Wn&&(h.value?h.value.setOption(Wn,Rn.value):w())},{deep:!0}))},{immediate:!0}),vue.watch([J,j],()=>{re(),w()},{deep:!0}),vue.watchEffect(()=>{c.group&&h.value&&(h.value.group=c.group)});const zn=usePublicAPI(h,w);return useLoading(h,Pn,x),useAutoresize(h,y,d),vue.onMounted(()=>{c.option&&w()}),vue.onUnmounted(re),{chart:h,root:d,setOption:vn,nonEventAttrs:Bn,...zn}},render(){const c={...this.nonEventAttrs};return c.ref="root",c.class=c.class?["echarts"].concat(c.class):"echarts",vue.h(TAG_NAME,c)}});function bound01(c,u){isOnePointZero(c)&&(c="100%");var f=isPercentage(c);return c=u===360?c:Math.min(u,Math.max(0,parseFloat(c))),f&&(c=parseInt(String(c*u),10)/100),Math.abs(c-u)<1e-6?1:(u===360?c=(c<0?c%u+u:c%u)/parseFloat(String(u)):c=c%u/parseFloat(String(u)),c)}function isOnePointZero(c){return typeof c=="string"&&c.indexOf(".")!==-1&&parseFloat(c)===1}function isPercentage(c){return typeof c=="string"&&c.indexOf("%")!==-1}function boundAlpha(c){return c=parseFloat(c),(isNaN(c)||c<0||c>1)&&(c=1),c}function convertToPercentage(c){return c<=1?"".concat(Number(c)*100,"%"):c}function pad2(c){return c.length===1?"0"+c:String(c)}function rgbToRgb(c,u,f){return{r:bound01(c,255)*255,g:bound01(u,255)*255,b:bound01(f,255)*255}}function hue2rgb(c,u,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?c+(u-c)*(6*f):f<1/2?u:f<2/3?c+(u-c)*(2/3-f)*6:c}function hslToRgb(c,u,f){var d,h,v;if(c=bound01(c,360),u=bound01(u,100),f=bound01(f,100),u===0)h=f,v=f,d=f;else{var p=f<.5?f*(1+u):f+u-f*u,m=2*f-p;d=hue2rgb(m,p,c+1/3),h=hue2rgb(m,p,c),v=hue2rgb(m,p,c-1/3)}return{r:d*255,g:h*255,b:v*255}}function rgbToHsv(c,u,f){c=bound01(c,255),u=bound01(u,255),f=bound01(f,255);var d=Math.max(c,u,f),h=Math.min(c,u,f),v=0,p=d,m=d-h,g=d===0?0:m/d;if(d===h)v=0;else{switch(d){case c:v=(u-f)/m+(u<f?6:0);break;case u:v=(f-c)/m+2;break;case f:v=(c-u)/m+4;break}v/=6}return{h:v,s:g,v:p}}function hsvToRgb(c,u,f){c=bound01(c,360)*6,u=bound01(u,100),f=bound01(f,100);var d=Math.floor(c),h=c-d,v=f*(1-u),p=f*(1-h*u),m=f*(1-(1-h)*u),g=d%6,y=[f,p,v,v,m,f][g],b=[m,f,f,p,v,v][g],Pn=[v,v,m,f,f,p][g];return{r:y*255,g:b*255,b:Pn*255}}function rgbToHex(c,u,f,d){var h=[pad2(Math.round(c).toString(16)),pad2(Math.round(u).toString(16)),pad2(Math.round(f).toString(16))];return d&&h[0].startsWith(h[0].charAt(1))&&h[1].startsWith(h[1].charAt(1))&&h[2].startsWith(h[2].charAt(1))?h[0].charAt(0)+h[1].charAt(0)+h[2].charAt(0):h.join("")}function convertHexToDecimal(c){return parseIntFromHex(c)/255}function parseIntFromHex(c){return parseInt(c,16)}var names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(c){var u={r:0,g:0,b:0},f=1,d=null,h=null,v=null,p=!1,m=!1;return typeof c=="string"&&(c=stringInputToObject(c)),typeof c=="object"&&(isValidCSSUnit(c.r)&&isValidCSSUnit(c.g)&&isValidCSSUnit(c.b)?(u=rgbToRgb(c.r,c.g,c.b),p=!0,m=String(c.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(c.h)&&isValidCSSUnit(c.s)&&isValidCSSUnit(c.v)?(d=convertToPercentage(c.s),h=convertToPercentage(c.v),u=hsvToRgb(c.h,d,h),p=!0,m="hsv"):isValidCSSUnit(c.h)&&isValidCSSUnit(c.s)&&isValidCSSUnit(c.l)&&(d=convertToPercentage(c.s),v=convertToPercentage(c.l),u=hslToRgb(c.h,d,v),p=!0,m="hsl"),Object.prototype.hasOwnProperty.call(c,"a")&&(f=c.a)),f=boundAlpha(f),{ok:p,format:c.format||m,r:Math.min(255,Math.max(u.r,0)),g:Math.min(255,Math.max(u.g,0)),b:Math.min(255,Math.max(u.b,0)),a:f}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(c){if(c=c.trim().toLowerCase(),c.length===0)return!1;var u=!1;if(names[c])c=names[c],u=!0;else if(c==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f=matchers.rgb.exec(c);return f?{r:f[1],g:f[2],b:f[3]}:(f=matchers.rgba.exec(c),f?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=matchers.hsl.exec(c),f?{h:f[1],s:f[2],l:f[3]}:(f=matchers.hsla.exec(c),f?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=matchers.hsv.exec(c),f?{h:f[1],s:f[2],v:f[3]}:(f=matchers.hsva.exec(c),f?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=matchers.hex8.exec(c),f?{r:parseIntFromHex(f[1]),g:parseIntFromHex(f[2]),b:parseIntFromHex(f[3]),a:convertHexToDecimal(f[4]),format:u?"name":"hex8"}:(f=matchers.hex6.exec(c),f?{r:parseIntFromHex(f[1]),g:parseIntFromHex(f[2]),b:parseIntFromHex(f[3]),format:u?"name":"hex"}:(f=matchers.hex4.exec(c),f?{r:parseIntFromHex(f[1]+f[1]),g:parseIntFromHex(f[2]+f[2]),b:parseIntFromHex(f[3]+f[3]),a:convertHexToDecimal(f[4]+f[4]),format:u?"name":"hex8"}:(f=matchers.hex3.exec(c),f?{r:parseIntFromHex(f[1]+f[1]),g:parseIntFromHex(f[2]+f[2]),b:parseIntFromHex(f[3]+f[3]),format:u?"name":"hex"}:!1)))))))))}function isValidCSSUnit(c){return!!matchers.CSS_UNIT.exec(String(c))}var hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function toHsv(c){var u=c.r,f=c.g,d=c.b,h=rgbToHsv(u,f,d);return{h:h.h*360,s:h.s,v:h.v}}function toHex(c){var u=c.r,f=c.g,d=c.b;return"#".concat(rgbToHex(u,f,d,!1))}function mix(c,u,f){var d=f/100,h={r:(u.r-c.r)*d+c.r,g:(u.g-c.g)*d+c.g,b:(u.b-c.b)*d+c.b};return h}function getHue(c,u,f){var d;return Math.round(c.h)>=60&&Math.round(c.h)<=240?d=f?Math.round(c.h)-hueStep*u:Math.round(c.h)+hueStep*u:d=f?Math.round(c.h)+hueStep*u:Math.round(c.h)-hueStep*u,d<0?d+=360:d>=360&&(d-=360),d}function getSaturation(c,u,f){if(c.h===0&&c.s===0)return c.s;var d;return f?d=c.s-saturationStep*u:u===darkColorCount?d=c.s+saturationStep:d=c.s+saturationStep2*u,d>1&&(d=1),f&&u===lightColorCount&&d>.1&&(d=.1),d<.06&&(d=.06),Number(d.toFixed(2))}function getValue(c,u,f){var d;return f?d=c.v+brightnessStep1*u:d=c.v-brightnessStep2*u,d>1&&(d=1),Number(d.toFixed(2))}function generate$1(c){for(var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[],d=inputToRGB(c),h=lightColorCount;h>0;h-=1){var v=toHsv(d),p=toHex(inputToRGB({h:getHue(v,h,!0),s:getSaturation(v,h,!0),v:getValue(v,h,!0)}));f.push(p)}f.push(toHex(d));for(var m=1;m<=darkColorCount;m+=1){var g=toHsv(d),y=toHex(inputToRGB({h:getHue(g,m),s:getSaturation(g,m),v:getValue(g,m)}));f.push(y)}return u.theme==="dark"?darkColorMap.map(function(b){var Pn=b.index,x=b.opacity,gn=toHex(mix(inputToRGB(u.backgroundColor||"#141414"),inputToRGB(f[Pn]),x*100));return gn}):f}var presetPrimaryColors={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(c){presetPalettes[c]=generate$1(presetPrimaryColors[c]),presetPalettes[c].primary=presetPalettes[c][5],presetDarkPalettes[c]=generate$1(presetPrimaryColors[c],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[c].primary=presetDarkPalettes[c][5]});var containers=[],styleElements=[],usage="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function createStyleElement(){var c=document.createElement("style");return c.setAttribute("type","text/css"),c}function insertCss(c,u){if(u=u||{},c===void 0)throw new Error(usage);var f=u.prepend===!0?"prepend":"append",d=u.container!==void 0?u.container:document.querySelector("head"),h=containers.indexOf(d);h===-1&&(h=containers.push(d)-1,styleElements[h]={});var v;return styleElements[h]!==void 0&&styleElements[h][f]!==void 0?v=styleElements[h][f]:(v=styleElements[h][f]=createStyleElement(),f==="prepend"?d.insertBefore(v,d.childNodes[0]):d.appendChild(v)),c.charCodeAt(0)===65279&&(c=c.substr(1,c.length)),v.styleSheet?v.styleSheet.cssText+=c:v.textContent+=c,v}function _objectSpread$d(c){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?Object(arguments[u]):{},d=Object.keys(f);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(f).filter(function(h){return Object.getOwnPropertyDescriptor(f,h).enumerable}))),d.forEach(function(h){_defineProperty$e(c,h,f[h])})}return c}function _defineProperty$e(c,u,f){return u in c?Object.defineProperty(c,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[u]=f,c}function warn(c,u){process.env.NODE_ENV!=="production"&&!c&&console!==void 0&&console.error("Warning: ".concat(u))}function warning(c,u){warn(c,"[@ant-design/icons-vue] ".concat(u))}function isIconDefinition(c){return typeof c=="object"&&typeof c.name=="string"&&typeof c.theme=="string"&&(typeof c.icon=="object"||typeof c.icon=="function")}function generate(c,u,f){return f?vue.h(c.tag,_objectSpread$d({key:u},f,c.attrs),(c.children||[]).map(function(d,h){return generate(d,"".concat(u,"-").concat(c.tag,"-").concat(h))})):vue.h(c.tag,_objectSpread$d({key:u},c.attrs),(c.children||[]).map(function(d,h){return generate(d,"".concat(u,"-").concat(c.tag,"-").concat(h))}))}function getSecondaryColor(c){return generate$1(c)[0]}function normalizeTwoToneColors(c){return c?Array.isArray(c)?c:[c]:[]}var iconStyles=`
3
3
  .anticon {
4
4
  display: inline-block;
@@ -100,7 +100,7 @@ version: 2.9.0
100
100
  `),formatMoney=(c,u=2)=>{const f=parseFloat(c+"");return isNaN(f)?c:f.toFixed(u).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},formatThousands=c=>{const u=parseFloat(c+"");return isNaN(u)?c:(u+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},formatPercentage=(c,u=2)=>{const f=c+"";if(f.includes("%"))return c;const d=parseFloat(f);return isNaN(d)?c:`${(d*100).toFixed(u)}%`},formatDecimals=(c,u=2)=>{const f=c+"",d=parseFloat(f);return isNaN(d)?c:d.toFixed(u)},formatCustom=(c,u)=>Fn(u,c),getFixedValueDatas=c=>{const{leftAxisList:u=[],rightAxisList:f=[],queryColumnList:d=[],indicators:h=[]}=c;return[...u,...f,...d,...h].filter(v=>(v==null?void 0:v.calcType)==="COMPONENT").map(v=>({keyName:v.builtInCalcWay,id:v.builtInValueSource}))},canRequestIndicator=(c,u)=>{let f=!0;const d=getFixedValueDatas(c);return d!=null&&d.length&&(f=d.map(h=>u[h.id]).every(h=>h)),f},getLegendFormat=(c,u)=>{var p;const f=c.match(/\{(.+?)\}/g),d=((p=c.split(`
101
101
  `))==null?void 0:p.length)-1;let h="";if(d)for(let m=0;m<d;m++)h+=`
102
102
  `;let v=c;if(f!=null&&f.length){for(const m of f){const g=hn(m,{textData:u},{useNewline:!1,useSpace:!1});g&&(v=v.replace(m,g))}return`${h}{text|${v}}`}else return c},setDefaultRangeVal=(c,u)=>{const{props:f,componentList:d,getGlobalModel:h}=c,{graphicConfig:v={},startValue:p,endValue:m}=f,g=getdefCompleteData({graphicConfig:v,startValue:p,endValue:m,componentList:d,getGlobalModel:h}),{dimensions:y,dataset:b}=u,{classificationList:Pn=[]}=v,gn=Pn.find(J=>J.show).label||"";for(const J of g)!y.find(j=>+j==+J)&&!isNaN(+J)&&y.push(+J);y.sort((J,j)=>dayjs(J).isBefore(dayjs(j))?-1:1);for(const J of b){const{data:j}=J;if(j!=null&&j.length){const Rn=[];for(const Bn of g)if(!j.find(w=>+w[gn]==+Bn)&&!isNaN(+Bn)){const w=lodashEs.cloneDeep(j[0]);for(const vn in w)vn===gn?w[vn]=+Bn:w[vn]=0;Rn.push(w)}J.data.push(...Rn),J.data.sort((Bn,w)=>dayjs(Bn[gn]).isBefore(dayjs(w[gn]))?-1:1)}}};function getdefCompleteData(c){const{startValue:u,endValue:f,componentList:d,graphicConfig:h,getGlobalModel:v}=c,p=getVariableAndField(u),m=getVariableAndField(f),g=[];if(p&&m){const y=d.find(Pn=>Pn.keyName===p.keyName),b=d.find(Pn=>Pn.keyName===m.keyName);if(y&&b){const Pn=v(y.id),x=v(b.id),{classificationList:gn=[]}=h,J=gn.find(j=>j.show);if(J){let j="YYYY-MM";switch(J.name){case"the_year":j="YYYY";break;case"the_month":j="MM";break;case"the_day":j="DD";break;case"the_date":j=(J==null?void 0:J.dateFormat)||j;break}const Rn=getFormatStep(j);if(j){const Bn=vue.unref(Pn[p.field]),w=vue.unref(x[m.field]);let vn=dayjs(Bn);const re=dayjs(w);for(g.push(re.format(j));vn.isBefore(re);)g.push(vn.format(j)),vn=vn.add(1,Rn)}}}}return g}function getVariableAndField(c){let u=null;if(c){const f=c.match(/\{(.+?)\}/g);if(f!=null&&f.length){let d=f[0].slice(1,-1).trim();const h=d.match(/\[(.+?)\]/g);let v="";h!=null&&h.length&&(d=d.replace(h[0],""),v=h[0].slice(1,-1).trim()),u={keyName:d,field:v}}}return u}function getFormatStep(c){const u=c.split("-");let f="";if(u!=null&&u.length)switch(u[u.length-1]){case"YYYY":f="year";break;case"MM":f="month";break;case"DD":f="day";break}return f}function handleJumpLink(c,u){var Pn;const{pageMode:f,targetTemplate:d,getRecordValueByKeyName:h,setTemplateData:v}=u,p=c.linkPage||"",m=usePageUrl(f,p),g=c.href;let y=g||m;y=hn(y);const b=c.target;if(b)if(b==="event")window.parent.postMessage({type:"openPage",url:g},"*");else{const x={pageId:p,componentId:d};if((Pn=c.transParams)!=null&&Pn.length){y.includes("?")?y+="&":y+="?";const gn=[];for(const J of c.transParams){const j=h(String(J.fieldName));gn.push(`${J.keyName}=${j}`),x[J.keyName]=j}y+=gn.join("&")}b==="template"?(Object.prototype.hasOwnProperty.call(window,"oldPageId")||(window.oldPageId=""),window.oldPageId&&(window.controller.abort(),window.controller=new AbortController),window.oldPageId=p,v(x)):(b==="blank"&&(y+=`${y.includes("?")?"&":"?"}drillFlag=1`),window.open(y,"_"+b))}}function getPageUrlParams(c){var f,d;let u={};if(c){const h=(((f=window.config)==null?void 0:f.urlParams)||{})[c]||{};for(const v in h)v.includes("{")||(u[v]=h[v])}else u=((d=window.config)==null?void 0:d.requestParams)||{};return u}function getNewValueFromUrlParams(c,u,f){let d="";const{urlParams:h}=window.config;if(c&&h[c])for(const v in h[c]){const p=h[c][v];if(v===`{${u}[${f}]}`&&p){d=p;break}}return d}function getFormatWh(c,u){return typeof c=="number"?c:typeof c=="string"?parseFloat(c):c.suffix==="px"?+c.value:c.suffix==="%"?parseFloat(u)*(c.value/100):0}const hasChinese=c=>/[\u4e00-\u9fa5]/.test(c),dragModalAction=(c,u)=>{const f=document.querySelector(u);if(!f)return;f.style.cursor="move",f.style.userSelect="none";const d=f.parentElement,h=200,v=d.getBoundingClientRect(),{width:p,left:m,top:g}=v,y=window.innerWidth,b=window.innerHeight,Pn=c.clientX,x=c.clientY,gn=parseFloat(d.style.left)||0,J=parseFloat(d.style.top)||0,j=-(m+p-h-gn),Rn=y-m+gn-h,Bn=-(g-J),w=b-g+J-h,vn=qn=>{qn.preventDefault();const zn=qn.clientX-Pn,Yn=qn.clientY-x;let Wn=gn+zn,Jn=J+Yn;Wn=Math.max(j,Math.min(Wn,Rn)),Jn=Math.max(Bn,Math.min(Jn,w)),d.style.left=`${Wn}px`,d.style.top=`${Jn}px`},re=()=>{f.style.cursor="",f.style.userSelect="",document.removeEventListener("mousemove",vn),document.removeEventListener("mouseup",re)};document.addEventListener("mousemove",vn),document.addEventListener("mouseup",re)},getPageId=()=>{var u;let c=((u=window==null?void 0:window.config)==null?void 0:u.pageId)||"";if(!c){const{pathname:f}=window==null?void 0:window.location;if(f){const d=f.split("/");d!=null&&d.length&&(c=d[d.length-1])}}return c};function loopConditions(c,u,f){const d=[];for(const h of c)h[u]?d.push(...loopConditions(h[u],u,f)):h.filter?d.push({...h.filter,label:h.label}):(!f||h.dataType!=="component"&&!(h.fieldValue.startsWith("${")&&h.fieldValue.endsWith("}")))&&d.push(h);return d}const useRequestData=(c,u,f=()=>{})=>{var ar;const{requestUrl:d,requestMethod:h,requestHeaders:v,requestParams:p,requestInterval:m,isOpenRequestTimer:g,openCustomRequestData:y,projectRequestUrl:b="",getModel:Pn,requestParamsMode:x,customRequestParams:gn,dataSetParam:J,requestType:j,dataType:Rn,dataSetchecked:Bn}=c,{pageMode:w}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:vn}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:re,touchEventId:qn}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:zn}=vue.inject(GLOBAL_MODEL,{getGlobalModel:hr=>{}})||{},Yn=vue.inject(COMMON_OPERATE,{operateAction:(hr,sr)=>{}}),Wn=Pn||zn;let Jn=hn(d),er=vue.unref(re)||b||"";(Rn==="request"&&Bn||j===1)&&(er="",Jn=((ar=window.config)==null?void 0:ar.dataSetUrl)||"/api/datav/dataset/data2");const tr=async(hr={})=>{var dr;if(vue.unref(w)==="design")return;if(Rn!=="request"&&Xn){clearInterval(Xn);return}if(!Jn||!h||!v)return;let sr={};for(const nr of p){const{key:lr,value:fr}=nr;if((fr==null?void 0:fr.id)==="PARENT"&&(fr!=null&&fr.prop)){const cr=(((dr=window.config)==null?void 0:dr.record)||{})[fr.prop];if(cr){const pr=cr[fr.propKey||"value"];pr&&(["date","range"].some(gr=>yn(cr==null?void 0:cr.type,gr))?sr[lr]=vue.unref(pr).format(cr.format||"YYYY-MM-DD"):sr[lr]=vue.unref(pr))}continue}if(typeof fr=="object"&&fr!=null&&fr.id){let Qn={};const{id:cr,prop:pr,propKey:mr,operate:gr}=fr;let yr=!1;try{JSON.parse(cr),yr=!0}catch{yr=!1}cr==="THIS"?Qn=Wn(vue.unref(qn))||{}:Qn=Wn(cr)||{};const ur=vue.unref(Qn[pr]);let vr=null;if(["date","range"].some(Sr=>yn(Qn==null?void 0:Qn.type,Sr))){const{value:Sr,type:kr,mode:Cr}=gr||{};if(Sr&&kr&&Cr)switch(kr){case"add":vr=vue.unref(ur).add(Sr,Cr);break;case"minus":vr=vue.unref(ur).subtract(Sr,Cr);break}vr==null&&(vr=vue.unref(ur)),vr=vr&&(vr==null?void 0:vr.format((mr==null?void 0:mr.trim())||Qn.format))||""}else if(Object.prototype.toString.call(ur)==="[object Object]")mr?vr=ur[mr]:vr=pr?ur[pr]:ur;else if(yn(Qn==null?void 0:Qn.type,"select")&&vue.unref(ur)&&pr&&Array.isArray(vue.unref(ur)))vr=vue.unref(ur).map(Sr=>Object.prototype.hasOwnProperty.call(Sr,pr)?Sr[pr]:Sr);else if(yr){const Sr=JSON.parse(cr);console.log(Sr,"urlvalue"),vr=Sr.value}else vr=ur;sr[lr]=vr}else typeof fr=="object"&&!fr.id&&j===1?(console.log(fr.propKey,"value.propKey"),sr[lr]=fr.propKey):typeof fr=="string"&&(sr[lr]=hn(fr))}if(j===1){console.log(sr,"_params");const nr=Object.entries(sr);let lr=J;if(!J.param&&Array.isArray(J)){const fr={};for(const Qn of J)fr[Qn.key]=Qn.value;lr=fr}lr.param=lr.param.map((fr,Qn)=>({...fr,paramKey:nr[Qn][0],defaultValue:nr[Qn][1]||""})),sr=lr}if(x==="2"&&gn!=="{}"){const nr=JSON.parse(gn);Un(nr),nr&&(sr=nr)}function Un(nr){const lr={...sr,...getPageUrlParams(vn)};if(Array.isArray(nr))nr.forEach((fr,Qn)=>{if(typeof fr=="string"){const cr=fr.match(/\${(.+?)\}/g);if(cr!=null&&cr.length){const pr=cr[0].slice(2,-1);pr&&lr[pr]?nr[Qn]=lr[pr]:nr[Qn]=""}}else Un(fr)});else if(Object.prototype.toString.call(nr)==="[object Object]")for(const fr in nr)if(typeof nr[fr]=="string"){const Qn=nr[fr].match(/\${(.+?)\}/g);if(Qn!=null&&Qn.length){const cr=Qn[0].slice(2,-1);cr&&lr[cr]?nr[fr]=lr[cr]:nr[fr]=""}}else Un(nr[fr])}const Zn=getPageUrlParams(vn);for(const nr in Zn)Zn[nr]&&(Zn[nr]=decodeURIComponent(Zn[nr]));sr={...Zn,...hr,...sr};let Hn="";const Gn=Object.keys(sr),ir=Gn.length-1,Kn=Gn.length;Gn.forEach((nr,lr)=>{let fr=sr[nr];Object.prototype.toString.call(fr)==="[object Object]"&&(fr=JSON.stringify(fr)),lr===0?Kn!==1?Hn+=`?${nr}=${fr}&`:Hn+=`?${nr}=${fr}`:lr===ir?Hn+=`${nr}=${fr}`:Hn+=`${nr}=${fr}&`}),Jn.includes("?")&&(Hn=Hn.replace("?","&"));function or(nr){var lr;if(j===1)return{Authentication:(lr=window==null?void 0:window.config)==null?void 0:lr.indicatorToken};if(typeof nr=="string"){const fr=JSON.parse(nr),Qn=getPageUrlParams(vn);if(Object.prototype.toString.call(fr)==="[object Object]"){for(const cr in fr)if(typeof fr[cr]=="string"){const pr=fr[cr].match(/\${(.+?)\}/g);if(pr!=null&&pr.length){const mr=pr[0].slice(2,-1);mr&&Qn[mr]?fr[cr]=Qn[mr]:fr[cr]=""}}}return fr}else return nr}try{const nr=["get","head"].includes(h),lr={};let fr=nr?Jn+Hn:Jn;sr.dataSqlId&&!fr.includes("dataSqlId")&&(fr+=`${fr.includes("?")?"&":"?"}dataSqlId=${sr.dataSqlId}`),Object.prototype.hasOwnProperty.call(sr,"signal")?lr.signal=sr.signal:window.controller&&(lr.signal=window.controller.signal);const Qn=await request({baseURL:er,url:fr,method:h,headers:v?or(v):{},data:nr?{}:sr,...lr});return f(Qn),Yn==null||Yn.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(Qn==null?void 0:Qn.data)||{}}),Qn}catch(nr){console.error(nr)}},Xn=vue.unref(w)!=="design"&&g&&(y||y===void 0)&&setInterval(tr,m*1e3);return vue.onUnmounted(()=>{clearInterval(Xn)}),tr},useImagePath=(c,u=!1)=>{var d;if(!c)return c;let f="";return c!=null&&c.includes("://")?f=c:f=((d=window==null?void 0:window.config)==null?void 0:d.uploadPath)+c,u&&(f=`url(${f})`),f},usePageUrl=(c,u)=>{const f=`${BASE_URL}/preview?pageId=${u}`,d=`${BASE_URL}/${u}`;return c==="preview"?f:d},useIndicatorData=(c={},u=()=>{})=>{var Pn;const{pageMode:f}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:d}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:h}=vue.inject(LOADED_DATA,{setLoadedData:(x,gn)=>{}}),{getAllGlobalModel:v}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),{pageId:p}=vue.inject("templateOperate",{pageId:""})||{},m=vue.inject(COMMON_OPERATE,{operateAction:(x,gn)=>{}}),g=vue.inject("componentList",[]);c.dataType==="indicator"&&d();const y=async(x={})=>{var re,qn,zn,Yn,Wn;if(vue.unref(f)==="design")return;const gn=v();h(c.id,!1);const J=En({...c,globalModel:gn,allComponentList:vue.unref(g)},x),{url:j,...Rn}=J||{},{pathname:Bn,search:w}=window==null?void 0:window.location;let vn=p||((re=window==null?void 0:window.config)==null?void 0:re.pageId);if(!vn&&Bn){const Jn=Bn.split("/");Jn!=null&&Jn.length&&(vn=Jn[Jn.length-1])}if(j&&Rn){let Jn,er;if(c.type==="ecanIndexPanel"&&(Jn=c.theFlag),["/diagram/formData","/diagram"].includes(j)){er={};const Xn=w.slice(1,w.length).split("&");for(const ar of Xn)if(ar){const hr=ar.split("=");if(hr[0])if(hr[0]==="userInfo")try{er.token=(zn=(qn=JSON.parse(decodeURIComponent(hr[1])))==null?void 0:qn.baseInfo)==null?void 0:zn.hrpToken}catch(sr){console.log(sr)}else er[hr[0]]=hr[1]}}try{const tr=await request({url:`${INDICATOR_URL}${j}`,method:"post",headers:{Authentication:(Yn=window==null?void 0:window.config)==null?void 0:Yn.indicatorToken,operateContext:CONTEXT},data:{...Rn,pageId:vn,theFlag:Jn,extParam:er},signal:((Wn=window.controller)==null?void 0:Wn.signal)||""});return x!=null&&x.isTimer&&u(tr),m==null||m.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(tr==null?void 0:tr.data)||{}}),c.type==="ecanIndexPanel"&&(m==null||m.operateAction("SAVE_INDEX_PANEL_REQ_PARAMS",Rn)),tr}catch(tr){console.error(tr)}}},b=vue.unref(f)!=="design"&&((Pn=c==null?void 0:c.graphicConfig)==null?void 0:Pn.pageMode)!=="design"&&c.isOpenRequestTimer&&c.requestInterval&&setInterval(()=>{y({isTimer:!0})},c.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(b)}),y},useHrefParamsToGlobalVariables=()=>{const u=window.location.search.slice(1).split("&"),f=u.length,d={};for(let h=0;h<f;h++){const v=u[h];if(v==null||v==="")continue;const p=v.split("=");if(Array.isArray(p)){const m=p[0];m.includes("{")||(d[m]=p[1])}}window.config.requestParams={...window.config.requestParams,...d},window.config={...window.config,...d}},_sfc_main$B=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"container"},portId:{type:String,default:"norPageConfig"}},setup(c){const{width:u,height:f,isCompatible:d}=vue.inject(GLOBAL_CONFIG,{width:null,height:null,isCompatible:null}),h=vue.inject("setPageHeight",zn=>{}),v=vue.inject("isMobile",!1),p=vue.computed(()=>{const zn={};return(!d.value||!v)&&(zn.width=u.value,zn.height=f.value),{...zn,backgroundColor:c.pageId?"transparent":c.backgroundColor,backgroundImage:useImagePath(c.backgroundImage,!0),backgroundSize:c.backgroundSize}}),m=vue.ref(0),g=vue.ref(0),y=vue.ref(0),b=vue.ref(0),Pn=vue.ref(!1),x=vue.ref();let gn;const J=()=>new Promise(zn=>{vue.nextTick(()=>{u.value&&f.value?(m.value=parseFloat(u.value),g.value=parseFloat(f.value)):(m.value=x.value.clientWidth,g.value=x.value.clientHeight),(!y.value||!b.value)&&(y.value=window.screen.width,b.value=window.screen.height),zn()})}),j=()=>{m.value&&g.value?(x.value.style.width=`${m.value}px`,x.value.style.height=`${g.value}px`):(x.value.style.width=`${y.value}px`,x.value.style.height=`${b.value}px`)};vue.watch([u,f],async()=>{c.pageId||(await J(),j(),Bn(),window.addEventListener("resize",vn),re()),Pn.value=!0},{immediate:!0});const Rn=vue.ref({});vue.provide("scaleValue",Rn);const Bn=()=>{if(d.value&&v){x.value.style.width="100%",x.value.style.height="auto",h("auto");return}const zn=document.body.clientWidth,Yn=document.body.clientHeight,Wn=m.value||y.value,Jn=g.value||b.value,er=zn/Wn;let tr=Yn/Jn;(m.value!==1920||g.value!==1080)&&(tr=g.value/m.value*zn/Jn),Rn.value={widthScale:er,heightScale:tr},x.value&&(x.value.style.transform=`scale(${er}, ${tr})`),h(Rn.value)},w=vue.computed(()=>{var Yn;let zn={};return c.customId==="modalContainer"&&((Yn=vue.unref(Rn))!=null&&Yn.heightScale)&&(zn.height=100/vue.unref(Rn).heightScale+"vh"),zn}),vn=lodashEs.debounce(async()=>{await J(),Bn()},100),re=()=>{const zn=window.MutationObserver;gn=new zn(vn),gn.observe(x.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},qn=()=>{gn&&(gn.disconnect(),gn.takeRecords(),gn=null)};return vue.onMounted(()=>{Pn.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",vn),qn()}),{style:p,container:x,ready:Pn,scaleValue:Rn,containerStyle:w}}}),PageConfig_vue_vue_type_style_index_0_scoped_eced44d2_lang="",_hoisted_1$p=["id"],_hoisted_2$f=["id"];function _sfc_render$G(c,u,f,d,h,v){return vue.openBlock(),vue.createElementBlock("div",{class:"page-config-container",id:c.customId,style:vue.normalizeStyle(c.containerStyle),ref:"container"},[c.customId!=="modalContainer"&&(c.ready||c.pageId)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",id:c.portId,style:vue.normalizeStyle(c.style)},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_2$f)):vue.createCommentVNode("",!0)],12,_hoisted_1$p)}const PageConfig=_export_sfc$1(_sfc_main$B,[["render",_sfc_render$G],["__scopeId","data-v-eced44d2"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",textColor:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[],isCompatible:!0,variableList:[],drillingMode:"pivotTable",pivotTableFontSize:"16px",drillDetailUrl:""},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$A=vue.defineComponent({name:"IndicatorDetailModal",components:{BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,ZoomInOutlined:ZoomInOutlined$1,ZoomOutOutlined:ZoomOutOutlined$1,RedoOutlined:RedoOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const f=vue.ref(!1),d=vue.ref([]),h=vue.ref(!1),v=vue.ref(),p=vue.ref(!0),m=vue.ref(1),g=vue.inject("isMobile",!1),y=vue.computed(()=>c.theme),b=vue.computed(()=>m.value!==1?{transform:`scale(${m.value})`,transformOrigin:"left top"}:{}),Pn=async({data:zn,indicatorUrl:Yn,indicatorToken:Wn,context:Jn,pageId:er})=>{var hr,sr;p.value=!0,h.value=!0,f.value=!0;let tr=[];const{graphicConfig:Xn,theFlag:ar}=vue.unref(zn)||{};if(Xn){const{leftAxisList:Un=[],rightAxisList:Zn=[],indicators:Hn=[]}=Xn,Gn=Un.concat(Zn).concat(Hn);Gn!=null&&Gn.length&&(tr=Gn.map(ir=>({calcType:ir.calcType||"COLUMN",columnName:ir.name,hrpIndexCode:ir.indexCode,hrpIndexCodeNum:ir.indexCodeNum,label:ir.label,show:ir.show,formula:ir.formula})))}if(tr!=null&&tr.length)try{const Un=await request({url:`${vue.unref(Yn)}/diagram/obtainIndicatorInfo`,method:"post",headers:{Authentication:Wn,operateContext:Jn},data:{source:"INDICATOR_LIB",pageId:er,indicatorList:tr,theFlag:ar}}),Zn=((hr=Un==null?void 0:Un.data)==null?void 0:hr.data)||[];(sr=Zn[0])!=null&&sr.remark?(v.value=Zn[0].remark,d.value=[]):(v.value=null,d.value=Zn)}catch{}finally{h.value=!1}vue.nextTick(()=>{J(!0),j(!0)})},x=()=>document.querySelector("#modalContainer")||document.body,gn=vue.computed(()=>{let zn="ind-detail-modal";return(p.value||vue.unref(g))&&(zn+=" full",vue.unref(g)&&(zn+=" mobile")),vue.unref(y)==="darkBlue"&&(zn+=" darkBlue"),zn}),J=zn=>{const Yn=document.querySelector(".ind-detail-modal .ant-modal-header");Yn&&(zn?Yn.addEventListener("dblclick",Bn):Yn.removeEventListener("dblclick",Bn))},j=zn=>{const Yn=document.querySelector(".ind-detail-modal .ant-modal-header");if(Yn)if(zn)Yn.addEventListener("mousedown",Rn);else{const Wn=Yn.parentElement;Wn&&(Wn.style.left="",Wn.style.top=""),Yn.removeEventListener("mousedown",Rn)}};function Rn(zn){dragModalAction(zn,".ind-detail-modal .ant-modal-header")}const Bn=()=>{p.value=!p.value,vue.nextTick(()=>{p.value?j(!1):j(!0)})},w=()=>{J(!1),j(!1)},vn=()=>{m.value+=.5},re=()=>{vue.unref(m)>1&&(m.value-=.5)},qn=()=>{m.value=1};return vue.watch(m,zn=>{localStorage.setItem("indDetailZoom",String(zn))}),vue.watch(f,zn=>{zn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.onMounted(()=>{var Yn,Wn;const zn=localStorage.getItem("indDetailZoom");if(zn&&(m.value=+zn),vue.unref(g)){const Jn=document.querySelector("#modalContainer");p.value=!0,(Yn=Jn==null?void 0:Jn.style)==null||Yn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(Wn=Jn==null?void 0:Jn.style)==null||Wn.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:Pn}),{visible:f,dataList:d,isLoading:h,hasOwn:mn,remarkData:v,wrapClassName:gn,isIndFullScreen:p,infoStyle:b,indDetailZoom:m,isMobile:g,getContainer:x,toggleFullScreen:Bn,onDetailCancel:w,handleZoomIn:vn,handleZoomOut:re,handleResetZoom:qn}}}),IndicatorDetailModal_vue_vue_type_style_index_0_scoped_3af47b3e_lang="",IndicatorDetailModal_vue_vue_type_style_index_1_lang="",_withScopeId$7=c=>(vue.pushScopeId("data-v-3af47b3e"),c=c(),vue.popScopeId(),c),_hoisted_1$o=_withScopeId$7(()=>vue.createElementVNode("div",{class:"modal-title"},"指标详情",-1)),_hoisted_2$e={class:"zoom-btn"},_hoisted_3$7={key:0,class:"spin-container"},_hoisted_4$6=["innerHTML"],_hoisted_5$4={class:"index-name"},_hoisted_6$4={key:0,class:"card-row"},_hoisted_7$4=_withScopeId$7(()=>vue.createElementVNode("div",{class:"label"},"计量单位:",-1)),_hoisted_8$4={class:"content"},_hoisted_9$3={key:1,class:"card-row"},_hoisted_10$3=_withScopeId$7(()=>vue.createElementVNode("div",{class:"label"},"指标定义:",-1)),_hoisted_11$3={class:"content"},_hoisted_12$3={key:2,class:"card-row"},_hoisted_13$3=_withScopeId$7(()=>vue.createElementVNode("div",{class:"label"},"计算方法:",-1)),_hoisted_14$3={class:"content"},_hoisted_15$2={key:3,class:"card-row"},_hoisted_16$1=_withScopeId$7(()=>vue.createElementVNode("div",{class:"label"},"指标说明:",-1)),_hoisted_17$1={class:"content"};function _sfc_render$F(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("redo-outlined"),g=vue.resolveComponent("zoom-out-outlined"),y=vue.resolveComponent("zoom-in-outlined"),b=vue.resolveComponent("switcher-outlined"),Pn=vue.resolveComponent("border-outlined"),x=vue.resolveComponent("a-spin"),gn=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(gn,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=J=>c.visible=J),width:"55%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isIndFullScreen?"":"70vh",height:c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$o]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$e,[c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(m,{key:0,class:"modal-icon",title:"还原",onClick:c.handleResetZoom},null,8,["onClick"])):vue.createCommentVNode("",!0),c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(g,{key:1,class:"modal-icon",title:"缩小内容",onClick:c.handleZoomOut},null,8,["onClick"])):vue.createCommentVNode("",!0),vue.createVNode(y,{class:"modal-icon",title:"放大内容",onClick:vue.withModifiers(c.handleZoomIn,["stop","prevent"])},null,8,["onClick"]),!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(b,{key:2,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(Pn,{key:3,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.isLoading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$7,[vue.createVNode(x,{size:"large"})])):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"info-container",style:vue.normalizeStyle(c.infoStyle)},[c.remarkData?(vue.openBlock(),vue.createElementBlock("div",{key:0,innerHTML:c.remarkData},null,8,_hoisted_4$6)):c.dataList.length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(c.dataList,(J,j)=>(vue.openBlock(),vue.createElementBlock("div",{class:"detail-wrap",key:j},[vue.createElementVNode("div",_hoisted_5$4,vue.toDisplayString(J.indexName||"--"),1),c.hasOwn(J,"theUnit")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,[_hoisted_7$4,vue.createElementVNode("div",_hoisted_8$4,vue.toDisplayString(J.theUnit||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(J,"meaning")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$3,[_hoisted_10$3,vue.createElementVNode("div",_hoisted_11$3,vue.toDisplayString(J.meaning||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(J,"theFormula")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$3,[_hoisted_13$3,vue.createElementVNode("div",_hoisted_14$3,vue.toDisplayString(J.theFormula||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(J,"theExplain")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[_hoisted_16$1,vue.createElementVNode("div",_hoisted_17$1,vue.toDisplayString(J.theExplain||"--"),1)])):vue.createCommentVNode("",!0)]))),128)):vue.createCommentVNode("",!0)],4))]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const IndicatorDetailModal=_export_sfc$1(_sfc_main$A,[["render",_sfc_render$F],["__scopeId","data-v-3af47b3e"]]),lineProps={...props$1,id:"",name:"折线图",keyName:"折线图",type:"ecanLine",width:"400px",height:"400px",top:"",left:"",rotate:"",data:[{name:"名称一",value:235,type:"类型一"},{name:"名称二",value:280,type:"类型一"},{name:"名称三",value:230,type:"类型一"},{name:"名称四",value:335,type:"类型一"}],titleText:"",titleFontSize:"12px",titleColor:"#333",fontWeight:400,textAlign:"left",titleSubtext:"",titleLeft:"",legendShow:!0,legendOrient:"horizontal",legendTextStyleColor:"#333",legendTop:"top",legendLeft:"center",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitAreaShow:!1,xAxisSplitLineInterval:0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineShow:!0,xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitAreaShow:!1,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",valueTypeDataFieldNames:{name:"name",value:"value",type:"type"},keyTypeDataFieldNames:{name:"name",types:[]},dataFieldConfigType:"value",graphicConfig:{},tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,areaGradientShow:!1,areaGradientColor:"",isBoundaryGap:!0,yAxisLabelShow:!0,yAxisSplitLineType:"solid",legendItemGap:10,legendItemWidth:25,legendItemHeight:14,legendType:"",shadowColor:"",shadowBlur:0,shadowOffsetY:0,shadowOffsetX:0,legendFontSize:"12px",xAxisLabelFontSize:"12px",yAxisLabelFontSize:"12px",graphicType:"ecanLine",tooltipPosition:"",isShowMarkLine:!1,markLineType:"average",legendFormatter:"{name}",legendWidth:null,legendHeight:null,legendTextWidth:null,legendScroll:!1,yAxisName:"",xAxisName:"",xAxisMaxValue:null,yAxisMaxValue:null,xAxisLabelShow:!0,tooltipTextStyleColor:"",noDataTip:!1,tipText:"暂无数据",tipTextColor:"#000000",tipTextFontSize:"18px",defaultRangeValue:!1,startValue:"",endValue:"",isForbidClick:!1},lineComponentProps=transformToComponentProps(lineProps),lineEvents=["click","refreshData","resetRecord"],useDownloadFile=async c=>{var g;const u=await request.post(c,{},{responseType:"blob"}),{data:f,headers:d}=u,h=d["content-disposition"].replace(/\w+;filename=(.*)/,"$1"),v=new Blob([f]),p=document.createElement("a"),m=window.URL.createObjectURL(v);p.href=m,p.download=decodeURI(h),p.style.display="none",document.body.appendChild(p),p.click(),(g=p.parentNode)==null||g.removeChild(p),window.URL.revokeObjectURL(m)},modalProps={id:"",type:"ecanModal",title:"",titleFontSize:"14px",titleColor:"",width:"1000px",height:"800px",originalWidth:"1920px",originalHeight:"1080px",backgroundColor:"#fff",backgroundImage:"",backgroundSize:"100% 100%",keyName:"弹窗",componentList:[],fullModal:!1,destroyOnClose:!0,position:"default",closeBtnColor:"#333",isShowCloseBtn:!0,events:[],borderRadius:"0",borderWidth:"0px",borderColor:"",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",allComponentList:[],requestList:[],parentIframeId:"",banScale:!1},modalComponentProps=transformToComponentProps(modalProps),modalEvents=["showModal","hideModal"],containerType=["ecanBorder","ecanTabs","ecanCirculate"];function handleScrollCombinations(c){const{containerMap:u={},sourceList:f=[],pageConfig:d={}}=c,h=lodashEs.cloneDeep(c.componentList),v=h.filter(p=>p.type==="ecanTabs"&&p.isAutoScroll);if(v!=null&&v.length)for(const p of v){const m=u[p.id],g=[];if((!mn(p,"componentList")||!(p!=null&&p.componentList))&&(p.componentList=[]),m){let y=0;for(const b in m){const Pn=m[b],x=[];if(Pn!=null&&Pn.length)for(const gn of Pn){let J=h.find(j=>j.id===gn);J||(J=f.find(j=>j.id===gn)),J&&(x.push(J),containerType.includes(J.type)&&x.push(...getComponentByContainer(J.id,u,f)))}for(const gn of x)mn(gn,"scale")?parseFloat(b)>0&&(gn.left=parseFloat(gn.left)+y+"px"):(gn.left=parseFloat(gn.sourceLeft||gn.left)-parseFloat(p.sourceLeft||p.left)+y+"px",gn.top=parseFloat(gn.sourceTop||gn.top)-parseFloat(p.sourceTop||p.top)+"px"),g.includes(gn.id)||g.push(gn.id);p.componentList.push(...x),y=getMaxLeftInComponents(x,d)}}for(const y of g){const b=h.findIndex(Pn=>Pn.id===y);b!==-1&&h.splice(b,1)}}return h}function compatibleMobileList(c){var m,g,y;const u=document.body.clientWidth,{combinationMap:f={},sourceList:d=[],pageConfig:h={}}=c,v=c.containerMap,p=lodashEs.cloneDeep([...c.componentList,...getTabsSomeComponentList(v,d)]);if(handleContainerMap(v,p),(m=Object.keys(v))!=null&&m.length||(g=Object.keys(f))!=null&&g.length){for(const j in v){const Rn=p.find(Bn=>Bn.id===j);if(Rn){if(Rn!=null&&Rn.isFlowGrid){Rn.sourceLeft=Rn.left,Rn.sourceTop=Rn.top;continue}mn(Rn,"parentId")||(Rn.parentId="",Rn.sourceLeft=Rn.left,Rn.sourceTop=Rn.top);for(const Bn in v[j])if(v[j][Bn])for(const w of v[j][Bn]){const vn=p.find(re=>re.id===w);if(vn&&(vn.parentId=j,vn.sourceLeft=vn.left,vn.sourceTop=vn.top,vn.left=parseFloat(vn.left)-parseFloat(Rn.sourceLeft||Rn.left)+"px",vn.top=parseFloat(vn.top)-parseFloat(Rn.sourceTop||Rn.top)+"px",vn.type==="ecanIndexPanel")){const{componentIds:re}=vn;for(const qn of re){const zn=p.find(Yn=>Yn.id===qn);zn&&(zn.left=parseFloat(zn.left)-parseFloat(vn.sourceLeft)+"px",zn.top=parseFloat(zn.top)-parseFloat(vn.sourceTop)+"px")}}}}}const b=Array.from(new Set(p.filter(j=>(!mn(j,"parentId")||j.parentId==="")&&j.combinationId).map(j=>j.combinationId))),Pn=getCombinationList(b,{...c,componentList:p,pageConfig:h});Pn!=null&&Pn.length&&p.unshift(...Pn);const x=["ecanPie","ecanLine","ecanBar","ecanScatter","ecanComboGraph","ecanCustomGraph","ecanRadar","ecanMap","ecanTable"],gn=p.filter(j=>x.includes(j.type)&&!mn(j,"parentId")),J=[];for(const j of gn)if(j){const Rn=j.id+"_vir";if(J.push({id:Rn,keyName:j.keyName+"_vir",parentId:"",type:"ecanBorder",borderRadius:"",borderWidth:null,width:u,height:getFormatWh(j.height,h==null?void 0:h.height),left:j.left,top:j.top,sourceLeft:j.left,sourceTop:j.top}),j.parentId=Rn,j.sourceLeft=j.left,j.sourceTop=j.top,j.left=10,j.top=0,j.width=u-20+"px",j.type==="ecanTable"){const{columns:Bn=[]}=j;j.scrollX="max-content";for(const w of Bn)(y=w==null?void 0:w.width)!=null&&y.includes("%")&&(w.width=parseFloat(w.width)/100*u+"px")}}J!=null&&J.length&&p.unshift(...J);for(const j of p){if(j.parentId===""&&containerType.includes(j.type))j.sourceWidth=getFormatWh(j.width,h==null?void 0:h.width),j.height=(u/(j.sourceWidth/getFormatWh(j.height,h==null?void 0:h.height))).toFixed(2)+"px",j.width="100%",j.position="relative",j.top="auto",j.left="auto";else{const Rn=p.find(Bn=>Bn.id===j.parentId);if((Rn==null?void 0:Rn.parentId)===""){const Bn=Rn.sourceWidth||getFormatWh(Rn.width,h==null?void 0:h.width),w=u/Bn;j.scale=w,j.top=parseFloat(j.top)*w-getFormatWh(j.height,h==null?void 0:h.height)*(1-w)/2+"px",j.left=parseFloat(j.left)*w-getFormatWh(j.width,h==null?void 0:h.width)*(1-w)/2+"px"}}j.type==="ecanModal"&&(j.parentId="",j.fullModal=!0)}return sortList(p)}return p}function handleContainerMap(c,u){const f=lodashEs.cloneDeep(c),d=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(d!=null&&d.length)for(const h of d){const v=f[h.id];for(const p in v)for(const m of v[p]){const g=u.find(y=>y.id===m);if(g&&containerType.includes(g.type)){const y=getComponentByContainer(g.id,f,u);for(const b of y)c[h.id][p].push(b.id),containerType.includes(b.type)&&delete c[b.id];delete c[g.id]}}}}function getTabsSomeComponentList(c,u){const f=[],d=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(d!=null&&d.length)for(const h of d){const v=c[h.id];for(const p in v)if(parseFloat(p)>0)for(const m of v[p]){const g=u.find(y=>y.id===m);g&&(f.push(g),containerType.includes(g.type)&&f.push(...getComponentByContainer(g.id,c,u)))}}return f}function getComponentByContainer(c,u,f){const d=[],h=u[c];for(const v in h)for(const p of h[v]){const m=f.find(g=>g.id===p);m&&(d.push(m),containerType.includes(m.type)&&d.push(...getComponentByContainer(m.id,u,f)))}return d}function getCombinationList(c,u,f){const{combinationMap:d={},componentList:h=[],pageConfig:v={}}=u,p=[];for(const m of c){const g=d[m];if(g!=null&&g.length){const y=h.filter(b=>g.includes(b.id));if(y!=null&&y.length){const b=getCombinateRect(y,v);if(b){p.push({...b,id:m,keyName:m,parentId:f||"",type:"ecanBorder",borderRadius:"",borderWidth:null,sourceLeft:b.left,sourceTop:b.top});for(const Pn of y)Pn&&(Pn.parentId=m,Pn.sourceLeft=Pn.left,Pn.sourceTop=Pn.top,Pn.left=parseFloat(Pn.left)-parseFloat(b.left)+"px",Pn.top=parseFloat(Pn.top)-parseFloat(b.top)+"px")}}}}return p}function sortList(c){const f=c.filter(d=>d.parentId===""||(d==null?void 0:d.isFlowGrid));if(f!=null&&f.length){const d=lodashEs.cloneDeep(f).map(h=>({...h,sourceTop:parseFloat(h.sourceTop),sourceLeft:parseFloat(h.sourceLeft)}));for(let h=0;h<d.length-1;h++)for(let v=0;v<d.length-h-1;v++){let p=!1;if((d[v].sourceTop-d[v+1].sourceTop>40||Math.abs(d[v+1].sourceTop-d[v].sourceTop)<=40&&d[v].sourceLeft>d[v+1].sourceLeft)&&(p=!0),p){const m=d[v];d[v]=d[v+1],d[v+1]=m}}for(const h of d){const v=c.findIndex(p=>p.id===h.id);v!==-1&&c.splice(v,1)}return[...d,...c]}return c}function getCombinateRect(c,u){const f=c.sort((p,m)=>parseFloat(p.top)-parseFloat(m.top))[0],d=c.sort((p,m)=>parseFloat(p.left)-parseFloat(m.left))[0],h=c.map(p=>({...p,computedTop:parseFloat(p.top)+getFormatWh(p.height,u==null?void 0:u.height)})).sort((p,m)=>m.computedTop-p.computedTop)[0],v=c.map(p=>({...p,computedLeft:parseFloat(p.left)+getFormatWh(p.width,u==null?void 0:u.width)})).sort((p,m)=>m.computedLeft-p.computedLeft)[0];return f&&d&&h&&v?{left:d.left,top:f.top,width:v.computedLeft-parseFloat(d.left)+"px",height:h.computedTop-parseFloat(f.top)+"px"}:null}function getMaxLeftInComponents(c,u){const f=c.map(d=>parseFloat(d.left)+getFormatWh(d.width,u==null?void 0:u.width)).sort((d,h)=>h-d)[0];return f||0}function moveToComponentList(c,u,f){const d=c[f],h=[];if(d)for(const v in d){const p=d[v];for(const m of p){const g=u.find(y=>y.id===m);g&&(h.push(g),containerType.includes(g.type)&&h.push(...getComponentByContainer(g.id,c,u)))}}return h}const _sfc_main$z=vue.defineComponent({name:"Render",props:{component:{type:Object,default:()=>{}}},setup(c,{emit:u}){u("ready",c.component.id)}});function _sfc_render$E(c,u,f,d,h,v){return c.component.parentId?(vue.openBlock(),vue.createBlock(vue.Teleport,{key:0,to:"#container_"+c.component.parentId},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.mergeProps({style:{scale:c.component.scale}},c.component),null,16,["style"]))],8,["to"])):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.normalizeProps(vue.mergeProps({key:1},c.component)),null,16))}const Render=_export_sfc$1(_sfc_main$z,[["render",_sfc_render$E]]),EcanRender=withInstall$1(Render),_sfc_main$y=vue.defineComponent({name:"EcanModal",components:{AModal:antDesignVue.Modal,CloseOutlined:CloseOutlined$1,Render:EcanRender},props:{...modalComponentProps},setup(c,{emit:u}){const f=vue.ref([]),d=vue.inject("isMobile",!1),{width:h,height:v}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),p=vue.computed(()=>c.fullModal),m=vue.inject("getContainerMap",()=>{}),g=vue.inject("getCombinationMap",()=>{}),{clearInteractiveData:y,interactiveData:b,setRequestData:Pn}=vue.inject(GLOBAL_MODEL,{setRequestData:(Sr,kr)=>{},clearInteractiveData:()=>{},interactiveData:null}),x=()=>document.getElementById("ProviderConfig")||document.body,gn=vue.computed(()=>{const Sr=c.position;return{verticalAlign:{default:"",top:"top",center:"middle",bottom:"bottom"}[Sr]}}),J=c.fullModal?"1920px":c.width,j=c.fullModal?"1080px":c.height,Rn=c.originalWidth,Bn=c.originalHeight,w=vue.ref("80%"),vn=vue.ref(0),re=vue.ref(),qn=vue.ref(0),zn=vue.ref({}),Yn=usePickComponentStyle(c),Wn=vue.ref({}),Jn=vue.ref(!1),er=vue.ref();let tr;const Xn=()=>{re.value=parseFloat(J)/parseFloat(Rn);const Sr=parseFloat(j)/parseFloat(Bn),kr=document.body.offsetWidth,Cr=document.body.offsetHeight;if(vn.value=kr*vue.unref(re),qn.value=Cr*Sr,w.value=`${vue.unref(re)*100}%`,zn.value={width:`${vue.unref(vn)}px`,height:`${vue.unref(qn)}px`,border:`${c.borderWidth} solid ${c.borderColor}`,borderRadius:c.borderRadius+"px",boxShadow:c.boxShadow},Wn.value={...vue.unref(Yn),backgroundImage:useImagePath(c.backgroundImage,!0)},d)Wn.value={...Wn.value,width:"100%",height:"100%"};else{const br={...Wn.value,width:J,height:j};c.banScale&&vue.unref(p)?(br.width="100%",br.height="100%"):br.transform=`scale(${vue.unref(vn)/parseFloat(J)},${vue.unref(qn)/parseFloat(j)})`,Wn.value=br}},ar=lodashEs.debounce(()=>{Xn()},100),hr=()=>{const Sr=window.MutationObserver;tr=new Sr(ar),tr.observe(document.body,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},sr=()=>{tr&&(tr.disconnect(),tr.takeRecords(),tr=null)},Un=vue.ref(!1),{touchRequest:Zn}=vue.inject(REQUEST_MODEL,{touchRequest:()=>{}}),Hn=vue.ref(""),Gn=()=>{var Cr;const{title:Sr}=c,kr=(Cr=vue.unref(b))==null?void 0:Cr.RECORD;return kr?hn(Sr,{textData:kr},{useNewline:!1,useSpace:!1}):Sr},ir=useEmitEvent(c),Kn=Sr=>{const{changeIframeStyle:kr}=window.parent;kr&&typeof kr=="function"&&kr({iframeId:c.parentIframeId||"",action:Sr})},or=()=>{vue.unref(p)&&Kn("open"),d&&(document.documentElement.style.overflow="hidden"),Hn.value=Gn(),Un.value=!0},dr=ir("hideModal",()=>{vue.unref(p)&&Kn("close"),u("close"),d&&(document.documentElement.style.overflow="hidden auto",f.value=[]),Un.value=!1}),nr=()=>{dr()},lr=()=>{dr(),y()},{setModalModel:fr,pushUseModalIds:Qn,popUseModalIds:cr}=vue.inject(MODAL_MODEL,{pushUseModalIds:Sr=>{},popUseModalIds:()=>{},setModalModel:(Sr,kr)=>{}}),pr=vue.computed(()=>{let Sr=c.componentList;const kr=lodashEs.cloneDeep(c.componentList),Cr=m(),br=g(),xr={containerMap:Cr,combinationMap:br};d&&(Sr=compatibleMobileList({...xr,componentList:kr,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}})),Sr=handleScrollCombinations({...xr,componentList:Sr,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}});const Ar=[];for(const Er of Sr)if(Er.type==="ecanCirculate"){const Ir=moveToComponentList(Cr,vue.unref(kr),Er.id);Er.componentList=Ir,Ar.push(...Ir.map(Mr=>Mr.id))}else if(Er.type==="ecanTable"){const{headerFontSize:Ir,fontSize:Mr,size:Hr,bodyRowHeight:Lr,headRowHeight:Vr}=Er;if(!Lr||!Vr)if(Er.size){let Nr=0;switch(Hr){case"default":Nr=16;break;case"middle":Nr=12;break;case"small":Nr=8;break}Lr||(Er.bodyRowHeight=(Nr*2+parseFloat(Mr)*1.5715).toFixed(0)+"px"),Vr||(Er.headRowHeight=(Nr*2+parseFloat(Ir)*1.5715).toFixed(0)+"px")}else Lr||(Er.bodyRowHeight="54px"),Vr||(Er.headRowHeight="54px")}if(Ar!=null&&Ar.length)for(const Er of Ar){const Ir=Sr.findIndex(Mr=>Mr.id===Er);Ir!==-1&&Sr.splice(Ir,1)}return Sr}),mr=()=>{const Sr=c.id;let kr=[];const Cr=c.componentList;Array.isArray(Cr)&&(kr=Cr.map(br=>br.id),fr(Sr,[...new Set(kr)]))},gr=vue.ref(!1),yr={};for(const Sr of c.requestList)yr[Sr.requestName]=useRequestData(Sr);vue.watch(()=>Un.value,async Sr=>{if(Sr)Jn.value=!1,Qn(c.id),mr(),await vue.nextTick(()=>{Xn(),window.addEventListener("resize",ar),hr(),Jn.value=!0}),Zn();else{if(Pn)for(const kr in yr)Pn(kr,{});cr(),window.removeEventListener("resize",ar),sr()}});const ur=vue.computed(()=>vue.unref(re)>=1),vr=vue.computed(()=>{let Sr="ecan-modal";return vue.unref(ur)&&(Sr+=" ecan-full-width-modal"),vue.unref(p)&&(Sr+=" ecan-full-modal"),Sr});return useOnEvent(c,{showModal:or,hideModal:dr}),{modalRef:er,containStyle:zn,contentStyle:Wn,getContainer:x,modalStyle:gn,modalWith:w,isFullModal:p,style:Yn,visible:Un,showModal:or,onOk:nr,onCancel:lr,isFullWidth:ur,wrapClassName:vr,ready:Jn,usedComponentList:pr,isMobile:d,readyIds:f,hasOwn:mn,onComponentReady:Sr=>{f.value.push(Sr)},formatTitle:Hn,requestLoaded:gr}}}),Modal_vue_vue_type_style_index_0_scoped_cb5d6923_lang="",Modal_vue_vue_type_style_index_1_lang="";function _sfc_render$D(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("render"),g=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(g,{getContainer:c.getContainer,wrapClassName:c.wrapClassName,centered:"",visible:c.visible,footer:null,width:c.isFullModal||c.isFullWidth?"100%":c.modalWith,destroyOnClose:c.destroyOnClose,style:vue.normalizeStyle(c.modalStyle),closable:!1,onOk:c.onOk,onCancel:c.onCancel,ref:"modalRef",id:"container_"+c.id},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"contain",ref:"containRef",style:vue.normalizeStyle(c.containStyle)},[c.ready?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"content",style:vue.normalizeStyle(c.contentStyle)},[vue.createElementVNode("div",{class:"header-bar",style:vue.normalizeStyle({backgroundColor:c.backgroundColor,padding:"20px 30px",height:c.isMobile?"62px":""})},[c.formatTitle?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"ant-modal-title",style:vue.normalizeStyle({fontSize:c.titleFontSize,color:c.titleColor})},vue.toDisplayString(c.formatTitle),5)):vue.createCommentVNode("",!0),c.isShowCloseBtn?(vue.openBlock(),vue.createBlock(p,{key:1,class:"close-icon",style:vue.normalizeStyle({color:c.closeBtnColor}),onClick:c.onCancel},null,8,["style","onClick"])):vue.createCommentVNode("",!0)],4),c.usedComponentList.length?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(c.isMobile?"mobile-wrap":"")},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.usedComponentList,(y,b)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:y.id+b},[c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[c.hasOwn(y,"parentId")&&(c.readyIds.includes(y.parentId)||y.parentId==="")?(vue.openBlock(),vue.createBlock(m,{key:0,component:y,onReady:c.onComponentReady},null,8,["component","onReady"])):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.type),vue.normalizeProps(vue.mergeProps({key:1},y)),null,16))],64))),128))],2)):vue.renderSlot(c.$slots,"default",{key:1},void 0,!0)],4)):vue.createCommentVNode("",!0)],4)]),_:3},8,["getContainer","wrapClassName","visible","width","destroyOnClose","style","onOk","onCancel","id"])}const Modal=_export_sfc$1(_sfc_main$y,[["render",_sfc_render$D],["__scopeId","data-v-cb5d6923"]]),EcanModal=withInstall$1(Modal);core$1.use([renderers.CanvasRenderer,charts.LineChart,components$1.ToolboxComponent,components$1.TitleComponent,components$1.LegendComponent,components$1.MarkLineComponent]);const _sfc_main$x=vue.defineComponent({name:"EcanLine",props:{...lineComponentProps},components:{Spin,Echarts,EcanModal},setup(c,{expose:u}){const f=vue.ref(!1),{pageMode:d,fontFamily:h}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal",fontFamily:""}),v=vue.inject("showIndDetail",ir=>{}),p=vue.inject("usedComponentList",[]),m=vue.ref(),g=vue.ref(!1),y=usePickComponentStyle(c),b=vue.ref([]),Pn=vue.ref([]),x=vue.ref(),gn=vue.computed(()=>g.value?ZOOM_FONT_SIZE:12),J=vue.ref({});let j;const Rn=vue.ref([]),Bn=vue.computed(()=>{const ir=c.xAxisLabelFormatter,Kn=c.yAxisLabelFormatter;return{textStyle:{fontFamily:vue.unref(h)},toolbox:{show:c.toolboxShow,left:c.toolboxLeft,top:c.toolboxTop,itemSize:c.toolboxItemSize,itemGap:c.toolboxItemGap,orient:c.toolboxOrient,feature:{myDownload:{show:c.toolboxDownloadShow,title:"数据下载",icon:"path://M502.010485 765.939573c3.773953 3.719718 8.686846 5.573949 13.596669 5.573949 0.075725 0 0.151449-0.010233 0.227174-0.011256 0.329505 0.016373 0.654916 0.050142 0.988514 0.050142 0.706081 0 1.400906-0.042979 2.087545-0.116657 4.352121-0.366344 8.607028-2.190899 11.961426-5.496178l335.053985-330.166675c7.619538-7.509021 7.709589-19.773346 0.200568-27.393907s-19.774369-7.711636-27.39493-0.201591L536.193005 706.304358 536.193005 50.019207c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 657.032164-306.881342-302.44838c-7.618515-7.509021-19.883863-7.419993-27.393907 0.199545-7.509021 7.619538-7.419993 19.884886 0.199545 27.393907L502.010485 765.939573z, M867.170139 711.020776c-10.698666 0-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 13.054317-10.620895 23.675212-23.676236 23.675212L205.182103 919.486668c-13.054317 0-23.676236-10.620895-23.676236-23.675212L181.505867 730.391962c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 34.416857 28.000728 62.416562 62.417585 62.416562l618.941638 0c34.417881 0 62.417585-27.999704 62.417585-62.416562L886.540302 730.391962C886.541325 719.693296 877.868805 711.020776 867.170139 711.020776z",onclick(){useDownloadFile(c.toolboxDownloadUrl)}},myDataZoom:{show:g.value?!1:c.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){var or;g.value=!0,(or=x.value)==null||or.showModal()}},myInfo:{show:c.toolboxInfoShow,title:"详情",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){v(c)}}}},title:{text:c.titleText,subText:c.titleSubtext,textStyle:{fontSize:c.titleFontSize,fontWeight:c.fontWeight,color:c.titleColor},left:c.textAlign},grid:{top:c.gridTop,bottom:c.gridBottom,left:c.gridLeft,right:c.gridRight,containLabel:c.gridContainLabel},color:c.colors,tooltip:{trigger:"axis",textStyle:{fontSize:gn.value,color:c.tooltipTextStyleColor},show:c.tooltipShow,formatter:or=>{var fr;const dr=or.length;let nr="",lr=c.tooltipFormatter;j=(fr=or[0])==null?void 0:fr.data,lr===""&&(lr="{marker} {a} {c}");for(let Qn=0;Qn<dr;Qn++){const{marker:cr,seriesName:pr,name:mr,value:gr,data:yr}=or[Qn]||{};if(Qn===0){let ur=mr;typeof mr=="string"&&mr[0]==="0"&&!isNaN(+mr)&&(ur=(+mr).toString()),nr+=`${Fn(ir,ur)}<br/>`}nr+=hn(lr,{textData:{marker:cr,name:mr,value:gr,a:pr,b:mr,c:gr||0,...yr}},{useNewline:!0,useSpace:!0}),nr+="<br/>"}return nr},position:c.tooltipPosition||void 0},xAxis:{type:"category",boundaryGap:c.isBoundaryGap,data:vue.unref(Pn).map(or=>{let dr={};return or&&typeof or=="object"?dr={...or}:dr={value:or},dr}),minInterval:c.xAxisMinInterval,splitLine:{show:c.xAxisSplitLineShow,lineStyle:{color:c.xAxisSplitLineStyleColor},interval:c.xAxisSplitLineInterval},splitArea:{show:c.xAxisSplitAreaShow},axisLabel:{show:c.xAxisLabelShow,color:c.xAxisLabelColor,interval:c.xAxisLabelInterval||0,rotate:c.xAxisLabelRotate,width:c.xAxisLabelWidth,overflow:c.xAxisLabelOverflow,fontSize:c.xAxisLabelFontSize,formatter(or){return typeof or=="string"&&or[0]==="0"&&!isNaN(+or)&&(or=(+or).toString()),Fn(ir,or)}},axisLine:{show:c.xAxisLineShow,lineStyle:{color:c.xAxisLineStyleColor}},axisTick:{show:c.xAxisTickShow},name:c.xAxisName,nameTextStyle:{fontSize:c.xAxisLabelFontSize,color:c.xAxisLabelColor,align:"left"},max:c.xAxisMaxValue||null},yAxis:{type:"value",minInterval:c.yAxisMinInterval,splitLine:{show:c.yAxisSplitLineShow,lineStyle:{color:c.yAxisSplitLineStyleColor,type:c.yAxisSplitLineType}},splitArea:{show:c.yAxisSplitAreaShow},axisLabel:{show:c.yAxisLabelShow,fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,formatter(or){return Fn(Kn,or)}},axisLine:{show:c.yAxisLineAlwaysDisplay,lineStyle:{color:c.yAxisLineStyleColor}},name:c.yAxisName,nameTextStyle:{fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,align:"right"},max:c.yAxisMaxValue||null},legend:{type:c.legendScroll?"scroll":"plain",width:c.legendWidth,height:c.legendHeight,show:c.legendShow,orient:c.legendOrient,top:c.legendTop,left:c.legendLeft,textStyle:{lineHeight:(g.value?ZOOM_FONT_SIZE:parseFloat(c.legendFontSize))+8,rich:{text:{width:c.legendTextWidth,color:c.legendTextStyleColor,fontSize:g.value?ZOOM_FONT_SIZE:c.legendFontSize}}},itemHeight:c.legendItemHeight,itemWidth:c.legendItemWidth,itemGap:c.legendItemGap,data:vue.unref(Rn).map(or=>({name:or.name,icon:c.legendType})),formatter:or=>getLegendFormat(c.legendFormatter,{name:or})},series:vue.unref(b)}}),w=()=>{g.value=!1},{getGlobalModel:vn,setGlobalModel:re}=vue.inject(GLOBAL_MODEL,{getGlobalModel:ir=>{},setGlobalModel:(ir,Kn)=>{}}),qn=vue.computed(()=>c.isShowMarkLine?{markLine:{data:[{type:c.markLineType}]}}:{}),zn=(ir=[],Kn=!1)=>{var fr;let or;if(c.dataFieldConfigType==="key"){const Qn=Kn?c.keyTypeDataFieldNames:null;or=In(ir,Qn)}else if(c.dataFieldConfigType==="value"){const Qn=Kn?c.valueTypeDataFieldNames:null;or=Vn(ir,Qn)}Pn.value=or.dimensions,Rn.value=or.dataset;const dr=or.dataset,nr=[],lr=dr.length;for(let Qn=0;Qn<lr;Qn++){const cr={};c.shadowColor&&(cr.shadowColor=c.shadowColor,cr.shadowBlur=c.shadowBlur,cr.shadowOffsetY=c.shadowOffsetY,cr.shadowOffsetX=c.shadowOffsetX);let pr=c.colors[Qn];if(!pr&&c.colors.length){const mr=(Qn+1)%c.colors.length-1;pr=mr>0?c.colors[mr]:c.colors[0]}pr||(pr="#5470C6"),nr.push({type:"line",...dr[Qn],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:pr},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:pr,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...cr},...vue.unref(qn)})}b.value=nr,(fr=or.dataset)!=null&&fr.length?f.value=!1:f.value=!0},Yn=(ir=[],Kn,or=!1)=>{var cr,pr,mr;const nr=In(ir,or?Kn:null,!0);if(c.defaultRangeValue&&setDefaultRangeVal({props:c,componentList:vue.unref(p),getGlobalModel:vn},nr),(cr=nr.dataset)!=null&&cr.length){for(const gr of nr.dataset)if((pr=gr.data)!=null&&pr.length)for(const yr of gr.data)(yr.value===null||yr.value===void 0)&&(yr.value=0)}Pn.value=nr.dimensions,Rn.value=nr.dataset;const lr=nr.dataset,fr=[],Qn=lr.length;for(let gr=0;gr<Qn;gr++){const yr={};c.shadowColor&&(yr.shadowColor=c.shadowColor,yr.shadowBlur=c.shadowBlur,yr.shadowOffsetY=c.shadowOffsetY,yr.shadowOffsetX=c.shadowOffsetX);let ur=c.colors[gr];if(!ur&&c.colors.length){const vr=(gr+1)%c.colors.length-1;ur=vr>0?c.colors[vr]:c.colors[0]}ur||(ur="#5470C6"),fr.push({type:"line",...lr[gr],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:ur||gr%(c.colors.length||1)},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:ur,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...yr},...vue.unref(qn)})}b.value=fr,(mr=nr.dataset)!=null&&mr.length?f.value=!1:f.value=!0};vue.watch(()=>[c.data,c.symbolSize,c.smooth,c.lineStyleWidth,c.areaStyleOpacity,c.areaGradientShow,c.areaGradientColor,c.shadowColor,c.shadowBlur,c.shadowOffsetY,c.shadowOffsetX,c.legendFontSize,c.isShowMarkLine,c.markLineType,c.legendFormatter,c.legendWidth,c.legendHeight,c.legendTextWidth,c.legendScroll],([ir])=>{(c.dataType==="static"||vue.unref(d)==="design")&&zn(ir)},{immediate:!0,deep:!0});const Wn=vue.ref(!1),Jn=useRequestData(c),er=async()=>{var ir,Kn;if(c.dataType==="request")try{Wn.value=!0;const or=await Jn();zn((Kn=(ir=or==null?void 0:or.data)==null?void 0:ir.data)==null?void 0:Kn.rows,!0)}catch(or){console.error(or)}finally{Wn.value=!1}},tr=useEmitEvent(c);re(c.id,{type:c.type,RECORD:""});const Xn=tr("click",ir=>{const Kn=vn(c.id);re(c.id,{...Kn,type:c.type,RECORD:c.tooltipShow?j:ir.data})}),ar=ir=>{m.value.chart.containPixel("grid",[ir.offsetX,ir.offsetY])&&Xn()};c.isForbidClick||(c.tooltipShow?J.value["zr:click"]=ar:J.value.click=Xn);const hr=ir=>{var fr;const{columns:Kn=[],rows:or=[]}=((fr=ir==null?void 0:ir.data)==null?void 0:fr.data)??{};let dr;Kn.length>0&&(dr={name:Kn[0],types:Kn.slice(1).map(Qn=>({label:Qn,value:Qn}))});const{leftAxisList:nr=[]}=c.graphicConfig,lr=nr.filter(Qn=>Qn.show).map(Qn=>Qn.label);for(const Qn of or)if(Qn)for(const cr in Qn)typeof Qn[cr]=="string"&&lr.includes(cr)&&!isNaN(parseFloat(Qn[cr]))&&(Qn[cr]=parseFloat(Qn[cr]));Yn(or,dr,!0)},sr=useIndicatorData(c,ir=>{c.isViewRedrawing&&m.value.clear(),hr(ir)}),Un=async()=>{try{Wn.value=!0;const ir=await sr();hr(ir)}catch(ir){console.error(ir)}finally{Wn.value=!1}},Zn=async()=>{switch(c.dataType){case"indicator":await Un();break;case"request":await er();break}};useOnEvent(c,{refreshData:Zn,resetRecord:()=>{const ir=c.id,Kn=vn(ir);re(ir,{...Kn,RECORD:""})},click:Xn});const{setRequest:Gn}=vue.inject(REQUEST_MODEL,{setRequest:ir=>{}});return typeof Gn=="function"&&Gn({id:c.id,requestFn:Zn,sortNum:c.requestSort}),u({refreshData:Zn}),{option:Bn,style:y,click:Xn,loading:Wn,onClose:w,ecanModal:x,eventObj:J,echartRef:m,emptyData:f}}}),Line_vue_vue_type_style_index_0_lang="",Line_vue_vue_type_style_index_1_scoped_fadf491b_lang="";function _sfc_render$C(c,u,f,d,h,v){const p=vue.resolveComponent("echarts"),m=vue.resolveComponent("spin"),g=vue.resolveComponent("ecan-modal");return vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(c.style)},[vue.createVNode(m,{spinning:c.loading},{default:vue.withCtx(()=>[c.noDataTip&&c.emptyData?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"empty-wrap",style:vue.normalizeStyle({color:c.tipTextColor,fontSize:c.tipTextFontSize})},[vue.createElementVNode("span",null,vue.toDisplayString(c.tipText),1)],4)):(vue.openBlock(),vue.createBlock(p,vue.mergeProps({key:1,ref:"echartRef",option:c.option,autoresize:""},vue.toHandlers(c.eventObj)),null,16,["option"]))]),_:1},8,["spinning"]),vue.createVNode(g,{width:"1920px",height:"1080px",ref:"ecanModal",onClose:c.onClose},{default:vue.withCtx(()=>[vue.createVNode(m,{class:"spin-wrap",spinning:c.loading},{default:vue.withCtx(()=>[vue.createVNode(p,{option:c.option,"update-options":{notMerge:!0},autoresize:""},null,8,["option"])]),_:1},8,["spinning"])]),_:1},8,["onClose"])],4)}const Line=_export_sfc$1(_sfc_main$x,[["render",_sfc_render$C],["__scopeId","data-v-fadf491b"]]),EcanLine=withInstall$1(Line);let random=c=>crypto.getRandomValues(new Uint8Array(c)),customRandom=(c,u,f)=>{let d=(2<<Math.log(c.length-1)/Math.LN2)-1,h=-~(1.6*d*u/c.length);return(v=u)=>{let p="";for(;;){let m=f(h),g=h;for(;g--;)if(p+=c[m[g]&d]||"",p.length===v)return p}}},customAlphabet=(c,u=21)=>customRandom(c,u,random),nanoid=(c=21)=>crypto.getRandomValues(new Uint8Array(c)).reduce((u,f)=>(f&=63,f<36?u+=f.toString(36):f<62?u+=(f-26).toString(36).toUpperCase():f>62?u+="-":u+="_",u),"");const _sfc_main$w=vue.defineComponent({name:"TrendModal",components:{EcanLine,CloseOutlined:CloseOutlined$1,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const f=vue.ref(!1),d=vue.ref(),h=vue.ref(),v=vue.ref(!0),p=vue.ref({}),m=vue.ref(!0),g=vue.inject("isMobile",!1),y=async({data:Bn,pageConfig:w,unitText:vn})=>{if(Bn){v.value=!0,p.value=w;const{graphicConfig:re}=Bn,qn=nanoid(6),zn={source:"INDICATOR_LIB",dataSourceId:"",idxLibMode:"",classificationList:[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期",name:"the_date",label:"日期",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dateFormat:"YYYY-MM",dataSetParams:{}}],leftAxisList:(re==null?void 0:re.indicators)||[],controlList:(re==null?void 0:re.controlList)||[],variableList:(re==null?void 0:re.variableList)||[],variableConditions:(re==null?void 0:re.variableConditions)||[]};d.value={...lodashEs.cloneDeep(lineProps),id:qn,keyName:`折线图_${qn}`,position:"relative",top:0,left:0,width:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.width)*.57+"px",height:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.height)*.4+"px",dataType:"indicator",tooltipFormatter:"{marker} {a} {c}"+vn,xAxisLabelRotate:45,yAxisLabelFormatter:vn?`{value}${vn}`:"{value}",isForbidClick:!0,graphicConfig:zn},f.value=!0,vue.nextTick(()=>{x(!0),gn(!0),vue.unref(h).refreshData()})}},b=()=>document.querySelector("#modalContainer")||document.body,Pn=vue.computed(()=>{let Bn="trend-modal";return vue.unref(g)?Bn+=" mobile":v.value&&(Bn+=" full"),c.theme==="darkBlue"&&(Bn+=" darkBlue"),Bn});vue.watch(f,Bn=>{Bn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.watch(v,Bn=>{m.value=!1,vue.unref(d).width=Bn?"100%":parseFloat(vue.unref(p).width)*.57+"px",vue.unref(d).height=Bn?"100%":parseFloat(vue.unref(p).height)*.4+"px",vue.nextTick(()=>{m.value=!0,vue.nextTick(()=>{vue.unref(h).refreshData()})})});const x=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");w&&(Bn?w.addEventListener("dblclick",j):w.removeEventListener("dblclick",j))},gn=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");if(w)if(Bn)w.addEventListener("mousedown",J);else{const vn=w.parentElement;vn&&(vn.style.left="",vn.style.top=""),w.removeEventListener("mousedown",J)}};function J(Bn){dragModalAction(Bn,".trend-modal .ant-modal-header")}const j=()=>{v.value=!v.value,vue.nextTick(()=>{v.value?gn(!1):gn(!0)})},Rn=()=>{x(!1),gn(!1)};return vue.onMounted(()=>{var Bn,w;if(vue.unref(g)){const vn=document.querySelector("#modalContainer");v.value=!0,(Bn=vn==null?void 0:vn.style)==null||Bn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(w=vn==null?void 0:vn.style)==null||w.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:y}),{visible:f,componentConfig:d,lineRef:h,wrapClassName:Pn,isMobile:g,isIndFullScreen:v,isRender:m,getContainer:b,toggleFullScreen:j,onDetailCancel:Rn}}}),TrendModal_vue_vue_type_style_index_0_scoped_a24645dd_lang="",TrendModal_vue_vue_type_style_index_1_lang="",_withScopeId$6=c=>(vue.pushScopeId("data-v-a24645dd"),c=c(),vue.popScopeId(),c),_hoisted_1$n=_withScopeId$6(()=>vue.createElementVNode("div",{class:"modal-title"},"趋势图",-1)),_hoisted_2$d={class:"zoom-btn"};function _sfc_render$B(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("ecan-line"),b=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(b,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=Pn=>c.visible=Pn),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isMobile||c.isIndFullScreen?"":"70vh",height:c.isMobile||c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$n]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$d,[!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.componentConfig&&c.isRender?(vue.openBlock(),vue.createBlock(y,vue.mergeProps({key:0},c.componentConfig,{ref:"lineRef"}),null,16)):vue.createCommentVNode("",!0)]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const TrendModal=_export_sfc$1(_sfc_main$w,[["render",_sfc_render$B],["__scopeId","data-v-a24645dd"]]),pivotTableProps={...props$1,name:"透视表",keyName:"透视表",width:"800px",height:"400px",type:"ecanPivotTable",graphicConfig:{},dataType:"indicator",data:[],dimensionList:[],indicatorList:[],styleConfig:{borderColor:"#E3E3E3",headerBgColor:"#ECF1F5",headerColor:"#000000",bodyBgColor:"#FFFFFF",bodyColor:"#000000",indicatorsHeaderBgColor:"#ECF1F5",indicatorsHeaderColor:"#000000",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#000000",aggregateBgColor:"#ECF1F5",aggregateColor:"#000000",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"},configMode:"halfMode"},pivotTableComponentProps=transformToComponentProps(pivotTableProps),pivotTableEvents=["refreshData"];var zhCn={exports:{}};(function(c,u){(function(f,d){c.exports=d(dayjs)})(commonjsGlobal,function(f){function d(p){return p&&typeof p=="object"&&"default"in p?p:{default:p}}var h=d(f),v={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(p,m){return m==="W"?p+"周":p+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(p,m){var g=100*p+m;return g<600?"凌晨":g<900?"早上":g<1100?"上午":g<1300?"中午":g<1800?"下午":"晚上"}};return h.default.locale(v,null,!0),v})})(zhCn);const LastDetail_vue_vue_type_style_index_0_scoped_4e73fb65_lang="",LastDetail_vue_vue_type_style_index_1_lang="";dayjs.locale("zh-cn");const _sfc_main$v=vue.defineComponent({name:"LastDetail",components:{ATable:antDesignVue.Table,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1},props:{theme:{type:String,default:"light"},theDateInfo:{type:Object,default:()=>({})},scaleValue:{type:Object,default:()=>({})},fontSize:{type:Number,default:16},allDimensions:{type:Array,default:()=>[]}},setup(c,{emit:u,expose:f}){const d=`dtmodal_${nanoid(6)}`,h=vue.ref(!1),v=vue.ref(!1),p=vue.ref(!1),m=vue.ref([]),g=vue.ref([]),y=vue.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:er=>`共 ${er} 条数据`}),b=vue.ref(""),Pn=vue.ref(""),x=vue.ref(),gn=vue.inject("isMobile",!1),J=vue.computed(()=>INDICATOR_URL),j=()=>document.querySelector("#modalContainer")||document.body,Rn=er=>{const tr=document.querySelector(`.${d} .ant-modal-header`);if(tr)if(er)tr.addEventListener("mousedown",w);else{const Xn=tr.parentElement;Xn&&(Xn.style.left="",Xn.style.top=""),tr.removeEventListener("mousedown",w)}},Bn=er=>{const tr=document.querySelector(`.${d} .ant-modal-header`);tr&&(er?tr.addEventListener("dblclick",vn):tr.removeEventListener("dblclick",vn))},w=er=>{dragModalAction(er,`.${d} .ant-modal-header`)},vn=()=>{h.value=!h.value,vue.nextTick(()=>{h.value?Rn(!1):Rn(!0)})},re=()=>{h.value=!1,Bn(!1),Rn(!1)};async function qn(er){var nr,lr;p.value=!0,v.value=!0;const tr=((nr=window==null?void 0:window.config)==null?void 0:nr.indicatorToken)||"",{record:Xn,dimOpts:ar,column:hr,formatParams:sr,cpntProps:Un={},drillDetailUrl:Zn}=er,{indicatorList:Hn=[]}=sr,Gn=Hn.find(fr=>fr.label===hr.dataIndex),ir={};for(const fr in Xn){const Qn=ar.find(cr=>cr.name===fr);Qn&&(ir[Qn.typeGuid]=Xn[fr])}const{startTime:Kn,endTime:or,rangeFormat:dr}=c.theDateInfo;if(Kn&&or&&(ir.startTime=dayjs(Kn).format(dr),ir.endTime=dayjs(or).format(dr)),x.value=ir,Zn)h.value=!0,b.value=Zn,Pn.value=encodeURIComponent(JSON.stringify({indexCode:(Gn==null?void 0:Gn.hrpIndexCode)||"",indexName:Gn.label,theFlag:Un.theFlag,param:ir,conditions:drillConditions})),p.value=!1;else{const fr=await request.post(`${vue.unref(J)}/diagram/obtainDataSetData`,{pageId:getPageId(),indexCode:(Gn==null?void 0:Gn.hrpIndexCode)||"",indexName:Gn.label,theFlag:Un.theFlag,param:ir},{headers:{Authentication:tr,operateContext:CONTEXT}}),{columns:Qn=[],data:cr=[]}=((lr=fr==null?void 0:fr.data)==null?void 0:lr.data)||{};m.value=Qn.filter(pr=>pr).map(pr=>({title:pr,dataIndex:pr,width:"120px"})),g.value=cr.map(pr=>({...pr,uid:nanoid(6)})),p.value=!1}vue.nextTick(()=>{Bn(!0),Rn(!0)})}const zn=er=>{vue.unref(y).current=er.current},Yn=vue.computed(()=>{let er=`last-detail-modal ${d}`;return(vue.unref(gn)||h.value)&&(er+=" full"),c.theme==="darkBlue"&&(er+=" darkBlue"),vue.unref(b)||(er+=" table"),er}),Wn=vue.computed(()=>vue.unref(gn)?{padding:"10px 0"}:{height:vue.unref(h)?"":window.screen.height*.6+48+"px",overflow:vue.unref(b)?"hidden":"auto"});return f({getRecordData:()=>{const er=vue.unref(x).the_date,{startTime:tr,endTime:Xn}=vue.unref(x),ar={};er?ar.时间范围=er:ar.时间范围=`${tr}至${Xn}`;for(const hr in vue.unref(x))if(!["startTime","endTime","the_date"].includes(hr)){const sr=c.allDimensions.find(Un=>Un.typeGuid===hr);sr&&(ar[sr.title||sr.label]=vue.unref(x)[hr])}return{drillContext:ar,data:vue.toRaw(vue.unref(g)),type:"detailTable"}},showModal:qn,visible:v}),{visible:v,loading:p,pagination:y,columns:m,dataSource:g,wrapClassName:Yn,detailBodyStyle:Wn,isMobile:gn,urlJsonStr:Pn,drillDetailUrl:b,isIndFullScreen:h,handleTableChange:zn,getContainer:j,onDetailCancel:re,toggleFullScreen:vn}}}),_hoisted_1$m=["src"],_hoisted_2$c={key:0,class:"spin-container"},_hoisted_3$6=["title"],_hoisted_4$5=["title"];function _sfc_render$A(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table"),Pn=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(Pn,{wrapClassName:c.wrapClassName,visible:c.visible,"onUpdate:visible":u[1]||(u[1]=x=>c.visible=x),width:"60%",title:"指标明细",destroyOnClose:!0,footer:null,bodyStyle:c.detailBodyStyle,getContainer:c.getContainer,onCancel:c.onDetailCancel},{closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"zoom-btn",onClick:u[0]||(u[0]=(...x)=>c.toggleFullScreen&&c.toggleFullScreen(...x))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))]),c.drillDetailUrl&&c.urlJsonStr?(vue.openBlock(),vue.createElementBlock("iframe",{key:0,src:`${c.drillDetailUrl}${c.drillDetailUrl.includes("?")?"&":"?"}params=${c.urlJsonStr}`,frameborder:"0",width:"100%",height:"100%"},`\r
103
- `,8,_hoisted_1$m)):c.drillDetailUrl?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.loading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$c,[vue.createVNode(y,{size:"large"})])):(vue.openBlock(),vue.createBlock(b,{key:1,"row-key":x=>x.uid,columns:c.columns,"data-source":c.dataSource,pagination:c.pagination,scroll:{x:"max-content",y:c.isMobile?"70vh":""},onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:x})=>[vue.createElementVNode("div",{title:x,style:vue.normalizeStyle({fontSize:c.fontSize+"px"})},vue.toDisplayString(x),13,_hoisted_3$6)]),bodyCell:vue.withCtx(({text:x})=>[vue.createElementVNode("div",{title:x,style:vue.normalizeStyle({fontSize:c.fontSize+"px"})},vue.toDisplayString(x),13,_hoisted_4$5)]),_:1},8,["row-key","columns","data-source","pagination","scroll","onChange"]))],64))]),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"])}const LastDetail=_export_sfc$1(_sfc_main$v,[["render",_sfc_render$A],["__scopeId","data-v-4e73fb65"]]),_sfc_main$u=vue.defineComponent({name:"DrillModal",components:{ATable:antDesignVue.Table,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,LastDetail},props:{theme:{type:String,default:"light"},drillingMode:{type:String,default:"default"},pageMode:{type:String,default:"normal"},scaleValue:{type:Object,default:()=>({})},pivotTableFontSize:{type:Number,default:16},width:{type:String,default:""},drillDetailUrl:{type:String,default:""}},setup(c,{expose:u,emit:f}){const m={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},g={borderColor:"#666E8D",headerBgColor:"#06347C",headerColor:"#DEE5EF",bodyBgColor:"#112861",bodyColor:"#B2CCE7",indicatorsHeaderBgColor:"#184273",indicatorsHeaderColor:"#FFFFFF",indicatorsBodyBgColor:"#184273",indicatorsBodyColor:"#FFFFFF",aggregateBgColor:"#0F4F9B",aggregateColor:"#FFFCFC",sortNotActiveColor:"#B0B0B0",sortActiveColor:"#00CCFF",dropDownMenuBgColor:"#08154F",dropDownMenuColor:"#B2C3DD",dropDownMenuHightLightColor:"#2E68CF"},y=vue.ref(!1),b=vue.ref(),Pn=vue.ref(),x=vue.ref(),gn=vue.ref(!1),J=vue.ref({}),j=vue.ref([]),Rn=vue.ref([]),Bn=vue.ref([]),w=vue.ref(!1),vn=vue.ref({dateFormat:"YYYY-MM-DD"}),re=vue.reactive({keyName:"",visible:!1,dataSource:[],columns:[],title:"",pagination:{current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:yr=>`共 ${yr} 条数据`}}),qn=vue.ref({}),zn=vue.ref({}),Yn=vue.inject("isMobile",!1),Wn=vue.inject("usedComponentList",[]),Jn=vue.inject("componentList",[]),{getAllGlobalModel:er}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),tr=vue.computed(()=>INDICATOR_URL);vue.watch(()=>re.visible,yr=>{yr?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"});const Xn=vue.computed(()=>({width:vue.unref(J).width,height:vue.unref(J).height})),ar=vue.computed(()=>vue.unref(Yn)?{padding:"10px 0"}:c.drillingMode==="normalTable"&&!gn.value?{height:window.screen.height*.6+48+"px",overflow:"auto"}:{}),hr=vue.computed(()=>{let yr="datav-drill-modal";return(gn.value||vue.unref(Yn))&&(yr+=" full"),c.theme==="darkBlue"&&(yr+=" darkBlue"),yr}),sr=(yr,ur)=>{const{leftAxisList:vr=[],rightAxisList:_r=[],indicators:Sr=[],classificationList:kr=[],rowHeaderList:Cr=[],dimensionList:br=[],seriesList:xr=[],queryColumns:Ar=[],indexLibColumns:Er=[]}=ur.graphicConfig,Mr=vr.concat(_r).concat(Sr).concat(kr).concat(Cr).concat(br).concat(xr).concat(Ar).concat(Er).filter(Vr=>Vr.conditions),Hr=loopConditions(Mr,"conditions",!0),Lr=loopConditions(yr.sqlConditions,"sqlConditions",!1);Rn.value=Hr.concat(Lr).filter(Vr=>Vr.label)||[]},Un=()=>document.querySelector("#modalContainer")||document.body,Zn=async({cpntProps:yr,pageId:ur,formatParams:vr,classifications:_r,indicatorToken:Sr})=>{var kr,Cr,br;return await request({url:`${vue.unref(tr)}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:Sr,operateContext:CONTEXT},data:{source:((kr=yr==null?void 0:yr.graphicConfig)==null?void 0:kr.source)||"INDICATOR_LIB",pageId:ur,indicatorList:(vr==null?void 0:vr.indicatorList)||[],classifications:_r,dataSourceId:((Cr=yr==null?void 0:yr.graphicConfig)==null?void 0:Cr.dataSourceId)||""},signal:((br=window.controller)==null?void 0:br.signal)||""})},Hn=yr=>{let ur="",vr="";const{componentConfig:_r}=yr;for(const kr in _r)if(_r[kr].key==="currentValue"){vr=kr;break}const Sr=vue.unref(Jn).find(kr=>kr.id===vr);return Sr!=null&&Sr.unitText&&(ur=Sr.unitText),ur};function Gn(yr){const ur=[];for(const vr of yr)vr.sqlConditions?ur.push(...Gn(vr.sqlConditions)):vr.fieldName==="the_date"&&ur.push(vr);return ur}const ir=yr=>{var kr;const{sqlConditions:ur=[],queryColumns:vr=[]}=yr||{},_r=Gn(ur),Sr=vr.find(Cr=>Cr.typeGuid==="the_date");if(Sr&&(vn.value={dateFormat:Sr.dateFormat||"YYYY-MM-DD"}),_r!=null&&_r.length)for(const Cr of _r)["startTime","endTime"].includes(Cr.prop)&&(vue.unref(vn)[Cr.prop]=Cr.fieldValue||"",(kr=vue.unref(vn))!=null&&kr.rangeFormat||(vue.unref(vn).rangeFormat=Cr.dateFormat||"YYYY-MM-DD"))},Kn=async yr=>{var Ir,Mr,Hr,Lr,Vr;if(c.drillingMode==="default")return;let ur=lodashEs.cloneDeep(yr).props;if(ur.parentId){const Nr=vue.unref(Wn).find(Kr=>Kr.id===ur.parentId);if((Nr==null?void 0:Nr.dataType)==="indicator")ur=lodashEs.cloneDeep(Nr);else return}re.keyName=ur==null?void 0:ur.keyName;const vr=((Ir=window==null?void 0:window.config)==null?void 0:Ir.indicatorToken)||"",_r=getPageId(),Sr=(ur==null?void 0:ur.graphicConfig)||{},{leftAxisList:kr=[],rightAxisList:Cr=[],indicators:br=[]}=Sr,xr=kr.concat(Cr).concat(br);if(!(xr!=null&&xr.length))return;const Ar=xr.filter(Nr=>Nr.show).map(Nr=>Nr.label);Ar!=null&&Ar.length&&(re.title=`下钻:${Ar.join("、")}`);const Er=En({...ur,allComponentList:vue.unref(Jn),globalModel:er()});if(c.drillingMode==="normalTable"||vue.unref(Yn)){re.pagination.current=1;let Nr=(Er==null?void 0:Er.classification)||(Er==null?void 0:Er.classifications)||[];Array.isArray(Nr)||(Nr=[Nr]);try{w.value=!0,re.visible=!0;const Kr=await Zn({cpntProps:ur,pageId:_r,formatParams:Er,classifications:Nr,indicatorToken:vr}),Wr=((Mr=Kr==null?void 0:Kr.data)==null?void 0:Mr.data)||[];Bn.value=Wr;let Yr=[],ii=[];const{usedDimensions:ei=[],params:ui={}}=yr;if(ei!=null&&ei.length){for(const Rr of Wr)if(!ei.find(qr=>qr.label===Rr.name)){ii.push(Rr);break}Er.sqlConditions=lodashEs.cloneDeep(ui.sqlConditions);const{sqlConditions:Pr=[]}=Er,{record:Fr={}}=yr;ei.forEach((Rr,qr)=>{if(mn(Fr,Rr.label)){const jr=Wr.find(Qr=>Qr.name===Rr.label),Gr={fieldName:Rr.label,fieldValue:Fr[Rr.label],globalCondition:!0,hrpIndexCode:null,hrpIndexCodeNum:null,label:Rr.label,rule:"EQUAL",typeGuid:Rr.typeGuid,valueType:(jr==null?void 0:jr.genericType)||"TEXT"};qr!==ei.length-1&&(Gr.join="&&"),qr===0&&(Pr!=null&&Pr.length)&&(Pr[Pr.length-1].join="&&"),Pr.push(Gr)}})}else Yr=Nr.map(Pr=>({...Pr,calcType:"COLUMN"})),ii=Wr.slice(0,2).sort((Pr,Fr)=>Pr.typeGuid-Fr.typeGuid);sr(Er,lodashEs.cloneDeep(yr.props));for(const Pr of ii)Yr.push({calcType:"COLUMN",columnName:Pr.name,label:Pr.name,show:!0,typeGuid:Pr.typeGuid});Er.queryColumns=Yr,Er.layer="1",Er.plugin="1",delete Er.classification,delete Er.classifications;const{url:oi,...vi}=Er||{};zn.value=vi,ir(Er);const xi=await request({url:`${vue.unref(tr)}${oi}`,method:"post",headers:{Authentication:vr,operateContext:CONTEXT},data:{...vi,pageId:_r}}),{columns:Ci=[],rows:bi=[]}=((Hr=xi==null?void 0:xi.data)==null?void 0:Hr.data)||{};if(yn(ur.type,"indexPanel")){const Pr=Sr.indicators.find(Rr=>Rr.show),Fr=Hn(ur);Fr&&Pr&&(qn.value={[Pr.label]:Fr})}re.columns=Ci.filter(Pr=>!!Pr).map(Pr=>{let Fr=Pr;const Rr=Wr.find(qr=>qr.name===Pr);return Rr&&(Fr=Rr.title||Rr.label),{title:Fr,dataIndex:Pr,width:"120px",customCell:(qr,jr,Gr)=>({[vue.unref(Yn)?"onClick":"onDblclick"]:()=>{Wr.find(si=>Gr.dataIndex===si.name)?(!(ei!=null&&ei.length)||Wr.length-1>ei.length)&&(y.value=!0,vue.nextTick(()=>{vue.unref(b).showModal({...yr,record:qr,usedDimensions:[...ei,...Yr],params:Er})})):vue.unref(Pn).showModal({record:qr,dimOpts:Wr,column:Gr,formatParams:Er,cpntProps:ur,drillDetailUrl:c.drillDetailUrl,drillConditions:vue.unref(pr)})}})}}),re.dataSource=(Array.isArray(bi)?bi:[bi]).map(Pr=>({...Pr,uuid:nanoid(6)})),re.pagination.total=(bi==null?void 0:bi.length)||0,w.value=!1}catch(Kr){console.error(Kr)}}else if(c.drillingMode==="pivotTable"){const Nr=await Zn({cpntProps:ur,pageId:_r,formatParams:Er,classifications:[],indicatorToken:vr});Bn.value=((Lr=Nr==null?void 0:Nr.data)==null?void 0:Lr.data)||[];const Kr=nanoid(6);Sr.queryColumnList||(Sr.queryColumnList=[]),Sr!=null&&Sr.classificationList&&(Sr.queryColumnList=Sr.classificationList,delete Sr.classificationList),Sr!=null&&Sr.seriesList&&(Sr.queryColumnList=Sr.queryColumnList.concat(Sr.seriesList),delete Sr.seriesList),Sr.indicators=lodashEs.cloneDeep(xr||[]),delete Sr.leftAxisList,delete Sr.rightAxisList;const Wr={};if(yn(ur.type,"indexPanel")){const ii=Sr.indicators.find(oi=>oi.show),ei=vue.unref(Bn).slice(0,2).sort((oi,vi)=>oi.typeGuid-vi.typeGuid).map(oi=>({...oi,show:!0,edit:!1,dataTo:"0",width:oi.name==="the_date"?15:0,dataSetParams:{}}));ei!=null&&ei.length&&(Sr.queryColumnList=ei);const ui=Hn(ur);if(ui&&ii){const{label:oi}=ii;Wr.defaultConfig={indexFormatConfig:{[oi]:{fieldName:oi,indicatorKey:oi,position:"right",unit:ui}}}}}ur!=null&&ur.theFlag&&(Wr.theFlag=ur.theFlag),(Vr=Sr.queryColumnList)!=null&&Vr.length||(Sr.queryColumnList=[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期(内置)",name:"the_date",label:"日期(内置)",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dataSetParams:{}}]);const Yr={...lodashEs.cloneDeep(pivotTableProps),id:Kr,keyName:`透视表_${Kr}`,position:"relative",top:0,left:0,width:parseFloat(c.width)*.57+"px",height:window.screen.height*.6+"px",pageId:_r,indicatorToken:vr,context:CONTEXT,globalModel:er(),graphicConfig:Sr,pageConfig:c,...Wr};c.theme==="darkBlue"&&(Yr.styleConfig=g),J.value=Yr,re.visible=!0,vue.nextTick(()=>{vue.unref(x).refreshData()})}vue.nextTick(()=>{dr(!0),nr(!0)})},or=yr=>{re.pagination.current=yr.current},dr=yr=>{const ur=document.querySelector(".datav-drill-modal .ant-modal-header");ur&&(yr?ur.addEventListener("dblclick",fr):ur.removeEventListener("dblclick",fr))},nr=yr=>{const ur=document.querySelector(".datav-drill-modal .ant-modal-header");if(ur)if(yr)ur.addEventListener("mousedown",lr);else{const vr=ur.parentElement;vr&&(vr.style.left="",vr.style.top=""),ur.removeEventListener("mousedown",lr)}};function lr(yr){dragModalAction(yr,".datav-drill-modal .ant-modal-header")}const fr=()=>{gn.value=!gn.value,vue.nextTick(()=>{gn.value?(vue.unref(J).width=parseFloat(c.width)*.97+"px",vue.unref(J).height=window.screen.height*.9+"px",nr(!1)):(vue.unref(J).width=parseFloat(c.width)*.57+"px",vue.unref(J).height=window.screen.height*.6+"px",nr(!0))})},Qn=()=>{gn.value=!1,dr(!1),nr(!1),f("close")},cr=({type:yr,data:ur})=>{if(yr==="11"&&ur){const{indicatorList:vr=[],queryColumns:_r=[]}=ur,kr=vr.concat(_r).filter(xr=>xr.conditions||xr.filter),Cr=loopConditions(kr,"conditions",!0),br=loopConditions(ur.sqlConditions,"sqlConditions",!1);Rn.value=Cr.concat(br).filter(xr=>xr.label)||[]}};vue.watch(Rn,(yr=[])=>{j.value=yr.map(ur=>{let vr=ur.fieldValue;if(vr&&typeof vr=="string"){const _r=vr.split(",");(_r==null?void 0:_r.length)>3&&(vr=_r.slice(0,3).join(",")+"等")}else vr||(vr='""');if(c.drillingMode==="normalTable")return`${ur.label} ${m[ur.rule]} ${vr}`;{const _r=vue.unref(Bn).find(Sr=>Sr.label===ur.label);return`${(_r==null?void 0:_r.title)||ur.label} ${m[ur.rule]} ${vr}`}})||[]},{deep:!0});const pr=vue.computed(()=>vue.unref(Rn).map(yr=>({label:yr.title||yr.label,typeGuid:yr.typeGuid,rule:yr.rule,value:yr.fieldValue}))),mr=()=>{y.value=!1};return u({indDetailInfo:re,showModal:Kn,getPivotRecordData:()=>{var yr,ur,vr,_r,Sr,kr,Cr,br,xr,Ar;if(c.drillingMode==="normalTable"){if((yr=vue.unref(Pn))!=null&&yr.visible)return(ur=vue.unref(Pn))==null?void 0:ur.getRecordData();if((_r=(vr=vue.unref(b))==null?void 0:vr.indDetailInfo)!=null&&_r.visible)return(Sr=vue.unref(b))==null?void 0:Sr.getPivotRecordData();{const{sqlConditions:Er,...Ir}=vue.unref(zn);for(const Mr of Er){const Hr=vue.unref(Bn).find(Lr=>Lr.typeGuid===Mr.typeGuid);Hr!=null&&Hr.title&&(Mr.title=Hr.title)}return{data:vue.toRaw(re.dataSource),columns:[],rows:((Cr=(kr=vue.unref(zn))==null?void 0:kr.queryColumns)==null?void 0:Cr.map(Mr=>({title:Mr.label})))||[],indicators:((xr=(br=vue.unref(zn))==null?void 0:br.indicatorList)==null?void 0:xr.map(Mr=>({title:Mr.label})))||[],requestParams:{...Ir,sqlConditions:Er},type:"pivotTable"}}}else if(c.drillingMode==="pivotTable")return(Ar=vue.unref(x))==null?void 0:Ar.getPivotRecordData()}}),{indDetailInfo:re,pivotTableConfig:J,pivotTableStyle:Xn,detailBodyStyle:ar,wrapClassName:hr,isIndFullScreen:gn,isMobile:Yn,conditionInfo:j,indicatorUrl:tr,allDimensions:Bn,detailLoading:w,pivotTableRef:x,lastDetailRef:Pn,subDrillModalRef:b,theDateInfo:vn,isShowSubDrillModal:y,normalTableUnits:qn,drillConditions:pr,allComponentList:Jn,getContainer:Un,toggleFullScreen:fr,onDetailCancel:Qn,onPivotTableChange:cr,handleTableChange:or,onCloseModal:mr}}}),DrillModal_vue_vue_type_style_index_0_scoped_519a7174_lang="",DrillModal_vue_vue_type_style_index_1_lang="",_hoisted_1$l=["title"],_hoisted_2$b={key:0,class:"spin-container"},_hoisted_3$5=["title"],_hoisted_4$4=["title"];function _sfc_render$z(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table"),Pn=vue.resolveComponent("pivot-table"),x=vue.resolveComponent("a-modal"),gn=vue.resolveComponent("last-detail"),J=vue.resolveComponent("drill-modal",!0);return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(x,{visible:c.indDetailInfo.visible,"onUpdate:visible":u[1]||(u[1]=j=>c.indDetailInfo.visible=j),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,"wrap-class-name":c.wrapClassName,bodyStyle:c.detailBodyStyle,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[vue.createElementVNode("div",{class:"detail-modal-title",title:c.conditionInfo.join("、")},vue.toDisplayString(c.indDetailInfo.title)+" "+vue.toDisplayString(c.conditionInfo.join("、")),9,_hoisted_1$l)]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"zoom-btn",onClick:u[0]||(u[0]=(...j)=>c.toggleFullScreen&&c.toggleFullScreen(...j))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))])),c.drillingMode==="normalTable"||c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.detailLoading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,[vue.createVNode(y,{size:"large"})])):(vue.openBlock(),vue.createBlock(b,{key:1,"row-key":j=>j.uuid,columns:c.indDetailInfo.columns,"data-source":c.indDetailInfo.dataSource,pagination:c.indDetailInfo.pagination,onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:j})=>[vue.createElementVNode("div",{class:"detail-table-header-cell",title:j,style:vue.normalizeStyle({fontSize:c.pivotTableFontSize+"px"})},vue.toDisplayString(j),13,_hoisted_3$5)]),bodyCell:vue.withCtx(({text:j,column:Rn})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.pivotTableFontSize+"px"})},vue.toDisplayString(j)+vue.toDisplayString(c.normalTableUnits[Rn.title]),13,_hoisted_4$4)]),_:1},8,["row-key","columns","data-source","pagination","onChange"]))],64)):c.drillingMode==="pivotTable"?(vue.openBlock(),vue.createElementBlock("div",{key:2,style:vue.normalizeStyle({position:"relative",...c.pivotTableStyle})},[vue.createVNode(Pn,vue.mergeProps({ref:"pivotTableRef"},c.pivotTableConfig,{pageMode:c.pageMode,theme:c.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:c.indicatorUrl,relateKeyName:c.indDetailInfo.keyName,allDimensions:c.allDimensions,scaleValue:c.scaleValue,defaultFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,drillConditions:c.drillConditions,isMobile:c.isMobile,isNeedEmptyRow:!1,componentList:c.allComponentList,enlargeContainer:"#norPageConfig",onTableChange:c.onPivotTableChange}),null,16,["pageMode","theme","indicatorUrl","relateKeyName","allDimensions","scaleValue","defaultFontSize","drillDetailUrl","drillConditions","isMobile","componentList","onTableChange"])],4)):vue.createCommentVNode("",!0)]),_:1},8,["visible","getContainer","wrap-class-name","bodyStyle","onCancel"]),vue.createVNode(gn,{ref:"lastDetailRef",theme:c.theme,theDateInfo:c.theDateInfo,scaleValue:c.scaleValue,fontSize:c.pivotTableFontSize,allDimensions:c.allDimensions},null,8,["theme","theDateInfo","scaleValue","fontSize","allDimensions"]),c.isShowSubDrillModal?(vue.openBlock(),vue.createBlock(J,{key:0,ref:"subDrillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","onClose"])):vue.createCommentVNode("",!0)],64)}const DrillModal=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-519a7174"]]),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,components:{IndicatorDetailModal,TrendModal,DrillModal},props:{...providerConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"ProviderConfig"},customStyle:{type:Object,default:()=>({})},fixedHeight:{type:String,default:"0px"}},setup(c,{expose:u,emit:f}){c.pageId||useHrefParamsToGlobalVariables();const d=vue.ref(),h=vue.ref(),v=vue.ref(),p=vue.computed(()=>INDICATOR_URL),m=vue.computed(()=>hn(c.contextRequestUrl)),g=vue.computed(()=>c.pageMode),y=vue.computed(()=>c.theme),b=vue.computed(()=>c.width),Pn=vue.computed(()=>c.height),x=vue.computed(()=>c.pageFontFamily),gn=vue.computed(()=>c.textColor),J=vue.computed(()=>c.fixedHeight?parseFloat(c.fixedHeight):0),j=vue.computed(()=>c.isCompatible),Rn=vue.computed(()=>c.variableList),Bn=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),w=vue.computed(()=>parseFloat(c.pivotTableFontSize)),vn=vue.ref(),re=vue.ref({}),qn=vue.ref(!0),zn=()=>{vn.value.setAttribute("datav-theme",c.theme)},Yn=vue.ref({currentYmd:dayjs().format("YYYY-MM-DD"),currentYear:dayjs().format("YYYY"),currentMonth:dayjs().format("MM"),currentDay:dayjs().format("DD")}),Wn=vue.computed(()=>{const Pr={};if(vue.unref(Rn))for(const Rr of vue.unref(Rn))Pr[Rr.label]=Rr.value;return{$page:{...vue.unref(Yn),...Pr}}});vue.provide(GLOBAL_VARIABLE,{globalVariable:Wn});const Jn=vue.inject("usedComponentList",[]),er=vue.inject("componentList",[]);vue.watch(Wn,()=>{f("setGlobalVar",vue.unref(Yn))},{deep:!0,immediate:!0});const tr=vue.computed(()=>{const Pr=[];for(const Fr of vue.unref(Jn))Fr.type==="ecanModal"?Pr.push(...Fr.componentList):Pr.push(Fr);return Pr});vue.watch(()=>c.theme,()=>{zn()}),vue.onMounted(()=>{zn()});const Xn=vue.computed(()=>{const Pr=[],Fr=vue.unref(er).filter(Rr=>Rr.type==="ecanModal");for(const Rr of Fr)Rr!=null&&Rr.requestList&&Pr.push(...Rr.requestList);return[...Pr,...c.requestList]}),ar=Pr=>Object.prototype.toString.call(Pr)==="[object Object]",hr=Pr=>{const Fr=Pr.split(".");let Rr=vue.unref(Wn);for(const qr of Fr)if(Rr&&ar(Rr))Rr=Rr[qr];else{Rr="";break}return Rr},sr=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:m,pageMode:g,theme:y,touchEventId:sr,width:b,height:Pn,fontFamily:x,textColor:gn,requestList:Xn,isCompatible:j,fixedHeight:J,getGlobalVar:hr});const Un=vue.ref({height:"100%",overflow:c.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Pr=>{let Fr=0;Pr==="auto"?(Fr=Pr,re.value={widthScale:1,heightScale:1}):(Fr=Pr.heightScale,re.value=Pr),(!j.value||!Bn.value)&&(Fr=parseFloat(Pn.value)*Fr+"px"),Un.value.height=Fr}),vue.provide("isMobile",Bn.value),vue.provide("getContainerMap",()=>c.containerMap),vue.provide("getCombinationMap",()=>c.combinationMap),vue.provide("templateOperate",{pageId:c.pageId,templateEmit:f,setTemplateData:Pr=>{var Fr;if(Pr!=null&&Pr.pageId){const{componentId:Rr,...qr}=Pr;(Fr=window.config)!=null&&Fr.urlParams||(window.config.urlParams={}),window.config.urlParams[Pr.pageId]=qr,f("templateChange",Pr)}}});const Zn=vue.ref(),Hn=new Map,Gn=()=>Hn,ir=Pr=>{let Fr=Hn.get(Pr);if(!Fr){const Rr=vue.unref(er).find(qr=>qr.keyName===Pr);Rr&&(Fr=Hn.get(Rr.id))}return Fr},Kn=(Pr,Fr)=>{var Rr;if(Zn.value=Fr,Hn.set(Pr,Fr),!c.pageId){const qr=vue.unref(Jn).find(jr=>jr.id===Pr);qr&&((Rr=window.config)!=null&&Rr.record||(window.config.record={}),window.config.record[qr.keyName]=Fr)}},or=()=>{Zn.value=null},dr=Pr=>{let Fr=Pr;if(Fr){const Rr=Pr.match(/\{(.+?)\}/g);if(Rr!=null&&Rr.length){let qr=Rr[0].slice(1,-1).trim();const jr=qr.match(/\[(.+?)\]/g);let Gr="";jr!=null&&jr.length&&(qr=qr.replace(jr[0],""),Gr=jr[0].slice(1,-1).trim());const Qr=vue.unref(tr).find(si=>si.keyName===qr);if(Qr){const si=ir(Qr.id),{type:li,value:ci,RECORD:yi,recordData:di}=si||{};yn(li,MODEL_KEY_LIST)?Fr=yi[Gr]:yn(li,"select")?di[Gr]?Fr=di[Gr]:Fr=vue.unref(ci):yn(li,["rangePicker","date"])?dayjs.isDayjs(vue.unref(si[Gr]))?Fr=vue.unref(si[Gr]).format(si.format):Fr=vue.unref(si[Gr]):Fr=ci}else{const si=window.config.requestParams||{},li=window.location.search.slice(1).split("&"),ci={};for(const di of li)if(di!=null&&di.includes("=")){const Xr=di.split("=");ci[Xr[0]]=Xr[1]||""}Fr={...ci,...si}[qr]||""}}}return Fr},nr=new Map,lr={},fr=async(Pr,Fr)=>{var Qr;const{requestName:Rr}=Pr,qr=await useRequestData({...Pr,projectRequestUrl:vue.unref(m),getModel:ir})(),jr=((Qr=qr==null?void 0:qr.data)==null?void 0:Qr.data)||{};Pr.requestKeyName&&(Yn.value[Pr.requestKeyName]=jr);const Gr=nr.get(Rr);if(Gr!=null&&Gr.length&&(!Fr||lr[Rr])){for(const si of Gr)si(jr);Fr||nr.delete(Rr)}},Qn=(Pr,Fr)=>{lr[Pr]&&(clearInterval(lr[Pr]),delete lr[Pr],nr.delete(Pr));const Rr=vue.unref(tr).filter(jr=>jr.dataType==="request"&&!jr.openCustomRequestData&&jr.customRequestName===Pr),qr=nr.get(Pr)||[];if((Rr==null?void 0:Rr.length)>qr.length&&(qr.push(Fr),nr.set(Pr,qr),(Rr==null?void 0:Rr.length)===qr.length)){const jr=vue.unref(Xn).find(Gr=>Gr.requestName===Pr);jr&&(jr!=null&&jr.isOpenRequestTimer&&(jr!=null&&jr.requestInterval)?(fr(jr,!0),lr[Pr]=setInterval(()=>{fr(jr,!0)},jr.requestInterval*1e3)):fr(jr))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:ir,setGlobalModel:Kn,getAllGlobalModel:Gn,clearInteractiveData:or,getRecordValueByKeyName:dr,hanldePageRequestData:Qn,interactiveData:Zn});const cr=vue.ref({}),pr=(Pr,Fr)=>{cr.value[Pr]=Fr};vue.provide(LOADED_DATA,{loadedData:cr,setLoadedData:pr});const mr=[],gr=()=>{mr.pop()},yr=Pr=>{mr.push(Pr)},ur=new Map,vr=Pr=>ur.get(Pr),_r=(Pr,Fr)=>{ur.set(Pr,Fr)};vue.provide(MODAL_MODEL,{popUseModalIds:gr,pushUseModalIds:yr,getModalModel:vr,setModalModel:_r});const Sr=mitt(),kr=new Set,Cr=(Pr,Fr)=>{kr.add(Pr),Sr.on(Pr,Rr=>{const{eventName:qr,params:jr}=Rr;return typeof Fr[qr]=="function"&&Fr[qr](jr)}),vue.onBeforeUnmount(()=>{br(Pr)})},br=Pr=>{kr.delete(Pr),Sr.off(Pr)},xr=(Pr,Fr,Rr={})=>{if(Pr==="PAGE"){const qr=mr.length;let jr=[];if(qr===0)jr=[...kr];else{const Gr=mr[qr-1];jr=[...vr(Gr)]}jr.forEach(Gr=>{Sr.emit(Gr,{eventName:Fr,params:Rr})})}else vue.unref(qn)||Sr.emit(Pr,{eventName:Fr,params:Rr})};vue.provide(EVENT_BUS,{onEvent:Cr,offEvent:br,emitEvent:xr});const Ar=vue.ref(0),Er=()=>{Ar.value=vue.unref(Ar)+1};vue.provide(GLOBAL_TOKEN,{requestToken:Er});const Ir=new Map,Mr=new Map,Hr=({requestFn:Pr=()=>{},sortNum:Fr=0,id:Rr=""})=>{if(Ir.has(Fr)){const qr=Ir.get(Fr);qr==null||qr.push(Pr)}else Ir.set(Fr,[Pr]);Mr.set(Rr,Pr)},Lr=Pr=>new Promise((Fr,Rr)=>{const qr=[];for(const jr of Pr)qr.push(new Promise(async Gr=>{await jr(),Gr()}));Promise.all(qr).then(jr=>{Fr(jr)}).catch(jr=>{Rr(jr)})}),Vr=Pr=>new Promise(async(Fr,Rr)=>{if(Pr){if(typeof Pr=="string"){const qr=Mr.get(Pr);if(typeof qr=="function"){const jr=request.interceptors.response.use(Gr=>(Fr(Gr),Gr),Gr=>(Rr(Gr),Promise.reject(Gr)));qr(),request.interceptors.response.eject(jr)}}}else{const qr=Array.from(Ir);qr.sort((Gr,Qr)=>Qr[0]-Gr[0]);const jr=qr.length;try{c.pageMode!=="design"&&vue.unref(Ar)>0;for(let Gr=0;Gr<jr;Gr++){const Qr=qr[Gr][1];await Lr(Qr)}}catch(Gr){console.error(Gr)}finally{Ir.clear(),Fr(null),qn.value=!1}}});vue.provide(REQUEST_MODEL,{setRequest:Hr,touchRequest:Vr});const Nr=()=>{Sr.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Nr});const Kr=Pr=>{Sr.on(REFRESH_PAGE,()=>Pr()),vue.onMounted(()=>{Sr.off(REFRESH_PAGE)})},Wr=vue.ref({}),Yr=vue.ref();vue.provide(All_COMPONENT_RES_DATA,{allComponentResData:Wr});const ii=Pr=>{const{id:Fr,data:Rr}=Pr;Rr.success&&(Wr.value[Fr]=(Rr==null?void 0:Rr.data)||{})},ei=Pr=>{Yr.value=Pr},ui=(Pr,Fr)=>{switch(Pr){case"SHOW_INDICATOR_DETAIL_MODAL":vue.unref(d).showModal(Fr);break;case"SAVE_COMPONENT_RES_DATA":ii(Fr);break;case"SAVE_INDEX_PANEL_REQ_PARAMS":ei(Fr);break}};vue.provide(COMMON_OPERATE,{operateAction:(Pr,Fr)=>{ui(Pr,Fr)}}),vue.watchEffect(()=>{var Pr;if((Pr=vue.unref(Jn))!=null&&Pr.length&&vue.unref(g)!=="design"){const{jumpType:Fr,jumpTime:Rr,jumpPage:qr,jumpLink:jr}=c;if(Rr!=null&&Rr.value){let Gr=0;switch(Rr==null?void 0:Rr.suffix){case"hours":Gr=Rr.value*60*60*1e3;break;case"minute":Gr=Rr.value*60*1e3;break;case"seconds":Gr=Rr.value*1e3;break}setTimeout(()=>{let Qr="";Fr==="page"&&qr?Qr=usePageUrl(vue.unref(g),qr):Fr==="link"&&jr&&(Qr=jr),Qr=hn(Qr),window.open(Qr,"_self")},Gr)}}});const oi=Pr=>{var Fr;vue.unref(h).showModal({data:Pr,indicatorUrl:vue.unref(p),indicatorToken:((Fr=window==null?void 0:window.config)==null?void 0:Fr.indicatorToken)||"",context:CONTEXT,pageId:getPageId()})},vi=Pr=>{vue.unref(v).showModal({data:Pr,pageConfig:c,unitText:xi(Pr)})},xi=Pr=>{let Fr="",Rr="";const{componentConfig:qr}=Pr;for(const Gr in qr)if(qr[Gr].key==="currentValue"){Rr=Gr;break}const jr=vue.unref(er).find(Gr=>Gr.id===Rr);return jr!=null&&jr.unitText&&(Fr=jr.unitText),Fr};vue.provide("showIndDetail",oi);const Ci={indexName:"指标名",currentValue:"当前值",refValue:"目标值",lastValueRate:"同比",lastCycleValueRate:"环比",systemSource:"指标标记"};window.addEventListener("message",async Pr=>{var Fr,Rr;if(c.customId==="ProviderConfig"){const qr=Pr.data||{};let jr={data:{}};try{const Gr=(Fr=vue.unref(Jn))==null?void 0:Fr.filter(Qr=>Qr.type==="ecanIndexPanel");if(qr.type==="checkData")jr={type:"checkDataRes",hasData:!!(Gr!=null&&Gr.length),data:{}};else if(qr.type==="getData"){const Qr={};let si="";if(Gr!=null&&Gr.length)if((Rr=vue.unref(d).indDetailInfo)!=null&&Rr.visible){const li=vue.unref(d).getPivotRecordData(),{columns:ci,rows:yi,indicators:di,requestParams:Xr,data:ti,type:hi,drillContext:wi}=li;hi==="pivotTable"?(Xr&&(Qr.全局筛选条件=bi({params:Xr,onlySql:!1})),Qr.当前表结构声明={分析维度:yi.concat(ci).map(pi=>pi.title),绝对值指标:di.filter(pi=>!pi.calculateType).map(pi=>pi.title),"趋势/比率指标":di.filter(pi=>pi.calculateType).map(pi=>pi.title)},Qr.明细数据=ti):(Qr.钻取上下文=wi,Qr.流水日志=ti),si=hi}else{Qr.运营数据=[];for(const li of Gr){const ci={};for(const yi in li.componentConfig){const di=li.componentConfig[yi];if(di.show){const ti=(yi?document.querySelector(`div[cpntid="${yi}"]`).textContent:"").split(/:|:/);ti!=null&&ti.length&&(ci[Ci[di.key]]=ti[ti.length-1])}}Qr.运营数据.push(ci)}vue.unref(Yr)&&(Qr.分析背景=bi({params:vue.unref(Yr),onlySql:!0}))}jr={type:"getDataRes",data:Qr},si&&(jr.dataType=si)}}catch(Gr){jr={error:Gr.message,data:{}}}Pr.source.postMessage(jr,Pr.origin)}});function bi({params:Pr,onlySql:Fr}){var di;const{sqlConditions:Rr,queryColumns:qr,indicatorList:jr}=Pr,Gr=qr.concat(jr).filter(Xr=>Xr.conditions),Qr=loopConditions(Gr,"conditions",!0),si=loopConditions(Rr,"sqlConditions",!1);let li=[];const ci={};if(Fr)li=si;else{li=lodashEs.cloneDeep(Qr);for(const Xr of si)if(!Qr.find(ti=>ti.typeGuid===Xr.typeGuid)){const ti=li.findIndex(hi=>Xr.typeGuid!=="the_date"&&(hi.typeGuid===Xr.typeGuid||hi.typeGuid+"_code"===Xr.typeGuid)||hi.typeGuid===Xr.typeGuid+"_code");ti!==-1&&li.splice(ti,1),li.push(Xr)}}if(!li.find(Xr=>Xr.typeGuid==="the_date"&&!Xr.alias)){const Xr=li.find(hi=>hi.alias.includes("-startTime")),ti=li.find(hi=>hi.alias.includes("-endTime"));if(Xr&&ti){const hi=Xr.alias.replace("-startTime","");hi&&(ci[hi]=`${Xr.fieldValue}至${ti.fieldValue}`)}}for(const Xr of li){const{alias:ti,label:hi,title:wi,fieldValue:pi,variateName:wr}=Xr;if(ti){if(!ti.includes("-startTime")&&!ti.includes("-endTime")&&!wr){const Tr=vue.unref(Jn).find(Dr=>Dr.keyName===ti);if(["ecanSelect"].includes(Tr==null?void 0:Tr.type)){const Dr=((di=vue.unref(Wr)[Tr.id])==null?void 0:di.rows)||[];if(Tr.mode==="multiple"){const Br=pi.split(",");(Br==null?void 0:Br.length)===(Dr==null?void 0:Dr.length)?ci[ti]="全院":ci[ti]=Dr.filter(zr=>Br.includes(zr.value)).map(zr=>zr.label).join(",")}else{const Br=Dr.find(zr=>zr.value===pi);Br&&(ci[ti]=Br.label)}}else ci[ti]=pi}}else ci[wi||hi]=pi}return ci}return vue.onBeforeUnmount(()=>{Ir==null||Ir.clear(),Mr==null||Mr.clear()}),u({touchRequest:Vr,getGlobalModel:ir,onRefreshPage:Kr,emitEvent:xr,getRecordValueByKeyName:dr,showIndDetail:oi,showTrend:vi,props:c,systemVariable:Yn}),{providerConfig:vn,configStyle:Un,indicatorUrl:p,theme:y,drillModalRef:d,indDetailModalRef:h,trendModalRef:v,scaleValue:re,defaultPivotTableFontSize:w,isMobile:Bn}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_83ebb039_lang="",ProviderConfig_vue_vue_type_style_index_1_lang="",_hoisted_1$k=["id"];function _sfc_render$y(c,u,f,d,h,v){const p=vue.resolveComponent("drill-modal"),m=vue.resolveComponent("indicator-detail-modal"),g=vue.resolveComponent("trend-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",{class:"provider-config-container",id:c.customId,ref:"providerConfig",style:vue.normalizeStyle({...c.configStyle,fontFamily:c.pageFontFamily,...c.customStyle})},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_1$k),vue.createVNode(p,{ref:"drillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.defaultPivotTableFontSize,drillDetailUrl:c.drillDetailUrl},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl"]),vue.createVNode(m,{ref:"indDetailModalRef",theme:c.theme},null,8,["theme"]),vue.createVNode(g,{ref:"trendModalRef",theme:c.theme},null,8,["theme"])],64)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-83ebb039"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props$1,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:"18px",color:"",variableColor:"",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:"",targetTemplate:"",dataSetchecked:!1,titleContent:"",titleBackgroundColor:"#ffffff",titleFontColor:"#000000",isMarkDown:!1,isContentMarkDown:!1,parentId:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==";var esmEntry$1={exports:{}},defaults$5={exports:{}};function getDefaults$1(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function changeDefaults$1(c){defaults$5.exports.defaults=c}defaults$5.exports={defaults:getDefaults$1(),getDefaults:getDefaults$1,changeDefaults:changeDefaults$1};const escapeTest=/[&<>"']/,escapeReplace=/[&<>"']/g,escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g,escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=c=>escapeReplacements[c];function escape$3(c,u){if(u){if(escapeTest.test(c))return c.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(c))return c.replace(escapeReplaceNoEncode,getEscapeReplacement);return c}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(c){return c.replace(unescapeTest,(u,f)=>(f=f.toLowerCase(),f==="colon"?":":f.charAt(0)==="#"?f.charAt(1)==="x"?String.fromCharCode(parseInt(f.substring(2),16)):String.fromCharCode(+f.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit$1(c,u){c=c.source||c,u=u||"";const f={replace:(d,h)=>(h=h.source||h,h=h.replace(caret,"$1"),c=c.replace(d,h),f),getRegex:()=>new RegExp(c,u)};return f}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl$1(c,u,f){if(c){let d;try{d=decodeURIComponent(unescape$1(f)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}u&&!originIndependentUrl.test(f)&&(f=resolveUrl(u,f));try{f=encodeURI(f).replace(/%25/g,"%")}catch{return null}return f}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(c,u){baseUrls[" "+c]||(justDomain.test(c)?baseUrls[" "+c]=c+"/":baseUrls[" "+c]=rtrim$1(c,"/",!0)),c=baseUrls[" "+c];const f=c.indexOf(":")===-1;return u.substring(0,2)==="//"?f?u:c.replace(protocol,"$1")+u:u.charAt(0)==="/"?f?u:c.replace(domain,"$1")+u:c+u}const noopTest$1={exec:function(){}};function merge$2(c){let u=1,f,d;for(;u<arguments.length;u++){f=arguments[u];for(d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])}return c}function splitCells$1(c,u){const f=c.replace(/\|/g,(v,p,m)=>{let g=!1,y=p;for(;--y>=0&&m[y]==="\\";)g=!g;return g?"|":" |"}),d=f.split(/ \|/);let h=0;if(d[0].trim()||d.shift(),d[d.length-1].trim()||d.pop(),d.length>u)d.splice(u);else for(;d.length<u;)d.push("");for(;h<d.length;h++)d[h]=d[h].trim().replace(/\\\|/g,"|");return d}function rtrim$1(c,u,f){const d=c.length;if(d===0)return"";let h=0;for(;h<d;){const v=c.charAt(d-h-1);if(v===u&&!f)h++;else if(v!==u&&f)h++;else break}return c.substr(0,d-h)}function findClosingBracket$1(c,u){if(c.indexOf(u[1])===-1)return-1;const f=c.length;let d=0,h=0;for(;h<f;h++)if(c[h]==="\\")h++;else if(c[h]===u[0])d++;else if(c[h]===u[1]&&(d--,d<0))return h;return-1}function checkSanitizeDeprecation$1(c){c&&c.sanitize&&!c.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function repeatString$1(c,u){if(u<1)return"";let f="";for(;u>1;)u&1&&(f+=c),u>>=1,c+=c;return f+c}var helpers={escape:escape$3,unescape:unescape$1,edit:edit$1,cleanUrl:cleanUrl$1,resolveUrl,noopTest:noopTest$1,merge:merge$2,splitCells:splitCells$1,rtrim:rtrim$1,findClosingBracket:findClosingBracket$1,checkSanitizeDeprecation:checkSanitizeDeprecation$1,repeatString:repeatString$1};const{defaults:defaults$4}=defaults$5.exports,{rtrim,splitCells,escape:escape$2,findClosingBracket}=helpers;function outputLink(c,u,f,d){const h=u.href,v=u.title?escape$2(u.title):null,p=c[1].replace(/\\([\[\]])/g,"$1");if(c[0].charAt(0)!=="!"){d.state.inLink=!0;const m={type:"link",raw:f,href:h,title:v,text:p,tokens:d.inlineTokens(p,[])};return d.state.inLink=!1,m}else return{type:"image",raw:f,href:h,title:v,text:escape$2(p)}}function indentCodeCompensation(c,u){const f=c.match(/^(\s+)(?:```)/);if(f===null)return u;const d=f[1];return u.split(`
103
+ `,8,_hoisted_1$m)):c.drillDetailUrl?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.loading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$c,[vue.createVNode(y,{size:"large"})])):(vue.openBlock(),vue.createBlock(b,{key:1,"row-key":x=>x.uid,columns:c.columns,"data-source":c.dataSource,pagination:c.pagination,scroll:{x:"max-content",y:c.isMobile?"70vh":""},onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:x})=>[vue.createElementVNode("div",{title:x,style:vue.normalizeStyle({fontSize:c.fontSize+"px"})},vue.toDisplayString(x),13,_hoisted_3$6)]),bodyCell:vue.withCtx(({text:x})=>[vue.createElementVNode("div",{title:x,style:vue.normalizeStyle({fontSize:c.fontSize+"px"})},vue.toDisplayString(x),13,_hoisted_4$5)]),_:1},8,["row-key","columns","data-source","pagination","scroll","onChange"]))],64))]),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"])}const LastDetail=_export_sfc$1(_sfc_main$v,[["render",_sfc_render$A],["__scopeId","data-v-4e73fb65"]]),_sfc_main$u=vue.defineComponent({name:"DrillModal",components:{ATable:antDesignVue.Table,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,LastDetail},props:{theme:{type:String,default:"light"},drillingMode:{type:String,default:"default"},pageMode:{type:String,default:"normal"},scaleValue:{type:Object,default:()=>({})},pivotTableFontSize:{type:Number,default:16},width:{type:String,default:""},drillDetailUrl:{type:String,default:""}},setup(c,{expose:u,emit:f}){const m={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},g={borderColor:"#666E8D",headerBgColor:"#06347C",headerColor:"#DEE5EF",bodyBgColor:"#112861",bodyColor:"#B2CCE7",indicatorsHeaderBgColor:"#184273",indicatorsHeaderColor:"#FFFFFF",indicatorsBodyBgColor:"#184273",indicatorsBodyColor:"#FFFFFF",aggregateBgColor:"#0F4F9B",aggregateColor:"#FFFCFC",sortNotActiveColor:"#B0B0B0",sortActiveColor:"#00CCFF",dropDownMenuBgColor:"#08154F",dropDownMenuColor:"#B2C3DD",dropDownMenuHightLightColor:"#2E68CF"},y=vue.ref(!1),b=vue.ref(),Pn=vue.ref(),x=vue.ref(),gn=vue.ref(!1),J=vue.ref({}),j=vue.ref([]),Rn=vue.ref([]),Bn=vue.ref([]),w=vue.ref(!1),vn=vue.ref({dateFormat:"YYYY-MM-DD"}),re=vue.reactive({keyName:"",visible:!1,dataSource:[],columns:[],title:"",pagination:{current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:yr=>`共 ${yr} 条数据`}}),qn=vue.ref({}),zn=vue.ref({}),Yn=vue.inject("isMobile",!1),Wn=vue.inject("usedComponentList",[]),Jn=vue.inject("componentList",[]),{getAllGlobalModel:er}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),tr=vue.computed(()=>INDICATOR_URL);vue.watch(()=>re.visible,yr=>{yr?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"});const Xn=vue.computed(()=>({width:vue.unref(J).width,height:vue.unref(J).height})),ar=vue.computed(()=>vue.unref(Yn)?{padding:"10px 0"}:c.drillingMode==="normalTable"&&!gn.value?{height:window.screen.height*.6+48+"px",overflow:"auto"}:{}),hr=vue.computed(()=>{let yr="datav-drill-modal";return(gn.value||vue.unref(Yn))&&(yr+=" full"),c.theme==="darkBlue"&&(yr+=" darkBlue"),yr}),sr=(yr,ur)=>{const{leftAxisList:vr=[],rightAxisList:_r=[],indicators:Sr=[],classificationList:kr=[],rowHeaderList:Cr=[],dimensionList:br=[],seriesList:xr=[],queryColumns:Ar=[],indexLibColumns:Er=[]}=ur.graphicConfig,Mr=vr.concat(_r).concat(Sr).concat(kr).concat(Cr).concat(br).concat(xr).concat(Ar).concat(Er).filter(Vr=>Vr.conditions),Hr=loopConditions(Mr,"conditions",!0),Lr=loopConditions(yr.sqlConditions,"sqlConditions",!1);Rn.value=Hr.concat(Lr).filter(Vr=>Vr.label)||[]},Un=()=>document.querySelector("#modalContainer")||document.body,Zn=async({cpntProps:yr,pageId:ur,formatParams:vr,classifications:_r,indicatorToken:Sr})=>{var kr,Cr,br;return await request({url:`${vue.unref(tr)}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:Sr,operateContext:CONTEXT},data:{source:((kr=yr==null?void 0:yr.graphicConfig)==null?void 0:kr.source)||"INDICATOR_LIB",pageId:ur,indicatorList:(vr==null?void 0:vr.indicatorList)||[],classifications:_r,dataSourceId:((Cr=yr==null?void 0:yr.graphicConfig)==null?void 0:Cr.dataSourceId)||""},signal:((br=window.controller)==null?void 0:br.signal)||""})},Hn=yr=>{let ur="",vr="";const{componentConfig:_r}=yr;for(const kr in _r)if(_r[kr].key==="currentValue"){vr=kr;break}const Sr=vue.unref(Jn).find(kr=>kr.id===vr);return Sr!=null&&Sr.unitText&&(ur=Sr.unitText),ur};function Gn(yr){const ur=[];for(const vr of yr)vr.sqlConditions?ur.push(...Gn(vr.sqlConditions)):vr.fieldName==="the_date"&&ur.push(vr);return ur}const ir=yr=>{var kr;const{sqlConditions:ur=[],queryColumns:vr=[]}=yr||{},_r=Gn(ur),Sr=vr.find(Cr=>Cr.typeGuid==="the_date");if(Sr&&(vn.value={dateFormat:Sr.dateFormat||"YYYY-MM-DD"}),_r!=null&&_r.length)for(const Cr of _r)["startTime","endTime"].includes(Cr.prop)&&(vue.unref(vn)[Cr.prop]=Cr.fieldValue||"",(kr=vue.unref(vn))!=null&&kr.rangeFormat||(vue.unref(vn).rangeFormat=Cr.dateFormat||"YYYY-MM-DD"))},Kn=async yr=>{var Ir,Mr,Hr,Lr,Vr;if(c.drillingMode==="default")return;let ur=lodashEs.cloneDeep(yr).props;if(ur.parentId){const Nr=vue.unref(Wn).find(Kr=>Kr.id===ur.parentId);if((Nr==null?void 0:Nr.dataType)==="indicator")ur=lodashEs.cloneDeep(Nr);else return}re.keyName=ur==null?void 0:ur.keyName;const vr=((Ir=window==null?void 0:window.config)==null?void 0:Ir.indicatorToken)||"",_r=getPageId(),Sr=(ur==null?void 0:ur.graphicConfig)||{},{leftAxisList:kr=[],rightAxisList:Cr=[],indicators:br=[]}=Sr,xr=kr.concat(Cr).concat(br);if(!(xr!=null&&xr.length))return;const Ar=xr.filter(Nr=>Nr.show).map(Nr=>Nr.label);Ar!=null&&Ar.length&&(re.title=`下钻:${Ar.join("、")}`);const Er=En({...ur,allComponentList:vue.unref(Jn),globalModel:er()});if(c.drillingMode==="normalTable"||vue.unref(Yn)){re.pagination.current=1;let Nr=(Er==null?void 0:Er.classification)||(Er==null?void 0:Er.classifications)||[];Array.isArray(Nr)||(Nr=[Nr]);try{w.value=!0,re.visible=!0;const Kr=await Zn({cpntProps:ur,pageId:_r,formatParams:Er,classifications:Nr,indicatorToken:vr}),Wr=((Mr=Kr==null?void 0:Kr.data)==null?void 0:Mr.data)||[];Bn.value=Wr;let Yr=[],ii=[];const{usedDimensions:ei=[],params:ui={}}=yr;if(ei!=null&&ei.length){for(const Rr of Wr)if(!ei.find(qr=>qr.label===Rr.name)){ii.push(Rr);break}Er.sqlConditions=lodashEs.cloneDeep(ui.sqlConditions);const{sqlConditions:Pr=[]}=Er,{record:Fr={}}=yr;ei.forEach((Rr,qr)=>{if(mn(Fr,Rr.label)){const jr=Wr.find(Qr=>Qr.name===Rr.label),Gr={fieldName:Rr.label,fieldValue:Fr[Rr.label],globalCondition:!0,hrpIndexCode:null,hrpIndexCodeNum:null,label:Rr.label,rule:"EQUAL",typeGuid:Rr.typeGuid,valueType:(jr==null?void 0:jr.genericType)||"TEXT"};qr!==ei.length-1&&(Gr.join="&&"),qr===0&&(Pr!=null&&Pr.length)&&(Pr[Pr.length-1].join="&&"),Pr.push(Gr)}})}else Yr=Nr.map(Pr=>({...Pr,calcType:"COLUMN"})),ii=Wr.slice(0,2).sort((Pr,Fr)=>Pr.typeGuid-Fr.typeGuid);sr(Er,lodashEs.cloneDeep(yr.props));for(const Pr of ii)Yr.push({calcType:"COLUMN",columnName:Pr.name,label:Pr.name,show:!0,typeGuid:Pr.typeGuid});Er.queryColumns=Yr,Er.layer="1",Er.plugin="1",delete Er.classification,delete Er.classifications;const{url:oi,...vi}=Er||{};zn.value=vi,ir(Er);const xi=await request({url:`${vue.unref(tr)}${oi}`,method:"post",headers:{Authentication:vr,operateContext:CONTEXT},data:{...vi,pageId:_r}}),{columns:Ci=[],rows:bi=[]}=((Hr=xi==null?void 0:xi.data)==null?void 0:Hr.data)||{};if(yn(ur.type,"indexPanel")){const Pr=Sr.indicators.find(Rr=>Rr.show),Fr=Hn(ur);Fr&&Pr&&(qn.value={[Pr.label]:Fr})}re.columns=Ci.filter(Pr=>!!Pr).map(Pr=>{let Fr=Pr;const Rr=Wr.find(qr=>qr.name===Pr);return Rr&&(Fr=Rr.title||Rr.label),{title:Fr,dataIndex:Pr,width:"120px",customCell:(qr,jr,Gr)=>({[vue.unref(Yn)?"onClick":"onDblclick"]:()=>{Wr.find(si=>Gr.dataIndex===si.name)?(!(ei!=null&&ei.length)||Wr.length-1>ei.length)&&(y.value=!0,vue.nextTick(()=>{vue.unref(b).showModal({...yr,record:qr,usedDimensions:[...ei,...Yr],params:Er})})):vue.unref(Pn).showModal({record:qr,dimOpts:Wr,column:Gr,formatParams:Er,cpntProps:ur,drillDetailUrl:c.drillDetailUrl,drillConditions:vue.unref(pr)})}})}}),re.dataSource=(Array.isArray(bi)?bi:[bi]).map(Pr=>({...Pr,uuid:nanoid(6)})),re.pagination.total=(bi==null?void 0:bi.length)||0,w.value=!1}catch(Kr){console.error(Kr)}}else if(c.drillingMode==="pivotTable"){const Nr=await Zn({cpntProps:ur,pageId:_r,formatParams:Er,classifications:[],indicatorToken:vr});Bn.value=((Lr=Nr==null?void 0:Nr.data)==null?void 0:Lr.data)||[];const Kr=nanoid(6);Sr.queryColumnList||(Sr.queryColumnList=[]),Sr!=null&&Sr.classificationList&&(Sr.queryColumnList=Sr.classificationList,delete Sr.classificationList),Sr!=null&&Sr.seriesList&&(Sr.queryColumnList=Sr.queryColumnList.concat(Sr.seriesList),delete Sr.seriesList),Sr.indicators=lodashEs.cloneDeep(xr||[]),delete Sr.leftAxisList,delete Sr.rightAxisList;const Wr={};if(yn(ur.type,"indexPanel")){const ii=Sr.indicators.find(oi=>oi.show),ei=vue.unref(Bn).slice(0,2).sort((oi,vi)=>oi.typeGuid-vi.typeGuid).map(oi=>({...oi,show:!0,edit:!1,dataTo:"0",width:oi.name==="the_date"?15:0,dataSetParams:{}}));ei!=null&&ei.length&&(Sr.queryColumnList=ei);const ui=Hn(ur);if(ui&&ii){const{label:oi}=ii;Wr.defaultConfig={indexFormatConfig:{[oi]:{fieldName:oi,indicatorKey:oi,position:"right",unit:ui}}}}}ur!=null&&ur.theFlag&&(Wr.theFlag=ur.theFlag),(Vr=Sr.queryColumnList)!=null&&Vr.length||(Sr.queryColumnList=[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期(内置)",name:"the_date",label:"日期(内置)",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dataSetParams:{}}]);const Yr={...lodashEs.cloneDeep(pivotTableProps),id:Kr,keyName:`透视表_${Kr}`,position:"relative",top:0,left:0,width:parseFloat(c.width)*.57+"px",height:window.screen.height*.6+"px",pageId:_r,indicatorToken:vr,context:CONTEXT,globalModel:er(),graphicConfig:Sr,pageConfig:c,...Wr};c.theme==="darkBlue"&&(Yr.styleConfig=g),J.value=Yr,re.visible=!0,vue.nextTick(()=>{vue.unref(x).refreshData()})}vue.nextTick(()=>{dr(!0),nr(!0)})},or=yr=>{re.pagination.current=yr.current},dr=yr=>{const ur=document.querySelector(".datav-drill-modal .ant-modal-header");ur&&(yr?ur.addEventListener("dblclick",fr):ur.removeEventListener("dblclick",fr))},nr=yr=>{const ur=document.querySelector(".datav-drill-modal .ant-modal-header");if(ur)if(yr)ur.addEventListener("mousedown",lr);else{const vr=ur.parentElement;vr&&(vr.style.left="",vr.style.top=""),ur.removeEventListener("mousedown",lr)}};function lr(yr){dragModalAction(yr,".datav-drill-modal .ant-modal-header")}const fr=()=>{gn.value=!gn.value,vue.nextTick(()=>{gn.value?(vue.unref(J).width=parseFloat(c.width)*.97+"px",vue.unref(J).height=window.screen.height*.9+"px",nr(!1)):(vue.unref(J).width=parseFloat(c.width)*.57+"px",vue.unref(J).height=window.screen.height*.6+"px",nr(!0))})},Qn=()=>{gn.value=!1,dr(!1),nr(!1),f("close")},cr=({type:yr,data:ur})=>{if(yr==="11"&&ur){const{indicatorList:vr=[],queryColumns:_r=[]}=ur,kr=vr.concat(_r).filter(xr=>xr.conditions||xr.filter),Cr=loopConditions(kr,"conditions",!0),br=loopConditions(ur.sqlConditions,"sqlConditions",!1);Rn.value=Cr.concat(br).filter(xr=>xr.label)||[]}};vue.watch(Rn,(yr=[])=>{j.value=yr.map(ur=>{let vr=ur.fieldValue;if(vr&&typeof vr=="string"){const _r=vr.split(",");(_r==null?void 0:_r.length)>3&&(vr=_r.slice(0,3).join(",")+"等")}else vr||(vr='""');if(c.drillingMode==="normalTable")return`${ur.label} ${m[ur.rule]} ${vr}`;{const _r=vue.unref(Bn).find(Sr=>Sr.label===ur.label);return`${(_r==null?void 0:_r.title)||ur.label} ${m[ur.rule]} ${vr}`}})||[]},{deep:!0});const pr=vue.computed(()=>vue.unref(Rn).map(yr=>({label:yr.title||yr.label,typeGuid:yr.typeGuid,rule:yr.rule,value:yr.fieldValue}))),mr=()=>{y.value=!1};return u({indDetailInfo:re,showModal:Kn,getPivotRecordData:()=>{var yr,ur,vr,_r,Sr,kr,Cr,br,xr,Ar;if(c.drillingMode==="normalTable"){if((yr=vue.unref(Pn))!=null&&yr.visible)return(ur=vue.unref(Pn))==null?void 0:ur.getRecordData();if((_r=(vr=vue.unref(b))==null?void 0:vr.indDetailInfo)!=null&&_r.visible)return(Sr=vue.unref(b))==null?void 0:Sr.getPivotRecordData();{const{sqlConditions:Er,...Ir}=vue.unref(zn);for(const Mr of Er){const Hr=vue.unref(Bn).find(Lr=>Lr.typeGuid===Mr.typeGuid);Hr!=null&&Hr.title&&(Mr.title=Hr.title)}return{data:vue.toRaw(re.dataSource),columns:[],rows:((Cr=(kr=vue.unref(zn))==null?void 0:kr.queryColumns)==null?void 0:Cr.map(Mr=>({title:Mr.label})))||[],indicators:((xr=(br=vue.unref(zn))==null?void 0:br.indicatorList)==null?void 0:xr.map(Mr=>({title:Mr.label})))||[],requestParams:{...Ir,sqlConditions:Er},type:"pivotTable"}}}else if(c.drillingMode==="pivotTable")return(Ar=vue.unref(x))==null?void 0:Ar.getPivotRecordData()}}),{indDetailInfo:re,pivotTableConfig:J,pivotTableStyle:Xn,detailBodyStyle:ar,wrapClassName:hr,isIndFullScreen:gn,isMobile:Yn,conditionInfo:j,indicatorUrl:tr,allDimensions:Bn,detailLoading:w,pivotTableRef:x,lastDetailRef:Pn,subDrillModalRef:b,theDateInfo:vn,isShowSubDrillModal:y,normalTableUnits:qn,drillConditions:pr,allComponentList:Jn,getContainer:Un,toggleFullScreen:fr,onDetailCancel:Qn,onPivotTableChange:cr,handleTableChange:or,onCloseModal:mr}}}),DrillModal_vue_vue_type_style_index_0_scoped_519a7174_lang="",DrillModal_vue_vue_type_style_index_1_lang="",_hoisted_1$l=["title"],_hoisted_2$b={key:0,class:"spin-container"},_hoisted_3$5=["title"],_hoisted_4$4=["title"];function _sfc_render$z(c,u,f,d,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table"),Pn=vue.resolveComponent("pivot-table"),x=vue.resolveComponent("a-modal"),gn=vue.resolveComponent("last-detail"),J=vue.resolveComponent("drill-modal",!0);return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(x,{visible:c.indDetailInfo.visible,"onUpdate:visible":u[1]||(u[1]=j=>c.indDetailInfo.visible=j),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,"wrap-class-name":c.wrapClassName,bodyStyle:c.detailBodyStyle,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[vue.createElementVNode("div",{class:"detail-modal-title",title:c.conditionInfo.join("、")},vue.toDisplayString(c.indDetailInfo.title)+" "+vue.toDisplayString(c.conditionInfo.join("、")),9,_hoisted_1$l)]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"zoom-btn",onClick:u[0]||(u[0]=(...j)=>c.toggleFullScreen&&c.toggleFullScreen(...j))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))])),c.drillingMode==="normalTable"||c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.detailLoading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,[vue.createVNode(y,{size:"large"})])):(vue.openBlock(),vue.createBlock(b,{key:1,"row-key":j=>j.uuid,columns:c.indDetailInfo.columns,"data-source":c.indDetailInfo.dataSource,pagination:c.indDetailInfo.pagination,onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:j})=>[vue.createElementVNode("div",{class:"detail-table-header-cell",title:j,style:vue.normalizeStyle({fontSize:c.pivotTableFontSize+"px"})},vue.toDisplayString(j),13,_hoisted_3$5)]),bodyCell:vue.withCtx(({text:j,column:Rn})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.pivotTableFontSize+"px"})},vue.toDisplayString(j)+vue.toDisplayString(c.normalTableUnits[Rn.title]),13,_hoisted_4$4)]),_:1},8,["row-key","columns","data-source","pagination","onChange"]))],64)):c.drillingMode==="pivotTable"?(vue.openBlock(),vue.createElementBlock("div",{key:2,style:vue.normalizeStyle({position:"relative",...c.pivotTableStyle})},[vue.createVNode(Pn,vue.mergeProps({ref:"pivotTableRef"},c.pivotTableConfig,{pageMode:c.pageMode,theme:c.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:c.indicatorUrl,relateKeyName:c.indDetailInfo.keyName,allDimensions:c.allDimensions,scaleValue:c.scaleValue,defaultFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,drillConditions:c.drillConditions,isMobile:c.isMobile,isNeedEmptyRow:!1,componentList:c.allComponentList,enlargeContainer:"#norPageConfig",onTableChange:c.onPivotTableChange}),null,16,["pageMode","theme","indicatorUrl","relateKeyName","allDimensions","scaleValue","defaultFontSize","drillDetailUrl","drillConditions","isMobile","componentList","onTableChange"])],4)):vue.createCommentVNode("",!0)]),_:1},8,["visible","getContainer","wrap-class-name","bodyStyle","onCancel"]),vue.createVNode(gn,{ref:"lastDetailRef",theme:c.theme,theDateInfo:c.theDateInfo,scaleValue:c.scaleValue,fontSize:c.pivotTableFontSize,allDimensions:c.allDimensions},null,8,["theme","theDateInfo","scaleValue","fontSize","allDimensions"]),c.isShowSubDrillModal?(vue.openBlock(),vue.createBlock(J,{key:0,ref:"subDrillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","onClose"])):vue.createCommentVNode("",!0)],64)}const DrillModal=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-519a7174"]]),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,components:{IndicatorDetailModal,TrendModal,DrillModal},props:{...providerConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"ProviderConfig"},customStyle:{type:Object,default:()=>({})},fixedHeight:{type:String,default:"0px"}},setup(c,{expose:u,emit:f}){c.pageId||useHrefParamsToGlobalVariables();const d=vue.ref(),h=vue.ref(),v=vue.ref(),p=vue.computed(()=>INDICATOR_URL),m=vue.computed(()=>hn(c.contextRequestUrl)),g=vue.computed(()=>c.pageMode),y=vue.computed(()=>c.theme),b=vue.computed(()=>c.width),Pn=vue.computed(()=>c.height),x=vue.computed(()=>c.pageFontFamily),gn=vue.computed(()=>c.textColor),J=vue.computed(()=>c.fixedHeight?parseFloat(c.fixedHeight):0),j=vue.computed(()=>c.isCompatible),Rn=vue.computed(()=>c.variableList),Bn=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),w=vue.computed(()=>parseFloat(c.pivotTableFontSize)),vn=vue.ref(),re=vue.ref({}),qn=vue.ref(!0),zn=()=>{vn.value.setAttribute("datav-theme",c.theme)},Yn=vue.ref({currentYmd:dayjs().format("YYYY-MM-DD"),currentYear:dayjs().format("YYYY"),currentMonth:dayjs().format("MM"),currentDay:dayjs().format("DD")}),Wn=vue.computed(()=>{const Pr={};if(vue.unref(Rn))for(const Rr of vue.unref(Rn))Pr[Rr.label]=Rr.value;return{$page:{...vue.unref(Yn),...Pr}}});vue.provide(GLOBAL_VARIABLE,{globalVariable:Wn});const Jn=vue.inject("usedComponentList",[]),er=vue.inject("componentList",[]);vue.watch(Wn,()=>{f("setGlobalVar",vue.unref(Yn))},{deep:!0,immediate:!0});const tr=vue.computed(()=>{const Pr=[];for(const Fr of vue.unref(Jn))Fr.type==="ecanModal"?Pr.push(...Fr.componentList):Pr.push(Fr);return Pr});vue.watch(()=>c.theme,()=>{zn()}),vue.onMounted(()=>{zn()});const Xn=vue.computed(()=>{const Pr=[],Fr=vue.unref(er).filter(Rr=>Rr.type==="ecanModal");for(const Rr of Fr)Rr!=null&&Rr.requestList&&Pr.push(...Rr.requestList);return[...Pr,...c.requestList]}),ar=Pr=>Object.prototype.toString.call(Pr)==="[object Object]",hr=Pr=>{const Fr=Pr.split(".");let Rr=vue.unref(Wn);for(const qr of Fr)if(Rr&&ar(Rr))Rr=Rr[qr];else{Rr="";break}return Rr},sr=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:m,pageMode:g,theme:y,touchEventId:sr,width:b,height:Pn,fontFamily:x,textColor:gn,requestList:Xn,isCompatible:j,fixedHeight:J,getGlobalVar:hr});const Un=vue.ref({height:"100%",overflow:c.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Pr=>{let Fr=0;Pr==="auto"?(Fr=Pr,re.value={widthScale:1,heightScale:1}):(Fr=Pr.heightScale,re.value=Pr),(!j.value||!Bn.value)&&(Fr=parseFloat(Pn.value)*Fr+"px"),Un.value.height=Fr}),vue.provide("isMobile",Bn.value),vue.provide("getContainerMap",()=>c.containerMap),vue.provide("getCombinationMap",()=>c.combinationMap),vue.provide("templateOperate",{pageId:c.pageId,templateEmit:f,setTemplateData:Pr=>{var Fr;if(Pr!=null&&Pr.pageId){const{componentId:Rr,...qr}=Pr;(Fr=window.config)!=null&&Fr.urlParams||(window.config.urlParams={}),window.config.urlParams[Pr.pageId]=qr,f("templateChange",Pr)}}});const Zn=vue.ref(),Hn=new Map,Gn=()=>Hn,ir=Pr=>{let Fr=Hn.get(Pr);if(!Fr){const Rr=vue.unref(er).find(qr=>qr.keyName===Pr);Rr&&(Fr=Hn.get(Rr.id))}return Fr},Kn=(Pr,Fr)=>{var Rr;if(Zn.value=Fr,Hn.set(Pr,Fr),!c.pageId){const qr=vue.unref(Jn).find(jr=>jr.id===Pr);qr&&((Rr=window.config)!=null&&Rr.record||(window.config.record={}),window.config.record[qr.keyName]=Fr)}},or=()=>{Zn.value=null},dr=Pr=>{let Fr=Pr;if(Fr){const Rr=Pr.match(/\{(.+?)\}/g);if(Rr!=null&&Rr.length){let qr=Rr[0].slice(1,-1).trim();const jr=qr.match(/\[(.+?)\]/g);let Gr="";jr!=null&&jr.length&&(qr=qr.replace(jr[0],""),Gr=jr[0].slice(1,-1).trim());const Qr=vue.unref(tr).find(si=>si.keyName===qr);if(Qr){const si=ir(Qr.id),{type:li,value:ci,RECORD:yi,recordData:di}=si||{};yn(li,MODEL_KEY_LIST)?Fr=yi[Gr]:yn(li,"select")?di[Gr]?Fr=di[Gr]:Fr=vue.unref(ci):yn(li,["rangePicker","date"])?dayjs.isDayjs(vue.unref(si[Gr]))?Fr=vue.unref(si[Gr]).format(si.format):Fr=vue.unref(si[Gr]):Fr=ci}else{const si=window.config.requestParams||{},li=window.location.search.slice(1).split("&"),ci={};for(const di of li)if(di!=null&&di.includes("=")){const Xr=di.split("=");ci[Xr[0]]=Xr[1]||""}Fr={...ci,...si}[qr]||""}}}return Fr},nr=new Map,lr={},fr=async(Pr,Fr)=>{var Qr;const{requestName:Rr}=Pr,qr=await useRequestData({...Pr,projectRequestUrl:vue.unref(m),getModel:ir})(),jr=((Qr=qr==null?void 0:qr.data)==null?void 0:Qr.data)||{};Pr.requestKeyName&&(Yn.value[Pr.requestKeyName]=jr);const Gr=nr.get(Rr);if(Gr!=null&&Gr.length&&(!Fr||lr[Rr])){for(const si of Gr)si(jr);Fr||nr.delete(Rr)}},Qn=(Pr,Fr)=>{lr[Pr]&&(clearInterval(lr[Pr]),delete lr[Pr],nr.delete(Pr));const Rr=vue.unref(tr).filter(jr=>jr.dataType==="request"&&!jr.openCustomRequestData&&jr.customRequestName===Pr),qr=nr.get(Pr)||[];if((Rr==null?void 0:Rr.length)>qr.length&&(qr.push(Fr),nr.set(Pr,qr),(Rr==null?void 0:Rr.length)===qr.length)){const jr=vue.unref(Xn).find(Gr=>Gr.requestName===Pr);jr&&(jr!=null&&jr.isOpenRequestTimer&&(jr!=null&&jr.requestInterval)?(fr(jr,!0),lr[Pr]=setInterval(()=>{fr(jr,!0)},jr.requestInterval*1e3)):fr(jr))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:ir,setGlobalModel:Kn,getAllGlobalModel:Gn,clearInteractiveData:or,getRecordValueByKeyName:dr,hanldePageRequestData:Qn,interactiveData:Zn});const cr=vue.ref({}),pr=(Pr,Fr)=>{cr.value[Pr]=Fr};vue.provide(LOADED_DATA,{loadedData:cr,setLoadedData:pr});const mr=[],gr=()=>{mr.pop()},yr=Pr=>{mr.push(Pr)},ur=new Map,vr=Pr=>ur.get(Pr),_r=(Pr,Fr)=>{ur.set(Pr,Fr)};vue.provide(MODAL_MODEL,{popUseModalIds:gr,pushUseModalIds:yr,getModalModel:vr,setModalModel:_r});const Sr=mitt(),kr=new Set,Cr=(Pr,Fr)=>{kr.add(Pr),Sr.on(Pr,Rr=>{const{eventName:qr,params:jr}=Rr;return typeof Fr[qr]=="function"&&Fr[qr](jr)}),vue.onBeforeUnmount(()=>{br(Pr)})},br=Pr=>{kr.delete(Pr),Sr.off(Pr)},xr=(Pr,Fr,Rr={})=>{if(Pr==="PAGE"){const qr=mr.length;let jr=[];if(qr===0)jr=[...kr];else{const Gr=mr[qr-1];jr=[...vr(Gr)]}jr.forEach(Gr=>{Sr.emit(Gr,{eventName:Fr,params:Rr})})}else(!vue.unref(qn)||Fr!=="refreshData")&&Sr.emit(Pr,{eventName:Fr,params:Rr})};vue.provide(EVENT_BUS,{onEvent:Cr,offEvent:br,emitEvent:xr});const Ar=vue.ref(0),Er=()=>{Ar.value=vue.unref(Ar)+1};vue.provide(GLOBAL_TOKEN,{requestToken:Er});const Ir=new Map,Mr=new Map,Hr=({requestFn:Pr=()=>{},sortNum:Fr=0,id:Rr=""})=>{if(Ir.has(Fr)){const qr=Ir.get(Fr);qr==null||qr.push(Pr)}else Ir.set(Fr,[Pr]);Mr.set(Rr,Pr)},Lr=Pr=>new Promise((Fr,Rr)=>{const qr=[];for(const jr of Pr)qr.push(new Promise(async Gr=>{await jr(),Gr()}));Promise.all(qr).then(jr=>{Fr(jr)}).catch(jr=>{Rr(jr)})}),Vr=Pr=>new Promise(async(Fr,Rr)=>{if(Pr){if(typeof Pr=="string"){const qr=Mr.get(Pr);if(typeof qr=="function"){const jr=request.interceptors.response.use(Gr=>(Fr(Gr),Gr),Gr=>(Rr(Gr),Promise.reject(Gr)));qr(),request.interceptors.response.eject(jr)}}}else{const qr=Array.from(Ir);qr.sort((Gr,Qr)=>Qr[0]-Gr[0]);const jr=qr.length;try{c.pageMode!=="design"&&vue.unref(Ar)>0;for(let Gr=0;Gr<jr;Gr++){const Qr=qr[Gr][1];await Lr(Qr)}}catch(Gr){console.error(Gr)}finally{Ir.clear(),Fr(null),qn.value=!1}}});vue.provide(REQUEST_MODEL,{setRequest:Hr,touchRequest:Vr});const Nr=()=>{Sr.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Nr});const Kr=Pr=>{Sr.on(REFRESH_PAGE,()=>Pr()),vue.onMounted(()=>{Sr.off(REFRESH_PAGE)})},Wr=vue.ref({}),Yr=vue.ref();vue.provide(All_COMPONENT_RES_DATA,{allComponentResData:Wr});const ii=Pr=>{const{id:Fr,data:Rr}=Pr;Rr.success&&(Wr.value[Fr]=(Rr==null?void 0:Rr.data)||{})},ei=Pr=>{Yr.value=Pr},ui=(Pr,Fr)=>{switch(Pr){case"SHOW_INDICATOR_DETAIL_MODAL":vue.unref(d).showModal(Fr);break;case"SAVE_COMPONENT_RES_DATA":ii(Fr);break;case"SAVE_INDEX_PANEL_REQ_PARAMS":ei(Fr);break}};vue.provide(COMMON_OPERATE,{operateAction:(Pr,Fr)=>{ui(Pr,Fr)}}),vue.watchEffect(()=>{var Pr;if((Pr=vue.unref(Jn))!=null&&Pr.length&&vue.unref(g)!=="design"){const{jumpType:Fr,jumpTime:Rr,jumpPage:qr,jumpLink:jr}=c;if(Rr!=null&&Rr.value){let Gr=0;switch(Rr==null?void 0:Rr.suffix){case"hours":Gr=Rr.value*60*60*1e3;break;case"minute":Gr=Rr.value*60*1e3;break;case"seconds":Gr=Rr.value*1e3;break}setTimeout(()=>{let Qr="";Fr==="page"&&qr?Qr=usePageUrl(vue.unref(g),qr):Fr==="link"&&jr&&(Qr=jr),Qr=hn(Qr),window.open(Qr,"_self")},Gr)}}});const oi=Pr=>{var Fr;vue.unref(h).showModal({data:Pr,indicatorUrl:vue.unref(p),indicatorToken:((Fr=window==null?void 0:window.config)==null?void 0:Fr.indicatorToken)||"",context:CONTEXT,pageId:getPageId()})},vi=Pr=>{vue.unref(v).showModal({data:Pr,pageConfig:c,unitText:xi(Pr)})},xi=Pr=>{let Fr="",Rr="";const{componentConfig:qr}=Pr;for(const Gr in qr)if(qr[Gr].key==="currentValue"){Rr=Gr;break}const jr=vue.unref(er).find(Gr=>Gr.id===Rr);return jr!=null&&jr.unitText&&(Fr=jr.unitText),Fr};vue.provide("showIndDetail",oi);const Ci={indexName:"指标名",currentValue:"当前值",refValue:"目标值",lastValueRate:"同比",lastCycleValueRate:"环比",systemSource:"指标标记"};window.addEventListener("message",async Pr=>{var Fr,Rr;if(c.customId==="ProviderConfig"){const qr=Pr.data||{};let jr={data:{}};try{const Gr=(Fr=vue.unref(Jn))==null?void 0:Fr.filter(Qr=>Qr.type==="ecanIndexPanel");if(qr.type==="checkData")jr={type:"checkDataRes",hasData:!!(Gr!=null&&Gr.length),data:{}};else if(qr.type==="getData"){const Qr={};let si="";if(Gr!=null&&Gr.length)if((Rr=vue.unref(d).indDetailInfo)!=null&&Rr.visible){const li=vue.unref(d).getPivotRecordData(),{columns:ci,rows:yi,indicators:di,requestParams:Xr,data:ti,type:hi,drillContext:wi}=li;hi==="pivotTable"?(Xr&&(Qr.全局筛选条件=bi({params:Xr,onlySql:!1})),Qr.当前表结构声明={分析维度:yi.concat(ci).map(pi=>pi.title),绝对值指标:di.filter(pi=>!pi.calculateType).map(pi=>pi.title),"趋势/比率指标":di.filter(pi=>pi.calculateType).map(pi=>pi.title)},Qr.明细数据=ti):(Qr.钻取上下文=wi,Qr.流水日志=ti),si=hi}else{Qr.运营数据=[];for(const li of Gr){const ci={};for(const yi in li.componentConfig){const di=li.componentConfig[yi];if(di.show){const ti=(yi?document.querySelector(`div[cpntid="${yi}"]`).textContent:"").split(/:|:/);ti!=null&&ti.length&&(ci[Ci[di.key]]=ti[ti.length-1])}}Qr.运营数据.push(ci)}vue.unref(Yr)&&(Qr.分析背景=bi({params:vue.unref(Yr),onlySql:!0}))}jr={type:"getDataRes",data:Qr},si&&(jr.dataType=si)}}catch(Gr){jr={error:Gr.message,data:{}}}Pr.source.postMessage(jr,Pr.origin)}});function bi({params:Pr,onlySql:Fr}){var di;const{sqlConditions:Rr,queryColumns:qr,indicatorList:jr}=Pr,Gr=qr.concat(jr).filter(Xr=>Xr.conditions),Qr=loopConditions(Gr,"conditions",!0),si=loopConditions(Rr,"sqlConditions",!1);let li=[];const ci={};if(Fr)li=si;else{li=lodashEs.cloneDeep(Qr);for(const Xr of si)if(!Qr.find(ti=>ti.typeGuid===Xr.typeGuid)){const ti=li.findIndex(hi=>Xr.typeGuid!=="the_date"&&(hi.typeGuid===Xr.typeGuid||hi.typeGuid+"_code"===Xr.typeGuid)||hi.typeGuid===Xr.typeGuid+"_code");ti!==-1&&li.splice(ti,1),li.push(Xr)}}if(!li.find(Xr=>Xr.typeGuid==="the_date"&&!Xr.alias)){const Xr=li.find(hi=>hi.alias.includes("-startTime")),ti=li.find(hi=>hi.alias.includes("-endTime"));if(Xr&&ti){const hi=Xr.alias.replace("-startTime","");hi&&(ci[hi]=`${Xr.fieldValue}至${ti.fieldValue}`)}}for(const Xr of li){const{alias:ti,label:hi,title:wi,fieldValue:pi,variateName:wr}=Xr;if(ti){if(!ti.includes("-startTime")&&!ti.includes("-endTime")&&!wr){const Tr=vue.unref(Jn).find(Dr=>Dr.keyName===ti);if(["ecanSelect"].includes(Tr==null?void 0:Tr.type)){const Dr=((di=vue.unref(Wr)[Tr.id])==null?void 0:di.rows)||[];if(Tr.mode==="multiple"){const Br=pi.split(",");(Br==null?void 0:Br.length)===(Dr==null?void 0:Dr.length)?ci[ti]="全院":ci[ti]=Dr.filter(zr=>Br.includes(zr.value)).map(zr=>zr.label).join(",")}else{const Br=Dr.find(zr=>zr.value===pi);Br&&(ci[ti]=Br.label)}}else ci[ti]=pi}}else ci[wi||hi]=pi}return ci}return vue.onBeforeUnmount(()=>{Ir==null||Ir.clear(),Mr==null||Mr.clear()}),u({touchRequest:Vr,getGlobalModel:ir,onRefreshPage:Kr,emitEvent:xr,getRecordValueByKeyName:dr,showIndDetail:oi,showTrend:vi,props:c,systemVariable:Yn}),{providerConfig:vn,configStyle:Un,indicatorUrl:p,theme:y,drillModalRef:d,indDetailModalRef:h,trendModalRef:v,scaleValue:re,defaultPivotTableFontSize:w,isMobile:Bn}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_7b95fe71_lang="",ProviderConfig_vue_vue_type_style_index_1_lang="",_hoisted_1$k=["id"];function _sfc_render$y(c,u,f,d,h,v){const p=vue.resolveComponent("drill-modal"),m=vue.resolveComponent("indicator-detail-modal"),g=vue.resolveComponent("trend-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",{class:"provider-config-container",id:c.customId,ref:"providerConfig",style:vue.normalizeStyle({...c.configStyle,fontFamily:c.pageFontFamily,...c.customStyle})},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_1$k),vue.createVNode(p,{ref:"drillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.defaultPivotTableFontSize,drillDetailUrl:c.drillDetailUrl},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl"]),vue.createVNode(m,{ref:"indDetailModalRef",theme:c.theme},null,8,["theme"]),vue.createVNode(g,{ref:"trendModalRef",theme:c.theme},null,8,["theme"])],64)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-7b95fe71"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props$1,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:"18px",color:"",variableColor:"",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:"",targetTemplate:"",dataSetchecked:!1,titleContent:"",titleBackgroundColor:"#ffffff",titleFontColor:"#000000",isMarkDown:!1,isContentMarkDown:!1,parentId:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==";var esmEntry$1={exports:{}},defaults$5={exports:{}};function getDefaults$1(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function changeDefaults$1(c){defaults$5.exports.defaults=c}defaults$5.exports={defaults:getDefaults$1(),getDefaults:getDefaults$1,changeDefaults:changeDefaults$1};const escapeTest=/[&<>"']/,escapeReplace=/[&<>"']/g,escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g,escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=c=>escapeReplacements[c];function escape$3(c,u){if(u){if(escapeTest.test(c))return c.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(c))return c.replace(escapeReplaceNoEncode,getEscapeReplacement);return c}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(c){return c.replace(unescapeTest,(u,f)=>(f=f.toLowerCase(),f==="colon"?":":f.charAt(0)==="#"?f.charAt(1)==="x"?String.fromCharCode(parseInt(f.substring(2),16)):String.fromCharCode(+f.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit$1(c,u){c=c.source||c,u=u||"";const f={replace:(d,h)=>(h=h.source||h,h=h.replace(caret,"$1"),c=c.replace(d,h),f),getRegex:()=>new RegExp(c,u)};return f}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl$1(c,u,f){if(c){let d;try{d=decodeURIComponent(unescape$1(f)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}u&&!originIndependentUrl.test(f)&&(f=resolveUrl(u,f));try{f=encodeURI(f).replace(/%25/g,"%")}catch{return null}return f}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(c,u){baseUrls[" "+c]||(justDomain.test(c)?baseUrls[" "+c]=c+"/":baseUrls[" "+c]=rtrim$1(c,"/",!0)),c=baseUrls[" "+c];const f=c.indexOf(":")===-1;return u.substring(0,2)==="//"?f?u:c.replace(protocol,"$1")+u:u.charAt(0)==="/"?f?u:c.replace(domain,"$1")+u:c+u}const noopTest$1={exec:function(){}};function merge$2(c){let u=1,f,d;for(;u<arguments.length;u++){f=arguments[u];for(d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])}return c}function splitCells$1(c,u){const f=c.replace(/\|/g,(v,p,m)=>{let g=!1,y=p;for(;--y>=0&&m[y]==="\\";)g=!g;return g?"|":" |"}),d=f.split(/ \|/);let h=0;if(d[0].trim()||d.shift(),d[d.length-1].trim()||d.pop(),d.length>u)d.splice(u);else for(;d.length<u;)d.push("");for(;h<d.length;h++)d[h]=d[h].trim().replace(/\\\|/g,"|");return d}function rtrim$1(c,u,f){const d=c.length;if(d===0)return"";let h=0;for(;h<d;){const v=c.charAt(d-h-1);if(v===u&&!f)h++;else if(v!==u&&f)h++;else break}return c.substr(0,d-h)}function findClosingBracket$1(c,u){if(c.indexOf(u[1])===-1)return-1;const f=c.length;let d=0,h=0;for(;h<f;h++)if(c[h]==="\\")h++;else if(c[h]===u[0])d++;else if(c[h]===u[1]&&(d--,d<0))return h;return-1}function checkSanitizeDeprecation$1(c){c&&c.sanitize&&!c.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function repeatString$1(c,u){if(u<1)return"";let f="";for(;u>1;)u&1&&(f+=c),u>>=1,c+=c;return f+c}var helpers={escape:escape$3,unescape:unescape$1,edit:edit$1,cleanUrl:cleanUrl$1,resolveUrl,noopTest:noopTest$1,merge:merge$2,splitCells:splitCells$1,rtrim:rtrim$1,findClosingBracket:findClosingBracket$1,checkSanitizeDeprecation:checkSanitizeDeprecation$1,repeatString:repeatString$1};const{defaults:defaults$4}=defaults$5.exports,{rtrim,splitCells,escape:escape$2,findClosingBracket}=helpers;function outputLink(c,u,f,d){const h=u.href,v=u.title?escape$2(u.title):null,p=c[1].replace(/\\([\[\]])/g,"$1");if(c[0].charAt(0)!=="!"){d.state.inLink=!0;const m={type:"link",raw:f,href:h,title:v,text:p,tokens:d.inlineTokens(p,[])};return d.state.inLink=!1,m}else return{type:"image",raw:f,href:h,title:v,text:escape$2(p)}}function indentCodeCompensation(c,u){const f=c.match(/^(\s+)(?:```)/);if(f===null)return u;const d=f[1];return u.split(`
104
104
  `).map(h=>{const v=h.match(/^\s+/);if(v===null)return h;const[p]=v;return p.length>=d.length?h.slice(d.length):h}).join(`
105
105
  `)}var Tokenizer_1$1=class{constructor(u){this.options=u||defaults$4}space(u){const f=this.rules.block.newline.exec(u);if(f)return f[0].length>1?{type:"space",raw:f[0]}:{raw:`
106
106
  `}}code(u){const f=this.rules.block.code.exec(u);if(f){const d=f[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:f[0],codeBlockStyle:"indented",text:this.options.pedantic?d:rtrim(d,`