@ecan-bi/indicator-library 0.1.0 → 0.2.0
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 +320 -331
- package/dist/index.umd.js +4 -4
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@0.
|
|
2
|
-
(function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("vuedraggable"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","vuedraggable","ant-design-vue"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H["@ecan-bi/indicator-library"]={},H.Vue,H.LodashEs,H.Draggable,H.AntDesignVue))})(this,function(H,e,re,ut,Y){var pt;"use strict";const mt=(t,n)=>{if(t.install=o=>{for(const a of[t,...Object.values(n??{})])o.component(a.name,a)},n)for(const[o,a]of Object.entries(n))t[o]=a;return t},le="$request",Z=((pt=window==null?void 0:window.config)==null?void 0:pt.indicatorURL)||`${location.origin}/api/`,ee="INDICATOR_TOKEN",he="DATA_LIST",de="SELECTED_COMPONENT",Q="GRAPHIC_CONFIG",v="UPDATE_GRAPHIC_CONFIG",Me="SOURCE_TYPE",gt=e.defineComponent({name:"DataViewList",setup(){const t=e.inject(le),n=e.unref(e.inject(ee)),o=e.inject(Q),a=e.inject(v),r=e.computed(()=>{var g;return((g=e.unref(o))==null?void 0:g.dataViewId)||null}),l=e.ref([]),s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var h,f;const g=r.value,{data:y}=await t.post(`${Z}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:g,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});y.success&&((h=l.value)==null||h.push(s),l.value=(f=l.value)==null?void 0:f.concat(i([y.data.rows[0]],"YXJG")))},i=(g=[],y)=>{const h=[];return g.forEach(f=>{h.push({id:f.id,pId:y??f.parentId,value:f.id,title:f.name,isLeaf:f.leaf||!1,nature:f.nature,selectable:f.leaf||!1})}),h},d=async(g,y)=>{var V;let h=0;if(g){const{value:C}=g.dataRef;h=C}const{data:f}=await t.post(`${Z}/dataview/treetable`,{pageFlag:!0,parentId:h},{headers:{Authentication:n,operateContext:"ygt"}});f.success&&(l.value=(V=e.unref(l))==null?void 0:V.concat(i(f.data)),y&&e.unref(r)&&await c())},p=g=>{L(g),a({dataViewId:g,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:w}=e.inject(he,{setDataList:g=>{}}),O=e.ref([]),L=async g=>{if(!g)return;O.value=[];const y=await t.post(`${Z}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:g,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:h,data:f={}}=y.data;if(h){const{rows:V=[]}=f;V==null||V.forEach(C=>{var k;const N=((k=C==null?void 0:C.dataViewColumns)==null?void 0:k.map(M=>({...M,show:!0})))||[];O.value=[...e.unref(O),...N]}),w(e.unref(O))}},m=g=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[g],b=(g,y)=>{var h;(h=g.dataTransfer)==null||h.setData("list-item",JSON.stringify(y))};return e.onMounted(async()=>{await d(void 0,!0),L(e.unref(r))}),{dataViewId:r,handleLoadData:d,treeSelectData:l,dataViewList:O,onDataViewIdChange:p,mapGenericType:m,onDragstart:b}}}),ua="",P=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},ht={class:"data-view-list"},Ct={class:"columns"},yt=["onDragstart"],bt={class:"column-item-name"};function _t(t,n,o,a,r,l){const s=e.resolveComponent("a-tree-select");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(s,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"]),e.createElementVNode("div",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataViewList,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createElementVNode("div",{class:"column-item",draggable:!0,onDragstart:i=>t.onDragstart(i,c)},[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",bt,e.toDisplayString(c.name),1)],40,yt)]))),128))])])}const kt=P(gt,[["render",_t],["__scopeId","data-v-97e32d62"]]);function U(t,n){wt(t)&&(t="100%");var o=Nt(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function wt(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Nt(t){return typeof t=="string"&&t.indexOf("%")!==-1}function St(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function fe(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ce(t){return t.length===1?"0"+t:String(t)}function Ot(t,n,o){return{r:U(t,255)*255,g:U(n,255)*255,b:U(o,255)*255}}function ye(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function Et(t,n,o){var a,r,l;if(t=U(t,360),n=U(n,100),o=U(o,100),n===0)r=o,l=o,a=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;a=ye(c,s,t+1/3),r=ye(c,s,t),l=ye(c,s,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Tt(t,n,o){t=U(t,255),n=U(n,255),o=U(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),l=0,s=a,c=a-r,i=a===0?0:c/a;if(a===r)l=0;else{switch(a){case t:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-t)/c+2;break;case o:l=(t-n)/c+4;break}l/=6}return{h:l,s:i,v:s}}function Bt(t,n,o){t=U(t,360)*6,n=U(n,100),o=U(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),s=o*(1-r*n),c=o*(1-(1-r)*n),i=a%6,d=[o,s,l,l,c,o][i],p=[c,o,o,s,l,l][i],w=[l,l,c,o,o,s][i];return{r:d*255,g:p*255,b:w*255}}function Vt(t,n,o,a){var r=[Ce(Math.round(t).toString(16)),Ce(Math.round(n).toString(16)),Ce(Math.round(o).toString(16))];return a&&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 je(t){return G(t)/255}function G(t){return parseInt(t,16)}var Pe={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 ie(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,l=null,s=!1,c=!1;return typeof t=="string"&&(t=At(t)),typeof t=="object"&&(X(t.r)&&X(t.g)&&X(t.b)?(n=Ot(t.r,t.g,t.b),s=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):X(t.h)&&X(t.s)&&X(t.v)?(a=fe(t.s),r=fe(t.v),n=Bt(t.h,a,r),s=!0,c="hsv"):X(t.h)&&X(t.s)&&X(t.l)&&(a=fe(t.s),l=fe(t.l),n=Et(t.h,a,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=St(o),{ok:s,format:t.format||c,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:o}}var Lt="[-\\+]?\\d+%?",$t="[-\\+]?\\d*\\.\\d+%?",J="(?:".concat($t,")|(?:").concat(Lt,")"),be="[\\s|\\(]+(".concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")\\s*\\)?"),_e="[\\s|\\(]+(".concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")\\s*\\)?"),W={CSS_UNIT:new RegExp(J),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+_e),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+_e),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+_e),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 At(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(Pe[t])t=Pe[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=W.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=W.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=W.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=W.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=W.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=W.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=W.hex8.exec(t),o?{r:G(o[1]),g:G(o[2]),b:G(o[3]),a:je(o[4]),format:n?"name":"hex8"}:(o=W.hex6.exec(t),o?{r:G(o[1]),g:G(o[2]),b:G(o[3]),format:n?"name":"hex"}:(o=W.hex4.exec(t),o?{r:G(o[1]+o[1]),g:G(o[2]+o[2]),b:G(o[3]+o[3]),a:je(o[4]+o[4]),format:n?"name":"hex8"}:(o=W.hex3.exec(t),o?{r:G(o[1]+o[1]),g:G(o[2]+o[2]),b:G(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function X(t){return!!W.CSS_UNIT.exec(String(t))}var pe=2,xe=.16,Dt=.05,It=.05,Ft=.15,Ge=5,Re=4,Mt=[{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 Ue(t){var n=t.r,o=t.g,a=t.b,r=Tt(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function ue(t){var n=t.r,o=t.g,a=t.b;return"#".concat(Vt(n,o,a,!1))}function jt(t,n,o){var a=o/100,r={r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b};return r}function qe(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-pe*n:Math.round(t.h)+pe*n:a=o?Math.round(t.h)+pe*n:Math.round(t.h)-pe*n,a<0?a+=360:a>=360&&(a-=360),a}function ze(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-xe*n:n===Re?a=t.s+xe:a=t.s+Dt*n,a>1&&(a=1),o&&n===Ge&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function He(t,n,o){var a;return o?a=t.v+It*n:a=t.v-Ft*n,a>1&&(a=1),Number(a.toFixed(2))}function ke(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=ie(t),r=Ge;r>0;r-=1){var l=Ue(a),s=ue(ie({h:qe(l,r,!0),s:ze(l,r,!0),v:He(l,r,!0)}));o.push(s)}o.push(ue(a));for(var c=1;c<=Re;c+=1){var i=Ue(a),d=ue(ie({h:qe(i,c),s:ze(i,c),v:He(i,c)}));o.push(d)}return n.theme==="dark"?Mt.map(function(p){var w=p.index,O=p.opacity,L=ue(jt(ie(n.backgroundColor||"#141414"),ie(o[w]),O*100));return L}):o}var we={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"},Ne={},Se={};Object.keys(we).forEach(function(t){Ne[t]=ke(we[t]),Ne[t].primary=Ne[t][5],Se[t]=ke(we[t],{theme:"dark",backgroundColor:"#141414"}),Se[t].primary=Se[t][5]});var We=[],ce=[],Pt="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function xt(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Gt(t,n){if(n=n||{},t===void 0)throw new Error(Pt);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=We.indexOf(a);r===-1&&(r=We.push(a)-1,ce[r]={});var l;return ce[r]!==void 0&&ce[r][o]!==void 0?l=ce[r][o]:(l=ce[r][o]=xt(),o==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function Qe(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Rt(t,r,o[r])})}return t}function Rt(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Ut(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function qt(t,n){Ut(t,"[@ant-design/icons-vue] ".concat(n))}function Xe(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Oe(t,n,o){return o?e.h(t.tag,Qe({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return Oe(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Qe({key:n},t.attrs),(t.children||[]).map(function(a,r){return Oe(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function Je(t){return ke(t)[0]}function Ke(t){return t?Array.isArray(t)?t:[t]:[]}var zt=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@0.2.0 */
|
|
2
|
+
(function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("vuedraggable"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","vuedraggable","ant-design-vue"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H["@ecan-bi/indicator-library"]={},H.Vue,H.LodashEs,H.Draggable,H.AntDesignVue))})(this,function(H,e,ee,ut,Y){var pt;"use strict";const mt=(t,n)=>{if(t.install=o=>{for(const a of[t,...Object.values(n??{})])o.component(a.name,a)},n)for(const[o,a]of Object.entries(n))t[o]=a;return t},le="$request",Z=((pt=window==null?void 0:window.config)==null?void 0:pt.indicatorURL)||`${location.origin}/api/`,te="INDICATOR_TOKEN",he="DATA_LIST",de="SELECTED_COMPONENT",Q="GRAPHIC_CONFIG",v="UPDATE_GRAPHIC_CONFIG",Me="SOURCE_TYPE",gt=e.defineComponent({name:"DataViewList",setup(){const t=e.inject(le),n=e.unref(e.inject(te)),o=e.inject(Q),a=e.inject(v),r=e.computed(()=>{var g;return((g=e.unref(o))==null?void 0:g.dataViewId)||null}),l=e.ref([]),s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var h,f;const g=r.value,{data:y}=await t.post(`${Z}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:g,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});y.success&&((h=l.value)==null||h.push(s),l.value=(f=l.value)==null?void 0:f.concat(i([y.data.rows[0]],"YXJG")))},i=(g=[],y)=>{const h=[];return g.forEach(f=>{h.push({id:f.id,pId:y??f.parentId,value:f.id,title:f.name,isLeaf:f.leaf||!1,nature:f.nature,selectable:f.leaf||!1})}),h},d=async(g,y)=>{var V;let h=0;if(g){const{value:C}=g.dataRef;h=C}const{data:f}=await t.post(`${Z}/dataview/treetable`,{pageFlag:!0,parentId:h},{headers:{Authentication:n,operateContext:"ygt"}});f.success&&(l.value=(V=e.unref(l))==null?void 0:V.concat(i(f.data)),y&&e.unref(r)&&await c())},p=g=>{L(g),a({dataViewId:g,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:w}=e.inject(he,{setDataList:g=>{}}),O=e.ref([]),L=async g=>{if(!g)return;O.value=[];const y=await t.post(`${Z}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:g,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:h,data:f={}}=y.data;if(h){const{rows:V=[]}=f;V==null||V.forEach(C=>{var k;const N=((k=C==null?void 0:C.dataViewColumns)==null?void 0:k.map(M=>({...M,show:!0})))||[];O.value=[...e.unref(O),...N]}),w(e.unref(O))}},m=g=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[g],b=(g,y)=>{var h;(h=g.dataTransfer)==null||h.setData("list-item",JSON.stringify(y))};return e.onMounted(async()=>{await d(void 0,!0),L(e.unref(r))}),{dataViewId:r,handleLoadData:d,treeSelectData:l,dataViewList:O,onDataViewIdChange:p,mapGenericType:m,onDragstart:b}}}),ua="",P=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},ht={class:"data-view-list"},Ct={class:"columns"},yt=["onDragstart"],bt={class:"column-item-name"};function _t(t,n,o,a,r,l){const s=e.resolveComponent("a-tree-select");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(s,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"]),e.createElementVNode("div",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataViewList,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createElementVNode("div",{class:"column-item",draggable:!0,onDragstart:i=>t.onDragstart(i,c)},[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",bt,e.toDisplayString(c.name),1)],40,yt)]))),128))])])}const kt=P(gt,[["render",_t],["__scopeId","data-v-97e32d62"]]);function U(t,n){wt(t)&&(t="100%");var o=Nt(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function wt(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Nt(t){return typeof t=="string"&&t.indexOf("%")!==-1}function St(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function fe(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ce(t){return t.length===1?"0"+t:String(t)}function Ot(t,n,o){return{r:U(t,255)*255,g:U(n,255)*255,b:U(o,255)*255}}function ye(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function Et(t,n,o){var a,r,l;if(t=U(t,360),n=U(n,100),o=U(o,100),n===0)r=o,l=o,a=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;a=ye(c,s,t+1/3),r=ye(c,s,t),l=ye(c,s,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Tt(t,n,o){t=U(t,255),n=U(n,255),o=U(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),l=0,s=a,c=a-r,i=a===0?0:c/a;if(a===r)l=0;else{switch(a){case t:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-t)/c+2;break;case o:l=(t-n)/c+4;break}l/=6}return{h:l,s:i,v:s}}function Bt(t,n,o){t=U(t,360)*6,n=U(n,100),o=U(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),s=o*(1-r*n),c=o*(1-(1-r)*n),i=a%6,d=[o,s,l,l,c,o][i],p=[c,o,o,s,l,l][i],w=[l,l,c,o,o,s][i];return{r:d*255,g:p*255,b:w*255}}function Vt(t,n,o,a){var r=[Ce(Math.round(t).toString(16)),Ce(Math.round(n).toString(16)),Ce(Math.round(o).toString(16))];return a&&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 je(t){return G(t)/255}function G(t){return parseInt(t,16)}var Pe={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 ie(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,l=null,s=!1,c=!1;return typeof t=="string"&&(t=At(t)),typeof t=="object"&&(X(t.r)&&X(t.g)&&X(t.b)?(n=Ot(t.r,t.g,t.b),s=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):X(t.h)&&X(t.s)&&X(t.v)?(a=fe(t.s),r=fe(t.v),n=Bt(t.h,a,r),s=!0,c="hsv"):X(t.h)&&X(t.s)&&X(t.l)&&(a=fe(t.s),l=fe(t.l),n=Et(t.h,a,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=St(o),{ok:s,format:t.format||c,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:o}}var Lt="[-\\+]?\\d+%?",$t="[-\\+]?\\d*\\.\\d+%?",J="(?:".concat($t,")|(?:").concat(Lt,")"),be="[\\s|\\(]+(".concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")\\s*\\)?"),_e="[\\s|\\(]+(".concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")[,|\\s]+(").concat(J,")\\s*\\)?"),W={CSS_UNIT:new RegExp(J),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+_e),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+_e),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+_e),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 At(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(Pe[t])t=Pe[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=W.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=W.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=W.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=W.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=W.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=W.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=W.hex8.exec(t),o?{r:G(o[1]),g:G(o[2]),b:G(o[3]),a:je(o[4]),format:n?"name":"hex8"}:(o=W.hex6.exec(t),o?{r:G(o[1]),g:G(o[2]),b:G(o[3]),format:n?"name":"hex"}:(o=W.hex4.exec(t),o?{r:G(o[1]+o[1]),g:G(o[2]+o[2]),b:G(o[3]+o[3]),a:je(o[4]+o[4]),format:n?"name":"hex8"}:(o=W.hex3.exec(t),o?{r:G(o[1]+o[1]),g:G(o[2]+o[2]),b:G(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function X(t){return!!W.CSS_UNIT.exec(String(t))}var pe=2,xe=.16,Dt=.05,It=.05,Ft=.15,Ge=5,Re=4,Mt=[{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 Ue(t){var n=t.r,o=t.g,a=t.b,r=Tt(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function ue(t){var n=t.r,o=t.g,a=t.b;return"#".concat(Vt(n,o,a,!1))}function jt(t,n,o){var a=o/100,r={r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b};return r}function qe(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-pe*n:Math.round(t.h)+pe*n:a=o?Math.round(t.h)+pe*n:Math.round(t.h)-pe*n,a<0?a+=360:a>=360&&(a-=360),a}function ze(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-xe*n:n===Re?a=t.s+xe:a=t.s+Dt*n,a>1&&(a=1),o&&n===Ge&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function He(t,n,o){var a;return o?a=t.v+It*n:a=t.v-Ft*n,a>1&&(a=1),Number(a.toFixed(2))}function ke(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=ie(t),r=Ge;r>0;r-=1){var l=Ue(a),s=ue(ie({h:qe(l,r,!0),s:ze(l,r,!0),v:He(l,r,!0)}));o.push(s)}o.push(ue(a));for(var c=1;c<=Re;c+=1){var i=Ue(a),d=ue(ie({h:qe(i,c),s:ze(i,c),v:He(i,c)}));o.push(d)}return n.theme==="dark"?Mt.map(function(p){var w=p.index,O=p.opacity,L=ue(jt(ie(n.backgroundColor||"#141414"),ie(o[w]),O*100));return L}):o}var we={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"},Ne={},Se={};Object.keys(we).forEach(function(t){Ne[t]=ke(we[t]),Ne[t].primary=Ne[t][5],Se[t]=ke(we[t],{theme:"dark",backgroundColor:"#141414"}),Se[t].primary=Se[t][5]});var We=[],ce=[],Pt="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function xt(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Gt(t,n){if(n=n||{},t===void 0)throw new Error(Pt);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=We.indexOf(a);r===-1&&(r=We.push(a)-1,ce[r]={});var l;return ce[r]!==void 0&&ce[r][o]!==void 0?l=ce[r][o]:(l=ce[r][o]=xt(),o==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function Qe(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Rt(t,r,o[r])})}return t}function Rt(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Ut(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function qt(t,n){Ut(t,"[@ant-design/icons-vue] ".concat(n))}function Xe(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Oe(t,n,o){return o?e.h(t.tag,Qe({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return Oe(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Qe({key:n},t.attrs),(t.children||[]).map(function(a,r){return Oe(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function Je(t){return ke(t)[0]}function Ke(t){return t?Array.isArray(t)?t:[t]:[]}var zt=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
5
5
|
color: inherit;
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
transform: rotate(360deg);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`,Ye=!1,Ht=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zt;e.nextTick(function(){Ye||(typeof window<"u"&&window.document&&window.document.documentElement&&Gt(n,{prepend:!0}),Ye=!0)})},Wt=["icon","primaryColor","secondaryColor"];function Qt(t,n){if(t==null)return{};var o=Xt(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function Xt(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}function me(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Jt(t,r,o[r])})}return t}function Jt(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var se={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Kt(t){var n=t.primaryColor,o=t.secondaryColor;se.primaryColor=n,se.secondaryColor=o||Je(n),se.calculated=!!o}function Yt(){return me({},se)}var
|
|
56
|
+
`,Ye=!1,Ht=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zt;e.nextTick(function(){Ye||(typeof window<"u"&&window.document&&window.document.documentElement&&Gt(n,{prepend:!0}),Ye=!0)})},Wt=["icon","primaryColor","secondaryColor"];function Qt(t,n){if(t==null)return{};var o=Xt(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function Xt(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}function me(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Jt(t,r,o[r])})}return t}function Jt(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var se={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Kt(t){var n=t.primaryColor,o=t.secondaryColor;se.primaryColor=n,se.secondaryColor=o||Je(n),se.calculated=!!o}function Yt(){return me({},se)}var ne=function(n,o){var a=me({},n,o.attrs),r=a.icon,l=a.primaryColor,s=a.secondaryColor,c=Qt(a,Wt),i=se;if(l&&(i={primaryColor:l,secondaryColor:s||Je(l)}),Ht(),qt(Xe(r),"icon should be icon definiton, but got ".concat(r)),!Xe(r))return null;var d=r;return d&&typeof d.icon=="function"&&(d=me({},d,{icon:d.icon(i.primaryColor,i.secondaryColor)})),Oe(d.icon,"svg-".concat(d.name),me({},c,{"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};ne.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},ne.inheritAttrs=!1,ne.displayName="IconBase",ne.getTwoToneColors=Yt,ne.setTwoToneColors=Kt;const Ee=ne;function Zt(t,n){return nn(t)||tn(t,n)||en(t,n)||vt()}function vt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
57
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function en(t,n){if(t){if(typeof t=="string")return Ze(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Ze(t,n)}}function Ze(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function tn(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,s,c;try{for(o=o.call(t);!(r=(s=o.next()).done)&&(a.push(s.value),!(n&&a.length===n));r=!0);}catch(i){l=!0,c=i}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw c}}return a}}function nn(t){if(Array.isArray(t))return t}function ve(t){var n=Ke(t),o=Zt(n,2),a=o[0],r=o[1];return Ee.setTwoToneColors({primaryColor:a,secondaryColor:r})}function on(){var t=Ee.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var an=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function rn(t,n){return dn(t)||sn(t,n)||cn(t,n)||ln()}function ln(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cn(t,n){if(t){if(typeof t=="string")return et(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return et(t,n)}}function et(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function sn(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,s,c;try{for(o=o.call(t);!(r=(s=o.next()).done)&&(a.push(s.value),!(n&&a.length===n));r=!0);}catch(i){l=!0,c=i}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw c}}return a}}function dn(t){if(Array.isArray(t))return t}function tt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Te(t,r,o[r])})}return t}function Te(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function fn(t,n){if(t==null)return{};var o=pn(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function pn(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}ve("#1890ff");var ne=function(n,o){var a,r=tt({},n,o.attrs),l=r.class,s=r.icon,c=r.spin,i=r.rotate,d=r.tabindex,p=r.twoToneColor,w=r.onClick,O=fn(r,an),L=(a={anticon:!0},Te(a,"anticon-".concat(s.name),!!s.name),Te(a,l,l),a),m=c===""||c||s.name==="loading"?"anticon-spin":"",b=d;b===void 0&&w&&(b=-1,O.tabindex=b);var g=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,y=Ke(p),h=rn(y,2),f=h[0],V=h[1];return e.createVNode("span",tt({role:"img","aria-label":s.name},O,{onClick:w,class:L}),[e.createVNode(Ee,{class:m,icon:s,primaryColor:f,secondaryColor:V,style:g},null)])};ne.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},ne.displayName="AntdIcon",ne.inheritAttrs=!1,ne.getTwoToneColor=on,ne.setTwoToneColor=ve;const oe=ne;var un={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const mn=un;function nt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){gn(t,r,o[r])})}return t}function gn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Be=function(n,o){var a=nt({},n,o.attrs);return e.createVNode(oe,nt({},a,{icon:mn}),null)};Be.displayName="CaretDownOutlined",Be.inheritAttrs=!1;const hn=Be;var Cn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const yn=Cn;function ot(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){bn(t,r,o[r])})}return t}function bn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ve=function(n,o){var a=ot({},n,o.attrs);return e.createVNode(oe,ot({},a,{icon:yn}),null)};Ve.displayName="CaretRightOutlined",Ve.inheritAttrs=!1;const _n=Ve;var kn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const wn=kn;function at(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Nn(t,r,o[r])})}return t}function Nn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Le=function(n,o){var a=at({},n,o.attrs);return e.createVNode(oe,at({},a,{icon:wn}),null)};Le.displayName="CloseOutlined",Le.inheritAttrs=!1;const rt=Le;var Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const On=Sn;function lt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){En(t,r,o[r])})}return t}function En(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var $e=function(n,o){var a=lt({},n,o.attrs);return e.createVNode(oe,lt({},a,{icon:On}),null)};$e.displayName="DeleteOutlined",$e.inheritAttrs=!1;const Tn=$e;var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Vn=Bn;function it(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ln(t,r,o[r])})}return t}function Ln(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ae=function(n,o){var a=it({},n,o.attrs);return e.createVNode(oe,it({},a,{icon:Vn}),null)};Ae.displayName="PlusOutlined",Ae.inheritAttrs=!1;const $n=Ae;var An={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Dn=An;function ct(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){In(t,r,o[r])})}return t}function In(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var De=function(n,o){var a=ct({},n,o.attrs);return e.createVNode(oe,ct({},a,{icon:Dn}),null)};De.displayName="SettingOutlined",De.inheritAttrs=!1;const Fn=De,Mn=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:_n,CaretDownOutlined:hn},setup(){const t=e.inject(le),n=e.unref(e.inject(ee)),o=e.inject(de),a=e.computed(()=>{var b;return(b=e.unref(o))==null?void 0:b.graphicConfig}),r=e.computed(()=>{var b;return(b=e.unref(a))==null?void 0:b.dataSourceId}),l=e.ref([]),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),i=async()=>{const b={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),dataSourceId:e.unref(r)},g=await t.post(`${Z}/diagram/sourceList`,b,{headers:{Authentication:n,operateContext:"ygt"}}),{success:y,data:h={}}=g.data;if(y){const{rows:f=[],total:V=0}=h;f==null||f.forEach(C=>{var N;C.show=!1,(N=C.dataViewColumns)==null||N.forEach(k=>{k.show=!0,k.edit=!1})}),l.value=f,s.totalResult=+V}},d=b=>({DIM:"维度",IDX:"指标"})[b],p=b=>{l.value[b].show=!l.value[b].show},w=(b,g)=>{var y;(y=b.dataTransfer)==null||y.setData("list-item",JSON.stringify(g))},O=()=>{i()},L=re.debounce(()=>{i()},200),m=(b,g)=>{s.pageSize=g,s.currentPage=b,i()};return e.onMounted(()=>{i()}),{dataSourceList:l,pagination:s,onDragstart:w,onToggleGroup:p,mapScope:d,onSearch:O,onChange:L,onPaginationChange:m,searchText:c}}}),ma="",jn={class:"data-source-list"},Pn={class:"columns"},xn={class:"column-item"},Gn=["onClick"],Rn={key:0},Un=["onDragstart"],qn={class:"column-child-item-name"};function zn(t,n,o,a,r,l){const s=e.resolveComponent("a-input-search"),c=e.resolveComponent("caret-down-outlined"),i=e.resolveComponent("caret-right-outlined"),d=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(s,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=p=>t.searchText=p),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(p,w)=>(e.openBlock(),e.createElementBlock("div",{key:p.id},[e.createElementVNode("div",xn,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:O=>t.onToggleGroup(w)},[p.show?(e.openBlock(),e.createBlock(c,{key:0})):(e.openBlock(),e.createBlock(i,{key:1})),e.createTextVNode(" "+e.toDisplayString(p.name),1)],8,Gn)]),p.show?(e.openBlock(),e.createElementBlock("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataViewColumns,O=>(e.openBlock(),e.createElementBlock("div",{class:"column-child-item",key:O.id,draggable:!0,onDragstart:L=>t.onDragstart(L,O)},[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(O.scope))+"】 ",1),e.createElementVNode("span",qn,e.toDisplayString(O.name),1)],40,Un))),128))])):e.createCommentVNode("",!0)]))),128))]),e.createVNode(d,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":n[1]||(n[1]=p=>t.pagination.pageSize=p),total:t.pagination.totalResult,"show-total":p=>`共 ${p} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=p=>t.pagination.currentPage=p),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Hn=P(Mn,[["render",zn],["__scopeId","data-v-874ad438"]]),Wn=e.defineComponent({name:"DataList",components:{DataSourceList:Hn,DataViewList:kt},setup(){return{source:e.inject(Me)}}});function Qn(t,n,o,a,r,l){const s=e.resolveComponent("data-view-list"),c=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(c,{key:1})):e.createCommentVNode("",!0)],64)}const Xn=P(Wn,[["render",Qn]]),Jn=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ut},setup(t,{expose:n}){const o=e.inject(le),a=e.unref(e.inject(ee)),r=e.inject(Q),l=e.inject(v),s=e.computed(()=>e.unref(r).source),c=e.computed(()=>e.unref(r).dataViewId),i=e.ref([]),d=async()=>{try{const h=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(s),dataViewId:e.unref(c),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:f,data:V=[]}=h.data;f&&(i.value=V==null?void 0:V.slice(0,200))}catch(h){console.error(h)}},p=()=>{var N;const h=((N=e.unref(r)[t.type])==null?void 0:N.slice())||[],f=h[t.index],{label:V,name:C}=t.item;f.sort={label:V,columnName:C,type:"CUSTOM",customOrderColumns:e.unref(i)},l({[t.type]:h})};let w=!1;const O=()=>{w=!0},L=e.ref(!1),m=()=>{L.value=!0},b=()=>{L.value=!1},g=()=>{w&&p(),w=!1,b()};return n({showModal:m}),e.watch(L,h=>{var f,V;if(h){const C=(V=(f=t.item)==null?void 0:f.sort)==null?void 0:V.customOrderColumns;C==null?d():i.value=C}else i.value=[]},{flush:"post"}),{visible:L,onCancel:g,customSortList:i,onChange:O,onDeleteConfig:()=>{var N;const h=((N=e.unref(r)[t.type])==null?void 0:N.slice())||[],f=h[t.index],{label:V,name:C}=t.item;f.sort={label:V,columnName:C},l({[t.type]:h}),b()}}}}),ga="",Kn={class:"button-wrapper"},Yn={class:"sort-item"};function Zn(t,n,o,a,r,l){const s=e.resolveComponent("a-button"),c=e.resolveComponent("draggable"),i=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(i,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Kn,[e.createVNode(s,{type:"danger",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(c,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[0]=d=>t.customSortList=d),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:d})=>[e.createElementVNode("div",Yn,e.toDisplayString(d),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const vn=P(Jn,[["render",Zn],["__scopeId","data-v-edda5b08"]]),eo=e.defineComponent({name:"CustomGroupModal",components:{CloseOutlined:rt},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){const o=e.inject(le),a=e.unref(e.inject(ee));let r=!1;const l=e.computed(()=>`自定义分组-${t.item.label}`),s=e.ref(null),c=e.ref([]),i=e.ref([]),d=e.computed(()=>{const E=e.unref(i).map($=>$.title);return new Set(E)}),p=e.ref([]);e.watch(()=>e.unref(i).length,E=>{p.value=new Array(E).fill(!1)});const w=e.computed(()=>{let E=0;return e.unref(i).forEach($=>{var D;(D=$.data)==null||D.forEach(A=>{A.checked&&E++})}),E}),O=()=>{const E=e.unref(s);if(!E){Y.message.error("创建分组名不能空");return}e.unref(d).has(E)?Y.message.error("分组名已存在,请重新命名"):(e.unref(i).push({title:E,data:[]}),r=!0)},L=E=>{e.unref(i).splice(E,1),r=!0},m=e.ref(null),b=()=>{if(e.unref(w)===0){Y.message.error("当前移入分组已选个数为0");return}const E=e.unref(m);if(E==null){Y.message.error("请选择移入分组");return}if(!e.unref(i)[E]){Y.message.error("移入分组不存在,请重新选择");return}const $=[],D=e.unref(i).length;for(let A=0;A<D;A++){const z=e.unref(i)[A];e.unref(i)[A].data=z.data.filter(u=>(u.checked&&$.push({...u,checked:!1}),!u.checked))}e.unref(i)[E].data=[...$,...e.unref(i)[E].data],r=!0},g=E=>{e.unref(p)[E]=!0},y=E=>{e.unref(p)[E]=!1},h=(E,$)=>{const D=E.target.value;e.unref(d).has(D)&&Y.message.error("组名不能相同,请修改"),e.unref(i)[$].title=D,r=!0},f=e.inject(Q),V=e.inject(v),C=e.computed(()=>e.unref(f).source),N=e.computed(()=>e.unref(f).dataViewId),k=e.ref(!1),M=()=>{var _,S;const E=e.unref(i);let $="";e.unref(k)&&($=(_=E[0])==null?void 0:_.title);const D=E==null?void 0:E.length,A={};for(let B=1;B<D;B++){const F=E[B]||{},{title:j,data:x}=F;A[j]=(x==null?void 0:x.map(ge=>ge.label))||[]}const z=((S=e.unref(f)[t.type])==null?void 0:S.slice())||[],u=z[t.index];u.customGroup={groupInfoMap:A,otherGroupName:$},V({[t.type]:z})},T=e.ref(!1),I=()=>{T.value=!0},R=()=>{T.value=!1},q=()=>{R(),r&&M(),r=!1},K=()=>{r=!0},ae=new Set,Ie=async()=>{const E=t.item.customGroup||{},$=E.otherGroupName,D=E.groupInfoMap;($===""||$==null)&&(k.value=!1),e.unref(i)[0]={title:$||"未分组",data:[]};let A=1;for(const z in D)if(Object.prototype.hasOwnProperty.call(D,z)){const _=D[z].map(S=>(ae.add(S),{label:S,checked:!1}));e.unref(i)[A]={title:z,data:_},A++}await Fe()},Fe=async()=>{var E;try{const $=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(C),dataViewId:e.unref(N),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:D,data:A=[]}=$.data;if(D){const z=[];(E=A==null?void 0:A.slice(0,200))==null||E.forEach(u=>{ae.has(u)||z.push({label:u,checked:!1})}),e.unref(i)[0].data=z}}catch($){console.error($)}};return e.watch(T,E=>{E&&Ie()},{flush:"post"}),n({showModal:I}),{visible:T,title:l,activeKey:c,customGroupList:i,onCancel:q,useOtherGroup:k,selectCount:w,createGroupTitle:s,onAddGroup:O,onDeleteGroup:L,onMoveInGroup:b,selectGroupIndex:m,onEditTitle:g,onTitleChange:h,onFinishEditTitle:y,onUseOtherGroup:K,customGroupEditTitleList:p}}}),ha="",Ca="",to={class:"custom-group-header"},no={class:"move-and-create"},oo={class:"select-tip"},ao={class:"select-count"},ro={class:"create-group"},lo={class:"custom-group-content"},io=["onClick"],co={class:"extra"},so={class:"custom-group-list"},fo={class:"text"};function po(t,n,o,a,r,l){const s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),i=e.resolveComponent("a-button"),d=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-tag"),O=e.resolveComponent("close-outlined"),L=e.resolveComponent("a-checkable-tag"),m=e.resolveComponent("a-collapse-panel"),b=e.resolveComponent("a-collapse"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",to,[e.createElementVNode("div",no,[e.createElementVNode("div",null,[e.createElementVNode("span",oo,[e.createTextVNode(" 已选"),e.createElementVNode("span",ao,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(c,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[0]=y=>t.selectGroupIndex=y),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(y,h)=>(e.openBlock(),e.createBlock(s,{key:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(i,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",ro,[e.createTextVNode(" 创建分组: "),e.createVNode(d,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[1]=y=>t.createGroupTitle=y),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":n[2]||(n[2]=y=>t.useOtherGroup=y),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",lo,[e.createVNode(b,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=y=>t.activeKey=y),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(y,h)=>(e.openBlock(),e.createBlock(m,{key:h},{header:e.withCtx(()=>[t.customGroupEditTitleList[h]?(e.openBlock(),e.createBlock(d,{key:1,class:"edit-title-input",value:y.title,size:"small",onChange:f=>t.onTitleChange(f,h),onBlur:f=>t.onFinishEditTitle(h),onPressEnter:f=>t.onFinishEditTitle(h)},null,8,["value","onChange","onBlur","onPressEnter"])):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(f=>t.onEditTitle(h),["prevent","stop"])},e.toDisplayString(y.title),9,io))]),extra:e.withCtx(()=>[e.createElementVNode("div",co,[h===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(w,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),h!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(O,{onClick:e.withModifiers(f=>t.onDeleteGroup(h),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",so,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.data,(f,V)=>(e.openBlock(),e.createBlock(L,{color:"red",checked:f.checked,"onUpdate:checked":C=>f.checked=C,class:"custom-group",key:V},{default:e.withCtx(()=>[e.createElementVNode("span",fo,e.toDisplayString(f.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const uo=P(eo,[["render",po],["__scopeId","data-v-ca389e04"]]),st="CHANGE_CONDITION",mo=e.defineComponent({name:"Condition",components:{CloseOutlined:rt},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var f,V,C,N,k,M;const n=e.inject(Q),o=e.inject(le),a=e.unref(e.inject(ee)),r=e.computed(()=>{var T;return(T=e.unref(n))==null?void 0:T.dataViewId}),l=e.computed(()=>{var T;return(T=e.unref(n))==null?void 0:T.source}),{getDataList:s}=e.inject(he,{getDataList:()=>[]}),c=e.ref({fieldName:(f=t.data)==null?void 0:f.fieldName,fieldType:(V=t.data)==null?void 0:V.fieldType,rule:(C=t.data)==null?void 0:C.rule,id:(N=t.data)==null?void 0:N.id,fieldValue:(k=t.data)==null?void 0:k.fieldValue,label:(M=t.data)==null?void 0:M.label,targetSource:""}),i=e.computed(()=>{const T=t.type;if(T==="classificationList"||T==="seriesList"){let I=[];for(const R in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),R)){const q=e.unref(n)[R];Array.isArray(q)&&(I=I.concat(q))}return I}else if(T==="leftAxisList"||T==="rightAxisList")return e.unref(s());return[]}),{updateCondition:d,deleteCondition:p}=e.inject(st,{updateCondition:(T,I,R)=>{},deleteCondition:(T,I)=>{}}),w=()=>{p(t.level,t.index)};e.watch(c,T=>{d(T,t.level,t.index)},{deep:!0});const O=(T,I)=>{const{name:R,genericType:q,id:K,label:ae}=I;c.value={id:K,fieldName:R,fieldType:q,label:ae,rule:void 0,fieldValue:void 0,targetSource:""}},L=e.computed(()=>{const T=e.unref(c).fieldType;return T==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}]:T==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}]:T==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),m=e.ref([]),b=async()=>{var T;if(!(e.unref(m).length>0))try{const I=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(l),dataViewId:e.unref(r),groupColumn:e.unref(c).fieldName,hrpIndexTypeGuid:e.unref(c).id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:R,data:q=[]}=I.data;R&&(m.value=(T=q==null?void 0:q.slice(0,200))==null?void 0:T.map(K=>({label:K,value:K})))}catch(I){console.error(I)}},g=T=>{e.unref(c).rule=T,e.unref(c).fieldValue=void 0,["IN","NOT_IN"].includes(T)&&b()},y=e.ref([]);return{fieldOptions:i,ruleOptions:L,onFieldChange:O,condition:c,valueOptions:m,onRuleChange:g,onFieldValueSelectChange:T=>{y.value=T,e.unref(c).fieldValue=(T==null?void 0:T.join(","))||""},fieldValues:y,onDelete:w}}}),ya="",go={class:"condition"};function ho(t,n,o,a,r,l){const s=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),i=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",go,[e.createVNode(s,{class:"field-name",value:t.condition.fieldName,options:t.fieldOptions,"field-names":{value:"name"},onChange:t.onFieldChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"rule",value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]),["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(s,{key:0,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):(e.openBlock(),e.createBlock(c,{key:1,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[0]||(n[0]=d=>t.condition.fieldValue=d)},null,8,["value"])),e.createVNode(i,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Co=P(mo,[["render",ho],["__scopeId","data-v-4bbb62dd"]]),yo=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Co}}),ba="",bo={key:0,class:"condition-list"},_o={key:0,class:"condition-container"},ko={key:0,class:"condition-text"},wo={key:1,class:"condition-text"},No={class:"conditions"};function So(t,n,o,a,r,l){const s=e.resolveComponent("condition-list",!0),c=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[i.join&&i.conditions&&Array.isArray(i.conditions)?(e.openBlock(),e.createElementBlock("div",_o,[i.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i.join==="||"?(e.openBlock(),e.createElementBlock("div",ko,"或")):e.createCommentVNode("",!0),i.join==="&&"?(e.openBlock(),e.createElementBlock("div",wo,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",No,[i.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,list:i.conditions},null,8,["level","list"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(c,{key:1,class:"condition",data:i,level:t.level,index:d,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Oo=P(yo,[["render",So],["__scopeId","data-v-4eb6cab5"]]),Eo=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Oo},setup(t,{expose:n}){const o=()=>{var m;return`添加过滤条件-${((m=t.item)==null?void 0:m.label)||""}`},a=e.inject(Q),r=e.inject(v),l=e.ref([]),s=e.ref(!1);e.watch(s,m=>{var b,g;m&&Array.isArray((b=t.item)==null?void 0:b.conditions)&&(l.value=(g=t.item)==null?void 0:g.conditions)},{flush:"post"});let c=!1;const i=m=>{var b;c=!0,e.unref(l)==null||((b=e.unref(l))==null?void 0:b.length)===0?l.value=[{}]:e.unref(l)[0]!=null&&(e.unref(l)[0].conditions==null||e.unref(l)[0].join!==m?l.value=[{join:m,conditions:[e.unref(l)[0],{}]}]:e.unref(l)[0].conditions.length>1&&e.unref(l)[0].join===m&&l.value[0].conditions.push({}))};e.provide(st,{updateCondition(m,b,g){var h;c=!0;let y=e.unref(l);for(let f=0;f<b&&y[0];f++)y=(h=y[0])==null?void 0:h.conditions;Array.isArray(y)&&y[g]&&(y[g]=m)},deleteCondition(m,b){var y,h;c=!0;let g=e.unref(l);for(let f=0;f<m&&g[0];f++)g=(y=g[0])==null?void 0:y.conditions;if(Array.isArray(g)&&g[b]&&(g.splice(b,1),g.length===1)){let f=e.unref(l);const V=m-2>0?m-2:0;for(let C=0;C<V&&f[0];C++)f=(h=f[0])==null?void 0:h.conditions;f[0].join===g[0].join?f[0].conditions=[...g[0].conditions,...f[0].conditions.slice(1)]:f[0]=g[0]}}});const d=()=>{var b;const m=((b=e.unref(a)[t.type])==null?void 0:b.slice())||[];m[t.index].conditions=e.unref(l),r({[t.type]:m})},p=()=>{s.value=!0},w=()=>{s.value=!1},O=()=>{c&&d(),c=!1,w()},L=()=>{w()};return n({showModal:p}),{visible:s,onOk:O,onCancel:L,handleTitle:o,conditionList:l,addCondition:i}}}),_a="",To={class:"header"};function Bo(t,n,o,a,r,l){const s=e.resolveComponent("a-button"),c=e.resolveComponent("condition-list"),i=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(i,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",To,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:n[0]||(n[0]=d=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:n[1]||(n[1]=d=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:t.addCondition},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1},8,["onClick"]))]),e.createVNode(c,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1},8,["title","visible","onOk","onCancel"])}const Vo=P(Eo,[["render",Bo],["__scopeId","data-v-7e6cbd68"]]);let Lo=(t=21)=>{let n="",o=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=o[t]&63;a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a<63?n+="_":n+="-"}return n};const $o=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""}},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(Q),a=e.computed(()=>e.unref(o).leftAxisList||[]),r=e.computed(()=>e.unref(o).rightAxisList||[]),l=e.computed(()=>e.unref(o).indicators||[]),s=e.computed(()=>e.unref(o).queryColumnList||[]),c=e.computed(()=>{const p=e.unref(a).concat(e.unref(r)).concat(e.unref(l)).concat(e.unref(s));return(p==null?void 0:p.filter(w=>w.genericType==="NUMBER"))||[]}),i=e.computed({get:()=>t.value||"",set:p=>{n("update:value",p),n("change",p)}});return{fieldList:c,myValue:i,insertText:p=>{i.value=e.unref(i)+"${"+p+"}"}}}}),ka="",Ao={class:"formula-calculation"},Do={class:"field-area"},Io=["onClick"];function Fo(t,n,o,a,r,l){const s=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),i=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode(i,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(s,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Do,[e.createElementVNode("div",null," 数值字段("+e.toDisplayString(t.fieldList.length)+") ",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:p,onClick:w=>t.insertText(d.label)},e.toDisplayString(d.label),9,Io))),128))])]),_:1}),e.createVNode(s,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",value:t.myValue,"onUpdate:value":n[0]||(n[0]=d=>t.myValue=d),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"])]),_:1})]),_:1})])}const Mo=P($o,[["render",Fo],["__scopeId","data-v-bb877ad3"]]),jo=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Mo},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:n}){const o=e.inject(Q),a=e.inject(v),r=e.computed(()=>e.unref(o)[t.type]||[]),l={span:4},s={span:18},c={label:void 0,calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},i=e.ref(c);e.watch(()=>t.item,C=>{if(t.mode==="edit"){const{label:N,calcType:k,formula:M,builtInValueSource:T,builtInFormula:I,builtInCalcWay:R}=C;i.value={label:N,calcType:k,formula:M,builtInValueSource:T,builtInFormula:I,builtInCalcWay:R}}},{immediate:!0,deep:!0});let d=!1;const p=()=>{d=!0},w=()=>{var k;const C=((k=e.unref(o)[t.type])==null?void 0:k.slice())||[],{label:N}=e.unref(i)||{};if(t.mode==="add"){const M=Lo();C.push({...e.unref(i),id:M,show:!0,name:N})}else t.mode==="edit"&&(C[t.index]={...C[t.index],...e.unref(i),name:N});a({[t.type]:C})},O=e.ref(!1),L=()=>{O.value=!0},m=()=>{O.value=!1},b=e.ref({label:[{required:!0,message:"请输入指标名"}],calcType:[{required:!0,message:"请选择计算方式"}],formula:[{required:!0,message:"请选择计算公式"}]}),{validate:g,validateInfos:y,clearValidate:h}=Y.Form.useForm(i,b),f=()=>{g().then(()=>{d&&w(),d=!1,i.value=c,m()})},V=()=>{i.value=c,h(),m()};return n({showModal:L}),{visible:O,onCancel:V,labelCol:l,wrapperCol:s,formState:i,builtInValueSourceList:r,onOK:f,onChange:p,validateInfos:y}}});function Po(t,n,o,a,r,l){const s=e.resolveComponent("a-input"),c=e.resolveComponent("a-form-item"),i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),w=e.resolveComponent("a-textarea"),O=e.resolveComponent("a-form"),L=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(L,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"50vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(O,{model:t.formState},{default:e.withCtx(()=>[e.createVNode(c,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.label,"onUpdate:value":n[0]||(n[0]=m=>t.formState.label=m),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=m=>t.formState.calcType=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(i,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(i,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":n[2]||(n[2]=m=>t.formState.formula=m),onChange:t.onChange},null,8,["value","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(c,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInFormula,"onUpdate:value":n[3]||(n[3]=m=>t.formState.builtInFormula=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(i,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取值来源","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInValueSource,"onUpdate:value":n[4]||(n[4]=m=>t.formState.builtInValueSource=m),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(m,b)=>(e.openBlock(),e.createBlock(i,{key:b,value:m.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取值原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInCalcWay,"onUpdate:value":n[5]||(n[5]=m=>t.formState.builtInCalcWay=m),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_RANK","BUILT_IN_RANK_IN_GROUPO"].includes(t.formState.builtInValueSource||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(i,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(i,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(i,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(i,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(i,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(w,{rows:6,disabled:""})]),_:1},8,["label-col","wrapper-col"])],64)):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","visible","onOk","onCancel"])}const xo=P(jo,[["render",Po]]),Go=e.defineComponent({name:"DataConfigCard",components:{CalculationModal:xo,FilterModal:Vo,CustomGroupModal:uo,SettingOutlined:Fn,DeleteOutlined:Tn,CustomSortModal:vn,PlusOutlined:$n},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const n=e.inject(Q),o=e.inject(v),a=(u="{}")=>{var _;try{const S=JSON.parse(u),B=((_=e.unref(n)[t.type])==null?void 0:_.slice())||[];["classificationList","seriesList"].includes(t.type)&&B.forEach(F=>{F.show=!1}),B.push(S),o({[t.type]:B})}catch(S){console.error(S)}},r=(u="{}")=>{var _;try{const{cardItem:S,type:B,index:F}=JSON.parse(u);if(B===t.type)return;const j=((_=e.unref(n)[t.type])==null?void 0:_.slice())||[];j.push(S);const x=e.unref(n)[B].slice()||[];x.splice(F,1),o({[t.type]:j,[B]:x})}catch(S){console.error(S)}},l=(u,_)=>{var F,j;const S=(F=u.target)==null?void 0:F.checked,B=((j=e.unref(n)[t.type])==null?void 0:j.slice())||[];["classificationList","seriesList"].includes(t.type)&&B.forEach(x=>{x.show=!1}),B[_].show=S,o({[t.type]:B})},s=(u,_,S)=>{var B;(B=u.dataTransfer)==null||B.setData("card-item",JSON.stringify({cardItem:_,type:t.type,index:S}))},c=u=>{var S;const _=((S=e.unref(n)[t.type])==null?void 0:S.slice())||[];_.splice(u,1),o({[t.type]:_})},i=u=>{var B,F;const _=(B=u.dataTransfer)==null?void 0:B.getData("list-item"),S=(F=u.dataTransfer)==null?void 0:F.getData("card-item");_?a(_):S&&r(S)},d=()=>{},p=e.computed(()=>e.unref(n)[t.type]||[]),w=e.ref([]);let O=!1;e.watch(()=>e.unref(p).length,u=>{w.value=new Array(u).fill(!1)},{flush:"post",immediate:!0});const L=u=>{var S;const _=((S=e.unref(n)[t.type])==null?void 0:S.slice())||[];_.splice(u,1),o({[t.type]:_})},m=u=>{w.value[u]=!0},b=()=>{O=!0},g=(u,_)=>{var S,B;if(w.value[_]=!1,O){const F=(S=u.target)==null?void 0:S.value,j=((B=e.unref(n)[t.type])==null?void 0:B.slice())||[];j[_].label=F,o({[t.type]:j})}O=!1},y="DEFAULT",h=e.computed(()=>{const u=e.unref(n)[t.type]||[],{leftAxisList:_=[],rightAxisList:S=[],indicators:B=[]}=e.unref(n)||{};return[{id:y,label:"默认",name:"默认"},...u,..._,...S,...B]}),f=(u={},_,S="ASC")=>{var ge;const{label:B,name:F,id:j}=u,x=((ge=e.unref(n)[t.type])==null?void 0:ge.slice())||[];j===y?delete x[_].sort:x[_].sort={label:B,columnName:F,type:"NORMAL",order:S},o({[t.type]:x})},V=(u={},_="ASC")=>{const B={ASC:"升序",DESC:"降序"}[_],{sort:F}=u,{label:j,order:x}=F||{};return j&&x===_?`${B}(${j})`:B},C=e.ref(),N=e.ref(),k=e.ref(),M=e.ref(),T=(u={},_)=>{var S;C.value=u,N.value=_,(S=e.unref(k))==null||S.showModal()},I=u=>{var _;return"自定义排序"+(((_=u==null?void 0:u.sort)==null?void 0:_.type)==="CUSTOM"?"(已配置)":"")},R=(u={},_)=>{var S;C.value=u,N.value=_,(S=e.unref(M))==null||S.showModal()},q=u=>"自定义分组"+((u==null?void 0:u.customGroup)!=null?"(已配置)":""),K=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],ae=(u,_)=>{var B;const S=((B=e.unref(n)[t.type])==null?void 0:B.slice())||[];S[_].aggregate=u,o({[t.type]:S})},Ie=(u="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[u]})`,Fe=(u={})=>{var _;return"过滤"+(u!=null&&u.conditions&&((_=u==null?void 0:u.conditions)==null?void 0:_.length)>0?"(已配置)":"")},E=e.ref(),$=(u={},_)=>{C.value=u,N.value=_,e.unref(E).showModal()},D=e.ref(),A=e.ref("add");return{onCheckboxChange:l,onDrop:i,onDropStart:s,onDropEnd:c,onDragover:d,cardItemList:p,onDelete:L,onEdit:m,onCommitLabelChange:g,sortList:h,onSort:f,handleSortTitle:V,showCustomSortModal:T,customSortModalRef:k,currentItem:C,currentIndex:N,handleCustomSortTitle:I,handleCustomGroupTitle:q,customGroupModalRef:M,showCustomGroupModal:R,editLabelList:w,onLabelChange:b,aggregateList:K,onAggregateChange:ae,handleAggregateTitle:Ie,onShowCalculationModal:(u,_,S)=>{var B;A.value=u,u==="edit"&&(C.value=_,N.value=S),(B=e.unref(D))==null||B.showModal()},handleFilterTitle:Fe,filterModalRef:E,showFilterModal:$,calculationModalRef:D,calculationModalMode:A}}}),wa="",Na="",Ro=t=>(e.pushScopeId("data-v-62aff348"),t=t(),e.popScopeId(),t),Uo={class:"title"},qo={class:"title-text"},zo=Ro(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Ho=["onDragstart"],Wo={class:"card-item-inner"},Qo=["onClick"],Xo=["onClick"],Jo=["onClick"];function Ko(t,n,o,a,r,l){const s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),i=e.resolveComponent("setting-outlined"),d=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-sub-menu"),w=e.resolveComponent("a-menu-divider"),O=e.resolveComponent("a-menu"),L=e.resolveComponent("a-dropdown"),m=e.resolveComponent("delete-outlined"),b=e.resolveComponent("a-checkbox"),g=e.resolveComponent("custom-sort-modal"),y=e.resolveComponent("custom-group-modal"),h=e.resolveComponent("filter-modal"),f=e.resolveComponent("calculation-modal"),V=e.resolveComponent("a-card");return e.openBlock(),e.createBlock(V,{class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",minHeight:"38px",padding:"0 10px"},onDragover:n[2]||(n[2]=e.withModifiers(()=>{},["prevent","stop"])),onDrop:e.withModifiers(t.onDrop,["prevent","stop"])},{title:e.withCtx(()=>[e.createElementVNode("div",Uo,[e.createElementVNode("div",qo,e.toDisplayString(t.title),1),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[0]||(n[0]=e.withModifiers(C=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),zo]))])]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cardItemList,(C,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,draggable:!0,onDragstart:e.withModifiers(k=>t.onDropStart(k,C,N),["stop"]),onDragover:n[1]||(n[1]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(b,{class:"card-item",checked:C.show,onChange:k=>t.onCheckboxChange(k,N)},{default:e.withCtx(()=>[e.createElementVNode("div",Wo,[!t.editLabelList[N]&&C.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(k=>t.onEdit(N),["prevent","stop"])},e.toDisplayString(C.label),9,Qo)):e.createCommentVNode("",!0),!t.editLabelList[N]&&!C.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(k=>t.onEdit(N),["prevent","stop"])}," 请点击填入名字 ",8,Xo)):e.createCommentVNode("",!0),t.editLabelList[N]?(e.openBlock(),e.createBlock(c,{key:2,"default-value":C.label,size:"small",onBlur:k=>t.onCommitLabelChange(k,N),onPressEnter:k=>t.onCommitLabelChange(k,N),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])):e.createCommentVNode("",!0),["FORMULA","BUILT_IN"].includes(C.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(k=>t.onShowCalculationModal("edit",C,N),["prevent","stop"])}," fx ",8,Jo)):e.createCommentVNode("",!0),e.createVNode(L,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(O,null,{default:e.withCtx(()=>[["classificationList","seriesList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p,{title:t.handleSortTitle(C,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(d,{style:{"white-space":"nowrap"},key:k.id,onClick:M=>t.onSort(k,N,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(p,{title:t.handleSortTitle(C,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(d,{class:"menu-item",style:{"white-space":"nowrap"},key:k.id,onClick:M=>t.onSort(k,N,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(d,{onClick:k=>t.showCustomSortModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(w),e.createVNode(d,{onClick:k=>t.showCustomGroupModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(w)],64)):e.createCommentVNode("",!0),e.createVNode(d,{onClick:k=>t.showFilterModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(C)),1)]),_:2},1032,["onClick"]),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(p,{title:t.handleAggregateTitle(C.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,k=>(e.openBlock(),e.createBlock(d,{style:{"white-space":"nowrap"},key:k.value,onClick:M=>t.onAggregateChange(k.value,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(i,{class:"setting-icon"})]),_:2},1024),e.createVNode(m,{class:"delete-icon",onClick:e.withModifiers(k=>t.onDelete(N),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])],40,Ho))),128)),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(y,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(h,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(f,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style","onDrop"])}const Yo=P(Go,[["render",Ko],["__scopeId","data-v-62aff348"]]),Zo={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"}},vo=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yo},setup(){const t=e.inject(de),n=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),o=e.ref({}),a=e.reactive([]);return(()=>{var O;const l={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList","rightAxisList"],line:["classificationList","seriesList","leftAxisList","rightAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],table:["queryColumnList"]},s="ecan";let c=e.unref(n);const i=s.length;c=((O=c.slice(i,i+1))==null?void 0:O.toLowerCase())+c.slice(i+1);const d=l[c],p=Zo,w=(d==null?void 0:d.length)||0;for(let L=0;L<w;L++){const m=d[L];if(!m)break;a.push({...p[m],type:m})}})(),{cardsMap:o,cards:a}}}),Sa="",Oa="",ea={class:"data-group"};function ta(t,n,o,a,r,l){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",ea,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,c=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:c.type,class:"data-config-card",type:c.type},c),null,16,["type"]))),128))])}const na=P(vo,[["render",ta],["__scopeId","data-v-af3bb33a"]]),oa=e.defineComponent({name:"DataConfig",components:{DataGroup:na},setup(){const t=e.ref("1"),n=e.ref(),o=e.inject(de),a=e.computed(()=>{const c=re.cloneDeep(re.pick(o,re.without(Object.keys(o),"position","top","left","width","height")));c.height="345px";const i=e.inject(Q);return i.pageMode="design",i.preview=!0,{...c,toolboxShow:!1}}),r=e.computed(()=>{var c;return(c=e.unref(a))==null?void 0:c.type}),l=()=>{var i;const c=(i=e.unref(n))==null?void 0:i.refreshData;typeof c=="function"&&c()},s=e.computed(()=>o==null?void 0:o.graphic);return e.watch(s,()=>{l()},{deep:!0,flush:"post"}),e.onMounted(()=>{l()}),{activeKey:t,componentRef:n,type:r,component:a}}}),Ea="",aa={class:"data-config"};function ra(t,n,o,a,r,l){const s=e.resolveComponent("data-group"),c=e.resolveComponent("a-tab-pane"),i=e.resolveComponent("a-tabs");return e.openBlock(),e.createElementBlock("div",aa,[e.createVNode(i,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=d=>t.activeKey=d)},{default:e.withCtx(()=>[e.createVNode(c,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1},8,["activeKey"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({class:"component"},t.component,{ref:"componentRef"}),null,16))])}const la=P(oa,[["render",ra],["__scopeId","data-v-2ae24dac"]]),ia=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Xn,DataConfig:la},props:{source:String,indicatorToken:String,selectedComponent:Object},setup(t,{expose:n}){const o=e.computed(()=>t.source),a=e.computed(()=>t.indicatorToken),r=e.computed(()=>t.selectedComponent);let l=e.unref(r).graphicConfig?re.cloneDeep(e.unref(r).graphicConfig):e.ref({});l=e.ref(l);const s=e.ref([]),c=p=>{s.value=p},i=p=>{l.value={...e.unref(l),...e.unref(p)}},d=()=>s;e.provide(he,{setDataList:c,getDataList:d}),e.provide(de,r),e.provide(Q,l),e.provide(Me,o),e.provide(ee,a),e.provide(v,i),n({graphicConfig:l})}}),Ta="",ca={class:"config-modal"},sa={class:"config-modal-left"},da={class:"config-modal-right"};function fa(t,n,o,a,r,l){const s=e.resolveComponent("data-list"),c=e.resolveComponent("data-config");return e.openBlock(),e.createElementBlock("div",ca,[e.createElementVNode("div",sa,[e.createVNode(s)]),e.createElementVNode("div",da,[e.createVNode(c)])])}const dt=mt(P(ia,[["render",fa],["__scopeId","data-v-e0b37acc"]])),ft=Object.freeze(Object.defineProperty({__proto__:null,EcanIndicatorLibrary:dt},Symbol.toStringTag,{value:"Module"})),pa={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(ft).forEach(a=>{const r=ft[a];r.install&&t.use(r)})}};H.EcanIndicatorLibrary=dt,H.default=pa,Object.defineProperties(H,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cn(t,n){if(t){if(typeof t=="string")return et(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return et(t,n)}}function et(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function sn(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,s,c;try{for(o=o.call(t);!(r=(s=o.next()).done)&&(a.push(s.value),!(n&&a.length===n));r=!0);}catch(i){l=!0,c=i}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw c}}return a}}function dn(t){if(Array.isArray(t))return t}function tt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Te(t,r,o[r])})}return t}function Te(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function fn(t,n){if(t==null)return{};var o=pn(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function pn(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}ve("#1890ff");var oe=function(n,o){var a,r=tt({},n,o.attrs),l=r.class,s=r.icon,c=r.spin,i=r.rotate,d=r.tabindex,p=r.twoToneColor,w=r.onClick,O=fn(r,an),L=(a={anticon:!0},Te(a,"anticon-".concat(s.name),!!s.name),Te(a,l,l),a),m=c===""||c||s.name==="loading"?"anticon-spin":"",b=d;b===void 0&&w&&(b=-1,O.tabindex=b);var g=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,y=Ke(p),h=rn(y,2),f=h[0],V=h[1];return e.createVNode("span",tt({role:"img","aria-label":s.name},O,{onClick:w,class:L}),[e.createVNode(Ee,{class:m,icon:s,primaryColor:f,secondaryColor:V,style:g},null)])};oe.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},oe.displayName="AntdIcon",oe.inheritAttrs=!1,oe.getTwoToneColor=on,oe.setTwoToneColor=ve;const ae=oe;var un={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const mn=un;function nt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){gn(t,r,o[r])})}return t}function gn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Be=function(n,o){var a=nt({},n,o.attrs);return e.createVNode(ae,nt({},a,{icon:mn}),null)};Be.displayName="CaretDownOutlined",Be.inheritAttrs=!1;const hn=Be;var Cn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const yn=Cn;function ot(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){bn(t,r,o[r])})}return t}function bn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ve=function(n,o){var a=ot({},n,o.attrs);return e.createVNode(ae,ot({},a,{icon:yn}),null)};Ve.displayName="CaretRightOutlined",Ve.inheritAttrs=!1;const _n=Ve;var kn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const wn=kn;function at(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Nn(t,r,o[r])})}return t}function Nn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Le=function(n,o){var a=at({},n,o.attrs);return e.createVNode(ae,at({},a,{icon:wn}),null)};Le.displayName="CloseOutlined",Le.inheritAttrs=!1;const rt=Le;var Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const On=Sn;function lt(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){En(t,r,o[r])})}return t}function En(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var $e=function(n,o){var a=lt({},n,o.attrs);return e.createVNode(ae,lt({},a,{icon:On}),null)};$e.displayName="DeleteOutlined",$e.inheritAttrs=!1;const Tn=$e;var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Vn=Bn;function it(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ln(t,r,o[r])})}return t}function Ln(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ae=function(n,o){var a=it({},n,o.attrs);return e.createVNode(ae,it({},a,{icon:Vn}),null)};Ae.displayName="PlusOutlined",Ae.inheritAttrs=!1;const $n=Ae;var An={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Dn=An;function ct(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){In(t,r,o[r])})}return t}function In(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var De=function(n,o){var a=ct({},n,o.attrs);return e.createVNode(ae,ct({},a,{icon:Dn}),null)};De.displayName="SettingOutlined",De.inheritAttrs=!1;const Fn=De,Mn=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:_n,CaretDownOutlined:hn},setup(){const t=e.inject(le),n=e.unref(e.inject(te)),o=e.inject(de),a=e.computed(()=>{var b;return(b=e.unref(o))==null?void 0:b.graphicConfig}),r=e.computed(()=>{var b;return(b=e.unref(a))==null?void 0:b.dataSourceId}),l=e.ref([]),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),i=async()=>{const b={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),dataSourceId:e.unref(r)},g=await t.post(`${Z}/diagram/sourceList`,b,{headers:{Authentication:n,operateContext:"ygt"}}),{success:y,data:h={}}=g.data;if(y){const{rows:f=[],total:V=0}=h;f==null||f.forEach(C=>{var N;C.show=!1,(N=C.dataViewColumns)==null||N.forEach(k=>{k.show=!0,k.edit=!1})}),l.value=f,s.totalResult=+V}},d=b=>({DIM:"维度",IDX:"指标"})[b],p=b=>{l.value[b].show=!l.value[b].show},w=(b,g)=>{var y;(y=b.dataTransfer)==null||y.setData("list-item",JSON.stringify(g))},O=()=>{i()},L=ee.debounce(()=>{i()},200),m=(b,g)=>{s.pageSize=g,s.currentPage=b,i()};return e.onMounted(()=>{i()}),{dataSourceList:l,pagination:s,onDragstart:w,onToggleGroup:p,mapScope:d,onSearch:O,onChange:L,onPaginationChange:m,searchText:c}}}),ma="",jn={class:"data-source-list"},Pn={class:"columns"},xn={class:"column-item"},Gn=["onClick"],Rn={key:0},Un=["onDragstart"],qn={class:"column-child-item-name"};function zn(t,n,o,a,r,l){const s=e.resolveComponent("a-input-search"),c=e.resolveComponent("caret-down-outlined"),i=e.resolveComponent("caret-right-outlined"),d=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(s,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=p=>t.searchText=p),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(p,w)=>(e.openBlock(),e.createElementBlock("div",{key:p.id},[e.createElementVNode("div",xn,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:O=>t.onToggleGroup(w)},[p.show?(e.openBlock(),e.createBlock(c,{key:0})):(e.openBlock(),e.createBlock(i,{key:1})),e.createTextVNode(" "+e.toDisplayString(p.name),1)],8,Gn)]),p.show?(e.openBlock(),e.createElementBlock("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataViewColumns,O=>(e.openBlock(),e.createElementBlock("div",{class:"column-child-item",key:O.id,draggable:!0,onDragstart:L=>t.onDragstart(L,O)},[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(O.scope))+"】 ",1),e.createElementVNode("span",qn,e.toDisplayString(O.name),1)],40,Un))),128))])):e.createCommentVNode("",!0)]))),128))]),e.createVNode(d,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":n[1]||(n[1]=p=>t.pagination.pageSize=p),total:t.pagination.totalResult,"show-total":p=>`共 ${p} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=p=>t.pagination.currentPage=p),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Hn=P(Mn,[["render",zn],["__scopeId","data-v-874ad438"]]),Wn=e.defineComponent({name:"DataList",components:{DataSourceList:Hn,DataViewList:kt},setup(){return{source:e.inject(Me)}}});function Qn(t,n,o,a,r,l){const s=e.resolveComponent("data-view-list"),c=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(c,{key:1})):e.createCommentVNode("",!0)],64)}const Xn=P(Wn,[["render",Qn]]),Jn=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ut},setup(t,{expose:n}){const o=e.inject(le),a=e.unref(e.inject(te)),r=e.inject(Q),l=e.inject(v),s=e.computed(()=>e.unref(r).source),c=e.computed(()=>e.unref(r).dataViewId),i=e.ref([]),d=async()=>{try{const h=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(s),dataViewId:e.unref(c),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:f,data:V=[]}=h.data;f&&(i.value=V==null?void 0:V.slice(0,200))}catch(h){console.error(h)}},p=()=>{var N;const h=((N=e.unref(r)[t.type])==null?void 0:N.slice())||[],f=h[t.index],{label:V,name:C}=t.item;f.sort={label:V,columnName:C,type:"CUSTOM",customOrderColumns:e.unref(i)},l({[t.type]:h})};let w=!1;const O=()=>{w=!0},L=e.ref(!1),m=()=>{L.value=!0},b=()=>{L.value=!1},g=()=>{w&&p(),w=!1,b()};return n({showModal:m}),e.watch(L,h=>{var f,V;if(h){const C=(V=(f=t.item)==null?void 0:f.sort)==null?void 0:V.customOrderColumns;C==null?d():i.value=C}else i.value=[]},{flush:"post"}),{visible:L,onCancel:g,customSortList:i,onChange:O,onDeleteConfig:()=>{var N;const h=((N=e.unref(r)[t.type])==null?void 0:N.slice())||[],f=h[t.index],{label:V,name:C}=t.item;f.sort={label:V,columnName:C},l({[t.type]:h}),b()}}}}),ga="",Kn={class:"button-wrapper"},Yn={class:"sort-item"};function Zn(t,n,o,a,r,l){const s=e.resolveComponent("a-button"),c=e.resolveComponent("draggable"),i=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(i,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Kn,[e.createVNode(s,{type:"danger",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(c,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[0]=d=>t.customSortList=d),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:d})=>[e.createElementVNode("div",Yn,e.toDisplayString(d),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const vn=P(Jn,[["render",Zn],["__scopeId","data-v-edda5b08"]]),eo=e.defineComponent({name:"CustomGroupModal",components:{CloseOutlined:rt},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){const o=e.inject(le),a=e.unref(e.inject(te));let r=!1;const l=e.computed(()=>`自定义分组-${t.item.label}`),s=e.ref(null),c=e.ref([]),i=e.ref([]),d=e.computed(()=>{const E=e.unref(i).map($=>$.title);return new Set(E)}),p=e.ref([]);e.watch(()=>e.unref(i).length,E=>{p.value=new Array(E).fill(!1)});const w=e.computed(()=>{let E=0;return e.unref(i).forEach($=>{var D;(D=$.data)==null||D.forEach(A=>{A.checked&&E++})}),E}),O=()=>{const E=e.unref(s);if(!E){Y.message.error("创建分组名不能空");return}e.unref(d).has(E)?Y.message.error("分组名已存在,请重新命名"):(e.unref(i).push({title:E,data:[]}),r=!0)},L=E=>{e.unref(i).splice(E,1),r=!0},m=e.ref(null),b=()=>{if(e.unref(w)===0){Y.message.error("当前移入分组已选个数为0");return}const E=e.unref(m);if(E==null){Y.message.error("请选择移入分组");return}if(!e.unref(i)[E]){Y.message.error("移入分组不存在,请重新选择");return}const $=[],D=e.unref(i).length;for(let A=0;A<D;A++){const z=e.unref(i)[A];e.unref(i)[A].data=z.data.filter(u=>(u.checked&&$.push({...u,checked:!1}),!u.checked))}e.unref(i)[E].data=[...$,...e.unref(i)[E].data],r=!0},g=E=>{e.unref(p)[E]=!0},y=E=>{e.unref(p)[E]=!1},h=(E,$)=>{const D=E.target.value;e.unref(d).has(D)&&Y.message.error("组名不能相同,请修改"),e.unref(i)[$].title=D,r=!0},f=e.inject(Q),V=e.inject(v),C=e.computed(()=>e.unref(f).source),N=e.computed(()=>e.unref(f).dataViewId),k=e.ref(!1),M=()=>{var _,S;const E=e.unref(i);let $="";e.unref(k)&&($=(_=E[0])==null?void 0:_.title);const D=E==null?void 0:E.length,A={};for(let B=1;B<D;B++){const F=E[B]||{},{title:j,data:x}=F;A[j]=(x==null?void 0:x.map(ge=>ge.label))||[]}const z=((S=e.unref(f)[t.type])==null?void 0:S.slice())||[],u=z[t.index];u.customGroup={groupInfoMap:A,otherGroupName:$},V({[t.type]:z})},T=e.ref(!1),I=()=>{T.value=!0},R=()=>{T.value=!1},q=()=>{R(),r&&M(),r=!1},K=()=>{r=!0},re=new Set,Ie=async()=>{const E=t.item.customGroup||{},$=E.otherGroupName,D=E.groupInfoMap;($===""||$==null)&&(k.value=!1),e.unref(i)[0]={title:$||"未分组",data:[]};let A=1;for(const z in D)if(Object.prototype.hasOwnProperty.call(D,z)){const _=D[z].map(S=>(re.add(S),{label:S,checked:!1}));e.unref(i)[A]={title:z,data:_},A++}await Fe()},Fe=async()=>{var E;try{const $=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(C),dataViewId:e.unref(N),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:D,data:A=[]}=$.data;if(D){const z=[];(E=A==null?void 0:A.slice(0,200))==null||E.forEach(u=>{re.has(u)||z.push({label:u,checked:!1})}),e.unref(i)[0].data=z}}catch($){console.error($)}};return e.watch(T,E=>{E&&Ie()},{flush:"post"}),n({showModal:I}),{visible:T,title:l,activeKey:c,customGroupList:i,onCancel:q,useOtherGroup:k,selectCount:w,createGroupTitle:s,onAddGroup:O,onDeleteGroup:L,onMoveInGroup:b,selectGroupIndex:m,onEditTitle:g,onTitleChange:h,onFinishEditTitle:y,onUseOtherGroup:K,customGroupEditTitleList:p}}}),ha="",Ca="",to={class:"custom-group-header"},no={class:"move-and-create"},oo={class:"select-tip"},ao={class:"select-count"},ro={class:"create-group"},lo={class:"custom-group-content"},io=["onClick"],co={class:"extra"},so={class:"custom-group-list"},fo={class:"text"};function po(t,n,o,a,r,l){const s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),i=e.resolveComponent("a-button"),d=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-tag"),O=e.resolveComponent("close-outlined"),L=e.resolveComponent("a-checkable-tag"),m=e.resolveComponent("a-collapse-panel"),b=e.resolveComponent("a-collapse"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",to,[e.createElementVNode("div",no,[e.createElementVNode("div",null,[e.createElementVNode("span",oo,[e.createTextVNode(" 已选"),e.createElementVNode("span",ao,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(c,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[0]=y=>t.selectGroupIndex=y),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(y,h)=>(e.openBlock(),e.createBlock(s,{key:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(i,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",ro,[e.createTextVNode(" 创建分组: "),e.createVNode(d,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[1]=y=>t.createGroupTitle=y),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":n[2]||(n[2]=y=>t.useOtherGroup=y),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",lo,[e.createVNode(b,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=y=>t.activeKey=y),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(y,h)=>(e.openBlock(),e.createBlock(m,{key:h},{header:e.withCtx(()=>[t.customGroupEditTitleList[h]?(e.openBlock(),e.createBlock(d,{key:1,class:"edit-title-input",value:y.title,size:"small",onChange:f=>t.onTitleChange(f,h),onBlur:f=>t.onFinishEditTitle(h),onPressEnter:f=>t.onFinishEditTitle(h)},null,8,["value","onChange","onBlur","onPressEnter"])):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(f=>t.onEditTitle(h),["prevent","stop"])},e.toDisplayString(y.title),9,io))]),extra:e.withCtx(()=>[e.createElementVNode("div",co,[h===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(w,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),h!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(O,{onClick:e.withModifiers(f=>t.onDeleteGroup(h),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",so,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.data,(f,V)=>(e.openBlock(),e.createBlock(L,{color:"red",checked:f.checked,"onUpdate:checked":C=>f.checked=C,class:"custom-group",key:V},{default:e.withCtx(()=>[e.createElementVNode("span",fo,e.toDisplayString(f.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const uo=P(eo,[["render",po],["__scopeId","data-v-ca389e04"]]),st="CHANGE_CONDITION",mo=e.defineComponent({name:"Condition",components:{CloseOutlined:rt},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var f,V,C,N,k,M;const n=e.inject(Q),o=e.inject(le),a=e.unref(e.inject(te)),r=e.computed(()=>{var T;return(T=e.unref(n))==null?void 0:T.dataViewId}),l=e.computed(()=>{var T;return(T=e.unref(n))==null?void 0:T.source}),{getDataList:s}=e.inject(he,{getDataList:()=>[]}),c=e.ref({fieldName:(f=t.data)==null?void 0:f.fieldName,fieldType:(V=t.data)==null?void 0:V.fieldType,rule:(C=t.data)==null?void 0:C.rule,id:(N=t.data)==null?void 0:N.id,fieldValue:(k=t.data)==null?void 0:k.fieldValue,label:(M=t.data)==null?void 0:M.label,targetSource:""}),i=e.computed(()=>{const T=t.type;if(T==="classificationList"||T==="seriesList"){let I=[];for(const R in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),R)){const q=e.unref(n)[R];Array.isArray(q)&&(I=I.concat(q))}return I}else if(T==="leftAxisList"||T==="rightAxisList")return e.unref(s());return[]}),{updateCondition:d,deleteCondition:p}=e.inject(st,{updateCondition:(T,I,R)=>{},deleteCondition:(T,I)=>{}}),w=()=>{p(t.level,t.index)};e.watch(c,T=>{d(T,t.level,t.index)},{deep:!0});const O=(T,I)=>{const{name:R,genericType:q,id:K,label:re}=I;c.value={id:K,fieldName:R,fieldType:q,label:re,rule:void 0,fieldValue:void 0,targetSource:""}},L=e.computed(()=>{const T=e.unref(c).fieldType;return T==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}]:T==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}]:T==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),m=e.ref([]),b=async()=>{var T;if(!(e.unref(m).length>0))try{const I=await o.post(`${Z}/diagram/groupvalue`,{source:e.unref(l),dataViewId:e.unref(r),groupColumn:e.unref(c).fieldName,hrpIndexTypeGuid:e.unref(c).id,pageFlag:!0},{headers:{Authentication:a,operateContext:"ygt"}}),{success:R,data:q=[]}=I.data;R&&(m.value=(T=q==null?void 0:q.slice(0,200))==null?void 0:T.map(K=>({label:K,value:K})))}catch(I){console.error(I)}},g=T=>{e.unref(c).rule=T,e.unref(c).fieldValue=void 0,["IN","NOT_IN"].includes(T)&&b()},y=e.ref([]);return{fieldOptions:i,ruleOptions:L,onFieldChange:O,condition:c,valueOptions:m,onRuleChange:g,onFieldValueSelectChange:T=>{y.value=T,e.unref(c).fieldValue=(T==null?void 0:T.join(","))||""},fieldValues:y,onDelete:w}}}),ya="",go={class:"condition"};function ho(t,n,o,a,r,l){const s=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),i=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",go,[e.createVNode(s,{class:"field-name",value:t.condition.fieldName,options:t.fieldOptions,"field-names":{value:"name"},onChange:t.onFieldChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"rule",value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]),["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(s,{key:0,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):(e.openBlock(),e.createBlock(c,{key:1,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[0]||(n[0]=d=>t.condition.fieldValue=d)},null,8,["value"])),e.createVNode(i,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Co=P(mo,[["render",ho],["__scopeId","data-v-4bbb62dd"]]),yo=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Co}}),ba="",bo={key:0,class:"condition-list"},_o={key:0,class:"condition-container"},ko={key:0,class:"condition-text"},wo={key:1,class:"condition-text"},No={class:"conditions"};function So(t,n,o,a,r,l){const s=e.resolveComponent("condition-list",!0),c=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[i.join&&i.conditions&&Array.isArray(i.conditions)?(e.openBlock(),e.createElementBlock("div",_o,[i.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i.join==="||"?(e.openBlock(),e.createElementBlock("div",ko,"或")):e.createCommentVNode("",!0),i.join==="&&"?(e.openBlock(),e.createElementBlock("div",wo,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",No,[i.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,list:i.conditions},null,8,["level","list"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(c,{key:1,class:"condition",data:i,level:t.level,index:d,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Oo=P(yo,[["render",So],["__scopeId","data-v-4eb6cab5"]]),Eo=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Oo},setup(t,{expose:n}){const o=()=>{var m;return`添加过滤条件-${((m=t.item)==null?void 0:m.label)||""}`},a=e.inject(Q),r=e.inject(v),l=e.ref([]),s=e.ref(!1);e.watch(s,m=>{var b,g;m&&Array.isArray((b=t.item)==null?void 0:b.conditions)&&(l.value=(g=t.item)==null?void 0:g.conditions)},{flush:"post"});let c=!1;const i=m=>{var b;c=!0,e.unref(l)==null||((b=e.unref(l))==null?void 0:b.length)===0?l.value=[{}]:e.unref(l)[0]!=null&&(e.unref(l)[0].conditions==null||e.unref(l)[0].join!==m?l.value=[{join:m,conditions:[e.unref(l)[0],{}]}]:e.unref(l)[0].conditions.length>1&&e.unref(l)[0].join===m&&l.value[0].conditions.push({}))};e.provide(st,{updateCondition(m,b,g){var h;c=!0;let y=e.unref(l);for(let f=0;f<b&&y[0];f++)y=(h=y[0])==null?void 0:h.conditions;Array.isArray(y)&&y[g]&&(y[g]=m)},deleteCondition(m,b){var y,h;c=!0;let g=e.unref(l);for(let f=0;f<m&&g[0];f++)g=(y=g[0])==null?void 0:y.conditions;if(Array.isArray(g)&&g[b]&&(g.splice(b,1),g.length===1)){let f=e.unref(l);const V=m-2>0?m-2:0;for(let C=0;C<V&&f[0];C++)f=(h=f[0])==null?void 0:h.conditions;f[0].join===g[0].join?f[0].conditions=[...g[0].conditions,...f[0].conditions.slice(1)]:f[0]=g[0]}}});const d=()=>{var b;const m=((b=e.unref(a)[t.type])==null?void 0:b.slice())||[];m[t.index].conditions=e.unref(l),r({[t.type]:m})},p=()=>{s.value=!0},w=()=>{s.value=!1},O=()=>{c&&d(),c=!1,w()},L=()=>{w()};return n({showModal:p}),{visible:s,onOk:O,onCancel:L,handleTitle:o,conditionList:l,addCondition:i}}}),_a="",To={class:"header"};function Bo(t,n,o,a,r,l){const s=e.resolveComponent("a-button"),c=e.resolveComponent("condition-list"),i=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(i,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",To,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:n[0]||(n[0]=d=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:n[1]||(n[1]=d=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:t.addCondition},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1},8,["onClick"]))]),e.createVNode(c,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1},8,["title","visible","onOk","onCancel"])}const Vo=P(Eo,[["render",Bo],["__scopeId","data-v-7e6cbd68"]]);let Lo=(t=21)=>{let n="",o=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=o[t]&63;a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a<63?n+="_":n+="-"}return n};const $o=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""}},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(Q),a=e.computed(()=>e.unref(o).leftAxisList||[]),r=e.computed(()=>e.unref(o).rightAxisList||[]),l=e.computed(()=>e.unref(o).indicators||[]),s=e.computed(()=>e.unref(o).queryColumnList||[]),c=e.computed(()=>{const p=e.unref(a).concat(e.unref(r)).concat(e.unref(l)).concat(e.unref(s));return(p==null?void 0:p.filter(w=>w.genericType==="NUMBER"))||[]}),i=e.computed({get:()=>t.value||"",set:p=>{n("update:value",p),n("change",p)}});return{fieldList:c,myValue:i,insertText:p=>{i.value=e.unref(i)+"${"+p+"}"}}}}),ka="",Ao={class:"formula-calculation"},Do={class:"field-area"},Io=["onClick"];function Fo(t,n,o,a,r,l){const s=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),i=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode(i,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(s,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Do,[e.createElementVNode("div",null," 数值字段("+e.toDisplayString(t.fieldList.length)+") ",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:p,onClick:w=>t.insertText(d.label)},e.toDisplayString(d.label),9,Io))),128))])]),_:1}),e.createVNode(s,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",value:t.myValue,"onUpdate:value":n[0]||(n[0]=d=>t.myValue=d),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"])]),_:1})]),_:1})])}const Mo=P($o,[["render",Fo],["__scopeId","data-v-bb877ad3"]]),jo=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Mo},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:n}){const o=e.inject(Q),a=e.inject(v),r=e.computed(()=>e.unref(o)[t.type]||[]),l={span:4},s={span:18},c={label:void 0,calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},i=e.ref(c);e.watch(()=>t.item,C=>{if(t.mode==="edit"){const{label:N,calcType:k,formula:M,builtInValueSource:T,builtInFormula:I,builtInCalcWay:R}=C;i.value={label:N,calcType:k,formula:M,builtInValueSource:T,builtInFormula:I,builtInCalcWay:R}}},{immediate:!0,deep:!0});let d=!1;const p=()=>{d=!0},w=()=>{var k;const C=((k=e.unref(o)[t.type])==null?void 0:k.slice())||[],{label:N}=e.unref(i)||{};if(t.mode==="add"){const M=Lo();C.push({...e.unref(i),id:M,show:!0,name:N})}else t.mode==="edit"&&(C[t.index]={...C[t.index],...e.unref(i),name:N});a({[t.type]:C})},O=e.ref(!1),L=()=>{O.value=!0},m=()=>{O.value=!1},b=e.ref({label:[{required:!0,message:"请输入指标名"}],calcType:[{required:!0,message:"请选择计算方式"}],formula:[{required:!0,message:"请选择计算公式"}]}),{validate:g,validateInfos:y,clearValidate:h}=Y.Form.useForm(i,b),f=()=>{g().then(()=>{d&&w(),d=!1,i.value=c,m()})},V=()=>{i.value=c,h(),m()};return n({showModal:L}),{visible:O,onCancel:V,labelCol:l,wrapperCol:s,formState:i,builtInValueSourceList:r,onOK:f,onChange:p,validateInfos:y}}});function Po(t,n,o,a,r,l){const s=e.resolveComponent("a-input"),c=e.resolveComponent("a-form-item"),i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),w=e.resolveComponent("a-textarea"),O=e.resolveComponent("a-form"),L=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(L,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"50vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(O,{model:t.formState},{default:e.withCtx(()=>[e.createVNode(c,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.label,"onUpdate:value":n[0]||(n[0]=m=>t.formState.label=m),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=m=>t.formState.calcType=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(i,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(i,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":n[2]||(n[2]=m=>t.formState.formula=m),onChange:t.onChange},null,8,["value","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(c,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInFormula,"onUpdate:value":n[3]||(n[3]=m=>t.formState.builtInFormula=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(i,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取值来源","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInValueSource,"onUpdate:value":n[4]||(n[4]=m=>t.formState.builtInValueSource=m),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(m,b)=>(e.openBlock(),e.createBlock(i,{key:b,value:m.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取值原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(d,{value:t.formState.builtInCalcWay,"onUpdate:value":n[5]||(n[5]=m=>t.formState.builtInCalcWay=m),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_RANK","BUILT_IN_RANK_IN_GROUPO"].includes(t.formState.builtInValueSource||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(i,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(i,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(i,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(i,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(i,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(c,{label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(w,{rows:6,disabled:""})]),_:1},8,["label-col","wrapper-col"])],64)):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","visible","onOk","onCancel"])}const xo=P(jo,[["render",Po]]),Go=e.defineComponent({name:"DataConfigCard",components:{CalculationModal:xo,FilterModal:Vo,CustomGroupModal:uo,SettingOutlined:Fn,DeleteOutlined:Tn,CustomSortModal:vn,PlusOutlined:$n},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const n=e.inject(Q),o=e.inject(v),a=(u="{}")=>{var _;try{const S=JSON.parse(u),B=((_=e.unref(n)[t.type])==null?void 0:_.slice())||[];["classificationList","seriesList"].includes(t.type)&&B.forEach(F=>{F.show=!1}),B.push(S),o({[t.type]:B})}catch(S){console.error(S)}},r=(u="{}")=>{var _;try{const{cardItem:S,type:B,index:F}=JSON.parse(u);if(B===t.type)return;const j=((_=e.unref(n)[t.type])==null?void 0:_.slice())||[];j.push(S);const x=e.unref(n)[B].slice()||[];x.splice(F,1),o({[t.type]:j,[B]:x})}catch(S){console.error(S)}},l=(u,_)=>{var F,j;const S=(F=u.target)==null?void 0:F.checked,B=((j=e.unref(n)[t.type])==null?void 0:j.slice())||[];["classificationList","seriesList"].includes(t.type)&&B.forEach(x=>{x.show=!1}),B[_].show=S,o({[t.type]:B})},s=(u,_,S)=>{var B;(B=u.dataTransfer)==null||B.setData("card-item",JSON.stringify({cardItem:_,type:t.type,index:S}))},c=u=>{var S;const _=((S=e.unref(n)[t.type])==null?void 0:S.slice())||[];_.splice(u,1),o({[t.type]:_})},i=u=>{var B,F;const _=(B=u.dataTransfer)==null?void 0:B.getData("list-item"),S=(F=u.dataTransfer)==null?void 0:F.getData("card-item");_?a(_):S&&r(S)},d=()=>{},p=e.computed(()=>e.unref(n)[t.type]||[]),w=e.ref([]);let O=!1;e.watch(()=>e.unref(p).length,u=>{w.value=new Array(u).fill(!1)},{flush:"post",immediate:!0});const L=u=>{var S;const _=((S=e.unref(n)[t.type])==null?void 0:S.slice())||[];_.splice(u,1),o({[t.type]:_})},m=u=>{w.value[u]=!0},b=()=>{O=!0},g=(u,_)=>{var S,B;if(w.value[_]=!1,O){const F=(S=u.target)==null?void 0:S.value,j=((B=e.unref(n)[t.type])==null?void 0:B.slice())||[];j[_].label=F,o({[t.type]:j})}O=!1},y="DEFAULT",h=e.computed(()=>{const u=e.unref(n)[t.type]||[],{leftAxisList:_=[],rightAxisList:S=[],indicators:B=[]}=e.unref(n)||{};return[{id:y,label:"默认",name:"默认"},...u,..._,...S,...B]}),f=(u={},_,S="ASC")=>{var ge;const{label:B,name:F,id:j}=u,x=((ge=e.unref(n)[t.type])==null?void 0:ge.slice())||[];j===y?delete x[_].sort:x[_].sort={label:B,columnName:F,type:"NORMAL",order:S},o({[t.type]:x})},V=(u={},_="ASC")=>{const B={ASC:"升序",DESC:"降序"}[_],{sort:F}=u,{label:j,order:x}=F||{};return j&&x===_?`${B}(${j})`:B},C=e.ref(),N=e.ref(),k=e.ref(),M=e.ref(),T=(u={},_)=>{var S;C.value=u,N.value=_,(S=e.unref(k))==null||S.showModal()},I=u=>{var _;return"自定义排序"+(((_=u==null?void 0:u.sort)==null?void 0:_.type)==="CUSTOM"?"(已配置)":"")},R=(u={},_)=>{var S;C.value=u,N.value=_,(S=e.unref(M))==null||S.showModal()},q=u=>"自定义分组"+((u==null?void 0:u.customGroup)!=null?"(已配置)":""),K=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],re=(u,_)=>{var B;const S=((B=e.unref(n)[t.type])==null?void 0:B.slice())||[];S[_].aggregate=u,o({[t.type]:S})},Ie=(u="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[u]})`,Fe=(u={})=>{var _;return"过滤"+(u!=null&&u.conditions&&((_=u==null?void 0:u.conditions)==null?void 0:_.length)>0?"(已配置)":"")},E=e.ref(),$=(u={},_)=>{C.value=u,N.value=_,e.unref(E).showModal()},D=e.ref(),A=e.ref("add");return{onCheckboxChange:l,onDrop:i,onDropStart:s,onDropEnd:c,onDragover:d,cardItemList:p,onDelete:L,onEdit:m,onCommitLabelChange:g,sortList:h,onSort:f,handleSortTitle:V,showCustomSortModal:T,customSortModalRef:k,currentItem:C,currentIndex:N,handleCustomSortTitle:I,handleCustomGroupTitle:q,customGroupModalRef:M,showCustomGroupModal:R,editLabelList:w,onLabelChange:b,aggregateList:K,onAggregateChange:re,handleAggregateTitle:Ie,onShowCalculationModal:(u,_,S)=>{var B;A.value=u,u==="edit"&&(C.value=_,N.value=S),(B=e.unref(D))==null||B.showModal()},handleFilterTitle:Fe,filterModalRef:E,showFilterModal:$,calculationModalRef:D,calculationModalMode:A}}}),wa="",Na="",Ro=t=>(e.pushScopeId("data-v-62aff348"),t=t(),e.popScopeId(),t),Uo={class:"title"},qo={class:"title-text"},zo=Ro(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Ho=["onDragstart"],Wo={class:"card-item-inner"},Qo=["onClick"],Xo=["onClick"],Jo=["onClick"];function Ko(t,n,o,a,r,l){const s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),i=e.resolveComponent("setting-outlined"),d=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-sub-menu"),w=e.resolveComponent("a-menu-divider"),O=e.resolveComponent("a-menu"),L=e.resolveComponent("a-dropdown"),m=e.resolveComponent("delete-outlined"),b=e.resolveComponent("a-checkbox"),g=e.resolveComponent("custom-sort-modal"),y=e.resolveComponent("custom-group-modal"),h=e.resolveComponent("filter-modal"),f=e.resolveComponent("calculation-modal"),V=e.resolveComponent("a-card");return e.openBlock(),e.createBlock(V,{class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",minHeight:"38px",padding:"0 10px"},onDragover:n[2]||(n[2]=e.withModifiers(()=>{},["prevent","stop"])),onDrop:e.withModifiers(t.onDrop,["prevent","stop"])},{title:e.withCtx(()=>[e.createElementVNode("div",Uo,[e.createElementVNode("div",qo,e.toDisplayString(t.title),1),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[0]||(n[0]=e.withModifiers(C=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),zo]))])]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cardItemList,(C,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,draggable:!0,onDragstart:e.withModifiers(k=>t.onDropStart(k,C,N),["stop"]),onDragover:n[1]||(n[1]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(b,{class:"card-item",checked:C.show,onChange:k=>t.onCheckboxChange(k,N)},{default:e.withCtx(()=>[e.createElementVNode("div",Wo,[!t.editLabelList[N]&&C.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(k=>t.onEdit(N),["prevent","stop"])},e.toDisplayString(C.label),9,Qo)):e.createCommentVNode("",!0),!t.editLabelList[N]&&!C.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(k=>t.onEdit(N),["prevent","stop"])}," 请点击填入名字 ",8,Xo)):e.createCommentVNode("",!0),t.editLabelList[N]?(e.openBlock(),e.createBlock(c,{key:2,"default-value":C.label,size:"small",onBlur:k=>t.onCommitLabelChange(k,N),onPressEnter:k=>t.onCommitLabelChange(k,N),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])):e.createCommentVNode("",!0),["FORMULA","BUILT_IN"].includes(C.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(k=>t.onShowCalculationModal("edit",C,N),["prevent","stop"])}," fx ",8,Jo)):e.createCommentVNode("",!0),e.createVNode(L,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(O,null,{default:e.withCtx(()=>[["classificationList","seriesList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p,{title:t.handleSortTitle(C,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(d,{style:{"white-space":"nowrap"},key:k.id,onClick:M=>t.onSort(k,N,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(p,{title:t.handleSortTitle(C,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(d,{class:"menu-item",style:{"white-space":"nowrap"},key:k.id,onClick:M=>t.onSort(k,N,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(d,{onClick:k=>t.showCustomSortModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(w),e.createVNode(d,{onClick:k=>t.showCustomGroupModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(w)],64)):e.createCommentVNode("",!0),e.createVNode(d,{onClick:k=>t.showFilterModal(C,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(C)),1)]),_:2},1032,["onClick"]),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(p,{title:t.handleAggregateTitle(C.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,k=>(e.openBlock(),e.createBlock(d,{style:{"white-space":"nowrap"},key:k.value,onClick:M=>t.onAggregateChange(k.value,N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(i,{class:"setting-icon"})]),_:2},1024),e.createVNode(m,{class:"delete-icon",onClick:e.withModifiers(k=>t.onDelete(N),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])],40,Ho))),128)),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(y,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(h,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(f,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style","onDrop"])}const Yo=P(Go,[["render",Ko],["__scopeId","data-v-62aff348"]]),Zo={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"}},vo=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yo},setup(){const t=e.inject(de),n=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),o=e.ref({}),a=e.reactive([]);return(()=>{var O;const l={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList","rightAxisList"],line:["classificationList","seriesList","leftAxisList","rightAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],table:["queryColumnList"]},s="ecan";let c=e.unref(n);const i=s.length;c=((O=c.slice(i,i+1))==null?void 0:O.toLowerCase())+c.slice(i+1);const d=l[c],p=Zo,w=(d==null?void 0:d.length)||0;for(let L=0;L<w;L++){const m=d[L];if(!m)break;a.push({...p[m],type:m})}})(),{cardsMap:o,cards:a}}}),Sa="",Oa="",ea={class:"data-group"};function ta(t,n,o,a,r,l){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",ea,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,c=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:c.type,class:"data-config-card",type:c.type},c),null,16,["type"]))),128))])}const na=P(vo,[["render",ta],["__scopeId","data-v-af3bb33a"]]),oa=e.defineComponent({name:"DataConfig",components:{DataGroup:na},setup(){const t=e.ref("1"),n=e.ref(),o=e.inject(de),a=e.inject(Q),r=e.computed(()=>{const c=ee.cloneDeep(e.unref(o)),i=ee.pick(c,ee.without(Object.keys(c),"position","top","left","width","height"));i.height="290px";const d=ee.cloneDeep(e.unref(a));return d.pageMode="design",d.preview=!0,{...i,graphicConfig:d,toolboxShow:!1}}),l=e.computed(()=>{var c;return(c=e.unref(r))==null?void 0:c.type}),s=()=>{var i;const c=(i=e.unref(n))==null?void 0:i.refreshData;typeof c=="function"&&c()};return e.watch(a,()=>{s()},{deep:!0,flush:"post"}),e.onMounted(()=>{s()}),{activeKey:t,componentRef:n,type:l,component:r}}}),Ea="",aa={class:"data-config"};function ra(t,n,o,a,r,l){const s=e.resolveComponent("data-group"),c=e.resolveComponent("a-tab-pane"),i=e.resolveComponent("a-tabs");return e.openBlock(),e.createElementBlock("div",aa,[e.createVNode(i,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=d=>t.activeKey=d)},{default:e.withCtx(()=>[e.createVNode(c,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1},8,["activeKey"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({class:"component"},t.component,{ref:"componentRef"}),null,16))])}const la=P(oa,[["render",ra],["__scopeId","data-v-46f23f8b"]]),ia=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Xn,DataConfig:la},props:{source:String,indicatorToken:String,selectedComponent:Object},setup(t,{expose:n}){const o=e.computed(()=>t.source),a=e.computed(()=>t.indicatorToken),r=e.computed(()=>t.selectedComponent);let l=e.unref(r).graphicConfig?ee.cloneDeep(e.unref(r).graphicConfig):e.ref({});l=e.ref(l);const s=e.ref([]),c=p=>{s.value=p},i=p=>{l.value={...e.unref(l),...e.unref(p)}},d=()=>s;e.provide(he,{setDataList:c,getDataList:d}),e.provide(de,r),e.provide(Q,l),e.provide(Me,o),e.provide(te,a),e.provide(v,i),n({graphicConfig:l})}}),Ta="",ca={class:"config-modal"},sa={class:"config-modal-left"},da={class:"config-modal-right"};function fa(t,n,o,a,r,l){const s=e.resolveComponent("data-list"),c=e.resolveComponent("data-config");return e.openBlock(),e.createElementBlock("div",ca,[e.createElementVNode("div",sa,[e.createVNode(s)]),e.createElementVNode("div",da,[e.createVNode(c)])])}const dt=mt(P(ia,[["render",fa],["__scopeId","data-v-e0b37acc"]])),ft=Object.freeze(Object.defineProperty({__proto__:null,EcanIndicatorLibrary:dt},Symbol.toStringTag,{value:"Module"})),pa={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(ft).forEach(a=>{const r=ft[a];r.install&&t.use(r)})}};H.EcanIndicatorLibrary=dt,H.default=pa,Object.defineProperties(H,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@0.
|
|
2
|
-
.data-view-list[data-v-97e32d62]{display:flex;flex-direction:column;height:100%}.columns[data-v-97e32d62]{height:100%;overflow:auto;flex:1;padding-top:10px}.column-item[data-v-97e32d62]{display:flow-root;margin:3px 0;padding:2px 0}.column-item[data-v-97e32d62]:hover{background:#eee}.column-item-name[data-v-97e32d62]{margin-left:5px}.data-source-list[data-v-874ad438]{display:flex;flex-direction:column;height:100%}.columns[data-v-874ad438]{height:100%;overflow:auto;flex:1;padding-top:10px}.column-item[data-v-874ad438]{display:flow-root;margin:3px 0;padding:2px 0}.column-child-item[data-v-874ad438]{padding:3px 10px}.button-wrapper[data-v-edda5b08]{width:100%;display:flex;justify-content:flex-end;margin-bottom:10px}.custom-sort-list[data-v-edda5b08]{width:100%;overflow:auto;height:70vh;list-style:none;padding-bottom:60px}.sort-item[data-v-edda5b08]{border:1px dashed #aaa;margin-bottom:5px;padding:5px;font-size:14px}.move-and-create[data-v-ca389e04]{display:flex;justify-content:space-between;margin-bottom:15px}.create-group[data-v-ca389e04]{display:flex;align-items:center;font-size:15px}.create-group-name[data-v-ca389e04]{width:140px;margin-left:10px}.custom-group-content[data-v-ca389e04]{overflow-y:auto}.tag[data-v-ca389e04]{margin-right:10px}.edit-title-input[data-v-ca389e04]{width:150px}.extra[data-v-ca389e04]{width:90px;display:flex;justify-content:flex-start;align-items:center}.custom-group[data-v-ca389e04]{margin:5px;padding:3px 5px}.text[data-v-ca389e04]{font-size:14px}.select-tip[data-v-ca389e04]{margin-right:10px;font-size:15px}.select-count[data-v-ca389e04]{color:red;margin:0 3px}.select-group[data-v-ca389e04]{margin-right:15px;width:140px}.cancel-button[data-v-ca389e04]{margin-right:20px}.footer[data-v-ca389e04]{display:flex}.custom-group-content .ant-collapse>.ant-collapse-item>.ant-collapse-header{padding:12px 0}.condition[data-v-4bbb62dd]{padding:8px;border:1px solid #e8e8e8;width:100%;display:flex;align-items:center}.field-name[data-v-4bbb62dd]{width:180px;margin-right:20px}.field-value[data-v-4bbb62dd]{flex:1;margin-left:20px;margin-right:20px}.rule[data-v-4bbb62dd]{width:180px}.delete-icon[data-v-4bbb62dd]{margin-right:10px}.condition-text[data-v-4eb6cab5]{min-width:50px;max-width:50px;border:1px solid #e8e8e8;display:flex;align-items:center;justify-content:center}.condition-container[data-v-4eb6cab5]{display:flex;width:100%}.conditions[data-v-4eb6cab5]{display:flex;flex-direction:column;flex:1}.header[data-v-7e6cbd68]{display:flex;justify-content:flex-end;margin-bottom:30px}.add-and-condition[data-v-7e6cbd68]{width:100px;margin-right:15px}.add-or-condition[data-v-7e6cbd68]{width:100px}.formula-calculation[data-v-bb877ad3]{border:1px solid #ccc;width:100%}[theme=dark] .formula-calculation[data-v-bb877ad3]{border:1px solid #333}.field-area[data-v-bb877ad3]{height:100%;padding-left:20px;padding-top:20px;background:#eff1f4}[theme=dark] .field-area[data-v-bb877ad3]{background:#333}.field[data-v-bb877ad3]{margin-top:10px;padding-left:15px;font-weight:500}.textarea[data-v-bb877ad3]{height:100%}.data-config-card[data-v-62aff348]{display:flex;flex-direction:column;height:280px}.card-item[data-v-62aff348]{background-color:#a1d4e64d;width:100%;height:100%;padding:5px;margin:3px 0}.title[data-v-62aff348]{display:flex;justify-content:space-between}.add-calculation[data-v-62aff348]{cursor:pointer;font-size:13px;color:#3f8ce8;line-height:24px}.add-calculation-icon[data-v-62aff348]{color:#3f8ce8;margin-right:3px}.ant-checkbox+span[data-v-62aff348]{width:100%!important}.card-item-inner[data-v-62aff348]{width:100%;display:flex;justify-content:space-between;align-items:center}.name[data-v-62aff348]{width:100%}.placeholder[data-v-62aff348]{color:red}.setting-icon[data-v-62aff348]{color:#545;margin-left:5px}.delete-icon[data-v-62aff348]{color:red;margin-left:5px}.calculation-icon[data-v-62aff348]{font-weight:700;font-style:italic}.menu-item[data-v-62aff348]{white-space:nowrap}.data-config-card .ant-card-body{overflow-y:auto}.card-item .ant-checkbox+span{width:100%}.data-group[data-v-af3bb33a]{display:flex}.data-config-card[data-v-af3bb33a]{width:25%}.data-config-card[data-v-af3bb33a]:not(:last-child){margin-right:15px}.data-group .ant-card-body{padding:10px}.data-config[data-v-
|
|
1
|
+
/*! @ecan-bi/indicator-library@0.2.0 */
|
|
2
|
+
.data-view-list[data-v-97e32d62]{display:flex;flex-direction:column;height:100%}.columns[data-v-97e32d62]{height:100%;overflow:auto;flex:1;padding-top:10px}.column-item[data-v-97e32d62]{display:flow-root;margin:3px 0;padding:2px 0}.column-item[data-v-97e32d62]:hover{background:#eee}.column-item-name[data-v-97e32d62]{margin-left:5px}.data-source-list[data-v-874ad438]{display:flex;flex-direction:column;height:100%}.columns[data-v-874ad438]{height:100%;overflow:auto;flex:1;padding-top:10px}.column-item[data-v-874ad438]{display:flow-root;margin:3px 0;padding:2px 0}.column-child-item[data-v-874ad438]{padding:3px 10px}.button-wrapper[data-v-edda5b08]{width:100%;display:flex;justify-content:flex-end;margin-bottom:10px}.custom-sort-list[data-v-edda5b08]{width:100%;overflow:auto;height:70vh;list-style:none;padding-bottom:60px}.sort-item[data-v-edda5b08]{border:1px dashed #aaa;margin-bottom:5px;padding:5px;font-size:14px}.move-and-create[data-v-ca389e04]{display:flex;justify-content:space-between;margin-bottom:15px}.create-group[data-v-ca389e04]{display:flex;align-items:center;font-size:15px}.create-group-name[data-v-ca389e04]{width:140px;margin-left:10px}.custom-group-content[data-v-ca389e04]{overflow-y:auto}.tag[data-v-ca389e04]{margin-right:10px}.edit-title-input[data-v-ca389e04]{width:150px}.extra[data-v-ca389e04]{width:90px;display:flex;justify-content:flex-start;align-items:center}.custom-group[data-v-ca389e04]{margin:5px;padding:3px 5px}.text[data-v-ca389e04]{font-size:14px}.select-tip[data-v-ca389e04]{margin-right:10px;font-size:15px}.select-count[data-v-ca389e04]{color:red;margin:0 3px}.select-group[data-v-ca389e04]{margin-right:15px;width:140px}.cancel-button[data-v-ca389e04]{margin-right:20px}.footer[data-v-ca389e04]{display:flex}.custom-group-content .ant-collapse>.ant-collapse-item>.ant-collapse-header{padding:12px 0}.condition[data-v-4bbb62dd]{padding:8px;border:1px solid #e8e8e8;width:100%;display:flex;align-items:center}.field-name[data-v-4bbb62dd]{width:180px;margin-right:20px}.field-value[data-v-4bbb62dd]{flex:1;margin-left:20px;margin-right:20px}.rule[data-v-4bbb62dd]{width:180px}.delete-icon[data-v-4bbb62dd]{margin-right:10px}.condition-text[data-v-4eb6cab5]{min-width:50px;max-width:50px;border:1px solid #e8e8e8;display:flex;align-items:center;justify-content:center}.condition-container[data-v-4eb6cab5]{display:flex;width:100%}.conditions[data-v-4eb6cab5]{display:flex;flex-direction:column;flex:1}.header[data-v-7e6cbd68]{display:flex;justify-content:flex-end;margin-bottom:30px}.add-and-condition[data-v-7e6cbd68]{width:100px;margin-right:15px}.add-or-condition[data-v-7e6cbd68]{width:100px}.formula-calculation[data-v-bb877ad3]{border:1px solid #ccc;width:100%}[theme=dark] .formula-calculation[data-v-bb877ad3]{border:1px solid #333}.field-area[data-v-bb877ad3]{height:100%;padding-left:20px;padding-top:20px;background:#eff1f4}[theme=dark] .field-area[data-v-bb877ad3]{background:#333}.field[data-v-bb877ad3]{margin-top:10px;padding-left:15px;font-weight:500}.textarea[data-v-bb877ad3]{height:100%}.data-config-card[data-v-62aff348]{display:flex;flex-direction:column;height:280px}.card-item[data-v-62aff348]{background-color:#a1d4e64d;width:100%;height:100%;padding:5px;margin:3px 0}.title[data-v-62aff348]{display:flex;justify-content:space-between}.add-calculation[data-v-62aff348]{cursor:pointer;font-size:13px;color:#3f8ce8;line-height:24px}.add-calculation-icon[data-v-62aff348]{color:#3f8ce8;margin-right:3px}.ant-checkbox+span[data-v-62aff348]{width:100%!important}.card-item-inner[data-v-62aff348]{width:100%;display:flex;justify-content:space-between;align-items:center}.name[data-v-62aff348]{width:100%}.placeholder[data-v-62aff348]{color:red}.setting-icon[data-v-62aff348]{color:#545;margin-left:5px}.delete-icon[data-v-62aff348]{color:red;margin-left:5px}.calculation-icon[data-v-62aff348]{font-weight:700;font-style:italic}.menu-item[data-v-62aff348]{white-space:nowrap}.data-config-card .ant-card-body{overflow-y:auto}.card-item .ant-checkbox+span{width:100%}.data-group[data-v-af3bb33a]{display:flex}.data-config-card[data-v-af3bb33a]{width:25%}.data-config-card[data-v-af3bb33a]:not(:last-child){margin-right:15px}.data-group .ant-card-body{padding:10px}.data-config[data-v-46f23f8b]{background:#fff;height:100%;width:100%;padding:0 15px;overflow-y:auto;color:#444}.component[data-v-46f23f8b]{width:100%!important;position:relative!important;margin:20px auto 0}.config-modal[data-v-e0b37acc]{width:100%;height:100%;display:flex;padding:10px}.config-modal-left[data-v-e0b37acc]{width:300px;height:100%;margin-right:10px;padding:10px}.config-modal-right[data-v-e0b37acc]{flex:1}
|