@ecan-bi/datav 1.3.41 → 1.3.42
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 +3 -3
- 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.3.
|
|
1
|
+
/*! @ecan-bi/datav@1.3.42 */
|
|
2
2
|
(function(G,t){typeof exports=="object"&&typeof module<"u"?t(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"],t):(G=typeof globalThis<"u"?globalThis:G||self,t(G["@ecan/bi-datav"]={},G.Vue,G["echarts/core"],G.ResizeDetector,G.AntDesignVue,null,null,G.LodashEs,G.Dayjs,G.Axios,G.Mitt,null,null,null,G["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,G["echarts/renderers"],G["echarts/charts"],G["echarts/components"],null,G.Echarts,null,null,G.Xlsx,G.big.js))})(this,function(G,t,ot,Qa,ue,Uu,$u,Le,pe,is,rs,Ku,Yu,Zu,Ja,Qu,Ju,Xu,eh,_t,bt,Be,th,ls,nh,oh,en,ss){var ts,ns,os,as;"use strict";function cs(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const ds=cs(ls),fs=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function us(e,o){function n(i){return(...r)=>{if(e.value||o(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[i].apply(e.value,r)}}function a(){const i=Object.create(null);return fs.forEach(r=>{i[r]=n(r)}),i}return a()}function hs(e,o,n){let a=null;t.watch([n,e,o],([i,r,s],l,d)=>{i&&r&&s&&(a=ot.throttle(()=>{r.resize()},100),Qa.addListener(i,a)),d(()=>{a&&i&&Qa.removeListener(i,a)})})}const gs={autoresize:Boolean},ms="ecLoadingOptions";function ys(e,o,n){const a=t.inject(ms,{}),i=t.computed(()=>({...t.unref(a),...n==null?void 0:n.value}));t.watchEffect(()=>{const r=e.value;r&&(o.value?r.showLoading(i.value):r.hideLoading())})}const xs={loading:Boolean,loadingOptions:Object},ah="",ps=/^on[^a-z]/,bs=e=>ps.test(e);function vs(e){const o={};for(const n in e)bs(n)||(o[n]=e[n]);return o}const Ss="x-vue-echarts",Cs="ecTheme",ws="ecInitOptions",As="ecUpdateOptions",wt=t.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...gs,...xs},inheritAttrs:!1,setup(e,{attrs:o,listeners:n}){const a=t.shallowRef(),i=t.shallowRef(),r=t.shallowRef(),s=t.inject(Cs,null),l=t.inject(ws,null),d=t.inject(As,null),{autoresize:c,manualUpdate:u,loading:y,loadingOptions:f}=t.toRefs(e),x=t.computed(()=>r.value||e.option||Object.create(null)),m=t.computed(()=>e.theme||t.unref(s)||{}),h=t.computed(()=>e.initOptions||t.unref(l)||{}),g=t.computed(()=>e.updateOptions||t.unref(d)||{}),C=t.computed(()=>vs(o));function p(T){if(i.value||!a.value)return;const D=i.value=ot.init(a.value,m.value,h.value);e.group&&(D.group=e.group);let O=n;O||(O={},Object.keys(o).filter(L=>L.indexOf("on")===0&&L.length>2).forEach(L=>{const k=L.charAt(2).toLowerCase()+L.slice(3);O[k]=o[L]})),Object.keys(O).forEach(L=>{const k=O[L];k&&(L.indexOf("zr:")===0?D.getZr().on(L.slice(3).toLowerCase(),k):D.on(L.toLowerCase(),k))});function I(){if(D&&!D.isDisposed())try{D.resize()}catch(L){if(L.message==="Cannot read property 'get' of undefined")return;throw L}}function _(){D.setOption(T||x.value,g.value)}c.value?t.nextTick(()=>{I(),_()}):_()}function v(T,D){e.manualUpdate&&(r.value=T),i.value?i.value.setOption(T,D||{}):p(T)}function b(){i.value&&(i.value.dispose(),i.value=void 0)}let w=null;t.watch(u,T=>{typeof w=="function"&&(w(),w=null),T||(w=t.watch(()=>e.option,D=>{D&&(i.value?i.value.setOption(D,g.value):p())},{deep:!0}))},{immediate:!0}),t.watch([m,h],()=>{b(),p()},{deep:!0}),t.watchEffect(()=>{e.group&&i.value&&(i.value.group=e.group)});const A=us(i,p);return ys(i,y,f),hs(i,c,a),t.onMounted(()=>{e.option&&p()}),t.onUnmounted(b),{chart:i,root:a,setOption:v,nonEventAttrs:C,...A}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",t.h(Ss,e)}});function lt(e,o){ks(e)&&(e="100%");var n=Ts(e);return e=o===360?e:Math.min(o,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*o),10)/100),Math.abs(e-o)<1e-6?1:(o===360?e=(e<0?e%o+o:e%o)/parseFloat(String(o)):e=e%o/parseFloat(String(o)),e)}function ks(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Ts(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Bs(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Dn(e){return e.length===1?"0"+e:String(e)}function Es(e,o,n){return{r:lt(e,255)*255,g:lt(o,255)*255,b:lt(n,255)*255}}function In(e,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(o-e)*(6*n):n<1/2?o:n<2/3?e+(o-e)*(2/3-n)*6:e}function Ds(e,o,n){var a,i,r;if(e=lt(e,360),o=lt(o,100),n=lt(n,100),o===0)i=n,r=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,l=2*n-s;a=In(l,s,e+1/3),i=In(l,s,e),r=In(l,s,e-1/3)}return{r:a*255,g:i*255,b:r*255}}function Is(e,o,n){e=lt(e,255),o=lt(o,255),n=lt(n,255);var a=Math.max(e,o,n),i=Math.min(e,o,n),r=0,s=a,l=a-i,d=a===0?0:l/a;if(a===i)r=0;else{switch(a){case e:r=(o-n)/l+(o<n?6:0);break;case o:r=(n-e)/l+2;break;case n:r=(e-o)/l+4;break}r/=6}return{h:r,s:d,v:s}}function Rs(e,o,n){e=lt(e,360)*6,o=lt(o,100),n=lt(n,100);var a=Math.floor(e),i=e-a,r=n*(1-o),s=n*(1-i*o),l=n*(1-(1-i)*o),d=a%6,c=[n,s,r,r,l,n][d],u=[l,n,n,s,r,r][d],y=[r,r,l,n,n,s][d];return{r:c*255,g:u*255,b:y*255}}function _s(e,o,n,a){var i=[Dn(Math.round(e).toString(16)),Dn(Math.round(o).toString(16)),Dn(Math.round(n).toString(16))];return a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Xa(e){return at(e)/255}function at(e){return parseInt(e,16)}var ei={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 tn(e){var o={r:0,g:0,b:0},n=1,a=null,i=null,r=null,s=!1,l=!1;return typeof e=="string"&&(e=Ns(e)),typeof e=="object"&&(vt(e.r)&&vt(e.g)&&vt(e.b)?(o=Es(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):vt(e.h)&&vt(e.s)&&vt(e.v)?(a=hn(e.s),i=hn(e.v),o=Rs(e.h,a,i),s=!0,l="hsv"):vt(e.h)&&vt(e.s)&&vt(e.l)&&(a=hn(e.s),r=hn(e.l),o=Ds(e.h,a,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Bs(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Ls="[-\\+]?\\d+%?",Os="[-\\+]?\\d*\\.\\d+%?",At="(?:".concat(Os,")|(?:").concat(Ls,")"),Rn="[\\s|\\(]+(".concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")\\s*\\)?"),_n="[\\s|\\(]+(".concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")\\s*\\)?"),ht={CSS_UNIT:new RegExp(At),rgb:new RegExp("rgb"+Rn),rgba:new RegExp("rgba"+_n),hsl:new RegExp("hsl"+Rn),hsla:new RegExp("hsla"+_n),hsv:new RegExp("hsv"+Rn),hsva:new RegExp("hsva"+_n),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 Ns(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var o=!1;if(ei[e])e=ei[e],o=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ht.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ht.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ht.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ht.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ht.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ht.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ht.hex8.exec(e),n?{r:at(n[1]),g:at(n[2]),b:at(n[3]),a:Xa(n[4]),format:o?"name":"hex8"}:(n=ht.hex6.exec(e),n?{r:at(n[1]),g:at(n[2]),b:at(n[3]),format:o?"name":"hex"}:(n=ht.hex4.exec(e),n?{r:at(n[1]+n[1]),g:at(n[2]+n[2]),b:at(n[3]+n[3]),a:Xa(n[4]+n[4]),format:o?"name":"hex8"}:(n=ht.hex3.exec(e),n?{r:at(n[1]+n[1]),g:at(n[2]+n[2]),b:at(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function vt(e){return!!ht.CSS_UNIT.exec(String(e))}var gn=2,ti=.16,Fs=.05,Ms=.05,zs=.15,ni=5,oi=4,Ps=[{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 ai(e){var o=e.r,n=e.g,a=e.b,i=Is(o,n,a);return{h:i.h*360,s:i.s,v:i.v}}function mn(e){var o=e.r,n=e.g,a=e.b;return"#".concat(_s(o,n,a,!1))}function qs(e,o,n){var a=n/100,i={r:(o.r-e.r)*a+e.r,g:(o.g-e.g)*a+e.g,b:(o.b-e.b)*a+e.b};return i}function ii(e,o,n){var a;return Math.round(e.h)>=60&&Math.round(e.h)<=240?a=n?Math.round(e.h)-gn*o:Math.round(e.h)+gn*o:a=n?Math.round(e.h)+gn*o:Math.round(e.h)-gn*o,a<0?a+=360:a>=360&&(a-=360),a}function ri(e,o,n){if(e.h===0&&e.s===0)return e.s;var a;return n?a=e.s-ti*o:o===oi?a=e.s+ti:a=e.s+Fs*o,a>1&&(a=1),n&&o===ni&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function li(e,o,n){var a;return n?a=e.v+Ms*o:a=e.v-zs*o,a>1&&(a=1),Number(a.toFixed(2))}function Ln(e){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=tn(e),i=ni;i>0;i-=1){var r=ai(a),s=mn(tn({h:ii(r,i,!0),s:ri(r,i,!0),v:li(r,i,!0)}));n.push(s)}n.push(mn(a));for(var l=1;l<=oi;l+=1){var d=ai(a),c=mn(tn({h:ii(d,l),s:ri(d,l),v:li(d,l)}));n.push(c)}return o.theme==="dark"?Ps.map(function(u){var y=u.index,f=u.opacity,x=mn(qs(tn(o.backgroundColor||"#141414"),tn(n[y]),f*100));return x}):n}var On={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"},Nn={},Fn={};Object.keys(On).forEach(function(e){Nn[e]=Ln(On[e]),Nn[e].primary=Nn[e][5],Fn[e]=Ln(On[e],{theme:"dark",backgroundColor:"#141414"}),Fn[e].primary=Fn[e][5]});var si=[],nn=[],Vs="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Hs(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function js(e,o){if(o=o||{},e===void 0)throw new Error(Vs);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),i=si.indexOf(a);i===-1&&(i=si.push(a)-1,nn[i]={});var r;return nn[i]!==void 0&&nn[i][n]!==void 0?r=nn[i][n]:(r=nn[i][n]=Hs(),n==="prepend"?a.insertBefore(r,a.childNodes[0]):a.appendChild(r)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),r.styleSheet?r.styleSheet.cssText+=e:r.textContent+=e,r}function ci(e){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),a.forEach(function(i){Ws(e,i,n[i])})}return e}function Ws(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}function Gs(e,o){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(o))}function Us(e,o){Gs(e,"[@ant-design/icons-vue] ".concat(o))}function di(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function Mn(e,o,n){return n?t.h(e.tag,ci({key:o},n,e.attrs),(e.children||[]).map(function(a,i){return Mn(a,"".concat(o,"-").concat(e.tag,"-").concat(i))})):t.h(e.tag,ci({key:o},e.attrs),(e.children||[]).map(function(a,i){return Mn(a,"".concat(o,"-").concat(e.tag,"-").concat(i))}))}function fi(e){return Ln(e)[0]}function ui(e){return e?Array.isArray(e)?e:[e]:[]}var $s=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -96,7 +96,7 @@ version: 2.9.0
|
|
|
96
96
|
`,n+="-----END PUBLIC KEY-----",n},o.hasPublicKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")},o.hasPrivateKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")&&n.hasOwnProperty("d")&&n.hasOwnProperty("p")&&n.hasOwnProperty("q")&&n.hasOwnProperty("dmp1")&&n.hasOwnProperty("dmq1")&&n.hasOwnProperty("coeff")},o.prototype.parsePropertiesFrom=function(n){this.n=n.n,this.e=n.e,n.hasOwnProperty("d")&&(this.d=n.d,this.p=n.p,this.q=n.q,this.dmp1=n.dmp1,this.dmq1=n.dmq1,this.coeff=n.coeff)},o}(Lc),Oo,zc=typeof process<"u"?(Oo=process.env)===null||Oo===void 0?void 0:Oo.npm_package_version:void 0,Pc=function(){function e(o){o===void 0&&(o={}),o=o||{},this.default_key_size=o.default_key_size?parseInt(o.default_key_size,10):1024,this.default_public_exponent=o.default_public_exponent||"010001",this.log=o.log||!1,this.key=null}return e.prototype.setKey=function(o){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Tr(o)},e.prototype.setPrivateKey=function(o){this.setKey(o)},e.prototype.setPublicKey=function(o){this.setKey(o)},e.prototype.decrypt=function(o){try{return this.getKey().decrypt(xr(o))}catch{return!1}},e.prototype.encrypt=function(o){try{return bn(this.getKey().encrypt(o))}catch{return!1}},e.prototype.sign=function(o,n,a){try{return bn(this.getKey().sign(o,n,a))}catch{return!1}},e.prototype.verify=function(o,n,a){try{return this.getKey().verify(o,xr(n),a)}catch{return!1}},e.prototype.getKey=function(o){if(!this.key){if(this.key=new Tr,o&&{}.toString.call(o)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,o);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=zc,e}();const Br=new Pc,Zt=qc();function qc(){let o=Math.random().toString(36).substr(2);for(;o.length<16;)o+=Math.random().toString(36).substr(2);return o=o.substr(0,16),o}const Er=it.enc.Utf8.parse("ABCDEF1234123412");function Vc(e,o){o=o||Zt;const n=it.enc.Utf8.parse(o);let a="";switch(typeof e){case"string":a=it.enc.Utf8.parse(e);break;case"object":a=it.enc.Utf8.parse(JSON.stringify(e));break;default:a=it.enc.Utf8.parse(e.toString())}return it.AES.encrypt(a,n,{iv:Er,mode:it.mode.CBC,padding:it.pad.ZeroPadding}).toString()}function Dr(e,o){o=o||Zt;const n=it.enc.Utf8.parse(o),a=it.AES.decrypt(e,n,{iv:Er,mode:it.mode.CBC,padding:it.pad.ZeroPadding});return it.enc.Utf8.stringify(a).toString()}function Hc(e){Br.setPublicKey(e)}function jc(e){return Br.encrypt(e)}function Ir(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const n=["/diagram","/dataview"].map(a=>`^(.*?)${a}(/|$)`);for(const a of n)if(new RegExp(a).test(e))return!0;return!1}function Wc(e){const{paramType:o,data:n,params:a,method:i}=e;o==="form"?["get","delete"].includes(i)?e.params=Qt(a,"string"):e.data=Qt(n,"string"):["get","delete"].includes(i)?e.params=Qt(a,"string"):e.data=Qt(n)}function Qt(e,o){let n=e||{};if(o==="string"){n="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const d=e[l];n+=`${l}=${encodeURIComponent(d)}&`}}Hc("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const i=jc(Zt);return{c:Vc(n,Zt),p:i}}window.getEncryptParam=Qt;function Gc(e,o){var n;(n=window==null?void 0:window.config)!=null&&n.encryptFlag&&Ir(e.url)&&(e.data instanceof FormData?e.data=Uc(e.data):Wc(e))}function Uc(e){const o=e.entries(),n=new FormData,a={};for(const r of o){const s=r[0],l=r[1];l instanceof Blob?n.append(s,l):a[s]=l}const i=Qt(a,"json");return typeof i=="object"&&(n.append("c",i.c),n.append("p",i.p)),n}window.xhaesKey=Zt,window.xhaesDecrypt=Dr;function Rr(e,o){var n;if((n=window==null?void 0:window.config)!=null&&n.encryptFlag&&Ir(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const a=Dr(e.data.data.content,Zt);e.data=JSON.parse(a)}}const _r=window.config.requestErrorTip,pt=is.create({timeout:1e3*180});pt.interceptors.request.use(e=>{const{requestParams:o={}}=window.config;return o!=null&&o.pltToken&&(e.headers["Plt-Token"]=o.pltToken),Gc(e),e},e=>Promise.reject(e)),pt.interceptors.response.use(e=>{var o,n,a;return _r&&+((o=e==null?void 0:e.data)==null?void 0:o.code)==500&&ue.message.error({content:((n=e==null?void 0:e.data)==null?void 0:n.msg)||((a=e==null?void 0:e.data)==null?void 0:a.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),Rr(e),e},e=>{if(Rr(e==null?void 0:e.response),_r)if(e.message.includes("timeout"))ue.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:o}=(e==null?void 0:e.response)||{};o>=400&&o<500&&ue.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),o>=500&&ue.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(e)});const $c=e=>e.replace(/\\n/g,`
|
|
97
97
|
`),No=(e,o=2)=>{const n=parseFloat(e+"");return isNaN(n)?e:n.toFixed(o).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Kc=e=>{const o=parseFloat(e+"");return isNaN(o)?e:(o+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},Bn=(e,o=2)=>{const n=e+"";if(n.includes("%"))return e;const a=parseFloat(n);return isNaN(a)?e:`${(a*100).toFixed(o)}%`},Yc=(e,o=2)=>{const n=e+"",a=parseFloat(n);return isNaN(a)?e:a.toFixed(o)},Lr=(e,o)=>ft(o,e),ct=(e,o)=>{if(typeof e=="string"&&typeof o=="string")return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const i=o[a];if(typeof i=="string"&&e.toLocaleLowerCase().includes(i.toLocaleLowerCase()))return!0}}return!1},Jt=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),ln=e=>{const{leftAxisList:o=[],rightAxisList:n=[],queryColumnList:a=[],indicators:i=[]}=e;return[...o,...n,...a,...i].filter(r=>(r==null?void 0:r.calcType)==="COMPONENT").map(r=>({keyName:r.builtInCalcWay,id:r.builtInValueSource}))},dt=(e,o)=>{let n=!0;const a=ln(e);return a!=null&&a.length&&(n=a.map(i=>o[i.id]).every(i=>i)),n},sn=(e,o)=>{var s;const n=e.match(/\{(.+?)\}/g),a=((s=e.split(`
|
|
98
98
|
`))==null?void 0:s.length)-1;let i="";if(a)for(let l=0;l<a;l++)i+=`
|
|
99
|
-
`;let r=e;if(n!=null&&n.length){for(const l of n){const d=_e(l,{textData:o},{useNewline:!1,useSpace:!1});d&&(r=r.replace(l,d))}return`${i}{text|${r}}`}else return e},Or=(e,o)=>{const{props:n,componentList:a,getGlobalModel:i}=e,{graphicConfig:r={},startValue:s,endValue:l}=n,d=Zc({graphicConfig:r,startValue:s,endValue:l,componentList:a,getGlobalModel:i}),{dimensions:c,dataset:u}=o,{classificationList:y=[]}=r,x=y.find(m=>m.show).label||"";for(const m of d)c.includes(m)||c.push(m);c.sort((m,h)=>pe(m).isBefore(pe(h))?-1:1);for(const m of u){const{data:h}=m;if(h!=null&&h.length){const g=[];for(const C of d)if(h.find(p=>p[x]!==C)){const p=Le.cloneDeep(h[0]);for(const v in p)v===x?p[v]=C:p[v]=0;g.push(p)}m.data.push(...g),m.data.sort((C,p)=>pe(C[x]).isBefore(pe(p[x]))?-1:1)}}},cn=e=>{const o=[];for(const n of e)n.conditions?o.push(...cn(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o};function Zc(e){const{startValue:o,endValue:n,componentList:a,graphicConfig:i,getGlobalModel:r}=e,s=Nr(o),l=Nr(n),d=[];if(s&&l){const c=a.find(y=>y.keyName===s.keyName),u=a.find(y=>y.keyName===l.keyName);if(c&&u){const y=r(c.id),f=r(u.id),{classificationList:x=[]}=i,m=x.find(h=>h.show);if(m){let h="YYYY-MM";switch(m.name){case"the_year":h="YYYY";break;case"the_month":h="MM";break;case"the_day":h="DD";break;case"the_date":h=(m==null?void 0:m.dateFormat)||h;break}const g=Qc(h);if(h){const C=t.unref(y[s.field]),p=t.unref(f[l.field]);let v=pe(C);const b=pe(p);for(d.push(b.format(h));v.isBefore(b);)d.push(v.format(h)),v=v.add(1,g)}}}}return d}function Nr(e){let o=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let a=n[0].slice(1,-1).trim();const i=a.match(/\[(.+?)\]/g);let r="";i!=null&&i.length&&(a=a.replace(i[0],""),r=i[0].slice(1,-1).trim()),o={keyName:a,field:r}}}return o}function Qc(e){const o=e.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const dn=(e,o)=>{const n={dayjs:pe,...o};let a="";const i=[];for(const l in n)a+=`${l},`,i.push(n[l]);a=a.replace(/,$/,"");const r=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${r})`)()(...i)}catch{return e}return s},_e=(e="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:i=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(y);for(let x=0;x<f.length;x++){const m=f[x],h=s[m];h!=null&&typeof h!="function"&&(u=u.replace(m,h))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=dn(u,n)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},qe=(e,o=()=>{})=>{const{requestUrl:n,requestMethod:a,requestHeaders:i,requestParams:r,requestInterval:s,isOpenRequestTimer:l}=e,{contextRequestUrl:d,touchEventId:c}=t.inject(Pe,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:u}=t.inject(Ie,{getGlobalModel:m=>{}}),y=_e(n),f=async(m={})=>{if(!y||!a||!i)return;let h={};r.forEach(b=>{const{key:w,value:A}=b;if(typeof A=="object"&&A!=null&&A.id){let T={};const{id:D,prop:O,propKey:I,operate:_}=A;D==="THIS"?T=u(t.unref(c))||{}:T=u(D)||{};const L=t.unref(T[O]);let k=null;if(["date","range"].some(B=>ct(T==null?void 0:T.type,B))){const{value:B,type:S,mode:E}=_||{};if(B&&S&&E)switch(S){case"add":k=t.unref(L).add(B,E);break;case"minus":k=t.unref(L).subtract(B,E);break}k==null&&(k=t.unref(L)),k=(k==null?void 0:k.format((I==null?void 0:I.trim())||T.format))||""}else Object.prototype.toString.call(L)==="[object Object]"?I?k=L[I]:k=O?L[O]:L:ct(T==null?void 0:T.type,"select")&&t.unref(L)&&O&&Array.isArray(t.unref(L))?k=t.unref(L).map(B=>Object.prototype.hasOwnProperty.call(B,O)?B[O]:B):k=L;h[w]=k}else typeof A=="string"&&(h[w]=_e(A))}),h={...window.config.requestParams,...m,...h};let g="";const C=Object.keys(h),p=C.length-1,v=C.length;C.forEach((b,w)=>{let A=h[b];Object.prototype.toString.call(A)==="[object Object]"&&(A=JSON.stringify(A)),w===0?v!==1?g+=`?${b}=${A}&`:g+=`?${b}=${A}`:w===p?g+=`${b}=${A}`:g+=`${b}=${A}&`});try{const b=["get","head"].includes(a),w={};let A=b?y+g:y;h.dataSqlId&&!A.includes("dataSqlId")&&(A+=`${A.includes("?")?"&":"?"}dataSqlId=${h.dataSqlId}`),Object.prototype.hasOwnProperty.call(h,"signal")&&(w.signal=h.signal);const T=await pt({baseURL:t.unref(d)||"",url:A,method:a,headers:i,data:b?{}:h,...w});return o(T),T}catch(b){console.error(b)}},x=l&&setInterval(f,s*1e3);return t.onUnmounted(()=>{clearInterval(x)}),f},Dt=(e=[],o,n=!1)=>{let{name:a="name",types:i=[]}=o||{};a=(a==null?void 0:a.trim())||a;const r=new Set,s=new Map,l=e.length,d=i.length;if(l===1&&!n){const y=[];for(let x=0;x<d;x++){const m=i[x],{label:h,value:g}=m,C={...e[0],value:e[0][g]};r.add(h),y.push(C)}const f=e[0][a]||"";s.set(f,y)}else for(let y=0;y<l;y++){const f=e[y],x=f[a];r.add(x);for(let m=0;m<d;m++){const h=i[m],{label:g,value:C}=h,p={...f,value:f[C]||0};if(s.has(g)){const v=s.get(g);v.push(p),s.set(g,v)}else s.set(g,[p])}}const c=Array.from(r),u=[];for(const[y,f]of s)u.push({name:y,data:f});return{dimensions:c,dataset:u}},mt=(e,o=!1)=>{var a;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(n=`url(${n})`),n},Fo=(e,o)=>{const n=`${Ei}/preview?pageId=${o}`,a=`${Ei}/${o}`;return e==="preview"?n:a},ft=(e,o)=>{var i;if(e==null)return o;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let r=0;r<a;r++){const s=n[r];if(s==null||s==="")break;let l=(i=s.slice(1,-1))==null?void 0:i.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=dn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:o}=t.inject(Ai,{requestToken:()=>{}}),{setLoadedData:n}=t.inject(kt,{setLoadedData:(g,C)=>{}}),{getGlobalModel:a}=t.inject(Ie,{getGlobalModel:g=>{}});e.dataType==="indicator"&&o();const i=g=>{const{around:C,unit:p,id:v}=g;let b="";const{pageMode:w="",componentList:A=[]}=(e==null?void 0:e.graphicConfig)||{};let T=null,D=null;if(w==="design"){const O=A==null?void 0:A.find(S=>S.id===v);if(!O)return[];const{interval:I,intervalUnit:_,startTime:L,endTime:k,operate:R,useCurrentTime:B}=O||{};if(B&&(T=pe().subtract(I,_),D=pe()),L&&(T=pe(L)),k&&(D=pe(k)),R){const{type:S,value:E,mode:N}=R;switch(S){case"add":T=T&&T.add(E,N),D=D&&D.add(E,N);break;case"minus":T=T&&T.subtract(E,N),D=D&&D.subtract(E,N)}}}else{const O=a(v)||{};t.unref(O.startTime)&&(T=pe(t.unref(O.startTime))),t.unref(O.endTime)&&(D=pe(t.unref(O.endTime)))}if(T&&D){const O=D.diff(T,p.toLowerCase());b=`${C==="before"?"-":""}${O+1}`}return b?[b]:[]},r=(g,C)=>Object.prototype.hasOwnProperty.call(g,C),s=(g,C)=>{if(C)r(g,"indexCode")&&(g.hrpIndexCode=g.indexCode,delete g.indexCode),r(g,"indexCodeNum")&&(g.hrpIndexCodeNum=g.indexCodeNum,delete g.indexCodeNum),r(g,"dataType")&&delete g.dataType;else{const{calcWays:p=[],dateCalcTypes:v=[],activeKey:b,componentId:w=""}=g;if(b===5&&(p!=null&&p.length)&&(v!=null&&v.length)&&w){const A=p[0].split("-");(A==null?void 0:A.length)>1&&A[0]==="rangeValue"&&(g.calcWays=i({around:A[1],unit:v[0],id:w})),delete g.radioValue}r(g,"dataType")&&(g.fieldType==="DATE"&&(g.label=g.fieldName),g.dataType==="component"&&(g.fieldValue="${"+g.fieldValue+"}"),delete g.dataType),r(g,"activeKey")&&delete g.activeKey,r(g,"radioValue")&&delete g.radioValue,r(g,"indexCode")&&(g.hrpIndexCode=g.indexCode,delete g.indexCode),r(g,"indexCodeNum")&&(g.hrpIndexCodeNum=g.indexCodeNum,delete g.indexCodeNum),g.dataType!=="component"&&g.useCurrentTime&&(g.fieldValue=pe().format(g.dateFormat)),delete g.useCurrentTime}},l=(g,C)=>{const p=[];return g!=null&&g.length&&Le.cloneDeep(g).forEach(v=>{if(v.join&&v.conditions){const b=!v.conditions.some(w=>w.join&&w.conditions);v.conditions.forEach((w,A)=>{s(w,C);const T={};if(A<v.conditions.length-1&&(T.join=v.join),b)p.push({...T,...w});else if(w.join&&w.conditions){const D=C?"sqlConditions":"conditions";p.push({[D]:l([w],C),...T})}else p.push({...T,...w})})}else s(v,C),p.push(v)}),p},d=(g={},C)=>{if(g!=null&&g.sortCpnts&&C){const z=h(g);z&&(C.sort=z)}const{label:p,name:v,location:b,show:w,indexCode:A,indexCodeNum:T,calcType:D="COLUMN",builtInFormula:O,builtInValueSource:I,builtInCalcWay:_,formula:L,conditions:k,aggregate:R,distinct:B,dimByCount:S}=g;let E;if(k&&(E=l(k)),D==="COMPONENT"){const z={};return x(z,I),{label:p.trim(),columnName:v,show:w,calcType:D,componentAlias:_,componentValue:z.fieldValue||null}}const N={label:p.trim(),columnName:v,location:b,show:w,calcType:D,hrpIndexCode:A,hrpIndexCodeNum:T,aggregate:R,builtInFormula:O,builtInValueSource:I,formula:L,conditions:E};if(O==="DATE_OFFSET"){const z=_.split("-");if((z==null?void 0:z.length)===3){let j=z[0];return z[2]==="before"&&z[0]!=="0"&&(j=`-${z[0]}`),{...N,calcWays:[j],dateCalcTypes:[z[1]]}}}else return v==="the_count"&&(N.calcType="AGGREGATE",N.distinct=!!B,N.typeGuid=S),{...N,builtInCalcWay:_}},c=g=>{if(!g)return[];const C=Le.cloneDeep((g==null?void 0:g.controlList)||[]),{classificationList:p=[],rowHeaderList:v=[],dimensionList:b=[],seriesList:w=[],leftAxisList:A=[],rightAxisList:T=[],queryColumnList:D=[],indicators:O=[]}=g;f(C);const I=[...p,...v,...b,...w,...A,...T,...D,...O],_=[];for(const R of I){const B=cn((R==null?void 0:R.conditions)||[]);if(B!=null&&B.length){const S=B.filter(E=>(E==null?void 0:E.dataType)==="component").map(E=>{const N={};return E!=null&&E.dateFormat&&(N.format=E.dateFormat),{conditionKey:E.fieldName,conditionLabel:E.fieldName,conditionName:E.fieldName,conditionValueType:E.fieldType,id:E.componentId,keyName:E.fieldValue,rule:E.rule,notGlobal:!0,indexCode:E.indexCode,typeGuid:E.typeGuid,indexCodeNum:E.indexCodeNum,...N}});if(S!=null&&S.length)for(const E of S)_.find(N=>N.keyName===E.keyName)||_.push(E)}}const L=_.length,k=C;for(let R=0;R<L;R++){const B=_[R];if((B==null?void 0:B.conditionKey)==="parentCode")continue;const{id:S,keyName:E,prop:N,format:z,modelKey:j,dataType:F="component",customValue:M}=B,P=u(B);x(P,S,{prop:N,dateFormat:z,modelKey:j,keyName:E}),F===""&&(P.fieldValue=M||""),k.push(P)}for(let R=k.length-1;R>=0;R--){const B=k[R];B.globalCondition||cn(k).find(E=>E.alias===B.alias&&E.globalCondition)&&k.splice(R,1)}return k};function u(g){const{id:C,keyName:p,conditionLabel:v,conditionKey:b,conditionValueType:w,prop:A,rule:T="NONE",notGlobal:D=!1,indexCode:O,typeGuid:I,indexCodeNum:_,dataType:L="component"}=g;let k=p||C;k&&A&&(k+=`-${A}`);let R=T;return R==="NONE"&&(["startTime","endTime"].includes(A)?R=A==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":p!=null&&p.includes("startTime")?R=A==="GREATER_EQUAL":p!=null&&p.includes("endTime")?R=A==="LESS_EQUAL":R="EQUAL"),{rule:R,label:v,fieldName:b,fieldValue:"",valueType:w,alias:k,globalCondition:!D,indexCode:O,typeGuid:I,indexCodeNum:_,dataType:L}}const y=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function f(g){if(g!=null&&g.length)for(const C of g)if(C!=null&&C.conditions)f(C.conditions);else{const{id:p,keyName:v,prop:b,modelKey:w,format:A,dataType:T="component",customValue:D}=C,O=u(C);x(O,p,{prop:b,dateFormat:A,modelKey:w,keyName:v}),T===""&&(O.fieldValue=D||"");for(const I in O)C[I]=O[I];for(const I of y)delete C[I]}}function x(g,C,p){var R,B;const v=a(C)||{},{prop:b="",dateFormat:w="",modelKey:A="",keyName:T=""}=p||{},{value:D,format:O="YYYY-MM-DD",type:I="",useCurrentTime:_,RECORD:L}=v||{},k=w||O;if(ct(v.type,"date"))_?D?g.fieldValue=(R=t.unref(D))==null?void 0:R.format(k):g.fieldValue=pe().format(k):g.fieldValue=(B=t.unref(D))==null?void 0:B.format(k),g.dateFormat=k;else if(I==="ecanRangePicker"){let S=b;if(!b){const N=T&&T.split("-");N!=null&&N.length&&(S=N[N.length-1])}if(!S)return;let E=null;t.unref(v[S])&&(E=pe(t.unref(v[S]))),E&&(g.fieldValue=E==null?void 0:E.format(k)),g.dateFormat=k}else ct(I,Di)?A&&L?g.fieldValue=L[A]:!A&&L?g.fieldValue=L.value:g.fieldValue=t.unref(D):g.fieldValue=t.unref(D)}const m=g=>{if(g){const C=Le.cloneDeep(g);return g.defaultCode&&(C.label=C.columnName,delete C.defaultCode),C}else return g},h=g=>{const{sortCpnts:C=[]}=g;let p,v="";for(const b of C){const w=a(b)||{},{type:A,RECORD:T}=w;if(ct(A,"image")&&ct(T==null?void 0:T.value,["asc","desc"])){v=T.value.toUpperCase();break}}return v&&(p={label:g.label,columnName:g.name,order:v,type:"NORMAL"}),p};return async(g={})=>{var J,re,ne,se,Z,oe;n(e.id,!1);const{graphicConfig:C,type:p,isGroupTable:v=!1}=e;let{source:b,dataViewId:w,plugin:A="1",layer:T,chartType:D,classificationList:O=[],rowHeaderList:I=[],dimensionList:_=[],seriesList:L=[],leftAxisList:k=[],rightAxisList:R=[],queryColumnList:B=[],indicators:S=[],controlList:E=[],formFields:N={},idxLibMode:z,preview:j=!1}=C||{},F=[];if((C==null?void 0:C.pageMode)==="design"?F=(C.sqlConditions??[]).map(ee=>{const ae={};if(!r(ee,"globalCondition")&&!ee.join&&(ae.globalCondition=!0),!ee.join){const ce=ee.rule||"EQUAL";ae.rule=ce==="NONE"?"EQUAL":ce}return{...ee,...ae}}):F=c(C),F!=null&&F.length){const ee=F.filter(ce=>ce.globalCondition),ae=F.filter(ce=>!ce.globalCondition);(ee==null?void 0:ee.length)>1&&(F=[{join:"&&",conditions:ee},...ae])}F!=null&&F.length&&(F=l(F,"1")),T==null&&(ct(p,["table"])||ct(p,"list")&&(O==null?void 0:O.length)>1?T="1":ct(p,["select","checkbox","radio"])?T="3":T="2");let M,P="";if(Array.isArray(O)&&O.length>0&&(p!=="ecanList"||(O==null?void 0:O.length)===1)){const ee=O.length;for(let ae=0;ae<ee;ae++){const ce=O[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe,dateFormat:Qe,typeGuid:Ue="",truncations:We=[]}=ce;if(ke||ee===1){P=Ue,M={label:ve.trim(),columnName:we,show:ke,sort:h(ce)||m(Te)||Te,customGroup:Ve,conditions:l(Xe),typeGuid:Ue},Qe&&(M.dateFormat=Qe),we==="the_date"&&!M.dateFormat&&(M.dateFormat="YYYY-MM");const Ge={};if(Array.isArray(We)&&We.length>0){const et=We.length;for(let tt=0;tt<et;tt++){const $e=We[tt]||{},{rule:Je="",num:ut=0,name:yt=""}=$e;Je&&ut&&(Ge.num=ut,Ge.rule=Je,yt&&(Ge.otherGroupName=yt))}}(J=Object.keys(Ge))!=null&&J.length&&(M.truncation=Ge);break}}}let H;if(Array.isArray(L)&&L.length>0){const ee=L.length;for(let ae=0;ae<ee;ae++){const ce=L[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe}=ce;if(ke||ee===1){H={label:ve.trim(),columnName:we,show:ke,sort:Te,customGroup:Ve,conditions:l(Xe)};break}}}const Q=[];k==null||k.forEach(ee=>{ee.location="LEFT",Q.push(d(ee,M))}),R==null||R.forEach(ee=>{ee.location="RIGHT",Q.push(d(ee,M))}),S==null||S.forEach(ee=>{ee.location="LEFT",Q.push(d(ee,M))});const V=[];p==="ecanList"&&(O==null?void 0:O.length)>1&&(B=O),B==null||B.forEach(ee=>{const{label:ae,name:ce,location:ve,show:we,indexCode:ke,sort:Te,typeGuid:Ve,indexCodeNum:Xe}=ee;let Qe=Te;if(g.sort){const{field:Ue,order:We}=g.sort;let Ge=Q.find(et=>et.label===Ue);!Ge&&ae===Ue&&(Ge=ee),Ge&&(Qe={columnName:Ge.columnName,label:g.sort.field,order:We.toUpperCase(),type:"NORMAL"})}V.push({label:ae,columnName:ce,location:ve,show:we,sort:Qe,calcType:"COLUMN",hrpIndexCode:ke,hrpIndexCodeNum:Xe,typeGuid:Ve})});const q=[];let $=[];if(Array.isArray(I)&&I.length>0?$=I:Array.isArray(_)&&_.length>0&&($=_),$!=null&&$.length){const ee=$.length;for(let ae=0;ae<ee;ae++){const ce=$[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe,truncations:Qe,typeGuid:Ue="",dateFormat:We}=ce;let Ge=Te;if(g.sort){const{field:$e,order:Je}=g.sort;let ut=Q.find(yt=>yt.label===$e);!ut&&ce.label===$e&&(ut=ce),ut&&(Ge={columnName:ut.columnName,label:g.sort.field,order:Je.toUpperCase(),type:"NORMAL"})}const et={label:ve.trim(),columnName:we,show:ke,sort:Ge,customGroup:Ve,conditions:l(Xe),typeGuid:Ue};We&&(et.dateFormat=We),we==="the_date"&&!et.dateFormat&&(et.dateFormat="YYYY-MM");const tt={};if(Array.isArray(Qe)&&Qe.length>0){const $e=Qe.length;for(let Je=0;Je<$e;Je++){const ut=Qe[Je]||{},{rule:yt="",num:W=0,name:K=""}=ut;yt&&W&&(tt.num=W,tt.rule=yt,K&&(tt.otherGroupName=K))}}(re=Object.keys(tt))!=null&&re.length&&(et.truncation=tt),q.push(et)}}if(ct(p,["text","proportion","counter"])&&(D="zb"),v){if(q.length===0||Q.length===0)return;D="grouptable"}else{if(T==="1"&&V.length===0)return;if(T==="2"&&Q.length===0)return;if(T==="3"&&(!P||!N.labelField||!N.valueField))return;if(T==="3"&&p==="ecanDataSelect"&&Q.length===0)return}_!=null&&_.length&&(T="1",D="grouptable");let U=(ne=window==null?void 0:window.config)==null?void 0:ne.pageId;if(!U){const{pathname:ee}=window==null?void 0:window.location;if(ee){const ae=ee.split("/");ae!=null&&ae.length&&(U=ae[ae.length-1])}}if((se=Object.keys(N))!=null&&se.length){const ee=cn(E).find(ce=>ce.conditionKey==="parentCode"),ae={};if(ee){const ce=a(ee.id)||{};if(ce!=null&&ce.itemCodes)ae.parentItemCodes=ce.itemCodes;else return}p==="ecanDataSelect"&&(ae.indicatorList=Q.filter(ce=>ce.show));try{return await pt.post(`${Bi}/diagram/formData`,{source:b,dataViewId:w,plugin:"4",layer:T,chartType:"normalSelect",rangeIndexTypeGuid:P,type:p==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:N.labelField,valueField:N.valueField,pageId:U,sqlConditions:F,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ae},{headers:{Authentication:(Z=window==null?void 0:window.config)==null?void 0:Z.indicatorToken,operateContext:Ti}})}catch(ce){console.error(ce)}finally{}}else try{return await pt.post(`${Bi}/diagram`,{source:b,dataViewId:w,plugin:A,layer:T,chartType:D,classification:M,series:H,indicatorList:Q,queryColumns:v?[]:V,pageFlag:!0,pageId:U,sqlConditions:F.map(ae=>{const{fieldValue:ce}=ae,ve={};return ce&&Array.isArray(ce)&&(ve.fieldValue=JSON.stringify(ce)),{...ae,...ve}}),idxLibMode:z,preview:j,rowHeaders:q,keyName:e.keyName},{headers:{Authentication:(oe=window==null?void 0:window.config)==null?void 0:oe.indicatorToken,operateContext:Ti}})}catch(ee){console.error(ee)}finally{}}},Jc=()=>{const o=window.location.search.slice(1).split("&"),n=o.length,a={};for(let i=0;i<n;i++){const r=o[i];if(r==null||r==="")continue;const s=r.split("=");if(Array.isArray(s)){const l=s[0];a[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},Xc=t.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...Wn},setup(e){const{width:o,height:n}=t.inject(Pe,{width:null,height:null}),a=t.inject("setPageHeight",b=>{}),i=t.inject("isMobile",!1),r=t.computed(()=>{const b={};return i||(b.width=o.value,b.height=n.value),{...b,backgroundColor:e.backgroundColor,backgroundImage:mt(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=t.ref(0),l=t.ref(0),d=t.ref(0),c=t.ref(0),u=t.ref(!1),y=t.ref();let f;const x=()=>new Promise(b=>{t.nextTick(()=>{o.value&&n.value?(s.value=parseFloat(o.value),l.value=parseFloat(n.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),b()})}),m=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${d.value}px`,y.value.style.height=`${c.value}px`)};t.watch([o,n],async()=>{await x(),m(),g(),window.addEventListener("resize",C),p(),u.value=!0},{immediate:!0});const h=t.ref({});t.provide("scaleValue",h);const g=()=>{if(i){y.value.style.width="100%",y.value.style.height="auto",a("auto");return}const b=document.body.clientWidth,w=document.body.clientHeight,A=s.value||d.value,T=l.value||c.value,D=b/A;let O=w/T;(s.value!==1920||l.value!==1080)&&(O=l.value/s.value*b/T),h.value={widthScale:D,heightScale:O},y.value&&(y.value.style.transform=`scale(${D}, ${O})`),a(O)},C=Le.debounce(async()=>{await x(),g()},100),p=()=>{const b=window.MutationObserver;f=new b(C),f.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},v=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return t.onMounted(()=>{u.value=!1}),t.onUnmounted(()=>{window.removeEventListener("resize",C),v()}),{style:r,container:y,ready:u}}}),ch="",ed={id:"container",ref:"container"};function td(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",ed,[e.ready?(t.openBlock(),t.createElementBlock("div",{key:0,class:"page-config",style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],512)}const Fr=Ce(xe(Xc,[["render",td],["__scopeId","data-v-b496b36e"]])),Mo={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:""},zo=Ae(Mo),nd=t.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...zo},setup(e,{expose:o}){Jc();const n=t.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=t.ref(),i=()=>{a.value.setAttribute("datav-theme",e.theme)},r=t.inject("usedComponentList",[]);t.watch(()=>e.theme,()=>{i()}),t.onMounted(()=>{i()});const s=t.computed(()=>_e(e.contextRequestUrl)),l=t.computed(()=>e.pageMode),d=t.computed(()=>e.theme),c=t.computed(()=>e.width),u=t.computed(()=>e.height),y=t.computed(()=>e.pageFontFamily),f=t.ref("");t.provide(Pe,{contextRequestUrl:s,pageMode:l,theme:d,touchEventId:f,width:c,height:u,fontFamily:y});const x=t.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});t.provide("setPageHeight",U=>{let J=U;n.value||(J=parseFloat(u.value)*U+"px"),x.value.height=J}),t.provide("isMobile",n.value),t.provide("getContainerMap",()=>e.containerMap),t.provide("getCombinationMap",()=>e.combinationMap);const m=t.ref(),h=new Map;console.log("globalModel",h);const g=U=>h.get(U),C=(U,J)=>{m.value=J,h.set(U,J)},p=()=>{m.value=null},v=U=>{let J=U;if(J){const re=U.match(/\{(.+?)\}/g);if(re!=null&&re.length){let ne=re[0].slice(1,-1).trim();const se=ne.match(/\[(.+?)\]/g);let Z="";se!=null&&se.length&&(ne=ne.replace(se[0],""),Z=se[0].slice(1,-1).trim());const oe=t.unref(r).find(ee=>ee.keyName===ne);if(oe){const ee=g(oe.id),{type:ae,value:ce,RECORD:ve,recordData:we}=ee||{};ct(ae,Di)?J=ve[Z]:ct(ae,"select")?J=we[Z]:J=ce}else J=""}}return J},b=new Map,w=U=>b.get(U),A=(U,J)=>{b.set(U,J)};t.provide(Ie,{getGlobalModel:g,setGlobalModel:C,clearInteractiveData:p,getRecordValueByKeyName:v,getRequestData:w,setRequestData:A,interactiveData:m});const T=t.ref({}),D=(U,J)=>{T.value[U]=J};t.provide(kt,{loadedData:T,setLoadedData:D});const O=[],I=()=>{O.pop()},_=U=>{O.push(U)},L=new Map,k=U=>L.get(U),R=(U,J)=>{L.set(U,J)};t.provide(ki,{popUseModalIds:I,pushUseModalIds:_,getModalModel:k,setModalModel:R});const B=rs(),S=new Set,E=(U,J)=>{S.add(U),B.on(U,re=>{const{eventName:ne,params:se}=re;return typeof J[ne]=="function"&&J[ne](se)}),t.onBeforeUnmount(()=>{N(U)})},N=U=>{S.delete(U),B.off(U)},z=(U,J,re={})=>{if(U==="PAGE"){const ne=O.length;let se=[];if(ne===0)se=[...S];else{const Z=O[ne-1];se=[...k(Z)]}se.forEach(Z=>{B.emit(Z,{eventName:J,params:re})})}else B.emit(U,{eventName:J,params:re})};t.provide(Gn,{onEvent:E,offEvent:N,emitEvent:z});const j=t.ref(0),F=()=>{j.value=t.unref(j)+1};t.provide(Ai,{requestToken:F});const M=new Map,P=new Map,H=({requestFn:U=()=>{},sortNum:J=0,id:re=""})=>{if(M.has(J)){const ne=M.get(J);ne==null||ne.push(U)}else M.set(J,[U]);P.set(re,U)},Q=U=>new Promise((J,re)=>{const ne=U.map(se=>se());Promise.all(ne).then(se=>{J(se)}).catch(se=>{re(se)})}),V=U=>new Promise(async(J,re)=>{if(U){if(typeof U=="string"){const ne=P.get(U);if(typeof ne=="function"){const se=pt.interceptors.response.use(Z=>(J(Z),Z),Z=>(re(Z),Promise.reject(Z)));ne(),pt.interceptors.response.eject(se)}}}else{const ne=Array.from(M);ne.sort((Z,oe)=>oe[0]-Z[0]);const se=ne.length;try{e.pageMode!=="design"&&t.unref(j)>0;for(let Z=0;Z<se;Z++){const oe=ne[Z][1];await Q(oe)}}catch(Z){console.error(Z)}finally{M.clear(),J(null)}}});t.provide(ze,{setRequest:H,touchRequest:V});const q=()=>{B.emit(an)};t.provide(an,{emitRefreshPage:q});const $=U=>{B.on(an,()=>U()),t.onMounted(()=>{B.off(an)})};return t.watch(r,U=>{if(U!=null&&U.length&&t.unref(l)!=="design"){const{jumpType:J,jumpTime:re,jumpPage:ne,jumpLink:se}=e;if(re!=null&&re.value){let Z=0;switch(re==null?void 0:re.suffix){case"hours":Z=re.value*60*60*1e3;break;case"minute":Z=re.value*60*1e3;break;case"seconds":Z=re.value*1e3;break}setTimeout(()=>{let oe="";J==="page"&&ne?oe=Fo(t.unref(l),ne):J==="link"&&se&&(oe=se),oe=_e(oe),window.open(oe,"_self")},Z)}}}),t.onBeforeUnmount(()=>{M==null||M.clear(),P==null||P.clear()}),o({touchRequest:V,getGlobalModel:g,onRefreshPage:$}),{providerConfig:a,configStyle:x}}}),fh="";function od(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:t.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const Mr=Ce(xe(nd,[["render",od],["__scopeId","data-v-599671e5"]])),Po={...De,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:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1},qo=Ae(Po),zr=["refreshData","click","valueChange"],Vo="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=",Ho="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==",jo=t.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...qo},setup(e,{expose:o}){const n=t.ref(!1),a=Ee(e),i=t.ref({}),r=t.computed(()=>e.variableFontSize||"14px"),s=t.computed(()=>"-"+t.unref(r));t.watch(()=>[e.data,e.dataType],([R,B])=>{B==="static"&&(i.value=R)},{immediate:!0});const{getGlobalModel:l,setGlobalModel:d,getRecordValueByKeyName:c,getRequestData:u}=t.inject(Ie,{getGlobalModel:R=>{},setGlobalModel:(R,B)=>{},getRecordValueByKeyName:R=>{},getRequestData:R=>{}}),{setLoadedData:y}=t.inject(kt,{setLoadedData:(R,B)=>{}}),f=t.computed(()=>{let R="";if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:N}=e;R+=`background: linear-gradient(${E}, ${N}, ${B||"transparent"} ${S*100}%);-webkit-background-clip: text;color: transparent;`}return R}),x=t.computed(()=>{const R={};if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:N}=e,z=B||"transparent";R.background=`linear-gradient(${E}, ${N}, ${z} ${S*100}%)`,R["-webkit-background-clip"]="text",R.color="transparent"}return R}),m=t.computed(()=>{var F;if(t.unref(n))return"NaN";const R=t.unref(i),B=e.increaseColor||e.color,S=e.declineColor||e.color;let E=e.text;E=E==null?void 0:E.replace(/\n|\\n/g,"<br/>"),E=E==null?void 0:E.replace(/\s(?!\{) | (?!\})\s/g," ");const N=E.match(/\{(.+?)\}/g)||[];let z="";const j=e.showEllipsis?"show-ellipsis":"";if(N==null||N.length===0){if(E&&e.format==="percentage"&&!isNaN(+E)){const M=parseFloat(E),P=M*100,H=h(P.toFixed(2));M>=0?E=`<span class="${j}" style="color: ${H||B||"#ED6643"};font-size:${t.unref(r)};display: inline-block;${t.unref(f)}">
|
|
99
|
+
`;let r=e;if(n!=null&&n.length){for(const l of n){const d=_e(l,{textData:o},{useNewline:!1,useSpace:!1});d&&(r=r.replace(l,d))}return`${i}{text|${r}}`}else return e},Or=(e,o)=>{const{props:n,componentList:a,getGlobalModel:i}=e,{graphicConfig:r={},startValue:s,endValue:l}=n,d=Zc({graphicConfig:r,startValue:s,endValue:l,componentList:a,getGlobalModel:i}),{dimensions:c,dataset:u}=o,{classificationList:y=[]}=r,x=y.find(m=>m.show).label||"";for(const m of d)c.includes(m)||c.push(m);c.sort((m,h)=>pe(m).isBefore(pe(h))?-1:1);for(const m of u){const{data:h}=m;if(h!=null&&h.length){const g=[];for(const C of d)if(h.find(p=>p[x]!==C)){const p=Le.cloneDeep(h[0]);for(const v in p)v===x?p[v]=C:p[v]=0;g.push(p)}m.data.push(...g),m.data.sort((C,p)=>pe(C[x]).isBefore(pe(p[x]))?-1:1)}}},cn=e=>{const o=[];for(const n of e)n.conditions?o.push(...cn(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o};function Zc(e){const{startValue:o,endValue:n,componentList:a,graphicConfig:i,getGlobalModel:r}=e,s=Nr(o),l=Nr(n),d=[];if(s&&l){const c=a.find(y=>y.keyName===s.keyName),u=a.find(y=>y.keyName===l.keyName);if(c&&u){const y=r(c.id),f=r(u.id),{classificationList:x=[]}=i,m=x.find(h=>h.show);if(m){let h="YYYY-MM";switch(m.name){case"the_year":h="YYYY";break;case"the_month":h="MM";break;case"the_day":h="DD";break;case"the_date":h=(m==null?void 0:m.dateFormat)||h;break}const g=Qc(h);if(h){const C=t.unref(y[s.field]),p=t.unref(f[l.field]);let v=pe(C);const b=pe(p);for(d.push(b.format(h));v.isBefore(b);)d.push(v.format(h)),v=v.add(1,g)}}}}return d}function Nr(e){let o=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let a=n[0].slice(1,-1).trim();const i=a.match(/\[(.+?)\]/g);let r="";i!=null&&i.length&&(a=a.replace(i[0],""),r=i[0].slice(1,-1).trim()),o={keyName:a,field:r}}}return o}function Qc(e){const o=e.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const dn=(e,o)=>{const n={dayjs:pe,...o};let a="";const i=[];for(const l in n)a+=`${l},`,i.push(n[l]);a=a.replace(/,$/,"");const r=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${r})`)()(...i)}catch{return e}return s},_e=(e="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:i=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(y);for(let x=0;x<f.length;x++){const m=f[x],h=s[m];h!=null&&typeof h!="function"&&(u=u.replace(m,h))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=dn(u,n)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},qe=(e,o=()=>{})=>{const{requestUrl:n,requestMethod:a,requestHeaders:i,requestParams:r,requestInterval:s,isOpenRequestTimer:l}=e,{contextRequestUrl:d,touchEventId:c}=t.inject(Pe,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:u}=t.inject(Ie,{getGlobalModel:m=>{}}),y=_e(n),f=async(m={})=>{if(!y||!a||!i)return;let h={};r.forEach(b=>{const{key:w,value:A}=b;if(typeof A=="object"&&A!=null&&A.id){let T={};const{id:D,prop:O,propKey:I,operate:_}=A;D==="THIS"?T=u(t.unref(c))||{}:T=u(D)||{};const L=t.unref(T[O]);let k=null;if(["date","range"].some(B=>ct(T==null?void 0:T.type,B))){const{value:B,type:S,mode:E}=_||{};if(B&&S&&E)switch(S){case"add":k=t.unref(L).add(B,E);break;case"minus":k=t.unref(L).subtract(B,E);break}k==null&&(k=t.unref(L)),k=(k==null?void 0:k.format((I==null?void 0:I.trim())||T.format))||""}else Object.prototype.toString.call(L)==="[object Object]"?I?k=L[I]:k=O?L[O]:L:ct(T==null?void 0:T.type,"select")&&t.unref(L)&&O&&Array.isArray(t.unref(L))?k=t.unref(L).map(B=>Object.prototype.hasOwnProperty.call(B,O)?B[O]:B):k=L;h[w]=k}else typeof A=="string"&&(h[w]=_e(A))}),h={...window.config.requestParams,...m,...h};let g="";const C=Object.keys(h),p=C.length-1,v=C.length;C.forEach((b,w)=>{let A=h[b];Object.prototype.toString.call(A)==="[object Object]"&&(A=JSON.stringify(A)),w===0?v!==1?g+=`?${b}=${A}&`:g+=`?${b}=${A}`:w===p?g+=`${b}=${A}`:g+=`${b}=${A}&`});try{const b=["get","head"].includes(a),w={};let A=b?y+g:y;h.dataSqlId&&!A.includes("dataSqlId")&&(A+=`${A.includes("?")?"&":"?"}dataSqlId=${h.dataSqlId}`),Object.prototype.hasOwnProperty.call(h,"signal")&&(w.signal=h.signal);const T=await pt({baseURL:t.unref(d)||"",url:A,method:a,headers:i,data:b?{}:h,...w});return o(T),T}catch(b){console.error(b)}},x=l&&setInterval(f,s*1e3);return t.onUnmounted(()=>{clearInterval(x)}),f},Dt=(e=[],o,n=!1)=>{let{name:a="name",types:i=[]}=o||{};a=(a==null?void 0:a.trim())||a;const r=new Set,s=new Map,l=e.length,d=i.length;if(l===1&&!n){const y=[];for(let x=0;x<d;x++){const m=i[x],{label:h,value:g}=m,C={...e[0],value:e[0][g]};r.add(h),y.push(C)}const f=e[0][a]||"";s.set(f,y)}else for(let y=0;y<l;y++){const f=e[y],x=f[a];r.add(x);for(let m=0;m<d;m++){const h=i[m],{label:g,value:C}=h,p={...f,value:f[C]||0};if(s.has(g)){const v=s.get(g);v.push(p),s.set(g,v)}else s.set(g,[p])}}const c=Array.from(r),u=[];for(const[y,f]of s)u.push({name:y,data:f});return{dimensions:c,dataset:u}},mt=(e,o=!1)=>{var a;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(n=`url(${n})`),n},Fo=(e,o)=>{const n=`${Ei}/preview?pageId=${o}`,a=`${Ei}/${o}`;return e==="preview"?n:a},ft=(e,o)=>{var i;if(e==null)return o;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let r=0;r<a;r++){const s=n[r];if(s==null||s==="")break;let l=(i=s.slice(1,-1))==null?void 0:i.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=dn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:o}=t.inject(Ai,{requestToken:()=>{}}),{setLoadedData:n}=t.inject(kt,{setLoadedData:(g,C)=>{}}),{getGlobalModel:a}=t.inject(Ie,{getGlobalModel:g=>{}});e.dataType==="indicator"&&o();const i=g=>{const{around:C,unit:p,id:v}=g;let b="";const{pageMode:w="",componentList:A=[]}=(e==null?void 0:e.graphicConfig)||{};let T=null,D=null;if(w==="design"){const O=A==null?void 0:A.find(S=>S.id===v);if(!O)return[];const{interval:I,intervalUnit:_,startTime:L,endTime:k,operate:R,useCurrentTime:B}=O||{};if(B&&(T=pe().subtract(I,_),D=pe()),L&&(T=pe(L)),k&&(D=pe(k)),R){const{type:S,value:E,mode:N}=R;switch(S){case"add":T=T&&T.add(E,N),D=D&&D.add(E,N);break;case"minus":T=T&&T.subtract(E,N),D=D&&D.subtract(E,N)}}}else{const O=a(v)||{};t.unref(O.startTime)&&(T=pe(t.unref(O.startTime))),t.unref(O.endTime)&&(D=pe(t.unref(O.endTime)))}if(T&&D){const O=D.diff(T,p.toLowerCase());b=`${C==="before"?"-":""}${O+1}`}return b?[b]:[]},r=(g,C)=>Object.prototype.hasOwnProperty.call(g,C),s=(g,C)=>{if(C)r(g,"indexCode")&&(g.hrpIndexCode=g.indexCode,delete g.indexCode),r(g,"indexCodeNum")&&(g.hrpIndexCodeNum=g.indexCodeNum,delete g.indexCodeNum),r(g,"dataType")&&delete g.dataType;else{const{calcWays:p=[],dateCalcTypes:v=[],activeKey:b,componentId:w=""}=g;if(b===5&&(p!=null&&p.length)&&(v!=null&&v.length)&&w){const A=p[0].split("-");(A==null?void 0:A.length)>1&&A[0]==="rangeValue"&&(g.calcWays=i({around:A[1],unit:v[0],id:w})),delete g.radioValue}r(g,"dataType")&&(g.fieldType==="DATE"&&(g.label=g.fieldName),g.dataType==="component"&&(g.fieldValue="${"+g.fieldValue+"}"),delete g.dataType),r(g,"activeKey")&&delete g.activeKey,r(g,"radioValue")&&delete g.radioValue,r(g,"indexCode")&&(g.hrpIndexCode=g.indexCode,delete g.indexCode),r(g,"indexCodeNum")&&(g.hrpIndexCodeNum=g.indexCodeNum,delete g.indexCodeNum),g.dataType!=="component"&&g.useCurrentTime&&(g.fieldValue=pe().format(g.dateFormat)),delete g.useCurrentTime}},l=(g,C)=>{const p=[];return g!=null&&g.length&&Le.cloneDeep(g).forEach(v=>{if(v.join&&v.conditions){const b=!v.conditions.some(w=>w.join&&w.conditions);v.conditions.forEach((w,A)=>{s(w,C);const T={};if(A<v.conditions.length-1&&(T.join=v.join),b)p.push({...T,...w});else if(w.join&&w.conditions){const D=C?"sqlConditions":"conditions";p.push({[D]:l([w],C),...T})}else p.push({...T,...w})})}else s(v,C),p.push(v)}),p},d=(g={},C)=>{if(g!=null&&g.sortCpnts&&C){const z=h(g);z&&(C.sort=z)}const{label:p,name:v,location:b,show:w,indexCode:A,indexCodeNum:T,calcType:D="COLUMN",builtInFormula:O,builtInValueSource:I,builtInCalcWay:_,formula:L,conditions:k,aggregate:R,distinct:B,dimByCount:S}=g;let E;if(k&&(E=l(k)),D==="COMPONENT"){const z={};return x(z,I),{label:p.trim(),columnName:v,show:w,calcType:D,componentAlias:_,componentValue:z.fieldValue||null}}const N={label:p.trim(),columnName:v,location:b,show:w,calcType:D,hrpIndexCode:A,hrpIndexCodeNum:T,aggregate:R,builtInFormula:O,builtInValueSource:I,formula:L,conditions:E};if(O==="DATE_OFFSET"){const z=_.split("-");if((z==null?void 0:z.length)===3){let j=z[0];return z[2]==="before"&&z[0]!=="0"&&(j=`-${z[0]}`),{...N,calcWays:[j],dateCalcTypes:[z[1]]}}}else return v==="the_count"&&(N.calcType="AGGREGATE",N.distinct=!!B,N.typeGuid=S),{...N,builtInCalcWay:_}},c=g=>{if(!g)return[];const C=Le.cloneDeep((g==null?void 0:g.controlList)||[]),{classificationList:p=[],rowHeaderList:v=[],dimensionList:b=[],seriesList:w=[],leftAxisList:A=[],rightAxisList:T=[],queryColumnList:D=[],indicators:O=[]}=g;f(C);const I=[...p,...v,...b,...w,...A,...T,...D,...O],_=[];for(const R of I){const B=cn((R==null?void 0:R.conditions)||[]);if(B!=null&&B.length){const S=B.filter(E=>(E==null?void 0:E.dataType)==="component").map(E=>{const N={};return E!=null&&E.dateFormat&&(N.format=E.dateFormat),{conditionKey:E.fieldName,conditionLabel:E.fieldName,conditionName:E.fieldName,conditionValueType:E.fieldType,id:E.componentId,keyName:E.fieldValue,rule:E.rule,notGlobal:!0,indexCode:E.indexCode,typeGuid:E.typeGuid,indexCodeNum:E.indexCodeNum,...N}});if(S!=null&&S.length)for(const E of S)_.find(N=>N.keyName===E.keyName)||_.push(E)}}const L=_.length,k=C;for(let R=0;R<L;R++){const B=_[R];if((B==null?void 0:B.conditionKey)==="parentCode")continue;const{id:S,keyName:E,prop:N,format:z,modelKey:j,dataType:F="component",customValue:M}=B,P=u(B);x(P,S,{prop:N,dateFormat:z,modelKey:j,keyName:E}),F===""&&(P.fieldValue=M||""),k.push(P)}for(let R=k.length-1;R>=0;R--){const B=k[R];B.globalCondition||cn(k).find(E=>E.alias===B.alias&&E.globalCondition)&&k.splice(R,1)}return k};function u(g){const{id:C,keyName:p,conditionLabel:v,conditionKey:b,conditionValueType:w,prop:A,rule:T="NONE",notGlobal:D=!1,indexCode:O,typeGuid:I,indexCodeNum:_,dataType:L="component"}=g;let k=p||C;k&&A&&(k+=`-${A}`);let R=T;return R==="NONE"&&(["startTime","endTime"].includes(A)?R=A==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":p!=null&&p.includes("startTime")?R=A==="GREATER_EQUAL":p!=null&&p.includes("endTime")?R=A==="LESS_EQUAL":R="EQUAL"),{rule:R,label:v,fieldName:b,fieldValue:"",valueType:w,alias:k,globalCondition:!D,indexCode:O,typeGuid:I,indexCodeNum:_,dataType:L}}const y=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function f(g){if(g!=null&&g.length)for(const C of g)if(C!=null&&C.conditions)f(C.conditions);else{const{id:p,keyName:v,prop:b,modelKey:w,format:A,dataType:T="component",customValue:D}=C,O=u(C);x(O,p,{prop:b,dateFormat:A,modelKey:w,keyName:v}),T===""&&(O.fieldValue=D||"");for(const I in O)C[I]=O[I];for(const I of y)delete C[I]}}function x(g,C,p){var R,B;const v=a(C)||{},{prop:b="",dateFormat:w="",modelKey:A="",keyName:T=""}=p||{},{value:D,format:O="YYYY-MM-DD",type:I="",useCurrentTime:_,RECORD:L}=v||{},k=w||O;if(ct(v.type,"date"))_?D?g.fieldValue=(R=t.unref(D))==null?void 0:R.format(k):g.fieldValue=pe().format(k):g.fieldValue=(B=t.unref(D))==null?void 0:B.format(k),g.dateFormat=k;else if(I==="ecanRangePicker"){let S=b;if(!b){const N=T&&T.split("-");N!=null&&N.length&&(S=N[N.length-1])}if(!S)return;let E=null;t.unref(v[S])&&(E=pe(t.unref(v[S]))),E&&(g.fieldValue=E==null?void 0:E.format(k)),g.dateFormat=k}else ct(I,Di)?A&&L?g.fieldValue=L[A]:!A&&L?g.fieldValue=L.value:g.fieldValue=t.unref(D):g.fieldValue=t.unref(D)}const m=g=>{if(g){const C=Le.cloneDeep(g);return g.defaultCode&&(C.label=C.columnName,delete C.defaultCode),C}else return g},h=g=>{const{sortCpnts:C=[]}=g;let p,v="";for(const b of C){const w=a(b)||{},{type:A,RECORD:T}=w;if(ct(A,"image")&&ct(T==null?void 0:T.value,["asc","desc"])){v=T.value.toUpperCase();break}}return v&&(p={label:g.label,columnName:g.name,order:v,type:"NORMAL"}),p};return async(g={})=>{var J,re,ne,se,Z,oe;n(e.id,!1);const{graphicConfig:C,type:p,isGroupTable:v=!1}=e;let{source:b,dataViewId:w,plugin:A="1",layer:T,chartType:D,classificationList:O=[],rowHeaderList:I=[],dimensionList:_=[],seriesList:L=[],leftAxisList:k=[],rightAxisList:R=[],queryColumnList:B=[],indicators:S=[],controlList:E=[],formFields:N={},idxLibMode:z,preview:j=!1}=C||{},F=[];if((C==null?void 0:C.pageMode)==="design"?F=(C.sqlConditions??[]).map(ee=>{const ae={};if(!r(ee,"globalCondition")&&!ee.join&&(ae.globalCondition=!0),!ee.join){const ce=ee.rule||"EQUAL";ae.rule=ce==="NONE"?"EQUAL":ce}return{...ee,...ae}}):F=c(C),F!=null&&F.length){const ee=F.filter(ce=>ce.globalCondition),ae=F.filter(ce=>!ce.globalCondition);(ee==null?void 0:ee.length)>1&&(F=[{join:"&&",conditions:ee},...ae])}F!=null&&F.length&&(F=l(F,"1")),T==null&&(ct(p,["table"])||ct(p,"list")&&(O==null?void 0:O.length)>1?T="1":ct(p,["select","checkbox","radio"])?T="3":T="2");let M,P="";if(Array.isArray(O)&&O.length>0&&(p!=="ecanList"||(O==null?void 0:O.length)===1)){const ee=O.length;for(let ae=0;ae<ee;ae++){const ce=O[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe,dateFormat:Qe,typeGuid:Ue="",truncations:We=[]}=ce;if(ke||ee===1){P=Ue,M={label:ve.trim(),columnName:we,show:ke,sort:h(ce)||m(Te)||Te,customGroup:Ve,conditions:l(Xe),typeGuid:Ue},Qe&&(M.dateFormat=Qe),we==="the_date"&&!M.dateFormat&&(M.dateFormat="YYYY-MM");const Ge={};if(Array.isArray(We)&&We.length>0){const et=We.length;for(let tt=0;tt<et;tt++){const $e=We[tt]||{},{rule:Je="",num:ut=0,name:yt=""}=$e;Je&&ut&&(Ge.num=ut,Ge.rule=Je,yt&&(Ge.otherGroupName=yt))}}(J=Object.keys(Ge))!=null&&J.length&&(M.truncation=Ge);break}}}let H;if(Array.isArray(L)&&L.length>0){const ee=L.length;for(let ae=0;ae<ee;ae++){const ce=L[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe}=ce;if(ke||ee===1){H={label:ve.trim(),columnName:we,show:ke,sort:Te,customGroup:Ve,conditions:l(Xe)};break}}}const Q=[];k==null||k.forEach(ee=>{ee.location="LEFT",Q.push(d(ee,M))}),R==null||R.forEach(ee=>{ee.location="RIGHT",Q.push(d(ee,M))}),S==null||S.forEach(ee=>{ee.location="LEFT",Q.push(d(ee,M))});const V=[];p==="ecanList"&&(O==null?void 0:O.length)>1&&(B=O),B==null||B.forEach(ee=>{const{label:ae,name:ce,location:ve,show:we,indexCode:ke,sort:Te,typeGuid:Ve,indexCodeNum:Xe}=ee;let Qe=Te;if(g.sort){const{field:Ue,order:We}=g.sort;let Ge=Q.find(et=>et.label===Ue);!Ge&&ae===Ue&&(Ge=ee),Ge&&(Qe={columnName:Ge.columnName,label:g.sort.field,order:We.toUpperCase(),type:"NORMAL"})}V.push({label:ae,columnName:ce,location:ve,show:we,sort:Qe,calcType:"COLUMN",hrpIndexCode:ke,hrpIndexCodeNum:Xe,typeGuid:Ve})});const q=[];let $=[];if(Array.isArray(I)&&I.length>0?$=I:Array.isArray(_)&&_.length>0&&($=_),$!=null&&$.length){const ee=$.length;for(let ae=0;ae<ee;ae++){const ce=$[ae]||{},{label:ve="",name:we="",show:ke=!1,sort:Te,customGroup:Ve,conditions:Xe,truncations:Qe,typeGuid:Ue="",dateFormat:We}=ce;let Ge=Te;if(g.sort){const{field:$e,order:Je}=g.sort;let ut=Q.find(yt=>yt.label===$e);!ut&&ce.label===$e&&(ut=ce),ut&&(Ge={columnName:ut.columnName,label:g.sort.field,order:Je.toUpperCase(),type:"NORMAL"})}const et={label:ve.trim(),columnName:we,show:ke,sort:Ge,customGroup:Ve,conditions:l(Xe),typeGuid:Ue};We&&(et.dateFormat=We),we==="the_date"&&!et.dateFormat&&(et.dateFormat="YYYY-MM");const tt={};if(Array.isArray(Qe)&&Qe.length>0){const $e=Qe.length;for(let Je=0;Je<$e;Je++){const ut=Qe[Je]||{},{rule:yt="",num:W=0,name:K=""}=ut;yt&&W&&(tt.num=W,tt.rule=yt,K&&(tt.otherGroupName=K))}}(re=Object.keys(tt))!=null&&re.length&&(et.truncation=tt),q.push(et)}}if(ct(p,["text","proportion","counter"])&&(D="zb"),v){if(q.length===0||Q.length===0)return;D="grouptable"}else{if(T==="1"&&V.length===0)return;if(T==="2"&&Q.length===0)return;if(T==="3"&&(!P||!N.labelField||!N.valueField))return;if(T==="3"&&p==="ecanDataSelect"&&Q.length===0)return}_!=null&&_.length&&(T="1",D="grouptable");let U=(ne=window==null?void 0:window.config)==null?void 0:ne.pageId;if(!U){const{pathname:ee}=window==null?void 0:window.location;if(ee){const ae=ee.split("/");ae!=null&&ae.length&&(U=ae[ae.length-1])}}if((se=Object.keys(N))!=null&&se.length){const ee=cn(E).find(ce=>ce.conditionKey==="parentCode"),ae={};if(ee){const ce=a(ee.id)||{};if(ce!=null&&ce.itemCodes)ae.parentItemCodes=ce.itemCodes;else return}p==="ecanDataSelect"&&(ae.indicatorList=Q.filter(ce=>ce.show));try{return await pt.post(`${Bi}/diagram/formData`,{source:b,dataViewId:w,plugin:"4",layer:T,chartType:"normalSelect",rangeIndexTypeGuid:P,type:p==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:N.labelField,valueField:N.valueField,pageId:U,sqlConditions:F,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ae},{headers:{Authentication:(Z=window==null?void 0:window.config)==null?void 0:Z.indicatorToken,operateContext:Ti}})}catch(ce){console.error(ce)}finally{}}else try{return await pt.post(`${Bi}/diagram`,{source:b,dataViewId:w,plugin:A,layer:T,chartType:D,classification:M,series:H,indicatorList:Q,queryColumns:v?[]:V,pageFlag:!0,pageId:U,sqlConditions:F.map(ae=>{const{fieldValue:ce}=ae,ve={};return ce&&Array.isArray(ce)&&(ve.fieldValue=JSON.stringify(ce)),{...ae,...ve}}),idxLibMode:z,preview:j,rowHeaders:q,keyName:e.keyName},{headers:{Authentication:(oe=window==null?void 0:window.config)==null?void 0:oe.indicatorToken,operateContext:Ti}})}catch(ee){console.error(ee)}finally{}}},Jc=()=>{const o=window.location.search.slice(1).split("&"),n=o.length,a={};for(let i=0;i<n;i++){const r=o[i];if(r==null||r==="")continue;const s=r.split("=");if(Array.isArray(s)){const l=s[0];a[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},Xc=t.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...Wn},setup(e){const{width:o,height:n}=t.inject(Pe,{width:null,height:null}),a=t.inject("setPageHeight",b=>{}),i=t.inject("isMobile",!1),r=t.computed(()=>{const b={};return i||(b.width=o.value,b.height=n.value),{...b,backgroundColor:e.backgroundColor,backgroundImage:mt(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=t.ref(0),l=t.ref(0),d=t.ref(0),c=t.ref(0),u=t.ref(!1),y=t.ref();let f;const x=()=>new Promise(b=>{t.nextTick(()=>{o.value&&n.value?(s.value=parseFloat(o.value),l.value=parseFloat(n.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),b()})}),m=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${d.value}px`,y.value.style.height=`${c.value}px`)};t.watch([o,n],async()=>{await x(),m(),g(),window.addEventListener("resize",C),p(),u.value=!0},{immediate:!0});const h=t.ref({});t.provide("scaleValue",h);const g=()=>{if(i){y.value.style.width="100%",y.value.style.height="auto",a("auto");return}const b=document.body.clientWidth,w=document.body.clientHeight,A=s.value||d.value,T=l.value||c.value,D=b/A;let O=w/T;(s.value!==1920||l.value!==1080)&&(O=l.value/s.value*b/T),h.value={widthScale:D,heightScale:O},y.value&&(y.value.style.transform=`scale(${D}, ${O})`),a(O)},C=Le.debounce(async()=>{await x(),g()},100),p=()=>{const b=window.MutationObserver;f=new b(C),f.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},v=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return t.onMounted(()=>{u.value=!1}),t.onUnmounted(()=>{window.removeEventListener("resize",C),v()}),{style:r,container:y,ready:u}}}),ch="",ed={id:"container",ref:"container"};function td(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",ed,[e.ready?(t.openBlock(),t.createElementBlock("div",{key:0,class:"page-config",style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],512)}const Fr=Ce(xe(Xc,[["render",td],["__scopeId","data-v-b496b36e"]])),Mo={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:""},zo=Ae(Mo),nd=t.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...zo},setup(e,{expose:o}){Jc();const n=t.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=t.ref(),i=()=>{a.value.setAttribute("datav-theme",e.theme)},r=t.inject("usedComponentList",[]);t.watch(()=>e.theme,()=>{i()}),t.onMounted(()=>{i()});const s=t.computed(()=>_e(e.contextRequestUrl)),l=t.computed(()=>e.pageMode),d=t.computed(()=>e.theme),c=t.computed(()=>e.width),u=t.computed(()=>e.height),y=t.computed(()=>e.pageFontFamily),f=t.ref("");t.provide(Pe,{contextRequestUrl:s,pageMode:l,theme:d,touchEventId:f,width:c,height:u,fontFamily:y});const x=t.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});t.provide("setPageHeight",U=>{let J=U;n.value||(J=parseFloat(u.value)*U+"px"),x.value.height=J}),t.provide("isMobile",n.value),t.provide("getContainerMap",()=>e.containerMap),t.provide("getCombinationMap",()=>e.combinationMap);const m=t.ref(),h=new Map;console.log("globalModel",h);const g=U=>h.get(U),C=(U,J)=>{m.value=J,h.set(U,J)},p=()=>{m.value=null},v=U=>{let J=U;if(J){const re=U.match(/\{(.+?)\}/g);if(re!=null&&re.length){let ne=re[0].slice(1,-1).trim();const se=ne.match(/\[(.+?)\]/g);let Z="";se!=null&&se.length&&(ne=ne.replace(se[0],""),Z=se[0].slice(1,-1).trim());const oe=t.unref(r).find(ee=>ee.keyName===ne);if(oe){const ee=g(oe.id),{type:ae,value:ce,RECORD:ve,recordData:we}=ee||{};ct(ae,Di)?J=ve[Z]:ct(ae,"select")?J=we[Z]:J=ce}else J=""}}return J},b=new Map,w=U=>b.get(U),A=(U,J)=>{b.set(U,J)};t.provide(Ie,{getGlobalModel:g,setGlobalModel:C,clearInteractiveData:p,getRecordValueByKeyName:v,getRequestData:w,setRequestData:A,interactiveData:m});const T=t.ref({}),D=(U,J)=>{T.value[U]=J};t.provide(kt,{loadedData:T,setLoadedData:D});const O=[],I=()=>{O.pop()},_=U=>{O.push(U)},L=new Map,k=U=>L.get(U),R=(U,J)=>{L.set(U,J)};t.provide(ki,{popUseModalIds:I,pushUseModalIds:_,getModalModel:k,setModalModel:R});const B=rs(),S=new Set,E=(U,J)=>{S.add(U),B.on(U,re=>{const{eventName:ne,params:se}=re;return typeof J[ne]=="function"&&J[ne](se)}),t.onBeforeUnmount(()=>{N(U)})},N=U=>{S.delete(U),B.off(U)},z=(U,J,re={})=>{if(U==="PAGE"){const ne=O.length;let se=[];if(ne===0)se=[...S];else{const Z=O[ne-1];se=[...k(Z)]}se.forEach(Z=>{B.emit(Z,{eventName:J,params:re})})}else B.emit(U,{eventName:J,params:re})};t.provide(Gn,{onEvent:E,offEvent:N,emitEvent:z});const j=t.ref(0),F=()=>{j.value=t.unref(j)+1};t.provide(Ai,{requestToken:F});const M=new Map,P=new Map,H=({requestFn:U=()=>{},sortNum:J=0,id:re=""})=>{if(M.has(J)){const ne=M.get(J);ne==null||ne.push(U)}else M.set(J,[U]);P.set(re,U)},Q=U=>new Promise((J,re)=>{const ne=U.map(se=>se());Promise.all(ne).then(se=>{J(se)}).catch(se=>{re(se)})}),V=U=>new Promise(async(J,re)=>{if(U){if(typeof U=="string"){const ne=P.get(U);if(typeof ne=="function"){const se=pt.interceptors.response.use(Z=>(J(Z),Z),Z=>(re(Z),Promise.reject(Z)));ne(),pt.interceptors.response.eject(se)}}}else{const ne=Array.from(M);ne.sort((Z,oe)=>oe[0]-Z[0]);const se=ne.length;try{e.pageMode!=="design"&&t.unref(j)>0;for(let Z=0;Z<se;Z++){const oe=ne[Z][1];await Q(oe)}}catch(Z){console.error(Z)}finally{M.clear(),J(null)}}});t.provide(ze,{setRequest:H,touchRequest:V});const q=()=>{B.emit(an)};t.provide(an,{emitRefreshPage:q});const $=U=>{B.on(an,()=>U()),t.onMounted(()=>{B.off(an)})};return t.watch(r,U=>{if(console.log("list",U),console.log("pageMode",t.unref(l)),console.log("props",t.unref(e)),U!=null&&U.length&&t.unref(l)!=="design"){const{jumpType:J,jumpTime:re,jumpPage:ne,jumpLink:se}=e;if(re!=null&&re.value){let Z=0;switch(re==null?void 0:re.suffix){case"hours":Z=re.value*60*60*1e3;break;case"minute":Z=re.value*60*1e3;break;case"seconds":Z=re.value*1e3;break}setTimeout(()=>{let oe="";J==="page"&&ne?oe=Fo(t.unref(l),ne):J==="link"&&se&&(oe=se),oe=_e(oe),window.open(oe,"_self")},Z)}}}),t.onBeforeUnmount(()=>{M==null||M.clear(),P==null||P.clear()}),o({touchRequest:V,getGlobalModel:g,onRefreshPage:$}),{providerConfig:a,configStyle:x}}}),fh="";function od(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:t.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const Mr=Ce(xe(nd,[["render",od],["__scopeId","data-v-32e1771a"]])),Po={...De,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:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1},qo=Ae(Po),zr=["refreshData","click","valueChange"],Vo="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=",Ho="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==",jo=t.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...qo},setup(e,{expose:o}){const n=t.ref(!1),a=Ee(e),i=t.ref({}),r=t.computed(()=>e.variableFontSize||"14px"),s=t.computed(()=>"-"+t.unref(r));t.watch(()=>[e.data,e.dataType],([R,B])=>{B==="static"&&(i.value=R)},{immediate:!0});const{getGlobalModel:l,setGlobalModel:d,getRecordValueByKeyName:c,getRequestData:u}=t.inject(Ie,{getGlobalModel:R=>{},setGlobalModel:(R,B)=>{},getRecordValueByKeyName:R=>{},getRequestData:R=>{}}),{setLoadedData:y}=t.inject(kt,{setLoadedData:(R,B)=>{}}),f=t.computed(()=>{let R="";if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:N}=e;R+=`background: linear-gradient(${E}, ${N}, ${B||"transparent"} ${S*100}%);-webkit-background-clip: text;color: transparent;`}return R}),x=t.computed(()=>{const R={};if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:N}=e,z=B||"transparent";R.background=`linear-gradient(${E}, ${N}, ${z} ${S*100}%)`,R["-webkit-background-clip"]="text",R.color="transparent"}return R}),m=t.computed(()=>{var F;if(t.unref(n))return"NaN";const R=t.unref(i),B=e.increaseColor||e.color,S=e.declineColor||e.color;let E=e.text;E=E==null?void 0:E.replace(/\n|\\n/g,"<br/>"),E=E==null?void 0:E.replace(/\s(?!\{) | (?!\})\s/g," ");const N=E.match(/\{(.+?)\}/g)||[];let z="";const j=e.showEllipsis?"show-ellipsis":"";if(N==null||N.length===0){if(E&&e.format==="percentage"&&!isNaN(+E)){const M=parseFloat(E),P=M*100,H=h(P.toFixed(2));M>=0?E=`<span class="${j}" style="color: ${H||B||"#ED6643"};font-size:${t.unref(r)};display: inline-block;${t.unref(f)}">
|
|
100
100
|
<div class="percentage-img-box">
|
|
101
101
|
<img style="width: ${t.unref(r)};filter: ${`drop-shadow(${H||B||"#ED6643"} ${t.unref(r)} 0px)`};" src="${Vo}"/>
|
|
102
102
|
</div>
|