@ecan-bi/datav 1.2.47 → 1.2.48
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.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.2.
|
|
1
|
+
/*! @ecan-bi/datav@1.2.48 */
|
|
2
2
|
(function(H,a){typeof exports=="object"&&typeof module<"u"?a(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("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/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/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","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/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","echarts","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],a):(H=typeof globalThis<"u"?globalThis:H||self,a(H["@ecan/bi-datav"]={},H.Vue,H["echarts/core"],H.ResizeDetector,H.AntDesignVue,null,null,H.LodashEs,H.Dayjs,H.Axios,H.Mitt,null,null,null,H["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,H["echarts/renderers"],H["echarts/charts"],H["echarts/components"],null,H.Echarts,null,null,H.Xlsx,H.big.js))})(this,function(H,a,Ue,ua,ne,ed,td,We,ve,s0,l0,nd,od,ad,ha,rd,id,sd,ld,ct,Ze,ge,cd,c0,fd,dd,Dt,f0){var Ki,Xi,Qi,Ji;"use strict";function d0(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const u0=d0(c0),h0=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function g0(e,n){function t(r){return(...i)=>{if(e.value||n(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[r].apply(e.value,i)}}function o(){const r=Object.create(null);return h0.forEach(i=>{r[i]=t(i)}),r}return o()}function m0(e,n,t){let o=null;a.watch([t,e,n],([r,i,l],s,f)=>{r&&i&&l&&(o=Ue.throttle(()=>{i.resize()},100),ua.addListener(r,o)),f(()=>{o&&r&&ua.removeListener(r,o)})})}const x0={autoresize:Boolean},y0="ecLoadingOptions";function p0(e,n,t){const o=a.inject(y0,{}),r=a.computed(()=>({...a.unref(o),...t==null?void 0:t.value}));a.watchEffect(()=>{const i=e.value;i&&(n.value?i.showLoading(r.value):i.hideLoading())})}const v0={loading:Boolean,loadingOptions:Object},ud="",b0=/^on[^a-z]/,S0=e=>b0.test(e);function w0(e){const n={};for(const t in e)S0(t)||(n[t]=e[t]);return n}const C0="x-vue-echarts",A0="ecTheme",k0="ecInitOptions",E0="ecUpdateOptions",et=a.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...x0,...v0},inheritAttrs:!1,setup(e,{attrs:n,listeners:t}){const o=a.shallowRef(),r=a.shallowRef(),i=a.shallowRef(),l=a.inject(A0,null),s=a.inject(k0,null),f=a.inject(E0,null),{autoresize:c,manualUpdate:d,loading:v,loadingOptions:h}=a.toRefs(e),u=a.computed(()=>i.value||e.option||Object.create(null)),g=a.computed(()=>e.theme||a.unref(l)||{}),x=a.computed(()=>e.initOptions||a.unref(s)||{}),w=a.computed(()=>e.updateOptions||a.unref(f)||{}),C=a.computed(()=>w0(n));function p(T){if(r.value||!o.value)return;const k=r.value=Ue.init(o.value,g.value,x.value);e.group&&(k.group=e.group);let B=t;B||(B={},Object.keys(n).filter(D=>D.indexOf("on")===0&&D.length>2).forEach(D=>{const I=D.charAt(2).toLowerCase()+D.slice(3);B[I]=n[D]})),Object.keys(B).forEach(D=>{const I=B[D];I&&(D.indexOf("zr:")===0?k.getZr().on(D.slice(3).toLowerCase(),I):k.on(D.toLowerCase(),I))});function S(){if(k&&!k.isDisposed())try{k.resize()}catch(D){if(D.message==="Cannot read property 'get' of undefined")return;throw D}}function A(){k.setOption(T||u.value,w.value)}c.value?a.nextTick(()=>{S(),A()}):A()}function m(T,k){e.manualUpdate&&(i.value=T),r.value?r.value.setOption(T,k||{}):p(T)}function y(){r.value&&(r.value.dispose(),r.value=void 0)}let E=null;a.watch(d,T=>{typeof E=="function"&&(E(),E=null),T||(E=a.watch(()=>e.option,k=>{k&&(r.value?r.value.setOption(k,w.value):p())},{deep:!0}))},{immediate:!0}),a.watch([g,x],()=>{y(),p()},{deep:!0}),a.watchEffect(()=>{e.group&&r.value&&(r.value.group=e.group)});const b=g0(r,p);return p0(r,v,h),m0(r,c,o),a.onMounted(()=>{e.option&&p()}),a.onUnmounted(y),{chart:r,root:o,setOption:m,nonEventAttrs:C,...b}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",a.h(C0,e)}});function Pe(e,n){T0(e)&&(e="100%");var t=B0(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function T0(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function B0(e){return typeof e=="string"&&e.indexOf("%")!==-1}function _0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Pt(e){return e<=1?"".concat(Number(e)*100,"%"):e}function on(e){return e.length===1?"0"+e:String(e)}function D0(e,n,t){return{r:Pe(e,255)*255,g:Pe(n,255)*255,b:Pe(t,255)*255}}function an(e,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(n-e)*(6*t):t<1/2?n:t<2/3?e+(n-e)*(2/3-t)*6:e}function R0(e,n,t){var o,r,i;if(e=Pe(e,360),n=Pe(n,100),t=Pe(t,100),n===0)r=t,i=t,o=t;else{var l=t<.5?t*(1+n):t+n-t*n,s=2*t-l;o=an(s,l,e+1/3),r=an(s,l,e),i=an(s,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function I0(e,n,t){e=Pe(e,255),n=Pe(n,255),t=Pe(t,255);var o=Math.max(e,n,t),r=Math.min(e,n,t),i=0,l=o,s=o-r,f=o===0?0:s/o;if(o===r)i=0;else{switch(o){case e:i=(n-t)/s+(n<t?6:0);break;case n:i=(t-e)/s+2;break;case t:i=(e-n)/s+4;break}i/=6}return{h:i,s:f,v:l}}function O0(e,n,t){e=Pe(e,360)*6,n=Pe(n,100),t=Pe(t,100);var o=Math.floor(e),r=e-o,i=t*(1-n),l=t*(1-r*n),s=t*(1-(1-r)*n),f=o%6,c=[t,l,i,i,s,t][f],d=[s,t,t,l,i,i][f],v=[i,i,s,t,t,l][f];return{r:c*255,g:d*255,b:v*255}}function L0(e,n,t,o){var r=[on(Math.round(e).toString(16)),on(Math.round(n).toString(16)),on(Math.round(t).toString(16))];return o&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function ga(e){return Ne(e)/255}function Ne(e){return parseInt(e,16)}var ma={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 Rt(e){var n={r:0,g:0,b:0},t=1,o=null,r=null,i=null,l=!1,s=!1;return typeof e=="string"&&(e=M0(e)),typeof e=="object"&&(Ye(e.r)&&Ye(e.g)&&Ye(e.b)?(n=D0(e.r,e.g,e.b),l=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ye(e.h)&&Ye(e.s)&&Ye(e.v)?(o=Pt(e.s),r=Pt(e.v),n=O0(e.h,o,r),l=!0,s="hsv"):Ye(e.h)&&Ye(e.s)&&Ye(e.l)&&(o=Pt(e.s),i=Pt(e.l),n=R0(e.h,o,i),l=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=_0(t),{ok:l,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}var N0="[-\\+]?\\d+%?",z0="[-\\+]?\\d*\\.\\d+%?",tt="(?:".concat(z0,")|(?:").concat(N0,")"),rn="[\\s|\\(]+(".concat(tt,")[,|\\s]+(").concat(tt,")[,|\\s]+(").concat(tt,")\\s*\\)?"),sn="[\\s|\\(]+(".concat(tt,")[,|\\s]+(").concat(tt,")[,|\\s]+(").concat(tt,")[,|\\s]+(").concat(tt,")\\s*\\)?"),He={CSS_UNIT:new RegExp(tt),rgb:new RegExp("rgb"+rn),rgba:new RegExp("rgba"+sn),hsl:new RegExp("hsl"+rn),hsla:new RegExp("hsla"+sn),hsv:new RegExp("hsv"+rn),hsva:new RegExp("hsva"+sn),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 M0(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(ma[e])e=ma[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=He.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=He.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=He.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=He.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=He.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=He.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=He.hex8.exec(e),t?{r:Ne(t[1]),g:Ne(t[2]),b:Ne(t[3]),a:ga(t[4]),format:n?"name":"hex8"}:(t=He.hex6.exec(e),t?{r:Ne(t[1]),g:Ne(t[2]),b:Ne(t[3]),format:n?"name":"hex"}:(t=He.hex4.exec(e),t?{r:Ne(t[1]+t[1]),g:Ne(t[2]+t[2]),b:Ne(t[3]+t[3]),a:ga(t[4]+t[4]),format:n?"name":"hex8"}:(t=He.hex3.exec(e),t?{r:Ne(t[1]+t[1]),g:Ne(t[2]+t[2]),b:Ne(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Ye(e){return!!He.CSS_UNIT.exec(String(e))}var Ft=2,xa=.16,P0=.05,F0=.05,H0=.15,ya=5,pa=4,q0=[{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 va(e){var n=e.r,t=e.g,o=e.b,r=I0(n,t,o);return{h:r.h*360,s:r.s,v:r.v}}function Ht(e){var n=e.r,t=e.g,o=e.b;return"#".concat(L0(n,t,o,!1))}function V0(e,n,t){var o=t/100,r={r:(n.r-e.r)*o+e.r,g:(n.g-e.g)*o+e.g,b:(n.b-e.b)*o+e.b};return r}function ba(e,n,t){var o;return Math.round(e.h)>=60&&Math.round(e.h)<=240?o=t?Math.round(e.h)-Ft*n:Math.round(e.h)+Ft*n:o=t?Math.round(e.h)+Ft*n:Math.round(e.h)-Ft*n,o<0?o+=360:o>=360&&(o-=360),o}function Sa(e,n,t){if(e.h===0&&e.s===0)return e.s;var o;return t?o=e.s-xa*n:n===pa?o=e.s+xa:o=e.s+P0*n,o>1&&(o=1),t&&n===ya&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function wa(e,n,t){var o;return t?o=e.v+F0*n:o=e.v-H0*n,o>1&&(o=1),Number(o.toFixed(2))}function ln(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],o=Rt(e),r=ya;r>0;r-=1){var i=va(o),l=Ht(Rt({h:ba(i,r,!0),s:Sa(i,r,!0),v:wa(i,r,!0)}));t.push(l)}t.push(Ht(o));for(var s=1;s<=pa;s+=1){var f=va(o),c=Ht(Rt({h:ba(f,s),s:Sa(f,s),v:wa(f,s)}));t.push(c)}return n.theme==="dark"?q0.map(function(d){var v=d.index,h=d.opacity,u=Ht(V0(Rt(n.backgroundColor||"#141414"),Rt(t[v]),h*100));return u}):t}var cn={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"},fn={},dn={};Object.keys(cn).forEach(function(e){fn[e]=ln(cn[e]),fn[e].primary=fn[e][5],dn[e]=ln(cn[e],{theme:"dark",backgroundColor:"#141414"}),dn[e].primary=dn[e][5]});var Ca=[],It=[],j0="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function G0(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function U0(e,n){if(n=n||{},e===void 0)throw new Error(j0);var t=n.prepend===!0?"prepend":"append",o=n.container!==void 0?n.container:document.querySelector("head"),r=Ca.indexOf(o);r===-1&&(r=Ca.push(o)-1,It[r]={});var i;return It[r]!==void 0&&It[r][t]!==void 0?i=It[r][t]:(i=It[r][t]=G0(),t==="prepend"?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),i.styleSheet?i.styleSheet.cssText+=e:i.textContent+=e,i}function Aa(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){W0(e,r,t[r])})}return e}function W0(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $0(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(n))}function Z0(e,n){$0(e,"[@ant-design/icons-vue] ".concat(n))}function ka(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function un(e,n,t){return t?a.h(e.tag,Aa({key:n},t,e.attrs),(e.children||[]).map(function(o,r){return un(o,"".concat(n,"-").concat(e.tag,"-").concat(r))})):a.h(e.tag,Aa({key:n},e.attrs),(e.children||[]).map(function(o,r){return un(o,"".concat(n,"-").concat(e.tag,"-").concat(r))}))}function Ea(e){return ln(e)[0]}function Ta(e){return e?Array.isArray(e)?e:[e]:[]}var Y0=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -94,7 +94,7 @@ version: 2.9.0
|
|
|
94
94
|
`,t+="-----END RSA PRIVATE KEY-----",t},n.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
|
|
95
95
|
`;return t+=n.wordwrap(this.getPublicBaseKeyB64())+`
|
|
96
96
|
`,t+="-----END PUBLIC KEY-----",t},n.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},n}(Cl),so,Bl=typeof process<"u"?(so=process.env)===null||so===void 0?void 0:so.npm_package_version:void 0,_l=function(){function e(n){n===void 0&&(n={}),n=n||{},this.default_key_size=n.default_key_size?parseInt(n.default_key_size,10):1024,this.default_public_exponent=n.default_public_exponent||"010001",this.log=n.log||!1,this.key=null}return e.prototype.setKey=function(n){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Mr(n)},e.prototype.setPrivateKey=function(n){this.setKey(n)},e.prototype.setPublicKey=function(n){this.setKey(n)},e.prototype.decrypt=function(n){try{return this.getKey().decrypt(Br(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return Ut(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,o){try{return Ut(this.getKey().sign(n,t,o))}catch{return!1}},e.prototype.verify=function(n,t,o){try{return this.getKey().verify(n,Br(t),o)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new Mr,n&&{}.toString.call(n)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,n);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=Bl,e}();const Pr=new _l,Et=Dl();function Dl(){let n=Math.random().toString(36).substr(2);for(;n.length<16;)n+=Math.random().toString(36).substr(2);return n=n.substr(0,16),n}const Fr=ze.enc.Utf8.parse("ABCDEF1234123412");function Rl(e,n){n=n||Et;const t=ze.enc.Utf8.parse(n);let o="";switch(typeof e){case"string":o=ze.enc.Utf8.parse(e);break;case"object":o=ze.enc.Utf8.parse(JSON.stringify(e));break;default:o=ze.enc.Utf8.parse(e.toString())}return ze.AES.encrypt(o,t,{iv:Fr,mode:ze.mode.CBC,padding:ze.pad.ZeroPadding}).toString()}function Hr(e,n){n=n||Et;const t=ze.enc.Utf8.parse(n),o=ze.AES.decrypt(e,t,{iv:Fr,mode:ze.mode.CBC,padding:ze.pad.ZeroPadding});return ze.enc.Utf8.stringify(o).toString()}function Il(e){Pr.setPublicKey(e)}function Ol(e){return Pr.encrypt(e)}function qr(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const t=["/diagram","/dataview"].map(o=>`^(.*?)${o}(/|$)`);for(const o of t)if(new RegExp(o).test(e))return!0;return!1}function Ll(e){const{paramType:n,data:t,params:o,method:r}=e;n==="form"?["get","delete"].includes(r)?e.params=Tt(o,"string"):e.data=Tt(t,"string"):["get","delete"].includes(r)?e.params=Tt(o,"string"):e.data=Tt(t)}function Tt(e,n){let t=e||{};if(n==="string"){t="";for(const s in e)if(Object.hasOwnProperty.call(e,s)){const f=e[s];t+=`${s}=${encodeURIComponent(f)}&`}}Il("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const r=Ol(Et);return{c:Rl(t,Et),p:r}}window.getEncryptParam=Tt;function Nl(e,n){var t;(t=window==null?void 0:window.config)!=null&&t.encryptFlag&&qr(e.url)&&(e.data instanceof FormData?e.data=zl(e.data):Ll(e))}function zl(e){const n=e.entries(),t=new FormData,o={};for(const i of n){const l=i[0],s=i[1];s instanceof Blob?t.append(l,s):o[l]=s}const r=Tt(o,"json");return typeof r=="object"&&(t.append("c",r.c),t.append("p",r.p)),t}window.xhaesKey=Et,window.xhaesDecrypt=Hr;function Vr(e,n){var t;if((t=window==null?void 0:window.config)!=null&&t.encryptFlag&&qr(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const o=Hr(e.data.data.content,Et);e.data=JSON.parse(o)}}const jr=window.config.requestErrorTip,Xe=s0.create({timeout:1e3*180});Xe.interceptors.request.use(e=>(Nl(e),e),e=>Promise.reject(e)),Xe.interceptors.response.use(e=>{var n,t,o;return jr&&+((n=e==null?void 0:e.data)==null?void 0:n.code)==500&&ne.message.error({content:((t=e==null?void 0:e.data)==null?void 0:t.msg)||((o=e==null?void 0:e.data)==null?void 0:o.message)||"服务器异常",key:"SERVER_ERROR"}),Vr(e),e},e=>{if(Vr(e==null?void 0:e.response),jr)if(e.message.includes("timeout"))ne.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:n}=(e==null?void 0:e.response)||{};n>=400&&n<500&&ne.message.error({content:"请求异常",key:"REQUEST_ERROR"}),n>=500&&ne.message.error({content:"服务器异常",key:"REQUEST_ERROR"})}return Promise.reject(e)});const Gr=e=>e.replace(/\\n/g,`
|
|
97
|
-
`),lo=(e,n=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Ml=e=>{const n=parseFloat(e+"");return isNaN(n)?e:(n+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},Jt=(e,n=2)=>{const t=e+"";if(t.includes("%"))return e;const o=parseFloat(t);return isNaN(o)?e:`${(o*100).toFixed(n)}%`},Bt=(e,n)=>{if(typeof e=="string"&&typeof n=="string")return e.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(n)){const t=n.length;for(let o=0;o<t;o++){const r=n[o];if(typeof r=="string"&&e.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},en=(e,n)=>{const t={dayjs:ve,...n};let o="";const r=[];for(const s in t)o+=`${s},`,r.push(t[s]);o=o.replace(/,$/,"");const i=`function (${o}){return ${e}}`;let l;try{l=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return l},we=(e="",{textData:n,codeData:t}={},{useNewline:o=!1,useSpace:r=!1}={})=>{const l={...window.config||{},...n},s=e.match(/\{(.+?)\}/g);if(s==null||s.length===0)return e;for(let f=0;f<s.length;f++){const c=s[f];let d=c.slice(1,-1).trim();const v=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,h=d.match(v);for(let u=0;u<h.length;u++){const g=h[u],x=l[g];x!=null&&(d=d.replace(g,x))}(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(d=en(d,t)),e=e.replace(c,d)}return o&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),r&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},Oe=(e,n=()=>{})=>{const{requestUrl:t,requestMethod:o,requestHeaders:r,requestParams:i,requestInterval:l,isOpenRequestTimer:s}=e,{contextRequestUrl:f,touchEventId:c}=a.inject(Te,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:d}=a.inject(Ae,{getGlobalModel:g=>{}}),v=we(t),h=async(g={})=>{if(!v||!o||!r)return;let x={};i.forEach(y=>{const{key:E,value:b}=y;if(typeof b=="object"&&b!=null&&b.id){let T={};const{id:k,prop:B,propKey:S,operate:A}=b;k==="THIS"?T=d(a.unref(c))||{}:T=d(k)||{};const D=a.unref(T[B]);let I=null;if(["date","range"].some(F=>Bt(T==null?void 0:T.type,F))){const{value:F,type:P,mode:q}=A||{};if(F&&P&&q)switch(P){case"add":I=a.unref(D).add(F,q);break;case"minus":I=a.unref(D).subtract(F,q);break}I==null&&(I=a.unref(D)),I=(I==null?void 0:I.format((S==null?void 0:S.trim())||T.format))||""}else Object.prototype.toString.call(D)==="[object Object]"?S?I=D[S]:I=B?D[B]:D:Bt(T==null?void 0:T.type,"select")&&a.unref(D)&&B&&Array.isArray(a.unref(D))?I=a.unref(D).map(F=>Object.prototype.hasOwnProperty.call(F,B)?F[B]:F):I=D;x[E]=I}else typeof b=="string"&&(x[E]=we(b))}),x={...window.config.requestParams,...g,...x};let w="";const C=Object.keys(x),p=C.length-1,m=C.length;C.forEach((y,E)=>{let b=x[y];Object.prototype.toString.call(b)==="[object Object]"&&(b=JSON.stringify(b)),E===0?m!==1?w+=`?${y}=${b}&`:w+=`?${y}=${b}`:E===p?w+=`${y}=${b}`:w+=`${y}=${b}&`});try{const y=["get","head"].includes(o);let E=y?v+w:v;x.dataSqlId&&!E.includes("dataSqlId")&&(E+=`${E.includes("?")?"&":"?"}dataSqlId=${x.dataSqlId}`);const b=await Xe({baseURL:a.unref(f)||"",url:E,method:o,headers:r,data:y?{}:x});return n(b),b}catch(y){console.error(y)}},u=s&&setInterval(h,l*1e3);return a.onUnmounted(()=>{clearInterval(u)}),h},rt=(e=[],n)=>{let{name:t="name",types:o=[]}=n||{};t=(t==null?void 0:t.trim())||t;const r=new Set,i=new Map,l=e.length,s=o.length;for(let d=0;d<l;d++){const v=e[d],h=v[t];r.add(h);for(let u=0;u<s;u++){const g=o[u],{label:x,value:w}=g,C={...v,value:v[w]};if(i.has(x)){const p=i.get(x);p.push(C),i.set(x,p)}else i.set(x,[C])}}const f=Array.from(r),c=[];for(const[d,v]of i)c.push({name:d,data:v});return{dimensions:f,dataset:c}},ut=(e,n=!1)=>{var o;if(!e)return e;let t="";return e!=null&&e.includes("://")?t=e:t=((o=window==null?void 0:window.config)==null?void 0:o.uploadPath)+e,n&&(t=`url(${t})`),t},Ur=(e,n)=>{const t=`${Ha}/preview?pageId=${n}`,o=`${Ha}/${n}`;return e==="preview"?t:o},ht=(e,n)=>{var r;if(e==null)return n;const t=e.match(/\{.*\}/g);if(t==null||t.length===0)return n;const o=t.length;for(let i=0;i<o;i++){const l=t[i];if(l==null||l==="")break;let s=(r=l.slice(1,-1))==null?void 0:r.trim();s=s==null?void 0:s.replace(/value/g,n);try{let f=s;(/\(.*\)/g.test(s)||/[+/\\*]/g.test(s))&&(f=en(s)),e=e.replace(l,f)}catch{e=e.replace(l,s)}}return e},je=(e={})=>{const{requestToken:n}=a.inject(za,{requestToken:()=>{}});e.dataType==="indicator"&&n();const t=(c={})=>{const{label:d,name:v,location:h,show:u,indexCode:g}=c;return{label:d,columnName:v,location:h,show:u,calcType:"COLUMN",hrpIndexCode:g}},o=(c,d)=>Object.prototype.hasOwnProperty.call(c,d),r=c=>{o(c,"dataType")&&(c.fieldType==="DATE"&&(c.label=c.fieldName,c.dataType==="component"&&(c.fieldValue="${"+c.fieldValue+"}")),delete c.dataType),o(c,"activeKey")&&delete c.activeKey,o(c,"radioValue")&&delete c.radioValue},i=c=>{const d=[];return c!=null&&c.length&&c.forEach(v=>{if(v.join&&v.conditions){const h=!v.conditions.some(u=>u.join&&u.conditions);v.conditions.forEach((u,g)=>{r(u),h?g<v.conditions.length-1?d.push({join:v.join,...u}):d.push(u):u.join&&u.conditions?d.push({conditions:i([u]),join:v.join}):d.push(u)})}else r(v),d.push(v)}),d},l=(c={})=>{const{label:d,name:v,location:h,show:u,indexCode:g,calcType:x="COLUMN",builtInFormula:w,builtInValueSource:C,builtInCalcWay:p,formula:m,conditions:y,aggregate:E}=c;let b;return y&&(b=i(y)),{label:d,columnName:v,location:h,show:u,calcType:x,hrpIndexCode:g,aggregate:E,builtInFormula:w,builtInValueSource:C,builtInCalcWay:p,formula:m,conditions:b}},{getGlobalModel:s}=a.inject(Ae,{getGlobalModel:c=>{}}),f=(c=[])=>{var h,u;const d=c.length;console.log("controlList",c);const v=[];for(let g=0;g<d;g++){const x=c[g],{id:w,keyName:C,conditionLabel:p,conditionKey:m,conditionValueType:y,prop:E}=x,b={rule:"NONE",label:p,fieldName:m,fieldValue:"",valueType:y,alias:`${C||w}-${E}`},T=s(w)||{};console.log("model",T);const{value:k,format:B="YYYY-MM-DD",type:S="",useCurrentTime:A}=T||{};Bt(T.type,"date")?(A?b.fieldValue=ve().format(B):b.fieldValue=(h=a.unref(k))==null?void 0:h.format(B),b.dateFormat=B):S==="ecanRangePicker"&&E?(E==="startTime"?b.rule="GREATER_EQUAL":E==="endTime"&&(b.rule="LESS_EQUAL"),E==="endTime"&&A?b.fieldValue=ve().format(B):b.fieldValue=(u=a.unref(T[E]))==null?void 0:u.format(B),b.dateFormat=B):b.fieldValue=a.unref(k),v.push(b)}return v};return async()=>{var M,_,L,z;const{graphicConfig:c,type:d,isGroupTable:v=!1}=e;let{source:h,dataViewId:u,plugin:g="1",layer:x,chartType:w,classificationList:C=[],rowHeaderList:p=[],seriesList:m=[],leftAxisList:y=[],rightAxisList:E=[],queryColumnList:b=[],indicators:T=[],controlList:k=[],formFields:B={},idxLibMode:S,preview:A=!1}=c||{};x==null&&(Bt(d,["table"])?x="1":Bt(d,["select","checkbox","radio"])?x="3":x="2");let D,I="";if(Array.isArray(C)&&C.length>0){const N=C.length;for(let U=0;U<N;U++){const K=C[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re,dateFormat:Ce,typeGuid:pe}=K;if(oe||N===1){I=pe,D={label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)},Ce&&(D.dateFormat=Ce),X==="the_date"&&!D.dateFormat&&(D.dateFormat="YYYY-MM");break}}}let V;if(Array.isArray(m)&&m.length>0){const N=m.length;for(let U=0;U<N;U++){const K=m[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re}=K;if(oe||N===1){V={label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)};break}}}const F=[];if(Array.isArray(p)&&p.length>0){const N=p.length;for(let U=0;U<N;U++){const K=p[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re}=K;F.push({label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)})}}const P=[];b==null||b.forEach(N=>{P.push(t(N))});const q=[];if(y==null||y.forEach(N=>{N.location="LEFT",q.push(l(N))}),E==null||E.forEach(N=>{N.location="RIGHT",q.push(l(N))}),T==null||T.forEach(N=>{N.location="LEFT",q.push(l(N))}),Bt(d,["text","proportion"])&&(w="zb"),v){if(F.length===0||q.length===0)return;w="grouptable"}else{if(x==="1"&&P.length===0)return;if(x==="2"&&q.length===0)return;if(x==="3"&&(!I||!B.labelField||!B.valueField))return}let R=[];(c==null?void 0:c.pageMode)==="design"?R=c.sqlConditions??[]:R=f(k);const O=(M=window==null?void 0:window.config)==null?void 0:M.pageId;if((_=Object.keys(B))!=null&&_.length)try{return await Xe.post(`${Fa}/diagram/formData?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:"4",layer:x,chartType:"normalSelect",rangeIndexTypeGuid:I,type:"normalSelect",labelField:B.labelField,valueField:B.valueField,pageId:O,sqlConditions:R,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName},{headers:{Authentication:(L=window==null?void 0:window.config)==null?void 0:L.indicatorToken,operateContext:Pa}})}catch(N){console.error(N)}else try{return await Xe.post(`${Fa}/diagram?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:g,layer:x,chartType:w,classification:D,series:V,indicatorList:q,queryColumns:v?[]:P,pageFlag:!0,pageId:O,sqlConditions:R,idxLibMode:S,preview:A,rowHeaders:F,keyName:e.keyName},{headers:{Authentication:(z=window==null?void 0:window.config)==null?void 0:z.indicatorToken,operateContext:Pa}})}catch(N){console.error(N)}}},Pl=()=>{const n=window.location.search.slice(1).split("&"),t=n.length,o={};for(let r=0;r<t;r++){const i=n[r];if(i==null||i==="")continue;const l=i.split("=");if(Array.isArray(l)){const s=l[0];o[s]=l[1]}}window.config.requestParams={...window.config.requestParams,...o},window.config={...window.config,...o}},Fl=a.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pn},setup(e){const{width:n,height:t}=a.inject(Te,{width:null,height:null}),o=a.computed(()=>({width:n.value,height:t.value,backgroundColor:e.backgroundColor,backgroundImage:ut(e.backgroundImage,!0),backgroundSize:e.backgroundSize})),r=a.ref(0),i=a.ref(0),l=a.ref(0),s=a.ref(0),f=a.ref(!1),c=a.ref();let d;const v=()=>new Promise(C=>{a.nextTick(()=>{n.value&&t.value?(r.value=parseFloat(n.value),i.value=parseFloat(t.value)):(r.value=c.value.clientWidth,i.value=c.value.clientHeight),(!l.value||!s.value)&&(l.value=window.screen.width,s.value=window.screen.height),C()})}),h=()=>{r.value&&i.value?(c.value.style.width=`${r.value}px`,c.value.style.height=`${i.value}px`):(c.value.style.width=`${l.value}px`,c.value.style.height=`${s.value}px`)};a.watch([n,t],async()=>{await v(),h(),u(),window.addEventListener("resize",g),x(),f.value=!0},{immediate:!0});const u=()=>{const C=document.body.clientWidth,p=document.body.clientHeight,m=r.value||l.value,y=i.value||s.value,E=C/m;let b=p/y;(r.value!==1920||i.value!==1080)&&(b=i.value/r.value*C/y),c.value&&(c.value.style.transform=`scale(${E}, ${b})`)},g=We.debounce(async()=>{await v(),u()},100),x=()=>{const C=window.MutationObserver;d=new C(g),d.observe(c.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},w=()=>{d&&(d.disconnect(),d.takeRecords(),d=null)};return a.onMounted(()=>{f.value=!1}),a.onUnmounted(()=>{window.removeEventListener("resize",g),w()}),{style:o,container:c,ready:f}}}),xd="",Hl={id:"container",ref:"container"};function ql(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Hl,[e.ready?(a.openBlock(),a.createElementBlock("div",{key:0,class:"page-config",style:a.normalizeStyle(e.style)},[a.renderSlot(e.$slots,"default",{},void 0,!0)],4)):a.createCommentVNode("",!0)],512)}const Wr=se(ie(Fl,[["render",ql],["__scopeId","data-v-7b4629fa"]])),co={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},width:"1920px",height:"1080px"},fo=ce(co),Vl=a.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...fo},setup(e,{expose:n}){Pl();const t=a.ref(),o=()=>{t.value.setAttribute("datav-theme",e.theme)};a.watch(()=>e.theme,()=>{o()}),a.onMounted(()=>{o()});const r=a.computed(()=>we(e.contextRequestUrl)),i=a.computed(()=>e.pageMode),l=a.computed(()=>e.theme),s=a.computed(()=>e.width),f=a.computed(()=>e.height),c=a.ref("");a.provide(Te,{contextRequestUrl:r,pageMode:i,theme:l,touchEventId:c,width:s,height:f});const d=new Map;console.log("globalModel",d);const v=q=>d.get(q),h=(q,R)=>{d.set(q,R)};a.provide(Ae,{getGlobalModel:v,setGlobalModel:h});const u=[],g=()=>{u.pop()},x=q=>{u.push(q)},w=new Map,C=q=>w.get(q),p=(q,R)=>{w.set(q,R)};a.provide(Ma,{popUseModalIds:g,pushUseModalIds:x,getModalModel:C,setModalModel:p});const m=l0(),y=new Set,E=(q,R)=>{y.add(q),m.on(q,O=>typeof R[O]=="function"&&R[O]()),a.onBeforeUnmount(()=>{b(q)})},b=q=>{y.delete(q),m.off(q)},T=(q,R)=>{if(q==="PAGE"){const O=u.length;let M=[];if(O===0)M=[...y];else{const _=u[O-1];M=[...C(_)]}M.forEach(_=>{m.emit(_,R)})}else m.emit(q,R)};a.provide(vn,{onEvent:E,offEvent:b,emitEvent:T});const k=a.ref(0),B=()=>{k.value=a.unref(k)+1};a.provide(za,{requestToken:B});const S=new Map,A=new Map,D=({requestFn:q=()=>{},sortNum:R=0,id:O=""})=>{if(S.has(R)){const M=S.get(R);M==null||M.push(q)}else S.set(R,[q]);A.set(O,q)},I=q=>new Promise((R,O)=>{const M=q.map(_=>_());Promise.all(M).then(_=>{R(_)}).catch(_=>{O(_)})}),V=q=>new Promise(async(R,O)=>{if(q){if(typeof q=="string"){const M=A.get(q);if(typeof M=="function"){const _=Xe.interceptors.response.use(L=>(R(L),L),L=>(O(L),Promise.reject(L)));M(),Xe.interceptors.response.eject(_)}}}else{const M=Array.from(S);M.sort((L,z)=>z[0]-L[0]);const _=M.length;try{e.pageMode!=="design"&&a.unref(k)>0;for(let L=0;L<_;L++){const z=M[L][1];await I(z)}}catch(L){console.error(L)}finally{S.clear(),R(null)}}});a.provide(_e,{setRequest:D,touchRequest:V});const F=()=>{m.emit(Lt)};a.provide(Lt,{emitRefreshPage:F});const P=q=>{m.on(Lt,()=>q()),a.onMounted(()=>{m.off(Lt)})};return a.onBeforeUnmount(()=>{S==null||S.clear(),A==null||A.clear()}),n({touchRequest:V,getGlobalModel:v,onRefreshPage:P}),{providerConfig:t}}}),jl={id:"ProviderConfig",ref:"providerConfig",style:{position:"absolute",width:"100%",height:"100%"}};function Gl(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",jl,[a.renderSlot(e.$slots,"default")],512)}const $r=se(ie(Vl,[["render",Gl]])),uo={...me,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",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:{}},ho=ce(uo),Zr=["refreshData","click","valueChange"],Yr="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+Xy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Cq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",go=a.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...ho},setup(e,{expose:n}){const t=ue(e),o=a.ref({}),r=a.computed(()=>e.variableFontSize||"14px"),i=a.computed(()=>"-"+a.unref(r));a.watch(()=>[e.data,e.dataType],([m,y])=>{y==="static"&&(o.value=m)},{immediate:!0});const l=a.computed(()=>{var B;const m=a.unref(o),y=e.increaseColor||e.color,E=e.declineColor||e.color;let b=e.text;b=b==null?void 0:b.replace(/\n|\\n/g,"<br/>"),b=b==null?void 0:b.replace(/\s(?!\{) | (?!\})\s/g," ");const T=b.match(/\{(.+?)\}/g)||[];let k="";if(T==null||T.length===0){if(b&&e.format==="percentage"&&!isNaN(+b)){const S=parseFloat(b),A=(S*100).toFixed(2);S>=0?b=`<span style="color: ${y||"#ED6643"};font-size:${a.unref(r)};display: inline-block;">
|
|
97
|
+
`),lo=(e,n=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Ml=e=>{const n=parseFloat(e+"");return isNaN(n)?e:(n+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},Jt=(e,n=2)=>{const t=e+"";if(t.includes("%"))return e;const o=parseFloat(t);return isNaN(o)?e:`${(o*100).toFixed(n)}%`},Bt=(e,n)=>{if(typeof e=="string"&&typeof n=="string")return e.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(n)){const t=n.length;for(let o=0;o<t;o++){const r=n[o];if(typeof r=="string"&&e.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},en=(e,n)=>{const t={dayjs:ve,...n};let o="";const r=[];for(const s in t)o+=`${s},`,r.push(t[s]);o=o.replace(/,$/,"");const i=`function (${o}){return ${e}}`;let l;try{l=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return l},we=(e="",{textData:n,codeData:t}={},{useNewline:o=!1,useSpace:r=!1}={})=>{const l={...window.config||{},...n},s=e.match(/\{(.+?)\}/g);if(s==null||s.length===0)return e;for(let f=0;f<s.length;f++){const c=s[f];let d=c.slice(1,-1).trim();const v=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,h=d.match(v);for(let u=0;u<h.length;u++){const g=h[u],x=l[g];x!=null&&(d=d.replace(g,x))}(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(d=en(d,t)),e=e.replace(c,d)}return o&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),r&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},Oe=(e,n=()=>{})=>{const{requestUrl:t,requestMethod:o,requestHeaders:r,requestParams:i,requestInterval:l,isOpenRequestTimer:s}=e,{contextRequestUrl:f,touchEventId:c}=a.inject(Te,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:d}=a.inject(Ae,{getGlobalModel:g=>{}}),v=we(t),h=async(g={})=>{if(!v||!o||!r)return;let x={};i.forEach(y=>{const{key:E,value:b}=y;if(typeof b=="object"&&b!=null&&b.id){let T={};const{id:k,prop:B,propKey:S,operate:A}=b;k==="THIS"?T=d(a.unref(c))||{}:T=d(k)||{};const D=a.unref(T[B]);let I=null;if(["date","range"].some(F=>Bt(T==null?void 0:T.type,F))){const{value:F,type:P,mode:q}=A||{};if(F&&P&&q)switch(P){case"add":I=a.unref(D).add(F,q);break;case"minus":I=a.unref(D).subtract(F,q);break}I==null&&(I=a.unref(D)),I=(I==null?void 0:I.format((S==null?void 0:S.trim())||T.format))||""}else Object.prototype.toString.call(D)==="[object Object]"?S?I=D[S]:I=B?D[B]:D:Bt(T==null?void 0:T.type,"select")&&a.unref(D)&&B&&Array.isArray(a.unref(D))?I=a.unref(D).map(F=>Object.prototype.hasOwnProperty.call(F,B)?F[B]:F):I=D;x[E]=I}else typeof b=="string"&&(x[E]=we(b))}),x={...window.config.requestParams,...g,...x};let w="";const C=Object.keys(x),p=C.length-1,m=C.length;C.forEach((y,E)=>{let b=x[y];Object.prototype.toString.call(b)==="[object Object]"&&(b=JSON.stringify(b)),E===0?m!==1?w+=`?${y}=${b}&`:w+=`?${y}=${b}`:E===p?w+=`${y}=${b}`:w+=`${y}=${b}&`});try{const y=["get","head"].includes(o);let E=y?v+w:v;x.dataSqlId&&!E.includes("dataSqlId")&&(E+=`${E.includes("?")?"&":"?"}dataSqlId=${x.dataSqlId}`);const b=await Xe({baseURL:a.unref(f)||"",url:E,method:o,headers:r,data:y?{}:x});return n(b),b}catch(y){console.error(y)}},u=s&&setInterval(h,l*1e3);return a.onUnmounted(()=>{clearInterval(u)}),h},rt=(e=[],n)=>{let{name:t="name",types:o=[]}=n||{};t=(t==null?void 0:t.trim())||t;const r=new Set,i=new Map,l=e.length,s=o.length;for(let d=0;d<l;d++){const v=e[d],h=v[t];r.add(h);for(let u=0;u<s;u++){const g=o[u],{label:x,value:w}=g,C={...v,value:v[w]};if(i.has(x)){const p=i.get(x);p.push(C),i.set(x,p)}else i.set(x,[C])}}const f=Array.from(r),c=[];for(const[d,v]of i)c.push({name:d,data:v});return{dimensions:f,dataset:c}},ut=(e,n=!1)=>{var o;if(!e)return e;let t="";return e!=null&&e.includes("://")?t=e:t=((o=window==null?void 0:window.config)==null?void 0:o.uploadPath)+e,n&&(t=`url(${t})`),t},Ur=(e,n)=>{const t=`${Ha}/preview?pageId=${n}`,o=`${Ha}/${n}`;return e==="preview"?t:o},ht=(e,n)=>{var r;if(e==null)return n;const t=e.match(/\{.*\}/g);if(t==null||t.length===0)return n;const o=t.length;for(let i=0;i<o;i++){const l=t[i];if(l==null||l==="")break;let s=(r=l.slice(1,-1))==null?void 0:r.trim();s=s==null?void 0:s.replace(/value/g,n);try{let f=s;(/\(.*\)/g.test(s)||/[+/\\*]/g.test(s))&&(f=en(s)),e=e.replace(l,f)}catch{e=e.replace(l,s)}}return e},je=(e={})=>{const{requestToken:n}=a.inject(za,{requestToken:()=>{}});e.dataType==="indicator"&&n();const t=(c={})=>{const{label:d,name:v,location:h,show:u,indexCode:g}=c;return{label:d,columnName:v,location:h,show:u,calcType:"COLUMN",hrpIndexCode:g}},o=(c,d)=>Object.prototype.hasOwnProperty.call(c,d),r=c=>{o(c,"dataType")&&(c.fieldType==="DATE"&&(c.label=c.fieldName,c.dataType==="component"&&(c.fieldValue="${"+c.fieldValue+"}")),delete c.dataType),o(c,"activeKey")&&delete c.activeKey,o(c,"radioValue")&&delete c.radioValue},i=c=>{const d=[];return c!=null&&c.length&&c.forEach(v=>{if(v.join&&v.conditions){const h=!v.conditions.some(u=>u.join&&u.conditions);v.conditions.forEach((u,g)=>{r(u),h?g<v.conditions.length-1?d.push({join:v.join,...u}):d.push(u):u.join&&u.conditions?d.push({conditions:i([u]),join:v.join}):d.push(u)})}else r(v),d.push(v)}),d},l=(c={})=>{const{label:d,name:v,location:h,show:u,indexCode:g,calcType:x="COLUMN",builtInFormula:w,builtInValueSource:C,builtInCalcWay:p,formula:m,conditions:y,aggregate:E}=c;let b;return y&&(b=i(y)),{label:d,columnName:v,location:h,show:u,calcType:x,hrpIndexCode:g,aggregate:E,builtInFormula:w,builtInValueSource:C,builtInCalcWay:p,formula:m,conditions:b}},{getGlobalModel:s}=a.inject(Ae,{getGlobalModel:c=>{}}),f=(c=[])=>{var h,u;const d=c.length;console.log("controlList",c);const v=[];for(let g=0;g<d;g++){const x=c[g],{id:w,keyName:C,conditionLabel:p,conditionKey:m,conditionValueType:y,prop:E}=x,b={rule:"NONE",label:p,fieldName:m,fieldValue:"",valueType:y,alias:`${C||w}-${E}`},T=s(w)||{};console.log("model",T);const{value:k,format:B="YYYY-MM-DD",type:S="",useCurrentTime:A}=T||{};Bt(T.type,"date")?(A?b.fieldValue=ve().format(B):b.fieldValue=(h=a.unref(k))==null?void 0:h.format(B),b.dateFormat=B):S==="ecanRangePicker"&&E?(E==="startTime"?b.rule="GREATER_EQUAL":E==="endTime"&&(b.rule="LESS_EQUAL"),E==="endTime"&&A?b.fieldValue=ve().format(B):b.fieldValue=(u=a.unref(T[E]))==null?void 0:u.format(B),b.dateFormat=B):b.fieldValue=a.unref(k),v.push(b)}return v};return async()=>{var M,_,L,z;const{graphicConfig:c,type:d,isGroupTable:v=!1}=e;let{source:h,dataViewId:u,plugin:g="1",layer:x,chartType:w,classificationList:C=[],rowHeaderList:p=[],seriesList:m=[],leftAxisList:y=[],rightAxisList:E=[],queryColumnList:b=[],indicators:T=[],controlList:k=[],formFields:B={},idxLibMode:S,preview:A=!1}=c||{};x==null&&(Bt(d,["table"])?x="1":Bt(d,["select","checkbox","radio"])?x="3":x="2");let D,I="";if(Array.isArray(C)&&C.length>0){const N=C.length;for(let U=0;U<N;U++){const K=C[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re,dateFormat:Ce,typeGuid:pe}=K;if(oe||N===1){I=pe,D={label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)},Ce&&(D.dateFormat=Ce),X==="the_date"&&!D.dateFormat&&(D.dateFormat="YYYY-MM");break}}}let V;if(Array.isArray(m)&&m.length>0){const N=m.length;for(let U=0;U<N;U++){const K=m[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re}=K;if(oe||N===1){V={label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)};break}}}const F=[];if(Array.isArray(p)&&p.length>0){const N=p.length;for(let U=0;U<N;U++){const K=p[U]||{},{label:X="",name:$="",show:oe=!1,sort:de,customGroup:Le,conditions:Re}=K;F.push({label:X,columnName:$,show:oe,sort:de,customGroup:Le,conditions:i(Re)})}}const P=[];b==null||b.forEach(N=>{P.push(t(N))});const q=[];if(y==null||y.forEach(N=>{N.location="LEFT",q.push(l(N))}),E==null||E.forEach(N=>{N.location="RIGHT",q.push(l(N))}),T==null||T.forEach(N=>{N.location="LEFT",q.push(l(N))}),Bt(d,["text","proportion"])&&(w="zb"),v){if(F.length===0||q.length===0)return;w="grouptable"}else{if(x==="1"&&P.length===0)return;if(x==="2"&&q.length===0)return;if(x==="3"&&(!I||!B.labelField||!B.valueField))return}let R=[];(c==null?void 0:c.pageMode)==="design"?R=c.sqlConditions??[]:R=f(k);const O=(M=window==null?void 0:window.config)==null?void 0:M.pageId;if((_=Object.keys(B))!=null&&_.length)try{return await Xe.post(`${Fa}/diagram/formData?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:"4",layer:x,chartType:"normalSelect",rangeIndexTypeGuid:I,type:"normalSelect",labelField:B.labelField,valueField:B.valueField,pageId:O,sqlConditions:R,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName},{headers:{Authentication:(L=window==null?void 0:window.config)==null?void 0:L.indicatorToken,operateContext:Pa}})}catch(N){console.error(N)}else try{return await Xe.post(`${Fa}/diagram?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:g,layer:x,chartType:w,classification:D,series:V,indicatorList:q,queryColumns:v?[]:P,pageFlag:!0,pageId:O,sqlConditions:R,idxLibMode:S,preview:A,rowHeaders:F,keyName:e.keyName},{headers:{Authentication:(z=window==null?void 0:window.config)==null?void 0:z.indicatorToken,operateContext:Pa}})}catch(N){console.error(N)}}},Pl=()=>{const n=window.location.search.slice(1).split("&"),t=n.length,o={};for(let r=0;r<t;r++){const i=n[r];if(i==null||i==="")continue;const l=i.split("=");if(Array.isArray(l)){const s=l[0];o[s]=l[1]}}window.config.requestParams={...window.config.requestParams,...o},window.config={...window.config,...o}},Fl=a.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pn},setup(e){const{width:n,height:t}=a.inject(Te,{width:null,height:null}),o=a.computed(()=>({width:n.value,height:t.value,backgroundColor:e.backgroundColor,backgroundImage:ut(e.backgroundImage,!0),backgroundSize:e.backgroundSize})),r=a.ref(0),i=a.ref(0),l=a.ref(0),s=a.ref(0),f=a.ref(!1),c=a.ref();let d;const v=()=>new Promise(C=>{a.nextTick(()=>{n.value&&t.value?(r.value=parseFloat(n.value),i.value=parseFloat(t.value)):(r.value=c.value.clientWidth,i.value=c.value.clientHeight),(!l.value||!s.value)&&(l.value=window.screen.width,s.value=window.screen.height),C()})}),h=()=>{r.value&&i.value?(c.value.style.width=`${r.value}px`,c.value.style.height=`${i.value}px`):(c.value.style.width=`${l.value}px`,c.value.style.height=`${s.value}px`)};a.watch([n,t],async()=>{await v(),h(),u(),window.addEventListener("resize",g),x(),f.value=!0},{immediate:!0});const u=()=>{const C=document.body.clientWidth,p=document.body.clientHeight,m=r.value||l.value,y=i.value||s.value,E=C/m;let b=p/y;(r.value!==1920||i.value!==1080)&&(b=i.value/r.value*C/y),c.value&&(c.value.style.transform=`scale(${E}, ${b})`)},g=We.debounce(async()=>{await v(),u()},100),x=()=>{const C=window.MutationObserver;d=new C(g),d.observe(c.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},w=()=>{d&&(d.disconnect(),d.takeRecords(),d=null)};return a.onMounted(()=>{f.value=!1}),a.onUnmounted(()=>{window.removeEventListener("resize",g),w()}),{style:o,container:c,ready:f}}}),xd="",Hl={id:"container",ref:"container"};function ql(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Hl,[e.ready?(a.openBlock(),a.createElementBlock("div",{key:0,class:"page-config",style:a.normalizeStyle(e.style)},[a.renderSlot(e.$slots,"default",{},void 0,!0)],4)):a.createCommentVNode("",!0)],512)}const Wr=se(ie(Fl,[["render",ql],["__scopeId","data-v-7b4629fa"]])),co={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},width:"1920px",height:"1080px"},fo=ce(co),Vl=a.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...fo},setup(e,{expose:n}){Pl();const t=a.ref(),o=()=>{t.value.setAttribute("datav-theme",e.theme)};a.watch(()=>e.theme,()=>{o()}),a.onMounted(()=>{o()});const r=a.computed(()=>we(e.contextRequestUrl)),i=a.computed(()=>e.pageMode),l=a.computed(()=>e.theme),s=a.computed(()=>e.width),f=a.computed(()=>e.height),c=a.ref("");a.provide(Te,{contextRequestUrl:r,pageMode:i,theme:l,touchEventId:c,width:s,height:f});const d=new Map;console.log("globalModel",d);const v=q=>d.get(q),h=(q,R)=>{d.set(q,R)};a.provide(Ae,{getGlobalModel:v,setGlobalModel:h});const u=[],g=()=>{u.pop()},x=q=>{u.push(q)},w=new Map,C=q=>w.get(q),p=(q,R)=>{w.set(q,R)};a.provide(Ma,{popUseModalIds:g,pushUseModalIds:x,getModalModel:C,setModalModel:p});const m=l0(),y=new Set,E=(q,R)=>{y.add(q),m.on(q,O=>typeof R[O]=="function"&&R[O]()),a.onBeforeUnmount(()=>{b(q)})},b=q=>{y.delete(q),m.off(q)},T=(q,R)=>{if(q==="PAGE"){const O=u.length;let M=[];if(O===0)M=[...y];else{const _=u[O-1];M=[...C(_)]}M.forEach(_=>{m.emit(_,R)})}else m.emit(q,R)};a.provide(vn,{onEvent:E,offEvent:b,emitEvent:T});const k=a.ref(0),B=()=>{k.value=a.unref(k)+1};a.provide(za,{requestToken:B});const S=new Map,A=new Map,D=({requestFn:q=()=>{},sortNum:R=0,id:O=""})=>{if(S.has(R)){const M=S.get(R);M==null||M.push(q)}else S.set(R,[q]);A.set(O,q)},I=q=>new Promise((R,O)=>{const M=q.map(_=>_());Promise.all(M).then(_=>{R(_)}).catch(_=>{O(_)})}),V=q=>new Promise(async(R,O)=>{if(q){if(typeof q=="string"){const M=A.get(q);if(typeof M=="function"){const _=Xe.interceptors.response.use(L=>(R(L),L),L=>(O(L),Promise.reject(L)));M(),Xe.interceptors.response.eject(_)}}}else{const M=Array.from(S);M.sort((L,z)=>z[0]-L[0]);const _=M.length;try{e.pageMode!=="design"&&a.unref(k)>0;for(let L=0;L<_;L++){const z=M[L][1];await I(z)}}catch(L){console.error(L)}finally{S.clear(),R(null)}}});a.provide(_e,{setRequest:D,touchRequest:V});const F=()=>{m.emit(Lt)};a.provide(Lt,{emitRefreshPage:F});const P=q=>{m.on(Lt,()=>q()),a.onMounted(()=>{m.off(Lt)})};return a.onBeforeUnmount(()=>{S==null||S.clear(),A==null||A.clear()}),n({touchRequest:V,getGlobalModel:v,onRefreshPage:P}),{providerConfig:t}}}),jl={id:"ProviderConfig",ref:"providerConfig",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden auto"}};function Gl(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",jl,[a.renderSlot(e.$slots,"default")],512)}const $r=se(ie(Vl,[["render",Gl]])),uo={...me,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",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:{}},ho=ce(uo),Zr=["refreshData","click","valueChange"],Yr="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+Nkd0OgyAMRjvqcLA53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K5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",go=a.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...ho},setup(e,{expose:n}){const t=ue(e),o=a.ref({}),r=a.computed(()=>e.variableFontSize||"14px"),i=a.computed(()=>"-"+a.unref(r));a.watch(()=>[e.data,e.dataType],([m,y])=>{y==="static"&&(o.value=m)},{immediate:!0});const l=a.computed(()=>{var B;const m=a.unref(o),y=e.increaseColor||e.color,E=e.declineColor||e.color;let b=e.text;b=b==null?void 0:b.replace(/\n|\\n/g,"<br/>"),b=b==null?void 0:b.replace(/\s(?!\{) | (?!\})\s/g," ");const T=b.match(/\{(.+?)\}/g)||[];let k="";if(T==null||T.length===0){if(b&&e.format==="percentage"&&!isNaN(+b)){const S=parseFloat(b),A=(S*100).toFixed(2);S>=0?b=`<span style="color: ${y||"#ED6643"};font-size:${a.unref(r)};display: inline-block;">
|
|
98
98
|
<div class="percentage-img-box">
|
|
99
99
|
<img style="width: ${a.unref(r)};filter: ${`drop-shadow(${y||"#ED6643"} ${a.unref(r)} 0px)`};" src="${Yr}"/>
|
|
100
100
|
</div>
|