@ecan-bi/datav 1.2.63 → 1.2.64
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 +2 -2
- 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.64 */
|
|
2
2
|
(function(q,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):(q=typeof globalThis<"u"?globalThis:q||self,a(q["@ecan/bi-datav"]={},q.Vue,q["echarts/core"],q.ResizeDetector,q.AntDesignVue,null,null,q.LodashEs,q.Dayjs,q.Axios,q.Mitt,null,null,null,q["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,q["echarts/renderers"],q["echarts/charts"],q["echarts/components"],null,q.Echarts,null,null,q.Xlsx,q.big.js))})(this,function(q,a,Pe,ua,re,nd,od,Ye,we,s0,c0,ad,rd,id,ha,ld,sd,cd,fd,dt,Xe,he,dd,f0,ud,hd,Rt,d0){var Xi,Qi,Ji,e0;"use strict";function u0(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 h0=u0(f0),g0=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function m0(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 g0.forEach(i=>{r[i]=t(i)}),r}return o()}function x0(e,n,t){let o=null;a.watch([t,e,n],([r,i,s],l,f)=>{r&&i&&s&&(o=Pe.throttle(()=>{i.resize()},100),ua.addListener(r,o)),f(()=>{o&&r&&ua.removeListener(r,o)})})}const y0={autoresize:Boolean},p0="ecLoadingOptions";function v0(e,n,t){const o=a.inject(p0,{}),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 b0={loading:Boolean,loadingOptions:Object},gd="",w0=/^on[^a-z]/,S0=e=>w0.test(e);function C0(e){const n={};for(const t in e)S0(t)||(n[t]=e[t]);return n}const A0="x-vue-echarts",k0="ecTheme",E0="ecInitOptions",T0="ecUpdateOptions",nt=a.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...y0,...b0},inheritAttrs:!1,setup(e,{attrs:n,listeners:t}){const o=a.shallowRef(),r=a.shallowRef(),i=a.shallowRef(),s=a.inject(k0,null),l=a.inject(E0,null),f=a.inject(T0,null),{autoresize:c,manualUpdate:d,loading:y,loadingOptions:h}=a.toRefs(e),u=a.computed(()=>i.value||e.option||Object.create(null)),m=a.computed(()=>e.theme||a.unref(s)||{}),g=a.computed(()=>e.initOptions||a.unref(l)||{}),S=a.computed(()=>e.updateOptions||a.unref(f)||{}),E=a.computed(()=>C0(n));function x(b){if(r.value||!o.value)return;const T=r.value=Pe.init(o.value,m.value,g.value);e.group&&(T.group=e.group);let B=t;B||(B={},Object.keys(n).filter(I=>I.indexOf("on")===0&&I.length>2).forEach(I=>{const D=I.charAt(2).toLowerCase()+I.slice(3);B[D]=n[I]})),Object.keys(B).forEach(I=>{const D=B[I];D&&(I.indexOf("zr:")===0?T.getZr().on(I.slice(3).toLowerCase(),D):T.on(I.toLowerCase(),D))});function A(){if(T&&!T.isDisposed())try{T.resize()}catch(I){if(I.message==="Cannot read property 'get' of undefined")return;throw I}}function k(){T.setOption(b||u.value,S.value)}c.value?a.nextTick(()=>{A(),k()}):k()}function v(b,T){e.manualUpdate&&(i.value=b),r.value?r.value.setOption(b,T||{}):x(b)}function p(){r.value&&(r.value.dispose(),r.value=void 0)}let C=null;a.watch(d,b=>{typeof C=="function"&&(C(),C=null),b||(C=a.watch(()=>e.option,T=>{T&&(r.value?r.value.setOption(T,S.value):x())},{deep:!0}))},{immediate:!0}),a.watch([m,g],()=>{p(),x()},{deep:!0}),a.watchEffect(()=>{e.group&&r.value&&(r.value.group=e.group)});const w=m0(r,x);return v0(r,y,h),x0(r,c,o),a.onMounted(()=>{e.option&&x()}),a.onUnmounted(p),{chart:r,root:o,setOption:v,nonEventAttrs:E,...w}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",a.h(A0,e)}});function Ve(e,n){B0(e)&&(e="100%");var t=_0(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 B0(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function _0(e){return typeof e=="string"&&e.indexOf("%")!==-1}function D0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ft(e){return e<=1?"".concat(Number(e)*100,"%"):e}function on(e){return e.length===1?"0"+e:String(e)}function R0(e,n,t){return{r:Ve(e,255)*255,g:Ve(n,255)*255,b:Ve(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 I0(e,n,t){var o,r,i;if(e=Ve(e,360),n=Ve(n,100),t=Ve(t,100),n===0)r=t,i=t,o=t;else{var s=t<.5?t*(1+n):t+n-t*n,l=2*t-s;o=an(l,s,e+1/3),r=an(l,s,e),i=an(l,s,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function O0(e,n,t){e=Ve(e,255),n=Ve(n,255),t=Ve(t,255);var o=Math.max(e,n,t),r=Math.min(e,n,t),i=0,s=o,l=o-r,f=o===0?0:l/o;if(o===r)i=0;else{switch(o){case e:i=(n-t)/l+(n<t?6:0);break;case n:i=(t-e)/l+2;break;case t:i=(e-n)/l+4;break}i/=6}return{h:i,s:f,v:s}}function L0(e,n,t){e=Ve(e,360)*6,n=Ve(n,100),t=Ve(t,100);var o=Math.floor(e),r=e-o,i=t*(1-n),s=t*(1-r*n),l=t*(1-(1-r)*n),f=o%6,c=[t,s,i,i,l,t][f],d=[l,t,t,s,i,i][f],y=[i,i,l,t,t,s][f];return{r:c*255,g:d*255,b:y*255}}function N0(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 Fe(e)/255}function Fe(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 It(e){var n={r:0,g:0,b:0},t=1,o=null,r=null,i=null,s=!1,l=!1;return typeof e=="string"&&(e=P0(e)),typeof e=="object"&&(Qe(e.r)&&Qe(e.g)&&Qe(e.b)?(n=R0(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Qe(e.h)&&Qe(e.s)&&Qe(e.v)?(o=Ft(e.s),r=Ft(e.v),n=L0(e.h,o,r),s=!0,l="hsv"):Qe(e.h)&&Qe(e.s)&&Qe(e.l)&&(o=Ft(e.s),i=Ft(e.l),n=I0(e.h,o,i),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=D0(t),{ok:s,format:e.format||l,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 M0="[-\\+]?\\d+%?",z0="[-\\+]?\\d*\\.\\d+%?",ot="(?:".concat(z0,")|(?:").concat(M0,")"),rn="[\\s|\\(]+(".concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")\\s*\\)?"),ln="[\\s|\\(]+(".concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")\\s*\\)?"),Ue={CSS_UNIT:new RegExp(ot),rgb:new RegExp("rgb"+rn),rgba:new RegExp("rgba"+ln),hsl:new RegExp("hsl"+rn),hsla:new RegExp("hsla"+ln),hsv:new RegExp("hsv"+rn),hsva:new RegExp("hsva"+ln),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 P0(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=Ue.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ue.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ue.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=Ue.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ue.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=Ue.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ue.hex8.exec(e),t?{r:Fe(t[1]),g:Fe(t[2]),b:Fe(t[3]),a:ga(t[4]),format:n?"name":"hex8"}:(t=Ue.hex6.exec(e),t?{r:Fe(t[1]),g:Fe(t[2]),b:Fe(t[3]),format:n?"name":"hex"}:(t=Ue.hex4.exec(e),t?{r:Fe(t[1]+t[1]),g:Fe(t[2]+t[2]),b:Fe(t[3]+t[3]),a:ga(t[4]+t[4]),format:n?"name":"hex8"}:(t=Ue.hex3.exec(e),t?{r:Fe(t[1]+t[1]),g:Fe(t[2]+t[2]),b:Fe(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Qe(e){return!!Ue.CSS_UNIT.exec(String(e))}var Ht=2,xa=.16,F0=.05,H0=.05,q0=.15,ya=5,pa=4,V0=[{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=O0(n,t,o);return{h:r.h*360,s:r.s,v:r.v}}function qt(e){var n=e.r,t=e.g,o=e.b;return"#".concat(N0(n,t,o,!1))}function j0(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)-Ht*n:Math.round(e.h)+Ht*n:o=t?Math.round(e.h)+Ht*n:Math.round(e.h)-Ht*n,o<0?o+=360:o>=360&&(o-=360),o}function wa(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+F0*n,o>1&&(o=1),t&&n===ya&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function Sa(e,n,t){var o;return t?o=e.v+H0*n:o=e.v-q0*n,o>1&&(o=1),Number(o.toFixed(2))}function sn(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],o=It(e),r=ya;r>0;r-=1){var i=va(o),s=qt(It({h:ba(i,r,!0),s:wa(i,r,!0),v:Sa(i,r,!0)}));t.push(s)}t.push(qt(o));for(var l=1;l<=pa;l+=1){var f=va(o),c=qt(It({h:ba(f,l),s:wa(f,l),v:Sa(f,l)}));t.push(c)}return n.theme==="dark"?V0.map(function(d){var y=d.index,h=d.opacity,u=qt(j0(It(n.backgroundColor||"#141414"),It(t[y]),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]=sn(cn[e]),fn[e].primary=fn[e][5],dn[e]=sn(cn[e],{theme:"dark",backgroundColor:"#141414"}),dn[e].primary=dn[e][5]});var Ca=[],Ot=[],G0="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function U0(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function W0(e,n){if(n=n||{},e===void 0)throw new Error(G0);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,Ot[r]={});var i;return Ot[r]!==void 0&&Ot[r][t]!==void 0?i=Ot[r][t]:(i=Ot[r][t]=U0(),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){$0(e,r,t[r])})}return e}function $0(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z0(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(n))}function Y0(e,n){Z0(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 sn(e)[0]}function Ta(e){return e?Array.isArray(e)?e:[e]:[]}var K0=`
|
|
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}(As),lo,_s=typeof process<"u"?(lo=process.env)===null||lo===void 0?void 0:lo.npm_package_version:void 0,Ds=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 zr(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 Wt(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,o){try{return Wt(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 zr,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=_s,e}();const Pr=new Ds,Tt=Rs();function Rs(){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=He.enc.Utf8.parse("ABCDEF1234123412");function Is(e,n){n=n||Tt;const t=He.enc.Utf8.parse(n);let o="";switch(typeof e){case"string":o=He.enc.Utf8.parse(e);break;case"object":o=He.enc.Utf8.parse(JSON.stringify(e));break;default:o=He.enc.Utf8.parse(e.toString())}return He.AES.encrypt(o,t,{iv:Fr,mode:He.mode.CBC,padding:He.pad.ZeroPadding}).toString()}function Hr(e,n){n=n||Tt;const t=He.enc.Utf8.parse(n),o=He.AES.decrypt(e,t,{iv:Fr,mode:He.mode.CBC,padding:He.pad.ZeroPadding});return He.enc.Utf8.stringify(o).toString()}function Os(e){Pr.setPublicKey(e)}function Ls(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 Ns(e){const{paramType:n,data:t,params:o,method:r}=e;n==="form"?["get","delete"].includes(r)?e.params=Bt(o,"string"):e.data=Bt(t,"string"):["get","delete"].includes(r)?e.params=Bt(o,"string"):e.data=Bt(t)}function Bt(e,n){let t=e||{};if(n==="string"){t="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const f=e[l];t+=`${l}=${encodeURIComponent(f)}&`}}Os("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const r=Ls(Tt);return{c:Is(t,Tt),p:r}}window.getEncryptParam=Bt;function Ms(e,n){var t;(t=window==null?void 0:window.config)!=null&&t.encryptFlag&&qr(e.url)&&(e.data instanceof FormData?e.data=zs(e.data):Ns(e))}function zs(e){const n=e.entries(),t=new FormData,o={};for(const i of n){const s=i[0],l=i[1];l instanceof Blob?t.append(s,l):o[s]=l}const r=Bt(o,"json");return typeof r=="object"&&(t.append("c",r.c),t.append("p",r.p)),t}window.xhaesKey=Tt,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,Tt);e.data=JSON.parse(o)}}const jr=window.config.requestErrorTip,Ke=s0.create({timeout:1e3*180});Ke.interceptors.request.use(e=>(Ms(e),e),e=>Promise.reject(e)),Ke.interceptors.response.use(e=>{var n,t,o;return jr&&+((n=e==null?void 0:e.data)==null?void 0:n.code)==500&&re.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"))re.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:n}=(e==null?void 0:e.response)||{};n>=400&&n<500&&re.message.error({content:"请求异常",key:"REQUEST_ERROR"}),n>=500&&re.message.error({content:"服务器异常",key:"REQUEST_ERROR"})}return Promise.reject(e)});const Ps=e=>e.replace(/\\n/g,`
|
|
97
|
-
`),so=(e,n=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Fs=e=>{const n=parseFloat(e+"");return isNaN(n)?e:(n+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},en=(e,n=2)=>{const t=e+"";if(t.includes("%"))return e;const o=parseFloat(t);return isNaN(o)?e:`${(o*100).toFixed(n)}%`},Hs=(e,n=2)=>{const t=e+"",o=parseFloat(t);return isNaN(o)?e:o.toFixed(n)},_t=(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},tn=(e,n)=>{const t={dayjs:we,...n};let o="";const r=[];for(const l in t)o+=`${l},`,r.push(t[l]);o=o.replace(/,$/,"");const i=`function (${o}){return ${e}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return s},Ae=(e="",{textData:n,codeData:t}={},{useNewline:o=!1,useSpace:r=!1}={})=>{const s={...window.config||{},...n},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let f=0;f<l.length;f++){const c=l[f];let d=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,h=d.match(y);for(let u=0;u<h.length;u++){const m=h[u],g=s[m];g!=null&&(d=d.replace(m,g))}(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(d=tn(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:s,isOpenRequestTimer:l}=e,{contextRequestUrl:f,touchEventId:c}=a.inject(Ie,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:d}=a.inject(Se,{getGlobalModel:m=>{}}),y=Ae(t),h=async(m={})=>{if(!y||!o||!r)return;let g={};i.forEach(p=>{const{key:C,value:w}=p;if(typeof w=="object"&&w!=null&&w.id){let b={};const{id:T,prop:B,propKey:A,operate:k}=w;T==="THIS"?b=d(a.unref(c))||{}:b=d(T)||{};const I=a.unref(b[B]);let D=null;if(["date","range"].some(H=>_t(b==null?void 0:b.type,H))){const{value:H,type:O,mode:V}=k||{};if(H&&O&&V)switch(O){case"add":D=a.unref(I).add(H,V);break;case"minus":D=a.unref(I).subtract(H,V);break}D==null&&(D=a.unref(I)),D=(D==null?void 0:D.format((A==null?void 0:A.trim())||b.format))||""}else Object.prototype.toString.call(I)==="[object Object]"?A?D=I[A]:D=B?I[B]:I:_t(b==null?void 0:b.type,"select")&&a.unref(I)&&B&&Array.isArray(a.unref(I))?D=a.unref(I).map(H=>Object.prototype.hasOwnProperty.call(H,B)?H[B]:H):D=I;g[C]=D}else typeof w=="string"&&(g[C]=Ae(w))}),g={...window.config.requestParams,...m,...g};let S="";const E=Object.keys(g),x=E.length-1,v=E.length;E.forEach((p,C)=>{let w=g[p];Object.prototype.toString.call(w)==="[object Object]"&&(w=JSON.stringify(w)),C===0?v!==1?S+=`?${p}=${w}&`:S+=`?${p}=${w}`:C===x?S+=`${p}=${w}`:S+=`${p}=${w}&`});try{const p=["get","head"].includes(o),C={};let w=p?y+S:y;g.dataSqlId&&!w.includes("dataSqlId")&&(w+=`${w.includes("?")?"&":"?"}dataSqlId=${g.dataSqlId}`),Object.prototype.hasOwnProperty.call(g,"signal")&&(C.signal=g.signal);const b=await Ke({baseURL:a.unref(f)||"",url:w,method:o,headers:r,data:p?{}:g,...C});return n(b),b}catch(p){console.error(p)}},u=l&&setInterval(h,s*1e3);return a.onUnmounted(()=>{clearInterval(u)}),h},lt=(e=[],n)=>{let{name:t="name",types:o=[]}=n||{};t=(t==null?void 0:t.trim())||t;const r=new Set,i=new Map,s=e.length,l=o.length;for(let d=0;d<s;d++){const y=e[d],h=y[t];r.add(h);for(let u=0;u<l;u++){const m=o[u],{label:g,value:S}=m,E={...y,value:y[S]};if(i.has(g)){const x=i.get(g);x.push(E),i.set(g,x)}else i.set(g,[E])}}const f=Array.from(r),c=[];for(const[d,y]of i)c.push({name:d,data:y});return{dimensions:f,dataset:c}},gt=(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},Gr=(e,n)=>{const t=`${Ha}/preview?pageId=${n}`,o=`${Ha}/${n}`;return e==="preview"?t:o},mt=(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 s=t[i];if(s==null||s==="")break;let l=(r=s.slice(1,-1))==null?void 0:r.trim();l=l==null?void 0:l.replace(/value/g,n);try{let f=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(f=tn(l)),e=e.replace(s,f)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:n}=a.inject(Ma,{requestToken:()=>{}});e.dataType==="indicator"&&n();const t=(c={})=>{const{label:d,name:y,location:h,show:u,indexCode:m}=c;return{label:d,columnName:y,location:h,show:u,calcType:"COLUMN",hrpIndexCode:m}},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(y=>{if(y.join&&y.conditions){const h=!y.conditions.some(u=>u.join&&u.conditions);y.conditions.forEach((u,m)=>{r(u),h?m<y.conditions.length-1?d.push({join:y.join,...u}):d.push(u):u.join&&u.conditions?d.push({conditions:i([u]),join:y.join}):d.push(u)})}else r(y),d.push(y)}),d},s=(c={})=>{const{label:d,name:y,location:h,show:u,indexCode:m,calcType:g="COLUMN",builtInFormula:S,builtInValueSource:E,builtInCalcWay:x,formula:v,conditions:p,aggregate:C}=c;let w;return p&&(w=i(p)),{label:d.trim(),columnName:y,location:h,show:u,calcType:g,hrpIndexCode:m,aggregate:C,builtInFormula:S,builtInValueSource:E,builtInCalcWay:x,formula:v,conditions:w}},{getGlobalModel:l}=a.inject(Se,{getGlobalModel:c=>{}}),f=(c=[])=>{var h,u;const d=c.length,y=[];for(let m=0;m<d;m++){const g=c[m],{id:S,keyName:E,conditionLabel:x,conditionKey:v,conditionValueType:p,prop:C}=g,w={rule:"NONE",label:x,fieldName:v,fieldValue:"",valueType:p,alias:`${E||S}-${C}`},b=l(S)||{},{value:T,format:B="YYYY-MM-DD",type:A="",useCurrentTime:k}=b||{};_t(b.type,"date")?(k?w.fieldValue=we().format(B):w.fieldValue=(h=a.unref(T))==null?void 0:h.format(B),w.dateFormat=B):A==="ecanRangePicker"&&C?(C==="startTime"?w.rule="GREATER_EQUAL":C==="endTime"&&(w.rule="LESS_EQUAL"),C==="endTime"&&k?w.fieldValue=we().format(B):w.fieldValue=(u=a.unref(b[C]))==null?void 0:u.format(B),w.dateFormat=B):w.fieldValue=a.unref(T),y.push(w)}return y};return async()=>{var z,R,N,M,F;const{graphicConfig:c,type:d,isGroupTable:y=!1}=e;let{source:h,dataViewId:u,plugin:m="1",layer:g,chartType:S,classificationList:E=[],rowHeaderList:x=[],seriesList:v=[],leftAxisList:p=[],rightAxisList:C=[],queryColumnList:w=[],indicators:b=[],controlList:T=[],formFields:B={},idxLibMode:A,preview:k=!1}=c||{};g==null&&(_t(d,["table"])?g="1":_t(d,["select","checkbox","radio"])?g="3":g="2");let I,D="";if(Array.isArray(E)&&E.length>0){const W=E.length;for(let Y=0;Y<W;Y++){const Q=E[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me,dateFormat:ve,typeGuid:Ge,truncations:Me=[]}=Q;if(ce||W===1){D=Ge,I={label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)},ve&&(I.dateFormat=ve),ne==="the_date"&&!I.dateFormat&&(I.dateFormat="YYYY-MM");const Ne={};if(Array.isArray(Me)&&Me.length>0){const et=Me.length;for(let tt=0;tt<et;tt++){const G=Me[tt]||{},{rule:U="",num:$=0,name:K=""}=G;U&&$&&K&&(Ne.num=$,Ne.rule=U,Ne.otherGroupName=K)}}(z=Object.keys(Ne))!=null&&z.length&&(I.truncation=Ne);break}}}let P;if(Array.isArray(v)&&v.length>0){const W=v.length;for(let Y=0;Y<W;Y++){const Q=v[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me}=Q;if(ce||W===1){P={label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)};break}}}const H=[];if(Array.isArray(x)&&x.length>0){const W=x.length;for(let Y=0;Y<W;Y++){const Q=x[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me}=Q;H.push({label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)})}}const O=[];w==null||w.forEach(W=>{O.push(t(W))});const V=[];if(p==null||p.forEach(W=>{W.location="LEFT",V.push(s(W))}),C==null||C.forEach(W=>{W.location="RIGHT",V.push(s(W))}),b==null||b.forEach(W=>{W.location="LEFT",V.push(s(W))}),_t(d,["text","proportion"])&&(S="zb"),y){if(H.length===0||V.length===0)return;S="grouptable"}else{if(g==="1"&&O.length===0)return;if(g==="2"&&V.length===0)return;if(g==="3"&&(!D||!B.labelField||!B.valueField))return}let _=[];(c==null?void 0:c.pageMode)==="design"?_=c.sqlConditions??[]:_=f(T);const L=(R=window==null?void 0:window.config)==null?void 0:R.pageId;if((N=Object.keys(B))!=null&&N.length)try{return await Ke.post(`${Fa}/diagram/formData?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:"4",layer:g,chartType:"normalSelect",rangeIndexTypeGuid:D,type:"normalSelect",labelField:B.labelField,valueField:B.valueField,pageId:L,sqlConditions:_,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName},{headers:{Authentication:(M=window==null?void 0:window.config)==null?void 0:M.indicatorToken,operateContext:Pa}})}catch(W){console.error(W)}else try{return await Ke.post(`${Fa}/diagram?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:m,layer:g,chartType:S,classification:I,series:P,indicatorList:V,queryColumns:y?[]:O,pageFlag:!0,pageId:L,sqlConditions:_,idxLibMode:A,preview:k,rowHeaders:H,keyName:e.keyName},{headers:{Authentication:(F=window==null?void 0:window.config)==null?void 0:F.indicatorToken,operateContext:Pa}})}catch(W){console.error(W)}}},qs=()=>{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 s=i.split("=");if(Array.isArray(s)){const l=s[0];o[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...o},window.config={...window.config,...o}},Vs=a.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pn},setup(e){const{width:n,height:t}=a.inject(Ie,{width:null,height:null}),o=a.inject("setPageHeight",x=>{}),r=a.computed(()=>({width:n.value,height:t.value,backgroundColor:e.backgroundColor,backgroundImage:gt(e.backgroundImage,!0),backgroundSize:e.backgroundSize})),i=a.ref(0),s=a.ref(0),l=a.ref(0),f=a.ref(0),c=a.ref(!1),d=a.ref();let y;const h=()=>new Promise(x=>{a.nextTick(()=>{n.value&&t.value?(i.value=parseFloat(n.value),s.value=parseFloat(t.value)):(i.value=d.value.clientWidth,s.value=d.value.clientHeight),(!l.value||!f.value)&&(l.value=window.screen.width,f.value=window.screen.height),x()})}),u=()=>{i.value&&s.value?(d.value.style.width=`${i.value}px`,d.value.style.height=`${s.value}px`):(d.value.style.width=`${l.value}px`,d.value.style.height=`${f.value}px`)};a.watch([n,t],async()=>{await h(),u(),m(),window.addEventListener("resize",g),S(),c.value=!0},{immediate:!0});const m=()=>{const x=document.body.clientWidth,v=document.body.clientHeight,p=i.value||l.value,C=s.value||f.value,w=x/p;let b=v/C;(i.value!==1920||s.value!==1080)&&(b=s.value/i.value*x/C),d.value&&(d.value.style.transform=`scale(${w}, ${b})`),o(b)},g=Ye.debounce(async()=>{await h(),m()},100),S=()=>{const x=window.MutationObserver;y=new x(g),y.observe(d.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},E=()=>{y&&(y.disconnect(),y.takeRecords(),y=null)};return a.onMounted(()=>{c.value=!1}),a.onUnmounted(()=>{window.removeEventListener("resize",g),E()}),{style:r,container:d,ready:c}}}),pd="",js={id:"container",ref:"container"};function Gs(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",js,[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 Ur=fe(se(Vs,[["render",Gs],["__scopeId","data-v-257630c9"]])),co={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},width:"1920px",height:"1080px"},fo=de(co),Us=a.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...fo},setup(e,{expose:n}){qs();const t=a.ref(),o=()=>{t.value.setAttribute("datav-theme",e.theme)};a.watch(()=>e.theme,()=>{o()}),a.onMounted(()=>{o()});const r=a.computed(()=>Ae(e.contextRequestUrl)),i=a.computed(()=>e.pageMode),s=a.computed(()=>e.theme),l=a.computed(()=>e.width),f=a.computed(()=>e.height),c=a.ref("");a.provide(Ie,{contextRequestUrl:r,pageMode:i,theme:s,touchEventId:c,width:l,height:f});const d=a.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});a.provide("setPageHeight",_=>{d.value.height=parseFloat(f.value)*_+"px"});const y=new Map;console.log("globalModel",y);const h=_=>y.get(_),u=(_,L)=>{y.set(_,L)};a.provide(Se,{getGlobalModel:h,setGlobalModel:u});const m=[],g=()=>{m.pop()},S=_=>{m.push(_)},E=new Map,x=_=>E.get(_),v=(_,L)=>{E.set(_,L)};a.provide(za,{popUseModalIds:g,pushUseModalIds:S,getModalModel:x,setModalModel:v});const p=c0(),C=new Set,w=(_,L)=>{C.add(_),p.on(_,z=>typeof L[z]=="function"&&L[z]()),a.onBeforeUnmount(()=>{b(_)})},b=_=>{C.delete(_),p.off(_)},T=(_,L)=>{if(_==="PAGE"){const z=m.length;let R=[];if(z===0)R=[...C];else{const N=m[z-1];R=[...x(N)]}R.forEach(N=>{p.emit(N,L)})}else p.emit(_,L)};a.provide(vn,{onEvent:w,offEvent:b,emitEvent:T});const B=a.ref(0),A=()=>{B.value=a.unref(B)+1};a.provide(Ma,{requestToken:A});const k=new Map,I=new Map,D=({requestFn:_=()=>{},sortNum:L=0,id:z=""})=>{if(k.has(L)){const R=k.get(L);R==null||R.push(_)}else k.set(L,[_]);I.set(z,_)},P=_=>new Promise((L,z)=>{const R=_.map(N=>N());Promise.all(R).then(N=>{L(N)}).catch(N=>{z(N)})}),H=_=>new Promise(async(L,z)=>{if(_){if(typeof _=="string"){const R=I.get(_);if(typeof R=="function"){const N=Ke.interceptors.response.use(M=>(L(M),M),M=>(z(M),Promise.reject(M)));R(),Ke.interceptors.response.eject(N)}}}else{const R=Array.from(k);R.sort((M,F)=>F[0]-M[0]);const N=R.length;try{e.pageMode!=="design"&&a.unref(B)>0;for(let M=0;M<N;M++){const F=R[M][1];await P(F)}}catch(M){console.error(M)}finally{k.clear(),L(null)}}});a.provide(Be,{setRequest:D,touchRequest:H});const O=()=>{p.emit(Nt)};a.provide(Nt,{emitRefreshPage:O});const V=_=>{p.on(Nt,()=>_()),a.onMounted(()=>{p.off(Nt)})};return a.onBeforeUnmount(()=>{k==null||k.clear(),I==null||I.clear()}),n({touchRequest:H,getGlobalModel:h,onRefreshPage:V}),{providerConfig:t,configStyle:d}}}),bd="";function Ws(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:a.normalizeStyle(e.configStyle)},[a.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const Wr=fe(se(Us,[["render",Ws],["__scopeId","data-v-a722e729"]])),uo={...ge,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=de(uo),$r=["refreshData","click","valueChange"],Zr="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=",Yr="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==",go=a.defineComponent({name:"EcanText",components:{Skeleton:jt},props:{...ho},setup(e,{expose:n}){const t=a.ref(!1),o=ue(e),r=a.ref({}),i=a.computed(()=>e.variableFontSize||"14px"),s=a.computed(()=>"-"+a.unref(i));a.watch(()=>[e.data,e.dataType],([p,C])=>{C==="static"&&(r.value=p)},{immediate:!0});const l=a.computed(()=>{var A;if(a.unref(t))return"NaN";const p=a.unref(r),C=e.increaseColor||e.color,w=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 B="";if(T==null||T.length===0){if(b&&e.format==="percentage"&&!isNaN(+b)){const k=parseFloat(b),I=(k*100).toFixed(2);k>=0?b=`<span style="color: ${C||"#ED6643"};font-size:${a.unref(i)};display: inline-block;">
|
|
97
|
+
`),so=(e,n=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Fs=e=>{const n=parseFloat(e+"");return isNaN(n)?e:(n+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},en=(e,n=2)=>{const t=e+"";if(t.includes("%"))return e;const o=parseFloat(t);return isNaN(o)?e:`${(o*100).toFixed(n)}%`},Hs=(e,n=2)=>{const t=e+"",o=parseFloat(t);return isNaN(o)?e:o.toFixed(n)},_t=(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},tn=(e,n)=>{const t={dayjs:we,...n};let o="";const r=[];for(const l in t)o+=`${l},`,r.push(t[l]);o=o.replace(/,$/,"");const i=`function (${o}){return ${e}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return s},Ae=(e="",{textData:n,codeData:t}={},{useNewline:o=!1,useSpace:r=!1}={})=>{const s={...window.config||{},...n},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let f=0;f<l.length;f++){const c=l[f];let d=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,h=d.match(y);for(let u=0;u<h.length;u++){const m=h[u],g=s[m];g!=null&&(d=d.replace(m,g))}(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(d=tn(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:s,isOpenRequestTimer:l}=e,{contextRequestUrl:f,touchEventId:c}=a.inject(Ie,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:d}=a.inject(Se,{getGlobalModel:m=>{}}),y=Ae(t),h=async(m={})=>{if(!y||!o||!r)return;let g={};i.forEach(p=>{const{key:C,value:w}=p;if(typeof w=="object"&&w!=null&&w.id){let b={};const{id:T,prop:B,propKey:A,operate:k}=w;T==="THIS"?b=d(a.unref(c))||{}:b=d(T)||{};const I=a.unref(b[B]);let D=null;if(["date","range"].some(H=>_t(b==null?void 0:b.type,H))){const{value:H,type:O,mode:V}=k||{};if(H&&O&&V)switch(O){case"add":D=a.unref(I).add(H,V);break;case"minus":D=a.unref(I).subtract(H,V);break}D==null&&(D=a.unref(I)),D=(D==null?void 0:D.format((A==null?void 0:A.trim())||b.format))||""}else Object.prototype.toString.call(I)==="[object Object]"?A?D=I[A]:D=B?I[B]:I:_t(b==null?void 0:b.type,"select")&&a.unref(I)&&B&&Array.isArray(a.unref(I))?D=a.unref(I).map(H=>Object.prototype.hasOwnProperty.call(H,B)?H[B]:H):D=I;g[C]=D}else typeof w=="string"&&(g[C]=Ae(w))}),g={...window.config.requestParams,...m,...g};let S="";const E=Object.keys(g),x=E.length-1,v=E.length;E.forEach((p,C)=>{let w=g[p];Object.prototype.toString.call(w)==="[object Object]"&&(w=JSON.stringify(w)),C===0?v!==1?S+=`?${p}=${w}&`:S+=`?${p}=${w}`:C===x?S+=`${p}=${w}`:S+=`${p}=${w}&`});try{const p=["get","head"].includes(o),C={};let w=p?y+S:y;g.dataSqlId&&!w.includes("dataSqlId")&&(w+=`${w.includes("?")?"&":"?"}dataSqlId=${g.dataSqlId}`),Object.prototype.hasOwnProperty.call(g,"signal")&&(C.signal=g.signal);const b=await Ke({baseURL:a.unref(f)||"",url:w,method:o,headers:r,data:p?{}:g,...C});return n(b),b}catch(p){console.error(p)}},u=l&&setInterval(h,s*1e3);return a.onUnmounted(()=>{clearInterval(u)}),h},lt=(e=[],n)=>{let{name:t="name",types:o=[]}=n||{};t=(t==null?void 0:t.trim())||t;const r=new Set,i=new Map,s=e.length,l=o.length;for(let d=0;d<s;d++){const y=e[d],h=y[t];r.add(h);for(let u=0;u<l;u++){const m=o[u],{label:g,value:S}=m,E={...y,value:y[S]};if(i.has(g)){const x=i.get(g);x.push(E),i.set(g,x)}else i.set(g,[E])}}const f=Array.from(r),c=[];for(const[d,y]of i)c.push({name:d,data:y});return{dimensions:f,dataset:c}},gt=(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},Gr=(e,n)=>{const t=`${Ha}/preview?pageId=${n}`,o=`${Ha}/${n}`;return e==="preview"?t:o},mt=(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 s=t[i];if(s==null||s==="")break;let l=(r=s.slice(1,-1))==null?void 0:r.trim();l=l==null?void 0:l.replace(/value/g,n);try{let f=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(f=tn(l)),e=e.replace(s,f)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:n}=a.inject(Ma,{requestToken:()=>{}});e.dataType==="indicator"&&n();const t=(c={})=>{const{label:d,name:y,location:h,show:u,indexCode:m}=c;return{label:d,columnName:y,location:h,show:u,calcType:"COLUMN",hrpIndexCode:m}},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(y=>{if(y.join&&y.conditions){const h=!y.conditions.some(u=>u.join&&u.conditions);y.conditions.forEach((u,m)=>{r(u),h?m<y.conditions.length-1?d.push({join:y.join,...u}):d.push(u):u.join&&u.conditions?d.push({conditions:i([u]),join:y.join}):d.push(u)})}else r(y),d.push(y)}),d},s=(c={})=>{const{label:d,name:y,location:h,show:u,indexCode:m,calcType:g="COLUMN",builtInFormula:S,builtInValueSource:E,builtInCalcWay:x,formula:v,conditions:p,aggregate:C}=c;let w;return p&&(w=i(p)),{label:d.trim(),columnName:y,location:h,show:u,calcType:g,hrpIndexCode:m,aggregate:C,builtInFormula:S,builtInValueSource:E,builtInCalcWay:x,formula:v,conditions:w}},{getGlobalModel:l}=a.inject(Se,{getGlobalModel:c=>{}}),f=(c=[])=>{var h,u;const d=c.length,y=[];for(let m=0;m<d;m++){const g=c[m],{id:S,keyName:E,conditionLabel:x,conditionKey:v,conditionValueType:p,prop:C}=g,w={rule:"NONE",label:x,fieldName:v,fieldValue:"",valueType:p,alias:`${E||S}-${C}`},b=l(S)||{},{value:T,format:B="YYYY-MM-DD",type:A="",useCurrentTime:k}=b||{};_t(b.type,"date")?(k?w.fieldValue=we().format(B):w.fieldValue=(h=a.unref(T))==null?void 0:h.format(B),w.dateFormat=B):A==="ecanRangePicker"&&C?(C==="startTime"?w.rule="GREATER_EQUAL":C==="endTime"&&(w.rule="LESS_EQUAL"),C==="endTime"&&k?w.fieldValue=we().format(B):w.fieldValue=(u=a.unref(b[C]))==null?void 0:u.format(B),w.dateFormat=B):w.fieldValue=a.unref(T),y.push(w)}return y};return async()=>{var z,R,N,M,F;const{graphicConfig:c,type:d,isGroupTable:y=!1}=e;let{source:h,dataViewId:u,plugin:m="1",layer:g,chartType:S,classificationList:E=[],rowHeaderList:x=[],seriesList:v=[],leftAxisList:p=[],rightAxisList:C=[],queryColumnList:w=[],indicators:b=[],controlList:T=[],formFields:B={},idxLibMode:A,preview:k=!1}=c||{};g==null&&(_t(d,["table"])?g="1":_t(d,["select","checkbox","radio"])?g="3":g="2");let I,D="";if(Array.isArray(E)&&E.length>0){const W=E.length;for(let Y=0;Y<W;Y++){const Q=E[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me,dateFormat:ve,typeGuid:Ge,truncations:Me=[]}=Q;if(ce||W===1){D=Ge,I={label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)},ve&&(I.dateFormat=ve),ne==="the_date"&&!I.dateFormat&&(I.dateFormat="YYYY-MM");const Ne={};if(Array.isArray(Me)&&Me.length>0){const et=Me.length;for(let tt=0;tt<et;tt++){const G=Me[tt]||{},{rule:U="",num:$=0,name:K=""}=G;U&&$&&K&&(Ne.num=$,Ne.rule=U,Ne.otherGroupName=K)}}(z=Object.keys(Ne))!=null&&z.length&&(I.truncation=Ne);break}}}let P;if(Array.isArray(v)&&v.length>0){const W=v.length;for(let Y=0;Y<W;Y++){const Q=v[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me}=Q;if(ce||W===1){P={label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)};break}}}const H=[];if(Array.isArray(x)&&x.length>0){const W=x.length;for(let Y=0;Y<W;Y++){const Q=x[Y]||{},{label:Z="",name:ne="",show:ce=!1,sort:De,customGroup:Ee,conditions:me}=Q;H.push({label:Z.trim(),columnName:ne,show:ce,sort:De,customGroup:Ee,conditions:i(me)})}}const O=[];w==null||w.forEach(W=>{O.push(t(W))});const V=[];if(p==null||p.forEach(W=>{W.location="LEFT",V.push(s(W))}),C==null||C.forEach(W=>{W.location="RIGHT",V.push(s(W))}),b==null||b.forEach(W=>{W.location="LEFT",V.push(s(W))}),_t(d,["text","proportion"])&&(S="zb"),y){if(H.length===0||V.length===0)return;S="grouptable"}else{if(g==="1"&&O.length===0)return;if(g==="2"&&V.length===0)return;if(g==="3"&&(!D||!B.labelField||!B.valueField))return}let _=[];(c==null?void 0:c.pageMode)==="design"?_=c.sqlConditions??[]:_=f(T);const L=(R=window==null?void 0:window.config)==null?void 0:R.pageId;if((N=Object.keys(B))!=null&&N.length)try{return await Ke.post(`${Fa}/diagram/formData?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:"4",layer:g,chartType:"normalSelect",rangeIndexTypeGuid:D,type:"normalSelect",labelField:B.labelField,valueField:B.valueField,pageId:L,sqlConditions:_,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName},{headers:{Authentication:(M=window==null?void 0:window.config)==null?void 0:M.indicatorToken,operateContext:Pa}})}catch(W){console.error(W)}else try{return await Ke.post(`${Fa}/diagram?keyName=${e.keyName}`,{source:h,dataViewId:u,plugin:m,layer:g,chartType:S,classification:I,series:P,indicatorList:V,queryColumns:y?[]:O,pageFlag:!0,pageId:L,sqlConditions:_,idxLibMode:A,preview:k,rowHeaders:H,keyName:e.keyName},{headers:{Authentication:(F=window==null?void 0:window.config)==null?void 0:F.indicatorToken,operateContext:Pa}})}catch(W){console.error(W)}}},qs=()=>{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 s=i.split("=");if(Array.isArray(s)){const l=s[0];o[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...o},window.config={...window.config,...o}},Vs=a.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pn},setup(e){const{width:n,height:t}=a.inject(Ie,{width:null,height:null}),o=a.inject("setPageHeight",x=>{}),r=a.computed(()=>({width:n.value,height:t.value,backgroundColor:e.backgroundColor,backgroundImage:gt(e.backgroundImage,!0),backgroundSize:e.backgroundSize})),i=a.ref(0),s=a.ref(0),l=a.ref(0),f=a.ref(0),c=a.ref(!1),d=a.ref();let y;const h=()=>new Promise(x=>{a.nextTick(()=>{n.value&&t.value?(i.value=parseFloat(n.value),s.value=parseFloat(t.value)):(i.value=d.value.clientWidth,s.value=d.value.clientHeight),(!l.value||!f.value)&&(l.value=window.screen.width,f.value=window.screen.height),x()})}),u=()=>{i.value&&s.value?(d.value.style.width=`${i.value}px`,d.value.style.height=`${s.value}px`):(d.value.style.width=`${l.value}px`,d.value.style.height=`${f.value}px`)};a.watch([n,t],async()=>{await h(),u(),m(),window.addEventListener("resize",g),S(),c.value=!0},{immediate:!0});const m=()=>{const x=document.body.clientWidth,v=document.body.clientHeight,p=i.value||l.value,C=s.value||f.value,w=x/p;let b=v/C;(i.value!==1920||s.value!==1080)&&(b=s.value/i.value*x/C),d.value&&(d.value.style.transform=`scale(${w}, ${b})`),o(b)},g=Ye.debounce(async()=>{await h(),m()},100),S=()=>{const x=window.MutationObserver;y=new x(g),y.observe(d.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},E=()=>{y&&(y.disconnect(),y.takeRecords(),y=null)};return a.onMounted(()=>{c.value=!1}),a.onUnmounted(()=>{window.removeEventListener("resize",g),E()}),{style:r,container:d,ready:c}}}),pd="",js={id:"container",ref:"container"};function Gs(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",js,[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 Ur=fe(se(Vs,[["render",Gs],["__scopeId","data-v-257630c9"]])),co={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},width:"1920px",height:"1080px"},fo=de(co),Us=a.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...fo},setup(e,{expose:n}){qs();const t=a.ref(),o=()=>{t.value.setAttribute("datav-theme",e.theme)};a.watch(()=>e.theme,()=>{o()}),a.onMounted(()=>{o()});const r=a.computed(()=>Ae(e.contextRequestUrl)),i=a.computed(()=>e.pageMode),s=a.computed(()=>e.theme),l=a.computed(()=>e.width),f=a.computed(()=>e.height),c=a.ref("");a.provide(Ie,{contextRequestUrl:r,pageMode:i,theme:s,touchEventId:c,width:l,height:f});const d=a.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});a.provide("setPageHeight",_=>{d.value.height=parseFloat(f.value)*_+"px"});const y=new Map;console.log("globalModel",y);const h=_=>y.get(_),u=(_,L)=>{y.set(_,L)};a.provide(Se,{getGlobalModel:h,setGlobalModel:u});const m=[],g=()=>{m.pop()},S=_=>{m.push(_)},E=new Map,x=_=>E.get(_),v=(_,L)=>{E.set(_,L)};a.provide(za,{popUseModalIds:g,pushUseModalIds:S,getModalModel:x,setModalModel:v});const p=c0(),C=new Set,w=(_,L)=>{C.add(_),p.on(_,z=>typeof L[z]=="function"&&L[z]()),a.onBeforeUnmount(()=>{b(_)})},b=_=>{C.delete(_),p.off(_)},T=(_,L)=>{if(_==="PAGE"){const z=m.length;let R=[];if(z===0)R=[...C];else{const N=m[z-1];R=[...x(N)]}R.forEach(N=>{p.emit(N,L)})}else p.emit(_,L)};a.provide(vn,{onEvent:w,offEvent:b,emitEvent:T});const B=a.ref(0),A=()=>{B.value=a.unref(B)+1};a.provide(Ma,{requestToken:A});const k=new Map,I=new Map,D=({requestFn:_=()=>{},sortNum:L=0,id:z=""})=>{if(k.has(L)){const R=k.get(L);R==null||R.push(_)}else k.set(L,[_]);I.set(z,_)},P=_=>new Promise((L,z)=>{const R=_.map(N=>N());Promise.all(R).then(N=>{L(N)}).catch(N=>{z(N)})}),H=_=>new Promise(async(L,z)=>{if(_){if(typeof _=="string"){const R=I.get(_);if(typeof R=="function"){const N=Ke.interceptors.response.use(M=>(L(M),M),M=>(z(M),Promise.reject(M)));R(),Ke.interceptors.response.eject(N)}}}else{const R=Array.from(k);R.sort((M,F)=>F[0]-M[0]);const N=R.length;try{e.pageMode!=="design"&&a.unref(B)>0;for(let M=0;M<N;M++){const F=R[M][1];await P(F)}}catch(M){console.error(M)}finally{k.clear(),L(null)}}});a.provide(Be,{setRequest:D,touchRequest:H});const O=()=>{p.emit(Nt)};a.provide(Nt,{emitRefreshPage:O});const V=_=>{p.on(Nt,()=>_()),a.onMounted(()=>{p.off(Nt)})};return a.onBeforeUnmount(()=>{k==null||k.clear(),I==null||I.clear()}),n({touchRequest:H,getGlobalModel:h,onRefreshPage:V}),{providerConfig:t,configStyle:d}}}),bd="";function Ws(e,n,t,o,r,i){return a.openBlock(),a.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:a.normalizeStyle(e.configStyle)},[a.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const Wr=fe(se(Us,[["render",Ws],["__scopeId","data-v-60346b8d"]])),uo={...ge,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=de(uo),$r=["refreshData","click","valueChange"],Zr="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=",Yr="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==",go=a.defineComponent({name:"EcanText",components:{Skeleton:jt},props:{...ho},setup(e,{expose:n}){const t=a.ref(!1),o=ue(e),r=a.ref({}),i=a.computed(()=>e.variableFontSize||"14px"),s=a.computed(()=>"-"+a.unref(i));a.watch(()=>[e.data,e.dataType],([p,C])=>{C==="static"&&(r.value=p)},{immediate:!0});const l=a.computed(()=>{var A;if(a.unref(t))return"NaN";const p=a.unref(r),C=e.increaseColor||e.color,w=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 B="";if(T==null||T.length===0){if(b&&e.format==="percentage"&&!isNaN(+b)){const k=parseFloat(b),I=(k*100).toFixed(2);k>=0?b=`<span style="color: ${C||"#ED6643"};font-size:${a.unref(i)};display: inline-block;">
|
|
98
98
|
<div class="percentage-img-box">
|
|
99
99
|
<img style="width: ${a.unref(i)};filter: ${`drop-shadow(${C||"#ED6643"} ${a.unref(i)} 0px)`};" src="${Zr}"/>
|
|
100
100
|
</div>
|