@ecan-bi/pivot-table 1.0.71 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DrillModal-36f4c56e.mjs → DrillModal-5d7b2b16.mjs} +3 -3
- package/dist/{DrillModal-36f4c56e.mjs.map → DrillModal-5d7b2b16.mjs.map} +1 -1
- package/dist/{index-d073710e.mjs → index-f06fe9ac.mjs} +434 -434
- package/dist/{index-d073710e.mjs.map → index-f06fe9ac.mjs.map} +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/pivot-table@1.0.
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.72 */
|
|
2
2
|
(function(Je,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue"),require("dayjs"),require("lodash-es"),require("axios"),require("ant-design-vue"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("echarts"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","lodash-es","axios","ant-design-vue","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","echarts","vuedraggable"],v):(Je=typeof globalThis<"u"?globalThis:Je||self,v(Je["@ecan-bi/pivot-table"]={},Je.Vue,Je.Dayjs,Je.LodashEs,Je.Axios,Je.AntDesignVue,null,null,Je.Echarts,Je.Draggable))})(this,function(Je,v,Fo,Ue,DB,Gi,nX,oX,OB,Hb){"use strict";function zB(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const NB=zB(OB),WB=i=>(i.install=t=>{t.component(i.name,i)},i);function Eb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const VB=()=>{},jB=Object.assign,$B=Array.isArray,mf=i=>typeof i=="function",GB=i=>typeof i=="symbol";let Lb;const vf=()=>Lb||(Lb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function bf(i){const t=i&&i.__v_raw;return t?bf(t):i}function kb(i){return!(!i||i.__v_isRef!==!0)}function Mi(i){return kb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(GB));const Ur=[];function Cf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Ur.length?Ur[Ur.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Ur[Ur.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)yf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${jb(e,r.type)}>`).join(`
|
|
3
3
|
`),o]);else{const r=[`[Vue warn]: ${i}`,...t];o.length&&r.push(`
|
|
4
4
|
`,...function(s){const l=[];return s.forEach((a,h)=>{l.push(...h===0?[]:[`
|
|
@@ -370,5 +370,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
370
370
|
}else{
|
|
371
371
|
return false
|
|
372
372
|
}
|
|
373
|
-
}`;return Function(`"use strict";return (${q})`)().call(this,K)}function $Y(V){A.value=!0;const{value:K,key:q}=V;v.unref(x)[q]=K,hn({type:"6",data:{key:q,value:K}}),yY()}function Zl(){return n==null?void 0:n.getDrawRange()}const ff=v.ref([]),HB=v.ref(""),EB=v.ref(),GY=(V,K)=>{var Ot,We,Rn,qn,ji;const q=K.dataViewColumns[V.oldIndex]||{},{scope:J}=q;let X=!1,Q=!1;["IDX","BUILT_IN_IDX"].includes(J)?X=!0:["DIM","BUILT_IN_DIM"].includes(J)&&(Q=!0);const tt=Zl(),{rows:ft,columns:Pt,indicators:Qt,records:Ht}=dt,{top:Lt,left:te}=tt;if(v.unref(Oe)){let Xe=i.height;i.isIframeMode&&(Xe=document.body.clientHeight+"px");let oi=v.unref(Be).width;oi.includes("calc")&&(oi=v.unref(Tt)-v.unref(E)+"px"),k.value.main={width:oi,height:Xe,top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)-ae*2+"px",top:0,left:0},k.value.columns={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)/3-ae*2+"px",top:0,left:parseFloat(oi)/2+"px"},k.value.indicators={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)*2/3-ae*2+"px",top:parseFloat(Xe)/3+"px",left:parseFloat(oi)/2+"px"}}else{let Xe=50;(Ot=v.unref(Kt))!=null&&Ot.length?Xe=v.unref($).clientHeight:Q&&(U.value=!0,v.unref(oe).height=Xe+"px");let oi=0,$i=1;const Wt=n.getRowHeight(0),ie={columnHeaderTitle:!0};if(Pt!=null&&Pt.length?$i+=Pt.length:ie.columns=[{dimensionKey:jr(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{oi+=n.getColWidth(Ge)}):(oi=100,ie.rows=[{dimensionKey:jr(6),title:"",width:"100px",type:"rows"}]),Qt!=null&&Qt.length||(ie.indicators=[{indicatorKey:jr(6),title:"",width:"20%",format:()=>""}]),(We=Object.keys(ie))!=null&&We.length){const{rows:Ze=[],columns:Ge=[]}=ie;let ze=[];Ht!=null&&Ht.length?ze=Ue.cloneDeep(Ht):(qn=(Rn=v.unref(O))==null?void 0:Rn.records)!=null&&qn.length&&(ze=Ue.cloneDeep((ji=v.unref(O))==null?void 0:ji.records));let Fi=Pt.map(Tn=>Tn.dimensionKey);if(!(Fi!=null&&Fi.length)&&(Ge!=null&&Ge.length)&&(Fi=[Ge[0].dimensionKey]),ze!=null&&ze.length)for(const Tn of ze){for(const Qh of Ze)Tn[Qh.dimensionKey]="";let Jh=!1;for(const Qh in Tn)if(Fi.includes(Qh)){Jh=!0;break}Q?Jh||($i=2,Tn[Fi[0]]=""):X&&(Jh||($i=1))}n.updateOption({...dt,...ie,records:ze})}v.nextTick(()=>{var Fi;const Ze=Zl(),Ge=Ze.width,ze=Ze.height;k.value.main={width:Ge+"px",height:ze+Xe+"px",top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:oi-ae*2+"px",height:ze-ae*2+"px",top:Xe+"px",left:0},k.value.columns={width:Ge-oi-ae*2+"px",height:$i*Wt-ae*2+"px",top:Xe+"px",left:oi+"px"},k.value.indicators={width:Ge-oi-ae*2+"px",height:ze-$i*Wt-ae*2+"px",top:$i*Wt+((Fi=v.unref(Kt))!=null&&Fi.length?Xe:0)+"px",left:oi+"px"},k.value.filters={width:Ge-ae*2+"px",height:Xe-ae*2+"px",top:0,left:0}})}I.value=q,X?ff.value=[0,1]:Q&&(ff.value=[2])},UY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...dt,records:v.unref(O).records}):n.updateOption(dt),U.value=!1,v.unref(oe).height="",ff.value=[]},KY=()=>{var V;(V=v.unref(EB))==null||V.handleSearch(v.unref(HB))},LB=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:k.value,showTreeData:L.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:rt,sourceListStyle:ht.value,dimensionFieldList:At.value,indicatorFieldList:mt.value,computedIndKeys:qt.value,computedIndMap:fe.value,computedIndFieldMap:Yt.value,option:dt,loadingRect:Ti.value,calculateList:Lo.value,filterList:Xn.value,topNumMap:$r.value,sortMap:An.value,customDimensions:Fs.value,customIndicators:Kl.value,customRowKeys:Yl.value,customColKeys:Xl.value,cacheResData:Y.value,toolBoxStyle:Gr.value,scrollTop:W.value,scrollLeft:N.value}));let mb=null;v.watch(LB,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});function hn({type:V,data:K}){ct.value=V,e("tableChange",{type:V,data:K})}function YY(){!i.isAllowSaveConfig||!v.unref(ct)||["5"].includes(v.unref(ct))||(mb&&clearTimeout(mb),mb=setTimeout(()=>{hb("save",{keyName:i.relateKeyName||i.keyName,data:v.unref(LB)})},500))}const vb=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,k.value=V.dragAreaStyle,L.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,rt=V.splitSymbol,ht.value=V.sourceListStyle,At.value=V.dimensionFieldList,mt.value=V.indicatorFieldList,qt.value=V.computedIndKeys,fe.value=V.computedIndMap,Yt.value=V.computedIndFieldMap,Ti.value=V.loadingRect,Lo.value=V.calculateList,Xn.value=V.filterList,$r.value=V.topNumMap,An.value=V.sortMap,Fs.value=V.customDimensions,Kl.value=V.customIndicators,Yl.value=V.customRowKeys,Xl.value=V.customColKeys,Y.value=V.cacheResData,Gr.value=V.toolBoxStyle,W.value=V.scrollTop,N.value=V.scrollLeft,Object.assign(dt,V.option),dt.theme=Nt};async function XY(V){var K,q,J;if(A.value=!0,V)vb(V);else if(i.isAllowSaveConfig){const X=await hb("get",{keyName:i.relateKeyName||i.keyName}),Q=((q=(K=X==null?void 0:X.data)==null?void 0:K.data)==null?void 0:q.searchMap)||{};Q!=null&&Q.data&&!Array.isArray(Q.data)&&((J=Object.keys(Q.data))!=null&&J.length)&&vb(Q.data)}gr()}function qY(){return{dimensions:v.unref(At),indicators:v.unref(mt)}}const ZY=V=>{const{scope:K,name:q,label:J}=V;let X=[];["IDX","BUILT_IN_IDX"].includes(K)?X=v.unref(mt):["DIM","BUILT_IN_DIM"].includes(K)&&(X=v.unref(At));const Q=X.findIndex(tt=>tt.name===q);if(Q!==-1){delete v.unref(a)[X[Q].label];const tt=v.unref(Xn).findIndex(ft=>ft.key===J);tt!==-1&&v.unref(Xn).splice(tt,1),X[Q].show?X[Q].isInnerFilter=!1:X.splice(Q,1)}A.value=!0,hn({type:"10",data:{dimensions:v.unref(At),indicators:v.unref(mt)}}),ql()},JY=V=>{const{scope:K,label:q,showTitle:J}=V,X=eP(K);X==="indicator"||X==="dimension"&&TB({dimensionKey:q,value:J})};t({option:dt,refreshData:XY,reRenderTable:vb,click:MB,getDrawRange:Zl,getSaveData:qY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],()=>{kB()},{immediate:!0,deep:!0});function kB(){const{queryColumnList:V=[],indicators:K=[]}=i.graphicConfig,q=Ue.cloneDeep(V),J=Ue.cloneDeep(K);for(const X of q){const Q=i.dimensionList.find(tt=>tt.key===X.name);X.positionType=(Q==null?void 0:Q.position)||"rows",X.showTitle=X.title||X.label,Q&&(X.width=Q.width)}for(const X of J){const Q=i.indicatorList.find(tt=>tt.key===X.name);X.width=Q==null?void 0:Q.width,X.showTitle=X.label}At.value=q,mt.value=J}const QY=()=>{o.value=!1,L.value=!L.value},tX=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},eX=V=>{const K=v.unref(At).find(Q=>Q.label===V),q=v.unref(mt).find(Q=>Q.label===V),J=K||q,X=v.unref(a)[V];return X?J.genericType==="DATE"?Array.isArray(X)?`${X[0].value}~${X[1].value}`:X.value:X.value&&Array.isArray(X.value)?X.value.join("、"):"":""},iX=V=>V.parentNode;return v.onMounted(()=>{ye()}),{showDefaultTableArea:Oe,maskList:ff,styleData:kt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Ti,loading:A,isTableInit:o,toolBoxStyle:Gr,indSourceRef:EB,searchText:HB,dragAreaStyle:k,offsetWidth:Ft,showTreeData:L,dataIconStyle:Ee,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Be,innerFilterStyle:oe,innerFilterFieldList:Kt,innerFilterRef:$,showFilterWrap:U,customDimensions:Fs,indicatorFieldList:mt,dimensionFieldList:At,pivotWrapStyle:R,fontSize:et,click:MB,onFilterChange:VY,pivotDetailRef:w,handleFormat:BB,handleCondition:jY,handleAggregate:SY,handleGetTop:$Y,handleConfig:DY,handleClearFilter:OY,handleGetConfig:zY,onDragStart:GY,onDragEnd:UY,onSearch:KY,handleAddField:NY,toggleShowData:QY,handleEnScale:tX,adjustHSL:EC,handleDelFilterTag:ZY,handleInnerFilter:JY,getFilterValue:eX,getPopupContainer:iX}}}),tY={key:0,class:"design-template"},eY=["id"],iY=["onClick"],nY=["title"],oY=["id"],rY={class:"box-tooltip"},sY={class:"box-tooltip"};function lY(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",tY," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,nY)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,iY))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,oY),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",rY,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",sY,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空状态",-1)])),default:v.withCtx(()=>[i.showClear?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,eY),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue,isIframeMode:i.isIframeMode},null,8,["scaleValue","isIframeMode"])],8,["to","disabled"]))}const ab=WB(Ri(QK,[["render",lY],["__scopeId","data-v-debfd767"]])),mB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:ab},Symbol.toStringTag,{value:"Module"})),aY={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(mB).forEach(n=>{const o=mB[n];o.install&&i.use(o)})}},ZX="",JX="",hY=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},isIframeMode:{type:Boolean,default:!1}},components:{BorderOutlined:rM,SwitcherOutlined:PM,CloseOutlined:dM,EcanPivotTable:ab},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${jr(6)}`,a=()=>document.querySelector("#ProviderConfig > #container")||document.body,h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.ref([]),f=v.ref(!1),p=v.ref({}),m=v.reactive({keyName:"",visible:!1,columns:[],title:""}),b=v.ref([]),C=v.ref(),_=v.computed(()=>{let B=`drill-modal ${l}`;return f.value&&(B+=" full"),v.unref(h)&&(B+=` ${v.unref(h)}`),B}),w=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);if(P)if(B)P.addEventListener("mousedown",S);else{const F=P.parentElement;F&&(F.style.left="",F.style.top=""),P.removeEventListener("mousedown",S)}},y=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);P&&(B?P.addEventListener("dblclick",R):P.removeEventListener("dblclick",R))},S=B=>{LC(B,`.${l} .ant-modal-header`)},R=()=>{f.value=!f.value,v.nextTick(()=>{f.value?(v.unref(p).width=parseFloat(v.unref(d).width)*r+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*s+"px",w(!1)):(v.unref(p).width=parseFloat(v.unref(d).width)*n+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*o+"px",w(!0))})},A=()=>{f.value=!1,y(!1),w(!1)},x=({drillDimension:B,drillFieldData:P,usedDimensionFields:F,tableProps:H,splitSymbol:E})=>{const k=Ue.cloneDeep(H),{graphicConfig:I,allDimensions:L,pageConfig:D}=k,O=jr(6),W=[];b.value=[...F,B.label],L.value=L,D.value=D;const N=I.indicators.filter($=>$.show).map($=>$.label);N!=null&&N.length&&(m.title=`下钻:${N.join("、")}`);for(const $ of P){const U=L.find(G=>[G.title,G.label].includes($.dimensionKey)),Y=$.value.split(E);let j=$.value;Y!=null&&Y.length&&(j=Y[Y.length-1]),W.push({conditionKey:U.label,conditionLabel:U.title||U.label,conditionName:U.name,conditionValueType:U.genericType,indexCode:U.indexCode,typeGuid:U.typeGuid,indexCodeNum:U.indexCodeNum,rule:"EQUAL",dataType:"",customValue:j})}I.queryColumnList=[B],W!=null&&W.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...W),I.controlList=[{join:"&&",conditions:I.controlList}]),p.value={...k,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:(i.isIframeMode?parseFloat(v.unref(D).height):window.screen.height)*o+"px",graphicConfig:I},m.visible=!0,v.nextTick(()=>{v.unref(C).refreshData(),y(!0),w(!0)})},T=({type:B,data:P})=>{if(B==="11"&&P){const{indicatorList:F=[],queryColumns:H=[]}=P,k=F.concat(H).filter(D=>D.conditions||D.filter),I=M(k,"conditions",!0),L=M(P.sqlConditions,"sqlConditions",!1);g.value=I.concat(L).map(D=>{const O=v.unref(u).find(N=>N.label===D.label);let W=D.fieldValue;if(W&&typeof W=="string"){const N=W.split(",");(N==null?void 0:N.length)>3&&(W=N.slice(0,3).join(",")+"等")}else W||(W='""');return`${(O==null?void 0:O.title)||D.label} ${e[D.rule]} ${W}`})||[]}};function M(B,P,F){const H=[];for(const E of B)E[P]?H.push(...M(E[P],P,F)):E.filter?H.push({...E.filter,label:E.label}):(!F||E.dataType!=="component"&&!(E.fieldValue.startsWith("${")&&E.fieldValue.endsWith("}")))&&H.push(E);return H}return v.watch(m.visible,B=>{window.modalShow&&window.modalShow(B)}),t({showModal:x}),{theme:h,wrapClassName:_,conditionInfo:g,drillInfo:m,pivotTableConfig:p,indicatorUrl:c,isIndFullScreen:f,usedDimensionFields:b,pivotTableRef:C,toggleFullScreen:R,onDetailCancel:A,onPivotTableChange:T,getContainer:a}}}),dY=["title"];function uY(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,dY)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,showClear:!1,isAllowSaveConfig:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const cY=Object.freeze(Object.defineProperty({__proto__:null,default:Ri(hY,[["render",uY],["__scopeId","data-v-412e66d4"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=ab,Je.default=aY,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
373
|
+
}`;return Function(`"use strict";return (${q})`)().call(this,K)}function $Y(V){A.value=!0;const{value:K,key:q}=V;v.unref(x)[q]=K,hn({type:"6",data:{key:q,value:K}}),yY()}function Zl(){return n==null?void 0:n.getDrawRange()}const ff=v.ref([]),HB=v.ref(""),EB=v.ref(),GY=(V,K)=>{var Ot,We,Rn,qn,ji;const q=K.dataViewColumns[V.oldIndex]||{},{scope:J}=q;let X=!1,Q=!1;["IDX","BUILT_IN_IDX"].includes(J)?X=!0:["DIM","BUILT_IN_DIM"].includes(J)&&(Q=!0);const tt=Zl(),{rows:ft,columns:Pt,indicators:Qt,records:Ht}=dt,{top:Lt,left:te}=tt;if(v.unref(Oe)){let Xe=i.height;i.isIframeMode&&(Xe=document.body.clientHeight+"px");let oi=v.unref(Be).width;oi.includes("calc")&&(oi=v.unref(Tt)-v.unref(E)+"px"),k.value.main={width:oi,height:Xe,top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)-ae*2+"px",top:0,left:0},k.value.columns={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)/3-ae*2+"px",top:0,left:parseFloat(oi)/2+"px"},k.value.indicators={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)*2/3-ae*2+"px",top:parseFloat(Xe)/3+"px",left:parseFloat(oi)/2+"px"}}else{let Xe=50;(Ot=v.unref(Kt))!=null&&Ot.length?Xe=v.unref($).clientHeight:Q&&(U.value=!0,v.unref(oe).height=Xe+"px");let oi=0,$i=1;const Wt=n.getRowHeight(0),ie={columnHeaderTitle:!0};if(Pt!=null&&Pt.length?$i+=Pt.length:ie.columns=[{dimensionKey:jr(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{oi+=n.getColWidth(Ge)}):(oi=100,ie.rows=[{dimensionKey:jr(6),title:"",width:"100px",type:"rows"}]),Qt!=null&&Qt.length||(ie.indicators=[{indicatorKey:jr(6),title:"",width:"20%",format:()=>""}]),(We=Object.keys(ie))!=null&&We.length){const{rows:Ze=[],columns:Ge=[]}=ie;let ze=[];Ht!=null&&Ht.length?ze=Ue.cloneDeep(Ht):(qn=(Rn=v.unref(O))==null?void 0:Rn.records)!=null&&qn.length&&(ze=Ue.cloneDeep((ji=v.unref(O))==null?void 0:ji.records));let Fi=Pt.map(Tn=>Tn.dimensionKey);if(!(Fi!=null&&Fi.length)&&(Ge!=null&&Ge.length)&&(Fi=[Ge[0].dimensionKey]),ze!=null&&ze.length)for(const Tn of ze){for(const Qh of Ze)Tn[Qh.dimensionKey]="";let Jh=!1;for(const Qh in Tn)if(Fi.includes(Qh)){Jh=!0;break}Q?Jh||($i=2,Tn[Fi[0]]=""):X&&(Jh||($i=1))}n.updateOption({...dt,...ie,records:ze})}v.nextTick(()=>{var Fi;const Ze=Zl(),Ge=Ze.width,ze=Ze.height;k.value.main={width:Ge+"px",height:ze+Xe+"px",top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:oi-ae*2+"px",height:ze-ae*2+"px",top:Xe+"px",left:0},k.value.columns={width:Ge-oi-ae*2+"px",height:$i*Wt-ae*2+"px",top:Xe+"px",left:oi+"px"},k.value.indicators={width:Ge-oi-ae*2+"px",height:ze-$i*Wt-ae*2+"px",top:$i*Wt+((Fi=v.unref(Kt))!=null&&Fi.length?Xe:0)+"px",left:oi+"px"},k.value.filters={width:Ge-ae*2+"px",height:Xe-ae*2+"px",top:0,left:0}})}I.value=q,X?ff.value=[0,1]:Q&&(ff.value=[2])},UY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...dt,records:v.unref(O).records}):n.updateOption(dt),U.value=!1,v.unref(oe).height="",ff.value=[]},KY=()=>{var V;(V=v.unref(EB))==null||V.handleSearch(v.unref(HB))},LB=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:k.value,showTreeData:L.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:rt,sourceListStyle:ht.value,dimensionFieldList:At.value,indicatorFieldList:mt.value,computedIndKeys:qt.value,computedIndMap:fe.value,computedIndFieldMap:Yt.value,option:dt,loadingRect:Ti.value,calculateList:Lo.value,filterList:Xn.value,topNumMap:$r.value,sortMap:An.value,customDimensions:Fs.value,customIndicators:Kl.value,customRowKeys:Yl.value,customColKeys:Xl.value,toolBoxStyle:Gr.value,scrollTop:W.value,scrollLeft:N.value}));let mb=null;v.watch(LB,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});function hn({type:V,data:K}){ct.value=V,e("tableChange",{type:V,data:K})}function YY(){!i.isAllowSaveConfig||!v.unref(ct)||["5"].includes(v.unref(ct))||(mb&&clearTimeout(mb),mb=setTimeout(()=>{hb("save",{keyName:i.relateKeyName||i.keyName,data:v.unref(LB)})},500))}const vb=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,k.value=V.dragAreaStyle,L.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,rt=V.splitSymbol,ht.value=V.sourceListStyle,At.value=V.dimensionFieldList,mt.value=V.indicatorFieldList,qt.value=V.computedIndKeys,fe.value=V.computedIndMap,Yt.value=V.computedIndFieldMap,Ti.value=V.loadingRect,Lo.value=V.calculateList,Xn.value=V.filterList,$r.value=V.topNumMap,An.value=V.sortMap,Fs.value=V.customDimensions,Kl.value=V.customIndicators,Yl.value=V.customRowKeys,Xl.value=V.customColKeys,Gr.value=V.toolBoxStyle,W.value=V.scrollTop,N.value=V.scrollLeft,Object.assign(dt,V.option),dt.theme=Nt};async function XY(V){var K,q,J;if(A.value=!0,V)vb(V);else if(i.isAllowSaveConfig){const X=await hb("get",{keyName:i.relateKeyName||i.keyName}),Q=((q=(K=X==null?void 0:X.data)==null?void 0:K.data)==null?void 0:q.searchMap)||{};Q!=null&&Q.data&&!Array.isArray(Q.data)&&((J=Object.keys(Q.data))!=null&&J.length)&&vb(Q.data)}gr()}function qY(){return{dimensions:v.unref(At),indicators:v.unref(mt)}}const ZY=V=>{const{scope:K,name:q,label:J}=V;let X=[];["IDX","BUILT_IN_IDX"].includes(K)?X=v.unref(mt):["DIM","BUILT_IN_DIM"].includes(K)&&(X=v.unref(At));const Q=X.findIndex(tt=>tt.name===q);if(Q!==-1){delete v.unref(a)[X[Q].label];const tt=v.unref(Xn).findIndex(ft=>ft.key===J);tt!==-1&&v.unref(Xn).splice(tt,1),X[Q].show?X[Q].isInnerFilter=!1:X.splice(Q,1)}A.value=!0,hn({type:"10",data:{dimensions:v.unref(At),indicators:v.unref(mt)}}),ql()},JY=V=>{const{scope:K,label:q,showTitle:J}=V,X=eP(K);X==="indicator"||X==="dimension"&&TB({dimensionKey:q,value:J})};t({option:dt,refreshData:XY,reRenderTable:vb,click:MB,getDrawRange:Zl,getSaveData:qY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],()=>{kB()},{immediate:!0,deep:!0});function kB(){const{queryColumnList:V=[],indicators:K=[]}=i.graphicConfig,q=Ue.cloneDeep(V),J=Ue.cloneDeep(K);for(const X of q){const Q=i.dimensionList.find(tt=>tt.key===X.name);X.positionType=(Q==null?void 0:Q.position)||"rows",X.showTitle=X.title||X.label,Q&&(X.width=Q.width)}for(const X of J){const Q=i.indicatorList.find(tt=>tt.key===X.name);X.width=Q==null?void 0:Q.width,X.showTitle=X.label}At.value=q,mt.value=J}const QY=()=>{o.value=!1,L.value=!L.value},tX=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},eX=V=>{const K=v.unref(At).find(Q=>Q.label===V),q=v.unref(mt).find(Q=>Q.label===V),J=K||q,X=v.unref(a)[V];return X?J.genericType==="DATE"?Array.isArray(X)?`${X[0].value}~${X[1].value}`:X.value:X.value&&Array.isArray(X.value)?X.value.join("、"):"":""},iX=V=>V.parentNode;return v.onMounted(()=>{ye()}),{showDefaultTableArea:Oe,maskList:ff,styleData:kt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Ti,loading:A,isTableInit:o,toolBoxStyle:Gr,indSourceRef:EB,searchText:HB,dragAreaStyle:k,offsetWidth:Ft,showTreeData:L,dataIconStyle:Ee,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Be,innerFilterStyle:oe,innerFilterFieldList:Kt,innerFilterRef:$,showFilterWrap:U,customDimensions:Fs,indicatorFieldList:mt,dimensionFieldList:At,pivotWrapStyle:R,fontSize:et,click:MB,onFilterChange:VY,pivotDetailRef:w,handleFormat:BB,handleCondition:jY,handleAggregate:SY,handleGetTop:$Y,handleConfig:DY,handleClearFilter:OY,handleGetConfig:zY,onDragStart:GY,onDragEnd:UY,onSearch:KY,handleAddField:NY,toggleShowData:QY,handleEnScale:tX,adjustHSL:EC,handleDelFilterTag:ZY,handleInnerFilter:JY,getFilterValue:eX,getPopupContainer:iX}}}),tY={key:0,class:"design-template"},eY=["id"],iY=["onClick"],nY=["title"],oY=["id"],rY={class:"box-tooltip"},sY={class:"box-tooltip"};function lY(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",tY," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,nY)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,iY))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,oY),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",rY,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",sY,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空状态",-1)])),default:v.withCtx(()=>[i.showClear?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,eY),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue,isIframeMode:i.isIframeMode},null,8,["scaleValue","isIframeMode"])],8,["to","disabled"]))}const ab=WB(Ri(QK,[["render",lY],["__scopeId","data-v-6017afa1"]])),mB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:ab},Symbol.toStringTag,{value:"Module"})),aY={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(mB).forEach(n=>{const o=mB[n];o.install&&i.use(o)})}},ZX="",JX="",hY=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},isIframeMode:{type:Boolean,default:!1}},components:{BorderOutlined:rM,SwitcherOutlined:PM,CloseOutlined:dM,EcanPivotTable:ab},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${jr(6)}`,a=()=>document.querySelector("#ProviderConfig > #container")||document.body,h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.ref([]),f=v.ref(!1),p=v.ref({}),m=v.reactive({keyName:"",visible:!1,columns:[],title:""}),b=v.ref([]),C=v.ref(),_=v.computed(()=>{let B=`drill-modal ${l}`;return f.value&&(B+=" full"),v.unref(h)&&(B+=` ${v.unref(h)}`),B}),w=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);if(P)if(B)P.addEventListener("mousedown",S);else{const F=P.parentElement;F&&(F.style.left="",F.style.top=""),P.removeEventListener("mousedown",S)}},y=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);P&&(B?P.addEventListener("dblclick",R):P.removeEventListener("dblclick",R))},S=B=>{LC(B,`.${l} .ant-modal-header`)},R=()=>{f.value=!f.value,v.nextTick(()=>{f.value?(v.unref(p).width=parseFloat(v.unref(d).width)*r+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*s+"px",w(!1)):(v.unref(p).width=parseFloat(v.unref(d).width)*n+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*o+"px",w(!0))})},A=()=>{f.value=!1,y(!1),w(!1)},x=({drillDimension:B,drillFieldData:P,usedDimensionFields:F,tableProps:H,splitSymbol:E})=>{const k=Ue.cloneDeep(H),{graphicConfig:I,allDimensions:L,pageConfig:D}=k,O=jr(6),W=[];b.value=[...F,B.label],L.value=L,D.value=D;const N=I.indicators.filter($=>$.show).map($=>$.label);N!=null&&N.length&&(m.title=`下钻:${N.join("、")}`);for(const $ of P){const U=L.find(G=>[G.title,G.label].includes($.dimensionKey)),Y=$.value.split(E);let j=$.value;Y!=null&&Y.length&&(j=Y[Y.length-1]),W.push({conditionKey:U.label,conditionLabel:U.title||U.label,conditionName:U.name,conditionValueType:U.genericType,indexCode:U.indexCode,typeGuid:U.typeGuid,indexCodeNum:U.indexCodeNum,rule:"EQUAL",dataType:"",customValue:j})}I.queryColumnList=[B],W!=null&&W.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...W),I.controlList=[{join:"&&",conditions:I.controlList}]),p.value={...k,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:(i.isIframeMode?parseFloat(v.unref(D).height):window.screen.height)*o+"px",graphicConfig:I},m.visible=!0,v.nextTick(()=>{v.unref(C).refreshData(),y(!0),w(!0)})},T=({type:B,data:P})=>{if(B==="11"&&P){const{indicatorList:F=[],queryColumns:H=[]}=P,k=F.concat(H).filter(D=>D.conditions||D.filter),I=M(k,"conditions",!0),L=M(P.sqlConditions,"sqlConditions",!1);g.value=I.concat(L).map(D=>{const O=v.unref(u).find(N=>N.label===D.label);let W=D.fieldValue;if(W&&typeof W=="string"){const N=W.split(",");(N==null?void 0:N.length)>3&&(W=N.slice(0,3).join(",")+"等")}else W||(W='""');return`${(O==null?void 0:O.title)||D.label} ${e[D.rule]} ${W}`})||[]}};function M(B,P,F){const H=[];for(const E of B)E[P]?H.push(...M(E[P],P,F)):E.filter?H.push({...E.filter,label:E.label}):(!F||E.dataType!=="component"&&!(E.fieldValue.startsWith("${")&&E.fieldValue.endsWith("}")))&&H.push(E);return H}return v.watch(m.visible,B=>{window.modalShow&&window.modalShow(B)}),t({showModal:x}),{theme:h,wrapClassName:_,conditionInfo:g,drillInfo:m,pivotTableConfig:p,indicatorUrl:c,isIndFullScreen:f,usedDimensionFields:b,pivotTableRef:C,toggleFullScreen:R,onDetailCancel:A,onPivotTableChange:T,getContainer:a}}}),dY=["title"];function uY(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,dY)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,showClear:!1,isAllowSaveConfig:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const cY=Object.freeze(Object.defineProperty({__proto__:null,default:Ri(hY,[["render",uY],["__scopeId","data-v-412e66d4"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=ab,Je.default=aY,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
374
374
|
//# sourceMappingURL=index.umd.js.map
|