ace-component-lib 0.0.152 → 0.0.154
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/ace-component-lib.umd.js +3 -3
- package/dist/style.css +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(i,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("@wangeditor/editor"),require("vue"),require("element-plus"),require("vue-draggable-plus"),require("dayjs"),require("echarts/core"),require("@wangeditor/editor-for-vue"),require("jsoneditor")):typeof define=="function"&&define.amd?define(["@wangeditor/editor","vue","element-plus","vue-draggable-plus","dayjs","echarts/core","@wangeditor/editor-for-vue","jsoneditor"],n):(i=typeof globalThis<"u"?globalThis:i||self,i["ace-component-lib"]=n(i.editor,i.Vue,i.elementPlus,i.vueDraggablePlus,i.dayjs,i.core,i.editorForVue,i.JsonEditor))})(this,function(editor,vue,elementPlus,vueDraggablePlus,dayjs,core,editorForVue,JsonEditor){"use strict";var nn=Object.defineProperty;var rn=(i,n,r)=>n in i?nn(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r;var xt=(i,n,r)=>(rn(i,typeof n!="symbol"?n+"":n,r),r);const version="0.0.152",aceLib="";class e{constructor(n){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,n),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let n="";this.settings.url&&!this.settings.asyncUrl&&(n=this.settings.url);let r=this;if(this.settings.asyncUrl)return void r.settings.asyncUrl(function(a){let l=r.getPrintWindow(a);r.settings.preview?r.previewIfrmaeLoad():r.print(l)},r.settings.vue);let o=this.getPrintWindow(n);this.settings.url||this.write(o.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(o)}addEvent(n,r,o){n.addEventListener?n.addEventListener(r,o,!1):n.attachEvent?n.attachEvent("on"+r,o):n["on"+r]=o}previewIfrmaeLoad(){let n=document.getElementById("vue-pirnt-nb-previewBox");if(n){let r=this,o=n.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(o,"load",function(){r.previewBoxShow(),r.removeCanvasImg(),r.settings.previewOpenCallback()}),this.addEvent(n.querySelector(".previewBodyUtilPrintBtn"),"click",function(){r.settings.beforeOpenCallback(),r.settings.openCallback(),o.contentWindow.print(),r.settings.closeCallback()})}}removeCanvasImg(){let n=this;try{if(n.elsdom){let r=n.elsdom.querySelectorAll(".canvasImg");for(let o=0;o<r.length;o++)r[o].remove()}}catch(r){console.log(r)}}print(n){var r=this;let o=document.getElementById(this.settings.id)||n.f,a=document.getElementById(this.settings.id).contentWindow||n.f.contentWindow;r.settings.beforeOpenCallback(),r.addEvent(o,"load",function(){a.focus(),r.settings.openCallback(),a.print(),o.remove(),r.settings.closeCallback(),r.removeCanvasImg()})}write(n){n.open(),n.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),n.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let n="",r="",o="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,l=>{n+=l}),[].forEach.call(document.querySelectorAll("link"),function(l){l.href.indexOf(".css")>=0&&(r+=`<link type="text/css" rel="stylesheet" href="${l.href}" >`)});let a=document.styleSheets;if(a&&a.length>0)for(let l=0;l<a.length;l++)try{if(a[l].cssRules||a[l].rules){let s=a[l].cssRules||a[l].rules;for(let u=0;u<s.length;u++)o+=s[u].cssText}}catch(s){console.log(a[l].href+s)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,l=>{r+=`<link type="text/css" rel="stylesheet" href="${l}">`}),`<head><title>${this.settings.popTitle}</title>${n}${r}<style type="text/css">${o}</style></head>`}getBody(){let n=this.settings.ids;return n=n.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(n)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(n){let r=n.querySelectorAll("canvas");for(let o=0;o<r.length;o++)if(!r[o].style.display){let a=r[o].parentNode,l=r[o].toDataURL("image/png"),s=new Image;s.className="canvasImg",s.style.display="none",s.src=l,a.appendChild(s)}return n}getFormData(n){let r=n.cloneNode(!0),o=r.querySelectorAll("input,select,textarea"),a=r.querySelectorAll(".canvasImg,canvas"),l=-1;for(let s=0;s<a.length;s++){let u=a[s].parentNode,c=a[s];c.tagName.toLowerCase()==="canvas"?u.removeChild(c):c.style.display="block"}for(let s=0;s<o.length;s++){let u=o[s],c=u.getAttribute("type"),d=o[s];if(c||(c=u.tagName==="SELECT"?"select":u.tagName==="TEXTAREA"?"textarea":""),u.tagName==="INPUT")c==="radio"||c==="checkbox"?u.checked&&d.setAttribute("checked",u.checked):(d.value=u.value,d.setAttribute("value",u.value));else if(c==="select"){l++;for(let f=0;f<n.querySelectorAll("select").length;f++){let p=n.querySelectorAll("select")[f];if(!p.getAttribute("newbs")&&p.setAttribute("newbs",f),p.getAttribute("newbs")==l){let v=n.querySelectorAll("select")[l].selectedIndex;u.options[v].setAttribute("selected",!0)}}}else d.innerHTML=u.value,d.setAttribute("html",u.value)}return r}getPrintWindow(n){var r=this.Iframe(n);return{f:r,win:r.contentWindow||r,doc:r.doc}}previewBoxShow(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: hidden"),n.style.display="block")}previewBoxHide(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: visible;"),n.querySelector("iframe")&&n.querySelector("iframe").remove(),n.style.display="none")}previewBox(){let n=document.getElementById("vue-pirnt-nb-previewBox"),r="previewBody";if(n)return n.querySelector("iframe")&&n.querySelector("iframe").remove(),{close:n.querySelector(".previewClose"),previewBody:n.querySelector(".previewBody")};let o=document.createElement("div");o.setAttribute("id","vue-pirnt-nb-previewBox"),o.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),o.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,o.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let s=document.createElement("div"),u=document.createElement("div");s.setAttribute("class","closeBefore"),s.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),u.setAttribute("class","closeAfter"),u.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(s),l.appendChild(u),a.appendChild(l),this.previewBody=document.createElement("div");let c=this.previewBody;c.setAttribute("class",r),c.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),o.appendChild(c);let d=document.createElement("div");d.setAttribute("class","previewBodyUtil"),d.setAttribute("style","height: 32px;background: #474747;position: relative;"),c.appendChild(d),this.previewBodyUtilPrintBtn=document.createElement("div");let f=this.previewBodyUtilPrintBtn;return f.setAttribute("class","previewBodyUtilPrintBtn"),f.innerHTML=this.settings.previewPrintBtnLabel,f.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),d.appendChild(f),document.body.appendChild(o),{close:this.close,previewBody:this.previewBody}}iframeBox(n,r){let o=document.createElement("iframe");return o.style.border="0px",o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.right="0px",o.style.top="0px",o.setAttribute("id",n),o.setAttribute("src",r),o}Iframe(n){let r=this.settings.id;n=n||new Date().getTime();let o=this,a=this.iframeBox(r,n);try{if(this.settings.preview){a.setAttribute("style","border: 0px;flex: 1;");let l=this.previewBox(),s=l.previewBody,u=l.close;s.appendChild(a),this.addEvent(u,"click",function(){o.previewBoxHide()})}else document.body.appendChild(a);a.doc=null,a.doc=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document}catch(l){throw new Error(l+". iframes may not be supported in this browser.")}if(a.doc==null)throw new Error("Cannot find document.");return a}}var t={directiveName:"print",mounted(i,n,r){let o=n.instance,a="";var l,s,u;s="click",u=()=>{if(typeof n.value=="string")a=n.value;else{if(typeof n.value!="object"||!n.value.id)return void window.print();{a=n.value.id;let d=a.replace(new RegExp("#","g"),"");document.getElementById(d)||(console.log("id in Error"),a="")}}c()},(l=i).addEventListener?l.addEventListener(s,u,!1):l.attachEvent?l.attachEvent("on"+s,u):l["on"+s]=u;const c=()=>{new e({ids:a,vue:o,url:n.value.url,standard:"",extraHead:n.value.extraHead,extraCss:n.value.extraCss,zIndex:n.value.zIndex||20002,previewTitle:n.value.previewTitle||"打印预览",previewPrintBtnLabel:n.value.previewPrintBtnLabel||"打印",popTitle:n.value.popTitle,preview:n.value.preview||!1,asyncUrl:n.value.asyncUrl,previewBeforeOpenCallback(){n.value.previewBeforeOpenCallback&&n.value.previewBeforeOpenCallback(o)},previewOpenCallback(){n.value.previewOpenCallback&&n.value.previewOpenCallback(o)},openCallback(){n.value.openCallback&&n.value.openCallback(o)},closeCallback(){n.value.closeCallback&&n.value.closeCallback(o)},beforeOpenCallback(){n.value.beforeOpenCallback&&n.value.beforeOpenCallback(o)}})}},install:function(i){i.directive("print",t)}};const fetch$1=i=>{const n=i.$baseHttp,r=i.$baseGetCurrentProjectId(),o=N=>n.get("/api/ace-data-center/role-permission/get-curr-func",{params:{projectId:r,markName:"FUNC",type:N}}),a=N=>(N.projectId=r,n.post("/api/ace-data-center/indicators-report/submit",N,{headers:{loading:!0}})),l=N=>n.post("/api/ace-data-center/indicators-report/remove",{},{headers:{loading:!0},params:{ids:N}}),s=N=>n.get("/api/ace-data-center/indicators-report/copy",{headers:{loading:!0},params:{id:N}}),u=(N,O=!0)=>n.post("/api/ace-data-center/indicators-apply/mapEchartsData",{},{headers:{loading:O},params:{indicatorsApplyIds:N}}),c=(N,O=!0)=>n.post("/api/ace-data-center/indicators-apply/listIndicatorsApply",{},{headers:{loading:O},params:{projectId:r,...N}}),d=N=>n.get("/api/ace-data-center/indicators/listReportIndicatorsMenu",{params:{projectId:r,...N}}),f=N=>n.get("/api/ace-data-center/model/all",{params:{projectId:r,...N}}),p=N=>n.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:{projectId:r,...N}}),v=N=>n.post("/api/ace-data-center/indicators-echarts/pullEchartsDataVO",N),g=N=>n.get("/api/ace-data-center/indicators/getIndicatorsPanelConf",{params:{indicatorsId:N},headers:{loading:!0}}),m=N=>(N.projectId=r,n.post("/api/ace-data-center/indicators-apply/submit",N,{headers:{loading:!0}})),_=(N,O)=>{const D=new FormData;return D.append("file",N),D.append("indicatorsApplyId",O),n.post("/api/ace-data-center/indicators-apply/updateIndicatorsApplyImage",D,{headers:{"Content-Type":"multipart/form-data"}})},y=()=>n.get("/api/ace-data-center/indicators-relation/tree",{params:{projectId:r}}),b=()=>n.get("/api/ace-data-center/indicators/loadIndicatorsMenu",{params:{projectId:r}}),C=N=>n.get("/api/ace-data-center/rule/list",{params:{projectId:r,...N}}),x=N=>(N.projectId=r,n.get("/api/ace-data-center/model/loadModelMenu",{params:N})),w=N=>n.get(`/api/ace-data-center/indicators/detailAndTask/${N}`),V=N=>n.get("/api/ace-data-center/indicators-echarts/detail",{params:N}),$=N=>n.post(`/api/ace-data-center/model/getFormJsonConfig/${N}`),S=N=>n.get(`/api/ace-data-center/model-attribute/listSimpleColumn/${N}`),E=N=>n.get(`/api/ace-data-center/model-attribute/listColumnInfo/${N}`),k=N=>n.get("/api/ace-api/blade-system/client/param-value",{params:N}),P={loadDataSourceMenu:()=>n.get("/api/ace-data-center/data-source/loadDataSourceMenu",{params:{projectId:r}}),listDataSourceSynchronized:N=>n.get("/api/ace-data-center/data-source/listDataSourceSynchronized",{params:N}),detail:N=>n.get("/api/ace-data-center/data-source/detail",{params:N}),dataSourceSubmit:N=>(N.type=3,N.projectId=r,n.post("/api/ace-data-center/data-source/submit",N,{headers:{loading:!0}})),testConnect:N=>(N.projectId=r,n.post("/api/ace-data-center/data-source/testConnect",N,{headers:{loading:!0}})),createModelSyncRelation:N=>(N.projectId=r,n.post("/api/ace-data-center/model-sync-relation/createModelSyncRelation",N,{headers:{loading:!0}})),createShadowModelSync:N=>(N.projectId=r,n.post("/api/ace-data-center/model-sync-relation/createShadowModelSyncRelation",N,{headers:{loading:!0}})),submitDefaultDbExtract:N=>(N.projectId=r,n.post("/api/ace-data-center/db-extract/submitDefaultDbExtract",N,{headers:{loading:!0}}))},T={getDetail:(N,O=!1)=>n.get("/api/ace-data-center/model/detail",{params:{id:N},headers:{loading:O}}),settingPublishStatus:(N,O)=>n.post(`/api/ace-data-center/model/settingPublishStatus/${N}/${O}`,{},{headers:{loading:!0}}),loadModelMenu:N=>(N.projectId=r,n.get("/api/ace-data-center/model/loadModelMenu",{params:N})),modelDataAction:(N,O="add")=>n.post(`/api/ace-data-center/model-data/${O}`,N,{headers:{loading:!0}}),allModel:N=>(N.projectId=r,n.get("/api/ace-data-center/model/all",{params:N})),allModelAttribute:N=>(N.projectId=r,n.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:N})),allModelMatrix:N=>(N.projectId=r,n.get("/api/ace-data-center/model-matrix/all",{params:N})),queryRows:N=>(N.projectId=r,n.get("/api/ace-data-center/dynamicQuery/queryRows",{params:N})),modelDataDel:N=>n.post("/api/ace-data-center/model-data/delete",N,{headers:{loading:!0}})},B={saveCollaborateFlow:N=>(N.projectId=r,N.collaborateFlowNodes=B.getCollaborateFlowNodes(N.collaborateJson),n.post("/api/ace-data-center/collaborate-flow/save",{...N})),updateCollaborateFlow:N=>(N.projectId=N.projectId=r,N.collaborateFlowNodes=B.getCollaborateFlowNodes(N.collaborateJson),n.post("/api/ace-data-center/collaborate-flow/update",{...N})),detailCollaborateFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/detail",{params:N})),collaborateExecRecordFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/collaborateExecRecord",{params:N})),getCollaborateFlowNodes:N=>{let D=JSON.parse(N).cells,L=D.filter(M=>M.shape=="Widget"),I=D.filter(M=>M.shape=="edge");return L.map(M=>{var Q,Y,oe;let R=I.filter(z=>z.target.cell==M.id).map(z=>z.source.cell),F=L.filter(z=>R.includes(z.id)).map(z=>z.data.id),W=I.filter(z=>z.source.cell==M.id).map(z=>z.target.cell),J=L.filter(z=>W.includes(z.id)).map(z=>z.data.id);return{id:M.data.id,modelId:M.data.id,name:M.data.modelName,preIds:(F==null?void 0:F.toString())||"",nextIds:(J==null?void 0:J.toString())||"",triggerEventType:(Q=M.data)==null?void 0:Q.triggerEventType,selfEventType:(Y=M.data)==null?void 0:Y.selfEventType,collaborateField:(oe=M.data)==null?void 0:oe.collaborateField}})},recordCollaborateFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/collaborateExecRecord",{params:N}))};return{getCurrFunc:o,reportSubmit:a,reportRemove:l,reportCopy:s,mapEchartsData:u,listIndicatorsApply:c,getEchartDetail:V,listReportIndicatorsMenu:d,pullEchartsDataVO:v,detailAndTask:w,getIndicatorsPanelConf:g,saveIndicatorsApply:m,updateIndicatorsApplyImage:_,indicatorsRelationTree:y,loadIndicatorsMenu:b,getRule:C,loadModelMenu:x,getFormJsonConfig:$,getSystemParam:k,listColumnInfo:E,allModel:f,allModelAttribute:p,listSimpleColumn:S,dbImport:P,model:T,collaborateFlow:B}};var FieldRenderType=(i=>(i.String="string",i.Integer="interget",i))(FieldRenderType||{}),DynamicTableType=(i=>(i.Default="default",i.DataForm="dataForm",i))(DynamicTableType||{}),ItableType=(i=>(i.Link="link",i))(ItableType||{}),FieldType=(i=>(i.Text="text",i.Select="select",i.Date="date",i.DateTime="datetime",i.CheckBox="checkbox",i.Switch="switch",i.Radio="radio",i.Textarea="textarea",i.Number="number",i.NumberRange="numberRange",i.Cascader="cascader",i.Daterange="daterange",i.Monthrange="monthrange",i.File="file",i.TreeSelect="treeSelect",i.Year="year",i.Month="month",i.Hr="hr",i.Slot="slot",i.Editor="editor",i.Password="password",i.Json="json",i.Markdown="markdown",i.Rate="rate",i.TimeRange="timerange",i.Time="time",i.DateTimeRange="datetimerange",i))(FieldType||{});let nanoid=(i=21)=>crypto.getRandomValues(new Uint8Array(i)).reduce((n,r)=>(r&=63,r<36?n+=r.toString(36):r<62?n+=(r-26).toString(36).toUpperCase():r>62?n+="-":n+="_",n),"");const theme=vue.ref(localStorage.getItem("design-theme")||""),stageWidth=vue.ref(1920),stageHeight=vue.ref(1080),scale$1=vue.ref(.2),targetsWidget=vue.ref([]),sketchRuleLine=vue.ref({h:[],v:[]}),widgetConfg=vue.ref({config:{backgroundColor:"transparent",backgroundImage:""},list:[]}),widgetHoverIds=vue.ref([]),pasteWidget=vue.ref([]),createLoading=vue.ref(!1),showRightPannel=vue.ref(!1),tempChartData=vue.ref({}),chartData=vue.ref({}),countMap=vue.ref({}),getScale=vue.computed(()=>vue.unref(scale$1)),getStage=vue.computed(()=>({stageWidth:vue.unref(stageWidth),stageHeight:vue.unref(stageHeight)})),getSketchRuleLine=vue.computed(()=>vue.unref(sketchRuleLine)),getTargetWidget=vue.computed(()=>vue.unref(targetsWidget)),getWidgetConfig=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.config}),getWidgetList=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.list}),getWidgetHoverIds=vue.computed(()=>vue.unref(widgetHoverIds)),getPasteWidget=vue.computed(()=>vue.unref(pasteWidget)),getCreateLoading=vue.computed(()=>vue.unref(createLoading)),getRightPannel=vue.computed(()=>vue.unref(showRightPannel)),getTheme=vue.computed(()=>vue.unref(theme)),getChartData=vue.computed(()=>vue.unref(chartData)),getCountMap=vue.computed(()=>vue.unref(countMap));function setSacle(i){scale$1.value=i/100}function setSketchRuleLine(i,n){vue.unref(sketchRuleLine).h=i,vue.unref(sketchRuleLine).v=n}function clearSketchRuleLine(){sketchRuleLine.value={h:[],v:[]}}function setTargetWidget(i){targetsWidget.value=i}function setWidgetList(i){vue.unref(widgetConfg).list=i}function setWidgetHoverIds(i){widgetHoverIds.value=i}function delWidgetItem(i){setWidgetList(vue.unref(getWidgetList).filter(n=>!i.includes(n.id))),setTargetWidget(vue.unref(getTargetWidget).filter(n=>!i.includes(n.id)))}function copyWidgetItem(i){pasteWidget.value=[],i.forEach(n=>{const r=vue.unref(getWidgetList).find(o=>o.id==n);r&&vue.unref(pasteWidget).push(r)})}function pasteWidgetItem(){vue.unref(pasteWidget).forEach(r=>{const o=JSON.parse(JSON.stringify(r));let a=o.x,l=o.y;o.x+40>vue.unref(stageWidth)-o.w?a=vue.unref(stageWidth)-o.w-40:a+=40,o.y+40>vue.unref(stageHeight)-o.h?l=vue.unref(stageHeight)-o.h-40:l+=40,vue.unref(widgetConfg).list.unshift({...o,id:nanoid(),x:a,y:l,z:vue.unref(widgetConfg).list.length+1,locked:!1})})}function sortWidgetList(){vue.unref(widgetConfg).list.sort((i,n)=>n.z-i.z)}function setCreateLoading(i){createLoading.value=i,i&&(targetsWidget.value=[],clearSketchRuleLine())}function setRightPannel(i){showRightPannel.value=i}function setStageWidth(i){i&&(stageWidth.value=i,vue.unref(widgetConfg).config.stageWidth=i)}function setStageHeight(i){i&&(stageHeight.value=i,vue.unref(widgetConfg).config.stageHeight=i)}function setTheme(){theme.value=vue.unref(theme)=="dark"?"":"dark",document.getElementsByTagName("html")[0].className=vue.unref(theme),localStorage.setItem("design-theme",vue.unref(theme))}function setChartData(i){chartData.value=i}function setCountMap(i,n){vue.unref(countMap)[i]=n}const useScreenDesign=()=>({theme,stageWidth,stageHeight,scale:scale$1,targetsWidget,sketchRuleLine,widgetConfg,widgetHoverIds,pasteWidget,createLoading,showRightPannel,tempChartData,chartData,countMap,getScale,getStage,getSketchRuleLine,getTargetWidget,getWidgetConfig,getWidgetList,getWidgetHoverIds,getPasteWidget,getCreateLoading,getRightPannel,getTheme,getChartData,getCountMap,setSacle,setSketchRuleLine,clearSketchRuleLine,setTargetWidget,setWidgetList,setWidgetHoverIds,delWidgetItem,copyWidgetItem,pasteWidgetItem,sortWidgetList,setCreateLoading,setRightPannel,setStageWidth,setStageHeight,setTheme,setChartData,setCountMap});/*!
|
|
1
|
+
(function(i,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("@wangeditor/editor"),require("vue"),require("element-plus"),require("vue-draggable-plus"),require("dayjs"),require("echarts/core"),require("@wangeditor/editor-for-vue"),require("jsoneditor")):typeof define=="function"&&define.amd?define(["@wangeditor/editor","vue","element-plus","vue-draggable-plus","dayjs","echarts/core","@wangeditor/editor-for-vue","jsoneditor"],n):(i=typeof globalThis<"u"?globalThis:i||self,i["ace-component-lib"]=n(i.editor,i.Vue,i.elementPlus,i.vueDraggablePlus,i.dayjs,i.core,i.editorForVue,i.JsonEditor))})(this,function(editor,vue,elementPlus,vueDraggablePlus,dayjs,core,editorForVue,JsonEditor){"use strict";var nn=Object.defineProperty;var rn=(i,n,r)=>n in i?nn(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r;var xt=(i,n,r)=>(rn(i,typeof n!="symbol"?n+"":n,r),r);const version="0.0.154",aceLib="";class e{constructor(n){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,n),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let n="";this.settings.url&&!this.settings.asyncUrl&&(n=this.settings.url);let r=this;if(this.settings.asyncUrl)return void r.settings.asyncUrl(function(a){let l=r.getPrintWindow(a);r.settings.preview?r.previewIfrmaeLoad():r.print(l)},r.settings.vue);let o=this.getPrintWindow(n);this.settings.url||this.write(o.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(o)}addEvent(n,r,o){n.addEventListener?n.addEventListener(r,o,!1):n.attachEvent?n.attachEvent("on"+r,o):n["on"+r]=o}previewIfrmaeLoad(){let n=document.getElementById("vue-pirnt-nb-previewBox");if(n){let r=this,o=n.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(o,"load",function(){r.previewBoxShow(),r.removeCanvasImg(),r.settings.previewOpenCallback()}),this.addEvent(n.querySelector(".previewBodyUtilPrintBtn"),"click",function(){r.settings.beforeOpenCallback(),r.settings.openCallback(),o.contentWindow.print(),r.settings.closeCallback()})}}removeCanvasImg(){let n=this;try{if(n.elsdom){let r=n.elsdom.querySelectorAll(".canvasImg");for(let o=0;o<r.length;o++)r[o].remove()}}catch(r){console.log(r)}}print(n){var r=this;let o=document.getElementById(this.settings.id)||n.f,a=document.getElementById(this.settings.id).contentWindow||n.f.contentWindow;r.settings.beforeOpenCallback(),r.addEvent(o,"load",function(){a.focus(),r.settings.openCallback(),a.print(),o.remove(),r.settings.closeCallback(),r.removeCanvasImg()})}write(n){n.open(),n.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),n.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let n="",r="",o="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,l=>{n+=l}),[].forEach.call(document.querySelectorAll("link"),function(l){l.href.indexOf(".css")>=0&&(r+=`<link type="text/css" rel="stylesheet" href="${l.href}" >`)});let a=document.styleSheets;if(a&&a.length>0)for(let l=0;l<a.length;l++)try{if(a[l].cssRules||a[l].rules){let s=a[l].cssRules||a[l].rules;for(let u=0;u<s.length;u++)o+=s[u].cssText}}catch(s){console.log(a[l].href+s)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,l=>{r+=`<link type="text/css" rel="stylesheet" href="${l}">`}),`<head><title>${this.settings.popTitle}</title>${n}${r}<style type="text/css">${o}</style></head>`}getBody(){let n=this.settings.ids;return n=n.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(n)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(n){let r=n.querySelectorAll("canvas");for(let o=0;o<r.length;o++)if(!r[o].style.display){let a=r[o].parentNode,l=r[o].toDataURL("image/png"),s=new Image;s.className="canvasImg",s.style.display="none",s.src=l,a.appendChild(s)}return n}getFormData(n){let r=n.cloneNode(!0),o=r.querySelectorAll("input,select,textarea"),a=r.querySelectorAll(".canvasImg,canvas"),l=-1;for(let s=0;s<a.length;s++){let u=a[s].parentNode,c=a[s];c.tagName.toLowerCase()==="canvas"?u.removeChild(c):c.style.display="block"}for(let s=0;s<o.length;s++){let u=o[s],c=u.getAttribute("type"),d=o[s];if(c||(c=u.tagName==="SELECT"?"select":u.tagName==="TEXTAREA"?"textarea":""),u.tagName==="INPUT")c==="radio"||c==="checkbox"?u.checked&&d.setAttribute("checked",u.checked):(d.value=u.value,d.setAttribute("value",u.value));else if(c==="select"){l++;for(let f=0;f<n.querySelectorAll("select").length;f++){let p=n.querySelectorAll("select")[f];if(!p.getAttribute("newbs")&&p.setAttribute("newbs",f),p.getAttribute("newbs")==l){let v=n.querySelectorAll("select")[l].selectedIndex;u.options[v].setAttribute("selected",!0)}}}else d.innerHTML=u.value,d.setAttribute("html",u.value)}return r}getPrintWindow(n){var r=this.Iframe(n);return{f:r,win:r.contentWindow||r,doc:r.doc}}previewBoxShow(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: hidden"),n.style.display="block")}previewBoxHide(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: visible;"),n.querySelector("iframe")&&n.querySelector("iframe").remove(),n.style.display="none")}previewBox(){let n=document.getElementById("vue-pirnt-nb-previewBox"),r="previewBody";if(n)return n.querySelector("iframe")&&n.querySelector("iframe").remove(),{close:n.querySelector(".previewClose"),previewBody:n.querySelector(".previewBody")};let o=document.createElement("div");o.setAttribute("id","vue-pirnt-nb-previewBox"),o.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),o.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,o.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let s=document.createElement("div"),u=document.createElement("div");s.setAttribute("class","closeBefore"),s.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),u.setAttribute("class","closeAfter"),u.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(s),l.appendChild(u),a.appendChild(l),this.previewBody=document.createElement("div");let c=this.previewBody;c.setAttribute("class",r),c.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),o.appendChild(c);let d=document.createElement("div");d.setAttribute("class","previewBodyUtil"),d.setAttribute("style","height: 32px;background: #474747;position: relative;"),c.appendChild(d),this.previewBodyUtilPrintBtn=document.createElement("div");let f=this.previewBodyUtilPrintBtn;return f.setAttribute("class","previewBodyUtilPrintBtn"),f.innerHTML=this.settings.previewPrintBtnLabel,f.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),d.appendChild(f),document.body.appendChild(o),{close:this.close,previewBody:this.previewBody}}iframeBox(n,r){let o=document.createElement("iframe");return o.style.border="0px",o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.right="0px",o.style.top="0px",o.setAttribute("id",n),o.setAttribute("src",r),o}Iframe(n){let r=this.settings.id;n=n||new Date().getTime();let o=this,a=this.iframeBox(r,n);try{if(this.settings.preview){a.setAttribute("style","border: 0px;flex: 1;");let l=this.previewBox(),s=l.previewBody,u=l.close;s.appendChild(a),this.addEvent(u,"click",function(){o.previewBoxHide()})}else document.body.appendChild(a);a.doc=null,a.doc=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document}catch(l){throw new Error(l+". iframes may not be supported in this browser.")}if(a.doc==null)throw new Error("Cannot find document.");return a}}var t={directiveName:"print",mounted(i,n,r){let o=n.instance,a="";var l,s,u;s="click",u=()=>{if(typeof n.value=="string")a=n.value;else{if(typeof n.value!="object"||!n.value.id)return void window.print();{a=n.value.id;let d=a.replace(new RegExp("#","g"),"");document.getElementById(d)||(console.log("id in Error"),a="")}}c()},(l=i).addEventListener?l.addEventListener(s,u,!1):l.attachEvent?l.attachEvent("on"+s,u):l["on"+s]=u;const c=()=>{new e({ids:a,vue:o,url:n.value.url,standard:"",extraHead:n.value.extraHead,extraCss:n.value.extraCss,zIndex:n.value.zIndex||20002,previewTitle:n.value.previewTitle||"打印预览",previewPrintBtnLabel:n.value.previewPrintBtnLabel||"打印",popTitle:n.value.popTitle,preview:n.value.preview||!1,asyncUrl:n.value.asyncUrl,previewBeforeOpenCallback(){n.value.previewBeforeOpenCallback&&n.value.previewBeforeOpenCallback(o)},previewOpenCallback(){n.value.previewOpenCallback&&n.value.previewOpenCallback(o)},openCallback(){n.value.openCallback&&n.value.openCallback(o)},closeCallback(){n.value.closeCallback&&n.value.closeCallback(o)},beforeOpenCallback(){n.value.beforeOpenCallback&&n.value.beforeOpenCallback(o)}})}},install:function(i){i.directive("print",t)}};const fetch$1=i=>{const n=i.$baseHttp,r=i.$baseGetCurrentProjectId(),o=N=>n.get("/api/ace-data-center/role-permission/get-curr-func",{params:{projectId:r,markName:"FUNC",type:N}}),a=N=>(N.projectId=r,n.post("/api/ace-data-center/indicators-report/submit",N,{headers:{loading:!0}})),l=N=>n.post("/api/ace-data-center/indicators-report/remove",{},{headers:{loading:!0},params:{ids:N}}),s=N=>n.get("/api/ace-data-center/indicators-report/copy",{headers:{loading:!0},params:{id:N}}),u=(N,O=!0)=>n.post("/api/ace-data-center/indicators-apply/mapEchartsData",{},{headers:{loading:O},params:{indicatorsApplyIds:N}}),c=(N,O=!0)=>n.post("/api/ace-data-center/indicators-apply/listIndicatorsApply",{},{headers:{loading:O},params:{projectId:r,...N}}),d=N=>n.get("/api/ace-data-center/indicators/listReportIndicatorsMenu",{params:{projectId:r,...N}}),f=N=>n.get("/api/ace-data-center/model/all",{params:{projectId:r,...N}}),p=N=>n.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:{projectId:r,...N}}),v=N=>n.post("/api/ace-data-center/indicators-echarts/pullEchartsDataVO",N),g=N=>n.get("/api/ace-data-center/indicators/getIndicatorsPanelConf",{params:{indicatorsId:N},headers:{loading:!0}}),m=N=>(N.projectId=r,n.post("/api/ace-data-center/indicators-apply/submit",N,{headers:{loading:!0}})),_=(N,O)=>{const D=new FormData;return D.append("file",N),D.append("indicatorsApplyId",O),n.post("/api/ace-data-center/indicators-apply/updateIndicatorsApplyImage",D,{headers:{"Content-Type":"multipart/form-data"}})},y=()=>n.get("/api/ace-data-center/indicators-relation/tree",{params:{projectId:r}}),b=()=>n.get("/api/ace-data-center/indicators/loadIndicatorsMenu",{params:{projectId:r}}),C=N=>n.get("/api/ace-data-center/rule/list",{params:{projectId:r,...N}}),x=N=>(N.projectId=r,n.get("/api/ace-data-center/model/loadModelMenu",{params:N})),w=N=>n.get(`/api/ace-data-center/indicators/detailAndTask/${N}`),V=N=>n.get("/api/ace-data-center/indicators-echarts/detail",{params:N}),$=N=>n.post(`/api/ace-data-center/model/getFormJsonConfig/${N}`),S=N=>n.get(`/api/ace-data-center/model-attribute/listSimpleColumn/${N}`),E=N=>n.get(`/api/ace-data-center/model-attribute/listColumnInfo/${N}`),k=N=>n.get("/api/ace-api/blade-system/client/param-value",{params:N}),P={loadDataSourceMenu:()=>n.get("/api/ace-data-center/data-source/loadDataSourceMenu",{params:{projectId:r}}),listDataSourceSynchronized:N=>n.get("/api/ace-data-center/data-source/listDataSourceSynchronized",{params:N}),detail:N=>n.get("/api/ace-data-center/data-source/detail",{params:N}),dataSourceSubmit:N=>(N.type=3,N.projectId=r,n.post("/api/ace-data-center/data-source/submit",N,{headers:{loading:!0}})),testConnect:N=>(N.projectId=r,n.post("/api/ace-data-center/data-source/testConnect",N,{headers:{loading:!0}})),createModelSyncRelation:N=>(N.projectId=r,n.post("/api/ace-data-center/model-sync-relation/createModelSyncRelation",N,{headers:{loading:!0}})),createShadowModelSync:N=>(N.projectId=r,n.post("/api/ace-data-center/model-sync-relation/createShadowModelSyncRelation",N,{headers:{loading:!0}})),submitDefaultDbExtract:N=>(N.projectId=r,n.post("/api/ace-data-center/db-extract/submitDefaultDbExtract",N,{headers:{loading:!0}}))},T={getDetail:(N,O=!1)=>n.get("/api/ace-data-center/model/detail",{params:{id:N},headers:{loading:O}}),settingPublishStatus:(N,O)=>n.post(`/api/ace-data-center/model/settingPublishStatus/${N}/${O}`,{},{headers:{loading:!0}}),loadModelMenu:N=>(N.projectId=r,n.get("/api/ace-data-center/model/loadModelMenu",{params:N})),modelDataAction:(N,O="add")=>n.post(`/api/ace-data-center/model-data/${O}`,N,{headers:{loading:!0}}),allModel:N=>(N.projectId=r,n.get("/api/ace-data-center/model/all",{params:N})),allModelAttribute:N=>(N.projectId=r,n.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:N})),allModelMatrix:N=>(N.projectId=r,n.get("/api/ace-data-center/model-matrix/all",{params:N})),queryRows:N=>(N.projectId=r,n.get("/api/ace-data-center/dynamicQuery/queryRows",{params:N})),modelDataDel:N=>n.post("/api/ace-data-center/model-data/delete",N,{headers:{loading:!0}})},B={saveCollaborateFlow:N=>(N.projectId=r,N.collaborateFlowNodes=B.getCollaborateFlowNodes(N.collaborateJson),n.post("/api/ace-data-center/collaborate-flow/save",{...N})),updateCollaborateFlow:N=>(N.projectId=N.projectId=r,N.collaborateFlowNodes=B.getCollaborateFlowNodes(N.collaborateJson),n.post("/api/ace-data-center/collaborate-flow/update",{...N})),detailCollaborateFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/detail",{params:N})),collaborateExecRecordFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/collaborateExecRecord",{params:N})),getCollaborateFlowNodes:N=>{let D=JSON.parse(N).cells,L=D.filter(M=>M.shape=="Widget"),I=D.filter(M=>M.shape=="edge");return L.map(M=>{var Q,Y,oe;let R=I.filter(z=>z.target.cell==M.id).map(z=>z.source.cell),F=L.filter(z=>R.includes(z.id)).map(z=>z.data.id),W=I.filter(z=>z.source.cell==M.id).map(z=>z.target.cell),J=L.filter(z=>W.includes(z.id)).map(z=>z.data.id);return{id:M.data.id,modelId:M.data.id,name:M.data.modelName,preIds:(F==null?void 0:F.toString())||"",nextIds:(J==null?void 0:J.toString())||"",triggerEventType:(Q=M.data)==null?void 0:Q.triggerEventType,selfEventType:(Y=M.data)==null?void 0:Y.selfEventType,collaborateField:(oe=M.data)==null?void 0:oe.collaborateField}})},recordCollaborateFlow:N=>(N.projectId=r,n.get("/api/ace-data-center/collaborate-flow/collaborateExecRecord",{params:N}))};return{getCurrFunc:o,reportSubmit:a,reportRemove:l,reportCopy:s,mapEchartsData:u,listIndicatorsApply:c,getEchartDetail:V,listReportIndicatorsMenu:d,pullEchartsDataVO:v,detailAndTask:w,getIndicatorsPanelConf:g,saveIndicatorsApply:m,updateIndicatorsApplyImage:_,indicatorsRelationTree:y,loadIndicatorsMenu:b,getRule:C,loadModelMenu:x,getFormJsonConfig:$,getSystemParam:k,listColumnInfo:E,allModel:f,allModelAttribute:p,listSimpleColumn:S,dbImport:P,model:T,collaborateFlow:B}};var FieldRenderType=(i=>(i.String="string",i.Integer="interget",i))(FieldRenderType||{}),DynamicTableType=(i=>(i.Default="default",i.DataForm="dataForm",i))(DynamicTableType||{}),ItableType=(i=>(i.Link="link",i))(ItableType||{}),FieldType=(i=>(i.Text="text",i.Select="select",i.Date="date",i.DateTime="datetime",i.CheckBox="checkbox",i.Switch="switch",i.Radio="radio",i.Textarea="textarea",i.Number="number",i.NumberRange="numberRange",i.Cascader="cascader",i.Daterange="daterange",i.Monthrange="monthrange",i.File="file",i.TreeSelect="treeSelect",i.Year="year",i.Month="month",i.Hr="hr",i.Slot="slot",i.Editor="editor",i.Password="password",i.Json="json",i.Markdown="markdown",i.Rate="rate",i.TimeRange="timerange",i.Time="time",i.DateTimeRange="datetimerange",i))(FieldType||{});let nanoid=(i=21)=>crypto.getRandomValues(new Uint8Array(i)).reduce((n,r)=>(r&=63,r<36?n+=r.toString(36):r<62?n+=(r-26).toString(36).toUpperCase():r>62?n+="-":n+="_",n),"");const theme=vue.ref(localStorage.getItem("design-theme")||""),stageWidth=vue.ref(1920),stageHeight=vue.ref(1080),scale$1=vue.ref(.2),targetsWidget=vue.ref([]),sketchRuleLine=vue.ref({h:[],v:[]}),widgetConfg=vue.ref({config:{backgroundColor:"transparent",backgroundImage:""},list:[]}),widgetHoverIds=vue.ref([]),pasteWidget=vue.ref([]),createLoading=vue.ref(!1),showRightPannel=vue.ref(!1),tempChartData=vue.ref({}),chartData=vue.ref({}),countMap=vue.ref({}),getScale=vue.computed(()=>vue.unref(scale$1)),getStage=vue.computed(()=>({stageWidth:vue.unref(stageWidth),stageHeight:vue.unref(stageHeight)})),getSketchRuleLine=vue.computed(()=>vue.unref(sketchRuleLine)),getTargetWidget=vue.computed(()=>vue.unref(targetsWidget)),getWidgetConfig=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.config}),getWidgetList=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.list}),getWidgetHoverIds=vue.computed(()=>vue.unref(widgetHoverIds)),getPasteWidget=vue.computed(()=>vue.unref(pasteWidget)),getCreateLoading=vue.computed(()=>vue.unref(createLoading)),getRightPannel=vue.computed(()=>vue.unref(showRightPannel)),getTheme=vue.computed(()=>vue.unref(theme)),getChartData=vue.computed(()=>vue.unref(chartData)),getCountMap=vue.computed(()=>vue.unref(countMap));function setSacle(i){scale$1.value=i/100}function setSketchRuleLine(i,n){vue.unref(sketchRuleLine).h=i,vue.unref(sketchRuleLine).v=n}function clearSketchRuleLine(){sketchRuleLine.value={h:[],v:[]}}function setTargetWidget(i){targetsWidget.value=i}function setWidgetList(i){vue.unref(widgetConfg).list=i}function setWidgetHoverIds(i){widgetHoverIds.value=i}function delWidgetItem(i){setWidgetList(vue.unref(getWidgetList).filter(n=>!i.includes(n.id))),setTargetWidget(vue.unref(getTargetWidget).filter(n=>!i.includes(n.id)))}function copyWidgetItem(i){pasteWidget.value=[],i.forEach(n=>{const r=vue.unref(getWidgetList).find(o=>o.id==n);r&&vue.unref(pasteWidget).push(r)})}function pasteWidgetItem(){vue.unref(pasteWidget).forEach(r=>{const o=JSON.parse(JSON.stringify(r));let a=o.x,l=o.y;o.x+40>vue.unref(stageWidth)-o.w?a=vue.unref(stageWidth)-o.w-40:a+=40,o.y+40>vue.unref(stageHeight)-o.h?l=vue.unref(stageHeight)-o.h-40:l+=40,vue.unref(widgetConfg).list.unshift({...o,id:nanoid(),x:a,y:l,z:vue.unref(widgetConfg).list.length+1,locked:!1})})}function sortWidgetList(){vue.unref(widgetConfg).list.sort((i,n)=>n.z-i.z)}function setCreateLoading(i){createLoading.value=i,i&&(targetsWidget.value=[],clearSketchRuleLine())}function setRightPannel(i){showRightPannel.value=i}function setStageWidth(i){i&&(stageWidth.value=i,vue.unref(widgetConfg).config.stageWidth=i)}function setStageHeight(i){i&&(stageHeight.value=i,vue.unref(widgetConfg).config.stageHeight=i)}function setTheme(){theme.value=vue.unref(theme)=="dark"?"":"dark",document.getElementsByTagName("html")[0].className=vue.unref(theme),localStorage.setItem("design-theme",vue.unref(theme))}function setChartData(i){chartData.value=i}function setCountMap(i,n){vue.unref(countMap)[i]=n}const useScreenDesign=()=>({theme,stageWidth,stageHeight,scale:scale$1,targetsWidget,sketchRuleLine,widgetConfg,widgetHoverIds,pasteWidget,createLoading,showRightPannel,tempChartData,chartData,countMap,getScale,getStage,getSketchRuleLine,getTargetWidget,getWidgetConfig,getWidgetList,getWidgetHoverIds,getPasteWidget,getCreateLoading,getRightPannel,getTheme,getChartData,getCountMap,setSacle,setSketchRuleLine,clearSketchRuleLine,setTargetWidget,setWidgetList,setWidgetHoverIds,delWidgetItem,copyWidgetItem,pasteWidgetItem,sortWidgetList,setCreateLoading,setRightPannel,setStageWidth,setStageHeight,setTheme,setChartData,setCountMap});/*!
|
|
2
2
|
* Compressor.js v1.2.1
|
|
3
3
|
* https://fengyuanchen.github.io/compressorjs
|
|
4
4
|
*
|
|
@@ -612,7 +612,7 @@ ${p} div ,${p} span,${p} a,${p} * {
|
|
|
612
612
|
* https://clipboardjs.com/
|
|
613
613
|
*
|
|
614
614
|
* Licensed MIT © Zeno Rocha
|
|
615
|
-
*/(function(i,n){(function(o,a){i.exports=a()})(commonjsGlobal,function(){return function(){var r={686:function(l,s,u){u.d(s,{default:function(){return F}});var c=u(279),d=u.n(c),f=u(370),p=u.n(f),v=u(817),g=u.n(v);function m(W){try{return document.execCommand(W)}catch{return!1}}var _=function(J){var Q=g()(J);return m("cut"),Q},y=_;function b(W){var J=document.documentElement.getAttribute("dir")==="rtl",Q=document.createElement("textarea");Q.style.fontSize="12pt",Q.style.border="0",Q.style.padding="0",Q.style.margin="0",Q.style.position="absolute",Q.style[J?"right":"left"]="-9999px";var Y=window.pageYOffset||document.documentElement.scrollTop;return Q.style.top="".concat(Y,"px"),Q.setAttribute("readonly",""),Q.value=W,Q}var C=function(J,Q){var Y=b(J);Q.container.appendChild(Y);var oe=g()(Y);return m("copy"),Y.remove(),oe},x=function(J){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Y="";return typeof J=="string"?Y=C(J,Q):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J==null?void 0:J.type)?Y=C(J.value,Q):(Y=g()(J),m("copy")),Y},w=x;function V(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(Q){return typeof Q}:V=function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},V(W)}var $=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=J.action,Y=Q===void 0?"copy":Q,oe=J.container,z=J.target,ee=J.text;if(Y!=="copy"&&Y!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(z!==void 0)if(z&&V(z)==="object"&&z.nodeType===1){if(Y==="copy"&&z.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Y==="cut"&&(z.hasAttribute("readonly")||z.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ee)return w(ee,{container:oe});if(z)return Y==="cut"?y(z):w(z,{container:oe})},S=$;function E(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(Q){return typeof Q}:E=function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},E(W)}function k(W,J){if(!(W instanceof J))throw new TypeError("Cannot call a class as a function")}function P(W,J){for(var Q=0;Q<J.length;Q++){var Y=J[Q];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(W,Y.key,Y)}}function T(W,J,Q){return J&&P(W.prototype,J),Q&&P(W,Q),W}function B(W,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(J&&J.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),J&&N(W,J)}function N(W,J){return N=Object.setPrototypeOf||function(Y,oe){return Y.__proto__=oe,Y},N(W,J)}function O(W){var J=I();return function(){var Y=j(W),oe;if(J){var z=j(this).constructor;oe=Reflect.construct(Y,arguments,z)}else oe=Y.apply(this,arguments);return D(this,oe)}}function D(W,J){return J&&(E(J)==="object"||typeof J=="function")?J:L(W)}function L(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(W){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},j(W)}function M(W,J){var Q="data-clipboard-".concat(W);if(J.hasAttribute(Q))return J.getAttribute(Q)}var R=function(W){B(Q,W);var J=O(Q);function Q(Y,oe){var z;return k(this,Q),z=J.call(this),z.resolveOptions(oe),z.listenClick(Y),z}return T(Q,[{key:"resolveOptions",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof oe.action=="function"?oe.action:this.defaultAction,this.target=typeof oe.target=="function"?oe.target:this.defaultTarget,this.text=typeof oe.text=="function"?oe.text:this.defaultText,this.container=E(oe.container)==="object"?oe.container:document.body}},{key:"listenClick",value:function(oe){var z=this;this.listener=p()(oe,"click",function(ee){return z.onClick(ee)})}},{key:"onClick",value:function(oe){var z=oe.delegateTarget||oe.currentTarget,ee=this.action(z)||"copy",le=S({action:ee,container:this.container,target:this.target(z),text:this.text(z)});this.emit(le?"success":"error",{action:ee,text:le,trigger:z,clearSelection:function(){z&&z.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(oe){return M("action",oe)}},{key:"defaultTarget",value:function(oe){var z=M("target",oe);if(z)return document.querySelector(z)}},{key:"defaultText",value:function(oe){return M("text",oe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(oe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(oe,z)}},{key:"cut",value:function(oe){return y(oe)}},{key:"isSupported",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],z=typeof oe=="string"?[oe]:oe,ee=!!document.queryCommandSupported;return z.forEach(function(le){ee=ee&&!!document.queryCommandSupported(le)}),ee}}]),Q}(d()),F=R},828:function(l){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function c(d,f){for(;d&&d.nodeType!==s;){if(typeof d.matches=="function"&&d.matches(f))return d;d=d.parentNode}}l.exports=c},438:function(l,s,u){var c=u(828);function d(v,g,m,_,y){var b=p.apply(this,arguments);return v.addEventListener(m,b,y),{destroy:function(){v.removeEventListener(m,b,y)}}}function f(v,g,m,_,y){return typeof v.addEventListener=="function"?d.apply(null,arguments):typeof m=="function"?d.bind(null,document).apply(null,arguments):(typeof v=="string"&&(v=document.querySelectorAll(v)),Array.prototype.map.call(v,function(b){return d(b,g,m,_,y)}))}function p(v,g,m,_){return function(y){y.delegateTarget=c(y.target,g),y.delegateTarget&&_.call(v,y)}}l.exports=f},879:function(l,s){s.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},s.nodeList=function(u){var c=Object.prototype.toString.call(u);return u!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in u&&(u.length===0||s.node(u[0]))},s.string=function(u){return typeof u=="string"||u instanceof String},s.fn=function(u){var c=Object.prototype.toString.call(u);return c==="[object Function]"}},370:function(l,s,u){var c=u(879),d=u(438);function f(m,_,y){if(!m&&!_&&!y)throw new Error("Missing required arguments");if(!c.string(_))throw new TypeError("Second argument must be a String");if(!c.fn(y))throw new TypeError("Third argument must be a Function");if(c.node(m))return p(m,_,y);if(c.nodeList(m))return v(m,_,y);if(c.string(m))return g(m,_,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(m,_,y){return m.addEventListener(_,y),{destroy:function(){m.removeEventListener(_,y)}}}function v(m,_,y){return Array.prototype.forEach.call(m,function(b){b.addEventListener(_,y)}),{destroy:function(){Array.prototype.forEach.call(m,function(b){b.removeEventListener(_,y)})}}}function g(m,_,y){return d(document.body,m,_,y)}l.exports=f},817:function(l){function s(u){var c;if(u.nodeName==="SELECT")u.focus(),c=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var d=u.hasAttribute("readonly");d||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),d||u.removeAttribute("readonly"),c=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var f=window.getSelection(),p=document.createRange();p.selectNodeContents(u),f.removeAllRanges(),f.addRange(p),c=f.toString()}return c}l.exports=s},279:function(l){function s(){}s.prototype={on:function(u,c,d){var f=this.e||(this.e={});return(f[u]||(f[u]=[])).push({fn:c,ctx:d}),this},once:function(u,c,d){var f=this;function p(){f.off(u,p),c.apply(d,arguments)}return p._=c,this.on(u,p,d)},emit:function(u){var c=[].slice.call(arguments,1),d=((this.e||(this.e={}))[u]||[]).slice(),f=0,p=d.length;for(f;f<p;f++)d[f].fn.apply(d[f].ctx,c);return this},off:function(u,c){var d=this.e||(this.e={}),f=d[u],p=[];if(f&&c)for(var v=0,g=f.length;v<g;v++)f[v].fn!==c&&f[v].fn._!==c&&p.push(f[v]);return p.length?d[u]=p:delete d[u],this}},l.exports=s,l.exports.TinyEmitter=s}},o={};function a(l){if(o[l])return o[l].exports;var s=o[l]={exports:{}};return r[l](s,s.exports,a),s.exports}return function(){a.n=function(l){var s=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(s,{a:s}),s}}(),function(){a.d=function(l,s){for(var u in s)a.o(s,u)&&!a.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:s[u]})}}(),function(){a.o=function(l,s){return Object.prototype.hasOwnProperty.call(l,s)}}(),a(686)}().default})})(clipboard);var clipboardExports=clipboard.exports;const Clipboard$1=getDefaultExportFromCjs(clipboardExports),useClipboard=i=>{const n=(i==null?void 0:i.appendToBody)===void 0?!0:i.appendToBody;return{toClipboard(r,o){return new Promise((a,l)=>{const s=document.createElement("button"),u=new Clipboard$1(s,{text:()=>r,action:()=>"copy",container:o!==void 0?o:document.body});u.on("success",c=>{u.destroy(),a(c)}),u.on("error",c=>{u.destroy(),l(c)}),n&&document.body.appendChild(s),s.click(),n&&document.body.removeChild(s)})}}},_hoisted_1$1e={class:"mb-2"},_hoisted_2$12=vue.createElementVNode("div",{class:"mb-2 font-bold"},"显示名称",-1),_hoisted_3$V={class:"relative mt-4 mb-4 flex flex-col gap-2.5"},_hoisted_4$T={class:"flex gap-2.5 items-center"},_hoisted_5$K=vue.createElementVNode("span",{class:"font-bold"},"SQL计算公式",-1),_hoisted_6$E={class:"flex items-center gap-1.5"},_hoisted_7$A=vue.createElementVNode("i",{class:"ri-lightbulb-line"},null,-1),_hoisted_8$x=vue.createElementVNode("span",{class:"text-xs"},"使用规范SQL函数和计算公式,以下表达式将嵌入到SELECT语句中",-1),_hoisted_9$t={class:"flex gap-2.5 items-center"},_hoisted_10$p=vue.createElementVNode("span",null,"字段列表",-1),_hoisted_11$k={class:"flex items-center gap-1.5"},_hoisted_12$h={class:"flex items-center gap-2.5 flex-wrap"},_hoisted_13$e=["onClick"],_hoisted_14$d={class:"text-black"},_sfc_main$1v=vue.defineComponent({__name:"model-sql",props:{options:{default:()=>[]}},emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{toClipboard:a}=useClipboard(),l=vue.ref(!1),s=i,u=r,c=vue.ref(""),d=vue.ref(""),f=vue.ref(null),p=m=>{if(c.value="",d.value="",l.value=!0,f.value=m??{},m){const _=JSON.parse(JSON.stringify(m.data));d.value=_.identifier??"",c.value=_.comment}},v=async m=>{try{await a(m),o.$message({type:"success",message:"复制成功",plain:!0})}catch{o.$message({type:"warning",message:"复制失败",plain:!0})}},g=()=>{var m;if(!vue.unref(d)){o.$message({type:"warning",message:"请输入SQL语句",plain:!0});return}if(vue.unref(c)==""){o.$message({type:"warning",message:"请输入显示名称",plain:!0});return}u("success",{aggType:"applySql",identifier:vue.unref(d),comment:vue.unref(c),showLabel:vue.unref(c)},((m=vue.unref(f))==null?void 0:m.index)??""),l.value=!1};return n({init:p}),(m,_)=>{const y=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createBlock(y,{modelValue:vue.unref(l),"onUpdate:modelValue":_[3]||(_[3]=b=>vue.isRef(l)?l.value=b:null),title:"SQL计算",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:_[2]||(_[2]=b=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1e,[_hoisted_2$12,vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(c),"onUpdate:modelValue":_[0]||(_[0]=b=>vue.isRef(c)?c.value=b:null),placeholder:"请输入显示名称"},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_3$V,[vue.createElementVNode("div",_hoisted_4$T,[_hoisted_5$K,vue.createElementVNode("span",_hoisted_6$E,[vue.createVNode(vue.unref(elementPlus.ElText),{type:"warning"},{default:vue.withCtx(()=>[_hoisted_7$A]),_:1}),vue.createVNode(vue.unref(elementPlus.ElText),{type:"info"},{default:vue.withCtx(()=>[_hoisted_8$x]),_:1})])]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(d),"onUpdate:modelValue":_[1]||(_[1]=b=>vue.isRef(d)?d.value=b:null),placeholder:"请输入SQL语句,例如:max(tbValue+isVal)+max(tbValue)",type:"textarea"},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_9$t,[_hoisted_10$p,vue.createElementVNode("span",_hoisted_11$k,[vue.createVNode(vue.unref(elementPlus.ElText),{type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("点击可复制")]),_:1})])]),vue.createElementVNode("div",_hoisted_12$h,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.options,b=>(vue.openBlock(),vue.createElementBlock("div",{style:{border:"1px solid #eee"},onClick:C=>v(b.identifier),class:"bg-gray-100 flex flex-col p-2.5 justify-center items-center rounded gap-0.5 cursor-pointer",key:b.identifier},[vue.createElementVNode("div",_hoisted_14$d,vue.toDisplayString(b.columnComment),1),vue.createVNode(vue.unref(elementPlus.ElText),{type:"info"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(b.identifier),1)]),_:2},1024)],8,_hoisted_13$e))),128))])])]),_:1},8,["modelValue"])}}}),_withScopeId$v=i=>(vue.pushScopeId("data-v-d0ae7404"),i=i(),vue.popScopeId(),i),_hoisted_1$1d={key:0},_hoisted_2$11=_withScopeId$v(()=>vue.createElementVNode("div",{class:"mb-2 text-sm indicators-title"},[vue.createElementVNode("i",{class:"mr-1 ri-table-line"}),vue.createTextVNode(" 基本指标 ")],-1)),_hoisted_3$U=["onClick"],_hoisted_4$S=_withScopeId$v(()=>vue.createElementVNode("i",{class:"ri-lightbulb-line"},null,-1)),_hoisted_5$J={key:1},_hoisted_6$D={class:"flex items-center mb-2 text-sm indicators-title"},_hoisted_7$z={class:"overflow-y-auto max-h-96"},_hoisted_8$w=["onClick"],_hoisted_9$s={class:"field-label"},_hoisted_10$o=_withScopeId$v(()=>vue.createElementVNode("i",{class:"ri-add-fill"},null,-1)),_sfc_main$1u=vue.defineComponent({__name:"model-table-summary",props:{modelValue:{default:()=>[]},iconMap:{default:()=>{}},aggArgsList:{default:()=>[]},groupArgsList:{default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("chartList");const l=vue.ref(!1),s=vue.ref(1),u=vue.ref(null),c=vue.ref(null),d=vue.ref([{label:"总数",value:"count",tip:"数据的总行数"},{label:"总和",value:"sum",tip:"列的所有值的总和"},{label:"平均值",value:"avg",tip:"列的所有值的平均值"},{label:"最少",value:"min",tip:"列的最小值"},{label:"最大",value:"max",tip:"列的最大值"},{label:"计算公式",value:"exp",tip:"可手动输入计算公式"},{label:"SQL计算",value:"applySql",tip:"可手动输入sql语句"}]);vue.watch(l,_=>{_&&(v.value={},s.value=1)});const f=_=>{o("update:modelValue",r.modelValue.filter(y=>y.showLabel!==_.showLabel))},p=(_,y)=>{_.aggType=="applySql"&&vue.unref(c).init({data:_,index:y}),_.aggType=="exp"&&vue.unref(u).init({data:_,index:y})},v=vue.ref({}),g=_=>{if(_.value==="count"){if(r.modelValue.some(y=>y.aggType==_.value)){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}o("update:modelValue",[...r.modelValue,{identifier:1,aggType:_.value,showLabel:_.label}]),l.value=!1;return}if(_.value=="exp"){vue.unref(u).init();return}if(_.value=="applySql"){vue.unref(c).init();return}s.value=2,v.value=_},m=_=>{var y,b;if(r.modelValue.some(C=>{var x;return C.identifier==_.identifier&&C.aggType==((x=vue.unref(v))==null?void 0:x.value)})){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}l.value=!1,o("update:modelValue",[...r.modelValue,{identifier:_.identifier,comment:_.columnComment,aggType:(y=vue.unref(v))==null?void 0:y.value,showLabel:_.columnComment+((b=vue.unref(v))==null?void 0:b.label)}])};return(_,y)=>{const b=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(b,{title:"汇总方式",class:"mb-2"}),vue.createElementVNode("div",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(_.modelValue,(C,x)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:C.value,class:vue.normalizeClass(["m-1",[C.aggType=="exp"?"cursor-pointer":""]]),closable:!0,onClick:w=>p(C,x),onClose:w=>f(C),type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.showLabel),1)]),_:2},1032,["onClick","class","onClose"]))),128)),vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"click",width:"300px",placement:"top-start",visible:vue.unref(l),"onUpdate:visible":y[1]||(y[1]=C=>vue.isRef(l)?l.value=C:null)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",size:"small"},{default:vue.withCtx(()=>[_hoisted_10$o,vue.createTextVNode(" "+vue.toDisplayString(_.modelValue.length?"":"添加度量"),1)]),_:1})]),default:vue.withCtx(()=>[vue.unref(s)==1?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1d,[_hoisted_2$11,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(d),C=>(vue.openBlock(),vue.createElementBlock("div",{onClick:x=>g(C),key:C.value,class:vue.normalizeClass([{active:vue.unref(v).value==C.value},"indicators-item"])},[vue.createTextVNode(vue.toDisplayString(C.label)+" ",1),vue.createVNode(vue.unref(elementPlus.ElTooltip),{effect:"dark",content:C.tip,placement:"top"},{default:vue.withCtx(()=>[_hoisted_4$S]),_:2},1032,["content"])],10,_hoisted_3$U))),128))])):vue.createCommentVNode("",!0),vue.unref(s)==2?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$J,[vue.createElementVNode("div",_hoisted_6$D,[vue.createElementVNode("i",{class:"mr-1 text-xl cursor-pointer ri-arrow-left-s-line",onClick:y[0]||(y[0]=C=>s.value=1)}),vue.createTextVNode(" "+vue.toDisplayString(vue.unref(v).label),1)]),vue.createElementVNode("div",_hoisted_7$z,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(r.aggArgsList,C=>(vue.openBlock(),vue.createElementBlock("div",{onClick:x=>m(C),key:C.identifier,class:"indicators-item"},[vue.createElementVNode("div",null,[vue.createElementVNode("i",{class:vue.normalizeClass([_.iconMap[C.dataType],"mr-2"])},null,2),vue.createElementVNode("span",_hoisted_9$s,vue.toDisplayString(C.columnComment),1)])],8,_hoisted_8$w))),128))])])):vue.createCommentVNode("",!0)]),_:1},8,["visible"]),vue.createVNode(ModelExp,{ref_key:"modelPercentRef",ref:u,options:r.aggArgsList,onSuccess:y[2]||(y[2]=(C,x)=>x!==""?r.modelValue[x]=C:o("update:modelValue",[...r.modelValue,C]))},null,8,["options"]),vue.createVNode(_sfc_main$1v,{ref_key:"modelSqlRef",ref:c,options:r.groupArgsList,onSuccess:y[3]||(y[3]=(C,x)=>x!==""?r.modelValue[x]=C:o("update:modelValue",[...r.modelValue,C]))},null,8,["options"])])],64)}}}),modelTableSummary_vue_vue_type_style_index_0_scoped_d0ae7404_lang="",modelTableSunmary=_export_sfc$2(_sfc_main$1u,[["__scopeId","data-v-d0ae7404"]]),_sfc_main$1t=vue.defineComponent({__name:"chart-list-widget",props:{type:{default:""}},setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.inject("chartList"),o=a=>{n.$baseEventBus.emit("model-chart-click",a)};return(a,l)=>(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(r),s=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:a.type==s.type?"primary":"",key:s.type,onClick:u=>o(s)},{default:vue.withCtx(()=>{var u;return[vue.createElementVNode("i",{class:vue.normalizeClass((u=vue.unref(echartsTypeList)[s.type])==null?void 0:u.icon)},null,2)]}),_:2},1032,["type","onClick"]))),128))}}),_withScopeId$u=i=>(vue.pushScopeId("data-v-b71f07d1"),i=i(),vue.popScopeId(),i),_hoisted_1$1c={class:"overflow-y-auto max-h-96"},_hoisted_2$10=["onClick"],_hoisted_3$T={class:"field-label"},_hoisted_4$R=_withScopeId$u(()=>vue.createElementVNode("i",{class:"ri-add-fill"},null,-1)),_sfc_main$1s=vue.defineComponent({__name:"model-table-other-summary",props:{modelValue:{default:()=>[]},iconMap:{default:()=>{}},list:{default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("chartList");const l=vue.ref(!1);vue.ref(null);const s=c=>{o("update:modelValue",r.modelValue.filter(d=>d.showLabel!==c.showLabel))},u=c=>{if(r.modelValue.some(d=>d.identifier==c.identifier)){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}l.value=!1,o("update:modelValue",[...r.modelValue,{identifier:c.identifier,comment:c.columnComment,aggType:"other",showLabel:c.columnComment}])};return(c,d)=>{const f=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(f,{title:"显示其他列",class:"mt-2 mb-2"}),vue.createElementVNode("div",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.modelValue,(p,v)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:p.value,class:"m-1",closable:!0,onClose:g=>s(p),type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(p.showLabel),1)]),_:2},1032,["onClose"]))),128)),vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"click",width:"300px",placement:"top-start","popper-class":"ace-select",visible:vue.unref(l),"onUpdate:visible":d[0]||(d[0]=p=>vue.isRef(l)?l.value=p:null)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",size:"small"},{default:vue.withCtx(()=>[_hoisted_4$R]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1c,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.list,p=>(vue.openBlock(),vue.createElementBlock("div",{onClick:v=>u(p),key:p.identifier,class:"indicators-item"},[vue.createElementVNode("div",null,[vue.createElementVNode("i",{class:vue.normalizeClass([c.iconMap[p.dataType],"mr-2"])},null,2),vue.createElementVNode("span",_hoisted_3$T,vue.toDisplayString(p.columnComment),1)])],8,_hoisted_2$10))),128))])]),_:1},8,["visible"])])],64)}}}),modelTableOtherSummary_vue_vue_type_style_index_0_scoped_b71f07d1_lang="",ModelTableOtherSummary=_export_sfc$2(_sfc_main$1s,[["__scopeId","data-v-b71f07d1"]]),_withScopeId$t=i=>(vue.pushScopeId("data-v-c1a63796"),i=i(),vue.popScopeId(),i),_hoisted_1$1b={class:"flex w-full h-full"},_hoisted_2$$={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$S={class:"flex flex-col flex-1 pb-3 pr-3 overflow-y-auto"},_hoisted_4$Q={key:0,class:"relative flex items-center justify-center pannel h-14"},_hoisted_5$I={class:"absolute left-5 top-3"},_hoisted_6$C=_withScopeId$t(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_7$y=_withScopeId$t(()=>vue.createElementVNode("i",{class:"ri-table-line"},null,-1)),_hoisted_8$v={class:"absolute flex items-center right-5 top-4"},_hoisted_9$r=_withScopeId$t(()=>vue.createElementVNode("i",{class:"mr-1 ri-settings-2-line"},null,-1)),_hoisted_10$n={class:"ml-2 mr-2"},_hoisted_11$j={class:"flex flex-col"},_hoisted_12$g={class:"flex-1 overflow-y-auto"},_hoisted_13$d={key:0,class:"flex items-center justify-center pannel h-14"},_hoisted_14$c=_withScopeId$t(()=>vue.createElementVNode("i",{class:"mr-1 ri-save-line"},null,-1)),_sfc_main$1r=vue.defineComponent({__name:"table-widget",props:{modelValue:{default:""},title:{default:""},sortHtml:{default:""},indicatorsId:{default:""},resultTitle:{default:""},dynamicSearchForm:{default:()=>[]}},emits:["update:modelValue","update:title","update:sortHtml","update:resultTitle","update:indicatorsId","update:dynamicSearchForm","success"],setup(i,{expose:n,emit:r}){const o=i,a=r,l=useScreenDesign(),{proxy:s}=vue.getCurrentInstance(),{setFormValue:u,getFormValue:c}=s.$globalHooks.useForm(),{dynamicSearchForm:d,dynamicSearchFormat:f,dynamicSearchParams:p}=s.$aceDynamicSearch(s),v=vue.inject("modelEle"),g=vue.inject("getListModelIndicators");vue.inject("chartList");const m={varchar:"ri-text",date:"ri-calendar-2-line",datetime:"ri-calendar-2-line",int:"ri-hashtag",decimal:"ri-hashtag"},_={day:"按日",week:"按周",month:"按月",quarter:"按季度",year:"按年","":"按时分秒"},y=vue.ref(!1),b=vue.ref(!0),C=vue.ref(0),x=vue.ref([]),w=vue.ref([]),V=vue.ref([]),$=vue.ref([]),S=vue.ref([]),E=vue.ref(!0),k=vue.ref(!0),P=async z=>{var se,K;E.value=!0,k.value=!1;const ee=JSON.parse((z==null?void 0:z.groupArgsJson)??"[]"),le=JSON.parse((z==null?void 0:z.aggArgsJson)??JSON.stringify([{identifier:1,aggType:"count",showLabel:"总数"}]));$.value=le.filter(Z=>Z.aggType!="other"),S.value=le.filter(Z=>Z.aggType=="other"),ee.length||(E.value=!1),C.value=(z==null?void 0:z.pageSize)??20,j.value=JSON.parse((z==null?void 0:z.sortArgsJson)??"{}"),z!=null&&z.formConfJson?(d.value=f(JSON.parse(z.formConfJson??"[]")),a("update:dynamicSearchForm",d.value)):await fetch$1(s).getFormJsonConfig((se=vue.unref(v))==null?void 0:se.id).then(Z=>{var U;d.value=f(JSON.parse(((U=Z.data)==null?void 0:U.formConfJson)??"[]"))}),a("update:dynamicSearchForm",d.value),u(z,F),s.$baseHttp.post("/api/ace-data-center/aidc/modelAnalysis",{projectId:s.$baseGetCurrentProjectId(),modelId:(K=vue.unref(v))==null?void 0:K.id,serialId:new Date().getTime()}).then(Z=>{b.value=!1,x.value=Z.data.filter(U=>!["创建时间","创建人","所属项目","创建部门","标签"].includes(U.columnComment)).map(U=>({...U,dateFormatType:["date","datetime"].includes(U.dataType)?"day":""})),V.value=Z.data.filter(U=>["ADDABLE","SEMIADDABLE"].includes(U.quantityType)),ee.forEach(U=>{const q=x.value.find(X=>X.identifier==U.identifier);q&&(w.value.push({...q,dataType:U.dataType,dateFormatType:U.dateFormatType}),q.dateFormatType=U.dateFormatType)}),E.value=!1,setTimeout(()=>{k.value=!0},1e3)})};vue.watch([$,w,S],()=>{vue.unref(k)&&(j.value={}),L()},{deep:!0});let T=null;const B=vue.ref(null),N=vue.ref(!1),O=vue.ref([]),D=vue.ref([]),L=async()=>{clearTimeout(T),T=setTimeout(async()=>{var K,Z;D.value=[],l.setChartData([]);const z=I(),ee=Object.keys(vue.unref(j)).map(U=>({field:U,type:vue.unref(j)[U]=="ascending"?"asc":"desc"})),le={aggArgsJson:JSON.stringify([...vue.unref($),...vue.unref(S)]),groupArgsJson:JSON.stringify(z),sortArgsJson:JSON.stringify(ee),params:p(vue.unref(d)),pageSize:vue.unref(C),modelId:(K=vue.unref(v))==null?void 0:K.id,formConfJson:JSON.stringify(vue.unref(d))};if(o.indicatorsId&&(le.modelIndicatorsId=o.indicatorsId),a("update:title",`${vue.unref($).length}个指标:${vue.unref($).length?"根据":""}${z.map(U=>U.showLabel).toString()}${vue.unref($).length?"分组的":""}${vue.unref($).filter((U,q)=>q<3).map(U=>U.showLabel).toString()}${vue.unref($).length>3?"...":""}`),!vue.unref($).length||vue.unref(E)){O.value=[];return}N.value=!0;const se=await s.$baseHttp.post("/api/ace-data-center/model-indicators/debug",le);B.value=le,N.value=!1,se&&(O.value=((Z=se.data)==null?void 0:Z.records)??[],l.setChartData({x:z,y:[...vue.unref($),...vue.unref(S)],params:le}),vue.unref(O).length&&Object.keys(vue.unref(O)[0]).forEach(U=>{D.value.push({label:U,prop:U,sortable:"custom"})}))})},I=()=>vue.unref(w).map(z=>({identifier:z.identifier,comment:z.columnComment,showLabel:z.columnComment+(_[z.dateFormatType]??""),dateFormatType:z.dateFormatType||null})),j=vue.ref({}),M=({column:z})=>{vue.unref(j)[z.property]&&(z.order=vue.unref(j)[z.property])};vue.watch(j,z=>{const ee=Object.keys(z).map(le=>`${le}${z[le]=="descending"?"降序":"升序"}`);a("update:sortHtml",ee.length?`<span class="text-color-warning">排序:${ee.toString()}</span>`:"")},{deep:!0});const R=z=>{const{prop:ee,order:le}=z;!le||vue.unref(j)[ee]===le?delete vue.unref(j)[ee]:vue.unref(j)[ee]=le,L()};fetch$1(s).loadIndicatorsMenu().then(z=>{F.find(ee=>ee.fieldName=="tags").options=Object.keys(z.data).map(ee=>({label:ee,value:ee}))});const F=vue.reactive([{name:"名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"描述",type:FieldType.Textarea,fieldName:"remark",value:""},{name:"标签",type:FieldType.Select,fieldName:"tags",value:"",options:[],multiple:!0,allowCreate:!0,required:!0,placeholder:"请选择标签或输入标签"},{name:"code",type:FieldType.Text,fieldName:"code",value:"",hide:!0}]),W=vue.ref(!1),J=()=>{F.find(z=>z.fieldName=="remark").value=o.title,W.value=!0},Q=async()=>{var K;const{params:z,error:ee}=c(F);if(ee.length>0)return;const le=I();if(!le.length||!vue.unref($).length){s.$message({type:"warning",message:"计算维度或汇总方式不能为空",plain:!0});return}z.code||(z.code=nanoid()),z.groupArgsJson=JSON.stringify(le),z.aggArgsJson=JSON.stringify([...vue.unref($),...vue.unref(S)]),z.modelId=(K=vue.unref(v))==null?void 0:K.id,z.projectId=s.$baseGetCurrentProjectId(),z.pageSize=vue.unref(C),z.formConfJson=JSON.stringify(vue.unref(d)),z.sortArgsJson=JSON.stringify(vue.unref(j)),o.indicatorsId&&(z.id=o.indicatorsId),W.value=!1;const se=await s.$baseHttp.post(`/api/ace-data-center/model-indicators/${o.indicatorsId?"update":"save"}`,z,{header:{loading:!0}});se&&(o.indicatorsId||a("update:indicatorsId",se.data),a("update:resultTitle",z.name),s.$message({type:"success",message:"操作成功",plain:!0}),u(z,F),g())},Y=()=>{a("update:modelValue","chart")},oe=()=>{s.$baseExportExcel({title:o.title,url:"/api/ace-data-center/model-indicators/debug",header:vue.unref(D),customParams:vue.unref(B)})};return n({init:P,dynamicSearchForm:d,handlePopupForm:J,handleSubmit:Q}),(z,ee)=>{var X,ie;const le=vue.resolveComponent("aceDynamicSearch"),se=vue.resolveComponent("AppTable"),K=vue.resolveComponent("AppEmpty"),Z=vue.resolveComponent("aceDynamicList"),U=vue.resolveComponent("AppForm"),q=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1b,[vue.createElementVNode("div",_hoisted_2$$,[vue.createElementVNode("div",_hoisted_3$S,[vue.unref($).length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(le,{form:vue.unref(d),onSuccess:ee[0]||(ee[0]=H=>L())},null,8,["form"]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(N),animated:""},{default:vue.withCtx(()=>[vue.unref(D).length?(vue.openBlock(),vue.createBlock(se,{key:0,tableData:vue.unref(D),list:vue.unref(O),loading:!1,headerCellClassName:M,onSortChange:R},null,8,["tableData","list"])):(vue.openBlock(),vue.createBlock(K,{key:1,description:"暂无数据",class:"mt-4"}))]),_:1},8,["loading"])],64)):(vue.openBlock(),vue.createBlock(Z,{key:1,id:(X=vue.unref(v))==null?void 0:X.id,title:(ie=vue.unref(v))==null?void 0:ie.modelName,showPageIndex:!0},null,8,["id","title"]))]),vue.unref($).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$Q,[vue.createElementVNode("div",_hoisted_5$I,[vue.createVNode(vue.unref(elementPlus.ElTooltip),{effect:"dark",content:"保存汇总配置后可设置",placement:"top",visible:vue.unref(y)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{disabled:z.indicatorsId=="",type:"warning",style:{padding:"0 10px"},onMouseenter:ee[1]||(ee[1]=H=>{z.indicatorsId||(y.value=!0)}),onMouseleave:ee[2]||(ee[2]=H=>y.value=!1),onClick:Y},{default:vue.withCtx(()=>[vue.createTextVNode(" 图表配置 "),_hoisted_6$C]),_:1},8,["disabled"])]),_:1},8,["visible"])]),vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary"},{default:vue.withCtx(()=>[_hoisted_7$y]),_:1}),vue.createVNode(_sfc_main$1t)]),_:1}),vue.createElementVNode("div",_hoisted_8$v,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[_hoisted_9$r,vue.createTextVNode(" 显示前 "),vue.createElementVNode("div",_hoisted_10$n,[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{size:"small",style:{width:"100px"},modelValue:vue.unref(C),"onUpdate:modelValue":ee[3]||(ee[3]=H=>vue.isRef(C)?C.value=H:null),onChange:ee[4]||(ee[4]=H=>L()),min:1,max:9999999},null,8,["modelValue"])]),vue.createTextVNode(" 条聚合数据 ")]),_:1}),vue.unref(D).length?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"ml-2 cursor-pointer ri-download-2-line text-color-warning",onClick:oe})):vue.createCommentVNode("",!0)])])):vue.createCommentVNode("",!0)]),vue.createElementVNode("aside",_hoisted_11$j,[vue.createElementVNode("div",_hoisted_12$g,[vue.createVNode(modelTableSunmary,{aggArgsList:vue.unref(V),groupArgsList:vue.unref(x),modelValue:vue.unref($),"onUpdate:modelValue":ee[5]||(ee[5]=H=>vue.isRef($)?$.value=H:null),iconMap:m},null,8,["aggArgsList","groupArgsList","modelValue"]),vue.createVNode(ModelTableOtherSummary,{iconMap:m,list:vue.unref(x),modelValue:vue.unref(S),"onUpdate:modelValue":ee[6]||(ee[6]=H=>vue.isRef(S)?S.value=H:null)},null,8,["list","modelValue"]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(modelTableDimension,{loading:vue.unref(b),list:vue.unref(x),iconMap:m,calendarType:_,modelValue:vue.unref(w),"onUpdate:modelValue":ee[7]||(ee[7]=H=>vue.isRef(w)?w.value=H:null)},null,8,["loading","list","modelValue"])],512),[[vue.vShow,vue.unref($).length]])]),vue.unref($).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$d,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:J},{default:vue.withCtx(()=>[_hoisted_14$c,vue.createTextVNode(" 完 成 ")]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(q,{modelValue:vue.unref(W),"onUpdate:modelValue":ee[9]||(ee[9]=H=>vue.isRef(W)?W.value=H:null),title:"保存指标",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:Q},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:ee[8]||(ee[8]=H=>W.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(U,{form:vue.unref(F),col:1},null,8,["form"])]),_:1},8,["modelValue"])])])}}}),tableWidget_vue_vue_type_style_index_0_scoped_c1a63796_lang="",tableWidget=_export_sfc$2(_sfc_main$1r,[["__scopeId","data-v-c1a63796"]]),_withScopeId$s=i=>(vue.pushScopeId("data-v-6fadb38d"),i=i(),vue.popScopeId(),i),_hoisted_1$1a={class:"flex flex-wrap chart-container"},_hoisted_2$_=["onClick"],_hoisted_3$R=["onClick"],_hoisted_4$P=_withScopeId$s(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_5$H=[_hoisted_4$P],_hoisted_6$B={key:0,class:"success setting"},_hoisted_7$x=_withScopeId$s(()=>vue.createElementVNode("i",{class:"ml-1 ri-check-line"},null,-1)),_hoisted_8$u=[_hoisted_7$x],_hoisted_9$q={class:"label"},_sfc_main$1q=vue.defineComponent({__name:"model-chart-menu",props:{modelValue:{default:""}},emits:["click-chart-setting","update:modelValue"],setup(i,{emit:n}){vue.getCurrentInstance();const r=[{...echartsTypeList[3],key:"3"},...Object.keys(echartsTypeList).filter(u=>u!="3").map(u=>({...echartsTypeList[u],key:u}))],o=vue.inject("chartList"),a=n,l=u=>{a("update:modelValue",String(u))},s=u=>{a("update:modelValue",String(u)),a("click-chart-setting")};return(u,c)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1a,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(r,d=>{var f;return vue.createElementVNode("div",{class:"items",key:d.key,onClick:p=>l(d.key)},[vue.createElementVNode("div",{class:vue.normalizeClass(["icon",{active:u.modelValue==d.key}])},[vue.createElementVNode("i",{class:vue.normalizeClass(d.icon)},null,2),vue.createElementVNode("div",{class:"setting",onClick:vue.withModifiers(p=>s(d.key),["stop"])},_hoisted_5$H,8,_hoisted_3$R),(f=vue.unref(o))!=null&&f.some(p=>p.type==d.key)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$B,_hoisted_8$u)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("div",_hoisted_9$q,vue.toDisplayString(d.name),1)],8,_hoisted_2$_)}),64))]))}}),modelChartMenu_vue_vue_type_style_index_0_scoped_6fadb38d_lang="",modelChartMenu=_export_sfc$2(_sfc_main$1q,[["__scopeId","data-v-6fadb38d"]]),_sfc_main$1p=vue.defineComponent({__name:"model-chart-setting",props:{option:{default:{}},type:{default:""}},emits:["close"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),s=vue.ref(""),u=vue.inject("indicatorsId"),c=vue.inject("getListModelIndicators"),d=vue.inject("getChartWidgetList"),f=vue.computed(()=>({3:_sfc_main$1Z,2:_sfc_main$1X,1:_sfc_main$1Y,4:_sfc_main$1U,5:_sfc_main$1W,6:_sfc_main$1V,7:_sfc_main$1T,8:_sfc_main$1S,9:_sfc_main$1R,10:_sfc_main$1Q,11:_sfc_main$1P})[o.type]??null),p=vue.ref(!1),v=()=>{s.value="data",p.value=!0},g=async()=>{o.option.tooltip&&(delete o.option.tooltip.valueFormatter,delete o.option.tooltip.formatter),o.type=="9"&&delete o.option.series[2].label.formatter,await l.$baseHttp.post("/api/ace-data-center/model-indicators-echarts/save",{modelIndicatorsId:vue.unref(u),echartsType:o.type,echartsConfig:chartJsonToStringFormat({...o.option,customSeriesData:window.customSeriesData,dataset:{...o.option.dataset,source:[]}})},{headers:{loading:!0}})&&(l.$message({type:"success",message:"操作成功",plain:!0}),await d(),await c(),p.value=!1,a("close"))},m=()=>{p.value=!1};return n({init:v,handleSubmit:g}),(_,y)=>{const b=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(b,{modelValue:vue.unref(p),"onUpdate:modelValue":y[3]||(y[3]=C=>vue.isRef(p)?p.value=C:null),withHeader:!1,modal:!1,direction:"ltr",size:"350px",modalClass:"ace-modal-drawer"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:y[1]||(y[1]=C=>g())},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:y[2]||(y[2]=C=>m())},{default:vue.withCtx(()=>[vue.createTextVNode("关闭")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCollapse),{accordion:"",modelValue:vue.unref(s),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(s)?s.value=C:null)},{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(f),{key:0,option:o.option,type:_.type},null,8,["option","type"])):vue.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}}),modelChartSetting_vue_vue_type_style_index_0_scoped_71b96102_lang="",modelChartSetting=_export_sfc$2(_sfc_main$1p,[["__scopeId","data-v-71b96102"]]),_withScopeId$r=i=>(vue.pushScopeId("data-v-85f16186"),i=i(),vue.popScopeId(),i),_hoisted_1$19={class:"flex w-full h-full"},_hoisted_2$Z={class:"flex-1"},_hoisted_3$Q={key:0,class:"flex items-center justify-center pannel h-14"},_hoisted_4$O=_withScopeId$r(()=>vue.createElementVNode("i",{class:"mr-1 ri-save-line"},null,-1)),_hoisted_5$G={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_6$A={class:"relative flex flex-col flex-1 pb-3 pl-3"},_hoisted_7$w={class:"mb-2.5"},_hoisted_8$t={class:"relative flex items-center justify-center pannel h-14"},_hoisted_9$p={key:0,class:"absolute left-5 top-3"},_hoisted_10$m=_withScopeId$r(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_11$i=_withScopeId$r(()=>vue.createElementVNode("i",{class:"ri-table-line"},null,-1)),_sfc_main$1o=vue.defineComponent({__name:"chart-widget",props:{modelValue:{default:""},dynamicSearchForm:{default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.inject("chartList"),{option:s,formatChart:u}=useCustomChart(),c=vue.ref(""),d=vue.ref(null),f=vue.ref(!1),p=()=>{if(vue.unref(c)==""){a.$message({type:"warning",message:"请选择图表",plain:!0});return}const y=setInterval(()=>{vue.unref(f)&&(vue.unref(d).init(),clearInterval(y))},20)};vue.watch(c,async y=>{var C;if(s.value={},f.value=!1,y==""){f.value=!0;return}const b=(C=vue.unref(l))==null?void 0:C.find(x=>x.type==y);await u((b==null?void 0:b.code)??"",y),f.value=!0});const v=vue.ref(!1);a.$baseEventBus.on("model-chart-click",async y=>{v.value=!0,o("update:modelValue","chart"),c.value=y.type,setTimeout(()=>{v.value=!1},100)});const g=()=>{if(vue.unref(l).length>0){vue.unref(v)||(c.value=vue.unref(l)[0].type),f.value=!0;return}c.value="3"},m=()=>{const y=c.value;c.value="",setTimeout(()=>{c.value=y},10)},_=()=>{c.value="",o("update:modelValue","table")};return n({init:g}),(y,b)=>{var w;const C=vue.resolveComponent("aceDynamicSearch"),x=vue.resolveComponent("aceCustomChart");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$19,[vue.createElementVNode("aside",null,[vue.createElementVNode("div",_hoisted_2$Z,[vue.createVNode(modelChartMenu,{modelValue:vue.unref(c),"onUpdate:modelValue":b[0]||(b[0]=V=>vue.isRef(c)?c.value=V:null),onClickChartSetting:p},null,8,["modelValue"])]),(w=vue.unref(l))!=null&&w.some(V=>V.type==vue.unref(c))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$Q,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:b[1]||(b[1]=V=>vue.unref(d).handleSubmit())},{default:vue.withCtx(()=>[_hoisted_4$O,vue.createTextVNode(" 保 存 ")]),_:1})]))]),vue.createElementVNode("div",_hoisted_5$G,[vue.createElementVNode("div",_hoisted_6$A,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:!vue.unref(f),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_7$w,[vue.createVNode(C,{form:y.dynamicSearchForm,search:!1,disabled:""},null,8,["form"])]),vue.createVNode(x,{option:vue.unref(s),chartType:vue.unref(c),isCheckClick:!1},null,8,["option","chartType"])]),_:1},8,["loading"])]),vue.createElementVNode("div",_hoisted_8$t,[vue.unref(s)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$p,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",style:{padding:"0 10px"}},{default:vue.withCtx(()=>[vue.createTextVNode("可视化")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"",style:{padding:"0 10px"},onClick:p},{default:vue.withCtx(()=>[_hoisted_10$m]),_:1})]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"",onClick:_},{default:vue.withCtx(()=>[_hoisted_11$i]),_:1}),vue.createVNode(_sfc_main$1t,{type:vue.unref(c)},null,8,["type"])]),_:1})])]),vue.unref(c)?(vue.openBlock(),vue.createBlock(modelChartSetting,{key:0,ref_key:"modelChartSettingRef",ref:d,option:vue.unref(s),type:vue.unref(c),onClose:m},null,8,["option","type"])):vue.createCommentVNode("",!0)])}}}),chartWidget_vue_vue_type_style_index_0_scoped_85f16186_lang="",chartWidget=_export_sfc$2(_sfc_main$1o,[["__scopeId","data-v-85f16186"]]),_withScopeId$q=i=>(vue.pushScopeId("data-v-51646426"),i=i(),vue.popScopeId(),i),_hoisted_1$18={class:"design"},_hoisted_2$Y={class:"design-header"},_hoisted_3$P={class:"flex-1"},_hoisted_4$N={class:"mt-2 text-xs text-color-info"},_hoisted_5$F=["innerHTML"],_hoisted_6$z={class:"flex"},_hoisted_7$v={class:"mr-2"},_hoisted_8$s=_withScopeId$q(()=>vue.createElementVNode("i",{class:"mr-1 ri-settings-2-line"},null,-1)),_hoisted_9$o=_withScopeId$q(()=>vue.createElementVNode("i",{class:"mr-1 ri-close-line"},null,-1)),_hoisted_10$l={class:"flex flex-1 p-3 overflow-hidden design-container"},_sfc_main$1n=vue.defineComponent({__name:"index",emits:["close"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.ref(!1),l=vue.ref(!1),s=vue.ref(),u=vue.ref(null),c=vue.ref(null),d=vue.ref(null),f=vue.ref([]),p=vue.ref("0个指标"),v=vue.ref(""),g=vue.ref(""),m=vue.ref([]),_=r;vue.watch(a,S=>{S||o.$baseEventBus.off("model-chart-click")}),vue.provide("indicatorsId",g);const y=vue.inject("modelEle"),b=vue.ref(""),C=async S=>{var k;let E={};s.value="table",g.value=S,m.value=[],f.value=[],vue.unref(g)&&(E=await x(),w()),a.value=!0,b.value=(k=E==null?void 0:E.data)==null?void 0:k.name,vue.nextTick(()=>{vue.unref(u).init((E==null?void 0:E.data)??{})})};vue.watch(s,S=>{S=="chart"&&vue.unref(c).init()});const x=async()=>await o.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${vue.unref(g)}`,{headers:{loading:!0}}),w=async()=>{const S=await o.$baseHttp.post(`/api/ace-data-center/model-indicators-echarts/getEchartsTypes/${vue.unref(g)}`);m.value=S.data};vue.provide("getChartWidgetList",w),vue.provide("chartList",m);const V=()=>{o.$baseConfirm({content:"是否确定关闭",callConfirm:async()=>{a.value=!1,vue.unref(g)&&_("close")}})},$=S=>{f.value=S,vue.unref(u).dynamicSearchForm=S,vue.unref(u).handleSubmit()};return n({init:C}),(S,E)=>{const k=vue.resolveComponent("aceHeader"),P=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(P,{modelValue:vue.unref(a),"onUpdate:modelValue":E[11]||(E[11]=T=>vue.isRef(a)?a.value=T:null),withHeader:!1,size:"100%",modalClass:"ace-modal-drawer"},{default:vue.withCtx(()=>{var T,B;return[vue.createElementVNode("div",_hoisted_1$18,[vue.createElementVNode("div",_hoisted_2$Y,[vue.createElementVNode("div",_hoisted_3$P,[vue.createVNode(k,{title:vue.unref(s)=="table"?vue.unref(p):`${vue.unref(b)}【${vue.unref(p)}】`},vue.createSlots({_:2},[vue.unref(m).length?{name:"left",fn:vue.withCtx(()=>[vue.createElementVNode("i",{onClick:E[0]||(E[0]=N=>vue.unref(u).handlePopupForm()),class:"ml-2 text-base cursor-pointer ri-edit-box-line text-color-primary"})]),key:"0"}:void 0]),1032,["title"]),vue.createElementVNode("div",_hoisted_4$N,[vue.createTextVNode(" 模型数据 / "+vue.toDisplayString((T=vue.unref(y))==null?void 0:T.modelName)+" ["+vue.toDisplayString((B=vue.unref(y))==null?void 0:B.modelCode)+"] ",1),vue.createElementVNode("span",{class:"ml-2",innerHTML:vue.unref(v)},null,8,_hoisted_5$F)])]),vue.createElementVNode("div",_hoisted_6$z,[vue.withDirectives(vue.createElementVNode("div",_hoisted_7$v,[vue.createVNode(vue.unref(elementPlus.ElPopover),{placement:"bottom",visible:vue.unref(l),"onUpdate:visible":E[2]||(E[2]=N=>vue.isRef(l)?l.value=N:null),trigger:"click",width:"900px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"warning"},{default:vue.withCtx(()=>[_hoisted_8$s,vue.createTextVNode(" 筛选配置 ")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(aceIndicatorCustomSearch,{ref_key:"customSearchRef",ref:d,customSearchVisible:vue.unref(l),"onUpdate:customSearchVisible":E[1]||(E[1]=N=>vue.isRef(l)?l.value=N:null),onDynamicSearchFormUpdate:$,dynamicSearchForm:vue.unref(f)},null,8,["customSearchVisible","dynamicSearchForm"])]),_:1},8,["visible"])],512),[[vue.vShow,vue.unref(s)=="table"&&vue.unref(p)!="0个指标:"]]),vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:V},{default:vue.withCtx(()=>[_hoisted_9$o,vue.createTextVNode(" 关闭 ")]),_:1})])]),vue.createElementVNode("div",_hoisted_10$l,[vue.withDirectives(vue.createVNode(tableWidget,{ref_key:"tableWidgetRef",ref:u,modelValue:vue.unref(s),"onUpdate:modelValue":E[3]||(E[3]=N=>vue.isRef(s)?s.value=N:null),indicatorsId:vue.unref(g),"onUpdate:indicatorsId":E[4]||(E[4]=N=>vue.isRef(g)?g.value=N:null),title:vue.unref(p),"onUpdate:title":E[5]||(E[5]=N=>vue.isRef(p)?p.value=N:null),resultTitle:vue.unref(b),"onUpdate:resultTitle":E[6]||(E[6]=N=>vue.isRef(b)?b.value=N:null),sortHtml:vue.unref(v),"onUpdate:sortHtml":E[7]||(E[7]=N=>vue.isRef(v)?v.value=N:null),dynamicSearchForm:vue.unref(f),"onUpdate:dynamicSearchForm":E[8]||(E[8]=N=>vue.isRef(f)?f.value=N:null)},null,8,["modelValue","indicatorsId","title","resultTitle","sortHtml","dynamicSearchForm"]),[[vue.vShow,vue.unref(s)=="table"]]),vue.withDirectives(vue.createVNode(chartWidget,{ref_key:"chartWidgetRef",ref:c,dynamicSearchForm:vue.unref(f),"onUpdate:dynamicSearchForm":E[9]||(E[9]=N=>vue.isRef(f)?f.value=N:null),modelValue:vue.unref(s),"onUpdate:modelValue":E[10]||(E[10]=N=>vue.isRef(s)?s.value=N:null)},null,8,["dynamicSearchForm","modelValue"]),[[vue.vShow,vue.unref(s)=="chart"]])])])]}),_:1},8,["modelValue"])}}}),index_vue_vue_type_style_index_0_scoped_51646426_lang="",aceIndicatorDesign=_export_sfc$2(_sfc_main$1n,[["__scopeId","data-v-51646426"]]),_hoisted_1$17={class:"flex items-center"},_hoisted_2$X=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_3$O={class:"mt-3"},_hoisted_4$M={class:"flex items-center w-full overflow-hidden"},_hoisted_5$E={class:"overflow-hidden text-ellipsis whitespace-nowrap"},_hoisted_6$y={key:0,class:"mr-1 text-base ri-checkbox-circle-fill text-color-success"},_hoisted_7$u={key:1,class:"mr-1 text-base ri-progress-1-fill text-color-warning"},_hoisted_8$r={key:0,class:"flex items-center justify-end flex-1"},_sfc_main$1m=vue.defineComponent({__name:"menu",props:{tempId:{default:""}},emits:["node-click"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(null),u=vue.ref(null),c=r;vue.watch(l,g=>{vue.unref(u).filter(g)});const d=(g,m)=>g?m.name.includes(g):!0,f=vue.ref(!1),p=()=>{s.value=[],f.value=!0,fetch$1(a).loadIndicatorsMenu().then(g=>{s.value=Object.keys(g.data).map(_=>({name:_,id:_,children:g.data[_]}));let m;f.value=!1,vue.unref(s).length&&vue.nextTick(()=>{var _;o.tempId?m=vue.unref(u).getNode(o.tempId):m=vue.unref(u).getNode((_=vue.unref(s)[0].children[0])==null?void 0:_.id),m&&(v(m==null?void 0:m.data),vue.unref(u).setCurrentKey(m==null?void 0:m.data.id))})})};p();const v=g=>{Array.isArray(g.children)||c("node-click",g)};return n({init:p}),(g,m)=>{const _=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$17,[vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(l),"onUpdate:modelValue":m[0]||(m[0]=y=>vue.isRef(l)?l.value=y:null)},{prefix:vue.withCtx(()=>[_hoisted_2$X]),_:1},8,["modelValue"]),vue.renderSlot(g.$slots,"search")]),vue.createElementVNode("div",_hoisted_3$O,[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:"",count:2})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTree),{key:1,class:"animated fadeIn",ref_key:"treeRef",ref:u,data:vue.unref(s),"empty-text":"暂无数据","node-key":"id","default-expand-all":"",indent:0,"highlight-current":"","filter-node-method":d,onNodeClick:v},{default:vue.withCtx(({node:y,data:b})=>[vue.createElementVNode("div",_hoisted_4$M,[vue.createElementVNode("div",_hoisted_5$E,[Array.isArray(b.children)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b.normal?(vue.openBlock(),vue.createElementBlock("i",_hoisted_6$y)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_7$u))],64)),vue.createElementVNode("span",{class:vue.normalizeClass(["flex-1 overflow-hidden whitespace-nowrap text-ellipsis",{"font-bold":y.level==1}])},vue.toDisplayString(b.name),3)]),Array.isArray(b.children)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$r,[vue.renderSlot(g.$slots,"menu-item",{data:b})]))])]),empty:vue.withCtx(()=>[vue.createVNode(_,{description:"暂无数据"})]),_:3},8,["data"]))])],64)}}}),_hoisted_1$16={class:"rule-list"},_hoisted_2$W={key:0,class:"flex items-center"},_hoisted_3$N=vue.createElementVNode("i",{class:"ri-error-warning-fill text-2xl text-color-warning mr-2"},null,-1),_hoisted_4$L={key:1,class:"flex items-center"},_hoisted_5$D=vue.createElementVNode("i",{class:"ri-checkbox-circle-fill text-2xl text-color-success mr-2"},null,-1),_sfc_main$1l=vue.defineComponent({__name:"rule",props:{ruleList:{default:()=>[]}},setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(!1),o=vue.ref(""),a=vue.ref([]),l=c=>{o.value=`/api/ace-data-center/rule/ruleDataView?ruleId=${c}`,r.value=!0},s=c=>{vue.unref(a).length==0&&Object.keys(c.data[0]).forEach(d=>{if(d==="pageIndex"){a.value.unshift({label:"序号",prop:"pageIndex",width:"80px"});return}a.value.push({label:d,prop:d})})},u=()=>{n.$baseExportExcel({title:"数据列表",url:vue.unref(o),method:"get",header:vue.unref(a)})};return(c,d)=>{const f=vue.resolveComponent("aceHeader"),p=vue.resolveComponent("AppList"),v=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$16,[c.ruleList.length>0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(f,{title:"智能诊断",class:"mb-5"}),vue.createVNode(vue.unref(elementPlus.ElAlert),{type:"warning",closable:!1},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.ruleList,g=>(vue.openBlock(),vue.createElementBlock("div",{key:g.id,class:"mt-0 text-sm"},[+g.rows>0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$W,[_hoisted_3$N,vue.createTextVNode(" "+vue.toDisplayString(g.ruleName)+" 【异常数据"+vue.toDisplayString(g.rows>99?"99+":g.rows)+"】 ",1),vue.createVNode(vue.unref(elementPlus.ElLink),{class:"ml-2",type:"primary",onClick:m=>l(g.id)},{default:vue.withCtx(()=>[vue.createTextVNode("查看明细")]),_:2},1032,["onClick"])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$L,[_hoisted_5$D,vue.createTextVNode(" "+vue.toDisplayString(g.ruleName)+" 【未检测到异常数据】 ",1)]))]))),128))]),_:1})],64)):vue.createCommentVNode("",!0)]),vue.createVNode(v,{modelValue:vue.unref(r),"onUpdate:modelValue":d[1]||(d[1]=g=>vue.isRef(r)?r.value=g:null),title:"数据列表"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",onClick:u},{default:vue.withCtx(()=>[vue.createTextVNode("导 出")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:d[0]||(d[0]=g=>r.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("关 闭")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(p,{tableData:vue.unref(a),url:vue.unref(o),onSuccess:s},null,8,["tableData","url"])]),_:1},8,["modelValue"])],64)}}}),_hoisted_1$15={key:1,class:"animated fadeIn"},_hoisted_2$V={class:"flex items-center mt-5 mb-5 ml-2 moudle-1"},_hoisted_3$M={key:0,class:"mr-1 text-xl ri-error-warning-fill text-color-warning"},_hoisted_4$K={key:1,class:"mr-1 text-xl ri-checkbox-circle-fill text-color-success"},_hoisted_5$C={class:"ml-1"},_hoisted_6$x={class:"flex items-center select-type"},_hoisted_7$t=["onClick"],_hoisted_8$q={class:"mt-5 mb-5"},_hoisted_9$n={class:"mt-4"},_sfc_main$1k=vue.defineComponent({__name:"analysis",props:{indicatorsId:{default:""}},emits:["rule-success"],setup(i,{emit:n}){const r=i;vue.watch(()=>r.indicatorsId,()=>p());const o=n,{proxy:a}=vue.getCurrentInstance(),{dynamicSearchForm:l,dynamicSearchFormat:s,dynamicSearchParams:u}=a.$aceDynamicSearch(a),c=vue.ref(!0),d=vue.ref([]),f=vue.ref(null),p=async()=>{var w,V,$;c.value=!0,l.value=[],_.value={type:"",value:""},v.value=[],g.value="",C();const x=await fetch$1(a).detailAndTask(r.indicatorsId);f.value=x.data,(V=(w=x.data)==null?void 0:w.echartsDataVO)!=null&&V.config&&m(),($=x==null?void 0:x.data)!=null&&$.formConfJson&&(l.value=s(JSON.parse(x==null?void 0:x.data.formConfJson))),c.value=!1},v=vue.ref([]),g=vue.ref(""),m=async()=>{var w;v.value=[],g.value="";const x=await fetch$1(a).getEchartDetail({indicatorsId:r.indicatorsId});x&&(Object.keys(((w=x.data)==null?void 0:w.clientEchartsType)??{}).forEach(V=>{var $;Object.values(($=x.data)==null?void 0:$.clientEchartsType[V]).forEach(S=>{var E,k;v.value.push({client:V,label:(E=echartsTypeList[S])==null?void 0:E.name,icon:(k=echartsTypeList[S])==null?void 0:k.icon,value:`${V}_${S}`})})}),vue.unref(v).length>0&&(g.value=vue.unref(v)[0].value,b(vue.unref(g))))},_=vue.ref({type:"",value:""}),y=vue.ref(!1),b=async(x,w=!1)=>{var E;g.value=x,w&&(y.value=!0);const V=u(vue.unref(l)),$=x.split("_"),S=await fetch$1(a).pullEchartsDataVO({indicatorsId:r.indicatorsId,loadType:((E=vue.unref(f))==null?void 0:E.loadType)??3,params:V,targetClient:$[0],echartsType:$[1]});if(S){y.value=!1,vue.unref(_).type=$[1];try{vue.unref(_).value=chartJsonFormat(S.data.config)}catch{vue.unref(_).value=S.data.config}}},C=async()=>{var w;d.value=[];const x=await fetch$1(a).getRule({current:1,size:100,businessType:"indicators",businessId:r.indicatorsId});d.value=((w=x.data)==null?void 0:w.records)??[],o("rule-success",d.value)};return p(),(x,w)=>{const V=vue.resolveComponent("AppResourceVisitor"),$=vue.resolveComponent("aceHeader"),S=vue.resolveComponent("aceDynamicSearch"),E=vue.resolveComponent("aceChart");return vue.unref(c)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:""})):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$15,[vue.createVNode($,{title:"指标计算"},{default:vue.withCtx(()=>[vue.createVNode(V,{businessType:"INDICATORS",businessld:r.indicatorsId},null,8,["businessld"])]),_:1}),vue.createElementVNode("div",_hoisted_2$V,[vue.unref(d).some(k=>k.rows>0)?(vue.openBlock(),vue.createElementBlock("i",_hoisted_3$M)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_4$K)),vue.createElementVNode("span",_hoisted_5$C,vue.toDisplayString(vue.unref(f).remark),1)]),vue.createVNode($,{title:"指标数据"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_6$x,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),k=>(vue.openBlock(),vue.createElementBlock("span",{onClick:P=>b(k.value,!0),class:vue.normalizeClass(["flex items-center cursor-pointer",[k.value==vue.unref(g)?"text-color-primary":"text-gray-600"]]),key:k.value},[vue.createElementVNode("i",{class:vue.normalizeClass([k.icon,"mr-1"])},null,2),vue.createTextVNode(" "+vue.toDisplayString(k.label),1)],10,_hoisted_7$t))),128))])]),_:1}),vue.createElementVNode("div",_hoisted_8$q,[vue.unref(l).length>0?(vue.openBlock(),vue.createBlock(S,{key:0,form:vue.unref(l),onSuccess:w[0]||(w[0]=k=>b(vue.unref(g),!0)),class:"mb-0"},null,8,["form"])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9$n,[vue.createVNode(E,{type:vue.unref(_).type,options:vue.unref(_).value,loading:vue.unref(y)},null,8,["type","options","loading"])])]),vue.createVNode(_sfc_main$1l,{ruleList:vue.unref(d)},null,8,["ruleList"])]))}}}),analysis_vue_vue_type_style_index_0_scoped_bf2d49fa_lang="",aceIndicatorSystemPreview=_export_sfc$2(_sfc_main$1k,[["__scopeId","data-v-bf2d49fa"]]),_hoisted_1$14={class:"h-full"},_sfc_main$1j=vue.defineComponent({__name:"relation",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(!0),a=["#00ADD0","#FFA12F","#B62AFF","#604BFF","#6E35FF","#002AFF","#20C0F4","#95F300","#04FDB8","#AF5AFF"],l=(s,u,c="#00f6ff")=>s.map((d,f)=>{switch(d&&d.title&&(d.name=d.title),u==1&&(c=a.find((p,v)=>v==f%10)),(u===0||u===1)&&(d.label={position:"inside"}),u){case 0:d.symbolSize=70;break;case 1:d.symbolSize=50;break;default:d.symbolSize=10;break}return d.lineStyle={color:c},d.children?(d.itemStyle={borderColor:c,color:c},d.children=l(d.children,u+1,c)):d.itemStyle={color:"transparent",borderColor:c},d});return fetch$1(n).indicatorsRelationTree().then(s=>{if(o.value=!1,!s.data.length){r.value={};return}r.value={type:"tree",toolbox:{show:!0,iconStyle:{borderColor:"#03ceda"},feature:{restore:{}}},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"rgba(0,0,0,.8)",borderWidth:.5,textStyle:{fontSize:10,color:"#fff"}},series:[{type:"tree",hoverAnimation:!0,data:l([s==null?void 0:s.data[0]],0),top:10,bottom:10,left:10,right:10,layout:"radial",symbol:"circle",symbolSize:10,nodePadding:20,animationDurationUpdate:750,expandAndCollapse:!0,initialTreeDepth:2,roam:!0,focusNodeAdjacency:!0,itemStyle:{borderWidth:1},label:{color:"#000",fontSize:10,fontFamily:"SourceHanSansCN",position:"inside",rotate:0},lineStyle:{width:1,curveness:.5}}]}}),(s,u)=>{const c=vue.resolveComponent("v-chart");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",_hoisted_1$14,[vue.createVNode(c,{option:vue.unref(r),autoresize:""},null,8,["option"])])),[[vue.unref(elementPlus.vLoading),vue.unref(o)]])}}}),_hoisted_1$13={key:0,class:"flex items-center gap-x-2.5"},_hoisted_2$U=vue.createElementVNode("div",{class:"font-bold"},"数据分析",-1),_sfc_main$1i=vue.defineComponent({__name:"yoy",props:{search:{default:()=>[]},originSearch:{default:()=>[]},chartType:{default:""},option:{default:null},chartData:{default:null}},setup(i,{expose:n}){const r=i,{proxy:o}=vue.getCurrentInstance(),{dynamicSearchForm:a,dynamicSearchFormat:l,dynamicSearchParams:s}=o.$aceDynamicSearch(o),u=["yySingle","yymmSingle","yymmddSingle"],{seriesItem:c}=useLineCommon(),d=vue.computed(()=>r.search.find(m=>u.includes(m.type))),f=vue.computed(()=>{const m=vue.unref(d)?Object.values(s([vue.unref(d)])).every(_=>_==""):!1;return r.search.filter(_=>u.includes(_.type)).length==1&&!m}),p=vue.ref("");vue.watch(p,()=>v());const v=async()=>{var B;if(!vue.unref(f)||vue.unref(p)=="")return;const m=JSON.parse(JSON.stringify((B=r.chartData)==null?void 0:B.params)),_=JSON.parse(JSON.stringify(r.search)),y=_.find(N=>u.includes(N.type)),b=r.originSearch.find(N=>u.includes(N.type)),x=JSON.parse((m==null?void 0:m.groupArgsJson)??"[]").find(N=>N.comment==r.option.dataShow.x);m.groupArgsJson=JSON.stringify([x]);const w=x.dateFormatType;switch(y.type){case"yymmSingle":y.value=dayjs(y.value).subtract(1,vue.unref(p)=="TB"?"year":"month").format("YYYY-MM");break;case"yymmddSingle":y.value=dayjs(y.value).subtract(1,vue.unref(p)=="TB"?"year":"day").format("YYYY-MM-DD");break;case"yySingle":y.value=dayjs(y.value).subtract(1,"year").format("YYYY");break}m.params=s(_);const $=r.option.dataset.dimensions;$.length>=3&&r.option.dataset.dimensions.pop();const S=await o.$baseHttp.post("/api/ace-data-center/model-indicators/debug",m),E=$[0],k=r.option.dataShow.y.filter(N=>!r.option.dataShow.hide.includes(N));vue.unref(y.type).includes("Range")?(r.option.dataset.dimensions[1]=`${b!=null&&b.minValue?`${b==null?void 0:b.minValue}~`:""}${(b==null?void 0:b.maxValue)??""}${k}`,r.option.dataset.dimensions.push(`${y.minValue?`${y.minValue}~`:""}${(y==null?void 0:y.maxValue)??""}${k}`)):(r.option.dataset.dimensions[1]=`${b==null?void 0:b.value}${k}`,r.option.dataset.dimensions[2]=`${y.value}${k}`,r.option.dataset.dimensions[3]="增长率");const P=r.option.series[0];r.option.series=[],S.data.records.forEach(N=>{g(N,E,w)});const T=JSON.parse(JSON.stringify(r.option.dataset.temp_source));T.forEach((N,O)=>{g(N,E,w);let D=null;N[r.option.dataset.dimensions[1]]=N[k],w?(D=S.data.records.find(j=>j[E]==N[E]),D||(["year"].includes(w)&&(D=S.data.records.find(j=>j[E].indexOf(y.value)>=0),N[E]=E),["day","month"].includes(w)&&(D=S.data.records.find(j=>j[E].split("-").at(-1)==N[E].split("-").at(-1))))):D=S.data.records.find(j=>j[E]==N[E]),D||(D={[k]:0}),D&&(N[r.option.dataset.dimensions[2]]=D[k]);const L=N[r.option.dataset.dimensions[1]]??0,I=N[r.option.dataset.dimensions[2]]??0;N.增长率=!L||!I?0:((L-I)/I*100).toFixed(2)}),r.option.dataset.source=T,setTimeout(()=>{const{yAxis:N,xAxis:O}=r.option;let D="yAxis";!Array.isArray(N)&&N.type!="value"&&(D="xAxis"),r.option.series=[P,{...P,itemStyle:{...(P==null?void 0:P.itemStyle)??{},color:null}},{...c,name:"增长率",[`${D}Index`]:1}],r.option[D]=[Array.isArray(r.option[D])?r.option[D][0]:r.option[D],{type:"value",name:"增长率",nameGap:20,splitLine:!1,nameLocation:D=="xAxis"?"start":"end"}]})},g=(m,_,y)=>{if(!(!y||(m[_]??"")=="")&&["day"].includes(y)){const b=m[_].split("-").filter((C,x)=>x==0?"":C);m[_]=b.join("-")}};return n({init:v,type:p}),(m,_)=>vue.unref(f)&&m.option?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$13,[_hoisted_2$U,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(p),"onUpdate:modelValue":_[0]||(_[0]=y=>vue.isRef(p)?p.value=y:null)},{default:vue.withCtx(()=>{var y;return[vue.createVNode(vue.unref(elementPlus.ElRadio),{label:"TB",value:"TB"},{default:vue.withCtx(()=>[vue.createTextVNode("同比")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{label:"HB",value:"HB",disabled:!["yymmSingle","yymmddSingle"].includes((y=vue.unref(d))==null?void 0:y.type)},{default:vue.withCtx(()=>[vue.createTextVNode(" 环比 ")]),_:1},8,["disabled"])]}),_:1},8,["modelValue"])])])):vue.createCommentVNode("",!0)}}),_withScopeId$p=i=>(vue.pushScopeId("data-v-3923290f"),i=i(),vue.popScopeId(),i),_hoisted_1$12={key:2,class:"flex flex-col chart-preview"},_hoisted_2$T={class:"flex mb-2.5"},_hoisted_3$L={key:0,class:"flex-1"},_hoisted_4$J={class:"flex items-center gap-x-2.5"},_hoisted_5$B=_withScopeId$p(()=>vue.createElementVNode("div",{class:"font-bold"},"计算指标",-1)),_hoisted_6$w={key:0,class:"flex items-center gap-x-2.5"},_hoisted_7$s=_withScopeId$p(()=>vue.createElementVNode("div",{class:"font-bold"},"分组维度",-1)),_hoisted_8$p={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_9$m={class:"relative flex-1"},_hoisted_10$k={class:"flex justify-center change-btns"},_sfc_main$1h=vue.defineComponent({__name:"IndicatorsView",props:{dynamicSearchForm:{default:()=>[]},result:{default:()=>{}},chartData:{default:null}},emits:["search-success"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance(),{dynamicSearchForm:l,dynamicSearchFormat:s,dynamicSearchParams:u}=a.$aceDynamicSearch(a),c=vue.computed(()=>r.chartData),d=vue.ref(null),f=vue.ref(""),p=vue.ref([]),v=vue.ref(r.dynamicSearchForm),g=vue.ref(!1),{option:m,formatChart:_,chartType:y,setChartData:b,changeChartSeries:C,chartDataParams:x}=useCustomChart(),w={day:"按日",week:"按周",month:"按月",quarter:"按季度",year:"按年","":"按时分秒"};vue.onMounted(async()=>{await a.$baseHttp.post(`/api/ace-data-center/model-indicators-echarts/getEchartsTypes/${r.result.id}`).then(P=>{p.value=P.data,P.data.length&&(f.value=P.data[0].code,y.value=P.data[0].type)})}),vue.watch(f,async()=>{E()});const V=P=>{f.value!=P.code&&(m.value={},y.value=P.type,f.value=P.code,vue.unref(d)&&(vue.unref(d).type=""))},$=vue.ref(""),S=vue.ref(""),E=async()=>{var P,T,B,N,O,D,L;v.value=JSON.parse(JSON.stringify(r.dynamicSearchForm)),g.value=!0,m.value={},$.value="",S.value=["2","11"].includes(vue.unref(y))?"":[],r.chartData&&(x.value=r.chartData),await _(vue.unref(f)),$.value=(T=(P=vue.unref(m))==null?void 0:P.dataShow)==null?void 0:T.x,Array.isArray((N=(B=vue.unref(m))==null?void 0:B.dataShow)==null?void 0:N.y)?S.value=(O=vue.unref(m))==null?void 0:O.dataShow.y.filter(I=>{var j;return!(((j=vue.unref(m))==null?void 0:j.dataShow.hide)??[]).includes(I)}):S.value=(L=(D=vue.unref(m))==null?void 0:D.dataShow)==null?void 0:L.y,isMobile&&["1","3","5"].includes(vue.unref(y))&&!vue.unref(m).dataZoom&&(m.value.grid.bottom="10%",m.value.dataZoom=[{type:"slider",backgroundColor:"#eef8fd",fillerColor:"#14b1f8",borderColor:"#eef8fd",startValue:0,endValue:3,filterMode:"",showDetail:!1,width:"90%",height:10,handleSize:30,left:"5%",bottom:25},{type:"inside",zoomOnMouseWheel:!1,moveOnMouseWheel:!0,moveOnMouseMove:!0}]),setTimeout(()=>{g.value=!1},10)};vue.watch([$,S],async([P,T],[B,N])=>{var O;vue.unref(g)||(vue.unref(m).dataShow.x=P,vue.unref(m).dataShow.y=T,Array.isArray(T)&&(vue.unref(m).dataShow.hide=(O=vue.unref(m))==null?void 0:O.dataShow.y.filter(D=>vue.unref(c).y.includes(D.showLabel))),(P!=B||["2","7"].includes(vue.unref(y)))&&(m.value.dataset.source=await b(vue.unref(y),P,["2","7"].includes(vue.unref(y))?T:null),m.value.dataset.temp_source=JSON.parse(JSON.stringify(m.value.dataset.source)),v.value=JSON.parse(JSON.stringify(r.dynamicSearchForm)),vue.unref(d)&&(vue.unref(d).type="")),["xAxis","yAxis"].forEach(D=>{Array.isArray(m.value[D])&&(m.value[D]=m.value[D].filter(L=>L.name!="增长率"))}),C())},{deep:!0});const k=()=>{vue.unref(c).params.params=u(r.dynamicSearchForm),E(),o("search-success",vue.unref(c).params.params)};return(P,T)=>{var D;const B=vue.resolveComponent("aceDynamicSearch"),N=vue.resolveComponent("AppEmpty"),O=vue.resolveComponent("aceCustomChart");return vue.openBlock(),vue.createElementBlock("div",null,[r.dynamicSearchForm.length?(vue.openBlock(),vue.createBlock(B,{key:0,form:r.dynamicSearchForm,onSuccess:k},null,8,["form"])):vue.createCommentVNode("",!0),vue.unref(p).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$12,[vue.createElementVNode("div",_hoisted_2$T,[["9"].includes(vue.unref(y))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$L,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:!((D=vue.unref(m))!=null&&D.dataShow),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$J,[_hoisted_5$B,vue.createElementVNode("div",null,[["2","11"].includes(vue.unref(y))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadioGroup),{key:0,modelValue:vue.unref(S),"onUpdate:modelValue":T[0]||(T[0]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList((((L=vue.unref(c))==null?void 0:L.y)??[]).filter(I=>I.aggType!="other"),I=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadio),{key:I.showLabel,label:I.showLabel,value:I.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])):["8"].includes(vue.unref(y))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckboxGroup),{key:1,modelValue:vue.unref(S),"onUpdate:modelValue":T[1]||(T[1]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L,I;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList([...((L=vue.unref(c))==null?void 0:L.y)??[],...(((I=vue.unref(c))==null?void 0:I.x)??[]).map(j=>({...j,showLabel:j.comment}))],j=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:j.showLabel,label:j.showLabel,value:j.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckboxGroup),{key:2,modelValue:vue.unref(S),"onUpdate:modelValue":T[2]||(T[2]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList((((L=vue.unref(c))==null?void 0:L.y)??[]).filter(I=>I.aggType!="other"),I=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:I.showLabel,label:I.showLabel,value:I.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"]))])]),["8"].includes(vue.unref(y))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$w,[_hoisted_7$s,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref($),"onUpdate:modelValue":T[3]||(T[3]=L=>vue.isRef($)?$.value=L:null)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c).x,L=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadio),{key:L.comment,label:L.comment,value:L.comment},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(L.comment)+" ",1),w[L.dateFormatType]?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(" ("+vue.toDisplayString(w[L.dateFormatType])+") ",1)],64)):vue.createCommentVNode("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])])),["3","1"].includes(vue.unref(y))&&vue.unref(m).dataShow.y.filter(L=>!vue.unref(m).dataShow.hide.includes(L)).length==1?(vue.openBlock(),vue.createBlock(_sfc_main$1i,{key:1,ref_key:"yoyRef",ref:d,chartData:P.chartData,option:vue.unref(m),search:vue.unref(v),originSearch:r.dynamicSearchForm,chartType:vue.unref(y)},null,8,["chartData","option","search","originSearch","chartType"])):vue.createCommentVNode("",!0)]),_:1},8,["loading"])]))]),vue.createElementVNode("div",_hoisted_8$p,[vue.createElementVNode("div",_hoisted_9$m,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(g),animated:""},{default:vue.withCtx(()=>[vue.createVNode(O,{option:vue.unref(m),chartType:vue.unref(y),indicatorsId:r.result.id},null,8,["option","chartType","indicatorsId"])]),_:1},8,["loading"])]),vue.createElementVNode("div",_hoisted_10$k,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),L=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(f)==L.code?"primary":"",key:L.type,onClick:I=>V(L)},{default:vue.withCtx(()=>{var I;return[vue.createElementVNode("i",{class:vue.normalizeClass((I=vue.unref(echartsTypeList)[L.type])==null?void 0:I.icon)},null,2)]}),_:2},1032,["type","onClick"]))),128))]),_:1})])])])):(vue.openBlock(),vue.createBlock(N,{key:1,description:"暂无数据"}))])}}}),IndicatorsView_vue_vue_type_style_index_0_scoped_3923290f_lang="",IndicatorsView=_export_sfc$2(_sfc_main$1h,[["__scopeId","data-v-3923290f"]]),_hoisted_1$11=["hidden"],_hoisted_2$S={class:"flex items-center w-full mb-4"},_hoisted_3$K={class:"flex justify-end flex-1"},_hoisted_4$I={class:"mb-4"},_hoisted_5$A={class:"flex mb-5 moudle-1"},_hoisted_6$v={class:"flex-1"},_hoisted_7$r={class:"flex items-center mt-2"},_hoisted_8$o={key:0,class:"mr-1 text-xl ri-error-warning-fill text-color-warning"},_hoisted_9$l={key:1,class:"mr-1 text-xl ri-checkbox-circle-fill text-color-success"},_hoisted_10$j={class:"ml-1"},_hoisted_11$h=vue.createElementVNode("div",{class:"w-10"},null,-1),_hoisted_12$f={class:"flex-1"},_hoisted_13$c={class:"items-center mt-2"},_hoisted_14$b=vue.createElementVNode("i",{class:"mr-1 text-xl ri-database-2-fill text-color-primary"},null,-1),_hoisted_15$5={key:1,class:"w-full"},_sfc_main$1g=vue.defineComponent({__name:"modelIndicators",props:{indicatorsId:{default:""},modelIndicatorsRules:{default:()=>[]}},emits:["click-design","rule-success"],setup(i,{expose:n,emit:r}){const o=i,a=r;vue.watch(()=>o.indicatorsId,()=>w());const{proxy:l}=vue.getCurrentInstance(),{dynamicSearchForm:s,dynamicSearchFormat:u,dynamicSearchParams:c}=l.$aceDynamicSearch(l),d=vue.ref(!0),f=vue.ref("basic"),p=vue.ref(!1),v=vue.ref(!1),g=vue.ref([]),m=vue.ref({}),_=vue.ref(null),y=vue.ref([]),b=vue.ref([]),C=vue.ref({}),x=({column:j})=>{vue.unref(C)[j.property]&&(j.order=vue.unref(C)[j.property])},w=async()=>{d.value=!0,f.value="basic",m.value={},k();const j=await l.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${o.indicatorsId}`);_.value=j.data,d.value=!1,C.value=JSON.parse(j.data.sortArgsJson??"{}"),s.value=u(JSON.parse(j.data.formConfJson??"[]")),S()},V=vue.ref(!1),$=vue.ref(!1),S=async(j="")=>{var W,J,Q,Y,oe,z,ee,le,se;j!="sort"&&(b.value=[],V.value=!0),$.value=!0;const M=Object.keys(vue.unref(C)).map(K=>({field:K,type:vue.unref(C)[K]=="ascending"?"asc":"desc"})),R={aggArgsJson:(W=vue.unref(_))==null?void 0:W.aggArgsJson,groupArgsJson:(J=vue.unref(_))==null?void 0:J.groupArgsJson,sortArgsJson:JSON.stringify(M),params:vue.unref(O)??c(u(JSON.parse(((Q=vue.unref(_))==null?void 0:Q.formConfJson)??"[]"))),modelIndicatorsId:(Y=vue.unref(_))==null?void 0:Y.id,pageSize:(oe=vue.unref(_))==null?void 0:oe.pageSize,modelId:(z=vue.unref(_))==null?void 0:z.modelId},F=await l.$baseHttp.post("/api/ace-data-center/model-indicators/debug",R);F&&(y.value=((ee=F.data)==null?void 0:ee.records)??[],V.value=!1,$.value=!1,m.value={x:JSON.parse((le=vue.unref(_))==null?void 0:le.groupArgsJson),y:JSON.parse((se=vue.unref(_))==null?void 0:se.aggArgsJson),params:R},vue.unref(y).length&&j!="sort"&&(Object.keys(vue.unref(y)[0]).forEach(K=>{b.value.push({label:K,prop:K,sortable:"custom"})}),b.value.push({label:"操作",prop:"button",width:"120px",fixed:"right",slot:!0})))},E=j=>{const{prop:M,order:R}=j;!R||vue.unref(C)[M]===R?delete vue.unref(C)[M]:vue.unref(C)[M]=R,S("sort")},k=async()=>{var M;g.value=[];const j=await fetch$1(l).getRule({current:1,size:100,businessType:"indicators",businessId:o.indicatorsId});g.value=((M=j.data)==null?void 0:M.records)??[],a("rule-success",g.value)},P=vue.ref(null),T=j=>{P.value=j,p.value=!0},B=j=>(j.modelIndicatorsId=vue.unref(_).id,j.row=vue.unref(P),j),N=()=>{v.value=!0},O=vue.ref(null),D=j=>{O.value=j,S()};vue.watch(p,j=>I(j)),vue.watch(v,j=>I(j));const L=vue.ref(!1),I=j=>{self!=top&&(L.value=j,window.parent.postMessage(j?"model-indicators-open":"model-indicators-close","*"))};return w(),n({init:w,result:_}),(j,M)=>{const R=vue.resolveComponent("AppResourceVisitor"),F=vue.resolveComponent("aceHeader"),W=vue.resolveComponent("AppTable"),J=vue.resolveComponent("AppEmpty"),Q=vue.resolveComponent("aceDynamicList"),Y=vue.resolveComponent("AppDrawer");return vue.unref(d)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:""})):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"animated fadeIn",hidden:vue.unref(L)},[vue.createElementVNode("div",_hoisted_2$S,[vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:M[0]||(M[0]=oe=>f.value="basic"),type:vue.unref(f)=="basic"?"primary":""},{default:vue.withCtx(()=>[vue.createTextVNode(" 指标图表 ")]),_:1},8,["type"]),vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:M[1]||(M[1]=oe=>f.value="data"),type:vue.unref(f)=="data"?"primary":""},{default:vue.withCtx(()=>[vue.createTextVNode(" 指标数据 ")]),_:1},8,["type"])]),_:1})]),vue.createElementVNode("div",_hoisted_3$K,[vue.createVNode(R,{businessType:"MODEL_INDICATORS",businessld:o.indicatorsId},null,8,["businessld"])])]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createElementVNode("div",_hoisted_4$I,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref($),animated:""},{default:vue.withCtx(()=>[vue.createVNode(IndicatorsView,{dynamicSearchForm:vue.unref(s),result:vue.unref(_),chartData:vue.unref(m),onSearchSuccess:D},null,8,["dynamicSearchForm","result","chartData"])]),_:1},8,["loading"])])],512),[[vue.vShow,vue.unref(f)=="basic"]]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createElementVNode("div",_hoisted_5$A,[vue.createElementVNode("div",_hoisted_6$v,[vue.createVNode(F,{title:"指标计算"}),vue.createElementVNode("div",_hoisted_7$r,[vue.unref(g).some(oe=>oe.rows>0)?(vue.openBlock(),vue.createElementBlock("i",_hoisted_8$o)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_9$l)),vue.createElementVNode("span",_hoisted_10$j,vue.toDisplayString(vue.unref(_).remark),1)])]),_hoisted_11$h,vue.createElementVNode("div",_hoisted_12$f,[vue.createVNode(F,{title:"数据来源"}),vue.createElementVNode("div",_hoisted_13$c,[_hoisted_14$b,vue.createTextVNode(" 重构仓模型数据 | "+vue.toDisplayString(vue.unref(_).modelName)+"【 ",1),vue.createElementVNode("span",{class:"cursor-pointer text-color-primary",onClick:N},vue.toDisplayString(vue.unref(_).modelCode),1),vue.createTextVNode(" 】 ")])])]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(V),animated:""},{default:vue.withCtx(()=>[vue.unref(b).length?(vue.openBlock(),vue.createBlock(W,{key:0,maxHeight:"400px",tableData:vue.unref(b),list:vue.unref(y),loading:!1,headerCellClassName:x,onSortChange:E},{button:vue.withCtx(({row:oe})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:z=>T(oe)},{default:vue.withCtx(()=>[vue.createTextVNode("查看明细")]),_:2},1032,["onClick"])]),_:1},8,["tableData","list"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$5,[vue.createVNode(J,{description:"暂无数据",class:"mt-4"})]))]),_:1},8,["loading"])],512),[[vue.vShow,vue.unref(f)=="data"]]),vue.createVNode(_sfc_main$1l,{ruleList:vue.unref(g)},null,8,["ruleList"]),vue.createVNode(Y,{modelValue:vue.unref(p),"onUpdate:modelValue":M[2]||(M[2]=oe=>vue.isRef(p)?p.value=oe:null),title:"查看明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(F,{title:"统计:",class:"mb-2"}),vue.createVNode(W,{height:null,tableData:Object.keys(vue.unref(P)).map(oe=>({label:oe,prop:oe})),list:[vue.unref(P)],loading:!1},null,8,["tableData","list"]),vue.createVNode(F,{title:"钻取明细:",class:"mt-4 mb-2"}),vue.createVNode(Q,{id:vue.unref(_).modelId,keyName:"modelIndicatorsId",title:vue.unref(_).modelName,isDownLoad:vue.unref(isMobile),url:"/api/ace-data-center/model-indicators/drilling",formatParamsFunc:B},null,8,["id","title","isDownLoad"])]),_:1},8,["modelValue"]),vue.createVNode(Y,{modelValue:vue.unref(v),"onUpdate:modelValue":M[3]||(M[3]=oe=>vue.isRef(v)?v.value=oe:null),title:"模型数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(Q,{id:vue.unref(_).modelId,title:vue.unref(_).modelName},null,8,["id","title"])]),_:1},8,["modelValue"])],8,_hoisted_1$11))}}}),_hoisted_1$10=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_2$R={class:"mt-3"},_hoisted_3$J={key:1,class:"mr-1 -ml-5 text-base ri-edit-circle-fill text-color-primary"},_sfc_main$1f=vue.defineComponent({__name:"modelMenu",props:{type:{default:""}},emits:["node-click","change-type"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(null),u=r;vue.watch(l,y=>{vue.unref(s).filter(y)});const c=(y,b)=>y?b.modelName.includes(y):!0,d=vue.ref([]),f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),g=vue.computed(()=>o.type=="ODS"?vue.unref(d):o.type=="DWD"?vue.unref(f):vue.unref(p)),m=()=>{Promise.all([fetch$1(a).loadModelMenu({modelLayer:"ODS"}),fetch$1(a).loadModelMenu({modelLayer:"DWD"}),fetch$1(a).loadModelMenu({modelLayer:"ODSVIEW"})]).then(y=>{const b=y[0].data,C=y[1].data,x=y[2].data;d.value=Object.keys(b).map(w=>({modelName:w,id:w,children:b[w]})),f.value=Object.keys(C).map(w=>({modelName:w,id:w,children:C[w]})),p.value=Object.keys(x).map(w=>({modelName:w,id:w,children:x[w]})),v.value=!1})};m();const _=y=>{if(y.modelCode){if(o.type=="ODS"){u("node-click",y);return}Array.isArray(y.children)||u("node-click",y)}};return n({init:m}),(y,b)=>{const C=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(l),"onUpdate:modelValue":b[0]||(b[0]=x=>vue.isRef(l)?l.value=x:null)},{prefix:vue.withCtx(()=>[_hoisted_1$10]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_2$R,[vue.unref(v)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:"",count:2})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTree),{key:1,class:"animated fadeIn",ref_key:"treeRef",ref:s,data:vue.unref(g),"empty-text":"暂无数据","default-expand-all":"","node-key":"id","highlight-current":"","filter-node-method":c,onNodeClick:_},{default:vue.withCtx(({node:x,data:w})=>[x.level!=1||y.type=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[w.modelCode&&w.openForm!=2?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(["mr-1 -ml-5 text-base ri-checkbox-circle-fill",[w.publishStatus==2?"text-color-success":"text-color-info"]])},null,2)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),w.openForm==2?(vue.openBlock(),vue.createElementBlock("i",_hoisted_3$J)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass({"font-bold":x.level==1})},vue.toDisplayString(w.modelName),3),vue.renderSlot(y.$slots,"default",{element:w})]),empty:vue.withCtx(()=>[vue.createVNode(C,{description:"暂无数据"})]),_:3},8,["data"]))])],64)}}}),_hoisted_1$$={class:"mb-3"},_hoisted_2$Q={style:{height:"calc(100vh - 100px)"},class:"overflow-y-auto"},_sfc_main$1e=vue.defineComponent({__name:"modelIndicatorsAdd",emits:["click-node"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref(),u=vue.ref([{label:"源数据",value:"ODS",rule:"VIEW_ODS",disabled:!0},{label:"源视图",value:"ODSVIEW",rule:"VIEW_ODSVIEW",disabled:!0},{label:"整合数据",value:"DWD",rule:"VIEW_DWD",disabled:!0}]);fetch$1(a).getCurrFunc("MODEL").then(p=>{vue.unref(u).forEach(v=>{v.disabled=!p.data.includes(v.rule),!vue.unref(s)&&!v.disabled&&(s.value=v.value)})});const c=p=>{s.value=p},d=()=>{l.value=!0},f=p=>{o("click-node",p),l.value=!1};return n({init:d}),(p,v)=>{const g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(l),"onUpdate:modelValue":v[0]||(v[0]=m=>vue.isRef(l)?l.value=m:null),title:"选择要分析的数据",size:"400px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$$,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),m=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(s)==m.value?"primary":"",key:m.value,disabled:m.disabled,onClick:_=>c(m.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(m.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1})]),vue.createElementVNode("div",_hoisted_2$Q,[vue.createVNode(_sfc_main$1f,{ref:"menuRef",type:vue.unref(s),onNodeClick:f},null,8,["type"])])]),_:1},8,["modelValue"])}}}),_hoisted_1$_=vue.createElementVNode("div",{class:"flex justify-end flex-1"},null,-1),_hoisted_2$P={class:"whitespace-nowrap ml-2.5"},_hoisted_3$I=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_4$H=["onClick"],_hoisted_5$z=vue.createElementVNode("i",{class:"ri-edit-box-line"},null,-1),_hoisted_6$u={key:0,class:"flex items-center justify-center h-full"},_sfc_main$1d=vue.defineComponent({__name:"index",props:{isCustom:{type:Boolean,default:!1},element:{default:null},tempId:{default:""}},emits:["close-design"],setup(i,{emit:n}){var x,w;const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("local");const l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(null),d=vue.ref(r.element??{});vue.provide("modelEle",d),vue.provide("getListModelIndicators",()=>{});const f=vue.ref([{label:"指标分析",value:"zbfx"},{label:"指标全景",value:"zbqj",disabled:!0}]),p=vue.ref(vue.unref(f)[0].value),v=vue.ref(((x=r==null?void 0:r.element)==null?void 0:x.id)??"");fetch$1(a).getCurrFunc("INDICATORS").then(V=>{vue.unref(f).find($=>$.value=="zbqj").disabled=!V.data.includes("INDICATORS_VIEW")});const g=vue.ref([]);fetch$1(a).getCurrFunc("MODEL_INDICATORS").then(V=>{g.value=V.data});const m=vue.ref(((w=r==null?void 0:r.element)==null?void 0:w.businessType)??""),_=V=>{v.value="",m.value=V.type,setTimeout(()=>{v.value=V.id},100)},y=V=>{d.value=V,vue.unref(l).init()},b=async V=>{const $=await a.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${V}`);$&&vue.nextTick(()=>{setTimeout(()=>{const{modelId:S,modelName:E,modelCode:k}=$.data;d.value={id:S,modelName:E,modelCode:k},vue.unref(l).init(V)},300)})},C=()=>{vue.unref(v)&&(o("close-design",vue.unref(v)),vue.unref(u)&&vue.unref(u).init()),vue.unref(s)&&vue.unref(s).init()};return(V,$)=>{const S=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"h-full"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElHeader),{style:{height:"auto",padding:"0"},class:"flex items-center w-full mb-3"},{default:vue.withCtx(()=>[V.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButtonGroup),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),E=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(p)==E.value?"primary":"",key:E.value,disabled:E.disabled,onClick:k=>p.value=E.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(E.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1})),_hoisted_1$_]),_:1}),vue.withDirectives(vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden"},{default:vue.withCtx(()=>[V.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$1m,{onNodeClick:_,tempId:V.tempId||vue.unref(v),ref_key:"menuRef",ref:s},{search:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$P,[vue.unref(g).includes("STATISTICAL_ANALYSIS")?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:0,type:"primary",onClick:$[0]||($[0]=E=>vue.unref(c).init())},{default:vue.withCtx(()=>[_hoisted_3$I,vue.createTextVNode(" 新增指标 ")]),_:1})):vue.createCommentVNode("",!0)])]),"menu-item":vue.withCtx(({data:E})=>[vue.unref(g).includes("RELATED_INDICATORS")&&E.type!="INDICATORS"?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"ml-4 mr-2 cursor-pointer text-color-warning",onClick:vue.withModifiers(k=>b(E.id),["stop"])},[_hoisted_5$z,vue.createTextVNode(" 编辑 ")],8,_hoisted_4$H)):vue.createCommentVNode("",!0)]),_:1},8,["tempId"])]),_:1})),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(v)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.unref(m)=="INDICATORS"?(vue.openBlock(),vue.createBlock(aceIndicatorSystemPreview,{key:0,indicatorsId:vue.unref(v)},null,8,["indicatorsId"])):vue.createCommentVNode("",!0),vue.unref(m)=="MODEL_INDICATORS"?(vue.openBlock(),vue.createBlock(_sfc_main$1g,{key:1,onClickDesign:b,modelIndicatorsRules:vue.unref(g),indicatorsId:vue.unref(v),ref_key:"modelIndicatorsRef",ref:u},null,8,["modelIndicatorsRules","indicatorsId"])):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$u,[vue.createVNode(S,{description:"请选择对应指标"})]))]),_:1})]),_:1},512),[[vue.vShow,vue.unref(p)=="zbfx"]]),vue.unref(p)=="zbqj"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElMain),{key:0},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$1j)]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(aceIndicatorDesign,{ref_key:"designRef",ref:l,onClose:C},null,512),vue.createVNode(_sfc_main$1e,{ref_key:"modelIndicatorsAddRef",ref:c,onClickNode:y},null,512)]),_:1})}}}),_withScopeId$o=i=>(vue.pushScopeId("data-v-e52b7096"),i=i(),vue.popScopeId(),i),_hoisted_1$Z={class:"flex flex-col h-full"},_hoisted_2$O=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1)),_hoisted_3$H={class:"flex-1 mt-3 overflow-y-auto card-container"},_hoisted_4$G={key:0,class:"flex items-center justify-center h-full"},_hoisted_5$y=["onClick"],_hoisted_6$t={class:"flex items-center"},_hoisted_7$q=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-database-line"},null,-1)),_hoisted_8$n={class:"font-bold"},_hoisted_9$k={class:"flex items-center justify-between w-4/5 mt-3 ml-auto mr-auto"},_hoisted_10$i={class:"flex items-center"},_hoisted_11$g=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-checkbox-circle-fill text-color-success"},null,-1)),_hoisted_12$e=_withScopeId$o(()=>vue.createElementVNode("div",{class:"text-color-info"},"|",-1)),_hoisted_13$b={class:"flex justify-end mt-3 text-xs text-color-info pb"},_hoisted_14$a={class:"w-4/5 overflow-hidden whitespace-nowrap text-ellipsis"},_sfc_main$1c=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{dataSourceSubmit:a,testConnect:l,loadDataSourceMenu:s}=fetch$1(o).dbImport,{setFormValue:u,getFormValue:c}=o.$globalHooks.useForm(),{openMessage:d}=o.$globalHooks.useMessage(),f=o.$globalDict,p=r,v=vue.ref([]),g=vue.ref(!0),m=()=>{v.value=[],g.value=!0,s().then(S=>{g.value=!1,v.value=S.data??[],S.data.length&&vue.unref(V)==""&&$(S.data[0])})};m();const _=vue.reactive([{name:"数据源名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"dataSourceType",value:"",dict:"storeType",required:!0,changeFunc:S=>{if(!S.value)return;let E=f.dataSourceUrlDemo.find(k=>k.label.toLowerCase()===S.value.toLowerCase());_.find(k=>k.fieldName==="dataSourceUrlDemo").value=(E==null?void 0:E.value)??""}},{name:"数据源链接地址",type:FieldType.Textarea,fieldName:"dataSourceUrl",value:"",required:!0},{name:"链接示例",type:FieldType.Slot,fieldName:"dataSourceUrlDemo",value:""},{name:"数据库用户名",type:FieldType.Text,fieldName:"connectUserName",value:"",required:!0},{name:"数据库用密码",type:FieldType.Password,fieldName:"connectPassword",value:"",required:!0}]),y=vue.ref(!1),b=()=>{u({},_),y.value=!0},C=S=>{_.find(E=>E.fieldName==="dataSourceUrl").value=S.value},x=async()=>{const{params:S,error:E}=c(_);E.length>0||!await a(S)||(y.value=!1,d({type:"success",message:"操作成功"}),m())},w=async()=>{const{params:S,error:E}=c(_);E.length>0||!await l(S)||d({type:"success",message:"数据库链接成功"})},V=vue.ref(""),$=S=>{vue.unref(V)!=S.dataSourceId&&(V.value=S.dataSourceId,p("node-click",S))};return n({initMenu:m}),(S,E)=>{const k=vue.resolveComponent("aceHeader"),P=vue.resolveComponent("AppEmpty"),T=vue.resolveComponent("AppForm"),B=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$Z,[vue.createVNode(k,{title:"数据源"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:b},{default:vue.withCtx(()=>[_hoisted_2$O,vue.createTextVNode(" 新增 ")]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_3$H,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(g),animated:""},{default:vue.withCtx(()=>[vue.unref(v).length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(v),N=>(vue.openBlock(),vue.createElementBlock("div",{key:N.id,class:vue.normalizeClass(["item",{active:vue.unref(V)==N.dataSourceId}]),onClick:O=>$(N)},[vue.createElementVNode("div",_hoisted_6$t,[_hoisted_7$q,vue.createElementVNode("span",_hoisted_8$n,vue.toDisplayString(N.dataSourceComment),1)]),vue.createElementVNode("div",_hoisted_9$k,[vue.createElementVNode("div",_hoisted_10$i,[_hoisted_11$g,vue.createTextVNode(" 已同步 "),vue.createElementVNode("strong",null,vue.toDisplayString(N.synchronizedTableCount),1)]),_hoisted_12$e,vue.createElementVNode("div",null,[vue.createTextVNode(" 总表数 "),vue.createElementVNode("strong",null,vue.toDisplayString(N.tableCount),1)])]),vue.createElementVNode("div",_hoisted_13$b,vue.toDisplayString(N.version),1)],10,_hoisted_5$y))),128)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$G,[vue.createVNode(P,{description:"暂无数据源"})]))]),_:1},8,["loading"])]),vue.createVNode(B,{modelValue:vue.unref(y),"onUpdate:modelValue":E[1]||(E[1]=N=>vue.isRef(y)?y.value=N:null),title:"新增接入数据源",size:700},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{style:{"margin-right":"auto"},type:"success",onClick:w},{default:vue.withCtx(()=>[vue.createTextVNode(" 测试链接 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:x},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:E[0]||(E[0]=N=>y.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(T,{form:vue.unref(_),col:1,labelWidth:120},{dataSourceUrlDemo:vue.withCtx(({element:N})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:N.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_14$a,vue.toDisplayString(N.value),1)]),_:2},1032,["content"]),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:O=>C(N)},{default:vue.withCtx(()=>[vue.createTextVNode("复制")]),_:2},1032,["onClick"])]),_:1},8,["form"])]),_:1},8,["modelValue"])])}}}),menu_vue_vue_type_style_index_0_scoped_e52b7096_lang="",Menu$2=_export_sfc$2(_sfc_main$1c,[["__scopeId","data-v-e52b7096"]]),_sfc_main$1b=vue.defineComponent({__name:"sourceTableData",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(null),a=vue.ref(""),l=vue.ref([]),s=f=>{l.value=[],(f==null?void 0:f.data.length)>0&&(l.value=Object.keys(f.data[0]).filter(p=>p!="pageIndex").map(p=>({label:p,prop:p})))},u=vue.ref({}),c=f=>Object.assign(f,vue.unref(u));return n({init:(f,p)=>{vue.unref(u).dataSourceId=f,vue.unref(u).sourceTableCode=p,r.value=!0,a.value="/api/ace-data-center/data-source/sourceDataPage"}}),(f,p)=>{const v=vue.resolveComponent("AppList"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(r),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(r)?r.value=m:null),title:"数据源明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(v,{tableData:vue.unref(l),url:vue.unref(a),ref_key:"appList",ref:o,formatParamsFunc:c,onSuccess:s,methods:"post"},null,8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_hoisted_1$Y={class:"mt-2"},_sfc_main$1a=vue.defineComponent({__name:"setting",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{setFormValue:a,getFormValue:l}=o.$globalHooks.useForm(),{openMessage:s}=o.$globalHooks.useMessage(),{submitDefaultDbExtract:u}=fetch$1(o).dbImport,c=r,d=vue.ref(!1),f=vue.ref(!1),p=vue.ref(null),v=vue.reactive([{name:"方案名称",type:FieldType.Text,fieldName:"extractName",value:"",required:!0},{name:"抽取方式",type:FieldType.Radio,fieldName:"extractType",value:"",required:!0,options:[{label:"全量抽取",value:"1"},{label:"增量抽取",value:"2"}],changeFunc:b=>{v.find(x=>x.fieldName=="incrementalField").hide=b.value!=2;const C=v.find(x=>x.fieldName=="clearBeforeExt");C.hide=b.value!=1,b.isChange&&b.value!=1&&(C.value="0")}},{name:"清空历史数据",type:FieldType.Radio,fieldName:"clearBeforeExt",value:"",required:!0,options:[{label:"是",value:"1"},{label:"否",value:"0"}],defVal:"0"},{name:"增量字段",type:FieldType.Select,fieldName:"incrementalField",value:"",required:!0,tip:"该字段必须为本模型字段,并且是SQL结果集中存在的字段"},{name:"taskDefinedId",type:FieldType.Text,fieldName:"taskDefinedId",hide:!0},{name:"id",type:FieldType.Text,fieldName:"id",hide:!0}]),g=vue.ref(null),m=vue.ref({}),_=async b=>{m.value=b,f.value=!1;const C=await o.$baseHttp.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:{modelId:b.modelId,projectId:o.$baseGetCurrentProjectId()},headers:{loading:!0}});v.find(x=>x.fieldName=="incrementalField").options=C.data.map(x=>({...x,label:`${x.attributeCode}(${x.attributeComment||x.attributeCode})`,value:x.attributeCode})),d.value=!0,vue.nextTick(()=>{a({...b,extractName:b.extractName??"增量抽取"},v),b!=null&&b.taskDefined&&(f.value=!0),vue.unref(p).init((b==null?void 0:b.taskDefined)??{}),g.value=(b==null?void 0:b.taskDefined)??null})},y=async()=>{const{params:b,error:C}=l(v);if(C.length>0)return;if(vue.unref(f)){const{params:w,error:V}=vue.unref(p).getForm();if(V.length>0)return;b.taskDefined={...vue.unref(g)??{},...w}}b.dataSourceId=vue.unref(m).dataSourceId,b.modelId=vue.unref(m).modelId,b.streamType="STANDARD",await u(b)&&(s({type:"success",message:"操作成功"}),d.value=!1,c("refresh"))};return n({init:_}),(b,C)=>{const x=vue.resolveComponent("AppForm"),w=vue.resolveComponent("aceHeader"),V=vue.resolveComponent("AppTaskDesign"),$=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createBlock($,{modelValue:vue.unref(d),"onUpdate:modelValue":C[2]||(C[2]=S=>vue.isRef(d)?d.value=S:null),title:"配置",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:y},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:C[1]||(C[1]=S=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(x,{form:vue.unref(v)},null,8,["form"]),vue.createElementVNode("div",_hoisted_1$Y,[vue.createVNode(w,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(f),"onUpdate:modelValue":C[0]||(C[0]=S=>vue.isRef(f)?f.value=S:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(V,{ref_key:"taskDesignRef",ref:p},null,512)],512),[[vue.vShow,vue.unref(f)]])])]),_:1},8,["modelValue"])}}}),_hoisted_1$X=vue.createElementVNode("i",{class:"mr-2 ri-exchange-line"},null,-1),_hoisted_2$N=vue.createElementVNode("i",{class:"mr-2 ri-refresh-line"},null,-1),_hoisted_3$G=vue.createElementVNode("div",null,null,-1),_hoisted_4$F=vue.createElementVNode("i",{class:"mr-2 ri-delete-bin-line"},null,-1),_sfc_main$19=vue.defineComponent({__name:"model-extract-log",emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{openMessage:a}=o.$globalHooks.useMessage(),l=r,s=vue.ref(!1),u=vue.ref(null),c=vue.ref(""),d=vue.ref([]),f=v=>{const{businessId:g,businessType:m="file_extract",ajaxUrl:_="",table:y}=v;d.value=y||[{label:"批次号",prop:"batchNo"},{label:"日期",prop:"createTime"},{label:"文件名",prop:"file",slot:!0},{label:"抽取方式",prop:"createTime",func:b=>{var C;return((C=JSON.parse(b.businessSnapshot||"{}"))==null?void 0:C.extractType)==2?"覆盖":"追加"}},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}],c.value=_||`/api/ace-data-center/extract-log/list?descs=create_time&businessId=${g}&businessType=${m}`,s.value=!0},p=async(v,g)=>{switch(v){case"refresh":{if(!await o.$baseHttp.post(`/api/ace-data-center/extract-log/updateSuccessTotal/${g.id}`,{},{headers:{loading:!0}}))return;a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success")}break;case"delete":o.$baseConfirm({content:"删除数据可能影响指标统计,是否确认删除?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/extract-log/deleteModelData/${g.id}`,{},{headers:{loading:!0}})&&(a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success"))}});break;case"run":o.$baseConfirm({content:"重跑数据会先删除本批次数据,然后新建立一个批次任务执行,是否继续执行?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/extract-log/reRunTeamworkDbExtractBy/${g.id}`,{},{headers:{loading:!0}})&&(a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success"))}});break;case"download":{const m=JSON.parse((g==null?void 0:g.businessSnapshot)??"{}");window.open(m.fileUrl)}break}};return n({init:f}),(v,g)=>{const m=vue.resolveComponent("AppList"),_=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(_,{modelValue:vue.unref(s),"onUpdate:modelValue":g[0]||(g[0]=y=>vue.isRef(s)?s.value=y:null),title:"抽取日志",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(m,{tableData:vue.unref(d),url:vue.unref(c),ref_key:"appList",ref:u},{file:vue.withCtx(({row:y})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:b=>p("download",y)},{default:vue.withCtx(()=>{var b;return[vue.createTextVNode(vue.toDisplayString((b=JSON.parse(y.businessSnapshot??"{}"))==null?void 0:b.fileName),1)]}),_:2},1032,["onClick"])]),action:vue.withCtx(({row:y})=>{var b;return[((b=JSON.parse(y.businessSnapshot||"{}"))==null?void 0:b.extractType)==3?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",class:"mr-2",onClick:C=>p("run",y)},{default:vue.withCtx(()=>[_hoisted_1$X,vue.createTextVNode(" 重跑 ")]),_:2},1032,["onClick"])):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:C=>p("refresh",y)},{default:vue.withCtx(()=>[_hoisted_2$N,vue.createTextVNode(" 刷新 ")]),_:2},1032,["onClick"]),_hoisted_3$G,vue.createVNode(vue.unref(elementPlus.ElLink),{type:"danger",onClick:C=>p("delete",y)},{default:vue.withCtx(()=>[_hoisted_4$F,vue.createTextVNode(" 删除本批次数据 ")]),_:2},1032,["onClick"])]}),_:1},8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_hoisted_1$W={class:"flex flex-col h-full overflow-hidden"},_hoisted_2$M={class:"flex flex-col flex-1 mt-3 overflow-hidden"},_hoisted_3$F={class:"app-search"},_hoisted_4$E=vue.createElementVNode("i",{class:"mr-1 ri-search-line"},null,-1),_hoisted_5$x={class:"flex flex-1 overflow-hidden"},_hoisted_6$s=["onClick"],_hoisted_7$p={class:"flex justify-end mt-3"},_hoisted_8$m={class:"flex justify-end mb-2"},_hoisted_9$j=vue.createElementVNode("i",{class:"mr-1 ri-add-line"},null,-1),_sfc_main$18=vue.defineComponent({__name:"view",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.inject("modelEle"),{setFormValue:l,getFormValue:s}=o.$globalHooks.useForm(),{openMessage:u}=o.$globalHooks.useMessage(),{createModelSyncRelation:c,listDataSourceSynchronized:d}=fetch$1(o).dbImport,f=vue.ref(null),p=vue.ref(null),v=vue.ref(null),g=vue.ref(null),m=r,{originlist:_,list:y,pageLoading:b,page:C,pageSize:x,getData:w,handleSizeChange:V,handleCurrentChange:$}=o.$globalHooks.usePage(),S=vue.reactive([{name:"源表名",type:FieldType.Text,fieldName:"sourceTableComment",value:""},{name:"同步状态",type:FieldType.Select,fieldName:"related",value:"",options:[{label:"已同步",value:!0},{label:"未同步",value:!1}]},{name:"同步结果",type:FieldType.Select,fieldName:"synchronizeResult",value:"",options:[{label:"正常",value:2},{label:"异常",value:1}]},{name:"源数据量",type:FieldType.Select,fieldName:"existSourceTableData",value:"",options:[{label:"源数据量 >0",value:!0},{label:"源数据量 =0",value:!1}]}]),E=vue.reactive([{label:"源表",prop:"sourceTableCode"},{label:"源表名",prop:"sourceTableComment"},{label:"源数据",prop:"sourceTableDataCount",slot:!0},{label:"列数",prop:"sourceColumnCount"},{label:"同步状态",prop:"related",slot:!0},{label:"同步结果",prop:"synchronizeResult",tag:!0,tagFunc:I=>I==2?"success":"danger",func:I=>{var j,M;return((j=I.modelSyncDetail)==null?void 0:j.synchronizeResult)=="2"?"正常":((M=I.modelSyncDetail)==null?void 0:M.synchronizeResult)=="1"?"异常":"-"}},{label:"目标表",prop:"relationTableCode"},{label:"目标数据",prop:"relationTableDataCount"},{label:"主键",prop:"primaryKeyColumn",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.primaryKeyColumn)??"-"}},{label:"增量字段",prop:"incrColumn",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.incrColumn)??"-"}},{label:"上次同步",prop:"lastSyncTime",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.lastSyncTime)??"-"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"120px"}]),k=async(I=!0)=>{I&&(l({},S),C.value=1),b.value=!0;const{params:j}=s(S,!1,!0),M=await d({dataSourceId:vue.unref(a).dataSourceId,...j});if(b.value=!1,!M){_.value=[];return}M.data.forEach(R=>{var F;(F=R==null?void 0:R.modelSyncDetail)!=null&&F.modelId&&(R.htmlButton=[{name:"配置",key:"setting",type:"primary"},{name:"历史",key:"history",type:"primary"}])}),_.value=M.data,w()},P=async I=>{await c({sourceId:I.dataSourceId,sourceTableCode:I.sourceTableCode})&&(u({type:"success",message:"操作成功"}),m("refresh"),k(!1))},T=vue.ref(!1),B=vue.ref(""),N=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"200px"}]),O=I=>{I.data.forEach(j=>{j.htmlButton=[],j.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),j.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(j.extractType)&&j.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),j.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},D=vue.ref({}),L=async I=>{var F;const{type:j,row:M,index:R}=I;switch(j){case"history":vue.unref(v).init({ajaxUrl:`/api/ace-data-center/extract-log/modelSyncHistory?descs=create_time&modelId=${M.modelSyncDetail.modelId}`,table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"LOG":vue.unref(v).init({businessId:M.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"PUSH":o.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${M.id}`,{},{headers:{loading:!0}})&&u({type:"success",message:"操作成功"})}});break;case"DEL":o.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${M.id}`,{},{headers:{loading:!0}})&&(u({type:"success",message:"操作成功"}),vue.unref(f).getData())}});break;case"EDIT":const W=await o.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${M.id}`);if(!W)return;vue.unref(p).init(W.data);break;case"ADD":vue.unref(p).init({dataSourceId:vue.unref(D).dataSourceId,modelId:(F=vue.unref(D))==null?void 0:F.modelSyncDetail.modelId});break;case"setting":T.value=!0,D.value=M,B.value=`/api/ace-data-center/db-extract/list?modelId=${M.modelSyncDetail.modelId}&projectId=${o.$baseGetCurrentProjectId()}`;break;case"source-table-data":vue.unref(g).init(M.dataSourceId,M.sourceTableCode);break}};return n({init:k}),(I,j)=>{const M=vue.resolveComponent("aceHeader"),R=vue.resolveComponent("AppForm"),F=vue.resolveComponent("AppTable"),W=vue.resolveComponent("AppList"),J=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$W,[vue.createVNode(M,{title:vue.unref(a).dataSourceComment},null,8,["title"]),vue.createElementVNode("div",_hoisted_2$M,[vue.createElementVNode("div",_hoisted_3$F,[vue.createVNode(R,{form:vue.unref(S)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",onClick:j[0]||(j[0]=Q=>k(!1))},{default:vue.withCtx(()=>[_hoisted_4$E,vue.createTextVNode(" 查询 ")]),_:1})]),_:1},8,["form"])]),vue.createElementVNode("div",_hoisted_5$x,[vue.createVNode(F,{tableData:vue.unref(E),list:vue.unref(y),loading:vue.unref(b),onTableBtnClick:L},{related:vue.withCtx(({row:Q})=>[Q.related?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("已同步")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopconfirm),{key:1,title:"您确定要同步吗?",onConfirm:Y=>P(Q)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{size:"small",type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("立即同步")]),_:1})]),_:2},1032,["onConfirm"]))]),sourceTableDataCount:vue.withCtx(({row:Q})=>[Q.sourceTableDataCount==0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(Q.sourceTableDataCount),1)],64)):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"flex justify-between",onClick:Y=>L({type:"source-table-data",row:Q,index:-1})},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Q.sourceTableDataCount),1)]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看")]),_:1})],8,_hoisted_6$s))]),_:1},8,["tableData","list","loading"])]),vue.createElementVNode("div",_hoisted_7$p,[vue.createVNode(vue.unref(elementPlus.ElPagination),{"current-page":vue.unref(C),"onUpdate:currentPage":j[1]||(j[1]=Q=>vue.isRef(C)?C.value=Q:null),"page-size":vue.unref(x),"onUpdate:pageSize":j[2]||(j[2]=Q=>vue.isRef(x)?x.value=Q:null),"page-sizes":[10,20,40,60,80,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",total:vue.unref(_).length,onCurrentChange:vue.unref($),onSizeChange:vue.unref(V)},null,8,["current-page","page-size","total","onCurrentChange","onSizeChange"])])]),vue.createVNode(J,{modelValue:vue.unref(T),"onUpdate:modelValue":j[4]||(j[4]=Q=>vue.isRef(T)?T.value=Q:null),title:"数据同步方案",size:"1000px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_8$m,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:j[3]||(j[3]=Q=>L({type:"ADD",row:{},index:0}))},{default:vue.withCtx(()=>[_hoisted_9$j,vue.createTextVNode(" 新增 ")]),_:1})]),vue.createVNode(W,{tableData:vue.unref(N),url:vue.unref(B),ref_key:"appListRef",ref:f,onBtnClick:L,onSuccess:O},null,8,["tableData","url"])]),_:1},8,["modelValue"]),vue.createVNode(_sfc_main$1a,{ref_key:"settingRef",ref:p,onRefresh:j[5]||(j[5]=Q=>vue.unref(f).getData({clear:!0}))},null,512),vue.createVNode(_sfc_main$19,{ref_key:"extractLogRef",ref:v},null,512),vue.createVNode(_sfc_main$1b,{ref_key:"sourceTableDataRef",ref:g},null,512)])}}}),_hoisted_1$V={key:0,class:"flex items-center justify-center h-full"},_sfc_main$17=vue.defineComponent({__name:"index",setup(i){const n=vue.ref(null),r=vue.ref(null),o=vue.ref({});vue.provide("modelEle",o);const a=vue.inject("local"),l=s=>{o.value=s,vue.nextTick(()=>{vue.unref(n).init()})};return(s,u)=>{const c=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden app-basic-container"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(Menu$2,{ref_key:"menuRef",ref:r,onNodeClick:l},null,512)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(o).dataSourceId?(vue.openBlock(),vue.createBlock(_sfc_main$18,{key:1,ref_key:"viewRef",ref:n,onRefresh:u[0]||(u[0]=d=>vue.unref(r).initMenu())},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$V,[vue.createVNode(c,{description:"请选择数据源"})]))]),_:1})]),_:1},8,["locale"])]),_:1})}}}),_withScopeId$n=i=>(vue.pushScopeId("data-v-cabcba66"),i=i(),vue.popScopeId(),i),_hoisted_1$U={class:"flex flex-col h-full"},_hoisted_2$L=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1)),_hoisted_3$E={class:"flex-1 mt-3 overflow-y-auto card-container"},_hoisted_4$D={key:0,class:"flex items-center justify-center h-full"},_hoisted_5$w=["onClick"],_hoisted_6$r={class:"flex items-center justify-between"},_hoisted_7$o={class:"flex-1 mr-2.5"},_hoisted_8$l=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-database-line"},null,-1)),_hoisted_9$i={class:"font-bold"},_hoisted_10$h=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-circle-line"},null,-1)),_hoisted_11$f={class:"flex items-center justify-between w-4/5 mt-3 ml-auto mr-auto"},_hoisted_12$d={class:"flex items-center"},_hoisted_13$a=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-checkbox-circle-fill text-color-success"},null,-1)),_hoisted_14$9=_withScopeId$n(()=>vue.createElementVNode("div",{class:"text-color-info"},"|",-1)),_hoisted_15$4={class:"flex justify-end mt-3 text-xs text-color-info pb"},_hoisted_16$4={class:"w-4/5 overflow-hidden whitespace-nowrap text-ellipsis"},_sfc_main$16=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{dataSourceSubmit:a,testConnect:l,loadDataSourceMenu:s,detail:u}=fetch$1(o).dbImport,{setFormValue:c,getFormValue:d}=o.$globalHooks.useForm(),{openMessage:f}=o.$globalHooks.useMessage(),p=o.$globalDict,v=r,g=vue.ref([]),m=vue.ref(!0),_=()=>{g.value=[],m.value=!0,s().then(k=>{m.value=!1,g.value=k.data??[],k.data.length&&vue.unref(S)==""&&E(k.data[0])})};_();const y=vue.reactive([{name:"数据源名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"dataSourceType",value:"",dict:"storeType",required:!0,changeFunc:k=>{if(!k.value)return;let P=p.dataSourceUrlDemo.find(T=>T.label.toLowerCase()===k.value.toLowerCase());y.find(T=>T.fieldName==="dataSourceUrlDemo").value=(P==null?void 0:P.value)??""}},{name:"数据源链接地址",type:FieldType.Textarea,fieldName:"dataSourceUrl",value:"",required:!0},{name:"链接示例",type:FieldType.Slot,fieldName:"dataSourceUrlDemo",value:""},{name:"数据库用户名",type:FieldType.Text,fieldName:"connectUserName",value:"",required:!0},{name:"数据库用密码",type:FieldType.Password,fieldName:"connectPassword",value:"",required:!0},{name:"id",type:FieldType.Text,fieldName:"id",value:"",hide:!0}]),b=vue.ref(!1),C=()=>{c({},y),b.value=!0},x=async k=>{const P=await u({id:k.dataSourceId});c(P.data,y),b.value=!0},w=k=>{y.find(P=>P.fieldName==="dataSourceUrl").value=k.value},V=async()=>{const{params:k,error:P}=d(y);P.length>0||(k.id||delete k.id,!await a(k))||(b.value=!1,f({type:"success",message:"操作成功"}),_())},$=async()=>{const{params:k,error:P}=d(y);P.length>0||!await l(k)||f({type:"success",message:"数据库链接成功"})},S=vue.ref(""),E=k=>{vue.unref(S)!=k.dataSourceId&&(S.value=k.dataSourceId,v("node-click",k))};return n({initMenu:_}),(k,P)=>{const T=vue.resolveComponent("aceHeader"),B=vue.resolveComponent("AppEmpty"),N=vue.resolveComponent("AppForm"),O=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$U,[vue.createVNode(T,{title:"数据源"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:C},{default:vue.withCtx(()=>[_hoisted_2$L,vue.createTextVNode(" 新增 ")]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_3$E,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(m),animated:""},{default:vue.withCtx(()=>[vue.unref(g).length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(g),D=>(vue.openBlock(),vue.createElementBlock("div",{key:D.id,class:vue.normalizeClass(["item",{active:vue.unref(S)==D.dataSourceId}]),onClick:L=>E(D)},[vue.createElementVNode("div",_hoisted_6$r,[vue.createElementVNode("div",_hoisted_7$o,[_hoisted_8$l,vue.createElementVNode("span",_hoisted_9$i,vue.toDisplayString(D.dataSourceComment),1)]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:vue.withModifiers(L=>x(D),["stop"])},{default:vue.withCtx(()=>[_hoisted_10$h,vue.createTextVNode(" 修改 ")]),_:2},1032,["onClick"])]),vue.createElementVNode("div",_hoisted_11$f,[vue.createElementVNode("div",_hoisted_12$d,[_hoisted_13$a,vue.createTextVNode(" 已同步 "),vue.createElementVNode("strong",null,vue.toDisplayString(D.synchronizedShadowTableCount),1)]),_hoisted_14$9,vue.createElementVNode("div",null,[vue.createTextVNode(" 总表数 "),vue.createElementVNode("strong",null,vue.toDisplayString(D.tableCount),1)])]),vue.createElementVNode("div",_hoisted_15$4,vue.toDisplayString(D.version),1)],10,_hoisted_5$w))),128)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$D,[vue.createVNode(B,{description:"暂无数据源"})]))]),_:1},8,["loading"])]),vue.createVNode(O,{modelValue:vue.unref(b),"onUpdate:modelValue":P[1]||(P[1]=D=>vue.isRef(b)?b.value=D:null),title:"新增接入数据源",size:700},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{style:{"margin-right":"auto"},type:"success",onClick:$},{default:vue.withCtx(()=>[vue.createTextVNode(" 测试链接 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:V},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:P[0]||(P[0]=D=>b.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(N,{form:vue.unref(y),col:1,labelWidth:120},{dataSourceUrlDemo:vue.withCtx(({element:D})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:D.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_16$4,vue.toDisplayString(D.value),1)]),_:2},1032,["content"]),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:L=>w(D)},{default:vue.withCtx(()=>[vue.createTextVNode("复制")]),_:2},1032,["onClick"])]),_:1},8,["form"])]),_:1},8,["modelValue"])])}}}),menu_vue_vue_type_style_index_0_scoped_cabcba66_lang="",Menu$1=_export_sfc$2(_sfc_main$16,[["__scopeId","data-v-cabcba66"]]),_sfc_main$15=vue.defineComponent({__name:"sourceTableData",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(null),a=vue.ref(""),l=vue.ref([]),s=f=>{l.value=[],(f==null?void 0:f.data.length)>0&&(l.value=Object.keys(f.data[0]).filter(p=>p!="pageIndex").map(p=>({label:p,prop:p})))},u=vue.ref({}),c=f=>Object.assign(f,vue.unref(u));return n({init:(f,p)=>{vue.unref(u).dataSourceId=f,vue.unref(u).sourceTableCode=p,r.value=!0,a.value="/api/ace-data-center/data-source/sourceDataPage"}}),(f,p)=>{const v=vue.resolveComponent("AppList"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(r),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(r)?r.value=m:null),title:"数据源明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(v,{tableData:vue.unref(l),url:vue.unref(a),ref_key:"appList",ref:o,formatParamsFunc:c,onSuccess:s,methods:"post"},null,8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_withScopeId$m=i=>(vue.pushScopeId("data-v-e0af972d"),i=i(),vue.popScopeId(),i),_hoisted_1$T={class:"mt-3"},_hoisted_2$K=_withScopeId$m(()=>vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",null,"字段名称"),vue.createElementVNode("td",null,"字段描述"),vue.createElementVNode("td",null,"映射字段"),vue.createElementVNode("td",null,"数据类型"),vue.createElementVNode("td",null,"数据长度"),vue.createElementVNode("td",null,"数据标度"),vue.createElementVNode("td",null,"是否主键"),vue.createElementVNode("td",null,"唯一校验")])],-1)),_hoisted_3$D={class:"sort-target"},_hoisted_4$C={key:0},_sfc_main$14=vue.defineComponent({__name:"model-normal",emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{setFormValue:a,getFormValue:l}=o.$globalHooks.useForm(),s=r,u=vue.ref(!1),c=vue.ref(""),d=vue.ref([]);vue.ref("");const f=vue.ref([]),p=vue.reactive([{name:"项目名称",type:FieldType.Select,fieldName:"projectId",value:"",required:!0,props:{url:"/api/ace-data-center/project/options",label:"label",value:"code"},disabled:!0,hide:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"modelStore",value:"",required:!0,dict:"storeType",disabled:!0},{name:"模型层级",type:FieldType.Select,fieldName:"modelLayer",value:"",required:!0,props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelLayer",label:"dictValue",value:"dictKey"},changeFunc:m=>{},disabled:!0},{name:"模型名称",type:FieldType.Text,fieldName:"modelName",value:"",required:!0},{name:"模型表名",type:FieldType.Text,fieldName:"modelCode",value:"",required:!0,disabled:!0},{name:"模型类型",type:FieldType.Select,fieldName:"modelType",value:"",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelType",label:"dictValue",value:"dictKey"},hide:!0},{name:"标签",type:FieldType.Text,fieldName:"tags",value:""},{name:"分区字段",type:FieldType.Text,fieldName:"partitionColumn",value:"",hide:!0},{name:"模型描述",type:FieldType.Textarea,fieldName:"modelDesc",value:""},{name:"id",type:FieldType.Text,fieldName:"id",value:"",hide:!0}]),v=m=>{u.value=!0,c.value="",d.value=[],f.value=(m?(m==null?void 0:m.listModelAttribute)??[]:[{nanoid:nanoid()}]).map(_=>{const y=((_==null?void 0:_.attributeCode)??"").split("");return _.nanoid=nanoid(),y[0]=="_"&&(_.hide=!0),_}),a({...m??{},projectId:o.$baseGetCurrentProjectId()},p)},g=async()=>{const{params:m,error:_}=l(p);if(_.length>0)return;const y="/api/ace-data-center/model/editModelDetail";await o.$baseHttp.post(y,{...m,projectId:String(o.$baseGetCurrentProjectId()),listModelAttribute:vue.unref(f)},{headers:{loading:!0}})&&(u.value=!1,o.$message.success("操作成功"),s("success"))};return n({init:v}),(m,_)=>{const y=vue.resolveComponent("AppForm"),b=vue.resolveComponent("aceHeader"),C=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(C,{modelValue:vue.unref(u),"onUpdate:modelValue":_[1]||(_[1]=x=>vue.isRef(u)?u.value=x:null),title:"影子模型",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("提交")]),_:1}),vue.renderSlot(m.$slots,"formFooter",{},void 0,!0),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:_[0]||(_[0]=x=>u.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(y,{form:vue.unref(p)},null,8,["form"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(b,{title:"影子模型属性"}),vue.createElementVNode("table",_hoisted_1$T,[_hoisted_2$K,vue.createElementVNode("tbody",_hoisted_3$D,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),(x,w)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:x.nanoid},[x.hide?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_4$C,[vue.createElementVNode("td",null,vue.toDisplayString(x.attributeCode),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:x.attributeComment,"onUpdate:modelValue":V=>x.attributeComment=V,maxlength:"30",showWordLimit:"",placeholder:"字段描述"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(x.mapCode),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:x.dataType,"onUpdate:modelValue":V=>x.dataType=V,placeholder:"数据类型","popper-class":"ace-select",style:{width:"100%"},disabled:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(commonDataType),V=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(x.dataLength),1),vue.createElementVNode("td",null,vue.toDisplayString(x.dataScale??"-"),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:x.primaryKey,"onUpdate:modelValue":V=>x.primaryKey=V,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:x.uniqueKey,"onUpdate:modelValue":V=>x.uniqueKey=V,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",disabled:""},null,8,["modelValue","onUpdate:modelValue"])])]))],64))),128))])])]),_:1})]),_:1})]),_:3},8,["modelValue"])}}}),modelNormal_vue_vue_type_style_index_0_scoped_e0af972d_lang="",ModelNormal=_export_sfc$2(_sfc_main$14,[["__scopeId","data-v-e0af972d"]]),_hoisted_1$S={class:"flex flex-col h-full overflow-hidden"},_hoisted_2$J={class:"flex flex-col flex-1 mt-3 overflow-hidden"},_hoisted_3$C={class:"app-search"},_hoisted_4$B=vue.createElementVNode("i",{class:"mr-1 ri-search-line"},null,-1),_hoisted_5$v={class:"flex flex-1 overflow-hidden"},_hoisted_6$q=["onClick"],_hoisted_7$n={class:"flex justify-end mt-3"},_sfc_main$13=vue.defineComponent({__name:"view",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.inject("modelEle"),{setFormValue:l,getFormValue:s}=o.$globalHooks.useForm(),{openMessage:u}=o.$globalHooks.useMessage(),{createShadowModelSync:c,listDataSourceSynchronized:d}=fetch$1(o).dbImport,f=vue.ref(null),p=vue.ref(null),v=r,{originlist:g,list:m,pageLoading:_,page:y,pageSize:b,getData:C,handleSizeChange:x,handleCurrentChange:w}=o.$globalHooks.usePage(),V=vue.reactive([{name:"源表",type:FieldType.Text,fieldName:"sourceTableCode",value:""},{name:"源表名",type:FieldType.Text,fieldName:"sourceTableComment",value:""}]),$=vue.reactive([{label:"源表",prop:"sourceTableCode"},{label:"源表名",prop:"sourceTableComment"},{label:"源数据",prop:"sourceTableDataCount",slot:!0},{label:"列数",prop:"sourceColumnCount"},{label:"影子模型",prop:"shadowModelId",slot:!0},{label:"操作",prop:"htmlButton",fixed:"right",width:"120px"}]),S=async(k=!0)=>{k&&(l({},V),y.value=1),_.value=!0;const{params:P}=s(V,!1,!0),T=await d({dataSourceId:vue.unref(a).dataSourceId,...P});if(_.value=!1,!T){g.value=[];return}T.data.forEach(B=>{B.shadowModelId?B.htmlButton=[{name:"编辑",key:"EDIT",type:"primary"}]:B.htmlButton=[{name:"创建影子模型",key:"CREATE",type:"primary"}]}),g.value=T.data,C()},E=async k=>{const{type:P,row:T,index:B}=k;switch(P){case"EDIT":{const N=await o.$baseHttp.get(`/api/ace-data-center/model/detail?id=${T==null?void 0:T.shadowModelId}`);if(!N)return;o.$refs.normalRef.init(N.data)}break;case"CREATE":o.$baseConfirm({content:"是否创建影子模型?",callConfirm:async()=>{await c({sourceId:T.dataSourceId,sourceTableCode:T.sourceTableCode})&&(u({type:"success",message:"操作成功"}),v("refresh"),S(!1))}});break;case"source-table-data":vue.unref(p).init(T.dataSourceId,T.sourceTableCode);break}};return n({init:S}),(k,P)=>{const T=vue.resolveComponent("aceHeader"),B=vue.resolveComponent("AppForm"),N=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$S,[vue.createVNode(T,{title:vue.unref(a).dataSourceComment},null,8,["title"]),vue.createElementVNode("div",_hoisted_2$J,[vue.createElementVNode("div",_hoisted_3$C,[vue.createVNode(B,{form:vue.unref(V)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",onClick:P[0]||(P[0]=O=>S(!1))},{default:vue.withCtx(()=>[_hoisted_4$B,vue.createTextVNode(" 查询 ")]),_:1})]),_:1},8,["form"])]),vue.createElementVNode("div",_hoisted_5$v,[vue.createVNode(N,{tableData:vue.unref($),list:vue.unref(m),loading:vue.unref(_),onTableBtnClick:E},{shadowModelId:vue.withCtx(({row:O})=>[O.shadowModelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未创建")]),_:1}))]),sourceTableDataCount:vue.withCtx(({row:O})=>[O.sourceTableDataCount==0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(O.sourceTableDataCount),1)],64)):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"flex justify-between",onClick:D=>E({type:"source-table-data",row:O,index:-1})},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(O.sourceTableDataCount),1)]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看")]),_:1})],8,_hoisted_6$q))]),_:1},8,["tableData","list","loading"])]),vue.createElementVNode("div",_hoisted_7$n,[vue.createVNode(vue.unref(elementPlus.ElPagination),{"current-page":vue.unref(y),"onUpdate:currentPage":P[1]||(P[1]=O=>vue.isRef(y)?y.value=O:null),"page-size":vue.unref(b),"onUpdate:pageSize":P[2]||(P[2]=O=>vue.isRef(b)?b.value=O:null),"page-sizes":[10,20,40,60,80,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",total:vue.unref(g).length,onCurrentChange:vue.unref(w),onSizeChange:vue.unref(x)},null,8,["current-page","page-size","total","onCurrentChange","onSizeChange"])])]),vue.createVNode(ModelNormal,{ref_key:"normalRef",ref:f},null,512),vue.createVNode(_sfc_main$15,{ref_key:"sourceTableDataRef",ref:p},null,512)])}}}),_hoisted_1$R={key:0,class:"flex items-center justify-center h-full"},_sfc_main$12=vue.defineComponent({__name:"index",setup(i){const n=vue.ref(null),r=vue.ref(null),o=vue.ref({});vue.provide("modelEle",o);const a=vue.inject("local"),l=s=>{o.value=s,vue.nextTick(()=>{vue.unref(n).init()})};return(s,u)=>{const c=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden app-basic-container"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(Menu$1,{ref_key:"menuRef",ref:r,onNodeClick:l},null,512)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(o).dataSourceId?(vue.openBlock(),vue.createBlock(_sfc_main$13,{key:1,ref_key:"viewRef",ref:n,onRefresh:u[0]||(u[0]=d=>vue.unref(r).initMenu())},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$R,[vue.createVNode(c,{description:"请选择数据源"})]))]),_:1})]),_:1},8,["locale"])]),_:1})}}}),_hoisted_1$Q=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_2$I={class:"mt-3"},_hoisted_3$B={class:"mt-3"},_hoisted_4$A={key:1,class:"mr-1 -ml-5 text-base ri-edit-circle-fill text-color-primary"},_sfc_main$11=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const o=vue.ref(""),a=vue.ref(null),l=vue.ref([{label:"源视图表",value:"ODSVIEW"},{label:"整合数据表",value:"DWD"}]),s=vue.ref(vue.unref(l)[0].value),{proxy:u}=vue.getCurrentInstance(),c=r;vue.watch(o,_=>{vue.unref(a).filter(_)});const d=(_,y)=>_?y.name.includes(_):!0,f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),g=()=>{v.value=!0,Promise.all([fetch$1(u).loadModelMenu({modelLayer:"ODSVIEW"}),fetch$1(u).loadModelMenu({modelLayer:"DWD"})]).then(_=>{f.value=Object.keys(_[0].data).map(y=>({modelName:y,id:y,children:_[0].data[y]})),p.value=Object.keys(_[1].data).map(y=>({modelName:y,id:y,children:_[1].data[y]})),v.value=!1})};g();const m=_=>{Array.isArray(_.children)||c("node-click",_)};return n({init:g}),(_,y)=>{const b=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(b,{title:"整合数据",class:"mb-2"},{default:vue.withCtx(()=>[vue.renderSlot(_.$slots,"top")]),_:3}),vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(o),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(o)?o.value=C:null)},{prefix:vue.withCtx(()=>[_hoisted_1$Q]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_2$I,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(s)==C.value?"primary":"",key:C.value,onClick:x=>s.value=C.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.label),1)]),_:2},1032,["type","onClick"]))),128))]),_:1})]),vue.createElementVNode("div",_hoisted_3$B,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{animated:"",loading:vue.unref(v),count:2},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTree),{class:"animated fadeIn",ref_key:"treeRef",ref:a,data:vue.unref(s)=="DWD"?vue.unref(p):vue.unref(f),"node-key":"id","empty-text":"暂无数据","default-expand-all":"","highlight-current":"","filter-node-method":d,onNodeClick:m},{default:vue.withCtx(({node:C,data:x})=>[C.level!=1?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[x.modelCode&&x.openForm!=2?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(["mr-1 -ml-5 text-base ri-checkbox-circle-fill",[x.publishStatus==2?"text-color-success":"text-color-info"]])},null,2)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),x.openForm==2?(vue.openBlock(),vue.createElementBlock("i",_hoisted_4$A)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass({"font-bold":C.level==1})},vue.toDisplayString(x.modelName),3)]),_:1},8,["data"])]),_:1},8,["loading"])])],64)}}}),_withScopeId$l=i=>(vue.pushScopeId("data-v-8dbf5661"),i=i(),vue.popScopeId(),i),_hoisted_1$P={class:"mt-3"},_hoisted_2$H=_withScopeId$l(()=>vue.createElementVNode("td",null,"字段名称",-1)),_hoisted_3$A=_withScopeId$l(()=>vue.createElementVNode("td",null,"字段描述",-1)),_hoisted_4$z=_withScopeId$l(()=>vue.createElementVNode("td",null,"映射字段",-1)),_hoisted_5$u=_withScopeId$l(()=>vue.createElementVNode("td",{width:"120px"},"数据类型",-1)),_hoisted_6$p=_withScopeId$l(()=>vue.createElementVNode("td",null,"数据长度",-1)),_hoisted_7$m=_withScopeId$l(()=>vue.createElementVNode("td",null,"数据标度",-1)),_hoisted_8$k=_withScopeId$l(()=>vue.createElementVNode("td",null,"是否主键",-1)),_hoisted_9$h=_withScopeId$l(()=>vue.createElementVNode("td",null,"唯一校验",-1)),_hoisted_10$g=_withScopeId$l(()=>vue.createElementVNode("td",{style:{width:"50px"}},null,-1)),_hoisted_11$e={class:"sort-target"},_hoisted_12$c={key:0},_hoisted_13$9=["onClick"],_hoisted_14$8=_withScopeId$l(()=>vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-move ri-mouse-line handle text-color-warning"})],-1)),_sfc_main$10=vue.defineComponent({__name:"attribute",props:vue.mergeModels({isRequired:{default:1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i,{expose:n}){const r=vue.useModel(i,"modelValue");vue.getCurrentInstance();const o=vue.ref(null),a=vue.ref({attributeCode:[{required:!0,message:"请输入字段名称"},{pattern:/^[A-Za-z]\w*$/,message:"只能以字母开头,由字母/数字/下划线组成",trigger:"blur"}],attributeComment:[{required:!0,message:"请输入字段描述"}],mapCode:[{required:!0,message:"请输入映射字段"}],dataType:[{required:!0,message:"请选择数据类型"}],dataLength:[{required:!0,message:"请输入数据长度"}],dataScale:[{required:!0,message:"请输入数据标度"}],primaryKey:[{required:!0,message:"请选择是否为主键"}]}),l=p=>{const v=p.dataType;v!=="decimal"&&(p.dataScale=0),["autoIncrement","date","time","datetime","int","bigint","double","text"].includes(v)&&(p.dataLength=0),v==="decimal"&&(p.dataLength=10,p.dataScale=6),v==="varchar"&&(p.dataLength=255)},s=(p,v)=>{p.primaryKey==2&&vue.unref(r).forEach((m,_)=>{_!=v&&(m.primaryKey=1)})},u=()=>{vue.unref(r).push({nanoid:nanoid()})},c=p=>{vue.unref(r).splice(p,1)};return n({validate:async()=>await vue.unref(o).validate(p=>p),isRepeat:()=>{const p=new Map;let v="";for(let g=0;g<vue.unref(r).length;g++){let m=vue.unref(r)[g],_=p.get(m.attributeCode);_!=null&&(v+="字段名称 <strong>"+m.attributeCode+"</strong> 重复(<i>第"+(_+1)+"行和第"+(g+1)+"行</i>);<br>"),p.set(vue.unref(r)[g].attributeCode,g)}return v}}),(p,v)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElForm),{"label-width":"0",model:{modelValue:r.value},size:"small",ref_key:"elFormRef",ref:o,rules:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(vueDraggablePlus.VueDraggable),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),target:".sort-target",animation:150,handle:".handle"},{default:vue.withCtx(()=>[vue.createElementVNode("table",_hoisted_1$P,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",{style:{width:"50px"}},[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:u})]),_hoisted_2$H,_hoisted_3$A,_hoisted_4$z,_hoisted_5$u,_hoisted_6$p,_hoisted_7$m,_hoisted_8$k,_hoisted_9$h,_hoisted_10$g]),vue.createElementVNode("tbody",_hoisted_11$e,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(r.value,(g,m)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:g.nanoid},[g.hide?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_12$c,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger",onClick:_=>c(m)},null,8,_hoisted_13$9)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".attributeCode",rules:vue.unref(a).attributeCode},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.attributeCode,"onUpdate:modelValue":_=>g.attributeCode=_,maxlength:"30",showWordLimit:"",placeholder:"字段名称"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".attributeComment",rules:vue.unref(a).attributeComment},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.attributeComment,"onUpdate:modelValue":_=>g.attributeComment=_,maxlength:"30",showWordLimit:"",placeholder:"字段描述"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".mapCode",rules:vue.unref(a).mapCode},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.mapCode,"onUpdate:modelValue":_=>g.mapCode=_,maxlength:"30",showWordLimit:"",placeholder:"映射字段"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataType",rules:vue.unref(a).dataType},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:g.dataType,"onUpdate:modelValue":_=>g.dataType=_,placeholder:"数据类型",class:"w-full",teleported:!1,onChange:()=>l(g)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(commonDataType),_=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataLength",rules:vue.unref(a).dataLength},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{min:0,max:2048,"value-on-clear":0,"controls-position":"right",modelValue:g.dataLength,"onUpdate:modelValue":_=>g.dataLength=_,disabled:["autoIncrement","date","time","datetime","int","bigint","double","text"].includes(g.dataType),placeholder:"长度",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataScale",rules:vue.unref(a).dataScale},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{modelValue:g.dataScale,"onUpdate:modelValue":_=>g.dataScale=_,min:0,max:2048,"value-on-clear":0,"controls-position":"right",disabled:!["decimal"].includes(g.dataType),placeholder:"标度",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:g.primaryKey,"onUpdate:modelValue":_=>g.primaryKey=_,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",onChange:()=>s(g,m)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:g.uniqueKey,"onUpdate:modelValue":_=>g.uniqueKey=_,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1"},null,8,["modelValue","onUpdate:modelValue"])]),_hoisted_14$8]))],64))),128))])])]),_:1},8,["modelValue"])]),_:1},8,["model","rules"]))}}),attribute_vue_vue_type_style_index_0_scoped_8dbf5661_lang="",Attribute=_export_sfc$2(_sfc_main$10,[["__scopeId","data-v-8dbf5661"]]),_withScopeId$k=i=>(vue.pushScopeId("data-v-a3938966"),i=i(),vue.popScopeId(),i),_hoisted_1$O={class:"flex flex-col h-full"},_hoisted_2$G={class:"flex flex-1 overflow-hidden"},_hoisted_3$z={class:"flex flex-col flex-1 mr-3 overflow-hidden"},_hoisted_4$y={class:"h"},_hoisted_5$t=["onClick"],_hoisted_6$o={class:"mr-1 text-base"},_hoisted_7$l={class:"ml-2 text-xs text-color-info"},_hoisted_8$j={class:"text-color-warning"},_hoisted_9$g={class:"flex justify-end flex-1"},_hoisted_10$f=_withScopeId$k(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_11$d={class:"flex-1 overflow-hidden b"},_hoisted_12$b={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_13$8={class:"h"},_hoisted_14$7=["onClick"],_hoisted_15$3={class:"flex-1 overflow-hidden b"},_hoisted_16$3={class:"flex flex-1 mt-3 overflow-hidden"},_hoisted_17$3={class:"flex flex-col flex-1 mr-3 overflow-hidden"},_hoisted_18$3={class:"flex h"},_hoisted_19$3=["onClick"],_hoisted_20$3={key:0,class:"mr-1 text-color-danger"},_hoisted_21$3={class:"mr-1 text-base"},_hoisted_22$3={key:0,class:"flex justify-end flex-1"},_hoisted_23$3=_withScopeId$k(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_24$2={class:"flex-1 overflow-hidden b"},_hoisted_25$2={key:0,class:"flex items-center justify-center h-full"},_hoisted_26$2=_withScopeId$k(()=>vue.createElementVNode("i",{class:"ri-table-fill"},null,-1)),_hoisted_27$1=_withScopeId$k(()=>vue.createElementVNode("i",{class:"ri-database-2-fill"},null,-1)),_hoisted_28$1={class:"h-full mt-2 overflow-y-auto"},_hoisted_29$1={class:"overflow-y-auto max-h-96",style:{"min-height":"300px"}},_hoisted_30$1=_withScopeId$k(()=>vue.createElementVNode("span",{class:"mr-1 text-color-danger"},"*",-1)),_hoisted_31$1={class:"h-full mt-2 overflow-y-auto"},_hoisted_32$1={class:"mt-2"},_hoisted_33$1={key:0,class:"flex flex-col flex-1 overflow-hidden"},_hoisted_34$1={class:"h"},_hoisted_35$1=["onClick"],_hoisted_36$1={class:"flex-1 overflow-hidden b"},_sfc_main$$=vue.defineComponent({__name:"design",props:{widgetType:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{setFormValue:s,getFormValue:u}=l.$globalHooks.useForm(),{openMessage:c}=l.$globalHooks.useMessage(),d=vue.inject("projectList"),f=vue.computed(()=>{var z,ee;return((ee=(z=(vue.unref(d)??[]).find(le=>le.value==l.$baseGetCurrentProjectId()))==null?void 0:z.ext)==null?void 0:ee.storeType)??"-"}),p=[{label:"SQL编写",value:"1",num:"①"}],v=vue.ref("1"),g=[{label:"SQL执行结果",value:"1"},{label:"SQL执行结果(JSON)",value:"2"}],m=vue.ref("1"),_=vue.ref([]),y=vue.ref(""),b=vue.ref("1"),C=[{label:"插件执行结果",value:"1"},{label:"插件执行结果(JSON)",value:"2"}],x=vue.ref("1"),w=vue.ref(!1),V=vue.ref(null),$=vue.ref(""),S=vue.ref([]),E=vue.ref(""),k=vue.ref([]),P=vue.ref(`function plugin(item){
|
|
615
|
+
*/(function(i,n){(function(o,a){i.exports=a()})(commonjsGlobal,function(){return function(){var r={686:function(l,s,u){u.d(s,{default:function(){return F}});var c=u(279),d=u.n(c),f=u(370),p=u.n(f),v=u(817),g=u.n(v);function m(W){try{return document.execCommand(W)}catch{return!1}}var _=function(J){var Q=g()(J);return m("cut"),Q},y=_;function b(W){var J=document.documentElement.getAttribute("dir")==="rtl",Q=document.createElement("textarea");Q.style.fontSize="12pt",Q.style.border="0",Q.style.padding="0",Q.style.margin="0",Q.style.position="absolute",Q.style[J?"right":"left"]="-9999px";var Y=window.pageYOffset||document.documentElement.scrollTop;return Q.style.top="".concat(Y,"px"),Q.setAttribute("readonly",""),Q.value=W,Q}var C=function(J,Q){var Y=b(J);Q.container.appendChild(Y);var oe=g()(Y);return m("copy"),Y.remove(),oe},x=function(J){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Y="";return typeof J=="string"?Y=C(J,Q):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J==null?void 0:J.type)?Y=C(J.value,Q):(Y=g()(J),m("copy")),Y},w=x;function V(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(Q){return typeof Q}:V=function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},V(W)}var $=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=J.action,Y=Q===void 0?"copy":Q,oe=J.container,z=J.target,ee=J.text;if(Y!=="copy"&&Y!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(z!==void 0)if(z&&V(z)==="object"&&z.nodeType===1){if(Y==="copy"&&z.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Y==="cut"&&(z.hasAttribute("readonly")||z.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ee)return w(ee,{container:oe});if(z)return Y==="cut"?y(z):w(z,{container:oe})},S=$;function E(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(Q){return typeof Q}:E=function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},E(W)}function k(W,J){if(!(W instanceof J))throw new TypeError("Cannot call a class as a function")}function P(W,J){for(var Q=0;Q<J.length;Q++){var Y=J[Q];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(W,Y.key,Y)}}function T(W,J,Q){return J&&P(W.prototype,J),Q&&P(W,Q),W}function B(W,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(J&&J.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),J&&N(W,J)}function N(W,J){return N=Object.setPrototypeOf||function(Y,oe){return Y.__proto__=oe,Y},N(W,J)}function O(W){var J=I();return function(){var Y=j(W),oe;if(J){var z=j(this).constructor;oe=Reflect.construct(Y,arguments,z)}else oe=Y.apply(this,arguments);return D(this,oe)}}function D(W,J){return J&&(E(J)==="object"||typeof J=="function")?J:L(W)}function L(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(W){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},j(W)}function M(W,J){var Q="data-clipboard-".concat(W);if(J.hasAttribute(Q))return J.getAttribute(Q)}var R=function(W){B(Q,W);var J=O(Q);function Q(Y,oe){var z;return k(this,Q),z=J.call(this),z.resolveOptions(oe),z.listenClick(Y),z}return T(Q,[{key:"resolveOptions",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof oe.action=="function"?oe.action:this.defaultAction,this.target=typeof oe.target=="function"?oe.target:this.defaultTarget,this.text=typeof oe.text=="function"?oe.text:this.defaultText,this.container=E(oe.container)==="object"?oe.container:document.body}},{key:"listenClick",value:function(oe){var z=this;this.listener=p()(oe,"click",function(ee){return z.onClick(ee)})}},{key:"onClick",value:function(oe){var z=oe.delegateTarget||oe.currentTarget,ee=this.action(z)||"copy",le=S({action:ee,container:this.container,target:this.target(z),text:this.text(z)});this.emit(le?"success":"error",{action:ee,text:le,trigger:z,clearSelection:function(){z&&z.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(oe){return M("action",oe)}},{key:"defaultTarget",value:function(oe){var z=M("target",oe);if(z)return document.querySelector(z)}},{key:"defaultText",value:function(oe){return M("text",oe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(oe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(oe,z)}},{key:"cut",value:function(oe){return y(oe)}},{key:"isSupported",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],z=typeof oe=="string"?[oe]:oe,ee=!!document.queryCommandSupported;return z.forEach(function(le){ee=ee&&!!document.queryCommandSupported(le)}),ee}}]),Q}(d()),F=R},828:function(l){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function c(d,f){for(;d&&d.nodeType!==s;){if(typeof d.matches=="function"&&d.matches(f))return d;d=d.parentNode}}l.exports=c},438:function(l,s,u){var c=u(828);function d(v,g,m,_,y){var b=p.apply(this,arguments);return v.addEventListener(m,b,y),{destroy:function(){v.removeEventListener(m,b,y)}}}function f(v,g,m,_,y){return typeof v.addEventListener=="function"?d.apply(null,arguments):typeof m=="function"?d.bind(null,document).apply(null,arguments):(typeof v=="string"&&(v=document.querySelectorAll(v)),Array.prototype.map.call(v,function(b){return d(b,g,m,_,y)}))}function p(v,g,m,_){return function(y){y.delegateTarget=c(y.target,g),y.delegateTarget&&_.call(v,y)}}l.exports=f},879:function(l,s){s.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},s.nodeList=function(u){var c=Object.prototype.toString.call(u);return u!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in u&&(u.length===0||s.node(u[0]))},s.string=function(u){return typeof u=="string"||u instanceof String},s.fn=function(u){var c=Object.prototype.toString.call(u);return c==="[object Function]"}},370:function(l,s,u){var c=u(879),d=u(438);function f(m,_,y){if(!m&&!_&&!y)throw new Error("Missing required arguments");if(!c.string(_))throw new TypeError("Second argument must be a String");if(!c.fn(y))throw new TypeError("Third argument must be a Function");if(c.node(m))return p(m,_,y);if(c.nodeList(m))return v(m,_,y);if(c.string(m))return g(m,_,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(m,_,y){return m.addEventListener(_,y),{destroy:function(){m.removeEventListener(_,y)}}}function v(m,_,y){return Array.prototype.forEach.call(m,function(b){b.addEventListener(_,y)}),{destroy:function(){Array.prototype.forEach.call(m,function(b){b.removeEventListener(_,y)})}}}function g(m,_,y){return d(document.body,m,_,y)}l.exports=f},817:function(l){function s(u){var c;if(u.nodeName==="SELECT")u.focus(),c=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var d=u.hasAttribute("readonly");d||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),d||u.removeAttribute("readonly"),c=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var f=window.getSelection(),p=document.createRange();p.selectNodeContents(u),f.removeAllRanges(),f.addRange(p),c=f.toString()}return c}l.exports=s},279:function(l){function s(){}s.prototype={on:function(u,c,d){var f=this.e||(this.e={});return(f[u]||(f[u]=[])).push({fn:c,ctx:d}),this},once:function(u,c,d){var f=this;function p(){f.off(u,p),c.apply(d,arguments)}return p._=c,this.on(u,p,d)},emit:function(u){var c=[].slice.call(arguments,1),d=((this.e||(this.e={}))[u]||[]).slice(),f=0,p=d.length;for(f;f<p;f++)d[f].fn.apply(d[f].ctx,c);return this},off:function(u,c){var d=this.e||(this.e={}),f=d[u],p=[];if(f&&c)for(var v=0,g=f.length;v<g;v++)f[v].fn!==c&&f[v].fn._!==c&&p.push(f[v]);return p.length?d[u]=p:delete d[u],this}},l.exports=s,l.exports.TinyEmitter=s}},o={};function a(l){if(o[l])return o[l].exports;var s=o[l]={exports:{}};return r[l](s,s.exports,a),s.exports}return function(){a.n=function(l){var s=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(s,{a:s}),s}}(),function(){a.d=function(l,s){for(var u in s)a.o(s,u)&&!a.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:s[u]})}}(),function(){a.o=function(l,s){return Object.prototype.hasOwnProperty.call(l,s)}}(),a(686)}().default})})(clipboard);var clipboardExports=clipboard.exports;const Clipboard$1=getDefaultExportFromCjs(clipboardExports),useClipboard=i=>{const n=(i==null?void 0:i.appendToBody)===void 0?!0:i.appendToBody;return{toClipboard(r,o){return new Promise((a,l)=>{const s=document.createElement("button"),u=new Clipboard$1(s,{text:()=>r,action:()=>"copy",container:o!==void 0?o:document.body});u.on("success",c=>{u.destroy(),a(c)}),u.on("error",c=>{u.destroy(),l(c)}),n&&document.body.appendChild(s),s.click(),n&&document.body.removeChild(s)})}}},_hoisted_1$1e={class:"mb-2"},_hoisted_2$12=vue.createElementVNode("div",{class:"mb-2 font-bold"},"显示名称",-1),_hoisted_3$V={class:"relative mt-4 mb-4 flex flex-col gap-2.5"},_hoisted_4$T={class:"flex gap-2.5 items-center"},_hoisted_5$K=vue.createElementVNode("span",{class:"font-bold"},"SQL计算公式",-1),_hoisted_6$E={class:"flex items-center gap-1.5"},_hoisted_7$A=vue.createElementVNode("i",{class:"ri-lightbulb-line"},null,-1),_hoisted_8$x=vue.createElementVNode("span",{class:"text-xs"},"使用规范SQL函数和计算公式,以下表达式将嵌入到SELECT语句中",-1),_hoisted_9$t={class:"flex gap-2.5 items-center"},_hoisted_10$p=vue.createElementVNode("span",null,"字段列表",-1),_hoisted_11$k={class:"flex items-center gap-1.5"},_hoisted_12$h={class:"flex items-center gap-2.5 flex-wrap"},_hoisted_13$e=["onClick"],_hoisted_14$d={class:"text-black"},_sfc_main$1v=vue.defineComponent({__name:"model-sql",props:{options:{default:()=>[]}},emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{toClipboard:a}=useClipboard(),l=vue.ref(!1),s=i,u=r,c=vue.ref(""),d=vue.ref(""),f=vue.ref(null),p=m=>{if(c.value="",d.value="",l.value=!0,f.value=m??{},m){const _=JSON.parse(JSON.stringify(m.data));d.value=_.identifier??"",c.value=_.comment}},v=async m=>{try{await a(m),o.$message({type:"success",message:"复制成功",plain:!0})}catch{o.$message({type:"warning",message:"复制失败",plain:!0})}},g=()=>{var m;if(!vue.unref(d)){o.$message({type:"warning",message:"请输入SQL语句",plain:!0});return}if(vue.unref(c)==""){o.$message({type:"warning",message:"请输入显示名称",plain:!0});return}u("success",{aggType:"applySql",identifier:vue.unref(d),comment:vue.unref(c),showLabel:vue.unref(c)},((m=vue.unref(f))==null?void 0:m.index)??""),l.value=!1};return n({init:p}),(m,_)=>{const y=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createBlock(y,{modelValue:vue.unref(l),"onUpdate:modelValue":_[3]||(_[3]=b=>vue.isRef(l)?l.value=b:null),title:"SQL计算",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:_[2]||(_[2]=b=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1e,[_hoisted_2$12,vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(c),"onUpdate:modelValue":_[0]||(_[0]=b=>vue.isRef(c)?c.value=b:null),placeholder:"请输入显示名称"},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_3$V,[vue.createElementVNode("div",_hoisted_4$T,[_hoisted_5$K,vue.createElementVNode("span",_hoisted_6$E,[vue.createVNode(vue.unref(elementPlus.ElText),{type:"warning"},{default:vue.withCtx(()=>[_hoisted_7$A]),_:1}),vue.createVNode(vue.unref(elementPlus.ElText),{type:"info"},{default:vue.withCtx(()=>[_hoisted_8$x]),_:1})])]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(d),"onUpdate:modelValue":_[1]||(_[1]=b=>vue.isRef(d)?d.value=b:null),placeholder:"请输入SQL语句,例如:max(tbValue+isVal)+max(tbValue)",type:"textarea"},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_9$t,[_hoisted_10$p,vue.createElementVNode("span",_hoisted_11$k,[vue.createVNode(vue.unref(elementPlus.ElText),{type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("点击可复制")]),_:1})])]),vue.createElementVNode("div",_hoisted_12$h,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.options,b=>(vue.openBlock(),vue.createElementBlock("div",{style:{border:"1px solid #eee"},onClick:C=>v(b.identifier),class:"bg-gray-100 flex flex-col p-2.5 justify-center items-center rounded gap-0.5 cursor-pointer",key:b.identifier},[vue.createElementVNode("div",_hoisted_14$d,vue.toDisplayString(b.columnComment),1),vue.createVNode(vue.unref(elementPlus.ElText),{type:"info"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(b.identifier),1)]),_:2},1024)],8,_hoisted_13$e))),128))])])]),_:1},8,["modelValue"])}}}),_withScopeId$v=i=>(vue.pushScopeId("data-v-d0ae7404"),i=i(),vue.popScopeId(),i),_hoisted_1$1d={key:0},_hoisted_2$11=_withScopeId$v(()=>vue.createElementVNode("div",{class:"mb-2 text-sm indicators-title"},[vue.createElementVNode("i",{class:"mr-1 ri-table-line"}),vue.createTextVNode(" 基本指标 ")],-1)),_hoisted_3$U=["onClick"],_hoisted_4$S=_withScopeId$v(()=>vue.createElementVNode("i",{class:"ri-lightbulb-line"},null,-1)),_hoisted_5$J={key:1},_hoisted_6$D={class:"flex items-center mb-2 text-sm indicators-title"},_hoisted_7$z={class:"overflow-y-auto max-h-96"},_hoisted_8$w=["onClick"],_hoisted_9$s={class:"field-label"},_hoisted_10$o=_withScopeId$v(()=>vue.createElementVNode("i",{class:"ri-add-fill"},null,-1)),_sfc_main$1u=vue.defineComponent({__name:"model-table-summary",props:{modelValue:{default:()=>[]},iconMap:{default:()=>{}},aggArgsList:{default:()=>[]},groupArgsList:{default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("chartList");const l=vue.ref(!1),s=vue.ref(1),u=vue.ref(null),c=vue.ref(null),d=vue.ref([{label:"总数",value:"count",tip:"数据的总行数"},{label:"总和",value:"sum",tip:"列的所有值的总和"},{label:"平均值",value:"avg",tip:"列的所有值的平均值"},{label:"最少",value:"min",tip:"列的最小值"},{label:"最大",value:"max",tip:"列的最大值"},{label:"计算公式",value:"exp",tip:"可手动输入计算公式"},{label:"SQL计算",value:"applySql",tip:"可手动输入sql语句"}]);vue.watch(l,_=>{_&&(v.value={},s.value=1)});const f=_=>{o("update:modelValue",r.modelValue.filter(y=>y.showLabel!==_.showLabel))},p=(_,y)=>{_.aggType=="applySql"&&vue.unref(c).init({data:_,index:y}),_.aggType=="exp"&&vue.unref(u).init({data:_,index:y})},v=vue.ref({}),g=_=>{if(_.value==="count"){if(r.modelValue.some(y=>y.aggType==_.value)){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}o("update:modelValue",[...r.modelValue,{identifier:1,aggType:_.value,showLabel:_.label}]),l.value=!1;return}if(_.value=="exp"){vue.unref(u).init();return}if(_.value=="applySql"){vue.unref(c).init();return}s.value=2,v.value=_},m=_=>{var y,b;if(r.modelValue.some(C=>{var x;return C.identifier==_.identifier&&C.aggType==((x=vue.unref(v))==null?void 0:x.value)})){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}l.value=!1,o("update:modelValue",[...r.modelValue,{identifier:_.identifier,comment:_.columnComment,aggType:(y=vue.unref(v))==null?void 0:y.value,showLabel:_.columnComment+((b=vue.unref(v))==null?void 0:b.label)}])};return(_,y)=>{const b=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(b,{title:"汇总方式",class:"mb-2"}),vue.createElementVNode("div",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(_.modelValue,(C,x)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:C.value,class:vue.normalizeClass(["m-1",[C.aggType=="exp"?"cursor-pointer":""]]),closable:!0,onClick:w=>p(C,x),onClose:w=>f(C),type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.showLabel),1)]),_:2},1032,["onClick","class","onClose"]))),128)),vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"click",width:"300px",placement:"top-start",visible:vue.unref(l),"onUpdate:visible":y[1]||(y[1]=C=>vue.isRef(l)?l.value=C:null)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",size:"small"},{default:vue.withCtx(()=>[_hoisted_10$o,vue.createTextVNode(" "+vue.toDisplayString(_.modelValue.length?"":"添加度量"),1)]),_:1})]),default:vue.withCtx(()=>[vue.unref(s)==1?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1d,[_hoisted_2$11,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(d),C=>(vue.openBlock(),vue.createElementBlock("div",{onClick:x=>g(C),key:C.value,class:vue.normalizeClass([{active:vue.unref(v).value==C.value},"indicators-item"])},[vue.createTextVNode(vue.toDisplayString(C.label)+" ",1),vue.createVNode(vue.unref(elementPlus.ElTooltip),{effect:"dark",content:C.tip,placement:"top"},{default:vue.withCtx(()=>[_hoisted_4$S]),_:2},1032,["content"])],10,_hoisted_3$U))),128))])):vue.createCommentVNode("",!0),vue.unref(s)==2?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$J,[vue.createElementVNode("div",_hoisted_6$D,[vue.createElementVNode("i",{class:"mr-1 text-xl cursor-pointer ri-arrow-left-s-line",onClick:y[0]||(y[0]=C=>s.value=1)}),vue.createTextVNode(" "+vue.toDisplayString(vue.unref(v).label),1)]),vue.createElementVNode("div",_hoisted_7$z,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(r.aggArgsList,C=>(vue.openBlock(),vue.createElementBlock("div",{onClick:x=>m(C),key:C.identifier,class:"indicators-item"},[vue.createElementVNode("div",null,[vue.createElementVNode("i",{class:vue.normalizeClass([_.iconMap[C.dataType],"mr-2"])},null,2),vue.createElementVNode("span",_hoisted_9$s,vue.toDisplayString(C.columnComment),1)])],8,_hoisted_8$w))),128))])])):vue.createCommentVNode("",!0)]),_:1},8,["visible"]),vue.createVNode(ModelExp,{ref_key:"modelPercentRef",ref:u,options:r.aggArgsList,onSuccess:y[2]||(y[2]=(C,x)=>x!==""?r.modelValue[x]=C:o("update:modelValue",[...r.modelValue,C]))},null,8,["options"]),vue.createVNode(_sfc_main$1v,{ref_key:"modelSqlRef",ref:c,options:r.groupArgsList,onSuccess:y[3]||(y[3]=(C,x)=>x!==""?r.modelValue[x]=C:o("update:modelValue",[...r.modelValue,C]))},null,8,["options"])])],64)}}}),modelTableSummary_vue_vue_type_style_index_0_scoped_d0ae7404_lang="",modelTableSunmary=_export_sfc$2(_sfc_main$1u,[["__scopeId","data-v-d0ae7404"]]),_sfc_main$1t=vue.defineComponent({__name:"chart-list-widget",props:{type:{default:""}},setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.inject("chartList"),o=a=>{n.$baseEventBus.emit("model-chart-click",a)};return(a,l)=>(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(r),s=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:a.type==s.type?"primary":"",key:s.type,onClick:u=>o(s)},{default:vue.withCtx(()=>{var u;return[vue.createElementVNode("i",{class:vue.normalizeClass((u=vue.unref(echartsTypeList)[s.type])==null?void 0:u.icon)},null,2)]}),_:2},1032,["type","onClick"]))),128))}}),_withScopeId$u=i=>(vue.pushScopeId("data-v-b71f07d1"),i=i(),vue.popScopeId(),i),_hoisted_1$1c={class:"overflow-y-auto max-h-96"},_hoisted_2$10=["onClick"],_hoisted_3$T={class:"field-label"},_hoisted_4$R=_withScopeId$u(()=>vue.createElementVNode("i",{class:"ri-add-fill"},null,-1)),_sfc_main$1s=vue.defineComponent({__name:"model-table-other-summary",props:{modelValue:{default:()=>[]},iconMap:{default:()=>{}},list:{default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("chartList");const l=vue.ref(!1);vue.ref(null);const s=c=>{o("update:modelValue",r.modelValue.filter(d=>d.showLabel!==c.showLabel))},u=c=>{if(r.modelValue.some(d=>d.identifier==c.identifier)){a.$message({type:"warning",message:"存在重复数据",plain:!0});return}l.value=!1,o("update:modelValue",[...r.modelValue,{identifier:c.identifier,comment:c.columnComment,aggType:"other",showLabel:c.columnComment}])};return(c,d)=>{const f=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(f,{title:"显示其他列",class:"mt-2 mb-2"}),vue.createElementVNode("div",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.modelValue,(p,v)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:p.value,class:"m-1",closable:!0,onClose:g=>s(p),type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(p.showLabel),1)]),_:2},1032,["onClose"]))),128)),vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"click",width:"300px",placement:"top-start","popper-class":"ace-select",visible:vue.unref(l),"onUpdate:visible":d[0]||(d[0]=p=>vue.isRef(l)?l.value=p:null)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",size:"small"},{default:vue.withCtx(()=>[_hoisted_4$R]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1c,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.list,p=>(vue.openBlock(),vue.createElementBlock("div",{onClick:v=>u(p),key:p.identifier,class:"indicators-item"},[vue.createElementVNode("div",null,[vue.createElementVNode("i",{class:vue.normalizeClass([c.iconMap[p.dataType],"mr-2"])},null,2),vue.createElementVNode("span",_hoisted_3$T,vue.toDisplayString(p.columnComment),1)])],8,_hoisted_2$10))),128))])]),_:1},8,["visible"])])],64)}}}),modelTableOtherSummary_vue_vue_type_style_index_0_scoped_b71f07d1_lang="",ModelTableOtherSummary=_export_sfc$2(_sfc_main$1s,[["__scopeId","data-v-b71f07d1"]]),_withScopeId$t=i=>(vue.pushScopeId("data-v-c1a63796"),i=i(),vue.popScopeId(),i),_hoisted_1$1b={class:"flex w-full h-full"},_hoisted_2$$={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$S={class:"flex flex-col flex-1 pb-3 pr-3 overflow-y-auto"},_hoisted_4$Q={key:0,class:"relative flex items-center justify-center pannel h-14"},_hoisted_5$I={class:"absolute left-5 top-3"},_hoisted_6$C=_withScopeId$t(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_7$y=_withScopeId$t(()=>vue.createElementVNode("i",{class:"ri-table-line"},null,-1)),_hoisted_8$v={class:"absolute flex items-center right-5 top-4"},_hoisted_9$r=_withScopeId$t(()=>vue.createElementVNode("i",{class:"mr-1 ri-settings-2-line"},null,-1)),_hoisted_10$n={class:"ml-2 mr-2"},_hoisted_11$j={class:"flex flex-col"},_hoisted_12$g={class:"flex-1 overflow-y-auto"},_hoisted_13$d={key:0,class:"flex items-center justify-center pannel h-14"},_hoisted_14$c=_withScopeId$t(()=>vue.createElementVNode("i",{class:"mr-1 ri-save-line"},null,-1)),_sfc_main$1r=vue.defineComponent({__name:"table-widget",props:{modelValue:{default:""},title:{default:""},sortHtml:{default:""},indicatorsId:{default:""},resultTitle:{default:""},dynamicSearchForm:{default:()=>[]}},emits:["update:modelValue","update:title","update:sortHtml","update:resultTitle","update:indicatorsId","update:dynamicSearchForm","success"],setup(i,{expose:n,emit:r}){const o=i,a=r,l=useScreenDesign(),{proxy:s}=vue.getCurrentInstance(),{setFormValue:u,getFormValue:c}=s.$globalHooks.useForm(),{dynamicSearchForm:d,dynamicSearchFormat:f,dynamicSearchParams:p}=s.$aceDynamicSearch(s),v=vue.inject("modelEle"),g=vue.inject("getListModelIndicators");vue.inject("chartList");const m={varchar:"ri-text",date:"ri-calendar-2-line",datetime:"ri-calendar-2-line",int:"ri-hashtag",decimal:"ri-hashtag"},_={day:"按日",week:"按周",month:"按月",quarter:"按季度",year:"按年","":"按时分秒"},y=vue.ref(!1),b=vue.ref(!0),C=vue.ref(0),x=vue.ref([]),w=vue.ref([]),V=vue.ref([]),$=vue.ref([]),S=vue.ref([]),E=vue.ref(!0),k=vue.ref(!0),P=async z=>{var se,K;E.value=!0,k.value=!1;const ee=JSON.parse((z==null?void 0:z.groupArgsJson)??"[]"),le=JSON.parse((z==null?void 0:z.aggArgsJson)??JSON.stringify([{identifier:1,aggType:"count",showLabel:"总数"}]));$.value=le.filter(Z=>Z.aggType!="other"),S.value=le.filter(Z=>Z.aggType=="other"),ee.length||(E.value=!1),C.value=(z==null?void 0:z.pageSize)??20,j.value=JSON.parse((z==null?void 0:z.sortArgsJson)??"{}"),z!=null&&z.formConfJson?(d.value=f(JSON.parse(z.formConfJson??"[]")),a("update:dynamicSearchForm",d.value)):await fetch$1(s).getFormJsonConfig((se=vue.unref(v))==null?void 0:se.id).then(Z=>{var U;d.value=f(JSON.parse(((U=Z.data)==null?void 0:U.formConfJson)??"[]"))}),a("update:dynamicSearchForm",d.value),u(z,F),s.$baseHttp.post("/api/ace-data-center/aidc/modelAnalysis",{projectId:s.$baseGetCurrentProjectId(),modelId:(K=vue.unref(v))==null?void 0:K.id,serialId:new Date().getTime()}).then(Z=>{b.value=!1,x.value=Z.data.filter(U=>!["创建时间","创建人","所属项目","创建部门","标签"].includes(U.columnComment)).map(U=>({...U,dateFormatType:["date","datetime"].includes(U.dataType)?"day":""})),V.value=Z.data.filter(U=>["ADDABLE","SEMIADDABLE"].includes(U.quantityType)),ee.forEach(U=>{const q=x.value.find(X=>X.identifier==U.identifier);q&&(w.value.push({...q,dataType:U.dataType,dateFormatType:U.dateFormatType}),q.dateFormatType=U.dateFormatType)}),E.value=!1,setTimeout(()=>{k.value=!0},1e3)})};vue.watch([$,w,S],()=>{vue.unref(k)&&(j.value={}),L()},{deep:!0});let T=null;const B=vue.ref(null),N=vue.ref(!1),O=vue.ref([]),D=vue.ref([]),L=async()=>{clearTimeout(T),T=setTimeout(async()=>{var K,Z;D.value=[],l.setChartData([]);const z=I(),ee=Object.keys(vue.unref(j)).map(U=>({field:U,type:vue.unref(j)[U]=="ascending"?"asc":"desc"})),le={aggArgsJson:JSON.stringify([...vue.unref($),...vue.unref(S)]),groupArgsJson:JSON.stringify(z),sortArgsJson:JSON.stringify(ee),params:p(vue.unref(d)),pageSize:vue.unref(C),modelId:(K=vue.unref(v))==null?void 0:K.id,formConfJson:JSON.stringify(vue.unref(d))};if(o.indicatorsId&&(le.modelIndicatorsId=o.indicatorsId),a("update:title",`${vue.unref($).length}个指标:${vue.unref($).length?"根据":""}${z.map(U=>U.showLabel).toString()}${vue.unref($).length?"分组的":""}${vue.unref($).filter((U,q)=>q<3).map(U=>U.showLabel).toString()}${vue.unref($).length>3?"...":""}`),!vue.unref($).length||vue.unref(E)){O.value=[];return}N.value=!0;const se=await s.$baseHttp.post("/api/ace-data-center/model-indicators/debug",le);B.value=le,N.value=!1,se&&(O.value=((Z=se.data)==null?void 0:Z.records)??[],l.setChartData({x:z,y:[...vue.unref($),...vue.unref(S)],params:le}),vue.unref(O).length&&Object.keys(vue.unref(O)[0]).forEach(U=>{D.value.push({label:U,prop:U,sortable:"custom"})}))})},I=()=>vue.unref(w).map(z=>({identifier:z.identifier,comment:z.columnComment,showLabel:z.columnComment+(_[z.dateFormatType]??""),dateFormatType:z.dateFormatType||null})),j=vue.ref({}),M=({column:z})=>{vue.unref(j)[z.property]&&(z.order=vue.unref(j)[z.property])};vue.watch(j,z=>{const ee=Object.keys(z).map(le=>`${le}${z[le]=="descending"?"降序":"升序"}`);a("update:sortHtml",ee.length?`<span class="text-color-warning">排序:${ee.toString()}</span>`:"")},{deep:!0});const R=z=>{const{prop:ee,order:le}=z;!le||vue.unref(j)[ee]===le?delete vue.unref(j)[ee]:vue.unref(j)[ee]=le,L()};fetch$1(s).loadIndicatorsMenu().then(z=>{F.find(ee=>ee.fieldName=="tags").options=Object.keys(z.data).map(ee=>({label:ee,value:ee}))});const F=vue.reactive([{name:"名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"描述",type:FieldType.Textarea,fieldName:"remark",value:""},{name:"标签",type:FieldType.Select,fieldName:"tags",value:"",options:[],multiple:!0,allowCreate:!0,required:!0,placeholder:"请选择标签或输入标签"},{name:"code",type:FieldType.Text,fieldName:"code",value:"",hide:!0}]),W=vue.ref(!1),J=()=>{F.find(z=>z.fieldName=="remark").value=o.title,W.value=!0},Q=async()=>{var K;const{params:z,error:ee}=c(F);if(ee.length>0)return;const le=I();if(!le.length||!vue.unref($).length){s.$message({type:"warning",message:"计算维度或汇总方式不能为空",plain:!0});return}z.code||(z.code=nanoid()),z.groupArgsJson=JSON.stringify(le),z.aggArgsJson=JSON.stringify([...vue.unref($),...vue.unref(S)]),z.modelId=(K=vue.unref(v))==null?void 0:K.id,z.projectId=s.$baseGetCurrentProjectId(),z.pageSize=vue.unref(C),z.formConfJson=JSON.stringify(vue.unref(d)),z.sortArgsJson=JSON.stringify(vue.unref(j)),o.indicatorsId&&(z.id=o.indicatorsId),W.value=!1;const se=await s.$baseHttp.post(`/api/ace-data-center/model-indicators/${o.indicatorsId?"update":"save"}`,z,{header:{loading:!0}});se&&(o.indicatorsId||a("update:indicatorsId",se.data),a("update:resultTitle",z.name),s.$message({type:"success",message:"操作成功",plain:!0}),u(z,F),g())},Y=()=>{a("update:modelValue","chart")},oe=()=>{s.$baseExportExcel({title:o.title,url:"/api/ace-data-center/model-indicators/debug",header:vue.unref(D),customParams:vue.unref(B)})};return n({init:P,dynamicSearchForm:d,handlePopupForm:J,handleSubmit:Q}),(z,ee)=>{var X,ie;const le=vue.resolveComponent("aceDynamicSearch"),se=vue.resolveComponent("AppTable"),K=vue.resolveComponent("AppEmpty"),Z=vue.resolveComponent("aceDynamicList"),U=vue.resolveComponent("AppForm"),q=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1b,[vue.createElementVNode("div",_hoisted_2$$,[vue.createElementVNode("div",_hoisted_3$S,[vue.unref($).length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(le,{form:vue.unref(d),onSuccess:ee[0]||(ee[0]=H=>L())},null,8,["form"]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(N),animated:""},{default:vue.withCtx(()=>[vue.unref(D).length?(vue.openBlock(),vue.createBlock(se,{key:0,tableData:vue.unref(D),list:vue.unref(O),loading:!1,headerCellClassName:M,onSortChange:R},null,8,["tableData","list"])):(vue.openBlock(),vue.createBlock(K,{key:1,description:"暂无数据",class:"mt-4"}))]),_:1},8,["loading"])],64)):(vue.openBlock(),vue.createBlock(Z,{key:1,id:(X=vue.unref(v))==null?void 0:X.id,title:(ie=vue.unref(v))==null?void 0:ie.modelName,showPageIndex:!0},null,8,["id","title"]))]),vue.unref($).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$Q,[vue.createElementVNode("div",_hoisted_5$I,[vue.createVNode(vue.unref(elementPlus.ElTooltip),{effect:"dark",content:"保存汇总配置后可设置",placement:"top",visible:vue.unref(y)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{disabled:z.indicatorsId=="",type:"warning",style:{padding:"0 10px"},onMouseenter:ee[1]||(ee[1]=H=>{z.indicatorsId||(y.value=!0)}),onMouseleave:ee[2]||(ee[2]=H=>y.value=!1),onClick:Y},{default:vue.withCtx(()=>[vue.createTextVNode(" 图表配置 "),_hoisted_6$C]),_:1},8,["disabled"])]),_:1},8,["visible"])]),vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary"},{default:vue.withCtx(()=>[_hoisted_7$y]),_:1}),vue.createVNode(_sfc_main$1t)]),_:1}),vue.createElementVNode("div",_hoisted_8$v,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[_hoisted_9$r,vue.createTextVNode(" 显示前 "),vue.createElementVNode("div",_hoisted_10$n,[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{size:"small",style:{width:"100px"},modelValue:vue.unref(C),"onUpdate:modelValue":ee[3]||(ee[3]=H=>vue.isRef(C)?C.value=H:null),onChange:ee[4]||(ee[4]=H=>L()),min:1,max:9999999},null,8,["modelValue"])]),vue.createTextVNode(" 条聚合数据 ")]),_:1}),vue.unref(D).length?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"ml-2 cursor-pointer ri-download-2-line text-color-warning",onClick:oe})):vue.createCommentVNode("",!0)])])):vue.createCommentVNode("",!0)]),vue.createElementVNode("aside",_hoisted_11$j,[vue.createElementVNode("div",_hoisted_12$g,[vue.createVNode(modelTableSunmary,{aggArgsList:vue.unref(V),groupArgsList:vue.unref(x),modelValue:vue.unref($),"onUpdate:modelValue":ee[5]||(ee[5]=H=>vue.isRef($)?$.value=H:null),iconMap:m},null,8,["aggArgsList","groupArgsList","modelValue"]),vue.createVNode(ModelTableOtherSummary,{iconMap:m,list:vue.unref(x),modelValue:vue.unref(S),"onUpdate:modelValue":ee[6]||(ee[6]=H=>vue.isRef(S)?S.value=H:null)},null,8,["list","modelValue"]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(modelTableDimension,{loading:vue.unref(b),list:vue.unref(x),iconMap:m,calendarType:_,modelValue:vue.unref(w),"onUpdate:modelValue":ee[7]||(ee[7]=H=>vue.isRef(w)?w.value=H:null)},null,8,["loading","list","modelValue"])],512),[[vue.vShow,vue.unref($).length]])]),vue.unref($).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$d,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:J},{default:vue.withCtx(()=>[_hoisted_14$c,vue.createTextVNode(" 完 成 ")]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(q,{modelValue:vue.unref(W),"onUpdate:modelValue":ee[9]||(ee[9]=H=>vue.isRef(W)?W.value=H:null),title:"保存指标",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:Q},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:ee[8]||(ee[8]=H=>W.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(U,{form:vue.unref(F),col:1},null,8,["form"])]),_:1},8,["modelValue"])])])}}}),tableWidget_vue_vue_type_style_index_0_scoped_c1a63796_lang="",tableWidget=_export_sfc$2(_sfc_main$1r,[["__scopeId","data-v-c1a63796"]]),_withScopeId$s=i=>(vue.pushScopeId("data-v-6fadb38d"),i=i(),vue.popScopeId(),i),_hoisted_1$1a={class:"flex flex-wrap chart-container"},_hoisted_2$_=["onClick"],_hoisted_3$R=["onClick"],_hoisted_4$P=_withScopeId$s(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_5$H=[_hoisted_4$P],_hoisted_6$B={key:0,class:"success setting"},_hoisted_7$x=_withScopeId$s(()=>vue.createElementVNode("i",{class:"ml-1 ri-check-line"},null,-1)),_hoisted_8$u=[_hoisted_7$x],_hoisted_9$q={class:"label"},_sfc_main$1q=vue.defineComponent({__name:"model-chart-menu",props:{modelValue:{default:""}},emits:["click-chart-setting","update:modelValue"],setup(i,{emit:n}){vue.getCurrentInstance();const r=[{...echartsTypeList[3],key:"3"},...Object.keys(echartsTypeList).filter(u=>u!="3").map(u=>({...echartsTypeList[u],key:u}))],o=vue.inject("chartList"),a=n,l=u=>{a("update:modelValue",String(u))},s=u=>{a("update:modelValue",String(u)),a("click-chart-setting")};return(u,c)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1a,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(r,d=>{var f;return vue.createElementVNode("div",{class:"items",key:d.key,onClick:p=>l(d.key)},[vue.createElementVNode("div",{class:vue.normalizeClass(["icon",{active:u.modelValue==d.key}])},[vue.createElementVNode("i",{class:vue.normalizeClass(d.icon)},null,2),vue.createElementVNode("div",{class:"setting",onClick:vue.withModifiers(p=>s(d.key),["stop"])},_hoisted_5$H,8,_hoisted_3$R),(f=vue.unref(o))!=null&&f.some(p=>p.type==d.key)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$B,_hoisted_8$u)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("div",_hoisted_9$q,vue.toDisplayString(d.name),1)],8,_hoisted_2$_)}),64))]))}}),modelChartMenu_vue_vue_type_style_index_0_scoped_6fadb38d_lang="",modelChartMenu=_export_sfc$2(_sfc_main$1q,[["__scopeId","data-v-6fadb38d"]]),_sfc_main$1p=vue.defineComponent({__name:"model-chart-setting",props:{option:{default:{}},type:{default:""}},emits:["close"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),s=vue.ref(""),u=vue.inject("indicatorsId"),c=vue.inject("getListModelIndicators"),d=vue.inject("getChartWidgetList");vue.provide("widgetConfig",{indicatorsId:vue.unref(u)});const f=vue.computed(()=>({3:_sfc_main$1Z,2:_sfc_main$1X,1:_sfc_main$1Y,4:_sfc_main$1U,5:_sfc_main$1W,6:_sfc_main$1V,7:_sfc_main$1T,8:_sfc_main$1S,9:_sfc_main$1R,10:_sfc_main$1Q,11:_sfc_main$1P})[o.type]??null),p=vue.ref(!1),v=()=>{s.value="data",p.value=!0},g=async()=>{o.option.tooltip&&(delete o.option.tooltip.valueFormatter,delete o.option.tooltip.formatter),o.type=="9"&&delete o.option.series[2].label.formatter,await l.$baseHttp.post("/api/ace-data-center/model-indicators-echarts/save",{modelIndicatorsId:vue.unref(u),echartsType:o.type,echartsConfig:chartJsonToStringFormat({...o.option,customSeriesData:window.customSeriesData,dataset:{...o.option.dataset,source:[]}})},{headers:{loading:!0}})&&(l.$message({type:"success",message:"操作成功",plain:!0}),await d(),await c(),p.value=!1,a("close"))},m=()=>{p.value=!1};return n({init:v,handleSubmit:g}),(_,y)=>{const b=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(b,{modelValue:vue.unref(p),"onUpdate:modelValue":y[3]||(y[3]=C=>vue.isRef(p)?p.value=C:null),withHeader:!1,modal:!1,direction:"ltr",size:"350px",modalClass:"ace-modal-drawer"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:y[1]||(y[1]=C=>g())},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:y[2]||(y[2]=C=>m())},{default:vue.withCtx(()=>[vue.createTextVNode("关闭")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCollapse),{accordion:"",modelValue:vue.unref(s),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(s)?s.value=C:null)},{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(f),{key:0,option:o.option,type:_.type},null,8,["option","type"])):vue.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}}),modelChartSetting_vue_vue_type_style_index_0_scoped_c6413025_lang="",modelChartSetting=_export_sfc$2(_sfc_main$1p,[["__scopeId","data-v-c6413025"]]),_withScopeId$r=i=>(vue.pushScopeId("data-v-85f16186"),i=i(),vue.popScopeId(),i),_hoisted_1$19={class:"flex w-full h-full"},_hoisted_2$Z={class:"flex-1"},_hoisted_3$Q={key:0,class:"flex items-center justify-center pannel h-14"},_hoisted_4$O=_withScopeId$r(()=>vue.createElementVNode("i",{class:"mr-1 ri-save-line"},null,-1)),_hoisted_5$G={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_6$A={class:"relative flex flex-col flex-1 pb-3 pl-3"},_hoisted_7$w={class:"mb-2.5"},_hoisted_8$t={class:"relative flex items-center justify-center pannel h-14"},_hoisted_9$p={key:0,class:"absolute left-5 top-3"},_hoisted_10$m=_withScopeId$r(()=>vue.createElementVNode("i",{class:"ml-1 ri-settings-2-line"},null,-1)),_hoisted_11$i=_withScopeId$r(()=>vue.createElementVNode("i",{class:"ri-table-line"},null,-1)),_sfc_main$1o=vue.defineComponent({__name:"chart-widget",props:{modelValue:{default:""},dynamicSearchForm:{default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.inject("chartList"),{option:s,formatChart:u}=useCustomChart(),c=vue.ref(""),d=vue.ref(null),f=vue.ref(!1),p=()=>{if(vue.unref(c)==""){a.$message({type:"warning",message:"请选择图表",plain:!0});return}const y=setInterval(()=>{vue.unref(f)&&(vue.unref(d).init(),clearInterval(y))},20)};vue.watch(c,async y=>{var C;if(s.value={},f.value=!1,y==""){f.value=!0;return}const b=(C=vue.unref(l))==null?void 0:C.find(x=>x.type==y);await u((b==null?void 0:b.code)??"",y),f.value=!0});const v=vue.ref(!1);a.$baseEventBus.on("model-chart-click",async y=>{v.value=!0,o("update:modelValue","chart"),c.value=y.type,setTimeout(()=>{v.value=!1},100)});const g=()=>{if(vue.unref(l).length>0){vue.unref(v)||(c.value=vue.unref(l)[0].type),f.value=!0;return}c.value="3"},m=()=>{const y=c.value;c.value="",setTimeout(()=>{c.value=y},10)},_=()=>{c.value="",o("update:modelValue","table")};return n({init:g}),(y,b)=>{var w;const C=vue.resolveComponent("aceDynamicSearch"),x=vue.resolveComponent("aceCustomChart");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$19,[vue.createElementVNode("aside",null,[vue.createElementVNode("div",_hoisted_2$Z,[vue.createVNode(modelChartMenu,{modelValue:vue.unref(c),"onUpdate:modelValue":b[0]||(b[0]=V=>vue.isRef(c)?c.value=V:null),onClickChartSetting:p},null,8,["modelValue"])]),(w=vue.unref(l))!=null&&w.some(V=>V.type==vue.unref(c))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$Q,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:b[1]||(b[1]=V=>vue.unref(d).handleSubmit())},{default:vue.withCtx(()=>[_hoisted_4$O,vue.createTextVNode(" 保 存 ")]),_:1})]))]),vue.createElementVNode("div",_hoisted_5$G,[vue.createElementVNode("div",_hoisted_6$A,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:!vue.unref(f),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_7$w,[vue.createVNode(C,{form:y.dynamicSearchForm,search:!1,disabled:""},null,8,["form"])]),vue.createVNode(x,{option:vue.unref(s),chartType:vue.unref(c),isCheckClick:!1},null,8,["option","chartType"])]),_:1},8,["loading"])]),vue.createElementVNode("div",_hoisted_8$t,[vue.unref(s)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$p,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",style:{padding:"0 10px"}},{default:vue.withCtx(()=>[vue.createTextVNode("可视化")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"",style:{padding:"0 10px"},onClick:p},{default:vue.withCtx(()=>[_hoisted_10$m]),_:1})]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"",onClick:_},{default:vue.withCtx(()=>[_hoisted_11$i]),_:1}),vue.createVNode(_sfc_main$1t,{type:vue.unref(c)},null,8,["type"])]),_:1})])]),vue.unref(c)?(vue.openBlock(),vue.createBlock(modelChartSetting,{key:0,ref_key:"modelChartSettingRef",ref:d,option:vue.unref(s),type:vue.unref(c),onClose:m},null,8,["option","type"])):vue.createCommentVNode("",!0)])}}}),chartWidget_vue_vue_type_style_index_0_scoped_85f16186_lang="",chartWidget=_export_sfc$2(_sfc_main$1o,[["__scopeId","data-v-85f16186"]]),_withScopeId$q=i=>(vue.pushScopeId("data-v-51646426"),i=i(),vue.popScopeId(),i),_hoisted_1$18={class:"design"},_hoisted_2$Y={class:"design-header"},_hoisted_3$P={class:"flex-1"},_hoisted_4$N={class:"mt-2 text-xs text-color-info"},_hoisted_5$F=["innerHTML"],_hoisted_6$z={class:"flex"},_hoisted_7$v={class:"mr-2"},_hoisted_8$s=_withScopeId$q(()=>vue.createElementVNode("i",{class:"mr-1 ri-settings-2-line"},null,-1)),_hoisted_9$o=_withScopeId$q(()=>vue.createElementVNode("i",{class:"mr-1 ri-close-line"},null,-1)),_hoisted_10$l={class:"flex flex-1 p-3 overflow-hidden design-container"},_sfc_main$1n=vue.defineComponent({__name:"index",emits:["close"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.ref(!1),l=vue.ref(!1),s=vue.ref(),u=vue.ref(null),c=vue.ref(null),d=vue.ref(null),f=vue.ref([]),p=vue.ref("0个指标"),v=vue.ref(""),g=vue.ref(""),m=vue.ref([]),_=r;vue.watch(a,S=>{S||o.$baseEventBus.off("model-chart-click")}),vue.provide("indicatorsId",g);const y=vue.inject("modelEle"),b=vue.ref(""),C=async S=>{var k;let E={};s.value="table",g.value=S,m.value=[],f.value=[],vue.unref(g)&&(E=await x(),w()),a.value=!0,b.value=(k=E==null?void 0:E.data)==null?void 0:k.name,vue.nextTick(()=>{vue.unref(u).init((E==null?void 0:E.data)??{})})};vue.watch(s,S=>{S=="chart"&&vue.unref(c).init()});const x=async()=>await o.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${vue.unref(g)}`,{headers:{loading:!0}}),w=async()=>{const S=await o.$baseHttp.post(`/api/ace-data-center/model-indicators-echarts/getEchartsTypes/${vue.unref(g)}`);m.value=S.data};vue.provide("getChartWidgetList",w),vue.provide("chartList",m);const V=()=>{o.$baseConfirm({content:"是否确定关闭",callConfirm:async()=>{a.value=!1,vue.unref(g)&&_("close")}})},$=S=>{f.value=S,vue.unref(u).dynamicSearchForm=S,vue.unref(u).handleSubmit()};return n({init:C}),(S,E)=>{const k=vue.resolveComponent("aceHeader"),P=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(P,{modelValue:vue.unref(a),"onUpdate:modelValue":E[11]||(E[11]=T=>vue.isRef(a)?a.value=T:null),withHeader:!1,size:"100%",modalClass:"ace-modal-drawer"},{default:vue.withCtx(()=>{var T,B;return[vue.createElementVNode("div",_hoisted_1$18,[vue.createElementVNode("div",_hoisted_2$Y,[vue.createElementVNode("div",_hoisted_3$P,[vue.createVNode(k,{title:vue.unref(s)=="table"?vue.unref(p):`${vue.unref(b)}【${vue.unref(p)}】`},vue.createSlots({_:2},[vue.unref(m).length?{name:"left",fn:vue.withCtx(()=>[vue.createElementVNode("i",{onClick:E[0]||(E[0]=N=>vue.unref(u).handlePopupForm()),class:"ml-2 text-base cursor-pointer ri-edit-box-line text-color-primary"})]),key:"0"}:void 0]),1032,["title"]),vue.createElementVNode("div",_hoisted_4$N,[vue.createTextVNode(" 模型数据 / "+vue.toDisplayString((T=vue.unref(y))==null?void 0:T.modelName)+" ["+vue.toDisplayString((B=vue.unref(y))==null?void 0:B.modelCode)+"] ",1),vue.createElementVNode("span",{class:"ml-2",innerHTML:vue.unref(v)},null,8,_hoisted_5$F)])]),vue.createElementVNode("div",_hoisted_6$z,[vue.withDirectives(vue.createElementVNode("div",_hoisted_7$v,[vue.createVNode(vue.unref(elementPlus.ElPopover),{placement:"bottom",visible:vue.unref(l),"onUpdate:visible":E[2]||(E[2]=N=>vue.isRef(l)?l.value=N:null),trigger:"click",width:"900px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"warning"},{default:vue.withCtx(()=>[_hoisted_8$s,vue.createTextVNode(" 筛选配置 ")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(aceIndicatorCustomSearch,{ref_key:"customSearchRef",ref:d,customSearchVisible:vue.unref(l),"onUpdate:customSearchVisible":E[1]||(E[1]=N=>vue.isRef(l)?l.value=N:null),onDynamicSearchFormUpdate:$,dynamicSearchForm:vue.unref(f)},null,8,["customSearchVisible","dynamicSearchForm"])]),_:1},8,["visible"])],512),[[vue.vShow,vue.unref(s)=="table"&&vue.unref(p)!="0个指标:"]]),vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:V},{default:vue.withCtx(()=>[_hoisted_9$o,vue.createTextVNode(" 关闭 ")]),_:1})])]),vue.createElementVNode("div",_hoisted_10$l,[vue.withDirectives(vue.createVNode(tableWidget,{ref_key:"tableWidgetRef",ref:u,modelValue:vue.unref(s),"onUpdate:modelValue":E[3]||(E[3]=N=>vue.isRef(s)?s.value=N:null),indicatorsId:vue.unref(g),"onUpdate:indicatorsId":E[4]||(E[4]=N=>vue.isRef(g)?g.value=N:null),title:vue.unref(p),"onUpdate:title":E[5]||(E[5]=N=>vue.isRef(p)?p.value=N:null),resultTitle:vue.unref(b),"onUpdate:resultTitle":E[6]||(E[6]=N=>vue.isRef(b)?b.value=N:null),sortHtml:vue.unref(v),"onUpdate:sortHtml":E[7]||(E[7]=N=>vue.isRef(v)?v.value=N:null),dynamicSearchForm:vue.unref(f),"onUpdate:dynamicSearchForm":E[8]||(E[8]=N=>vue.isRef(f)?f.value=N:null)},null,8,["modelValue","indicatorsId","title","resultTitle","sortHtml","dynamicSearchForm"]),[[vue.vShow,vue.unref(s)=="table"]]),vue.withDirectives(vue.createVNode(chartWidget,{ref_key:"chartWidgetRef",ref:c,dynamicSearchForm:vue.unref(f),"onUpdate:dynamicSearchForm":E[9]||(E[9]=N=>vue.isRef(f)?f.value=N:null),modelValue:vue.unref(s),"onUpdate:modelValue":E[10]||(E[10]=N=>vue.isRef(s)?s.value=N:null)},null,8,["dynamicSearchForm","modelValue"]),[[vue.vShow,vue.unref(s)=="chart"]])])])]}),_:1},8,["modelValue"])}}}),index_vue_vue_type_style_index_0_scoped_51646426_lang="",aceIndicatorDesign=_export_sfc$2(_sfc_main$1n,[["__scopeId","data-v-51646426"]]),_hoisted_1$17={class:"flex items-center"},_hoisted_2$X=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_3$O={class:"mt-3"},_hoisted_4$M={class:"flex items-center w-full overflow-hidden"},_hoisted_5$E={class:"overflow-hidden text-ellipsis whitespace-nowrap"},_hoisted_6$y={key:0,class:"mr-1 text-base ri-checkbox-circle-fill text-color-success"},_hoisted_7$u={key:1,class:"mr-1 text-base ri-progress-1-fill text-color-warning"},_hoisted_8$r={key:0,class:"flex items-center justify-end flex-1"},_sfc_main$1m=vue.defineComponent({__name:"menu",props:{tempId:{default:""}},emits:["node-click"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(null),u=vue.ref(null),c=r;vue.watch(l,g=>{vue.unref(u).filter(g)});const d=(g,m)=>g?m.name.includes(g):!0,f=vue.ref(!1),p=()=>{s.value=[],f.value=!0,fetch$1(a).loadIndicatorsMenu().then(g=>{s.value=Object.keys(g.data).map(_=>({name:_,id:_,children:g.data[_]}));let m;f.value=!1,vue.unref(s).length&&vue.nextTick(()=>{var _;o.tempId?m=vue.unref(u).getNode(o.tempId):m=vue.unref(u).getNode((_=vue.unref(s)[0].children[0])==null?void 0:_.id),m&&(v(m==null?void 0:m.data),vue.unref(u).setCurrentKey(m==null?void 0:m.data.id))})})};p();const v=g=>{Array.isArray(g.children)||c("node-click",g)};return n({init:p}),(g,m)=>{const _=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$17,[vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(l),"onUpdate:modelValue":m[0]||(m[0]=y=>vue.isRef(l)?l.value=y:null)},{prefix:vue.withCtx(()=>[_hoisted_2$X]),_:1},8,["modelValue"]),vue.renderSlot(g.$slots,"search")]),vue.createElementVNode("div",_hoisted_3$O,[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:"",count:2})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTree),{key:1,class:"animated fadeIn",ref_key:"treeRef",ref:u,data:vue.unref(s),"empty-text":"暂无数据","node-key":"id","default-expand-all":"",indent:0,"highlight-current":"","filter-node-method":d,onNodeClick:v},{default:vue.withCtx(({node:y,data:b})=>[vue.createElementVNode("div",_hoisted_4$M,[vue.createElementVNode("div",_hoisted_5$E,[Array.isArray(b.children)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b.normal?(vue.openBlock(),vue.createElementBlock("i",_hoisted_6$y)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_7$u))],64)),vue.createElementVNode("span",{class:vue.normalizeClass(["flex-1 overflow-hidden whitespace-nowrap text-ellipsis",{"font-bold":y.level==1}])},vue.toDisplayString(b.name),3)]),Array.isArray(b.children)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$r,[vue.renderSlot(g.$slots,"menu-item",{data:b})]))])]),empty:vue.withCtx(()=>[vue.createVNode(_,{description:"暂无数据"})]),_:3},8,["data"]))])],64)}}}),_hoisted_1$16={class:"rule-list"},_hoisted_2$W={key:0,class:"flex items-center"},_hoisted_3$N=vue.createElementVNode("i",{class:"ri-error-warning-fill text-2xl text-color-warning mr-2"},null,-1),_hoisted_4$L={key:1,class:"flex items-center"},_hoisted_5$D=vue.createElementVNode("i",{class:"ri-checkbox-circle-fill text-2xl text-color-success mr-2"},null,-1),_sfc_main$1l=vue.defineComponent({__name:"rule",props:{ruleList:{default:()=>[]}},setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(!1),o=vue.ref(""),a=vue.ref([]),l=c=>{o.value=`/api/ace-data-center/rule/ruleDataView?ruleId=${c}`,r.value=!0},s=c=>{vue.unref(a).length==0&&Object.keys(c.data[0]).forEach(d=>{if(d==="pageIndex"){a.value.unshift({label:"序号",prop:"pageIndex",width:"80px"});return}a.value.push({label:d,prop:d})})},u=()=>{n.$baseExportExcel({title:"数据列表",url:vue.unref(o),method:"get",header:vue.unref(a)})};return(c,d)=>{const f=vue.resolveComponent("aceHeader"),p=vue.resolveComponent("AppList"),v=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$16,[c.ruleList.length>0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(f,{title:"智能诊断",class:"mb-5"}),vue.createVNode(vue.unref(elementPlus.ElAlert),{type:"warning",closable:!1},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.ruleList,g=>(vue.openBlock(),vue.createElementBlock("div",{key:g.id,class:"mt-0 text-sm"},[+g.rows>0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$W,[_hoisted_3$N,vue.createTextVNode(" "+vue.toDisplayString(g.ruleName)+" 【异常数据"+vue.toDisplayString(g.rows>99?"99+":g.rows)+"】 ",1),vue.createVNode(vue.unref(elementPlus.ElLink),{class:"ml-2",type:"primary",onClick:m=>l(g.id)},{default:vue.withCtx(()=>[vue.createTextVNode("查看明细")]),_:2},1032,["onClick"])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$L,[_hoisted_5$D,vue.createTextVNode(" "+vue.toDisplayString(g.ruleName)+" 【未检测到异常数据】 ",1)]))]))),128))]),_:1})],64)):vue.createCommentVNode("",!0)]),vue.createVNode(v,{modelValue:vue.unref(r),"onUpdate:modelValue":d[1]||(d[1]=g=>vue.isRef(r)?r.value=g:null),title:"数据列表"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",onClick:u},{default:vue.withCtx(()=>[vue.createTextVNode("导 出")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:d[0]||(d[0]=g=>r.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("关 闭")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(p,{tableData:vue.unref(a),url:vue.unref(o),onSuccess:s},null,8,["tableData","url"])]),_:1},8,["modelValue"])],64)}}}),_hoisted_1$15={key:1,class:"animated fadeIn"},_hoisted_2$V={class:"flex items-center mt-5 mb-5 ml-2 moudle-1"},_hoisted_3$M={key:0,class:"mr-1 text-xl ri-error-warning-fill text-color-warning"},_hoisted_4$K={key:1,class:"mr-1 text-xl ri-checkbox-circle-fill text-color-success"},_hoisted_5$C={class:"ml-1"},_hoisted_6$x={class:"flex items-center select-type"},_hoisted_7$t=["onClick"],_hoisted_8$q={class:"mt-5 mb-5"},_hoisted_9$n={class:"mt-4"},_sfc_main$1k=vue.defineComponent({__name:"analysis",props:{indicatorsId:{default:""}},emits:["rule-success"],setup(i,{emit:n}){const r=i;vue.watch(()=>r.indicatorsId,()=>p());const o=n,{proxy:a}=vue.getCurrentInstance(),{dynamicSearchForm:l,dynamicSearchFormat:s,dynamicSearchParams:u}=a.$aceDynamicSearch(a),c=vue.ref(!0),d=vue.ref([]),f=vue.ref(null),p=async()=>{var w,V,$;c.value=!0,l.value=[],_.value={type:"",value:""},v.value=[],g.value="",C();const x=await fetch$1(a).detailAndTask(r.indicatorsId);f.value=x.data,(V=(w=x.data)==null?void 0:w.echartsDataVO)!=null&&V.config&&m(),($=x==null?void 0:x.data)!=null&&$.formConfJson&&(l.value=s(JSON.parse(x==null?void 0:x.data.formConfJson))),c.value=!1},v=vue.ref([]),g=vue.ref(""),m=async()=>{var w;v.value=[],g.value="";const x=await fetch$1(a).getEchartDetail({indicatorsId:r.indicatorsId});x&&(Object.keys(((w=x.data)==null?void 0:w.clientEchartsType)??{}).forEach(V=>{var $;Object.values(($=x.data)==null?void 0:$.clientEchartsType[V]).forEach(S=>{var E,k;v.value.push({client:V,label:(E=echartsTypeList[S])==null?void 0:E.name,icon:(k=echartsTypeList[S])==null?void 0:k.icon,value:`${V}_${S}`})})}),vue.unref(v).length>0&&(g.value=vue.unref(v)[0].value,b(vue.unref(g))))},_=vue.ref({type:"",value:""}),y=vue.ref(!1),b=async(x,w=!1)=>{var E;g.value=x,w&&(y.value=!0);const V=u(vue.unref(l)),$=x.split("_"),S=await fetch$1(a).pullEchartsDataVO({indicatorsId:r.indicatorsId,loadType:((E=vue.unref(f))==null?void 0:E.loadType)??3,params:V,targetClient:$[0],echartsType:$[1]});if(S){y.value=!1,vue.unref(_).type=$[1];try{vue.unref(_).value=chartJsonFormat(S.data.config)}catch{vue.unref(_).value=S.data.config}}},C=async()=>{var w;d.value=[];const x=await fetch$1(a).getRule({current:1,size:100,businessType:"indicators",businessId:r.indicatorsId});d.value=((w=x.data)==null?void 0:w.records)??[],o("rule-success",d.value)};return p(),(x,w)=>{const V=vue.resolveComponent("AppResourceVisitor"),$=vue.resolveComponent("aceHeader"),S=vue.resolveComponent("aceDynamicSearch"),E=vue.resolveComponent("aceChart");return vue.unref(c)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:""})):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$15,[vue.createVNode($,{title:"指标计算"},{default:vue.withCtx(()=>[vue.createVNode(V,{businessType:"INDICATORS",businessld:r.indicatorsId},null,8,["businessld"])]),_:1}),vue.createElementVNode("div",_hoisted_2$V,[vue.unref(d).some(k=>k.rows>0)?(vue.openBlock(),vue.createElementBlock("i",_hoisted_3$M)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_4$K)),vue.createElementVNode("span",_hoisted_5$C,vue.toDisplayString(vue.unref(f).remark),1)]),vue.createVNode($,{title:"指标数据"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_6$x,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),k=>(vue.openBlock(),vue.createElementBlock("span",{onClick:P=>b(k.value,!0),class:vue.normalizeClass(["flex items-center cursor-pointer",[k.value==vue.unref(g)?"text-color-primary":"text-gray-600"]]),key:k.value},[vue.createElementVNode("i",{class:vue.normalizeClass([k.icon,"mr-1"])},null,2),vue.createTextVNode(" "+vue.toDisplayString(k.label),1)],10,_hoisted_7$t))),128))])]),_:1}),vue.createElementVNode("div",_hoisted_8$q,[vue.unref(l).length>0?(vue.openBlock(),vue.createBlock(S,{key:0,form:vue.unref(l),onSuccess:w[0]||(w[0]=k=>b(vue.unref(g),!0)),class:"mb-0"},null,8,["form"])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9$n,[vue.createVNode(E,{type:vue.unref(_).type,options:vue.unref(_).value,loading:vue.unref(y)},null,8,["type","options","loading"])])]),vue.createVNode(_sfc_main$1l,{ruleList:vue.unref(d)},null,8,["ruleList"])]))}}}),analysis_vue_vue_type_style_index_0_scoped_bf2d49fa_lang="",aceIndicatorSystemPreview=_export_sfc$2(_sfc_main$1k,[["__scopeId","data-v-bf2d49fa"]]),_hoisted_1$14={class:"h-full"},_sfc_main$1j=vue.defineComponent({__name:"relation",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(!0),a=["#00ADD0","#FFA12F","#B62AFF","#604BFF","#6E35FF","#002AFF","#20C0F4","#95F300","#04FDB8","#AF5AFF"],l=(s,u,c="#00f6ff")=>s.map((d,f)=>{switch(d&&d.title&&(d.name=d.title),u==1&&(c=a.find((p,v)=>v==f%10)),(u===0||u===1)&&(d.label={position:"inside"}),u){case 0:d.symbolSize=70;break;case 1:d.symbolSize=50;break;default:d.symbolSize=10;break}return d.lineStyle={color:c},d.children?(d.itemStyle={borderColor:c,color:c},d.children=l(d.children,u+1,c)):d.itemStyle={color:"transparent",borderColor:c},d});return fetch$1(n).indicatorsRelationTree().then(s=>{if(o.value=!1,!s.data.length){r.value={};return}r.value={type:"tree",toolbox:{show:!0,iconStyle:{borderColor:"#03ceda"},feature:{restore:{}}},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"rgba(0,0,0,.8)",borderWidth:.5,textStyle:{fontSize:10,color:"#fff"}},series:[{type:"tree",hoverAnimation:!0,data:l([s==null?void 0:s.data[0]],0),top:10,bottom:10,left:10,right:10,layout:"radial",symbol:"circle",symbolSize:10,nodePadding:20,animationDurationUpdate:750,expandAndCollapse:!0,initialTreeDepth:2,roam:!0,focusNodeAdjacency:!0,itemStyle:{borderWidth:1},label:{color:"#000",fontSize:10,fontFamily:"SourceHanSansCN",position:"inside",rotate:0},lineStyle:{width:1,curveness:.5}}]}}),(s,u)=>{const c=vue.resolveComponent("v-chart");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",_hoisted_1$14,[vue.createVNode(c,{option:vue.unref(r),autoresize:""},null,8,["option"])])),[[vue.unref(elementPlus.vLoading),vue.unref(o)]])}}}),_hoisted_1$13={key:0,class:"flex items-center gap-x-2.5"},_hoisted_2$U=vue.createElementVNode("div",{class:"font-bold"},"数据分析",-1),_sfc_main$1i=vue.defineComponent({__name:"yoy",props:{search:{default:()=>[]},originSearch:{default:()=>[]},chartType:{default:""},option:{default:null},chartData:{default:null}},setup(i,{expose:n}){const r=i,{proxy:o}=vue.getCurrentInstance(),{dynamicSearchForm:a,dynamicSearchFormat:l,dynamicSearchParams:s}=o.$aceDynamicSearch(o),u=["yySingle","yymmSingle","yymmddSingle"],{seriesItem:c}=useLineCommon(),d=vue.computed(()=>r.search.find(m=>u.includes(m.type))),f=vue.computed(()=>{const m=vue.unref(d)?Object.values(s([vue.unref(d)])).every(_=>_==""):!1;return r.search.filter(_=>u.includes(_.type)).length==1&&!m}),p=vue.ref("");vue.watch(p,()=>v());const v=async()=>{var B;if(!vue.unref(f)||vue.unref(p)=="")return;const m=JSON.parse(JSON.stringify((B=r.chartData)==null?void 0:B.params)),_=JSON.parse(JSON.stringify(r.search)),y=_.find(N=>u.includes(N.type)),b=r.originSearch.find(N=>u.includes(N.type)),x=JSON.parse((m==null?void 0:m.groupArgsJson)??"[]").find(N=>N.comment==r.option.dataShow.x);m.groupArgsJson=JSON.stringify([x]);const w=x.dateFormatType;switch(y.type){case"yymmSingle":y.value=dayjs(y.value).subtract(1,vue.unref(p)=="TB"?"year":"month").format("YYYY-MM");break;case"yymmddSingle":y.value=dayjs(y.value).subtract(1,vue.unref(p)=="TB"?"year":"day").format("YYYY-MM-DD");break;case"yySingle":y.value=dayjs(y.value).subtract(1,"year").format("YYYY");break}m.params=s(_);const $=r.option.dataset.dimensions;$.length>=3&&r.option.dataset.dimensions.pop();const S=await o.$baseHttp.post("/api/ace-data-center/model-indicators/debug",m),E=$[0],k=r.option.dataShow.y.filter(N=>!r.option.dataShow.hide.includes(N));vue.unref(y.type).includes("Range")?(r.option.dataset.dimensions[1]=`${b!=null&&b.minValue?`${b==null?void 0:b.minValue}~`:""}${(b==null?void 0:b.maxValue)??""}${k}`,r.option.dataset.dimensions.push(`${y.minValue?`${y.minValue}~`:""}${(y==null?void 0:y.maxValue)??""}${k}`)):(r.option.dataset.dimensions[1]=`${b==null?void 0:b.value}${k}`,r.option.dataset.dimensions[2]=`${y.value}${k}`,r.option.dataset.dimensions[3]="增长率");const P=r.option.series[0];r.option.series=[],S.data.records.forEach(N=>{g(N,E,w)});const T=JSON.parse(JSON.stringify(r.option.dataset.temp_source));T.forEach((N,O)=>{g(N,E,w);let D=null;N[r.option.dataset.dimensions[1]]=N[k],w?(D=S.data.records.find(j=>j[E]==N[E]),D||(["year"].includes(w)&&(D=S.data.records.find(j=>j[E].indexOf(y.value)>=0),N[E]=E),["day","month"].includes(w)&&(D=S.data.records.find(j=>j[E].split("-").at(-1)==N[E].split("-").at(-1))))):D=S.data.records.find(j=>j[E]==N[E]),D||(D={[k]:0}),D&&(N[r.option.dataset.dimensions[2]]=D[k]);const L=N[r.option.dataset.dimensions[1]]??0,I=N[r.option.dataset.dimensions[2]]??0;N.增长率=!L||!I?0:((L-I)/I*100).toFixed(2)}),r.option.dataset.source=T,setTimeout(()=>{const{yAxis:N,xAxis:O}=r.option;let D="yAxis";!Array.isArray(N)&&N.type!="value"&&(D="xAxis"),r.option.series=[P,{...P,itemStyle:{...(P==null?void 0:P.itemStyle)??{},color:null}},{...c,name:"增长率",[`${D}Index`]:1}],r.option[D]=[Array.isArray(r.option[D])?r.option[D][0]:r.option[D],{type:"value",name:"增长率",nameGap:20,splitLine:!1,nameLocation:D=="xAxis"?"start":"end"}]})},g=(m,_,y)=>{if(!(!y||(m[_]??"")=="")&&["day"].includes(y)){const b=m[_].split("-").filter((C,x)=>x==0?"":C);m[_]=b.join("-")}};return n({init:v,type:p}),(m,_)=>vue.unref(f)&&m.option?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$13,[_hoisted_2$U,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(p),"onUpdate:modelValue":_[0]||(_[0]=y=>vue.isRef(p)?p.value=y:null)},{default:vue.withCtx(()=>{var y;return[vue.createVNode(vue.unref(elementPlus.ElRadio),{label:"TB",value:"TB"},{default:vue.withCtx(()=>[vue.createTextVNode("同比")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{label:"HB",value:"HB",disabled:!["yymmSingle","yymmddSingle"].includes((y=vue.unref(d))==null?void 0:y.type)},{default:vue.withCtx(()=>[vue.createTextVNode(" 环比 ")]),_:1},8,["disabled"])]}),_:1},8,["modelValue"])])])):vue.createCommentVNode("",!0)}}),_withScopeId$p=i=>(vue.pushScopeId("data-v-4187957a"),i=i(),vue.popScopeId(),i),_hoisted_1$12={key:2,class:"flex flex-col chart-preview"},_hoisted_2$T={class:"flex mb-2.5"},_hoisted_3$L={key:0,class:"flex-1"},_hoisted_4$J={class:"flex items-center gap-x-2.5"},_hoisted_5$B=_withScopeId$p(()=>vue.createElementVNode("div",{class:"font-bold"},"计算指标",-1)),_hoisted_6$w={key:0,class:"flex items-center gap-x-2.5"},_hoisted_7$s=_withScopeId$p(()=>vue.createElementVNode("div",{class:"font-bold"},"分组维度",-1)),_hoisted_8$p={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_9$m={class:"relative flex-1"},_hoisted_10$k={class:"flex justify-center change-btns"},_sfc_main$1h=vue.defineComponent({__name:"IndicatorsView",props:{dynamicSearchForm:{default:()=>[]},result:{default:()=>{}},chartData:{default:null}},emits:["search-success"],setup(i,{emit:n}){const r=i,o=n,{proxy:a}=vue.getCurrentInstance(),{dynamicSearchForm:l,dynamicSearchFormat:s,dynamicSearchParams:u}=a.$aceDynamicSearch(a),c=vue.computed(()=>r.chartData),d=vue.ref(null),f=vue.ref(""),p=vue.ref([]),v=vue.ref(r.dynamicSearchForm),g=vue.ref(!1),{option:m,formatChart:_,chartType:y,setChartData:b,changeChartSeries:C,chartDataParams:x}=useCustomChart(),w={day:"按日",week:"按周",month:"按月",quarter:"按季度",year:"按年","":"按时分秒"};vue.onMounted(async()=>{await a.$baseHttp.post(`/api/ace-data-center/model-indicators-echarts/getEchartsTypes/${r.result.id}`).then(P=>{p.value=P.data,P.data.length&&(f.value=P.data[0].code,y.value=P.data[0].type)})}),vue.watch(f,async()=>{E()});const V=P=>{f.value!=P.code&&(m.value={},y.value=P.type,f.value=P.code,vue.unref(d)&&(vue.unref(d).type=""))},$=vue.ref(""),S=vue.ref(""),E=async()=>{var P,T,B,N,O,D,L;v.value=JSON.parse(JSON.stringify(r.dynamicSearchForm)),g.value=!0,m.value={},$.value="",S.value=["2","11"].includes(vue.unref(y))?"":[],r.chartData&&(x.value=r.chartData),await _(vue.unref(f)),$.value=(T=(P=vue.unref(m))==null?void 0:P.dataShow)==null?void 0:T.x,Array.isArray((N=(B=vue.unref(m))==null?void 0:B.dataShow)==null?void 0:N.y)?S.value=(O=vue.unref(m))==null?void 0:O.dataShow.y.filter(I=>{var j;return!(((j=vue.unref(m))==null?void 0:j.dataShow.hide)??[]).includes(I)}):S.value=(L=(D=vue.unref(m))==null?void 0:D.dataShow)==null?void 0:L.y,isMobile&&["1","3","5"].includes(vue.unref(y))&&!vue.unref(m).dataZoom&&(m.value.grid.bottom="10%",m.value.dataZoom=[{type:"slider",backgroundColor:"#eef8fd",fillerColor:"#14b1f8",borderColor:"#eef8fd",startValue:0,endValue:3,filterMode:"",showDetail:!1,width:"90%",height:10,handleSize:30,left:"5%",bottom:25},{type:"inside",zoomOnMouseWheel:!1,moveOnMouseWheel:!0,moveOnMouseMove:!0}]),setTimeout(()=>{g.value=!1},10)};vue.watch([$,S],async([P,T],[B,N])=>{var O;vue.unref(g)||(vue.unref(m).dataShow.x=P,vue.unref(m).dataShow.y=T,Array.isArray(T)&&(vue.unref(m).dataShow.hide=(O=vue.unref(m))==null?void 0:O.dataShow.y.filter(D=>vue.unref(c).y.includes(D.showLabel))),(P!=B||["2","7"].includes(vue.unref(y)))&&(m.value.dataset.source=await b(vue.unref(y),P,["2","7"].includes(vue.unref(y))?T:null),m.value.dataset.temp_source=JSON.parse(JSON.stringify(m.value.dataset.source)),v.value=JSON.parse(JSON.stringify(r.dynamicSearchForm)),vue.unref(d)&&(vue.unref(d).type="")),["xAxis","yAxis"].forEach(D=>{Array.isArray(m.value[D])&&(m.value[D]=m.value[D].filter(L=>L.name!="增长率"))}),C())},{deep:!0});const k=()=>{vue.unref(c).params.params=u(r.dynamicSearchForm),E(),o("search-success",vue.unref(c).params.params)};return(P,T)=>{var D;const B=vue.resolveComponent("aceDynamicSearch"),N=vue.resolveComponent("AppEmpty"),O=vue.resolveComponent("aceCustomChart");return vue.openBlock(),vue.createElementBlock("div",null,[r.dynamicSearchForm.length?(vue.openBlock(),vue.createBlock(B,{key:0,form:r.dynamicSearchForm,onSuccess:k},null,8,["form"])):vue.createCommentVNode("",!0),vue.unref(p).length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$12,[vue.createElementVNode("div",_hoisted_2$T,[["9"].includes(vue.unref(y))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$L,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:!((D=vue.unref(m))!=null&&D.dataShow),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$J,[_hoisted_5$B,vue.createElementVNode("div",null,[["2","11"].includes(vue.unref(y))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadioGroup),{key:0,modelValue:vue.unref(S),"onUpdate:modelValue":T[0]||(T[0]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList((((L=vue.unref(c))==null?void 0:L.y)??[]).filter(I=>I.aggType!="other"),I=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadio),{key:I.showLabel,label:I.showLabel,value:I.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])):["8"].includes(vue.unref(y))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckboxGroup),{key:1,modelValue:vue.unref(S),"onUpdate:modelValue":T[1]||(T[1]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L,I;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList([...((L=vue.unref(c))==null?void 0:L.y)??[],...(((I=vue.unref(c))==null?void 0:I.x)??[]).map(j=>({...j,showLabel:j.comment}))],j=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:j.showLabel,label:j.showLabel,value:j.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckboxGroup),{key:2,modelValue:vue.unref(S),"onUpdate:modelValue":T[2]||(T[2]=L=>vue.isRef(S)?S.value=L:null)},{default:vue.withCtx(()=>{var L;return[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList((((L=vue.unref(c))==null?void 0:L.y)??[]).filter(I=>I.aggType!="other"),I=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:I.showLabel,label:I.showLabel,value:I.showLabel},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"]))])]),["8"].includes(vue.unref(y))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$w,[_hoisted_7$s,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref($),"onUpdate:modelValue":T[3]||(T[3]=L=>vue.isRef($)?$.value=L:null)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c).x,L=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadio),{key:L.comment,label:L.comment,value:L.comment},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(L.comment)+" ",1),w[L.dateFormatType]?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(" ("+vue.toDisplayString(w[L.dateFormatType])+") ",1)],64)):vue.createCommentVNode("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])])),["3","1"].includes(vue.unref(y))&&vue.unref(m).dataShow.y.filter(L=>!vue.unref(m).dataShow.hide.includes(L)).length==1?(vue.openBlock(),vue.createBlock(_sfc_main$1i,{key:1,ref_key:"yoyRef",ref:d,chartData:P.chartData,option:vue.unref(m),search:vue.unref(v),originSearch:r.dynamicSearchForm,chartType:vue.unref(y)},null,8,["chartData","option","search","originSearch","chartType"])):vue.createCommentVNode("",!0)]),_:1},8,["loading"])]))]),vue.createElementVNode("div",_hoisted_8$p,[vue.createElementVNode("div",_hoisted_9$m,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(g),animated:""},{default:vue.withCtx(()=>{var L,I;return[vue.createVNode(O,{option:vue.unref(m),chartType:vue.unref(y),indicatorsId:r.result.id,params:((I=(L=vue.unref(x))==null?void 0:L.params)==null?void 0:I.params)??{}},null,8,["option","chartType","indicatorsId","params"])]}),_:1},8,["loading"])]),vue.createElementVNode("div",_hoisted_10$k,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),L=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(f)==L.code?"primary":"",key:L.type,onClick:I=>V(L)},{default:vue.withCtx(()=>{var I;return[vue.createElementVNode("i",{class:vue.normalizeClass((I=vue.unref(echartsTypeList)[L.type])==null?void 0:I.icon)},null,2)]}),_:2},1032,["type","onClick"]))),128))]),_:1})])])])):(vue.openBlock(),vue.createBlock(N,{key:1,description:"暂无数据"}))])}}}),IndicatorsView_vue_vue_type_style_index_0_scoped_4187957a_lang="",IndicatorsView=_export_sfc$2(_sfc_main$1h,[["__scopeId","data-v-4187957a"]]),_hoisted_1$11=["hidden"],_hoisted_2$S={class:"flex items-center w-full mb-4"},_hoisted_3$K={class:"flex justify-end flex-1"},_hoisted_4$I={class:"mb-4"},_hoisted_5$A={class:"flex mb-5 moudle-1"},_hoisted_6$v={class:"flex-1"},_hoisted_7$r={class:"flex items-center mt-2"},_hoisted_8$o={key:0,class:"mr-1 text-xl ri-error-warning-fill text-color-warning"},_hoisted_9$l={key:1,class:"mr-1 text-xl ri-checkbox-circle-fill text-color-success"},_hoisted_10$j={class:"ml-1"},_hoisted_11$h=vue.createElementVNode("div",{class:"w-10"},null,-1),_hoisted_12$f={class:"flex-1"},_hoisted_13$c={class:"items-center mt-2"},_hoisted_14$b=vue.createElementVNode("i",{class:"mr-1 text-xl ri-database-2-fill text-color-primary"},null,-1),_hoisted_15$5={key:1,class:"w-full"},_sfc_main$1g=vue.defineComponent({__name:"modelIndicators",props:{indicatorsId:{default:""},modelIndicatorsRules:{default:()=>[]}},emits:["click-design","rule-success"],setup(i,{expose:n,emit:r}){const o=i,a=r;vue.watch(()=>o.indicatorsId,()=>w());const{proxy:l}=vue.getCurrentInstance(),{dynamicSearchForm:s,dynamicSearchFormat:u,dynamicSearchParams:c}=l.$aceDynamicSearch(l),d=vue.ref(!0),f=vue.ref("basic"),p=vue.ref(!1),v=vue.ref(!1),g=vue.ref([]),m=vue.ref({}),_=vue.ref(null),y=vue.ref([]),b=vue.ref([]),C=vue.ref({}),x=({column:j})=>{vue.unref(C)[j.property]&&(j.order=vue.unref(C)[j.property])},w=async()=>{d.value=!0,f.value="basic",m.value={},k();const j=await l.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${o.indicatorsId}`);_.value=j.data,d.value=!1,C.value=JSON.parse(j.data.sortArgsJson??"{}"),s.value=u(JSON.parse(j.data.formConfJson??"[]")),S()},V=vue.ref(!1),$=vue.ref(!1),S=async(j="")=>{var W,J,Q,Y,oe,z,ee,le,se;j!="sort"&&(b.value=[],V.value=!0),$.value=!0;const M=Object.keys(vue.unref(C)).map(K=>({field:K,type:vue.unref(C)[K]=="ascending"?"asc":"desc"})),R={aggArgsJson:(W=vue.unref(_))==null?void 0:W.aggArgsJson,groupArgsJson:(J=vue.unref(_))==null?void 0:J.groupArgsJson,sortArgsJson:JSON.stringify(M),params:vue.unref(O)??c(u(JSON.parse(((Q=vue.unref(_))==null?void 0:Q.formConfJson)??"[]"))),modelIndicatorsId:(Y=vue.unref(_))==null?void 0:Y.id,pageSize:(oe=vue.unref(_))==null?void 0:oe.pageSize,modelId:(z=vue.unref(_))==null?void 0:z.modelId},F=await l.$baseHttp.post("/api/ace-data-center/model-indicators/debug",R);F&&(y.value=((ee=F.data)==null?void 0:ee.records)??[],V.value=!1,$.value=!1,m.value={x:JSON.parse((le=vue.unref(_))==null?void 0:le.groupArgsJson),y:JSON.parse((se=vue.unref(_))==null?void 0:se.aggArgsJson),params:R},vue.unref(y).length&&j!="sort"&&(Object.keys(vue.unref(y)[0]).forEach(K=>{b.value.push({label:K,prop:K,sortable:"custom"})}),b.value.push({label:"操作",prop:"button",width:"120px",fixed:"right",slot:!0})))},E=j=>{const{prop:M,order:R}=j;!R||vue.unref(C)[M]===R?delete vue.unref(C)[M]:vue.unref(C)[M]=R,S("sort")},k=async()=>{var M;g.value=[];const j=await fetch$1(l).getRule({current:1,size:100,businessType:"indicators",businessId:o.indicatorsId});g.value=((M=j.data)==null?void 0:M.records)??[],a("rule-success",g.value)},P=vue.ref(null),T=j=>{P.value=j,p.value=!0},B=j=>(j.modelIndicatorsId=vue.unref(_).id,j.row=vue.unref(P),j),N=()=>{v.value=!0},O=vue.ref(null),D=j=>{O.value=j,S()};vue.watch(p,j=>I(j)),vue.watch(v,j=>I(j));const L=vue.ref(!1),I=j=>{self!=top&&(L.value=j,window.parent.postMessage(j?"model-indicators-open":"model-indicators-close","*"))};return w(),n({init:w,result:_}),(j,M)=>{const R=vue.resolveComponent("AppResourceVisitor"),F=vue.resolveComponent("aceHeader"),W=vue.resolveComponent("AppTable"),J=vue.resolveComponent("AppEmpty"),Q=vue.resolveComponent("aceDynamicList"),Y=vue.resolveComponent("AppDrawer");return vue.unref(d)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:""})):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"animated fadeIn",hidden:vue.unref(L)},[vue.createElementVNode("div",_hoisted_2$S,[vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:M[0]||(M[0]=oe=>f.value="basic"),type:vue.unref(f)=="basic"?"primary":""},{default:vue.withCtx(()=>[vue.createTextVNode(" 指标图表 ")]),_:1},8,["type"]),vue.createVNode(vue.unref(elementPlus.ElButton),{onClick:M[1]||(M[1]=oe=>f.value="data"),type:vue.unref(f)=="data"?"primary":""},{default:vue.withCtx(()=>[vue.createTextVNode(" 指标数据 ")]),_:1},8,["type"])]),_:1})]),vue.createElementVNode("div",_hoisted_3$K,[vue.createVNode(R,{businessType:"MODEL_INDICATORS",businessld:o.indicatorsId},null,8,["businessld"])])]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createElementVNode("div",_hoisted_4$I,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref($),animated:""},{default:vue.withCtx(()=>[vue.createVNode(IndicatorsView,{dynamicSearchForm:vue.unref(s),result:vue.unref(_),chartData:vue.unref(m),onSearchSuccess:D},null,8,["dynamicSearchForm","result","chartData"])]),_:1},8,["loading"])])],512),[[vue.vShow,vue.unref(f)=="basic"]]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createElementVNode("div",_hoisted_5$A,[vue.createElementVNode("div",_hoisted_6$v,[vue.createVNode(F,{title:"指标计算"}),vue.createElementVNode("div",_hoisted_7$r,[vue.unref(g).some(oe=>oe.rows>0)?(vue.openBlock(),vue.createElementBlock("i",_hoisted_8$o)):(vue.openBlock(),vue.createElementBlock("i",_hoisted_9$l)),vue.createElementVNode("span",_hoisted_10$j,vue.toDisplayString(vue.unref(_).remark),1)])]),_hoisted_11$h,vue.createElementVNode("div",_hoisted_12$f,[vue.createVNode(F,{title:"数据来源"}),vue.createElementVNode("div",_hoisted_13$c,[_hoisted_14$b,vue.createTextVNode(" 重构仓模型数据 | "+vue.toDisplayString(vue.unref(_).modelName)+"【 ",1),vue.createElementVNode("span",{class:"cursor-pointer text-color-primary",onClick:N},vue.toDisplayString(vue.unref(_).modelCode),1),vue.createTextVNode(" 】 ")])])]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(V),animated:""},{default:vue.withCtx(()=>[vue.unref(b).length?(vue.openBlock(),vue.createBlock(W,{key:0,maxHeight:"400px",tableData:vue.unref(b),list:vue.unref(y),loading:!1,headerCellClassName:x,onSortChange:E},{button:vue.withCtx(({row:oe})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:z=>T(oe)},{default:vue.withCtx(()=>[vue.createTextVNode("查看明细")]),_:2},1032,["onClick"])]),_:1},8,["tableData","list"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$5,[vue.createVNode(J,{description:"暂无数据",class:"mt-4"})]))]),_:1},8,["loading"])],512),[[vue.vShow,vue.unref(f)=="data"]]),vue.createVNode(_sfc_main$1l,{ruleList:vue.unref(g)},null,8,["ruleList"]),vue.createVNode(Y,{modelValue:vue.unref(p),"onUpdate:modelValue":M[2]||(M[2]=oe=>vue.isRef(p)?p.value=oe:null),title:"查看明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(F,{title:"统计:",class:"mb-2"}),vue.createVNode(W,{height:null,tableData:Object.keys(vue.unref(P)).map(oe=>({label:oe,prop:oe})),list:[vue.unref(P)],loading:!1},null,8,["tableData","list"]),vue.createVNode(F,{title:"钻取明细:",class:"mt-4 mb-2"}),vue.createVNode(Q,{id:vue.unref(_).modelId,keyName:"modelIndicatorsId",title:vue.unref(_).modelName,isDownLoad:vue.unref(isMobile),url:"/api/ace-data-center/model-indicators/drilling",formatParamsFunc:B},null,8,["id","title","isDownLoad"])]),_:1},8,["modelValue"]),vue.createVNode(Y,{modelValue:vue.unref(v),"onUpdate:modelValue":M[3]||(M[3]=oe=>vue.isRef(v)?v.value=oe:null),title:"模型数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(Q,{id:vue.unref(_).modelId,title:vue.unref(_).modelName},null,8,["id","title"])]),_:1},8,["modelValue"])],8,_hoisted_1$11))}}}),_hoisted_1$10=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_2$R={class:"mt-3"},_hoisted_3$J={key:1,class:"mr-1 -ml-5 text-base ri-edit-circle-fill text-color-primary"},_sfc_main$1f=vue.defineComponent({__name:"modelMenu",props:{type:{default:""}},emits:["node-click","change-type"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(null),u=r;vue.watch(l,y=>{vue.unref(s).filter(y)});const c=(y,b)=>y?b.modelName.includes(y):!0,d=vue.ref([]),f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),g=vue.computed(()=>o.type=="ODS"?vue.unref(d):o.type=="DWD"?vue.unref(f):vue.unref(p)),m=()=>{Promise.all([fetch$1(a).loadModelMenu({modelLayer:"ODS"}),fetch$1(a).loadModelMenu({modelLayer:"DWD"}),fetch$1(a).loadModelMenu({modelLayer:"ODSVIEW"})]).then(y=>{const b=y[0].data,C=y[1].data,x=y[2].data;d.value=Object.keys(b).map(w=>({modelName:w,id:w,children:b[w]})),f.value=Object.keys(C).map(w=>({modelName:w,id:w,children:C[w]})),p.value=Object.keys(x).map(w=>({modelName:w,id:w,children:x[w]})),v.value=!1})};m();const _=y=>{if(y.modelCode){if(o.type=="ODS"){u("node-click",y);return}Array.isArray(y.children)||u("node-click",y)}};return n({init:m}),(y,b)=>{const C=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(l),"onUpdate:modelValue":b[0]||(b[0]=x=>vue.isRef(l)?l.value=x:null)},{prefix:vue.withCtx(()=>[_hoisted_1$10]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_2$R,[vue.unref(v)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{key:0,animated:"",count:2})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTree),{key:1,class:"animated fadeIn",ref_key:"treeRef",ref:s,data:vue.unref(g),"empty-text":"暂无数据","default-expand-all":"","node-key":"id","highlight-current":"","filter-node-method":c,onNodeClick:_},{default:vue.withCtx(({node:x,data:w})=>[x.level!=1||y.type=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[w.modelCode&&w.openForm!=2?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(["mr-1 -ml-5 text-base ri-checkbox-circle-fill",[w.publishStatus==2?"text-color-success":"text-color-info"]])},null,2)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),w.openForm==2?(vue.openBlock(),vue.createElementBlock("i",_hoisted_3$J)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass({"font-bold":x.level==1})},vue.toDisplayString(w.modelName),3),vue.renderSlot(y.$slots,"default",{element:w})]),empty:vue.withCtx(()=>[vue.createVNode(C,{description:"暂无数据"})]),_:3},8,["data"]))])],64)}}}),_hoisted_1$$={class:"mb-3"},_hoisted_2$Q={style:{height:"calc(100vh - 100px)"},class:"overflow-y-auto"},_sfc_main$1e=vue.defineComponent({__name:"modelIndicatorsAdd",emits:["click-node"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref(),u=vue.ref([{label:"源数据",value:"ODS",rule:"VIEW_ODS",disabled:!0},{label:"源视图",value:"ODSVIEW",rule:"VIEW_ODSVIEW",disabled:!0},{label:"整合数据",value:"DWD",rule:"VIEW_DWD",disabled:!0}]);fetch$1(a).getCurrFunc("MODEL").then(p=>{vue.unref(u).forEach(v=>{v.disabled=!p.data.includes(v.rule),!vue.unref(s)&&!v.disabled&&(s.value=v.value)})});const c=p=>{s.value=p},d=()=>{l.value=!0},f=p=>{o("click-node",p),l.value=!1};return n({init:d}),(p,v)=>{const g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(l),"onUpdate:modelValue":v[0]||(v[0]=m=>vue.isRef(l)?l.value=m:null),title:"选择要分析的数据",size:"400px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$$,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),m=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(s)==m.value?"primary":"",key:m.value,disabled:m.disabled,onClick:_=>c(m.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(m.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1})]),vue.createElementVNode("div",_hoisted_2$Q,[vue.createVNode(_sfc_main$1f,{ref:"menuRef",type:vue.unref(s),onNodeClick:f},null,8,["type"])])]),_:1},8,["modelValue"])}}}),_hoisted_1$_=vue.createElementVNode("div",{class:"flex justify-end flex-1"},null,-1),_hoisted_2$P={class:"whitespace-nowrap ml-2.5"},_hoisted_3$I=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_4$H=["onClick"],_hoisted_5$z=vue.createElementVNode("i",{class:"ri-edit-box-line"},null,-1),_hoisted_6$u={key:0,class:"flex items-center justify-center h-full"},_sfc_main$1d=vue.defineComponent({__name:"index",props:{isCustom:{type:Boolean,default:!1},element:{default:null},tempId:{default:""}},emits:["close-design"],setup(i,{emit:n}){var x,w;const r=i,o=n,{proxy:a}=vue.getCurrentInstance();vue.inject("local");const l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(null),d=vue.ref(r.element??{});vue.provide("modelEle",d),vue.provide("getListModelIndicators",()=>{});const f=vue.ref([{label:"指标分析",value:"zbfx"},{label:"指标全景",value:"zbqj",disabled:!0}]),p=vue.ref(vue.unref(f)[0].value),v=vue.ref(((x=r==null?void 0:r.element)==null?void 0:x.id)??"");fetch$1(a).getCurrFunc("INDICATORS").then(V=>{vue.unref(f).find($=>$.value=="zbqj").disabled=!V.data.includes("INDICATORS_VIEW")});const g=vue.ref([]);fetch$1(a).getCurrFunc("MODEL_INDICATORS").then(V=>{g.value=V.data});const m=vue.ref(((w=r==null?void 0:r.element)==null?void 0:w.businessType)??""),_=V=>{v.value="",m.value=V.type,setTimeout(()=>{v.value=V.id},100)},y=V=>{d.value=V,vue.unref(l).init()},b=async V=>{const $=await a.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${V}`);$&&vue.nextTick(()=>{setTimeout(()=>{const{modelId:S,modelName:E,modelCode:k}=$.data;d.value={id:S,modelName:E,modelCode:k},vue.unref(l).init(V)},300)})},C=()=>{vue.unref(v)&&(o("close-design",vue.unref(v)),vue.unref(u)&&vue.unref(u).init()),vue.unref(s)&&vue.unref(s).init()};return(V,$)=>{const S=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"h-full"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElHeader),{style:{height:"auto",padding:"0"},class:"flex items-center w-full mb-3"},{default:vue.withCtx(()=>[V.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButtonGroup),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),E=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(p)==E.value?"primary":"",key:E.value,disabled:E.disabled,onClick:k=>p.value=E.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(E.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1})),_hoisted_1$_]),_:1}),vue.withDirectives(vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden"},{default:vue.withCtx(()=>[V.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$1m,{onNodeClick:_,tempId:V.tempId||vue.unref(v),ref_key:"menuRef",ref:s},{search:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$P,[vue.unref(g).includes("STATISTICAL_ANALYSIS")?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:0,type:"primary",onClick:$[0]||($[0]=E=>vue.unref(c).init())},{default:vue.withCtx(()=>[_hoisted_3$I,vue.createTextVNode(" 新增指标 ")]),_:1})):vue.createCommentVNode("",!0)])]),"menu-item":vue.withCtx(({data:E})=>[vue.unref(g).includes("RELATED_INDICATORS")&&E.type!="INDICATORS"?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"ml-4 mr-2 cursor-pointer text-color-warning",onClick:vue.withModifiers(k=>b(E.id),["stop"])},[_hoisted_5$z,vue.createTextVNode(" 编辑 ")],8,_hoisted_4$H)):vue.createCommentVNode("",!0)]),_:1},8,["tempId"])]),_:1})),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(v)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.unref(m)=="INDICATORS"?(vue.openBlock(),vue.createBlock(aceIndicatorSystemPreview,{key:0,indicatorsId:vue.unref(v)},null,8,["indicatorsId"])):vue.createCommentVNode("",!0),vue.unref(m)=="MODEL_INDICATORS"?(vue.openBlock(),vue.createBlock(_sfc_main$1g,{key:1,onClickDesign:b,modelIndicatorsRules:vue.unref(g),indicatorsId:vue.unref(v),ref_key:"modelIndicatorsRef",ref:u},null,8,["modelIndicatorsRules","indicatorsId"])):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$u,[vue.createVNode(S,{description:"请选择对应指标"})]))]),_:1})]),_:1},512),[[vue.vShow,vue.unref(p)=="zbfx"]]),vue.unref(p)=="zbqj"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElMain),{key:0},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$1j)]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(aceIndicatorDesign,{ref_key:"designRef",ref:l,onClose:C},null,512),vue.createVNode(_sfc_main$1e,{ref_key:"modelIndicatorsAddRef",ref:c,onClickNode:y},null,512)]),_:1})}}}),_withScopeId$o=i=>(vue.pushScopeId("data-v-e52b7096"),i=i(),vue.popScopeId(),i),_hoisted_1$Z={class:"flex flex-col h-full"},_hoisted_2$O=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1)),_hoisted_3$H={class:"flex-1 mt-3 overflow-y-auto card-container"},_hoisted_4$G={key:0,class:"flex items-center justify-center h-full"},_hoisted_5$y=["onClick"],_hoisted_6$t={class:"flex items-center"},_hoisted_7$q=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-database-line"},null,-1)),_hoisted_8$n={class:"font-bold"},_hoisted_9$k={class:"flex items-center justify-between w-4/5 mt-3 ml-auto mr-auto"},_hoisted_10$i={class:"flex items-center"},_hoisted_11$g=_withScopeId$o(()=>vue.createElementVNode("i",{class:"mr-1 ri-checkbox-circle-fill text-color-success"},null,-1)),_hoisted_12$e=_withScopeId$o(()=>vue.createElementVNode("div",{class:"text-color-info"},"|",-1)),_hoisted_13$b={class:"flex justify-end mt-3 text-xs text-color-info pb"},_hoisted_14$a={class:"w-4/5 overflow-hidden whitespace-nowrap text-ellipsis"},_sfc_main$1c=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{dataSourceSubmit:a,testConnect:l,loadDataSourceMenu:s}=fetch$1(o).dbImport,{setFormValue:u,getFormValue:c}=o.$globalHooks.useForm(),{openMessage:d}=o.$globalHooks.useMessage(),f=o.$globalDict,p=r,v=vue.ref([]),g=vue.ref(!0),m=()=>{v.value=[],g.value=!0,s().then(S=>{g.value=!1,v.value=S.data??[],S.data.length&&vue.unref(V)==""&&$(S.data[0])})};m();const _=vue.reactive([{name:"数据源名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"dataSourceType",value:"",dict:"storeType",required:!0,changeFunc:S=>{if(!S.value)return;let E=f.dataSourceUrlDemo.find(k=>k.label.toLowerCase()===S.value.toLowerCase());_.find(k=>k.fieldName==="dataSourceUrlDemo").value=(E==null?void 0:E.value)??""}},{name:"数据源链接地址",type:FieldType.Textarea,fieldName:"dataSourceUrl",value:"",required:!0},{name:"链接示例",type:FieldType.Slot,fieldName:"dataSourceUrlDemo",value:""},{name:"数据库用户名",type:FieldType.Text,fieldName:"connectUserName",value:"",required:!0},{name:"数据库用密码",type:FieldType.Password,fieldName:"connectPassword",value:"",required:!0}]),y=vue.ref(!1),b=()=>{u({},_),y.value=!0},C=S=>{_.find(E=>E.fieldName==="dataSourceUrl").value=S.value},x=async()=>{const{params:S,error:E}=c(_);E.length>0||!await a(S)||(y.value=!1,d({type:"success",message:"操作成功"}),m())},w=async()=>{const{params:S,error:E}=c(_);E.length>0||!await l(S)||d({type:"success",message:"数据库链接成功"})},V=vue.ref(""),$=S=>{vue.unref(V)!=S.dataSourceId&&(V.value=S.dataSourceId,p("node-click",S))};return n({initMenu:m}),(S,E)=>{const k=vue.resolveComponent("aceHeader"),P=vue.resolveComponent("AppEmpty"),T=vue.resolveComponent("AppForm"),B=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$Z,[vue.createVNode(k,{title:"数据源"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:b},{default:vue.withCtx(()=>[_hoisted_2$O,vue.createTextVNode(" 新增 ")]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_3$H,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(g),animated:""},{default:vue.withCtx(()=>[vue.unref(v).length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(v),N=>(vue.openBlock(),vue.createElementBlock("div",{key:N.id,class:vue.normalizeClass(["item",{active:vue.unref(V)==N.dataSourceId}]),onClick:O=>$(N)},[vue.createElementVNode("div",_hoisted_6$t,[_hoisted_7$q,vue.createElementVNode("span",_hoisted_8$n,vue.toDisplayString(N.dataSourceComment),1)]),vue.createElementVNode("div",_hoisted_9$k,[vue.createElementVNode("div",_hoisted_10$i,[_hoisted_11$g,vue.createTextVNode(" 已同步 "),vue.createElementVNode("strong",null,vue.toDisplayString(N.synchronizedTableCount),1)]),_hoisted_12$e,vue.createElementVNode("div",null,[vue.createTextVNode(" 总表数 "),vue.createElementVNode("strong",null,vue.toDisplayString(N.tableCount),1)])]),vue.createElementVNode("div",_hoisted_13$b,vue.toDisplayString(N.version),1)],10,_hoisted_5$y))),128)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$G,[vue.createVNode(P,{description:"暂无数据源"})]))]),_:1},8,["loading"])]),vue.createVNode(B,{modelValue:vue.unref(y),"onUpdate:modelValue":E[1]||(E[1]=N=>vue.isRef(y)?y.value=N:null),title:"新增接入数据源",size:700},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{style:{"margin-right":"auto"},type:"success",onClick:w},{default:vue.withCtx(()=>[vue.createTextVNode(" 测试链接 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:x},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:E[0]||(E[0]=N=>y.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(T,{form:vue.unref(_),col:1,labelWidth:120},{dataSourceUrlDemo:vue.withCtx(({element:N})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:N.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_14$a,vue.toDisplayString(N.value),1)]),_:2},1032,["content"]),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:O=>C(N)},{default:vue.withCtx(()=>[vue.createTextVNode("复制")]),_:2},1032,["onClick"])]),_:1},8,["form"])]),_:1},8,["modelValue"])])}}}),menu_vue_vue_type_style_index_0_scoped_e52b7096_lang="",Menu$2=_export_sfc$2(_sfc_main$1c,[["__scopeId","data-v-e52b7096"]]),_sfc_main$1b=vue.defineComponent({__name:"sourceTableData",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(null),a=vue.ref(""),l=vue.ref([]),s=f=>{l.value=[],(f==null?void 0:f.data.length)>0&&(l.value=Object.keys(f.data[0]).filter(p=>p!="pageIndex").map(p=>({label:p,prop:p})))},u=vue.ref({}),c=f=>Object.assign(f,vue.unref(u));return n({init:(f,p)=>{vue.unref(u).dataSourceId=f,vue.unref(u).sourceTableCode=p,r.value=!0,a.value="/api/ace-data-center/data-source/sourceDataPage"}}),(f,p)=>{const v=vue.resolveComponent("AppList"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(r),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(r)?r.value=m:null),title:"数据源明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(v,{tableData:vue.unref(l),url:vue.unref(a),ref_key:"appList",ref:o,formatParamsFunc:c,onSuccess:s,methods:"post"},null,8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_hoisted_1$Y={class:"mt-2"},_sfc_main$1a=vue.defineComponent({__name:"setting",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{setFormValue:a,getFormValue:l}=o.$globalHooks.useForm(),{openMessage:s}=o.$globalHooks.useMessage(),{submitDefaultDbExtract:u}=fetch$1(o).dbImport,c=r,d=vue.ref(!1),f=vue.ref(!1),p=vue.ref(null),v=vue.reactive([{name:"方案名称",type:FieldType.Text,fieldName:"extractName",value:"",required:!0},{name:"抽取方式",type:FieldType.Radio,fieldName:"extractType",value:"",required:!0,options:[{label:"全量抽取",value:"1"},{label:"增量抽取",value:"2"}],changeFunc:b=>{v.find(x=>x.fieldName=="incrementalField").hide=b.value!=2;const C=v.find(x=>x.fieldName=="clearBeforeExt");C.hide=b.value!=1,b.isChange&&b.value!=1&&(C.value="0")}},{name:"清空历史数据",type:FieldType.Radio,fieldName:"clearBeforeExt",value:"",required:!0,options:[{label:"是",value:"1"},{label:"否",value:"0"}],defVal:"0"},{name:"增量字段",type:FieldType.Select,fieldName:"incrementalField",value:"",required:!0,tip:"该字段必须为本模型字段,并且是SQL结果集中存在的字段"},{name:"taskDefinedId",type:FieldType.Text,fieldName:"taskDefinedId",hide:!0},{name:"id",type:FieldType.Text,fieldName:"id",hide:!0}]),g=vue.ref(null),m=vue.ref({}),_=async b=>{m.value=b,f.value=!1;const C=await o.$baseHttp.get("/api/ace-data-center/model-attribute/allModelAttribute",{params:{modelId:b.modelId,projectId:o.$baseGetCurrentProjectId()},headers:{loading:!0}});v.find(x=>x.fieldName=="incrementalField").options=C.data.map(x=>({...x,label:`${x.attributeCode}(${x.attributeComment||x.attributeCode})`,value:x.attributeCode})),d.value=!0,vue.nextTick(()=>{a({...b,extractName:b.extractName??"增量抽取"},v),b!=null&&b.taskDefined&&(f.value=!0),vue.unref(p).init((b==null?void 0:b.taskDefined)??{}),g.value=(b==null?void 0:b.taskDefined)??null})},y=async()=>{const{params:b,error:C}=l(v);if(C.length>0)return;if(vue.unref(f)){const{params:w,error:V}=vue.unref(p).getForm();if(V.length>0)return;b.taskDefined={...vue.unref(g)??{},...w}}b.dataSourceId=vue.unref(m).dataSourceId,b.modelId=vue.unref(m).modelId,b.streamType="STANDARD",await u(b)&&(s({type:"success",message:"操作成功"}),d.value=!1,c("refresh"))};return n({init:_}),(b,C)=>{const x=vue.resolveComponent("AppForm"),w=vue.resolveComponent("aceHeader"),V=vue.resolveComponent("AppTaskDesign"),$=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createBlock($,{modelValue:vue.unref(d),"onUpdate:modelValue":C[2]||(C[2]=S=>vue.isRef(d)?d.value=S:null),title:"配置",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:y},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:C[1]||(C[1]=S=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(x,{form:vue.unref(v)},null,8,["form"]),vue.createElementVNode("div",_hoisted_1$Y,[vue.createVNode(w,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(f),"onUpdate:modelValue":C[0]||(C[0]=S=>vue.isRef(f)?f.value=S:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(V,{ref_key:"taskDesignRef",ref:p},null,512)],512),[[vue.vShow,vue.unref(f)]])])]),_:1},8,["modelValue"])}}}),_hoisted_1$X=vue.createElementVNode("i",{class:"mr-2 ri-exchange-line"},null,-1),_hoisted_2$N=vue.createElementVNode("i",{class:"mr-2 ri-refresh-line"},null,-1),_hoisted_3$G=vue.createElementVNode("div",null,null,-1),_hoisted_4$F=vue.createElementVNode("i",{class:"mr-2 ri-delete-bin-line"},null,-1),_sfc_main$19=vue.defineComponent({__name:"model-extract-log",emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{openMessage:a}=o.$globalHooks.useMessage(),l=r,s=vue.ref(!1),u=vue.ref(null),c=vue.ref(""),d=vue.ref([]),f=v=>{const{businessId:g,businessType:m="file_extract",ajaxUrl:_="",table:y}=v;d.value=y||[{label:"批次号",prop:"batchNo"},{label:"日期",prop:"createTime"},{label:"文件名",prop:"file",slot:!0},{label:"抽取方式",prop:"createTime",func:b=>{var C;return((C=JSON.parse(b.businessSnapshot||"{}"))==null?void 0:C.extractType)==2?"覆盖":"追加"}},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}],c.value=_||`/api/ace-data-center/extract-log/list?descs=create_time&businessId=${g}&businessType=${m}`,s.value=!0},p=async(v,g)=>{switch(v){case"refresh":{if(!await o.$baseHttp.post(`/api/ace-data-center/extract-log/updateSuccessTotal/${g.id}`,{},{headers:{loading:!0}}))return;a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success")}break;case"delete":o.$baseConfirm({content:"删除数据可能影响指标统计,是否确认删除?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/extract-log/deleteModelData/${g.id}`,{},{headers:{loading:!0}})&&(a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success"))}});break;case"run":o.$baseConfirm({content:"重跑数据会先删除本批次数据,然后新建立一个批次任务执行,是否继续执行?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/extract-log/reRunTeamworkDbExtractBy/${g.id}`,{},{headers:{loading:!0}})&&(a({type:"success",message:"操作成功"}),vue.unref(u).getData(),l("success"))}});break;case"download":{const m=JSON.parse((g==null?void 0:g.businessSnapshot)??"{}");window.open(m.fileUrl)}break}};return n({init:f}),(v,g)=>{const m=vue.resolveComponent("AppList"),_=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(_,{modelValue:vue.unref(s),"onUpdate:modelValue":g[0]||(g[0]=y=>vue.isRef(s)?s.value=y:null),title:"抽取日志",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(m,{tableData:vue.unref(d),url:vue.unref(c),ref_key:"appList",ref:u},{file:vue.withCtx(({row:y})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:b=>p("download",y)},{default:vue.withCtx(()=>{var b;return[vue.createTextVNode(vue.toDisplayString((b=JSON.parse(y.businessSnapshot??"{}"))==null?void 0:b.fileName),1)]}),_:2},1032,["onClick"])]),action:vue.withCtx(({row:y})=>{var b;return[((b=JSON.parse(y.businessSnapshot||"{}"))==null?void 0:b.extractType)==3?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",class:"mr-2",onClick:C=>p("run",y)},{default:vue.withCtx(()=>[_hoisted_1$X,vue.createTextVNode(" 重跑 ")]),_:2},1032,["onClick"])):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:C=>p("refresh",y)},{default:vue.withCtx(()=>[_hoisted_2$N,vue.createTextVNode(" 刷新 ")]),_:2},1032,["onClick"]),_hoisted_3$G,vue.createVNode(vue.unref(elementPlus.ElLink),{type:"danger",onClick:C=>p("delete",y)},{default:vue.withCtx(()=>[_hoisted_4$F,vue.createTextVNode(" 删除本批次数据 ")]),_:2},1032,["onClick"])]}),_:1},8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_hoisted_1$W={class:"flex flex-col h-full overflow-hidden"},_hoisted_2$M={class:"flex flex-col flex-1 mt-3 overflow-hidden"},_hoisted_3$F={class:"app-search"},_hoisted_4$E=vue.createElementVNode("i",{class:"mr-1 ri-search-line"},null,-1),_hoisted_5$x={class:"flex flex-1 overflow-hidden"},_hoisted_6$s=["onClick"],_hoisted_7$p={class:"flex justify-end mt-3"},_hoisted_8$m={class:"flex justify-end mb-2"},_hoisted_9$j=vue.createElementVNode("i",{class:"mr-1 ri-add-line"},null,-1),_sfc_main$18=vue.defineComponent({__name:"view",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.inject("modelEle"),{setFormValue:l,getFormValue:s}=o.$globalHooks.useForm(),{openMessage:u}=o.$globalHooks.useMessage(),{createModelSyncRelation:c,listDataSourceSynchronized:d}=fetch$1(o).dbImport,f=vue.ref(null),p=vue.ref(null),v=vue.ref(null),g=vue.ref(null),m=r,{originlist:_,list:y,pageLoading:b,page:C,pageSize:x,getData:w,handleSizeChange:V,handleCurrentChange:$}=o.$globalHooks.usePage(),S=vue.reactive([{name:"源表名",type:FieldType.Text,fieldName:"sourceTableComment",value:""},{name:"同步状态",type:FieldType.Select,fieldName:"related",value:"",options:[{label:"已同步",value:!0},{label:"未同步",value:!1}]},{name:"同步结果",type:FieldType.Select,fieldName:"synchronizeResult",value:"",options:[{label:"正常",value:2},{label:"异常",value:1}]},{name:"源数据量",type:FieldType.Select,fieldName:"existSourceTableData",value:"",options:[{label:"源数据量 >0",value:!0},{label:"源数据量 =0",value:!1}]}]),E=vue.reactive([{label:"源表",prop:"sourceTableCode"},{label:"源表名",prop:"sourceTableComment"},{label:"源数据",prop:"sourceTableDataCount",slot:!0},{label:"列数",prop:"sourceColumnCount"},{label:"同步状态",prop:"related",slot:!0},{label:"同步结果",prop:"synchronizeResult",tag:!0,tagFunc:I=>I==2?"success":"danger",func:I=>{var j,M;return((j=I.modelSyncDetail)==null?void 0:j.synchronizeResult)=="2"?"正常":((M=I.modelSyncDetail)==null?void 0:M.synchronizeResult)=="1"?"异常":"-"}},{label:"目标表",prop:"relationTableCode"},{label:"目标数据",prop:"relationTableDataCount"},{label:"主键",prop:"primaryKeyColumn",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.primaryKeyColumn)??"-"}},{label:"增量字段",prop:"incrColumn",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.incrColumn)??"-"}},{label:"上次同步",prop:"lastSyncTime",func:I=>{var j;return((j=I==null?void 0:I.modelSyncDetail)==null?void 0:j.lastSyncTime)??"-"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"120px"}]),k=async(I=!0)=>{I&&(l({},S),C.value=1),b.value=!0;const{params:j}=s(S,!1,!0),M=await d({dataSourceId:vue.unref(a).dataSourceId,...j});if(b.value=!1,!M){_.value=[];return}M.data.forEach(R=>{var F;(F=R==null?void 0:R.modelSyncDetail)!=null&&F.modelId&&(R.htmlButton=[{name:"配置",key:"setting",type:"primary"},{name:"历史",key:"history",type:"primary"}])}),_.value=M.data,w()},P=async I=>{await c({sourceId:I.dataSourceId,sourceTableCode:I.sourceTableCode})&&(u({type:"success",message:"操作成功"}),m("refresh"),k(!1))},T=vue.ref(!1),B=vue.ref(""),N=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"200px"}]),O=I=>{I.data.forEach(j=>{j.htmlButton=[],j.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),j.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(j.extractType)&&j.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),j.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},D=vue.ref({}),L=async I=>{var F;const{type:j,row:M,index:R}=I;switch(j){case"history":vue.unref(v).init({ajaxUrl:`/api/ace-data-center/extract-log/modelSyncHistory?descs=create_time&modelId=${M.modelSyncDetail.modelId}`,table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"LOG":vue.unref(v).init({businessId:M.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"PUSH":o.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${M.id}`,{},{headers:{loading:!0}})&&u({type:"success",message:"操作成功"})}});break;case"DEL":o.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await o.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${M.id}`,{},{headers:{loading:!0}})&&(u({type:"success",message:"操作成功"}),vue.unref(f).getData())}});break;case"EDIT":const W=await o.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${M.id}`);if(!W)return;vue.unref(p).init(W.data);break;case"ADD":vue.unref(p).init({dataSourceId:vue.unref(D).dataSourceId,modelId:(F=vue.unref(D))==null?void 0:F.modelSyncDetail.modelId});break;case"setting":T.value=!0,D.value=M,B.value=`/api/ace-data-center/db-extract/list?modelId=${M.modelSyncDetail.modelId}&projectId=${o.$baseGetCurrentProjectId()}`;break;case"source-table-data":vue.unref(g).init(M.dataSourceId,M.sourceTableCode);break}};return n({init:k}),(I,j)=>{const M=vue.resolveComponent("aceHeader"),R=vue.resolveComponent("AppForm"),F=vue.resolveComponent("AppTable"),W=vue.resolveComponent("AppList"),J=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$W,[vue.createVNode(M,{title:vue.unref(a).dataSourceComment},null,8,["title"]),vue.createElementVNode("div",_hoisted_2$M,[vue.createElementVNode("div",_hoisted_3$F,[vue.createVNode(R,{form:vue.unref(S)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",onClick:j[0]||(j[0]=Q=>k(!1))},{default:vue.withCtx(()=>[_hoisted_4$E,vue.createTextVNode(" 查询 ")]),_:1})]),_:1},8,["form"])]),vue.createElementVNode("div",_hoisted_5$x,[vue.createVNode(F,{tableData:vue.unref(E),list:vue.unref(y),loading:vue.unref(b),onTableBtnClick:L},{related:vue.withCtx(({row:Q})=>[Q.related?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("已同步")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopconfirm),{key:1,title:"您确定要同步吗?",onConfirm:Y=>P(Q)},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{size:"small",type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("立即同步")]),_:1})]),_:2},1032,["onConfirm"]))]),sourceTableDataCount:vue.withCtx(({row:Q})=>[Q.sourceTableDataCount==0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(Q.sourceTableDataCount),1)],64)):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"flex justify-between",onClick:Y=>L({type:"source-table-data",row:Q,index:-1})},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Q.sourceTableDataCount),1)]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看")]),_:1})],8,_hoisted_6$s))]),_:1},8,["tableData","list","loading"])]),vue.createElementVNode("div",_hoisted_7$p,[vue.createVNode(vue.unref(elementPlus.ElPagination),{"current-page":vue.unref(C),"onUpdate:currentPage":j[1]||(j[1]=Q=>vue.isRef(C)?C.value=Q:null),"page-size":vue.unref(x),"onUpdate:pageSize":j[2]||(j[2]=Q=>vue.isRef(x)?x.value=Q:null),"page-sizes":[10,20,40,60,80,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",total:vue.unref(_).length,onCurrentChange:vue.unref($),onSizeChange:vue.unref(V)},null,8,["current-page","page-size","total","onCurrentChange","onSizeChange"])])]),vue.createVNode(J,{modelValue:vue.unref(T),"onUpdate:modelValue":j[4]||(j[4]=Q=>vue.isRef(T)?T.value=Q:null),title:"数据同步方案",size:"1000px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_8$m,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:j[3]||(j[3]=Q=>L({type:"ADD",row:{},index:0}))},{default:vue.withCtx(()=>[_hoisted_9$j,vue.createTextVNode(" 新增 ")]),_:1})]),vue.createVNode(W,{tableData:vue.unref(N),url:vue.unref(B),ref_key:"appListRef",ref:f,onBtnClick:L,onSuccess:O},null,8,["tableData","url"])]),_:1},8,["modelValue"]),vue.createVNode(_sfc_main$1a,{ref_key:"settingRef",ref:p,onRefresh:j[5]||(j[5]=Q=>vue.unref(f).getData({clear:!0}))},null,512),vue.createVNode(_sfc_main$19,{ref_key:"extractLogRef",ref:v},null,512),vue.createVNode(_sfc_main$1b,{ref_key:"sourceTableDataRef",ref:g},null,512)])}}}),_hoisted_1$V={key:0,class:"flex items-center justify-center h-full"},_sfc_main$17=vue.defineComponent({__name:"index",setup(i){const n=vue.ref(null),r=vue.ref(null),o=vue.ref({});vue.provide("modelEle",o);const a=vue.inject("local"),l=s=>{o.value=s,vue.nextTick(()=>{vue.unref(n).init()})};return(s,u)=>{const c=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden app-basic-container"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(Menu$2,{ref_key:"menuRef",ref:r,onNodeClick:l},null,512)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(o).dataSourceId?(vue.openBlock(),vue.createBlock(_sfc_main$18,{key:1,ref_key:"viewRef",ref:n,onRefresh:u[0]||(u[0]=d=>vue.unref(r).initMenu())},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$V,[vue.createVNode(c,{description:"请选择数据源"})]))]),_:1})]),_:1},8,["locale"])]),_:1})}}}),_withScopeId$n=i=>(vue.pushScopeId("data-v-cabcba66"),i=i(),vue.popScopeId(),i),_hoisted_1$U={class:"flex flex-col h-full"},_hoisted_2$L=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1)),_hoisted_3$E={class:"flex-1 mt-3 overflow-y-auto card-container"},_hoisted_4$D={key:0,class:"flex items-center justify-center h-full"},_hoisted_5$w=["onClick"],_hoisted_6$r={class:"flex items-center justify-between"},_hoisted_7$o={class:"flex-1 mr-2.5"},_hoisted_8$l=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-database-line"},null,-1)),_hoisted_9$i={class:"font-bold"},_hoisted_10$h=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-circle-line"},null,-1)),_hoisted_11$f={class:"flex items-center justify-between w-4/5 mt-3 ml-auto mr-auto"},_hoisted_12$d={class:"flex items-center"},_hoisted_13$a=_withScopeId$n(()=>vue.createElementVNode("i",{class:"mr-1 ri-checkbox-circle-fill text-color-success"},null,-1)),_hoisted_14$9=_withScopeId$n(()=>vue.createElementVNode("div",{class:"text-color-info"},"|",-1)),_hoisted_15$4={class:"flex justify-end mt-3 text-xs text-color-info pb"},_hoisted_16$4={class:"w-4/5 overflow-hidden whitespace-nowrap text-ellipsis"},_sfc_main$16=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{dataSourceSubmit:a,testConnect:l,loadDataSourceMenu:s,detail:u}=fetch$1(o).dbImport,{setFormValue:c,getFormValue:d}=o.$globalHooks.useForm(),{openMessage:f}=o.$globalHooks.useMessage(),p=o.$globalDict,v=r,g=vue.ref([]),m=vue.ref(!0),_=()=>{g.value=[],m.value=!0,s().then(k=>{m.value=!1,g.value=k.data??[],k.data.length&&vue.unref(S)==""&&E(k.data[0])})};_();const y=vue.reactive([{name:"数据源名称",type:FieldType.Text,fieldName:"name",value:"",required:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"dataSourceType",value:"",dict:"storeType",required:!0,changeFunc:k=>{if(!k.value)return;let P=p.dataSourceUrlDemo.find(T=>T.label.toLowerCase()===k.value.toLowerCase());y.find(T=>T.fieldName==="dataSourceUrlDemo").value=(P==null?void 0:P.value)??""}},{name:"数据源链接地址",type:FieldType.Textarea,fieldName:"dataSourceUrl",value:"",required:!0},{name:"链接示例",type:FieldType.Slot,fieldName:"dataSourceUrlDemo",value:""},{name:"数据库用户名",type:FieldType.Text,fieldName:"connectUserName",value:"",required:!0},{name:"数据库用密码",type:FieldType.Password,fieldName:"connectPassword",value:"",required:!0},{name:"id",type:FieldType.Text,fieldName:"id",value:"",hide:!0}]),b=vue.ref(!1),C=()=>{c({},y),b.value=!0},x=async k=>{const P=await u({id:k.dataSourceId});c(P.data,y),b.value=!0},w=k=>{y.find(P=>P.fieldName==="dataSourceUrl").value=k.value},V=async()=>{const{params:k,error:P}=d(y);P.length>0||(k.id||delete k.id,!await a(k))||(b.value=!1,f({type:"success",message:"操作成功"}),_())},$=async()=>{const{params:k,error:P}=d(y);P.length>0||!await l(k)||f({type:"success",message:"数据库链接成功"})},S=vue.ref(""),E=k=>{vue.unref(S)!=k.dataSourceId&&(S.value=k.dataSourceId,v("node-click",k))};return n({initMenu:_}),(k,P)=>{const T=vue.resolveComponent("aceHeader"),B=vue.resolveComponent("AppEmpty"),N=vue.resolveComponent("AppForm"),O=vue.resolveComponent("AppDialog");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$U,[vue.createVNode(T,{title:"数据源"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:C},{default:vue.withCtx(()=>[_hoisted_2$L,vue.createTextVNode(" 新增 ")]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_3$E,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(m),animated:""},{default:vue.withCtx(()=>[vue.unref(g).length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(g),D=>(vue.openBlock(),vue.createElementBlock("div",{key:D.id,class:vue.normalizeClass(["item",{active:vue.unref(S)==D.dataSourceId}]),onClick:L=>E(D)},[vue.createElementVNode("div",_hoisted_6$r,[vue.createElementVNode("div",_hoisted_7$o,[_hoisted_8$l,vue.createElementVNode("span",_hoisted_9$i,vue.toDisplayString(D.dataSourceComment),1)]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:vue.withModifiers(L=>x(D),["stop"])},{default:vue.withCtx(()=>[_hoisted_10$h,vue.createTextVNode(" 修改 ")]),_:2},1032,["onClick"])]),vue.createElementVNode("div",_hoisted_11$f,[vue.createElementVNode("div",_hoisted_12$d,[_hoisted_13$a,vue.createTextVNode(" 已同步 "),vue.createElementVNode("strong",null,vue.toDisplayString(D.synchronizedShadowTableCount),1)]),_hoisted_14$9,vue.createElementVNode("div",null,[vue.createTextVNode(" 总表数 "),vue.createElementVNode("strong",null,vue.toDisplayString(D.tableCount),1)])]),vue.createElementVNode("div",_hoisted_15$4,vue.toDisplayString(D.version),1)],10,_hoisted_5$w))),128)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$D,[vue.createVNode(B,{description:"暂无数据源"})]))]),_:1},8,["loading"])]),vue.createVNode(O,{modelValue:vue.unref(b),"onUpdate:modelValue":P[1]||(P[1]=D=>vue.isRef(b)?b.value=D:null),title:"新增接入数据源",size:700},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{style:{"margin-right":"auto"},type:"success",onClick:$},{default:vue.withCtx(()=>[vue.createTextVNode(" 测试链接 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:V},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:P[0]||(P[0]=D=>b.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(N,{form:vue.unref(y),col:1,labelWidth:120},{dataSourceUrlDemo:vue.withCtx(({element:D})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:D.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_16$4,vue.toDisplayString(D.value),1)]),_:2},1032,["content"]),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",onClick:L=>w(D)},{default:vue.withCtx(()=>[vue.createTextVNode("复制")]),_:2},1032,["onClick"])]),_:1},8,["form"])]),_:1},8,["modelValue"])])}}}),menu_vue_vue_type_style_index_0_scoped_cabcba66_lang="",Menu$1=_export_sfc$2(_sfc_main$16,[["__scopeId","data-v-cabcba66"]]),_sfc_main$15=vue.defineComponent({__name:"sourceTableData",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(null),a=vue.ref(""),l=vue.ref([]),s=f=>{l.value=[],(f==null?void 0:f.data.length)>0&&(l.value=Object.keys(f.data[0]).filter(p=>p!="pageIndex").map(p=>({label:p,prop:p})))},u=vue.ref({}),c=f=>Object.assign(f,vue.unref(u));return n({init:(f,p)=>{vue.unref(u).dataSourceId=f,vue.unref(u).sourceTableCode=p,r.value=!0,a.value="/api/ace-data-center/data-source/sourceDataPage"}}),(f,p)=>{const v=vue.resolveComponent("AppList"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(r),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(r)?r.value=m:null),title:"数据源明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(v,{tableData:vue.unref(l),url:vue.unref(a),ref_key:"appList",ref:o,formatParamsFunc:c,onSuccess:s,methods:"post"},null,8,["tableData","url"])]),_:1},8,["modelValue"])}}}),_withScopeId$m=i=>(vue.pushScopeId("data-v-e0af972d"),i=i(),vue.popScopeId(),i),_hoisted_1$T={class:"mt-3"},_hoisted_2$K=_withScopeId$m(()=>vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",null,"字段名称"),vue.createElementVNode("td",null,"字段描述"),vue.createElementVNode("td",null,"映射字段"),vue.createElementVNode("td",null,"数据类型"),vue.createElementVNode("td",null,"数据长度"),vue.createElementVNode("td",null,"数据标度"),vue.createElementVNode("td",null,"是否主键"),vue.createElementVNode("td",null,"唯一校验")])],-1)),_hoisted_3$D={class:"sort-target"},_hoisted_4$C={key:0},_sfc_main$14=vue.defineComponent({__name:"model-normal",emits:["success"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),{setFormValue:a,getFormValue:l}=o.$globalHooks.useForm(),s=r,u=vue.ref(!1),c=vue.ref(""),d=vue.ref([]);vue.ref("");const f=vue.ref([]),p=vue.reactive([{name:"项目名称",type:FieldType.Select,fieldName:"projectId",value:"",required:!0,props:{url:"/api/ace-data-center/project/options",label:"label",value:"code"},disabled:!0,hide:!0},{name:"数据源类型",type:FieldType.Select,fieldName:"modelStore",value:"",required:!0,dict:"storeType",disabled:!0},{name:"模型层级",type:FieldType.Select,fieldName:"modelLayer",value:"",required:!0,props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelLayer",label:"dictValue",value:"dictKey"},changeFunc:m=>{},disabled:!0},{name:"模型名称",type:FieldType.Text,fieldName:"modelName",value:"",required:!0},{name:"模型表名",type:FieldType.Text,fieldName:"modelCode",value:"",required:!0,disabled:!0},{name:"模型类型",type:FieldType.Select,fieldName:"modelType",value:"",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelType",label:"dictValue",value:"dictKey"},hide:!0},{name:"标签",type:FieldType.Text,fieldName:"tags",value:""},{name:"分区字段",type:FieldType.Text,fieldName:"partitionColumn",value:"",hide:!0},{name:"模型描述",type:FieldType.Textarea,fieldName:"modelDesc",value:""},{name:"id",type:FieldType.Text,fieldName:"id",value:"",hide:!0}]),v=m=>{u.value=!0,c.value="",d.value=[],f.value=(m?(m==null?void 0:m.listModelAttribute)??[]:[{nanoid:nanoid()}]).map(_=>{const y=((_==null?void 0:_.attributeCode)??"").split("");return _.nanoid=nanoid(),y[0]=="_"&&(_.hide=!0),_}),a({...m??{},projectId:o.$baseGetCurrentProjectId()},p)},g=async()=>{const{params:m,error:_}=l(p);if(_.length>0)return;const y="/api/ace-data-center/model/editModelDetail";await o.$baseHttp.post(y,{...m,projectId:String(o.$baseGetCurrentProjectId()),listModelAttribute:vue.unref(f)},{headers:{loading:!0}})&&(u.value=!1,o.$message.success("操作成功"),s("success"))};return n({init:v}),(m,_)=>{const y=vue.resolveComponent("AppForm"),b=vue.resolveComponent("aceHeader"),C=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(C,{modelValue:vue.unref(u),"onUpdate:modelValue":_[1]||(_[1]=x=>vue.isRef(u)?u.value=x:null),title:"影子模型",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("提交")]),_:1}),vue.renderSlot(m.$slots,"formFooter",{},void 0,!0),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:_[0]||(_[0]=x=>u.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(y,{form:vue.unref(p)},null,8,["form"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(b,{title:"影子模型属性"}),vue.createElementVNode("table",_hoisted_1$T,[_hoisted_2$K,vue.createElementVNode("tbody",_hoisted_3$D,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),(x,w)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:x.nanoid},[x.hide?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_4$C,[vue.createElementVNode("td",null,vue.toDisplayString(x.attributeCode),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:x.attributeComment,"onUpdate:modelValue":V=>x.attributeComment=V,maxlength:"30",showWordLimit:"",placeholder:"字段描述"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(x.mapCode),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:x.dataType,"onUpdate:modelValue":V=>x.dataType=V,placeholder:"数据类型","popper-class":"ace-select",style:{width:"100%"},disabled:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(commonDataType),V=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(x.dataLength),1),vue.createElementVNode("td",null,vue.toDisplayString(x.dataScale??"-"),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:x.primaryKey,"onUpdate:modelValue":V=>x.primaryKey=V,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:x.uniqueKey,"onUpdate:modelValue":V=>x.uniqueKey=V,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",disabled:""},null,8,["modelValue","onUpdate:modelValue"])])]))],64))),128))])])]),_:1})]),_:1})]),_:3},8,["modelValue"])}}}),modelNormal_vue_vue_type_style_index_0_scoped_e0af972d_lang="",ModelNormal=_export_sfc$2(_sfc_main$14,[["__scopeId","data-v-e0af972d"]]),_hoisted_1$S={class:"flex flex-col h-full overflow-hidden"},_hoisted_2$J={class:"flex flex-col flex-1 mt-3 overflow-hidden"},_hoisted_3$C={class:"app-search"},_hoisted_4$B=vue.createElementVNode("i",{class:"mr-1 ri-search-line"},null,-1),_hoisted_5$v={class:"flex flex-1 overflow-hidden"},_hoisted_6$q=["onClick"],_hoisted_7$n={class:"flex justify-end mt-3"},_sfc_main$13=vue.defineComponent({__name:"view",emits:["refresh"],setup(i,{expose:n,emit:r}){const{proxy:o}=vue.getCurrentInstance(),a=vue.inject("modelEle"),{setFormValue:l,getFormValue:s}=o.$globalHooks.useForm(),{openMessage:u}=o.$globalHooks.useMessage(),{createShadowModelSync:c,listDataSourceSynchronized:d}=fetch$1(o).dbImport,f=vue.ref(null),p=vue.ref(null),v=r,{originlist:g,list:m,pageLoading:_,page:y,pageSize:b,getData:C,handleSizeChange:x,handleCurrentChange:w}=o.$globalHooks.usePage(),V=vue.reactive([{name:"源表",type:FieldType.Text,fieldName:"sourceTableCode",value:""},{name:"源表名",type:FieldType.Text,fieldName:"sourceTableComment",value:""}]),$=vue.reactive([{label:"源表",prop:"sourceTableCode"},{label:"源表名",prop:"sourceTableComment"},{label:"源数据",prop:"sourceTableDataCount",slot:!0},{label:"列数",prop:"sourceColumnCount"},{label:"影子模型",prop:"shadowModelId",slot:!0},{label:"操作",prop:"htmlButton",fixed:"right",width:"120px"}]),S=async(k=!0)=>{k&&(l({},V),y.value=1),_.value=!0;const{params:P}=s(V,!1,!0),T=await d({dataSourceId:vue.unref(a).dataSourceId,...P});if(_.value=!1,!T){g.value=[];return}T.data.forEach(B=>{B.shadowModelId?B.htmlButton=[{name:"编辑",key:"EDIT",type:"primary"}]:B.htmlButton=[{name:"创建影子模型",key:"CREATE",type:"primary"}]}),g.value=T.data,C()},E=async k=>{const{type:P,row:T,index:B}=k;switch(P){case"EDIT":{const N=await o.$baseHttp.get(`/api/ace-data-center/model/detail?id=${T==null?void 0:T.shadowModelId}`);if(!N)return;o.$refs.normalRef.init(N.data)}break;case"CREATE":o.$baseConfirm({content:"是否创建影子模型?",callConfirm:async()=>{await c({sourceId:T.dataSourceId,sourceTableCode:T.sourceTableCode})&&(u({type:"success",message:"操作成功"}),v("refresh"),S(!1))}});break;case"source-table-data":vue.unref(p).init(T.dataSourceId,T.sourceTableCode);break}};return n({init:S}),(k,P)=>{const T=vue.resolveComponent("aceHeader"),B=vue.resolveComponent("AppForm"),N=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$S,[vue.createVNode(T,{title:vue.unref(a).dataSourceComment},null,8,["title"]),vue.createElementVNode("div",_hoisted_2$J,[vue.createElementVNode("div",_hoisted_3$C,[vue.createVNode(B,{form:vue.unref(V)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-1",onClick:P[0]||(P[0]=O=>S(!1))},{default:vue.withCtx(()=>[_hoisted_4$B,vue.createTextVNode(" 查询 ")]),_:1})]),_:1},8,["form"])]),vue.createElementVNode("div",_hoisted_5$v,[vue.createVNode(N,{tableData:vue.unref($),list:vue.unref(m),loading:vue.unref(_),onTableBtnClick:E},{shadowModelId:vue.withCtx(({row:O})=>[O.shadowModelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未创建")]),_:1}))]),sourceTableDataCount:vue.withCtx(({row:O})=>[O.sourceTableDataCount==0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(O.sourceTableDataCount),1)],64)):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"flex justify-between",onClick:D=>E({type:"source-table-data",row:O,index:-1})},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(O.sourceTableDataCount),1)]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看")]),_:1})],8,_hoisted_6$q))]),_:1},8,["tableData","list","loading"])]),vue.createElementVNode("div",_hoisted_7$n,[vue.createVNode(vue.unref(elementPlus.ElPagination),{"current-page":vue.unref(y),"onUpdate:currentPage":P[1]||(P[1]=O=>vue.isRef(y)?y.value=O:null),"page-size":vue.unref(b),"onUpdate:pageSize":P[2]||(P[2]=O=>vue.isRef(b)?b.value=O:null),"page-sizes":[10,20,40,60,80,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",total:vue.unref(g).length,onCurrentChange:vue.unref(w),onSizeChange:vue.unref(x)},null,8,["current-page","page-size","total","onCurrentChange","onSizeChange"])])]),vue.createVNode(ModelNormal,{ref_key:"normalRef",ref:f},null,512),vue.createVNode(_sfc_main$15,{ref_key:"sourceTableDataRef",ref:p},null,512)])}}}),_hoisted_1$R={key:0,class:"flex items-center justify-center h-full"},_sfc_main$12=vue.defineComponent({__name:"index",setup(i){const n=vue.ref(null),r=vue.ref(null),o=vue.ref({});vue.provide("modelEle",o);const a=vue.inject("local"),l=s=>{o.value=s,vue.nextTick(()=>{vue.unref(n).init()})};return(s,u)=>{const c=vue.resolveComponent("AppEmpty");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden app-basic-container"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"pr-5 mr-5"},{default:vue.withCtx(()=>[vue.createVNode(Menu$1,{ref_key:"menuRef",ref:r,onNodeClick:l},null,512)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.unref(o).dataSourceId?(vue.openBlock(),vue.createBlock(_sfc_main$13,{key:1,ref_key:"viewRef",ref:n,onRefresh:u[0]||(u[0]=d=>vue.unref(r).initMenu())},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$R,[vue.createVNode(c,{description:"请选择数据源"})]))]),_:1})]),_:1},8,["locale"])]),_:1})}}}),_hoisted_1$Q=vue.createElementVNode("i",{class:"ri-search-line"},null,-1),_hoisted_2$I={class:"mt-3"},_hoisted_3$B={class:"mt-3"},_hoisted_4$A={key:1,class:"mr-1 -ml-5 text-base ri-edit-circle-fill text-color-primary"},_sfc_main$11=vue.defineComponent({__name:"menu",emits:["node-click"],setup(i,{expose:n,emit:r}){const o=vue.ref(""),a=vue.ref(null),l=vue.ref([{label:"源视图表",value:"ODSVIEW"},{label:"整合数据表",value:"DWD"}]),s=vue.ref(vue.unref(l)[0].value),{proxy:u}=vue.getCurrentInstance(),c=r;vue.watch(o,_=>{vue.unref(a).filter(_)});const d=(_,y)=>_?y.name.includes(_):!0,f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),g=()=>{v.value=!0,Promise.all([fetch$1(u).loadModelMenu({modelLayer:"ODSVIEW"}),fetch$1(u).loadModelMenu({modelLayer:"DWD"})]).then(_=>{f.value=Object.keys(_[0].data).map(y=>({modelName:y,id:y,children:_[0].data[y]})),p.value=Object.keys(_[1].data).map(y=>({modelName:y,id:y,children:_[1].data[y]})),v.value=!1})};g();const m=_=>{Array.isArray(_.children)||c("node-click",_)};return n({init:g}),(_,y)=>{const b=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(b,{title:"整合数据",class:"mb-2"},{default:vue.withCtx(()=>[vue.renderSlot(_.$slots,"top")]),_:3}),vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(o),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(o)?o.value=C:null)},{prefix:vue.withCtx(()=>[_hoisted_1$Q]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_2$I,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(s)==C.value?"primary":"",key:C.value,onClick:x=>s.value=C.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.label),1)]),_:2},1032,["type","onClick"]))),128))]),_:1})]),vue.createElementVNode("div",_hoisted_3$B,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{animated:"",loading:vue.unref(v),count:2},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTree),{class:"animated fadeIn",ref_key:"treeRef",ref:a,data:vue.unref(s)=="DWD"?vue.unref(p):vue.unref(f),"node-key":"id","empty-text":"暂无数据","default-expand-all":"","highlight-current":"","filter-node-method":d,onNodeClick:m},{default:vue.withCtx(({node:C,data:x})=>[C.level!=1?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[x.modelCode&&x.openForm!=2?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(["mr-1 -ml-5 text-base ri-checkbox-circle-fill",[x.publishStatus==2?"text-color-success":"text-color-info"]])},null,2)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),x.openForm==2?(vue.openBlock(),vue.createElementBlock("i",_hoisted_4$A)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass({"font-bold":C.level==1})},vue.toDisplayString(x.modelName),3)]),_:1},8,["data"])]),_:1},8,["loading"])])],64)}}}),_withScopeId$l=i=>(vue.pushScopeId("data-v-8dbf5661"),i=i(),vue.popScopeId(),i),_hoisted_1$P={class:"mt-3"},_hoisted_2$H=_withScopeId$l(()=>vue.createElementVNode("td",null,"字段名称",-1)),_hoisted_3$A=_withScopeId$l(()=>vue.createElementVNode("td",null,"字段描述",-1)),_hoisted_4$z=_withScopeId$l(()=>vue.createElementVNode("td",null,"映射字段",-1)),_hoisted_5$u=_withScopeId$l(()=>vue.createElementVNode("td",{width:"120px"},"数据类型",-1)),_hoisted_6$p=_withScopeId$l(()=>vue.createElementVNode("td",null,"数据长度",-1)),_hoisted_7$m=_withScopeId$l(()=>vue.createElementVNode("td",null,"数据标度",-1)),_hoisted_8$k=_withScopeId$l(()=>vue.createElementVNode("td",null,"是否主键",-1)),_hoisted_9$h=_withScopeId$l(()=>vue.createElementVNode("td",null,"唯一校验",-1)),_hoisted_10$g=_withScopeId$l(()=>vue.createElementVNode("td",{style:{width:"50px"}},null,-1)),_hoisted_11$e={class:"sort-target"},_hoisted_12$c={key:0},_hoisted_13$9=["onClick"],_hoisted_14$8=_withScopeId$l(()=>vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-move ri-mouse-line handle text-color-warning"})],-1)),_sfc_main$10=vue.defineComponent({__name:"attribute",props:vue.mergeModels({isRequired:{default:1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i,{expose:n}){const r=vue.useModel(i,"modelValue");vue.getCurrentInstance();const o=vue.ref(null),a=vue.ref({attributeCode:[{required:!0,message:"请输入字段名称"},{pattern:/^[A-Za-z]\w*$/,message:"只能以字母开头,由字母/数字/下划线组成",trigger:"blur"}],attributeComment:[{required:!0,message:"请输入字段描述"}],mapCode:[{required:!0,message:"请输入映射字段"}],dataType:[{required:!0,message:"请选择数据类型"}],dataLength:[{required:!0,message:"请输入数据长度"}],dataScale:[{required:!0,message:"请输入数据标度"}],primaryKey:[{required:!0,message:"请选择是否为主键"}]}),l=p=>{const v=p.dataType;v!=="decimal"&&(p.dataScale=0),["autoIncrement","date","time","datetime","int","bigint","double","text"].includes(v)&&(p.dataLength=0),v==="decimal"&&(p.dataLength=10,p.dataScale=6),v==="varchar"&&(p.dataLength=255)},s=(p,v)=>{p.primaryKey==2&&vue.unref(r).forEach((m,_)=>{_!=v&&(m.primaryKey=1)})},u=()=>{vue.unref(r).push({nanoid:nanoid()})},c=p=>{vue.unref(r).splice(p,1)};return n({validate:async()=>await vue.unref(o).validate(p=>p),isRepeat:()=>{const p=new Map;let v="";for(let g=0;g<vue.unref(r).length;g++){let m=vue.unref(r)[g],_=p.get(m.attributeCode);_!=null&&(v+="字段名称 <strong>"+m.attributeCode+"</strong> 重复(<i>第"+(_+1)+"行和第"+(g+1)+"行</i>);<br>"),p.set(vue.unref(r)[g].attributeCode,g)}return v}}),(p,v)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElForm),{"label-width":"0",model:{modelValue:r.value},size:"small",ref_key:"elFormRef",ref:o,rules:vue.unref(a)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(vueDraggablePlus.VueDraggable),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),target:".sort-target",animation:150,handle:".handle"},{default:vue.withCtx(()=>[vue.createElementVNode("table",_hoisted_1$P,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",{style:{width:"50px"}},[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:u})]),_hoisted_2$H,_hoisted_3$A,_hoisted_4$z,_hoisted_5$u,_hoisted_6$p,_hoisted_7$m,_hoisted_8$k,_hoisted_9$h,_hoisted_10$g]),vue.createElementVNode("tbody",_hoisted_11$e,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(r.value,(g,m)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:g.nanoid},[g.hide?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_12$c,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger",onClick:_=>c(m)},null,8,_hoisted_13$9)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".attributeCode",rules:vue.unref(a).attributeCode},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.attributeCode,"onUpdate:modelValue":_=>g.attributeCode=_,maxlength:"30",showWordLimit:"",placeholder:"字段名称"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".attributeComment",rules:vue.unref(a).attributeComment},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.attributeComment,"onUpdate:modelValue":_=>g.attributeComment=_,maxlength:"30",showWordLimit:"",placeholder:"字段描述"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".mapCode",rules:vue.unref(a).mapCode},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:g.mapCode,"onUpdate:modelValue":_=>g.mapCode=_,maxlength:"30",showWordLimit:"",placeholder:"映射字段"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataType",rules:vue.unref(a).dataType},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:g.dataType,"onUpdate:modelValue":_=>g.dataType=_,placeholder:"数据类型",class:"w-full",teleported:!1,onChange:()=>l(g)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(commonDataType),_=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataLength",rules:vue.unref(a).dataLength},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{min:0,max:2048,"value-on-clear":0,"controls-position":"right",modelValue:g.dataLength,"onUpdate:modelValue":_=>g.dataLength=_,disabled:["autoIncrement","date","time","datetime","int","bigint","double","text"].includes(g.dataType),placeholder:"长度",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElFormItem),{prop:"modelValue."+m+".dataScale",rules:vue.unref(a).dataScale},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInputNumber),{modelValue:g.dataScale,"onUpdate:modelValue":_=>g.dataScale=_,min:0,max:2048,"value-on-clear":0,"controls-position":"right",disabled:!["decimal"].includes(g.dataType),placeholder:"标度",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["prop","rules"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:g.primaryKey,"onUpdate:modelValue":_=>g.primaryKey=_,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1",onChange:()=>s(g,m)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:g.uniqueKey,"onUpdate:modelValue":_=>g.uniqueKey=_,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":"2","inactive-value":"1"},null,8,["modelValue","onUpdate:modelValue"])]),_hoisted_14$8]))],64))),128))])])]),_:1},8,["modelValue"])]),_:1},8,["model","rules"]))}}),attribute_vue_vue_type_style_index_0_scoped_8dbf5661_lang="",Attribute=_export_sfc$2(_sfc_main$10,[["__scopeId","data-v-8dbf5661"]]),_withScopeId$k=i=>(vue.pushScopeId("data-v-a3938966"),i=i(),vue.popScopeId(),i),_hoisted_1$O={class:"flex flex-col h-full"},_hoisted_2$G={class:"flex flex-1 overflow-hidden"},_hoisted_3$z={class:"flex flex-col flex-1 mr-3 overflow-hidden"},_hoisted_4$y={class:"h"},_hoisted_5$t=["onClick"],_hoisted_6$o={class:"mr-1 text-base"},_hoisted_7$l={class:"ml-2 text-xs text-color-info"},_hoisted_8$j={class:"text-color-warning"},_hoisted_9$g={class:"flex justify-end flex-1"},_hoisted_10$f=_withScopeId$k(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_11$d={class:"flex-1 overflow-hidden b"},_hoisted_12$b={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_13$8={class:"h"},_hoisted_14$7=["onClick"],_hoisted_15$3={class:"flex-1 overflow-hidden b"},_hoisted_16$3={class:"flex flex-1 mt-3 overflow-hidden"},_hoisted_17$3={class:"flex flex-col flex-1 mr-3 overflow-hidden"},_hoisted_18$3={class:"flex h"},_hoisted_19$3=["onClick"],_hoisted_20$3={key:0,class:"mr-1 text-color-danger"},_hoisted_21$3={class:"mr-1 text-base"},_hoisted_22$3={key:0,class:"flex justify-end flex-1"},_hoisted_23$3=_withScopeId$k(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_24$2={class:"flex-1 overflow-hidden b"},_hoisted_25$2={key:0,class:"flex items-center justify-center h-full"},_hoisted_26$2=_withScopeId$k(()=>vue.createElementVNode("i",{class:"ri-table-fill"},null,-1)),_hoisted_27$1=_withScopeId$k(()=>vue.createElementVNode("i",{class:"ri-database-2-fill"},null,-1)),_hoisted_28$1={class:"h-full mt-2 overflow-y-auto"},_hoisted_29$1={class:"overflow-y-auto max-h-96",style:{"min-height":"300px"}},_hoisted_30$1=_withScopeId$k(()=>vue.createElementVNode("span",{class:"mr-1 text-color-danger"},"*",-1)),_hoisted_31$1={class:"h-full mt-2 overflow-y-auto"},_hoisted_32$1={class:"mt-2"},_hoisted_33$1={key:0,class:"flex flex-col flex-1 overflow-hidden"},_hoisted_34$1={class:"h"},_hoisted_35$1=["onClick"],_hoisted_36$1={class:"flex-1 overflow-hidden b"},_sfc_main$$=vue.defineComponent({__name:"design",props:{widgetType:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{setFormValue:s,getFormValue:u}=l.$globalHooks.useForm(),{openMessage:c}=l.$globalHooks.useMessage(),d=vue.inject("projectList"),f=vue.computed(()=>{var z,ee;return((ee=(z=(vue.unref(d)??[]).find(le=>le.value==l.$baseGetCurrentProjectId()))==null?void 0:z.ext)==null?void 0:ee.storeType)??"-"}),p=[{label:"SQL编写",value:"1",num:"①"}],v=vue.ref("1"),g=[{label:"SQL执行结果",value:"1"},{label:"SQL执行结果(JSON)",value:"2"}],m=vue.ref("1"),_=vue.ref([]),y=vue.ref(""),b=vue.ref("1"),C=[{label:"插件执行结果",value:"1"},{label:"插件执行结果(JSON)",value:"2"}],x=vue.ref("1"),w=vue.ref(!1),V=vue.ref(null),$=vue.ref(""),S=vue.ref([]),E=vue.ref(""),k=vue.ref([]),P=vue.ref(`function plugin(item){
|
|
616
616
|
var data=JSON.parse(item);
|
|
617
617
|
return JSON.stringify(data)
|
|
618
618
|
}`),T=vue.ref([]),B=vue.ref(!1),N=vue.ref([]),O=vue.ref(!1),D=vue.ref(null),L=vue.ref(""),I=vue.computed(()=>F.find(z=>z.fieldName=="extractType"));vue.watch(w,z=>{z&&!vue.unref(N).length&&Q("javascript",!1)});const j=(z=!1)=>{const ee=R.find(le=>le.fieldName=="modelLayer");z&&(ee.value=""),(ee.options??[]).forEach(le=>{le.disabled=vue.unref(y)=="view",le.value=="ODSVIEW"&&(le.disabled=vue.unref(y)!="view")})},M=vue.ref(""),R=vue.reactive([{name:"项目名称",type:FieldType.Select,fieldName:"projectId",value:"",required:!0,props:{url:"/api/ace-data-center/project/options",label:"label",value:"code"},hide:!0},{name:"模型层级",type:FieldType.Select,fieldName:"modelLayer",value:"",required:!0,props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelLayer",label:"dictValue",value:"dictKey"},optionsSuccess:()=>{j()},changeFunc:z=>{const ee=R.find(se=>se.fieldName==="modelType");ee.required=z.value=="DWD",ee.disabled=z.value!="DWD";const le=`${((z==null?void 0:z.value)??"").toLocaleLowerCase()}_`;M.value=le,R.find(se=>se.fieldName==="modelCode").prepend=vue.h("div",{},le)}},{name:"模型名称",type:FieldType.Text,fieldName:"modelName",value:"",required:!0},{name:"模型表名",type:FieldType.Text,fieldName:"modelCode",value:"",required:!0},{name:"模型类型",type:FieldType.Select,fieldName:"modelType",value:"",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelType",label:"dictValue",value:"dictKey"}}]);vue.watch(y,z=>{_.value=[{label:"输出结果",value:"1",num:"②",isRequired:!1}],z=="view"?_.value.push({label:"输出模型",value:"2",num:"③",isRequired:!1}):o.widgetType=="model-add"?_.value.push({label:"ETL插件编写",value:"2",num:"③",isRequired:!1},{label:"输出模型",value:"3",num:"④",isRequired:!0},{label:"方案作业配置",value:"4",num:"⑤",isRequired:!0}):_.value.push({label:"ETL插件编写",value:"2",num:"③",isRequired:!1},{label:"方案作业配置",value:"4",num:"④",isRequired:!0}),j(!0)},{immediate:!0});const F=vue.reactive([{name:"方案名称",type:FieldType.Text,fieldName:"extractName",value:"",required:!0},{name:"数据流类型",type:FieldType.Radio,fieldName:"streamType",value:"",required:!0,options:[{label:"标准流",value:"STANDARD"},{label:"自定义流",value:"CUSTOM"}]},{name:"抽取方式",type:FieldType.Radio,fieldName:"extractType",value:"",required:!0,options:[{label:"全量抽取",value:"1"},{label:"增量抽取",value:"2"},{label:"协同抽取",value:"3"}],changeFunc:z=>{F.find(le=>le.fieldName=="incrementalField").hide=z.value!=2,F.find(le=>le.fieldName=="incrementalCondition").hide=z.value!=2,F.find(le=>le.fieldName=="incrementalConditionKey").hide=z.value!=2;const ee=F.find(le=>le.fieldName=="clearBeforeExt");ee.hide=z.value!=1,z.isChange&&z.value!=1&&(ee.value="0")}},{name:"清空历史数据",type:FieldType.Radio,fieldName:"clearBeforeExt",value:"",required:!0,options:[{label:"是",value:"1"},{label:"否",value:"0"}],defVal:"0"},{name:"增量字段",type:FieldType.Slot,fieldName:"incrementalField",value:"",required:!0,hide:!0,tip:"该字段必须为本模型字段,并且是SQL结果集中存在的字段"},{name:"增量条件",type:FieldType.Slot,fieldName:"incrementalCondition",value:"",width:"60%"},{name:"增量值",type:FieldType.Text,fieldName:"incrementalConditionKey",width:"40%",value:""},{name:"taskDefinedId",type:FieldType.Text,fieldName:"taskDefinedId",hide:!0},{name:"id",type:FieldType.Text,fieldName:"id",hide:!0}]),W=vue.ref(null),J=(z={})=>{vue.nextTick(()=>{y.value=o.widgetType.indexOf("ODSVIEW")==-1?"dataTable":"view";const ee=((z==null?void 0:z.incrementalCondition)??"").split("=");if(ee.length&&(z.incrementalCondition=ee[0]??"",z.incrementalConditionKey=(ee[1]??"").replace(/^'|'$/g,"")),s(z??{},F),z!=null&&z.taskDefined&&(O.value=!0),o.widgetType.indexOf("ODSVIEW")>=0&&(b.value="2"),E.value=(z==null?void 0:z.extractSql)??"",P.value=(z==null?void 0:z.extractPluginScript)??`function plugin(item){
|
|
@@ -1081,4 +1081,4 @@ var globalSize = 10;`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNo
|
|
|
1081
1081
|
background: transparent;
|
|
1082
1082
|
box-shadow: none;
|
|
1083
1083
|
}
|
|
1084
|
-
`;var __decorate=globalThis&&globalThis.__decorate||function(i,n,r,o){var a=arguments.length,l=a<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,n,r,o);else for(var u=i.length-1;u>=0;u--)(s=i[u])&&(l=(a<3?s(l):a>3?s(n,r,l):s(n,r))||l);return a>3&&l&&Object.defineProperty(n,r,l),l};class Dnd extends View{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(n){super(),this.name="dnd",this.options=Object.assign(Object.assign({},Dnd.defaults),n),this.init()}init(){ensure(this.name,content),this.container=document.createElement("div"),addClass(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new Graph(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),append(this.container,this.draggingGraph.container)}start(n,r){const o=r;o.preventDefault(),this.targetModel.startBatch("dnd"),addClass(this.container,"dragging"),appendTo(this.container,this.options.draggingContainer||document.body),this.sourceNode=n,this.prepareDragging(n,o.clientX,o.clientY);const a=this.updateNodePosition(o.clientX,o.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:o,node:n,cell:n,view:this.draggingView,x:a.x,y:a.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(Dnd.documentEvents,o.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(n,r,o){const a=this.draggingGraph,l=a.model,s=this.options.getDragNode(n,{sourceNode:n,draggingGraph:a,targetGraph:this.targetGraph});s.position(0,0);let u=5;if(this.isSnaplineEnabled()&&(u+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const f=this.targetGraph.transform.getScale();a.scale(f.sx,f.sy),u*=Math.max(f.sx,f.sy)}else a.scale(1,1);this.clearDragging(),l.resetCells([s]);const c=a.findViewByCell(s);c.undelegateEvents(),c.cell.off("changed"),a.fitToContent({padding:u,allowNewOrigin:"any",useCellGeometry:!1});const d=c.getBBox();this.geometryBBox=c.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(d.getTopLeft()),this.draggingNode=s,this.draggingView=c,this.draggingBBox=s.getBBox(),this.padding=u,this.originOffset=this.updateGraphPosition(r,o)}updateGraphPosition(n,r){const o=document.body.scrollTop||document.documentElement.scrollTop,a=document.body.scrollLeft||document.documentElement.scrollLeft,l=this.delta,s=this.geometryBBox,u=this.padding||5,c={left:n-l.x-s.width/2-u+a,top:r-l.y-s.height/2-u+o};return this.draggingGraph&&css(this.container,{left:`${c.left}px`,top:`${c.top}px`}),c}updateNodePosition(n,r){const o=this.targetGraph.clientToLocal(n,r),a=this.draggingBBox;return o.x-=a.width/2,o.y-=a.height/2,this.draggingNode.position(o.x,o.y),o}snap({cell:n,current:r,options:o}){const a=n;if(o.snapped){const l=this.draggingBBox;a.position(l.x+o.tx,l.y+o.ty,{silent:!0}),this.draggingView.translate(),a.position(r.x,r.y,{silent:!0}),this.snapOffset={x:o.tx,y:o.ty}}else this.snapOffset=null}onDragging(n){const r=this.draggingView;if(r){n.preventDefault();const o=this.normalizeEvent(n),a=o.clientX,l=o.clientY;this.updateGraphPosition(a,l);const s=this.updateNodePosition(a,l),u=this.targetGraph.options.embedding.enabled,c=(u||this.isSnaplineEnabled())&&this.isInsideValidArea({x:a,y:l});if(u){r.setEventData(o,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const d=r.getEventData(o);c?r.processEmbedding(o,d):r.clearEmbedding(d),this.candidateEmbedView=d.candidateEmbedView}this.isSnaplineEnabled()&&(c?this.snapline.snapOnMoving({e:o,view:r,x:s.x,y:s.y}):this.snapline.hide())}}onDragEnd(n){const r=this.draggingNode;if(r){const o=this.normalizeEvent(n),a=this.draggingView,l=this.draggingBBox,s=this.snapOffset;let u=l.x,c=l.y;s&&(u+=s.x,c+=s.y),r.position(u,c,{silent:!0});const d=this.drop(r,{x:o.clientX,y:o.clientY}),f=p=>{p?(this.onDropped(r),this.targetGraph.options.embedding.enabled&&a&&(a.setEventData(o,{cell:p,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),a.finalizeEmbedding(o,a.getEventData(o)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};isAsync(d)?(this.undelegateDocumentEvents(),d.then(f)):f(d)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(n){this.draggingNode===n&&(this.clearDragging(),removeClass(this.container,"dragging"),remove(this.container))}onDropInvalid(){const n=this.draggingNode;n&&this.onDropped(n)}isInsideValidArea(n){let r,o=null;const a=this.targetGraph,l=this.targetScroller;this.options.dndContainer&&(o=this.getDropArea(this.options.dndContainer));const s=o&&o.containsPoint(n);if(l)if(l.options.autoResize)r=this.getDropArea(l.container);else{const u=this.getDropArea(l.container);r=this.getDropArea(a.container).intersectsWithRect(u)}else r=this.getDropArea(a.container);return!s&&r&&r.containsPoint(n)}getDropArea(n){const r=offset$1(n),o=document.body.scrollTop||document.documentElement.scrollTop,a=document.body.scrollLeft||document.documentElement.scrollLeft;return Rectangle.create({x:r.left+parseInt(css(n,"border-left-width"),10)-a,y:r.top+parseInt(css(n,"border-top-width"),10)-o,width:n.clientWidth,height:n.clientHeight})}drop(n,r){if(this.isInsideValidArea(r)){const o=this.targetGraph,a=o.model,l=o.clientToLocal(r),s=this.sourceNode,u=this.options.getDropNode(n,{sourceNode:s,draggingNode:n,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),c=u.getBBox();l.x+=c.x-c.width/2,l.y+=c.y-c.height/2;const d=this.snapOffset?1:o.getGridSize();u.position(GeometryUtil.snapToGrid(l.x,d),GeometryUtil.snapToGrid(l.y,d)),u.removeZIndex();const f=this.options.validateNode,p=f?f(u,{sourceNode:s,draggingNode:n,droppingNode:u,targetGraph:o,draggingGraph:this.draggingGraph}):!0;return typeof p=="boolean"?p?(a.addCell(u,{stencil:this.cid}),u):null:toDeferredBoolean(p).then(v=>v?(a.addCell(u,{stencil:this.cid}),u):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),clean(this.name)}}__decorate([View.dispose()],Dnd.prototype,"dispose",null),function(i){i.defaults={getDragNode:n=>n.clone(),getDropNode:n=>n.clone()},i.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}}(Dnd||(Dnd={}));const _hoisted_1$b=["data-type"],_sfc_main$c=vue.defineComponent({__name:"start",props:{label:{default:""}},setup(i){const n=vue.inject("getNode"),r={excel:"ri-file-excel-2-line",sql:"ri-database-2-line",api:"ri-links-line"},o=vue.ref("");if(n){const{modelName:a}=n().data;o.value=a}return(a,l)=>(vue.openBlock(),vue.createElementBlock("div",{"data-type":a.label,class:"w-14 h-14 item text-white flex flex-col items-center justify-center rounded cursor-move start-item"},[vue.createElementVNode("span",null,vue.toDisplayString(vue.unref(o)||a.label),1),vue.createElementVNode("i",{class:vue.normalizeClass([r[(vue.unref(o)||a.label).toLowerCase()],"text-2xl"])},null,2)],8,_hoisted_1$b))}}),start_vue_vue_type_style_index_0_scoped_3e1d0a9f_lang="",Start=_export_sfc$2(_sfc_main$c,[["__scopeId","data-v-3e1d0a9f"]]),_withScopeId$5=i=>(vue.pushScopeId("data-v-35e93650"),i=i(),vue.popScopeId(),i),_hoisted_1$a={class:"widget"},_hoisted_2$8={class:"widget-title"},_hoisted_3$7={class:"flex items-center flex-1"},_hoisted_4$7={key:0,class:"flex items-center justify-start flex-1"},_hoisted_5$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-line"},null,-1)),_hoisted_6$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_7$5={key:0,class:"flex items-center justify-start flex-1"},_hoisted_8$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-folder-received-line"},null,-1)),_hoisted_9$5={class:"flex items-center justify-end flex-1"},_hoisted_10$4=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_11$3={key:0,class:"flex justify-start flex-1"},_hoisted_12$2={key:1,class:"flex items-center justify-end flex-1"},_hoisted_13$1=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-refresh-line"},null,-1)),_hoisted_14$1={key:2,class:"flex items-center justify-end flex-1"},_hoisted_15=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_16={key:0,class:"flex items-center justify-start flex-1"},_hoisted_17=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-line"},null,-1)),_hoisted_18={key:1,class:"flex items-center justify-end flex-1"},_hoisted_19=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-refresh-line"},null,-1)),_hoisted_20={key:2,class:"flex items-center justify-end flex-1"},_hoisted_21=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_22=["innerHTML"],_hoisted_23={class:"widget-container"},_hoisted_24={class:"flex items-center justify-center mr-2"},_hoisted_25={class:"text-yellow-600"},_hoisted_26={class:"text-yellow-600"},_sfc_main$b=vue.defineComponent({__name:"widget",props:{frameType:{default:""},activeName:{default:""},flowSql:{type:[Function,null],default:null},historyClick:{type:[Function,null],default:null},errorClick:{type:[Function,null],default:null},dataImport:{type:[Function,null],default:null},modelList:{type:[Function,null],default:null}},setup(i){const n=i,r={date:"日",month:"月",year:"年"},o=vue.ref({}),a=vue.inject("getNode"),l=vue.computed(()=>vue.unref(s)=="error"?'<i class="text-red-700 ri-error-warning-fill"></i>':vue.unref(s)=="warning"?'<i class="text-yellow-500 ri-error-warning-fill"></i>':'<i class="text-color-success ri-checkbox-circle-fill"></i>'),s=vue.computed(()=>{var v,g;return((g=(v=vue.unref(o))==null?void 0:v.nodeStatus)==null?void 0:g.status)??""}),u=()=>{var v,g;n.flowSql&&n.flowSql({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})},c=()=>{var v,g;n.dataImport&&n.dataImport({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})},d=async()=>{var v;n.historyClick&&n.historyClick((v=vue.unref(o))==null?void 0:v.id,"db_extract")},f=v=>{n.historyClick&&n.historyClick(v)},p=()=>{var v,g;n.modelList&&n.modelList({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})};return a&&(o.value=a().data),(v,g)=>{var m,_,y,b,C;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$a,[vue.createElementVNode("div",_hoisted_2$8,[vue.createElementVNode("span",{class:vue.normalizeClass(["mr-2",vue.unref(o).modelLayer])},vue.toDisplayString(vue.unref(o).modelLayer),3),vue.createElementVNode("div",_hoisted_3$7,[v.activeName=="flow-msg"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(o).modelLayer=="DWD"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$7,[_hoisted_5$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(u,["stop"])},"编辑SQL")])):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"flex items-center justify-end flex-1"},[_hoisted_6$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:d},"抽取记录")])],64)):vue.createCommentVNode("",!0),vue.unref(o).modelLayer=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$5,[_hoisted_8$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(c,["stop"])},"数据导入")])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9$5,[_hoisted_10$4,vue.createElementVNode("span",{class:"cursor-pointer",onClick:g[0]||(g[0]=vue.withModifiers(x=>{var w;return f((w=vue.unref(o))==null?void 0:w.id)},["stop"]))}," 导入历史 ")])],64)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),v.activeName=="flow-monitor"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.unref(o).modelLayer=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(o).selfEventType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$3," 按"+vue.toDisplayString(r[vue.unref(o).selfEventType])+"更新 ",1)):vue.createCommentVNode("",!0),["error","warning"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$2,[_hoisted_13$1,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(c,["stop"])},"去更新")])):vue.createCommentVNode("",!0),["success"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$1,[_hoisted_15,vue.createElementVNode("span",{class:"cursor-pointer",onClick:g[1]||(g[1]=vue.withModifiers(x=>{var w;return f((w=vue.unref(o))==null?void 0:w.id)},["stop"]))}," 历史记录 ")])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),vue.unref(o).modelLayer=="DWD"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16,[_hoisted_17,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(u,["stop"])},"编辑SQL")])):vue.createCommentVNode("",!0),["error","warning"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_18,[_hoisted_19,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(d,["stop"])},"重新运行")])):vue.createCommentVNode("",!0),vue.unref(s)=="success"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_20,[_hoisted_21,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(d,["stop"])},"抽取记录")])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)]),vue.unref(s)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"status",innerHTML:vue.unref(l)},null,8,_hoisted_22)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_23,[vue.createElementVNode("div",_hoisted_24,[vue.createElementVNode("i",{class:"mr-2 text-base cursor-pointer ri-box-3-fill text-color-info",onClick:vue.withModifiers(p,["stop"])}),vue.createElementVNode("span",null,vue.toDisplayString((m=vue.unref(o))==null?void 0:m.modelName),1)]),vue.createElementVNode("div",{class:"cursor-pointer whitespace-nowrap",onClick:g[2]||(g[2]=vue.withModifiers(x=>v.errorClick&&v.errorClick(vue.unref(o)),["stop"]))},[vue.unref(s)=="error"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createElementVNode("span",_hoisted_25,vue.toDisplayString((_=vue.unref(o))==null?void 0:_.nodeStatus.extractErrorCount)+"失败",1),vue.createTextVNode(" /"+vue.toDisplayString((y=vue.unref(o))==null?void 0:y.nodeStatus.extractAllCount),1)],64)):vue.createCommentVNode("",!0),vue.unref(s)=="warning"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createElementVNode("span",_hoisted_26,vue.toDisplayString((b=vue.unref(o))==null?void 0:b.nodeStatus.extractNotStartedCount)+"未更新 ",1),vue.createTextVNode(" /"+vue.toDisplayString((C=vue.unref(o))==null?void 0:C.nodeStatus.extractAllCount),1)],64)):vue.createCommentVNode("",!0)])])])}}}),widget_vue_vue_type_style_index_0_scoped_35e93650_lang="",Widget=_export_sfc$2(_sfc_main$b,[["__scopeId","data-v-35e93650"]]);function useFlow(i,n,r,o){const{proxy:a}=vue.getCurrentInstance(),l={circle:{r:4,magnet:!0,stroke:"#2D8CF0",strokeWidth:2,fill:"#fff",style:{visibility:"hidden"}}},s={groups:{top:{position:"top",attrs:l},bottom:{position:"bottom",attrs:l},left:{position:"left",attrs:l},right:{position:"right",attrs:l}},items:[{group:"top"},{group:"bottom"},{group:"left"},{group:"right"}]},u=vue.ref(null),c=vue.ref(null),d=vue.ref(null),f=vue.ref(!1),p=vue.ref(null),v=vue.ref("flow-msg"),g=vue.ref({canRedo:!1,canUndo:!1});register({shape:"Start",width:56,height:56,component:Start}),register({shape:"Widget",width:210,height:70,component:{render:()=>vue.h(Widget,{frameType:n,activeName:v.value,historyClick:(C,x)=>{if(!C){a.$message.warning("暂无数据");return}o&&o("flow-history-click",{modelId:C,businessType:x,table:x=="db_extract"?[{label:"执行时间",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum",func:w=>w.failNum??0},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]:null,ajaxUrl:x=="db_extract"?`/api/ace-data-center/extract-log/listCollaborateExtractLogPage?descs=create_time&modelId=${C}`:""})},errorClick:C=>{a.$baseEventBus.emit("flow-warning-list",C)},dataImport:C=>{o&&o("flow-data-import",C)},modelList:C=>{o&&o("flow-model-data",C)},flowSql:C=>{o&&o("flow-sql",C)}})}}),vue.nextTick(()=>{const C=document.getElementById(i);C&&(u.value=new Graph({container:C,autoResize:!0,panning:!1,mousewheel:!1,background:{color:"#F2F7FA"},connecting:{router:"manhattan",connector:{name:"rounded",args:{radius:20}},anchor:"center",connectionPoint:"anchor",allowBlank:!1,highlight:!0,allowLoop:!1,allowMulti:!1,snap:{radius:20},createEdge(){return new Edge({attrs:{line:{stroke:"#A2B1C3",strokeWidth:2,targetMarker:{name:"block",width:12,height:8},style:{animation:"ant-line 30s infinite linear"}}},zIndex:0,position:{distance:.5}})}},grid:{visible:!0,type:"mesh",args:{color:"#eeeeee",thickness:2}}}),vue.unref(u).use(new Snapline({enabled:!0})).use(new Keyboard({enabled:!0})).use(new Selection({enabled:!0})).use(new History({enabled:!0})).use(new Clipboard({enabled:!0})).use(new Scroller({pannable:!0})),r&&r(),vue.unref(u).on("history:change",()=>{g.value.canRedo=vue.unref(u).canRedo(),g.value.canUndo=vue.unref(u).canUndo()}),vue.unref(u).on("node:mouseenter",()=>{const x=C.querySelectorAll(".x6-port-body");for(let w=0,V=x.length;w<V;w+=1)x[w].style.visibility="visible"}),vue.unref(u).on("node:mouseleave",()=>{const x=C.querySelectorAll(".x6-port-body");for(let w=0,V=x.length;w<V;w+=1)x[w].style.visibility="hidden"}),vue.unref(u).on("cell:click",x=>{const{cell:w}=x;w.isNode()&&(d.value=w.data,p.value=w),f.value=!0}),vue.unref(u).on("blank:click",({})=>{d.value=null,f.value=!1}),vue.unref(u).on("edge:connected",x=>{b()}),vue.unref(u).on("edge:removed",x=>{const{cell:w}=x;vue.unref(u).getNodes().find($=>w.target.cell==$.id),b()}),vue.unref(u).bindKey(["meta+z","ctrl+z"],()=>{m("undo")}),vue.unref(u).bindKey(["meta+shift+z","ctrl+shift+z"],()=>{m("redo")}),vue.unref(u).bindKey("backspace",()=>{m("delete")}),vue.unref(u).bindKey(["ctrl+1","meta+1"],()=>{m("zoom-in")}),vue.unref(u).bindKey(["ctrl+2","meta+2"],()=>{m("zoom-out")}),c.value=new Dnd({target:u.value,scaled:!1,validateNode:x=>{const{cells:w}=vue.unref(u).toJSON();if(w.some(V=>V.shape=="Start")&&x.shape=="Start")return elementPlus.ElMessage({type:"warning",message:"开始节点只允许一个",plain:!0}),!1;if(w.some(V=>{var $,S;return(($=V==null?void 0:V.data)==null?void 0:$.id)==((S=x==null?void 0:x.data)==null?void 0:S.id)})&&x.shape=="Widget")return elementPlus.ElMessage({type:"warning",message:"已存在模型",plain:!0}),!1;vue.unref(u).cleanSelection(),setTimeout(()=>{vue.unref(u).select(x),d.value=x.data})}}))});const m=C=>{switch(C){case"zoom-in":vue.unref(u).zoom()<1.5&&vue.unref(u).zoom(.1);break;case"zoom-out":vue.unref(u).zoom()>.5&&vue.unref(u).zoom(-.1);break;case"undo":if(vue.unref(v)=="flow-monitor")return;vue.unref(u).canUndo()&&(vue.unref(u).undo(),d.value=null);break;case"redo":if(vue.unref(v)=="flow-monitor")return;vue.unref(u).canRedo()&&(vue.unref(u).redo(),d.value=null);break;case"copy":if(vue.unref(v)=="flow-monitor")return;const x=vue.unref(u).getSelectedCells();if(x.length){vue.unref(u).copy(x),elementPlus.ElMessage({type:"success",message:"复制成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未选择模型",plain:!0});break;case"paste":if(vue.unref(v)=="flow-monitor")return;if(!vue.unref(u).isClipboardEmpty()){const w=vue.unref(u).paste({offset:32});vue.unref(u).cleanSelection(),vue.unref(u).select(w),elementPlus.ElMessage({type:"success",message:"粘贴成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未复制模型",plain:!0});break;case"delete":{if(vue.unref(v)=="flow-monitor")return;const w=vue.unref(u).getSelectedCells();if(w.length){vue.unref(u).removeCells(w),d.value=null,elementPlus.ElMessage({type:"success",message:"删除成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未选择模型",plain:!0})}break}},_=C=>{if(v.value=="flow-monitor")return;const x=C.currentTarget,w=x.getAttribute("data-type");let V=null;switch(w.toLowerCase()){case"sql":case"api":case"excel":V=vue.unref(u).createNode({shape:"Start",ports:{groups:{bottom:{position:"bottom",attrs:l}},items:[{group:"bottom"}]},data:{modelName:w}});break;case"widget":V=vue.unref(u).createNode({shape:"Widget",ports:s,data:JSON.parse(x.getAttribute("data-value"))});break}vue.unref(c).start(V,C)},y={date:"日",month:"月",year:"年"},b=()=>{const C=vue.unref(u).getNodes();vue.unref(u).getEdges().forEach((w,V)=>{if(vue.unref(v)=="flow-monitor"){w.removeLabelAt(0);return}const $=C.find(S=>w.source.cell==S.id);C.find(S=>w.target.cell==S.id),$&&w.setLabels({attrs:{label:{text:$!=null&&$.data.selfEventType?`按${y[$==null?void 0:$.data.selfEventType]??""}`:"",fill:"#000",fontSize:12},body:{ref:"label",fill:"#fff",stroke:"#ffa940",strokeWidth:1,rx:4,ry:4,refWidth:"160%",refHeight:"160%",refX:"-30%",refY:"-30%"}}})})};return{graph:u,activeName:v,nodeObj:p,state:g,isDelete:f,selectWidget:d,handleEvent:m,handleStartDrag:_,handleSetLabels:b}}const _withScopeId$4=i=>(vue.pushScopeId("data-v-9b0e7581"),i=i(),vue.popScopeId(),i),_hoisted_1$9=_withScopeId$4(()=>vue.createElementVNode("div",{class:"title"},[vue.createElementVNode("i",{class:"ri-play-circle-line"}),vue.createElementVNode("span",null,"系统开始节点")],-1)),_hoisted_2$7={class:"mb-4 start"},_hoisted_3$6=_withScopeId$4(()=>vue.createElementVNode("i",{class:"ri-search-line"},null,-1)),_hoisted_4$6={class:"flex justify-between mt-2 mb-2 title"},_hoisted_5$4=_withScopeId$4(()=>vue.createElementVNode("i",{class:"ri-play-circle-line"},null,-1)),_hoisted_6$4={key:0},_hoisted_7$4=["data-value"],_hoisted_8$4=_withScopeId$4(()=>vue.createElementVNode("i",{class:"mr-2 text-base ri-box-3-fill text-color-info"},null,-1)),_hoisted_9$4={class:"flex-1 overflow-hidden whitespace-nowrap text-ellipsis"},_hoisted_10$3={key:1,class:"overflow-hidden font-bold whitespace-nowrap text-ellipsis"},_sfc_main$a=vue.defineComponent({__name:"menu",emits:["mouse-down","flow-dropdown-command"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),{loadModelMenu:l}=fetch$1(a).model,s=vue.ref(""),u=vue.ref([{label:"Excel"},{label:"Sql"},{label:"Api"}]),c=vue.ref([]),d=vue.ref(!0),f=vue.ref(null),p=vue.inject("frameType"),v=()=>{c.value=[],d.value=!0,Promise.all([l({modelLayer:"ODS"}),l({modelLayer:"DWD"})]).then(y=>{d.value=!1,y.forEach((b,C)=>{c.value.push({label:["ODS数据接入","DWD数据接入"][C],buttons:C?[{label:"抽取模型",value:"extract"}]:[{label:"数据源导入模型",value:"conn"},{label:"SQL新建模型",value:"sql"},{label:"手动新建模型",value:"normal"},{label:"Excel新建模型",value:"excel"}],list:Object.keys(b.data).map(x=>({modelName:x,id:x,children:b.data[x]}))})}),d.value=!1})};v(),vue.watch(s,y=>{vue.unref(f).forEach(b=>{b.filter(y)})});const g=(y,b)=>y?b.modelName.includes(y):!0,m=y=>{o("flow-dropdown-command",y)},_=y=>o("mouse-down",y);return n({init:v}),(y,b)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[_hoisted_1$9,vue.createElementVNode("div",_hoisted_2$7,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),C=>(vue.openBlock(),vue.createBlock(Start,{key:C.value,label:C.label,onMousedown:_},null,8,["label"]))),128))]),vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(s),"onUpdate:modelValue":b[0]||(b[0]=C=>vue.isRef(s)?s.value=C:null),class:"mb-2"},{prefix:vue.withCtx(()=>[_hoisted_3$6]),_:1},8,["modelValue"]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(d),animated:"",count:2},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c),C=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:C.label},[vue.createElementVNode("div",_hoisted_4$6,[vue.createElementVNode("div",null,[_hoisted_5$4,vue.createElementVNode("span",null,vue.toDisplayString(C.label),1)]),vue.unref(p)=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,[vue.createVNode(vue.unref(elementPlus.ElDropdown),{onCommand:m},{dropdown:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDropdownMenu),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(C.buttons,x=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdownItem),{key:x.value,command:x.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(x.label),1)]),_:2},1032,["command"]))),128))]),_:2},1024)]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",plain:""},{default:vue.withCtx(()=>[vue.createTextVNode("创建模型")]),_:1})]),_:2},1024)])):vue.createCommentVNode("",!0)]),vue.createVNode(vue.unref(elementPlus.ElTree),{data:C.list,ref_for:!0,ref_key:"treeRef",ref:f,"filter-node-method":g,"empty-text":"暂无数据"},{default:vue.withCtx(({node:x,data:w})=>[x.level!=1?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"-ml-5 items","data-type":"widget",onMousedown:_,"data-value":JSON.stringify(w)},[_hoisted_8$4,vue.createElementVNode("span",_hoisted_9$4,vue.toDisplayString(w.modelName),1)],40,_hoisted_7$4)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_10$3,vue.toDisplayString(w.modelName),1))]),_:2},1032,["data"])],64))),128))]),_:1},8,["loading"])],64))}}),menu_vue_vue_type_style_index_0_scoped_9b0e7581_lang="",Menu=_export_sfc$2(_sfc_main$a,[["__scopeId","data-v-9b0e7581"]]),_hoisted_1$8={class:"selectWidget animated fadeIn"},_sfc_main$9=vue.defineComponent({__name:"selectWidget",props:{selectWidget:{default:null},options:{default:{}}},emits:["change"],setup(i,{emit:n}){const r=n,o=[{label:"按日",value:"date"},{label:"按月",value:"month"},{label:"按年",value:"year"}],a=[{label:"按日",value:"date"},{label:"按月-需每天数据齐全",value:"every_day_of_month"},{label:"按月-仅需某天有数据",value:"some_day_of_month"},{label:"按年-需每月数据齐全",value:"every_month_of_year"},{label:"按年-仅需某月有数据",value:"some_month_of_year"}],l=(s,u)=>{r("change",s,u)};return(s,u)=>{const c=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,[vue.createVNode(c,{title:"编辑",class:"mb-4"}),vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"80px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"名称"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(s.selectWidget.modelName),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"触发本节点"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:s.selectWidget.triggerEventType,"onUpdate:modelValue":u[0]||(u[0]=d=>s.selectWidget.triggerEventType=d),onChange:u[1]||(u[1]=d=>l("eventType",d))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(a,d=>vue.createVNode(vue.unref(elementPlus.ElRadio),{key:d.value,value:d.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(d.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"协同下节点"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{filterable:"",modelValue:s.selectWidget.selfEventType,"onUpdate:modelValue":u[2]||(u[2]=d=>s.selectWidget.selfEventType=d),placeholder:"请选择",clearable:!1,"popper-class":"ace-select",onChange:u[3]||(u[3]=d=>l("selfEventType",d))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(o,d=>vue.createVNode(vue.unref(elementPlus.ElOption),{label:d.label,value:d.value,key:d.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"协同字段"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{"popper-class":"ace-select",filterable:"",modelValue:s.selectWidget.collaborateField,"onUpdate:modelValue":u[4]||(u[4]=d=>s.selectWidget.collaborateField=d),placeholder:"请选择",clearable:!1},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.options[s.selectWidget.id]??[],d=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{label:d.attributeComment,value:d.attributeCode,key:d.attributeCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})])}}}),selectWidget_vue_vue_type_style_index_0_scoped_db223b2c_lang="",SelectWidget=_export_sfc$2(_sfc_main$9,[["__scopeId","data-v-db223b2c"]]),_withScopeId$3=i=>(vue.pushScopeId("data-v-1b91fe04"),i=i(),vue.popScopeId(),i),_hoisted_1$7={class:"pannel"},_hoisted_2$6={class:"overflow-hidden w-50"},_hoisted_3$5=_withScopeId$3(()=>vue.createElementVNode("span",{class:"ml-5 mr-2"},"快捷查询:",-1)),_hoisted_4$5=_withScopeId$3(()=>vue.createElementVNode("span",{class:"ml-10 mr-10 text-gray-300"},"|",-1)),_hoisted_5$3={class:"flex flex-1"},_hoisted_6$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"mr-1 text-yellow-500 ri-error-warning-fill"},null,-1)),_hoisted_7$3={class:"flex items-center ml-2 text-color-primary"},_hoisted_8$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"ml-1 ri-menu-line"},null,-1)),_hoisted_9$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"mr-1 text-red-700 ri-error-warning-fill"},null,-1)),_hoisted_10$2={class:"flex items-center ml-2 text-color-primary"},_hoisted_11$2=_withScopeId$3(()=>vue.createElementVNode("i",{class:"ml-1 ri-menu-line"},null,-1)),_sfc_main$8=vue.defineComponent({__name:"monitorPannel",props:{cellsData:{default:()=>[]},msg:{default:{}}},emits:["change"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref([dayjs().subtract(1,"week").format("YYYY-MM-DD"),dayjs().format("YYYY-MM-DD")]),s=vue.ref(""),u=r,c=m=>{s.value=m[0]},d=()=>s.value="",f=()=>{u("change")},p=m=>s.value?m.getTime()<vue.unref(s).getTime()||m.getTime()>=new Date().getTime()||m.getTime()>vue.unref(s).getTime()+30*864e5:m.getTime()>Date.now(),v=m=>{let _="",y=dayjs().format("YYYY-MM-DD");switch(m){case 1:_=`${dayjs().format("YYYY-MM")}-01`;break;case 3:_=dayjs().subtract(3,"month").format("YYYY-MM-DD");break;case 6:_=dayjs().subtract(6,"month").format("YYYY-MM-DD");break}l.value=[_,y],f()},g=()=>{a.$baseEventBus.emit("flow-warning-list",o.cellsData)};return n({value:l}),(m,_)=>{var y,b;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$7,[vue.createElementVNode("div",_hoisted_2$6,[vue.createVNode(vue.unref(elementPlus.ElDatePicker),{modelValue:vue.unref(l),"onUpdate:modelValue":_[0]||(_[0]=C=>vue.isRef(l)?l.value=C:null),type:"daterange",clearable:!1,"start-placeholder":"开始时间","end-placeholder":"结束时间",onVisibleChange:d,onCalendarChange:c,"value-format":"YYYY-MM-DD",onChange:f,"disabled-date":p},null,8,["modelValue"])]),_hoisted_3$5,vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[1]||(_[1]=C=>v(1))}," 本月 "),vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[2]||(_[2]=C=>v(3))}," 前三月 "),vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[3]||(_[3]=C=>v(6))}," 前六月 "),_hoisted_4$5,vue.createElementVNode("div",_hoisted_5$3,[vue.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:g},[_hoisted_6$3,vue.createTextVNode(" 未完成任务 "),vue.createElementVNode("span",_hoisted_7$3,[vue.createTextVNode(vue.toDisplayString((y=m.msg)==null?void 0:y.warning)+" ",1),_hoisted_8$3])]),vue.createElementVNode("div",{class:"flex items-center ml-10 cursor-pointer",onClick:g},[_hoisted_9$3,vue.createTextVNode(" 协同失败 "),vue.createElementVNode("span",_hoisted_10$2,[vue.createTextVNode(vue.toDisplayString((b=m.msg)==null?void 0:b.error)+" ",1),_hoisted_11$2])])])])}}}),monitorPannel_vue_vue_type_style_index_0_scoped_1b91fe04_lang="",monitorPannel=_export_sfc$2(_sfc_main$8,[["__scopeId","data-v-1b91fe04"]]),_withScopeId$2=i=>(vue.pushScopeId("data-v-e7267060"),i=i(),vue.popScopeId(),i),_hoisted_1$6={key:0,class:"warning fadeIn animated"},_hoisted_2$5={class:"flex justify-end pl-4 pr-4"},_hoisted_3$4={class:"flex-1 pl-4 pr-4 overflow-y-auto"},_hoisted_4$4={class:"mt-2 mb-4"},_hoisted_5$2=["onClick"],_hoisted_6$2=_withScopeId$2(()=>vue.createElementVNode("i",{class:"mr-2 text-base ri-box-3-fill"},null,-1)),_hoisted_7$2={class:"whitespace-nowrap"},_hoisted_8$2={class:"ml-4 mr-2 overflow-hidden whitespace-nowrap text-ellipsis"},_hoisted_9$2={class:"whitespace-nowrap"},_sfc_main$7=vue.defineComponent({__name:"warningList",emits:["click-element"],setup(i,{emit:n}){const{proxy:r}=vue.getCurrentInstance(),o=n,a=vue.ref(!1),l=vue.ref([]),s=vue.computed(()=>{const d=[],f=vue.unref(l).filter(v=>v.status=="warning"),p=vue.unref(l).filter(v=>v.status=="error");return f.length&&d.push({label:"未完成任务",list:f}),p.length&&d.push({label:"协同失败",list:p}),d});r.$baseEventBus.on("flow-warning-list",d=>{var f;if(l.value=[],d.toString()=="close"){a.value=!1;return}if(Array.isArray(d)?d.filter(p=>p.shape=="Widget").forEach(p=>{var v,g,m,_;u(((g=(v=p==null?void 0:p.data)==null?void 0:v.nodeStatus)==null?void 0:g.nodeStatusMap)??{},((m=p==null?void 0:p.data)==null?void 0:m.id)??"",((_=p==null?void 0:p.data)==null?void 0:_.modelName)??"")}):u(((f=d==null?void 0:d.nodeStatus)==null?void 0:f.nodeStatusMap)??{},(d==null?void 0:d.id)??"",(d==null?void 0:d.modelName)??""),!vue.unref(l).length){r.$message.warning("暂无错误信息"),a.value=!1;return}a.value=!0});const u=(d,f,p)=>{Object.keys(d).forEach(v=>{var g,m;d[v]||l.value.push({time:v,id:f,label:p,status:"warning"}),(((g=d[v])==null?void 0:g.failNum)>0||((m=d[v])==null?void 0:m.totalNum)===0)&&l.value.push({time:v,id:f,label:p,status:"error"})})},c=d=>{o("click-element",d)};return vue.onBeforeUnmount(()=>{r.$baseEventBus.off("flow-warning-list")}),(d,f)=>{const p=vue.resolveComponent("aceHeader");return vue.unref(a)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$6,[vue.createElementVNode("div",_hoisted_2$5,[vue.createElementVNode("i",{class:"text-xl cursor-pointer ri-close-line",onClick:f[0]||(f[0]=v=>a.value=!1)})]),vue.createElementVNode("div",_hoisted_3$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),v=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:v.label},[vue.createVNode(p,{title:v.label},null,8,["title"]),vue.createElementVNode("div",_hoisted_4$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(v.list,(g,m)=>(vue.openBlock(),vue.createElementBlock("div",{class:"flex items-center mt-1 mb-1 text-gray-600 cursor-pointer hover:text-blue-500",onClick:_=>c(g),key:m},[_hoisted_6$2,vue.createElementVNode("span",_hoisted_7$2,vue.toDisplayString(g.time),1),vue.createElementVNode("span",_hoisted_8$2,vue.toDisplayString(g.label),1),vue.createElementVNode("span",_hoisted_9$2,vue.toDisplayString(g.status=="error"?"协同失败":"未更新"),1)],8,_hoisted_5$2))),128))])],64))),128))])])):vue.createCommentVNode("",!0)}}}),warningList_vue_vue_type_style_index_0_scoped_e7267060_lang="",warningList=_export_sfc$2(_sfc_main$7,[["__scopeId","data-v-e7267060"]]),_hoisted_1$5={class:"flex flex-col flex-1"},_sfc_main$6=vue.defineComponent({__name:"backend",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(""),u=vue.ref(!1),c=vue.ref(!1),d=vue.ref(!1),f=g=>{a.$refs[`${g}Ref`].init()},p=(g,m)=>{switch(g){case"flow-history-click":a.$refs.modelExtractLogRef.init({businessId:m.modelId,businessType:"file_extract",table:[{label:"日期",prop:"createTime"},{label:"文件名",prop:"file",slot:!0},{label:"抽取方式",prop:"createTime",func:_=>{var y;return((y=JSON.parse(_.businessSnapshot||"{}"))==null?void 0:y.extractType)==2?"覆盖":"追加"}},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"flow-data-extract":a.$refs.modelExtractLogRef.init({businessId:m.modelId,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}],ajaxUrl:`/api/ace-data-center/extract-log/listCollaborateExtractLogPage?modelId=${m.modelId}&descs=create_time`});break;case"flow-sql":l.value=m.modelId,u.value=!0;break;case"flow-data-import":c.value=!0,vue.nextTick(()=>{a.$refs.modelViewRef.init({id:m.modelId})});break;case"flow-model-data":s.value=m.modelName,l.value=m.modelId,d.value=!0;break}},v=()=>{o("success")};return n({flowDropdownCommand:f,init:p}),(g,m)=>{const _=vue.resolveComponent("aceModelConn"),y=vue.resolveComponent("aceModelSql"),b=vue.resolveComponent("aceModelNormal"),C=vue.resolveComponent("aceModelExcel"),x=vue.resolveComponent("aceModelExtract"),w=vue.resolveComponent("aceModelExtractLog"),V=vue.resolveComponent("aceModelDbExtract"),$=vue.resolveComponent("AppDrawer"),S=vue.resolveComponent("aceModelView"),E=vue.resolveComponent("aceDynamicList");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(_,{ref:"connRef",permission:[],onSuccess:m[0]||(m[0]=k=>v())},null,512),vue.createVNode(y,{ref:"sqlRef",permission:[],onSuccess:m[1]||(m[1]=k=>v())},null,512),vue.createVNode(b,{ref:"normalRef",permission:[],onSuccess:m[2]||(m[2]=k=>v())},null,512),vue.createVNode(C,{ref:"excelRef",permission:[],onSuccess:m[3]||(m[3]=k=>v())},null,512),vue.createVNode(x,{ref:"extractRef",permission:[],onSuccess:m[4]||(m[4]=k=>v())},null,512),vue.createVNode(w,{ref:"modelExtractLogRef"},null,512),vue.createVNode($,{modelValue:vue.unref(u),"onUpdate:modelValue":m[5]||(m[5]=k=>vue.isRef(u)?u.value=k:null),title:"编辑SQL",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(V,{model:{id:vue.unref(l)}},null,8,["model"])]),_:1},8,["modelValue"]),vue.createVNode($,{modelValue:vue.unref(c),"onUpdate:modelValue":m[6]||(m[6]=k=>vue.isRef(c)?c.value=k:null),title:"数据导入",size:"90%"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$5,[vue.createVNode(S,{ref:"modelViewRef",type:"ODS",permission:["EXCEL_EXTRACT"]},null,512)])]),_:1},8,["modelValue"]),vue.createVNode($,{modelValue:vue.unref(d),"onUpdate:modelValue":m[7]||(m[7]=k=>vue.isRef(d)?d.value=k:null),title:"模型数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(E,{id:vue.unref(l),title:vue.unref(s),showPageIndex:!0,isDownLoad:!1,ref:"AppDynamicListRef"},null,8,["id","title"])]),_:1},8,["modelValue"])],64)}}}),_withScopeId$1=i=>(vue.pushScopeId("data-v-4a3a652a"),i=i(),vue.popScopeId(),i),_hoisted_1$4={class:"text-base w-72 text-color-primary"},_hoisted_2$4=_withScopeId$1(()=>vue.createElementVNode("i",{class:"mr-1 text-xl ri-file-text-line"},null,-1)),_hoisted_3$3=["contenteditable"],_hoisted_4$3={class:"flex items-center flex-1 -ml-3"},_hoisted_5$1={key:0,class:"ml-2 mr-4 text-gray-200"},_hoisted_6$1=["onClick"],_hoisted_7$1={key:0,class:"absolute bg-white rounded-full -right-2 -top-2"},_hoisted_8$1={key:0,class:"text-red-700 ri-error-warning-fill"},_hoisted_9$1={key:1,class:"text-yellow-500 ri-error-warning-fill"},_hoisted_10$1={key:1,class:"loading"},_hoisted_11$1=_withScopeId$1(()=>vue.createElementVNode("i",{class:"ri-loader-line text-color-primary"},null,-1)),_hoisted_12$1=[_hoisted_11$1],_hoisted_13=_withScopeId$1(()=>vue.createElementVNode("div",{class:"h-full flow-main",id:"graph-container"},null,-1)),_hoisted_14=_withScopeId$1(()=>vue.createElementVNode("div",{id:"minimap",class:"absolute bottom-0 right-0"},null,-1)),_sfc_main$5=vue.defineComponent({__name:"index",props:{frameType:{default:"backend"}},setup(i){const n=i;vue.provide("frameType",n.frameType),vue.provide("getNode",null);const{proxy:r}=vue.getCurrentInstance(),{allModelAttribute:o}=fetch$1(r).model,{saveCollaborateFlow:a,detailCollaborateFlow:l,updateCollaborateFlow:s,collaborateExecRecordFlow:u}=fetch$1(r).collaborateFlow,c=vue.ref(null),d=vue.inject("local"),f=vue.ref([{label:"放大",key:"zoom-in",icon:"ri-zoom-in-line"},{label:"缩小",key:"zoom-out",icon:"ri-zoom-out-line"},{label:"前进",key:"redo",icon:"ri-arrow-go-forward-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"回退",key:"undo",icon:"ri-arrow-go-back-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"删除",key:"delete",icon:"ri-delete-bin-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"保存",key:"submit",icon:"ri-save-line",disabled:()=>vue.unref(_)=="flow-monitor",click:async()=>{var L,I,j,M;if(vue.unref(_)=="flow-monitor")return;const O={collaborateJson:JSON.stringify(vue.unref(m).toJSON()),name:vue.unref(g).name||"未命名",id:void 0};(L=vue.unref(g))!=null&&L.id&&(O.name=(I=vue.unref(g))==null?void 0:I.name,O.id=(j=vue.unref(g))==null?void 0:j.id),await((M=vue.unref(g))!=null&&M.id?s(O):a(O))&&(r.$message.success("保存成功"),k())}},{type:"middle"},{label:"流程信息",key:"flow-msg",icon:"ri-flow-chart",click:()=>{_.value="flow-msg",$.value=null,k()}},{label:"流程监控",key:"flow-monitor",icon:"ri-webcam-line",click:()=>{_.value="flow-monitor",P()}},{label:"数据质量",key:"flow-quality",icon:"ri-terminal-box-line"}]),p=vue.ref({}),v=vue.ref(!1),g=vue.ref({}),{graph:m,activeName:_,nodeObj:y,state:b,isDelete:C,handleStartDrag:x,handleEvent:w,handleSetLabels:V,selectWidget:$}=useFlow("graph-container",n.frameType,()=>{k()},(O,D)=>{vue.unref(c).init(O,D)});vue.watch($,O=>{!O||vue.unref(p)[O==null?void 0:O.id]||!(O!=null&&O.id)||o({modelId:O.id}).then(D=>{vue.unref(p)[O.id]=D.data})});const S=vue.ref([]),E=vue.computed(()=>{let O=0,D=0;return vue.unref(S).filter(L=>L.shape=="Widget").forEach(L=>{var I,j;Object.values(((j=(I=L==null?void 0:L.data)==null?void 0:I.nodeStatus)==null?void 0:j.nodeStatusMap)??[]).forEach(M=>{M||(D+=1),((M==null?void 0:M.failNum)>0||(M==null?void 0:M.totalNum)===0)&&(O+=1)})}),{error:O,warning:D}}),k=async()=>{vue.unref(m).clearCells(),v.value=!0;const O=await l({});if(v.value=!1,!O.data){g.value={name:"未命名"};return}O.data.name||(O.data.name="未命名"),g.value=O.data;const D=O.data.collaborateJson;vue.unref(m).fromJSON(JSON.parse(D)),vue.unref(m).centerContent(),V(),P(!1)};r.$baseEventBus.on("desk-refresh",()=>P());const P=async(O=!0)=>{O&&(v.value=!0,vue.unref(m).clearCells()),vue.nextTick(async()=>{const D=r.$refs.monitorPannelRef,L=await u({startTime:(D==null?void 0:D.value[0])??dayjs().subtract(1,"week").format("YYYY-MM-DD"),endTime:(D==null?void 0:D.value[1])??dayjs().format("YYYY-MM-DD")});O&&(v.value=!1),L&&(L.data.cells.filter(I=>I.shape=="Widget").forEach(I=>{const j=L.data.nodeStatus[I.id];I.data.nodeStatus=j??{}}),O&&(vue.unref(m).fromJSON(L.data.cells),vue.unref(m).centerContent()),S.value=L.data.cells)})},T=(O,D)=>{if(O==="selfEventType"){const L=vue.unref(m).getNodes();vue.unref(m).getConnectedEdges(vue.unref(y),{incoming:!1,outgoing:!0}).forEach(j=>{const M=L.find(R=>j.target.cell==R.id);M&&(M.data.triggerEventType=D)}),V()}},B=O=>{const{cells:D}=vue.unref(m).toJSON(),L=vue.unref(m).getNodes();vue.unref(m).cleanSelection(),setTimeout(()=>{const I=L.find(j=>{var M;return j.id==((M=D.find(R=>R.shape=="Widget"&&(R==null?void 0:R.data.id)==O.id))==null?void 0:M.id)});I&&vue.unref(m).select(I)})},N=()=>{r.$refs.menuRef.init()};return(O,D)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"flex flex-col h-full overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(d)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElHeader),{class:"flex items-center flow-header"},{default:vue.withCtx(()=>{var L;return[vue.createElementVNode("div",_hoisted_1$4,[_hoisted_2$4,vue.createElementVNode("span",{contenteditable:vue.unref(_)=="flow-msg",class:"flex-1 outline-none cursor-text contenteditable",onBlur:D[0]||(D[0]=I=>vue.unref(g).name=vue.unref(g).name||"未命名"),onInput:D[1]||(D[1]=I=>vue.unref(g).name=I.target.innerText)},vue.toDisplayString((L=vue.unref(g))==null?void 0:L.name),41,_hoisted_3$3)]),vue.createElementVNode("div",_hoisted_4$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),I=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:I.key},[I.type=="middle"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$1,"|")):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["relative widget-action",[I.key,vue.unref(_)==I.key?"active":"",I.disabled&&I.disabled()?"text-color-info":"",!vue.unref(b).canUndo&&I.key=="undo"||!vue.unref(b).canRedo&&I.key=="redo"||I.key=="delete"&&!vue.unref(C)?"text-color-info":""]]),onClick:j=>(I.click&&I.click())??vue.unref(w)(I.key)},[vue.createElementVNode("i",{class:vue.normalizeClass(I.icon)},null,2),vue.createElementVNode("span",null,vue.toDisplayString(I.label),1),I.key=="flow-monitor"?(vue.openBlock(),vue.createElementBlock("span",_hoisted_7$1,[vue.unref(E).error?(vue.openBlock(),vue.createElementBlock("i",_hoisted_8$1)):vue.unref(E).warning?(vue.openBlock(),vue.createElementBlock("i",_hoisted_9$1)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)],10,_hoisted_6$1))],64))),128))])]}),_:1}),vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden"},{default:vue.withCtx(()=>[vue.unref(_)!="flow-monitor"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"flow-aside",width:"288px"},{default:vue.withCtx(()=>[vue.createVNode(Menu,{ref:"menuRef",onMouseDown:vue.unref(x),onFlowDropdownCommand:D[2]||(D[2]=L=>vue.unref(c).flowDropdownCommand(L))},null,8,["onMouseDown"])]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElMain),{class:"relative"},{default:vue.withCtx(()=>[vue.unref(_)=="flow-monitor"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(monitorPannel,{ref:"monitorPannelRef",cellsData:vue.unref(S),msg:vue.unref(E),onChange:P},null,8,["cellsData","msg"]),vue.createVNode(warningList,{ref:"warningListRef",onClickElement:B},null,512)],64)):vue.createCommentVNode("",!0),vue.unref(v)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$1,_hoisted_12$1)):vue.createCommentVNode("",!0),_hoisted_13,_hoisted_14,vue.unref($)&&vue.unref(_)=="flow-msg"?(vue.openBlock(),vue.createBlock(SelectWidget,{key:2,selectWidget:vue.unref($),options:vue.unref(p),onChange:T},null,8,["selectWidget","options"])):vue.createCommentVNode("",!0)]),_:1})]),_:1}),vue.createVNode(_sfc_main$6,{ref_key:"backendRef",ref:c,onSuccess:N},null,512)]),_:1},8,["locale"])]),_:1}))}}),index_vue_vue_type_style_index_0_scoped_4a3a652a_lang="",aceFlow=_export_sfc$2(_sfc_main$5,[["__scopeId","data-v-4a3a652a"]]),_sfc_main$4=vue.defineComponent({__name:"AppDeep",setup(i,{expose:n}){const{proxy:r}=vue.getCurrentInstance(),{dynamicSearchForm:o,dynamicSearchFormat:a,dynamicSearchParams:l}=r.$aceDynamicSearch(r),s=vue.ref({}),u=vue.ref(null),c=vue.ref(!1),d=vue.ref(""),f=vue.ref({});return n({init:async(v,g={})=>{var x,w,V;const m=await r.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${v}`);if(!m)return;f.value=m.data;const _=JSON.parse(m.data.sortArgsJson??"{}"),y=Object.keys(vue.unref(_)).map($=>({field:$,type:_[$]=="ascending"?"asc":"desc"})),b=a(JSON.parse(((x=m.data)==null?void 0:x.formConfJson)??"[]"));Object.keys(g).forEach($=>{const S=b.find(k=>k.key==$);if(!S)return;let E=g[$];if(S.type.indexOf("yy")>=0){let k="YYYY";S.type.indexOf("yymm")>=0&&(k="YYYY-MM"),S.type.indexOf("yymmdd")>=0&&(k="YYYY-MM-DD"),S.type.indexOf("yymmddhhmmss")>=0&&(k="YYYY-MM-DD HH:mm:ss"),Array.isArray(E)?E=E.map(P=>dayjs(P).format(k)):E=dayjs(E).format(k),Array.isArray(E)&&S.type.indexOf("Range")==-1&&(E=E[0])}S.minValue=Array.isArray(E)?E[0]:E,S.maxValue=Array.isArray(E)?E.at(-1):E,S.value=E.toString()}),o.value=b;const C={aggArgsJson:m.data.aggArgsJson,groupArgsJson:m.data.groupArgsJson,sortArgsJson:JSON.stringify(y),modelIndicatorsId:v,params:l(b),pageSize:m.data.pageSize,modelId:m.data.modelId};c.value=!0,d.value=m.data.name,s.value={x:JSON.parse((w=vue.unref(f))==null?void 0:w.groupArgsJson),y:JSON.parse((V=vue.unref(f))==null?void 0:V.aggArgsJson),params:C}}}),(v,g)=>{const m=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(m,{modelValue:vue.unref(c),"onUpdate:modelValue":g[0]||(g[0]=_=>vue.isRef(c)?c.value=_:null),title:vue.unref(d)},{default:vue.withCtx(()=>[vue.createVNode(IndicatorsView,{ref_key:"indicatorsViewRef",ref:u,dynamicSearchForm:vue.unref(o),result:vue.unref(f),chartData:vue.unref(s)},null,8,["dynamicSearchForm","result","chartData"])]),_:1},8,["modelValue","title"])}}}),_withScopeId=i=>(vue.pushScopeId("data-v-3faf0ae5"),i=i(),vue.popScopeId(),i),_hoisted_1$3=["onClick"],_hoisted_2$3=["onClick"],_hoisted_3$2={class:"flex"},_hoisted_4$2=["onClick"],_hoisted_5=["width","height"],_hoisted_6=["fill"],_hoisted_7=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-file-text-line"},null,-1)),_hoisted_8=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-bar-chart-box-line"},null,-1)),_hoisted_9=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-computer-line"},null,-1)),_hoisted_10=_withScopeId(()=>vue.createElementVNode("i",{class:"text-white ri-close-circle-fill"},null,-1)),_hoisted_11=[_hoisted_10],_hoisted_12=["src"],_sfc_main$3=vue.defineComponent({__name:"AppCustomChart",props:{option:{default:{}},chartType:{default:""},maxHeight:{default:"350px"},renderer:{default:"canvas"},loading:{type:Boolean,default:!1},isBigScreen:{type:Boolean,default:!1},isCheckClick:{type:Boolean,default:!0},indicatorsId:{default:""},renderId:{default:""},params:{default:{}},modelType:{default:""}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance();r.$aceDynamicSearch(r);const o=r.$globalHooks.useRouter(),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(!1),d=vue.ref(null),f=vue.computed(()=>{if(n.chartType!="8")return[];const Y=n.option.dataset.dimensions.map(oe=>{var z,ee;return(z=n.option)!=null&&z.customSeriesData[oe]?{key:oe,textAlign:"center",...(ee=n.option)==null?void 0:ee.customSeriesData[oe]}:{}});return n.option.showIndex?[{textAlign:"center",index:!0,key:n.option.indexHeader,width:n.option.indexWidth,headColor:"#fff"},...Y]:Y}),p=Y=>{var z;const{toFixed:oe}=((z=n.option)==null?void 0:z.customSeriesData[Y])??0;return n.option.dataset.source.reduce((ee,le)=>ee+(le[Y]?Number(le[Y]):0),0).toFixed(oe)},v=Y=>{const oe=n.option.customSeriesData[Y];if(!(oe!=null&&oe.sum))return"";const{prefix:z,toFixed:ee,suffix:le,headColor:se,textAlign:K}=oe,Z=n.option.dataset.source.map(U=>Number(U[Y]||0));return Z.every(U=>Number.isNaN(U))?"":`<span style="color: ${se||"#000"};text-align: ${K||"center"}">${z}${Z.reduce((U,q)=>{const X=Number(q);return Number.isNaN(X)?U:U+q},0).toFixed(ee)}${le}</span>`},{init:g}=useMap(),m=vue.ref([n.option.code]),_=vue.ref(null),y=vue.ref(null),b=Y=>(Y.modelIndicatorsId=vue.unref(y).id,Y.row=vue.unref(_),Y),C=Y=>{Y.forEach(oe=>{const z=n.params[`${oe.key}1`]??"",ee=n.params[`${oe.key}2`]??"",le=n.params[oe.key]??"";z!==""&&(oe.minValue=z),ee!==""&&(oe.maxValue=ee),oe.value=le})},x=vue.reactive({x:0,y:0,isHover:!0,timer:null,data:null}),w=async Y=>{if(Y.seriesType!=="map"){x.x=Y.event.offsetX,x.y=Y.event.offsetY,x.data=Y.value,J();return}if(!n.isCheckClick)return;const{code:oe}=Y.data;n.option.code=oe,vue.unref(m).includes(String(oe))||m.value.push(String(oe)),vue.unref(a).setOption(n.option,!0),g(n.option,()=>{const{x:z,y:ee}=n.option.dataShow;x.data={[z]:Y.data.name,[ee]:Y.data.data},J()})},V=Y=>{var ee,le,se;if(Y.target&&n.chartType=="11"){x.x=Y.offsetX,x.y=Y.offsetY;const K=n.option.dataShow.y;x.data={[K]:(n.option.series[0].data[0]*100).toFixed(2)};return}if(!["1","3","5","11"].includes(n.chartType)||Y.target)return;const oe=[Y.offsetX,Y.offsetY],{dataset:z}=(ee=vue.unref(a))==null?void 0:ee.chart.getOption();if((le=vue.unref(a))!=null&&le.chart.containPixel("grid",oe)){const K=(se=vue.unref(a))==null?void 0:se.chart.convertFromPixel({seriesIndex:0},oe).filter(Z=>Number.isInteger(Z));x.x=Y.offsetX,x.y=Y.offsetY,x.data=z[0].source[Math.abs(K[0])]}if(Y.target&&n.chartType=="11"){x.x=Y.offsetX,x.y=Y.offsetY;const K=n.option.dataShow.y;x.data={[K]:(n.option.series[0].data[0]*100).toFixed(2)}}},$=()=>{clearTimeout(x.timer),x.isHover=!0},S=()=>{(n.isCheckClick||n.indicatorsId)&&(x.timer=setTimeout(()=>{const Y=document.querySelector(":hover");if(!Y||!vue.unref(u).contains(Y)){x.isHover=!1,x.x=0,x.y=0;const oe=document.getElementById(`render-${n.option.id}`);oe&&(oe.style.zIndex=oe.getAttribute("data-z"))}},100))},E=Y=>{const{rowIndex:oe}=Y;x.data=n.option.dataset.source[oe]},k=Y=>{["ceil","row-item"].includes(Y.target.parentElement.className)&&W(Y,vue.unref(d).getBoundingClientRect())},P=(Y,oe)=>{const{rowIndex:z}=oe;x.data=n.option.dataset.source[z],W(Y,vue.unref(d).getBoundingClientRect())},T=(Y,oe)=>{x.data={[oe]:p(oe)},W(Y,vue.unref(s).getBoundingClientRect())},B=(Y,oe)=>{x.data={[oe]:p(oe)},W(Y,vue.unref(s).getBoundingClientRect())},N=async()=>{if(!n.isCheckClick||!n.indicatorsId)return;const Y=`/api/ace-data-center/model-indicators/detail?id=${n.indicatorsId}`,oe=await r.$baseHttp.get(Y);y.value=oe.data,_.value=x.data??{},c.value=!0},O=async()=>{var oe;const Y={};(((oe=n.option.dataShow)==null?void 0:oe.deep2Linkage)??[]).forEach(z=>{if((z.value??"")!="")if(((z==null?void 0:z.value)??"").indexOf("||")>=0){const ee=z.value.split("||")[1],le=n.params[`${ee}1`]??"",se=n.params[`${ee}2`]??"",K=n.params[ee]??"";K!==""&&(Y[z.key]=K),le!==""&&se!==""&&(Y[z.key]=[le,se])}else Y[z.key]=x.data[z.value]}),vue.unref(l).init(n.option.dataShow.deep2Id,Y)},D=vue.ref(!1),L=vue.reactive({type:"",data:""});vue.ref({});const I=vue.ref({}),j=vue.ref({}),M=async()=>{I.value={},j.value={};const{fullscreenId:Y,fullscreenType:oe,fullscreenLinkage:z,fullscreenControlLinkage:ee,fullscreenOpenType:le}=n.option.dataShow;["","indicators"].includes(oe)&&(z??[]).forEach(K=>{K.value.length&&K.value.forEach(Z=>{var X;const[U,q]=Z;if(vue.unref(I)[U]||(vue.unref(I)[U]={}),((K==null?void 0:K.key)??"").indexOf("||")>=0){const ie=K.key.split("||")[1];vue.unref(I)[U][q]=Q(ie)}else vue.unref(I)[U][q]=((X=x==null?void 0:x.data)==null?void 0:X[K.key])??""})}),["control"].includes(oe)&&(j.value={},(ee??[]).forEach(K=>{var U;const Z=K.value.toString();if(Z!=="")if(((K==null?void 0:K.name)??"").indexOf("||")>=0){const q=K.name.split("||")[1];Z.split(",").forEach(X=>{j.value[X]=Q(q)})}else j.value[Z]=((U=x==null?void 0:x.data)==null?void 0:U[K.key])??""})),x.x=0;const se=o.resolve({name:"big-data-preview",query:{id:Y,bigScreenQueryParams:JSON.stringify(I.value),bigScreenControlParams:JSON.stringify(j.value)}});if(le=="blank"){window.top.open(se.href);return}if(self!=top){o.replace({name:"big-data-preview",query:se.query});return}L.data=se.href,D.value=!0},R=(Y,oe)=>`${oe.prefix??""}${isNaN(Y)||(Y??"")==""?Y??"-":Number(Y).toFixed(oe.toFixed)}${oe.suffix??""}`,F=()=>{m.value=m.value.filter(Y=>Y!=n.option.code),n.option.code=vue.unref(m).at(-1),g(n.option,()=>{})},W=(Y,oe)=>{const z=document.getElementById(n.renderId);let ee=1;if(z){const se=window.getComputedStyle(z).transform;ee=new DOMMatrix(se).a}x.x=(Y.clientX-oe.left)/ee,x.y=(Y.clientY-oe.top)/ee;const le=document.getElementById(`render-${n.option.id}`);le&&(le.style.zIndex="9999"),J()},J=()=>{const Y=n.option.linkage??{};if(n.renderId){const oe=[];if(Object.keys(Y).forEach(z=>{!Array.isArray(Y[z])||Y[z].length==0||Y[z].forEach(ee=>{if(z.indexOf("||")>=0){const le=z.split("||")[1];oe.push({indicatorsId:ee[0],key:ee[1],value:Q(le)})}else(x.data[z]??"")!==""&&oe.push({indicatorsId:ee[0],key:ee[1],value:x.data[z]})})}),oe.length==0)return;r.$baseEventBus.emit(`ace-screen-indicators-linkage-chart-${n.renderId}`,oe)}},Q=Y=>{const oe=n.params[`${Y}1`]??"",z=n.params[`${Y}2`]??"",ee=n.params[Y]??"";return ee!==""?ee:oe!==""&&z!==""?[oe,z]:""};return(Y,oe)=>{var Z,U,q,X,ie,H,ne,G,te,re,ae,ue,ce,de,fe,ve,pe,me,ge,$e,Ge;const z=vue.resolveComponent("v-chart"),ee=vue.resolveComponent("aceHeader"),le=vue.resolveComponent("AppTable"),se=vue.resolveComponent("aceDynamicList"),K=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[Y.chartType=="7"&&n.option.dataShow?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"relative flex flex-wrap",ref_key:"parentRef",ref:s,style:vue.normalizeStyle({gap:(n.option.margin??10)+"px"})},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.dimensions,he=>{var be,Ee,Oe,Re,Le,Je,ye,Ae,Ke,Qe,bt,pt,Ye,ke;return vue.openBlock(),vue.createElementBlock("div",{key:he,class:"flex flex-col rounded cursor-pointer justify-evenly",onClick:vue.withModifiers(Pe=>T(Pe,he),["stop"]),style:vue.normalizeStyle({padding:(n.option.padding??10)+"px",background:(Ee=(be=n.option)==null?void 0:be.customSeriesData[he])==null?void 0:Ee.bgColor,color:(Re=(Oe=n.option)==null?void 0:Oe.customSeriesData[he])==null?void 0:Re.color,minWidth:"120px",fontSize:`${((Je=(Le=n.option)==null?void 0:Le.customSeriesData[he])==null?void 0:Je.fontSize)||14}px`})},[vue.createElementVNode("div",null,[vue.createElementVNode("span",null,vue.toDisplayString((Ae=(ye=n.option)==null?void 0:ye.customSeriesData[he])==null?void 0:Ae.prefix),1),vue.createTextVNode(" "+vue.toDisplayString(p(he))+" ",1),vue.createElementVNode("span",null,vue.toDisplayString((Qe=(Ke=n.option)==null?void 0:Ke.customSeriesData[he])==null?void 0:Qe.suffix),1)]),((pt=(bt=n.option)==null?void 0:bt.customSeriesData[he])==null?void 0:pt.hideLabel)!==!0?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"mt-2",style:vue.normalizeStyle({fontSize:`${((ke=(Ye=n.option)==null?void 0:Ye.customSeriesData[he])==null?void 0:ke.titleFontSize)||14}px`})},vue.toDisplayString(he),5)):vue.createCommentVNode("",!0)],12,_hoisted_1$3)}),128))],4)):vue.createCommentVNode("",!0),Y.chartType=="10"&&n.option.dataShow?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["relative flex",[["vertical"].includes(((Z=n.option)==null?void 0:Z.direction)??"")?"flex-col":""]]),ref_key:"parentRef",ref:s,style:vue.normalizeStyle({gap:(n.option.margin??10)+"px"})},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.dimensions,he=>{var be,Ee,Oe,Re,Le,Je,ye,Ae,Ke,Qe,bt,pt,Ye,ke;return vue.openBlock(),vue.createElementBlock("div",{key:he,onClick:vue.withModifiers(Pe=>B(Pe,he),["stop"]),class:vue.normalizeClass(["items-center justify-center flex-1 cursor-pointer progress",[["line"].includes((Ee=(be=n.option)==null?void 0:be.customSeriesData[he])==null?void 0:Ee.type)?"":"flex"]]),style:vue.normalizeStyle(`--bgColor: ${n.option.customSeriesData[he].bgColor||"#e5e9f2"}`)},[vue.createVNode(vue.unref(elementPlus.ElProgress),{strokeLinecap:(Oe=n.option.customSeriesData[he])==null?void 0:Oe.strokeLinecap,width:Y.isBigScreen?Number(Y.maxHeight.replace("px","")):(Re=n.option.customSeriesData[he])==null?void 0:Re.width,duration:(Le=n.option.customSeriesData[he])==null?void 0:Le.duration,stripedFlow:(Je=n.option.customSeriesData[he])==null?void 0:Je.stripedFlow,striped:(ye=n.option.customSeriesData[he])==null?void 0:ye.striped,textInside:["line"].includes((Ke=(Ae=n.option)==null?void 0:Ae.customSeriesData[he])==null?void 0:Ke.type)?(Qe=n.option.customSeriesData[he])==null?void 0:Qe.textInside:!1,strokeWidth:(bt=n.option.customSeriesData[he])==null?void 0:bt.strokeWidth,color:(pt=n.option.customSeriesData[he])==null?void 0:pt.color,type:(ke=(Ye=n.option)==null?void 0:Ye.customSeriesData[he])==null?void 0:ke.type,percentage:Number(p(he))},{default:vue.withCtx(({percentage:Pe})=>{var Me,We,Se,Tt,Bt,It,Dt,zt,Ft,qt;return[vue.createElementVNode("div",{style:vue.normalizeStyle({fontSize:`${((We=(Me=n.option)==null?void 0:Me.customSeriesData[he])==null?void 0:We.fontSize)||14}px`,color:(Tt=(Se=n.option)==null?void 0:Se.customSeriesData[he])==null?void 0:Tt.fontColor})},[vue.createElementVNode("span",null,vue.toDisplayString((It=(Bt=n.option)==null?void 0:Bt.customSeriesData[he])==null?void 0:It.prefix),1),vue.createElementVNode("span",null,vue.toDisplayString(Pe.toFixed(((zt=(Dt=n.option)==null?void 0:Dt.customSeriesData[he])==null?void 0:zt.toFixed)||0)),1),vue.createElementVNode("span",null,vue.toDisplayString((qt=(Ft=n.option)==null?void 0:Ft.customSeriesData[he])==null?void 0:qt.suffix),1)],4)]}),_:2},1032,["strokeLinecap","width","duration","stripedFlow","striped","textInside","strokeWidth","color","type","percentage"])],14,_hoisted_2$3)}),128))],6)):vue.createCommentVNode("",!0),Y.chartType=="8"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[(X=(q=(U=n.option)==null?void 0:U.dataset)==null?void 0:q.dimensions)!=null&&X.length?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"mb-3",ref_key:"scrollBoardRef",ref:d,style:vue.normalizeStyle(`--fontSize: ${n.option.fontSize||13}px `),onClick:k},[["single","page"].includes(n.option.carousel)?(vue.openBlock(),vue.createBlock(vue.unref(Tl),{key:0,config:{header:n.option.dataset.dimensions.map(he=>{var Ee,Oe;let be=he;if((Ee=n.option)!=null&&Ee.customSeriesData[he]){const{headColor:Re,text:Le}=(Oe=n.option)==null?void 0:Oe.customSeriesData[he];return`<span style='color:${Re||"#000"};'>${(Le??"")!==""?Le:be}</span>`}return be}),data:n.option.dataset.source.map(he=>n.option.dataset.dimensions.map(be=>{var Oe,Re;const Ee=he[be];if((Oe=n.option)!=null&&Oe.customSeriesData[be]){const Le=(Re=n.option)==null?void 0:Re.customSeriesData[be];return`<span style='color:${(Le==null?void 0:Le.color)||"#000"};'>${R(Ee,Le)}</span>`}return Ee})),align:vue.unref(f).map(he=>he.textAlign),index:n.option.showIndex,indexHeader:n.option.indexHeader,waitTime:n.option.waitTime?n.option.waitTime*1e3:2e3,headerHeight:n.option.headerHeight??35,carousel:n.option.carousel||"single",rowNum:n.option.rowNum??5,headerBGC:n.option.headerBGC||"#f6f8fa",oddRowBGC:n.option.oddRowBGC||"#fff",evenRowBGC:n.option.evenRowBGC||"#fff",columnWidth:vue.unref(f).map(he=>he.width)},onClick:E,style:vue.normalizeStyle({width:"100%",height:Y.maxHeight})},null,8,["config","style"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createElementVNode("div",_hoisted_3$2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),he=>(vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle({height:`${n.option.headerHeight??35}px`,background:n.option.headerBGC||"#f6f8fa",color:`${he.headColor||"#000"}`,justifyContent:he.textAlign,flex:he.width?`0 0 ${he.width}px`:1,padding:"0 10px",fontSize:"var(--fontSize)",overflow:"hidden"}),class:"flex items-center"},vue.toDisplayString(he.text||he.key),5))),256))]),vue.createVNode(vue.unref(elementPlus.ElScrollbar),{"max-height":Y.maxHeight},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.source,(he,be)=>(vue.openBlock(),vue.createElementBlock("div",{class:"flex cursor-pointer",onClick:vue.withModifiers(Ee=>P(Ee,{rowIndex:be}),["stop"])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),Ee=>{var Oe,Re;return vue.openBlock(),vue.createElementBlock("div",{class:"flex items-center flex-1",style:vue.normalizeStyle({height:`${n.option.headerHeight||35}px`,color:`${Ee.color||"#000"}`,justifyContent:Ee.textAlign,flex:Ee.width?`0 0 ${Ee.width}px`:1,padding:"5px 10px",fontSize:"var(--fontSize)",background:Number(be)%2==0?((Oe=n.option)==null?void 0:Oe.evenRowBGC)||"#fff":((Re=n.option)==null?void 0:Re.oddRowBGC)||"#fff"})},[Ee.index?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"inline-flex items-center justify-center h-4 rounded",style:vue.normalizeStyle({color:"#fff",background:n.option.headerBGC||"#f6f8fa",padding:"0 3px"})},vue.toDisplayString(Number(be)+1),5)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(R(he[Ee.key],Ee)),1)],64))],4)}),256))],8,_hoisted_4$2))),256))]),_:1},8,["max-height"])],64)),vue.unref(f).some(he=>he.sum)?(vue.openBlock(),vue.createBlock(vue.unref(Tl),{key:2,config:{header:n.option.dataset.dimensions.map(he=>{var be;return(be=n.option)!=null&&be.customSeriesData[he]?v(he):""}),indexHeader:"合计",align:vue.unref(f).map(he=>he.textAlign),index:n.option.showIndex,headerHeight:n.option.headerHeight||35,headerBGC:n.option.headerBGC||"#f6f8fa",columnWidth:vue.unref(f).map(he=>he.width)},style:{width:"100%"}},null,8,["config"])):vue.createCommentVNode("",!0)],4)):vue.createCommentVNode("",!0)],64)):(H=(ie=n.option)==null?void 0:ie.series)!=null&&H.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:3},[vue.unref(m).length>1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",class:"absolute top-2.5 left-2.5 z-50 bg-black text-white p-1.5",onClick:F},{default:vue.withCtx(()=>[vue.createTextVNode(" 返回 ")]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(z,{option:n.option,autoresize:"",ref_key:"echartRef",ref:a,loading:Y.loading,"onZr:mousedown":V,onClick:w,onMouseout:S},null,8,["option","loading"])],64)):Y.modelType=="INDICATORS"?(vue.openBlock(),vue.createBlock(z,{key:n.option.id,option:n.option.option,autoresize:"",ref_key:"echartRef",ref:a,loading:Y.loading,"onZr:mousedown":V,onClick:w,onMouseout:S},null,8,["option","loading"])):vue.createCommentVNode("",!0),vue.createVNode(K,{modelValue:vue.unref(c),"onUpdate:modelValue":oe[0]||(oe[0]=he=>vue.isRef(c)?c.value=he:null),title:"查看明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(ee,{title:"统计:",class:"mb-2"}),vue.createVNode(le,{height:null,tableData:Object.keys(vue.unref(_)).map(he=>({label:he,prop:he})),list:[vue.unref(_)],loading:!1},null,8,["tableData","list"]),vue.createVNode(ee,{title:"钻取明细:",class:"mt-4 mb-2"}),vue.createVNode(se,{id:vue.unref(y).modelId,keyName:"modelIndicatorsId",title:vue.unref(y).modelName,isDownLoad:!0,url:"/api/ace-data-center/model-indicators/drilling",formatParamsFunc:b,defParamsFunc:C},null,8,["id","title"])]),_:1},8,["modelValue"]),((ne=Y.option.dataShow)!=null&&ne.deep||(G=Y.option.dataShow)!=null&&G.deep2||(te=Y.option.dataShow)!=null&&te.fullscreen)&&Y.option.dataShow.deepOpen?(vue.openBlock(),vue.createElementBlock("div",{key:5,class:"absolute right-2 top-2",style:vue.normalizeStyle({right:`${Y.option.dataShow.deepOpenRight||2}%`,top:`${Y.option.dataShow.deepOpenTop||2}%`})},[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:Y.option.dataShow.deepOpenContent||"点击图表可下钻数据"},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock("svg",{viewBox:"0 0 1024 1024",width:Y.option.dataShow.deepOpenContentSize||30,height:Y.option.dataShow.deepOpenContentSize||30},[vue.createElementVNode("path",{d:"M508.330667 106.837333L120.576 297.813333a38.4 38.4 0 1 1-33.962667-68.949333L491.434667 29.525333a38.4 38.4 0 0 1 34.133333 0.085334l400.384 199.338666a38.4 38.4 0 0 1-34.218667 68.778667L508.330667 106.837333z m-21.333334 888.064c-5.632 0-11.264-5.632-16.981333-11.349333l-112.981333-112.981333a61.013333 61.013333 0 0 1-16.981334-39.594667c0-11.264 5.632-28.16 16.981334-39.509333a54.613333 54.613333 0 0 1 79.104 0l16.981333 16.981333V548.437333c0-33.877333 22.613333-56.490667 56.490667-56.490666s56.490667 22.613333 56.490666 56.490666v260.010667l16.981334-17.066667a54.613333 54.613333 0 0 1 79.104 0 54.613333 54.613333 0 0 1 0 79.189334l-113.066667 112.981333c-5.632 5.717333-11.264 5.717333-16.896 11.349333-16.981333 5.632-33.962667 5.632-45.226667 0z m21.418667-695.808L140.8 486.314667l163.669333 80.896a38.4 38.4 0 1 1-34.133333 68.778666L38.229333 521.216a38.4 38.4 0 0 1-0.426666-68.693333L491.008 221.866667a38.4 38.4 0 0 1 34.730667 0l453.290666 229.973333a38.4 38.4 0 0 1 0 68.437333L751.616 635.818667A38.4 38.4 0 0 1 716.8 567.466667l160.085333-81.322667-368.469333-186.965333z",fill:Y.option.dataShow.deepOpenColor||"#000"},null,8,_hoisted_6)],8,_hoisted_5))]),_:1},8,["content"])],4)):vue.createCommentVNode("",!0),n.isCheckClick&&n.indicatorsId?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:6},[vue.withDirectives(vue.createElementVNode("div",{class:"tooltip",ref_key:"hoveredElement",ref:u,onMouseover:$,onMouseout:S,style:vue.normalizeStyle({position:"absolute",left:vue.unref(x).x+"px",top:vue.unref(x).y+"px"})},[(ae=(re=Y.option)==null?void 0:re.dataShow)!=null&&ae.deep?(vue.openBlock(),vue.createElementBlock("div",{key:0,onClick:N},[_hoisted_7,vue.createTextVNode(" 数据下钻 ")])):vue.createCommentVNode("",!0),(ce=(ue=Y.option)==null?void 0:ue.dataShow)!=null&&ce.deep2&&((fe=(de=Y.option)==null?void 0:de.dataShow)!=null&&fe.deep2Id)?(vue.openBlock(),vue.createElementBlock("div",{key:1,onClick:O},[_hoisted_8,vue.createTextVNode(" 二级指标 ")])):vue.createCommentVNode("",!0),(pe=(ve=Y.option)==null?void 0:ve.dataShow)!=null&&pe.fullscreen&&((ge=(me=Y.option)==null?void 0:me.dataShow)!=null&&ge.fullscreenId)&&((Ge=($e=Y.option)==null?void 0:$e.dataShow)!=null&&Ge.fullscreenName)?(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:M},[_hoisted_9,vue.createTextVNode(" "+vue.toDisplayString(Y.option.dataShow.fullscreenName),1)])):vue.createCommentVNode("",!0)],36),[[vue.vShow,vue.unref(x).x&&vue.unref(x).y]]),vue.createVNode(_sfc_main$4,{ref_key:"appDeepRef",ref:l},null,512),vue.createVNode(vue.unref(elementPlus.ElDialog),{class:"ace-screen-dialog",modelValue:vue.unref(D),"onUpdate:modelValue":oe[2]||(oe[2]=he=>vue.isRef(D)?D.value=he:null),"append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"close-on-press-escape":!1},{default:vue.withCtx(()=>[vue.createElementVNode("div",{onClick:oe[1]||(oe[1]=vue.withModifiers(he=>D.value=!1,["stop"])),class:"ace-screen-dialog-close"},_hoisted_11),vue.createElementVNode("iframe",{src:vue.unref(L).data},null,8,_hoisted_12)]),_:1},8,["modelValue"])],64)):vue.createCommentVNode("",!0)],64)}}}),AppCustomChart_vue_vue_type_style_index_0_scoped_3faf0ae5_lang="",aceCustomChart=_export_sfc$2(_sfc_main$3,[["__scopeId","data-v-3faf0ae5"]]),_hoisted_1$2={class:"appChart"},_hoisted_2$2={key:2,class:"relative fadeIn animated",style:{height:"500px"}},_sfc_main$2=vue.defineComponent({__name:"AppChart",props:{type:{default:""},options:{default:null},loading:{type:Boolean,default:!1}},setup(i){const n=i,r=vue.ref(null);return vue.watch(()=>n.options,async o=>{if(o){if(n.type==9){const{code:a,mapName:l}=n.options,s=await fetch(`/map/${a}.json`).then(u=>u.json());core.registerMap(l,s)}r.value=n.options}},{deep:!0,immediate:!0}),(o,a)=>{const l=vue.resolveComponent("aceCustomChart"),s=vue.resolveComponent("AppEmpty"),u=vue.resolveComponent("AppTable"),c=vue.resolveComponent("v-chart");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[["7","10"].includes(String(o.type))?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[typeof o.options=="object"?(vue.openBlock(),vue.createBlock(l,{key:0,option:o.options,chartType:String(o.type)},null,8,["option","chartType"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(o.options),1)],64))],64)):o.type==8?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[o.options.length==0?(vue.openBlock(),vue.createBlock(s,{key:0,description:"暂无数据"})):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[Array.isArray(o.options)?(vue.openBlock(),vue.createBlock(u,{key:1,tableData:Object.keys(o.options[0]).map(d=>({label:d,prop:d})),list:o.options},null,8,["tableData","list"])):(vue.openBlock(),vue.createBlock(l,{key:0,option:o.options,chartType:String(o.type)},null,8,["option","chartType"]))],64))],64)):vue.unref(r)&&typeof vue.unref(r)=="object"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$2,[vue.createVNode(c,{ref:"echart",option:vue.unref(r),autoresize:""},null,8,["option"])])):vue.createCommentVNode("",!0)])),[[vue.unref(elementPlus.vLoading),o.type==""||o.loading]])}}}),_hoisted_1$1={class:"flex items-center justify-between app-header"},_hoisted_2$1={class:"flex items-center"},_hoisted_3$1=vue.createElementVNode("span",{class:"inline-block w-1 h-4 mr-2",style:{background:"var(--el-color-primary)"}},null,-1),_hoisted_4$1={class:"text-base font-bold"},_sfc_main$1=vue.defineComponent({__name:"AppHeader",props:{title:{default:""}},setup(i){return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("div",_hoisted_2$1,[_hoisted_3$1,vue.createElementVNode("span",_hoisted_4$1,vue.toDisplayString(n.title),1),vue.renderSlot(n.$slots,"left")]),vue.renderSlot(n.$slots,"default")]))}}),_hoisted_1=["width","height"],_hoisted_2=["fill"],_hoisted_3=vue.createElementVNode("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"},null,-1),_hoisted_4=[_hoisted_3],_sfc_main=vue.defineComponent({__name:"AppLoading",props:{color:{default:"#5887da"},size:{default:"10"}},setup(i){const n=i;return(r,o)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:`${n.size}px`,height:`${n.size}px`,viewBox:"0 0 50 50","xml:space":"preserve"},[vue.createElementVNode("path",{fill:r.color,d:"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z",transform:"rotate(275.098 25 25)"},_hoisted_4,8,_hoisted_2)],8,_hoisted_1))}}),aceComponentsLib={install(i,n){if(console.log(`ace-component-lib-${version}`),i.use(t),i.component("aceBigScreen",aceBigScreen),i.component("aceBigScreenPreview",aceBigScreenPreview),i.component("aceBigScreenPreviewSlide",aceBigScreenPriviewSlide),i.component("aceIndicatorReport",aceIndicatorReport),editor.Boot&&editor.Boot.registerModule(aceIndicatorReportPlugin),i.component("aceIndicator",_sfc_main$1d),i.component("aceIndicatorPreview",_sfc_main$1g),i.component("aceIndicatorSystemPreview",aceIndicatorSystemPreview),i.component("aceIndicatorDesign",aceIndicatorDesign),i.component("aceIndicatorCustomSearch",aceIndicatorCustomSearch),i.component("aceCustomChart",aceCustomChart),i.component("aceChart",_sfc_main$2),i.component("aceSqLIntergration",_sfc_main$V),i.component("aceSqLImport",_sfc_main$17),i.component("aceDbShadow",_sfc_main$12),i.component("aceFlow",aceFlow),i.component("aceModel",_sfc_main$j),i.component("aceApiImport",_sfc_main$d),i.component("aceDynamicList",aceDynamicList),i.component("aceDynamicSearch",aceDynamicSearch),i.component("aceDynamicSearchEdit",aceDynamicSearchEdit),i.component("aceModelSearchSetting",_sfc_main$y),i.component("aceModelConn",_sfc_main$N),i.component("aceModelSql",_sfc_main$M),i.component("aceModelNormal",_sfc_main$L),i.component("aceModelExcel",_sfc_main$K),i.component("aceModelExtract",_sfc_main$J),i.component("aceModelExtractLog",_sfc_main$G),i.component("aceModelView",aceModelView),i.component("aceModelDbExtract",_sfc_main$z),i.component("aceHeader",_sfc_main$1),i.component("aceLoading",_sfc_main),n!=null&&n.components)for(const[r,o]of Object.entries(n.components)){const a=r.replace(".vue","").split("/").at(-1);i.component(a,o.default)}n!=null&&n.dict&&(i.config.globalProperties.$globalDict=n.dict),n!=null&&n.exportExcel&&(i.config.globalProperties.$baseExportExcel=n.exportExcel),n!=null&&n.utils&&(i.config.globalProperties.$globalUtils=n.utils),n!=null&&n.predefineColors&&(i.config.globalProperties.$globalPreColor=n.predefineColors),n!=null&&n.hooks&&(i.config.globalProperties.$globalHooks=n.hooks),i.config.globalProperties.$aceDynamicSearch=useDynamicSearch}},index={aceComponentsLib};return index});
|
|
1084
|
+
`;var __decorate=globalThis&&globalThis.__decorate||function(i,n,r,o){var a=arguments.length,l=a<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,n,r,o);else for(var u=i.length-1;u>=0;u--)(s=i[u])&&(l=(a<3?s(l):a>3?s(n,r,l):s(n,r))||l);return a>3&&l&&Object.defineProperty(n,r,l),l};class Dnd extends View{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(n){super(),this.name="dnd",this.options=Object.assign(Object.assign({},Dnd.defaults),n),this.init()}init(){ensure(this.name,content),this.container=document.createElement("div"),addClass(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new Graph(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),append(this.container,this.draggingGraph.container)}start(n,r){const o=r;o.preventDefault(),this.targetModel.startBatch("dnd"),addClass(this.container,"dragging"),appendTo(this.container,this.options.draggingContainer||document.body),this.sourceNode=n,this.prepareDragging(n,o.clientX,o.clientY);const a=this.updateNodePosition(o.clientX,o.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:o,node:n,cell:n,view:this.draggingView,x:a.x,y:a.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(Dnd.documentEvents,o.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(n,r,o){const a=this.draggingGraph,l=a.model,s=this.options.getDragNode(n,{sourceNode:n,draggingGraph:a,targetGraph:this.targetGraph});s.position(0,0);let u=5;if(this.isSnaplineEnabled()&&(u+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const f=this.targetGraph.transform.getScale();a.scale(f.sx,f.sy),u*=Math.max(f.sx,f.sy)}else a.scale(1,1);this.clearDragging(),l.resetCells([s]);const c=a.findViewByCell(s);c.undelegateEvents(),c.cell.off("changed"),a.fitToContent({padding:u,allowNewOrigin:"any",useCellGeometry:!1});const d=c.getBBox();this.geometryBBox=c.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(d.getTopLeft()),this.draggingNode=s,this.draggingView=c,this.draggingBBox=s.getBBox(),this.padding=u,this.originOffset=this.updateGraphPosition(r,o)}updateGraphPosition(n,r){const o=document.body.scrollTop||document.documentElement.scrollTop,a=document.body.scrollLeft||document.documentElement.scrollLeft,l=this.delta,s=this.geometryBBox,u=this.padding||5,c={left:n-l.x-s.width/2-u+a,top:r-l.y-s.height/2-u+o};return this.draggingGraph&&css(this.container,{left:`${c.left}px`,top:`${c.top}px`}),c}updateNodePosition(n,r){const o=this.targetGraph.clientToLocal(n,r),a=this.draggingBBox;return o.x-=a.width/2,o.y-=a.height/2,this.draggingNode.position(o.x,o.y),o}snap({cell:n,current:r,options:o}){const a=n;if(o.snapped){const l=this.draggingBBox;a.position(l.x+o.tx,l.y+o.ty,{silent:!0}),this.draggingView.translate(),a.position(r.x,r.y,{silent:!0}),this.snapOffset={x:o.tx,y:o.ty}}else this.snapOffset=null}onDragging(n){const r=this.draggingView;if(r){n.preventDefault();const o=this.normalizeEvent(n),a=o.clientX,l=o.clientY;this.updateGraphPosition(a,l);const s=this.updateNodePosition(a,l),u=this.targetGraph.options.embedding.enabled,c=(u||this.isSnaplineEnabled())&&this.isInsideValidArea({x:a,y:l});if(u){r.setEventData(o,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const d=r.getEventData(o);c?r.processEmbedding(o,d):r.clearEmbedding(d),this.candidateEmbedView=d.candidateEmbedView}this.isSnaplineEnabled()&&(c?this.snapline.snapOnMoving({e:o,view:r,x:s.x,y:s.y}):this.snapline.hide())}}onDragEnd(n){const r=this.draggingNode;if(r){const o=this.normalizeEvent(n),a=this.draggingView,l=this.draggingBBox,s=this.snapOffset;let u=l.x,c=l.y;s&&(u+=s.x,c+=s.y),r.position(u,c,{silent:!0});const d=this.drop(r,{x:o.clientX,y:o.clientY}),f=p=>{p?(this.onDropped(r),this.targetGraph.options.embedding.enabled&&a&&(a.setEventData(o,{cell:p,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),a.finalizeEmbedding(o,a.getEventData(o)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};isAsync(d)?(this.undelegateDocumentEvents(),d.then(f)):f(d)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(n){this.draggingNode===n&&(this.clearDragging(),removeClass(this.container,"dragging"),remove(this.container))}onDropInvalid(){const n=this.draggingNode;n&&this.onDropped(n)}isInsideValidArea(n){let r,o=null;const a=this.targetGraph,l=this.targetScroller;this.options.dndContainer&&(o=this.getDropArea(this.options.dndContainer));const s=o&&o.containsPoint(n);if(l)if(l.options.autoResize)r=this.getDropArea(l.container);else{const u=this.getDropArea(l.container);r=this.getDropArea(a.container).intersectsWithRect(u)}else r=this.getDropArea(a.container);return!s&&r&&r.containsPoint(n)}getDropArea(n){const r=offset$1(n),o=document.body.scrollTop||document.documentElement.scrollTop,a=document.body.scrollLeft||document.documentElement.scrollLeft;return Rectangle.create({x:r.left+parseInt(css(n,"border-left-width"),10)-a,y:r.top+parseInt(css(n,"border-top-width"),10)-o,width:n.clientWidth,height:n.clientHeight})}drop(n,r){if(this.isInsideValidArea(r)){const o=this.targetGraph,a=o.model,l=o.clientToLocal(r),s=this.sourceNode,u=this.options.getDropNode(n,{sourceNode:s,draggingNode:n,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),c=u.getBBox();l.x+=c.x-c.width/2,l.y+=c.y-c.height/2;const d=this.snapOffset?1:o.getGridSize();u.position(GeometryUtil.snapToGrid(l.x,d),GeometryUtil.snapToGrid(l.y,d)),u.removeZIndex();const f=this.options.validateNode,p=f?f(u,{sourceNode:s,draggingNode:n,droppingNode:u,targetGraph:o,draggingGraph:this.draggingGraph}):!0;return typeof p=="boolean"?p?(a.addCell(u,{stencil:this.cid}),u):null:toDeferredBoolean(p).then(v=>v?(a.addCell(u,{stencil:this.cid}),u):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),clean(this.name)}}__decorate([View.dispose()],Dnd.prototype,"dispose",null),function(i){i.defaults={getDragNode:n=>n.clone(),getDropNode:n=>n.clone()},i.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}}(Dnd||(Dnd={}));const _hoisted_1$b=["data-type"],_sfc_main$c=vue.defineComponent({__name:"start",props:{label:{default:""}},setup(i){const n=vue.inject("getNode"),r={excel:"ri-file-excel-2-line",sql:"ri-database-2-line",api:"ri-links-line"},o=vue.ref("");if(n){const{modelName:a}=n().data;o.value=a}return(a,l)=>(vue.openBlock(),vue.createElementBlock("div",{"data-type":a.label,class:"w-14 h-14 item text-white flex flex-col items-center justify-center rounded cursor-move start-item"},[vue.createElementVNode("span",null,vue.toDisplayString(vue.unref(o)||a.label),1),vue.createElementVNode("i",{class:vue.normalizeClass([r[(vue.unref(o)||a.label).toLowerCase()],"text-2xl"])},null,2)],8,_hoisted_1$b))}}),start_vue_vue_type_style_index_0_scoped_3e1d0a9f_lang="",Start=_export_sfc$2(_sfc_main$c,[["__scopeId","data-v-3e1d0a9f"]]),_withScopeId$5=i=>(vue.pushScopeId("data-v-35e93650"),i=i(),vue.popScopeId(),i),_hoisted_1$a={class:"widget"},_hoisted_2$8={class:"widget-title"},_hoisted_3$7={class:"flex items-center flex-1"},_hoisted_4$7={key:0,class:"flex items-center justify-start flex-1"},_hoisted_5$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-line"},null,-1)),_hoisted_6$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_7$5={key:0,class:"flex items-center justify-start flex-1"},_hoisted_8$5=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-folder-received-line"},null,-1)),_hoisted_9$5={class:"flex items-center justify-end flex-1"},_hoisted_10$4=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_11$3={key:0,class:"flex justify-start flex-1"},_hoisted_12$2={key:1,class:"flex items-center justify-end flex-1"},_hoisted_13$1=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-refresh-line"},null,-1)),_hoisted_14$1={key:2,class:"flex items-center justify-end flex-1"},_hoisted_15=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_16={key:0,class:"flex items-center justify-start flex-1"},_hoisted_17=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-edit-line"},null,-1)),_hoisted_18={key:1,class:"flex items-center justify-end flex-1"},_hoisted_19=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-refresh-line"},null,-1)),_hoisted_20={key:2,class:"flex items-center justify-end flex-1"},_hoisted_21=_withScopeId$5(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-text-line"},null,-1)),_hoisted_22=["innerHTML"],_hoisted_23={class:"widget-container"},_hoisted_24={class:"flex items-center justify-center mr-2"},_hoisted_25={class:"text-yellow-600"},_hoisted_26={class:"text-yellow-600"},_sfc_main$b=vue.defineComponent({__name:"widget",props:{frameType:{default:""},activeName:{default:""},flowSql:{type:[Function,null],default:null},historyClick:{type:[Function,null],default:null},errorClick:{type:[Function,null],default:null},dataImport:{type:[Function,null],default:null},modelList:{type:[Function,null],default:null}},setup(i){const n=i,r={date:"日",month:"月",year:"年"},o=vue.ref({}),a=vue.inject("getNode"),l=vue.computed(()=>vue.unref(s)=="error"?'<i class="text-red-700 ri-error-warning-fill"></i>':vue.unref(s)=="warning"?'<i class="text-yellow-500 ri-error-warning-fill"></i>':'<i class="text-color-success ri-checkbox-circle-fill"></i>'),s=vue.computed(()=>{var v,g;return((g=(v=vue.unref(o))==null?void 0:v.nodeStatus)==null?void 0:g.status)??""}),u=()=>{var v,g;n.flowSql&&n.flowSql({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})},c=()=>{var v,g;n.dataImport&&n.dataImport({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})},d=async()=>{var v;n.historyClick&&n.historyClick((v=vue.unref(o))==null?void 0:v.id,"db_extract")},f=v=>{n.historyClick&&n.historyClick(v)},p=()=>{var v,g;n.modelList&&n.modelList({modelId:(v=vue.unref(o))==null?void 0:v.id,modelName:(g=vue.unref(o))==null?void 0:g.modelName})};return a&&(o.value=a().data),(v,g)=>{var m,_,y,b,C;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$a,[vue.createElementVNode("div",_hoisted_2$8,[vue.createElementVNode("span",{class:vue.normalizeClass(["mr-2",vue.unref(o).modelLayer])},vue.toDisplayString(vue.unref(o).modelLayer),3),vue.createElementVNode("div",_hoisted_3$7,[v.activeName=="flow-msg"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(o).modelLayer=="DWD"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$7,[_hoisted_5$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(u,["stop"])},"编辑SQL")])):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"flex items-center justify-end flex-1"},[_hoisted_6$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:d},"抽取记录")])],64)):vue.createCommentVNode("",!0),vue.unref(o).modelLayer=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$5,[_hoisted_8$5,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(c,["stop"])},"数据导入")])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9$5,[_hoisted_10$4,vue.createElementVNode("span",{class:"cursor-pointer",onClick:g[0]||(g[0]=vue.withModifiers(x=>{var w;return f((w=vue.unref(o))==null?void 0:w.id)},["stop"]))}," 导入历史 ")])],64)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),v.activeName=="flow-monitor"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.unref(o).modelLayer=="ODS"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(o).selfEventType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$3," 按"+vue.toDisplayString(r[vue.unref(o).selfEventType])+"更新 ",1)):vue.createCommentVNode("",!0),["error","warning"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$2,[_hoisted_13$1,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(c,["stop"])},"去更新")])):vue.createCommentVNode("",!0),["success"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$1,[_hoisted_15,vue.createElementVNode("span",{class:"cursor-pointer",onClick:g[1]||(g[1]=vue.withModifiers(x=>{var w;return f((w=vue.unref(o))==null?void 0:w.id)},["stop"]))}," 历史记录 ")])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),vue.unref(o).modelLayer=="DWD"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[v.frameType=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16,[_hoisted_17,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(u,["stop"])},"编辑SQL")])):vue.createCommentVNode("",!0),["error","warning"].includes(vue.unref(s))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_18,[_hoisted_19,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(d,["stop"])},"重新运行")])):vue.createCommentVNode("",!0),vue.unref(s)=="success"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_20,[_hoisted_21,vue.createElementVNode("span",{class:"cursor-pointer",onClick:vue.withModifiers(d,["stop"])},"抽取记录")])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)]),vue.unref(s)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"status",innerHTML:vue.unref(l)},null,8,_hoisted_22)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_23,[vue.createElementVNode("div",_hoisted_24,[vue.createElementVNode("i",{class:"mr-2 text-base cursor-pointer ri-box-3-fill text-color-info",onClick:vue.withModifiers(p,["stop"])}),vue.createElementVNode("span",null,vue.toDisplayString((m=vue.unref(o))==null?void 0:m.modelName),1)]),vue.createElementVNode("div",{class:"cursor-pointer whitespace-nowrap",onClick:g[2]||(g[2]=vue.withModifiers(x=>v.errorClick&&v.errorClick(vue.unref(o)),["stop"]))},[vue.unref(s)=="error"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createElementVNode("span",_hoisted_25,vue.toDisplayString((_=vue.unref(o))==null?void 0:_.nodeStatus.extractErrorCount)+"失败",1),vue.createTextVNode(" /"+vue.toDisplayString((y=vue.unref(o))==null?void 0:y.nodeStatus.extractAllCount),1)],64)):vue.createCommentVNode("",!0),vue.unref(s)=="warning"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createElementVNode("span",_hoisted_26,vue.toDisplayString((b=vue.unref(o))==null?void 0:b.nodeStatus.extractNotStartedCount)+"未更新 ",1),vue.createTextVNode(" /"+vue.toDisplayString((C=vue.unref(o))==null?void 0:C.nodeStatus.extractAllCount),1)],64)):vue.createCommentVNode("",!0)])])])}}}),widget_vue_vue_type_style_index_0_scoped_35e93650_lang="",Widget=_export_sfc$2(_sfc_main$b,[["__scopeId","data-v-35e93650"]]);function useFlow(i,n,r,o){const{proxy:a}=vue.getCurrentInstance(),l={circle:{r:4,magnet:!0,stroke:"#2D8CF0",strokeWidth:2,fill:"#fff",style:{visibility:"hidden"}}},s={groups:{top:{position:"top",attrs:l},bottom:{position:"bottom",attrs:l},left:{position:"left",attrs:l},right:{position:"right",attrs:l}},items:[{group:"top"},{group:"bottom"},{group:"left"},{group:"right"}]},u=vue.ref(null),c=vue.ref(null),d=vue.ref(null),f=vue.ref(!1),p=vue.ref(null),v=vue.ref("flow-msg"),g=vue.ref({canRedo:!1,canUndo:!1});register({shape:"Start",width:56,height:56,component:Start}),register({shape:"Widget",width:210,height:70,component:{render:()=>vue.h(Widget,{frameType:n,activeName:v.value,historyClick:(C,x)=>{if(!C){a.$message.warning("暂无数据");return}o&&o("flow-history-click",{modelId:C,businessType:x,table:x=="db_extract"?[{label:"执行时间",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum",func:w=>w.failNum??0},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]:null,ajaxUrl:x=="db_extract"?`/api/ace-data-center/extract-log/listCollaborateExtractLogPage?descs=create_time&modelId=${C}`:""})},errorClick:C=>{a.$baseEventBus.emit("flow-warning-list",C)},dataImport:C=>{o&&o("flow-data-import",C)},modelList:C=>{o&&o("flow-model-data",C)},flowSql:C=>{o&&o("flow-sql",C)}})}}),vue.nextTick(()=>{const C=document.getElementById(i);C&&(u.value=new Graph({container:C,autoResize:!0,panning:!1,mousewheel:!1,background:{color:"#F2F7FA"},connecting:{router:"manhattan",connector:{name:"rounded",args:{radius:20}},anchor:"center",connectionPoint:"anchor",allowBlank:!1,highlight:!0,allowLoop:!1,allowMulti:!1,snap:{radius:20},createEdge(){return new Edge({attrs:{line:{stroke:"#A2B1C3",strokeWidth:2,targetMarker:{name:"block",width:12,height:8},style:{animation:"ant-line 30s infinite linear"}}},zIndex:0,position:{distance:.5}})}},grid:{visible:!0,type:"mesh",args:{color:"#eeeeee",thickness:2}}}),vue.unref(u).use(new Snapline({enabled:!0})).use(new Keyboard({enabled:!0})).use(new Selection({enabled:!0})).use(new History({enabled:!0})).use(new Clipboard({enabled:!0})).use(new Scroller({pannable:!0})),r&&r(),vue.unref(u).on("history:change",()=>{g.value.canRedo=vue.unref(u).canRedo(),g.value.canUndo=vue.unref(u).canUndo()}),vue.unref(u).on("node:mouseenter",()=>{const x=C.querySelectorAll(".x6-port-body");for(let w=0,V=x.length;w<V;w+=1)x[w].style.visibility="visible"}),vue.unref(u).on("node:mouseleave",()=>{const x=C.querySelectorAll(".x6-port-body");for(let w=0,V=x.length;w<V;w+=1)x[w].style.visibility="hidden"}),vue.unref(u).on("cell:click",x=>{const{cell:w}=x;w.isNode()&&(d.value=w.data,p.value=w),f.value=!0}),vue.unref(u).on("blank:click",({})=>{d.value=null,f.value=!1}),vue.unref(u).on("edge:connected",x=>{b()}),vue.unref(u).on("edge:removed",x=>{const{cell:w}=x;vue.unref(u).getNodes().find($=>w.target.cell==$.id),b()}),vue.unref(u).bindKey(["meta+z","ctrl+z"],()=>{m("undo")}),vue.unref(u).bindKey(["meta+shift+z","ctrl+shift+z"],()=>{m("redo")}),vue.unref(u).bindKey("backspace",()=>{m("delete")}),vue.unref(u).bindKey(["ctrl+1","meta+1"],()=>{m("zoom-in")}),vue.unref(u).bindKey(["ctrl+2","meta+2"],()=>{m("zoom-out")}),c.value=new Dnd({target:u.value,scaled:!1,validateNode:x=>{const{cells:w}=vue.unref(u).toJSON();if(w.some(V=>V.shape=="Start")&&x.shape=="Start")return elementPlus.ElMessage({type:"warning",message:"开始节点只允许一个",plain:!0}),!1;if(w.some(V=>{var $,S;return(($=V==null?void 0:V.data)==null?void 0:$.id)==((S=x==null?void 0:x.data)==null?void 0:S.id)})&&x.shape=="Widget")return elementPlus.ElMessage({type:"warning",message:"已存在模型",plain:!0}),!1;vue.unref(u).cleanSelection(),setTimeout(()=>{vue.unref(u).select(x),d.value=x.data})}}))});const m=C=>{switch(C){case"zoom-in":vue.unref(u).zoom()<1.5&&vue.unref(u).zoom(.1);break;case"zoom-out":vue.unref(u).zoom()>.5&&vue.unref(u).zoom(-.1);break;case"undo":if(vue.unref(v)=="flow-monitor")return;vue.unref(u).canUndo()&&(vue.unref(u).undo(),d.value=null);break;case"redo":if(vue.unref(v)=="flow-monitor")return;vue.unref(u).canRedo()&&(vue.unref(u).redo(),d.value=null);break;case"copy":if(vue.unref(v)=="flow-monitor")return;const x=vue.unref(u).getSelectedCells();if(x.length){vue.unref(u).copy(x),elementPlus.ElMessage({type:"success",message:"复制成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未选择模型",plain:!0});break;case"paste":if(vue.unref(v)=="flow-monitor")return;if(!vue.unref(u).isClipboardEmpty()){const w=vue.unref(u).paste({offset:32});vue.unref(u).cleanSelection(),vue.unref(u).select(w),elementPlus.ElMessage({type:"success",message:"粘贴成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未复制模型",plain:!0});break;case"delete":{if(vue.unref(v)=="flow-monitor")return;const w=vue.unref(u).getSelectedCells();if(w.length){vue.unref(u).removeCells(w),d.value=null,elementPlus.ElMessage({type:"success",message:"删除成功",plain:!0});return}elementPlus.ElMessage({type:"warning",message:"未选择模型",plain:!0})}break}},_=C=>{if(v.value=="flow-monitor")return;const x=C.currentTarget,w=x.getAttribute("data-type");let V=null;switch(w.toLowerCase()){case"sql":case"api":case"excel":V=vue.unref(u).createNode({shape:"Start",ports:{groups:{bottom:{position:"bottom",attrs:l}},items:[{group:"bottom"}]},data:{modelName:w}});break;case"widget":V=vue.unref(u).createNode({shape:"Widget",ports:s,data:JSON.parse(x.getAttribute("data-value"))});break}vue.unref(c).start(V,C)},y={date:"日",month:"月",year:"年"},b=()=>{const C=vue.unref(u).getNodes();vue.unref(u).getEdges().forEach((w,V)=>{if(vue.unref(v)=="flow-monitor"){w.removeLabelAt(0);return}const $=C.find(S=>w.source.cell==S.id);C.find(S=>w.target.cell==S.id),$&&w.setLabels({attrs:{label:{text:$!=null&&$.data.selfEventType?`按${y[$==null?void 0:$.data.selfEventType]??""}`:"",fill:"#000",fontSize:12},body:{ref:"label",fill:"#fff",stroke:"#ffa940",strokeWidth:1,rx:4,ry:4,refWidth:"160%",refHeight:"160%",refX:"-30%",refY:"-30%"}}})})};return{graph:u,activeName:v,nodeObj:p,state:g,isDelete:f,selectWidget:d,handleEvent:m,handleStartDrag:_,handleSetLabels:b}}const _withScopeId$4=i=>(vue.pushScopeId("data-v-9b0e7581"),i=i(),vue.popScopeId(),i),_hoisted_1$9=_withScopeId$4(()=>vue.createElementVNode("div",{class:"title"},[vue.createElementVNode("i",{class:"ri-play-circle-line"}),vue.createElementVNode("span",null,"系统开始节点")],-1)),_hoisted_2$7={class:"mb-4 start"},_hoisted_3$6=_withScopeId$4(()=>vue.createElementVNode("i",{class:"ri-search-line"},null,-1)),_hoisted_4$6={class:"flex justify-between mt-2 mb-2 title"},_hoisted_5$4=_withScopeId$4(()=>vue.createElementVNode("i",{class:"ri-play-circle-line"},null,-1)),_hoisted_6$4={key:0},_hoisted_7$4=["data-value"],_hoisted_8$4=_withScopeId$4(()=>vue.createElementVNode("i",{class:"mr-2 text-base ri-box-3-fill text-color-info"},null,-1)),_hoisted_9$4={class:"flex-1 overflow-hidden whitespace-nowrap text-ellipsis"},_hoisted_10$3={key:1,class:"overflow-hidden font-bold whitespace-nowrap text-ellipsis"},_sfc_main$a=vue.defineComponent({__name:"menu",emits:["mouse-down","flow-dropdown-command"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),{loadModelMenu:l}=fetch$1(a).model,s=vue.ref(""),u=vue.ref([{label:"Excel"},{label:"Sql"},{label:"Api"}]),c=vue.ref([]),d=vue.ref(!0),f=vue.ref(null),p=vue.inject("frameType"),v=()=>{c.value=[],d.value=!0,Promise.all([l({modelLayer:"ODS"}),l({modelLayer:"DWD"})]).then(y=>{d.value=!1,y.forEach((b,C)=>{c.value.push({label:["ODS数据接入","DWD数据接入"][C],buttons:C?[{label:"抽取模型",value:"extract"}]:[{label:"数据源导入模型",value:"conn"},{label:"SQL新建模型",value:"sql"},{label:"手动新建模型",value:"normal"},{label:"Excel新建模型",value:"excel"}],list:Object.keys(b.data).map(x=>({modelName:x,id:x,children:b.data[x]}))})}),d.value=!1})};v(),vue.watch(s,y=>{vue.unref(f).forEach(b=>{b.filter(y)})});const g=(y,b)=>y?b.modelName.includes(y):!0,m=y=>{o("flow-dropdown-command",y)},_=y=>o("mouse-down",y);return n({init:v}),(y,b)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[_hoisted_1$9,vue.createElementVNode("div",_hoisted_2$7,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),C=>(vue.openBlock(),vue.createBlock(Start,{key:C.value,label:C.label,onMousedown:_},null,8,["label"]))),128))]),vue.createVNode(vue.unref(elementPlus.ElInput),{placeholder:"请输入内容",clearable:"",modelValue:vue.unref(s),"onUpdate:modelValue":b[0]||(b[0]=C=>vue.isRef(s)?s.value=C:null),class:"mb-2"},{prefix:vue.withCtx(()=>[_hoisted_3$6]),_:1},8,["modelValue"]),vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(d),animated:"",count:2},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c),C=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:C.label},[vue.createElementVNode("div",_hoisted_4$6,[vue.createElementVNode("div",null,[_hoisted_5$4,vue.createElementVNode("span",null,vue.toDisplayString(C.label),1)]),vue.unref(p)=="backend"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,[vue.createVNode(vue.unref(elementPlus.ElDropdown),{onCommand:m},{dropdown:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDropdownMenu),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(C.buttons,x=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdownItem),{key:x.value,command:x.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(x.label),1)]),_:2},1032,["command"]))),128))]),_:2},1024)]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",plain:""},{default:vue.withCtx(()=>[vue.createTextVNode("创建模型")]),_:1})]),_:2},1024)])):vue.createCommentVNode("",!0)]),vue.createVNode(vue.unref(elementPlus.ElTree),{data:C.list,ref_for:!0,ref_key:"treeRef",ref:f,"filter-node-method":g,"empty-text":"暂无数据"},{default:vue.withCtx(({node:x,data:w})=>[x.level!=1?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"-ml-5 items","data-type":"widget",onMousedown:_,"data-value":JSON.stringify(w)},[_hoisted_8$4,vue.createElementVNode("span",_hoisted_9$4,vue.toDisplayString(w.modelName),1)],40,_hoisted_7$4)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_10$3,vue.toDisplayString(w.modelName),1))]),_:2},1032,["data"])],64))),128))]),_:1},8,["loading"])],64))}}),menu_vue_vue_type_style_index_0_scoped_9b0e7581_lang="",Menu=_export_sfc$2(_sfc_main$a,[["__scopeId","data-v-9b0e7581"]]),_hoisted_1$8={class:"selectWidget animated fadeIn"},_sfc_main$9=vue.defineComponent({__name:"selectWidget",props:{selectWidget:{default:null},options:{default:{}}},emits:["change"],setup(i,{emit:n}){const r=n,o=[{label:"按日",value:"date"},{label:"按月",value:"month"},{label:"按年",value:"year"}],a=[{label:"按日",value:"date"},{label:"按月-需每天数据齐全",value:"every_day_of_month"},{label:"按月-仅需某天有数据",value:"some_day_of_month"},{label:"按年-需每月数据齐全",value:"every_month_of_year"},{label:"按年-仅需某月有数据",value:"some_month_of_year"}],l=(s,u)=>{r("change",s,u)};return(s,u)=>{const c=vue.resolveComponent("aceHeader");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,[vue.createVNode(c,{title:"编辑",class:"mb-4"}),vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"80px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"名称"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(s.selectWidget.modelName),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"触发本节点"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:s.selectWidget.triggerEventType,"onUpdate:modelValue":u[0]||(u[0]=d=>s.selectWidget.triggerEventType=d),onChange:u[1]||(u[1]=d=>l("eventType",d))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(a,d=>vue.createVNode(vue.unref(elementPlus.ElRadio),{key:d.value,value:d.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(d.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"协同下节点"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{filterable:"",modelValue:s.selectWidget.selfEventType,"onUpdate:modelValue":u[2]||(u[2]=d=>s.selectWidget.selfEventType=d),placeholder:"请选择",clearable:!1,"popper-class":"ace-select",onChange:u[3]||(u[3]=d=>l("selfEventType",d))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(o,d=>vue.createVNode(vue.unref(elementPlus.ElOption),{label:d.label,value:d.value,key:d.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"协同字段"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{"popper-class":"ace-select",filterable:"",modelValue:s.selectWidget.collaborateField,"onUpdate:modelValue":u[4]||(u[4]=d=>s.selectWidget.collaborateField=d),placeholder:"请选择",clearable:!1},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.options[s.selectWidget.id]??[],d=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{label:d.attributeComment,value:d.attributeCode,key:d.attributeCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})])}}}),selectWidget_vue_vue_type_style_index_0_scoped_db223b2c_lang="",SelectWidget=_export_sfc$2(_sfc_main$9,[["__scopeId","data-v-db223b2c"]]),_withScopeId$3=i=>(vue.pushScopeId("data-v-1b91fe04"),i=i(),vue.popScopeId(),i),_hoisted_1$7={class:"pannel"},_hoisted_2$6={class:"overflow-hidden w-50"},_hoisted_3$5=_withScopeId$3(()=>vue.createElementVNode("span",{class:"ml-5 mr-2"},"快捷查询:",-1)),_hoisted_4$5=_withScopeId$3(()=>vue.createElementVNode("span",{class:"ml-10 mr-10 text-gray-300"},"|",-1)),_hoisted_5$3={class:"flex flex-1"},_hoisted_6$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"mr-1 text-yellow-500 ri-error-warning-fill"},null,-1)),_hoisted_7$3={class:"flex items-center ml-2 text-color-primary"},_hoisted_8$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"ml-1 ri-menu-line"},null,-1)),_hoisted_9$3=_withScopeId$3(()=>vue.createElementVNode("i",{class:"mr-1 text-red-700 ri-error-warning-fill"},null,-1)),_hoisted_10$2={class:"flex items-center ml-2 text-color-primary"},_hoisted_11$2=_withScopeId$3(()=>vue.createElementVNode("i",{class:"ml-1 ri-menu-line"},null,-1)),_sfc_main$8=vue.defineComponent({__name:"monitorPannel",props:{cellsData:{default:()=>[]},msg:{default:{}}},emits:["change"],setup(i,{expose:n,emit:r}){const o=i,{proxy:a}=vue.getCurrentInstance(),l=vue.ref([dayjs().subtract(1,"week").format("YYYY-MM-DD"),dayjs().format("YYYY-MM-DD")]),s=vue.ref(""),u=r,c=m=>{s.value=m[0]},d=()=>s.value="",f=()=>{u("change")},p=m=>s.value?m.getTime()<vue.unref(s).getTime()||m.getTime()>=new Date().getTime()||m.getTime()>vue.unref(s).getTime()+30*864e5:m.getTime()>Date.now(),v=m=>{let _="",y=dayjs().format("YYYY-MM-DD");switch(m){case 1:_=`${dayjs().format("YYYY-MM")}-01`;break;case 3:_=dayjs().subtract(3,"month").format("YYYY-MM-DD");break;case 6:_=dayjs().subtract(6,"month").format("YYYY-MM-DD");break}l.value=[_,y],f()},g=()=>{a.$baseEventBus.emit("flow-warning-list",o.cellsData)};return n({value:l}),(m,_)=>{var y,b;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$7,[vue.createElementVNode("div",_hoisted_2$6,[vue.createVNode(vue.unref(elementPlus.ElDatePicker),{modelValue:vue.unref(l),"onUpdate:modelValue":_[0]||(_[0]=C=>vue.isRef(l)?l.value=C:null),type:"daterange",clearable:!1,"start-placeholder":"开始时间","end-placeholder":"结束时间",onVisibleChange:d,onCalendarChange:c,"value-format":"YYYY-MM-DD",onChange:f,"disabled-date":p},null,8,["modelValue"])]),_hoisted_3$5,vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[1]||(_[1]=C=>v(1))}," 本月 "),vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[2]||(_[2]=C=>v(3))}," 前三月 "),vue.createElementVNode("span",{class:"ml-1 mr-2 cursor-pointer hover:text-blue-600",onClick:_[3]||(_[3]=C=>v(6))}," 前六月 "),_hoisted_4$5,vue.createElementVNode("div",_hoisted_5$3,[vue.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:g},[_hoisted_6$3,vue.createTextVNode(" 未完成任务 "),vue.createElementVNode("span",_hoisted_7$3,[vue.createTextVNode(vue.toDisplayString((y=m.msg)==null?void 0:y.warning)+" ",1),_hoisted_8$3])]),vue.createElementVNode("div",{class:"flex items-center ml-10 cursor-pointer",onClick:g},[_hoisted_9$3,vue.createTextVNode(" 协同失败 "),vue.createElementVNode("span",_hoisted_10$2,[vue.createTextVNode(vue.toDisplayString((b=m.msg)==null?void 0:b.error)+" ",1),_hoisted_11$2])])])])}}}),monitorPannel_vue_vue_type_style_index_0_scoped_1b91fe04_lang="",monitorPannel=_export_sfc$2(_sfc_main$8,[["__scopeId","data-v-1b91fe04"]]),_withScopeId$2=i=>(vue.pushScopeId("data-v-e7267060"),i=i(),vue.popScopeId(),i),_hoisted_1$6={key:0,class:"warning fadeIn animated"},_hoisted_2$5={class:"flex justify-end pl-4 pr-4"},_hoisted_3$4={class:"flex-1 pl-4 pr-4 overflow-y-auto"},_hoisted_4$4={class:"mt-2 mb-4"},_hoisted_5$2=["onClick"],_hoisted_6$2=_withScopeId$2(()=>vue.createElementVNode("i",{class:"mr-2 text-base ri-box-3-fill"},null,-1)),_hoisted_7$2={class:"whitespace-nowrap"},_hoisted_8$2={class:"ml-4 mr-2 overflow-hidden whitespace-nowrap text-ellipsis"},_hoisted_9$2={class:"whitespace-nowrap"},_sfc_main$7=vue.defineComponent({__name:"warningList",emits:["click-element"],setup(i,{emit:n}){const{proxy:r}=vue.getCurrentInstance(),o=n,a=vue.ref(!1),l=vue.ref([]),s=vue.computed(()=>{const d=[],f=vue.unref(l).filter(v=>v.status=="warning"),p=vue.unref(l).filter(v=>v.status=="error");return f.length&&d.push({label:"未完成任务",list:f}),p.length&&d.push({label:"协同失败",list:p}),d});r.$baseEventBus.on("flow-warning-list",d=>{var f;if(l.value=[],d.toString()=="close"){a.value=!1;return}if(Array.isArray(d)?d.filter(p=>p.shape=="Widget").forEach(p=>{var v,g,m,_;u(((g=(v=p==null?void 0:p.data)==null?void 0:v.nodeStatus)==null?void 0:g.nodeStatusMap)??{},((m=p==null?void 0:p.data)==null?void 0:m.id)??"",((_=p==null?void 0:p.data)==null?void 0:_.modelName)??"")}):u(((f=d==null?void 0:d.nodeStatus)==null?void 0:f.nodeStatusMap)??{},(d==null?void 0:d.id)??"",(d==null?void 0:d.modelName)??""),!vue.unref(l).length){r.$message.warning("暂无错误信息"),a.value=!1;return}a.value=!0});const u=(d,f,p)=>{Object.keys(d).forEach(v=>{var g,m;d[v]||l.value.push({time:v,id:f,label:p,status:"warning"}),(((g=d[v])==null?void 0:g.failNum)>0||((m=d[v])==null?void 0:m.totalNum)===0)&&l.value.push({time:v,id:f,label:p,status:"error"})})},c=d=>{o("click-element",d)};return vue.onBeforeUnmount(()=>{r.$baseEventBus.off("flow-warning-list")}),(d,f)=>{const p=vue.resolveComponent("aceHeader");return vue.unref(a)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$6,[vue.createElementVNode("div",_hoisted_2$5,[vue.createElementVNode("i",{class:"text-xl cursor-pointer ri-close-line",onClick:f[0]||(f[0]=v=>a.value=!1)})]),vue.createElementVNode("div",_hoisted_3$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),v=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:v.label},[vue.createVNode(p,{title:v.label},null,8,["title"]),vue.createElementVNode("div",_hoisted_4$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(v.list,(g,m)=>(vue.openBlock(),vue.createElementBlock("div",{class:"flex items-center mt-1 mb-1 text-gray-600 cursor-pointer hover:text-blue-500",onClick:_=>c(g),key:m},[_hoisted_6$2,vue.createElementVNode("span",_hoisted_7$2,vue.toDisplayString(g.time),1),vue.createElementVNode("span",_hoisted_8$2,vue.toDisplayString(g.label),1),vue.createElementVNode("span",_hoisted_9$2,vue.toDisplayString(g.status=="error"?"协同失败":"未更新"),1)],8,_hoisted_5$2))),128))])],64))),128))])])):vue.createCommentVNode("",!0)}}}),warningList_vue_vue_type_style_index_0_scoped_e7267060_lang="",warningList=_export_sfc$2(_sfc_main$7,[["__scopeId","data-v-e7267060"]]),_hoisted_1$5={class:"flex flex-col flex-1"},_sfc_main$6=vue.defineComponent({__name:"backend",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(""),s=vue.ref(""),u=vue.ref(!1),c=vue.ref(!1),d=vue.ref(!1),f=g=>{a.$refs[`${g}Ref`].init()},p=(g,m)=>{switch(g){case"flow-history-click":a.$refs.modelExtractLogRef.init({businessId:m.modelId,businessType:"file_extract",table:[{label:"日期",prop:"createTime"},{label:"文件名",prop:"file",slot:!0},{label:"抽取方式",prop:"createTime",func:_=>{var y;return((y=JSON.parse(_.businessSnapshot||"{}"))==null?void 0:y.extractType)==2?"覆盖":"追加"}},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"flow-data-extract":a.$refs.modelExtractLogRef.init({businessId:m.modelId,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}],ajaxUrl:`/api/ace-data-center/extract-log/listCollaborateExtractLogPage?modelId=${m.modelId}&descs=create_time`});break;case"flow-sql":l.value=m.modelId,u.value=!0;break;case"flow-data-import":c.value=!0,vue.nextTick(()=>{a.$refs.modelViewRef.init({id:m.modelId})});break;case"flow-model-data":s.value=m.modelName,l.value=m.modelId,d.value=!0;break}},v=()=>{o("success")};return n({flowDropdownCommand:f,init:p}),(g,m)=>{const _=vue.resolveComponent("aceModelConn"),y=vue.resolveComponent("aceModelSql"),b=vue.resolveComponent("aceModelNormal"),C=vue.resolveComponent("aceModelExcel"),x=vue.resolveComponent("aceModelExtract"),w=vue.resolveComponent("aceModelExtractLog"),V=vue.resolveComponent("aceModelDbExtract"),$=vue.resolveComponent("AppDrawer"),S=vue.resolveComponent("aceModelView"),E=vue.resolveComponent("aceDynamicList");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(_,{ref:"connRef",permission:[],onSuccess:m[0]||(m[0]=k=>v())},null,512),vue.createVNode(y,{ref:"sqlRef",permission:[],onSuccess:m[1]||(m[1]=k=>v())},null,512),vue.createVNode(b,{ref:"normalRef",permission:[],onSuccess:m[2]||(m[2]=k=>v())},null,512),vue.createVNode(C,{ref:"excelRef",permission:[],onSuccess:m[3]||(m[3]=k=>v())},null,512),vue.createVNode(x,{ref:"extractRef",permission:[],onSuccess:m[4]||(m[4]=k=>v())},null,512),vue.createVNode(w,{ref:"modelExtractLogRef"},null,512),vue.createVNode($,{modelValue:vue.unref(u),"onUpdate:modelValue":m[5]||(m[5]=k=>vue.isRef(u)?u.value=k:null),title:"编辑SQL",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(V,{model:{id:vue.unref(l)}},null,8,["model"])]),_:1},8,["modelValue"]),vue.createVNode($,{modelValue:vue.unref(c),"onUpdate:modelValue":m[6]||(m[6]=k=>vue.isRef(c)?c.value=k:null),title:"数据导入",size:"90%"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$5,[vue.createVNode(S,{ref:"modelViewRef",type:"ODS",permission:["EXCEL_EXTRACT"]},null,512)])]),_:1},8,["modelValue"]),vue.createVNode($,{modelValue:vue.unref(d),"onUpdate:modelValue":m[7]||(m[7]=k=>vue.isRef(d)?d.value=k:null),title:"模型数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(E,{id:vue.unref(l),title:vue.unref(s),showPageIndex:!0,isDownLoad:!1,ref:"AppDynamicListRef"},null,8,["id","title"])]),_:1},8,["modelValue"])],64)}}}),_withScopeId$1=i=>(vue.pushScopeId("data-v-4a3a652a"),i=i(),vue.popScopeId(),i),_hoisted_1$4={class:"text-base w-72 text-color-primary"},_hoisted_2$4=_withScopeId$1(()=>vue.createElementVNode("i",{class:"mr-1 text-xl ri-file-text-line"},null,-1)),_hoisted_3$3=["contenteditable"],_hoisted_4$3={class:"flex items-center flex-1 -ml-3"},_hoisted_5$1={key:0,class:"ml-2 mr-4 text-gray-200"},_hoisted_6$1=["onClick"],_hoisted_7$1={key:0,class:"absolute bg-white rounded-full -right-2 -top-2"},_hoisted_8$1={key:0,class:"text-red-700 ri-error-warning-fill"},_hoisted_9$1={key:1,class:"text-yellow-500 ri-error-warning-fill"},_hoisted_10$1={key:1,class:"loading"},_hoisted_11$1=_withScopeId$1(()=>vue.createElementVNode("i",{class:"ri-loader-line text-color-primary"},null,-1)),_hoisted_12$1=[_hoisted_11$1],_hoisted_13=_withScopeId$1(()=>vue.createElementVNode("div",{class:"h-full flow-main",id:"graph-container"},null,-1)),_hoisted_14=_withScopeId$1(()=>vue.createElementVNode("div",{id:"minimap",class:"absolute bottom-0 right-0"},null,-1)),_sfc_main$5=vue.defineComponent({__name:"index",props:{frameType:{default:"backend"}},setup(i){const n=i;vue.provide("frameType",n.frameType),vue.provide("getNode",null);const{proxy:r}=vue.getCurrentInstance(),{allModelAttribute:o}=fetch$1(r).model,{saveCollaborateFlow:a,detailCollaborateFlow:l,updateCollaborateFlow:s,collaborateExecRecordFlow:u}=fetch$1(r).collaborateFlow,c=vue.ref(null),d=vue.inject("local"),f=vue.ref([{label:"放大",key:"zoom-in",icon:"ri-zoom-in-line"},{label:"缩小",key:"zoom-out",icon:"ri-zoom-out-line"},{label:"前进",key:"redo",icon:"ri-arrow-go-forward-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"回退",key:"undo",icon:"ri-arrow-go-back-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"删除",key:"delete",icon:"ri-delete-bin-line",disabled:()=>vue.unref(_)=="flow-monitor"},{label:"保存",key:"submit",icon:"ri-save-line",disabled:()=>vue.unref(_)=="flow-monitor",click:async()=>{var L,I,j,M;if(vue.unref(_)=="flow-monitor")return;const O={collaborateJson:JSON.stringify(vue.unref(m).toJSON()),name:vue.unref(g).name||"未命名",id:void 0};(L=vue.unref(g))!=null&&L.id&&(O.name=(I=vue.unref(g))==null?void 0:I.name,O.id=(j=vue.unref(g))==null?void 0:j.id),await((M=vue.unref(g))!=null&&M.id?s(O):a(O))&&(r.$message.success("保存成功"),k())}},{type:"middle"},{label:"流程信息",key:"flow-msg",icon:"ri-flow-chart",click:()=>{_.value="flow-msg",$.value=null,k()}},{label:"流程监控",key:"flow-monitor",icon:"ri-webcam-line",click:()=>{_.value="flow-monitor",P()}},{label:"数据质量",key:"flow-quality",icon:"ri-terminal-box-line"}]),p=vue.ref({}),v=vue.ref(!1),g=vue.ref({}),{graph:m,activeName:_,nodeObj:y,state:b,isDelete:C,handleStartDrag:x,handleEvent:w,handleSetLabels:V,selectWidget:$}=useFlow("graph-container",n.frameType,()=>{k()},(O,D)=>{vue.unref(c).init(O,D)});vue.watch($,O=>{!O||vue.unref(p)[O==null?void 0:O.id]||!(O!=null&&O.id)||o({modelId:O.id}).then(D=>{vue.unref(p)[O.id]=D.data})});const S=vue.ref([]),E=vue.computed(()=>{let O=0,D=0;return vue.unref(S).filter(L=>L.shape=="Widget").forEach(L=>{var I,j;Object.values(((j=(I=L==null?void 0:L.data)==null?void 0:I.nodeStatus)==null?void 0:j.nodeStatusMap)??[]).forEach(M=>{M||(D+=1),((M==null?void 0:M.failNum)>0||(M==null?void 0:M.totalNum)===0)&&(O+=1)})}),{error:O,warning:D}}),k=async()=>{vue.unref(m).clearCells(),v.value=!0;const O=await l({});if(v.value=!1,!O.data){g.value={name:"未命名"};return}O.data.name||(O.data.name="未命名"),g.value=O.data;const D=O.data.collaborateJson;vue.unref(m).fromJSON(JSON.parse(D)),vue.unref(m).centerContent(),V(),P(!1)};r.$baseEventBus.on("desk-refresh",()=>P());const P=async(O=!0)=>{O&&(v.value=!0,vue.unref(m).clearCells()),vue.nextTick(async()=>{const D=r.$refs.monitorPannelRef,L=await u({startTime:(D==null?void 0:D.value[0])??dayjs().subtract(1,"week").format("YYYY-MM-DD"),endTime:(D==null?void 0:D.value[1])??dayjs().format("YYYY-MM-DD")});O&&(v.value=!1),L&&(L.data.cells.filter(I=>I.shape=="Widget").forEach(I=>{const j=L.data.nodeStatus[I.id];I.data.nodeStatus=j??{}}),O&&(vue.unref(m).fromJSON(L.data.cells),vue.unref(m).centerContent()),S.value=L.data.cells)})},T=(O,D)=>{if(O==="selfEventType"){const L=vue.unref(m).getNodes();vue.unref(m).getConnectedEdges(vue.unref(y),{incoming:!1,outgoing:!0}).forEach(j=>{const M=L.find(R=>j.target.cell==R.id);M&&(M.data.triggerEventType=D)}),V()}},B=O=>{const{cells:D}=vue.unref(m).toJSON(),L=vue.unref(m).getNodes();vue.unref(m).cleanSelection(),setTimeout(()=>{const I=L.find(j=>{var M;return j.id==((M=D.find(R=>R.shape=="Widget"&&(R==null?void 0:R.data.id)==O.id))==null?void 0:M.id)});I&&vue.unref(m).select(I)})},N=()=>{r.$refs.menuRef.init()};return(O,D)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"flex flex-col h-full overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(d)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElHeader),{class:"flex items-center flow-header"},{default:vue.withCtx(()=>{var L;return[vue.createElementVNode("div",_hoisted_1$4,[_hoisted_2$4,vue.createElementVNode("span",{contenteditable:vue.unref(_)=="flow-msg",class:"flex-1 outline-none cursor-text contenteditable",onBlur:D[0]||(D[0]=I=>vue.unref(g).name=vue.unref(g).name||"未命名"),onInput:D[1]||(D[1]=I=>vue.unref(g).name=I.target.innerText)},vue.toDisplayString((L=vue.unref(g))==null?void 0:L.name),41,_hoisted_3$3)]),vue.createElementVNode("div",_hoisted_4$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),I=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:I.key},[I.type=="middle"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$1,"|")):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["relative widget-action",[I.key,vue.unref(_)==I.key?"active":"",I.disabled&&I.disabled()?"text-color-info":"",!vue.unref(b).canUndo&&I.key=="undo"||!vue.unref(b).canRedo&&I.key=="redo"||I.key=="delete"&&!vue.unref(C)?"text-color-info":""]]),onClick:j=>(I.click&&I.click())??vue.unref(w)(I.key)},[vue.createElementVNode("i",{class:vue.normalizeClass(I.icon)},null,2),vue.createElementVNode("span",null,vue.toDisplayString(I.label),1),I.key=="flow-monitor"?(vue.openBlock(),vue.createElementBlock("span",_hoisted_7$1,[vue.unref(E).error?(vue.openBlock(),vue.createElementBlock("i",_hoisted_8$1)):vue.unref(E).warning?(vue.openBlock(),vue.createElementBlock("i",_hoisted_9$1)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)],10,_hoisted_6$1))],64))),128))])]}),_:1}),vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"overflow-hidden"},{default:vue.withCtx(()=>[vue.unref(_)!="flow-monitor"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"flow-aside",width:"288px"},{default:vue.withCtx(()=>[vue.createVNode(Menu,{ref:"menuRef",onMouseDown:vue.unref(x),onFlowDropdownCommand:D[2]||(D[2]=L=>vue.unref(c).flowDropdownCommand(L))},null,8,["onMouseDown"])]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(elementPlus.ElMain),{class:"relative"},{default:vue.withCtx(()=>[vue.unref(_)=="flow-monitor"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(monitorPannel,{ref:"monitorPannelRef",cellsData:vue.unref(S),msg:vue.unref(E),onChange:P},null,8,["cellsData","msg"]),vue.createVNode(warningList,{ref:"warningListRef",onClickElement:B},null,512)],64)):vue.createCommentVNode("",!0),vue.unref(v)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$1,_hoisted_12$1)):vue.createCommentVNode("",!0),_hoisted_13,_hoisted_14,vue.unref($)&&vue.unref(_)=="flow-msg"?(vue.openBlock(),vue.createBlock(SelectWidget,{key:2,selectWidget:vue.unref($),options:vue.unref(p),onChange:T},null,8,["selectWidget","options"])):vue.createCommentVNode("",!0)]),_:1})]),_:1}),vue.createVNode(_sfc_main$6,{ref_key:"backendRef",ref:c,onSuccess:N},null,512)]),_:1},8,["locale"])]),_:1}))}}),index_vue_vue_type_style_index_0_scoped_4a3a652a_lang="",aceFlow=_export_sfc$2(_sfc_main$5,[["__scopeId","data-v-4a3a652a"]]),_sfc_main$4=vue.defineComponent({__name:"AppDeep",setup(i,{expose:n}){const{proxy:r}=vue.getCurrentInstance(),{dynamicSearchForm:o,dynamicSearchFormat:a,dynamicSearchParams:l}=r.$aceDynamicSearch(r),s=vue.ref({}),u=vue.ref(null),c=vue.ref(!1),d=vue.ref(""),f=vue.ref({});return n({init:async(v,g={})=>{var x,w,V;const m=await r.$baseHttp.get(`/api/ace-data-center/model-indicators/detail?id=${v}`);if(!m)return;f.value=m.data;const _=JSON.parse(m.data.sortArgsJson??"{}"),y=Object.keys(vue.unref(_)).map($=>({field:$,type:_[$]=="ascending"?"asc":"desc"})),b=a(JSON.parse(((x=m.data)==null?void 0:x.formConfJson)??"[]"));Object.keys(g).forEach($=>{const S=b.find(k=>k.key==$);if(!S)return;let E=g[$];if(S.type.indexOf("yy")>=0){let k="YYYY";S.type.indexOf("yymm")>=0&&(k="YYYY-MM"),S.type.indexOf("yymmdd")>=0&&(k="YYYY-MM-DD"),S.type.indexOf("yymmddhhmmss")>=0&&(k="YYYY-MM-DD HH:mm:ss"),Array.isArray(E)?E=E.map(P=>dayjs(P).format(k)):E=dayjs(E).format(k),Array.isArray(E)&&S.type.indexOf("Range")==-1&&(E=E[0])}S.minValue=Array.isArray(E)?E[0]:E,S.maxValue=Array.isArray(E)?E.at(-1):E,S.value=E.toString()}),o.value=b;const C={aggArgsJson:m.data.aggArgsJson,groupArgsJson:m.data.groupArgsJson,sortArgsJson:JSON.stringify(y),modelIndicatorsId:v,params:l(b),pageSize:m.data.pageSize,modelId:m.data.modelId};c.value=!0,d.value=m.data.name,s.value={x:JSON.parse((w=vue.unref(f))==null?void 0:w.groupArgsJson),y:JSON.parse((V=vue.unref(f))==null?void 0:V.aggArgsJson),params:C}}}),(v,g)=>{const m=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(m,{modelValue:vue.unref(c),"onUpdate:modelValue":g[0]||(g[0]=_=>vue.isRef(c)?c.value=_:null),title:vue.unref(d)},{default:vue.withCtx(()=>[vue.createVNode(IndicatorsView,{ref_key:"indicatorsViewRef",ref:u,dynamicSearchForm:vue.unref(o),result:vue.unref(f),chartData:vue.unref(s)},null,8,["dynamicSearchForm","result","chartData"])]),_:1},8,["modelValue","title"])}}}),_withScopeId=i=>(vue.pushScopeId("data-v-d060dcf0"),i=i(),vue.popScopeId(),i),_hoisted_1$3=["onClick"],_hoisted_2$3=["onClick"],_hoisted_3$2={class:"flex"},_hoisted_4$2=["onClick"],_hoisted_5=["width","height"],_hoisted_6=["fill"],_hoisted_7=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-file-text-line"},null,-1)),_hoisted_8=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-bar-chart-box-line"},null,-1)),_hoisted_9=_withScopeId(()=>vue.createElementVNode("i",{class:"ri-computer-line"},null,-1)),_hoisted_10=_withScopeId(()=>vue.createElementVNode("i",{class:"text-white ri-close-circle-fill"},null,-1)),_hoisted_11=[_hoisted_10],_hoisted_12=["src"],_sfc_main$3=vue.defineComponent({__name:"AppCustomChart",props:{option:{default:{}},chartType:{default:""},maxHeight:{default:"350px"},renderer:{default:"canvas"},loading:{type:Boolean,default:!1},isBigScreen:{type:Boolean,default:!1},isCheckClick:{type:Boolean,default:!0},indicatorsId:{default:""},renderId:{default:""},params:{default:{}},modelType:{default:""}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance();r.$aceDynamicSearch(r);const o=r.$globalHooks.useRouter(),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(!1),d=vue.ref(null),f=vue.computed(()=>{if(n.chartType!="8")return[];const Y=n.option.dataset.dimensions.map(oe=>{var z,ee;return(z=n.option)!=null&&z.customSeriesData[oe]?{key:oe,textAlign:"center",...(ee=n.option)==null?void 0:ee.customSeriesData[oe]}:{}});return n.option.showIndex?[{textAlign:"center",index:!0,key:n.option.indexHeader,width:n.option.indexWidth,headColor:"#fff"},...Y]:Y}),p=Y=>{var z;const{toFixed:oe}=((z=n.option)==null?void 0:z.customSeriesData[Y])??0;return n.option.dataset.source.reduce((ee,le)=>ee+(le[Y]?Number(le[Y]):0),0).toFixed(oe)},v=Y=>{const oe=n.option.customSeriesData[Y];if(!(oe!=null&&oe.sum))return"";const{prefix:z,toFixed:ee,suffix:le,headColor:se,textAlign:K}=oe,Z=n.option.dataset.source.map(U=>Number(U[Y]||0));return Z.every(U=>Number.isNaN(U))?"":`<span style="color: ${se||"#000"};text-align: ${K||"center"}">${z}${Z.reduce((U,q)=>{const X=Number(q);return Number.isNaN(X)?U:U+q},0).toFixed(ee)}${le}</span>`},{init:g}=useMap(),m=vue.ref([n.option.code]),_=vue.ref(null),y=vue.ref(null),b=Y=>(Y.modelIndicatorsId=vue.unref(y).id,Y.row=vue.unref(_),Y),C=Y=>{Y.forEach(oe=>{const z=n.params[`${oe.key}1`]??"",ee=n.params[`${oe.key}2`]??"",le=n.params[oe.key]??"";z!==""&&(oe.minValue=z),ee!==""&&(oe.maxValue=ee),oe.value=le})},x=vue.reactive({x:0,y:0,isHover:!0,timer:null,data:null}),w=async Y=>{if(Y.seriesType!=="map"){x.x=Y.event.offsetX,x.y=Y.event.offsetY,x.data=Y.value,J();return}if(!n.isCheckClick)return;const{code:oe}=Y.data;n.option.code=oe,vue.unref(m).includes(String(oe))||m.value.push(String(oe)),vue.unref(a).setOption(n.option,!0),g(n.option,()=>{const{x:z,y:ee}=n.option.dataShow;x.data={[z]:Y.data.name,[ee]:Y.data.data},J()})},V=Y=>{var ee,le,se;if(Y.target&&n.chartType=="11"){x.x=Y.offsetX,x.y=Y.offsetY;const K=n.option.dataShow.y;x.data={[K]:(n.option.series[0].data[0]*100).toFixed(2)};return}if(!["1","3","5","11"].includes(n.chartType)||Y.target)return;const oe=[Y.offsetX,Y.offsetY],{dataset:z}=(ee=vue.unref(a))==null?void 0:ee.chart.getOption();if((le=vue.unref(a))!=null&&le.chart.containPixel("grid",oe)){const K=(se=vue.unref(a))==null?void 0:se.chart.convertFromPixel({seriesIndex:0},oe).filter(Z=>Number.isInteger(Z));x.x=Y.offsetX,x.y=Y.offsetY,x.data=z[0].source[Math.abs(K[0])]}if(Y.target&&n.chartType=="11"){x.x=Y.offsetX,x.y=Y.offsetY;const K=n.option.dataShow.y;x.data={[K]:(n.option.series[0].data[0]*100).toFixed(2)}}},$=()=>{clearTimeout(x.timer),x.isHover=!0},S=()=>{(n.isCheckClick||n.indicatorsId)&&(x.timer=setTimeout(()=>{const Y=document.querySelector(":hover");if(!Y||!vue.unref(u).contains(Y)){x.isHover=!1,x.x=0,x.y=0;const oe=document.getElementById(`render-${n.option.id}`);oe&&(oe.style.zIndex=oe.getAttribute("data-z"))}},100))},E=Y=>{const{rowIndex:oe}=Y;x.data=n.option.dataset.source[oe]},k=Y=>{["ceil","row-item"].includes(Y.target.parentElement.className)&&W(Y,vue.unref(d).getBoundingClientRect())},P=(Y,oe)=>{const{rowIndex:z}=oe;x.data=n.option.dataset.source[z],W(Y,vue.unref(d).getBoundingClientRect())},T=(Y,oe)=>{x.data={[oe]:p(oe)},W(Y,vue.unref(s).getBoundingClientRect())},B=(Y,oe)=>{x.data={[oe]:p(oe)},W(Y,vue.unref(s).getBoundingClientRect())},N=async()=>{if(!n.isCheckClick||!n.indicatorsId)return;const Y=`/api/ace-data-center/model-indicators/detail?id=${n.indicatorsId}`,oe=await r.$baseHttp.get(Y);y.value=oe.data,_.value=x.data??{},c.value=!0},O=async()=>{var oe;const Y={};(((oe=n.option.dataShow)==null?void 0:oe.deep2Linkage)??[]).forEach(z=>{var ee;if((z.value??"")!="")if(((z==null?void 0:z.value)??"").indexOf("||")>=0){const le=z.value.split("||")[1],se=n.params[`${le}1`]??"",K=n.params[`${le}2`]??"",Z=n.params[le]??"";Z!==""&&(Y[z.key]=Z),se!==""&&K!==""&&(Y[z.key]=[se,K])}else(((ee=x==null?void 0:x.data)==null?void 0:ee[z.value])??"")!==""&&(Y[z.key]=x.data[z.value])}),vue.unref(l).init(n.option.dataShow.deep2Id,Y)},D=vue.ref(!1),L=vue.reactive({type:"",data:""});vue.ref({});const I=vue.ref({}),j=vue.ref({}),M=async()=>{I.value={},j.value={};const{fullscreenId:Y,fullscreenType:oe,fullscreenLinkage:z,fullscreenControlLinkage:ee,fullscreenOpenType:le}=n.option.dataShow;["","indicators"].includes(oe)&&(z??[]).forEach(K=>{K.value.length&&K.value.forEach(Z=>{var X;const[U,q]=Z;if(vue.unref(I)[U]||(vue.unref(I)[U]={}),((K==null?void 0:K.key)??"").indexOf("||")>=0){const ie=K.key.split("||")[1];vue.unref(I)[U][q]=Q(ie)}else vue.unref(I)[U][q]=((X=x==null?void 0:x.data)==null?void 0:X[K.key])??""})}),["control"].includes(oe)&&(j.value={},(ee??[]).forEach(K=>{var U;const Z=K.value.toString();if(Z!=="")if(((K==null?void 0:K.name)??"").indexOf("||")>=0){const q=K.name.split("||")[1];Z.split(",").forEach(X=>{j.value[X]=Q(q)})}else j.value[Z]=((U=x==null?void 0:x.data)==null?void 0:U[K.key])??""})),x.x=0;const se=o.resolve({name:"big-data-preview",query:{id:Y,bigScreenQueryParams:JSON.stringify(I.value),bigScreenControlParams:JSON.stringify(j.value)}});if(le=="blank"){window.top.open(se.href);return}if(self!=top){o.replace({name:"big-data-preview",query:se.query});return}L.data=se.href,D.value=!0},R=(Y,oe)=>`${oe.prefix??""}${isNaN(Y)||(Y??"")==""?Y??"-":Number(Y).toFixed(oe.toFixed)}${oe.suffix??""}`,F=()=>{m.value=m.value.filter(Y=>Y!=n.option.code),n.option.code=vue.unref(m).at(-1),g(n.option,()=>{})},W=(Y,oe)=>{var se,K,Z;if(!((se=n.option.dataShow)!=null&&se.deep)&&!((K=n.option.dataShow)!=null&&K.deep2)&&!((Z=n.option.dataShow)!=null&&Z.fullscreen))return;const z=document.getElementById(n.renderId);let ee=1;if(z){const U=window.getComputedStyle(z).transform;ee=new DOMMatrix(U).a}x.x=(Y.clientX-oe.left)/ee,x.y=(Y.clientY-oe.top)/ee;const le=document.getElementById(`render-${n.option.id}`);le&&(le.style.zIndex="9999"),J()},J=()=>{const Y=n.option.linkage??{};if(n.renderId){const oe=[];if(Object.keys(Y).forEach(z=>{!Array.isArray(Y[z])||Y[z].length==0||Y[z].forEach(ee=>{if(z.indexOf("||")>=0){const le=z.split("||")[1];oe.push({indicatorsId:ee[0],key:ee[1],value:Q(le)})}else(x.data[z]??"")!==""&&oe.push({indicatorsId:ee[0],key:ee[1],value:x.data[z]})})}),oe.length==0)return;r.$baseEventBus.emit(`ace-screen-indicators-linkage-chart-${n.renderId}`,oe)}},Q=Y=>{const oe=n.params[`${Y}1`]??"",z=n.params[`${Y}2`]??"",ee=n.params[Y]??"";return ee!==""?ee:oe!==""&&z!==""?[oe,z]:""};return(Y,oe)=>{var Z,U,q,X,ie,H,ne,G,te,re,ae,ue,ce,de,fe,ve,pe,me,ge,$e,Ge;const z=vue.resolveComponent("v-chart"),ee=vue.resolveComponent("aceHeader"),le=vue.resolveComponent("AppTable"),se=vue.resolveComponent("aceDynamicList"),K=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[Y.chartType=="7"&&n.option.dataShow?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"relative flex flex-wrap",ref_key:"parentRef",ref:s,style:vue.normalizeStyle({gap:(n.option.margin??10)+"px"})},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.dimensions,he=>{var be,Ee,Oe,Re,Le,Je,ye,Ae,Ke,Qe,bt,pt,Ye,ke;return vue.openBlock(),vue.createElementBlock("div",{key:he,class:"flex flex-col rounded cursor-pointer justify-evenly",onClick:vue.withModifiers(Pe=>T(Pe,he),["stop"]),style:vue.normalizeStyle({padding:(n.option.padding??10)+"px",background:(Ee=(be=n.option)==null?void 0:be.customSeriesData[he])==null?void 0:Ee.bgColor,color:(Re=(Oe=n.option)==null?void 0:Oe.customSeriesData[he])==null?void 0:Re.color,minWidth:"120px",fontSize:`${((Je=(Le=n.option)==null?void 0:Le.customSeriesData[he])==null?void 0:Je.fontSize)||14}px`})},[vue.createElementVNode("div",null,[vue.createElementVNode("span",null,vue.toDisplayString((Ae=(ye=n.option)==null?void 0:ye.customSeriesData[he])==null?void 0:Ae.prefix),1),vue.createTextVNode(" "+vue.toDisplayString(p(he))+" ",1),vue.createElementVNode("span",null,vue.toDisplayString((Qe=(Ke=n.option)==null?void 0:Ke.customSeriesData[he])==null?void 0:Qe.suffix),1)]),((pt=(bt=n.option)==null?void 0:bt.customSeriesData[he])==null?void 0:pt.hideLabel)!==!0?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"mt-2",style:vue.normalizeStyle({fontSize:`${((ke=(Ye=n.option)==null?void 0:Ye.customSeriesData[he])==null?void 0:ke.titleFontSize)||14}px`})},vue.toDisplayString(he),5)):vue.createCommentVNode("",!0)],12,_hoisted_1$3)}),128))],4)):vue.createCommentVNode("",!0),Y.chartType=="10"&&n.option.dataShow?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["relative flex",[["vertical"].includes(((Z=n.option)==null?void 0:Z.direction)??"")?"flex-col":""]]),ref_key:"parentRef",ref:s,style:vue.normalizeStyle({gap:(n.option.margin??10)+"px"})},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.dimensions,he=>{var be,Ee,Oe,Re,Le,Je,ye,Ae,Ke,Qe,bt,pt,Ye,ke;return vue.openBlock(),vue.createElementBlock("div",{key:he,onClick:vue.withModifiers(Pe=>B(Pe,he),["stop"]),class:vue.normalizeClass(["items-center justify-center flex-1 cursor-pointer progress",[["line"].includes((Ee=(be=n.option)==null?void 0:be.customSeriesData[he])==null?void 0:Ee.type)?"":"flex"]]),style:vue.normalizeStyle(`--bgColor: ${n.option.customSeriesData[he].bgColor||"#e5e9f2"}`)},[vue.createVNode(vue.unref(elementPlus.ElProgress),{strokeLinecap:(Oe=n.option.customSeriesData[he])==null?void 0:Oe.strokeLinecap,width:Y.isBigScreen?Number(Y.maxHeight.replace("px","")):(Re=n.option.customSeriesData[he])==null?void 0:Re.width,duration:(Le=n.option.customSeriesData[he])==null?void 0:Le.duration,stripedFlow:(Je=n.option.customSeriesData[he])==null?void 0:Je.stripedFlow,striped:(ye=n.option.customSeriesData[he])==null?void 0:ye.striped,textInside:["line"].includes((Ke=(Ae=n.option)==null?void 0:Ae.customSeriesData[he])==null?void 0:Ke.type)?(Qe=n.option.customSeriesData[he])==null?void 0:Qe.textInside:!1,strokeWidth:(bt=n.option.customSeriesData[he])==null?void 0:bt.strokeWidth,color:(pt=n.option.customSeriesData[he])==null?void 0:pt.color,type:(ke=(Ye=n.option)==null?void 0:Ye.customSeriesData[he])==null?void 0:ke.type,percentage:Number(p(he))},{default:vue.withCtx(({percentage:Pe})=>{var Me,We,Se,Tt,Bt,It,Dt,zt,Ft,qt;return[vue.createElementVNode("div",{style:vue.normalizeStyle({fontSize:`${((We=(Me=n.option)==null?void 0:Me.customSeriesData[he])==null?void 0:We.fontSize)||14}px`,color:(Tt=(Se=n.option)==null?void 0:Se.customSeriesData[he])==null?void 0:Tt.fontColor})},[vue.createElementVNode("span",null,vue.toDisplayString((It=(Bt=n.option)==null?void 0:Bt.customSeriesData[he])==null?void 0:It.prefix),1),vue.createElementVNode("span",null,vue.toDisplayString(Pe.toFixed(((zt=(Dt=n.option)==null?void 0:Dt.customSeriesData[he])==null?void 0:zt.toFixed)||0)),1),vue.createElementVNode("span",null,vue.toDisplayString((qt=(Ft=n.option)==null?void 0:Ft.customSeriesData[he])==null?void 0:qt.suffix),1)],4)]}),_:2},1032,["strokeLinecap","width","duration","stripedFlow","striped","textInside","strokeWidth","color","type","percentage"])],14,_hoisted_2$3)}),128))],6)):vue.createCommentVNode("",!0),Y.chartType=="8"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[(X=(q=(U=n.option)==null?void 0:U.dataset)==null?void 0:q.dimensions)!=null&&X.length?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"mb-3",ref_key:"scrollBoardRef",ref:d,style:vue.normalizeStyle(`--fontSize: ${n.option.fontSize||13}px `),onClick:k},[["single","page"].includes(n.option.carousel)?(vue.openBlock(),vue.createBlock(vue.unref(Tl),{key:0,config:{header:n.option.dataset.dimensions.map(he=>{var Ee,Oe;let be=he;if((Ee=n.option)!=null&&Ee.customSeriesData[he]){const{headColor:Re,text:Le}=(Oe=n.option)==null?void 0:Oe.customSeriesData[he];return`<span style='color:${Re||"#000"};'>${(Le??"")!==""?Le:be}</span>`}return be}),data:n.option.dataset.source.map(he=>n.option.dataset.dimensions.map(be=>{var Oe,Re;const Ee=he[be];if((Oe=n.option)!=null&&Oe.customSeriesData[be]){const Le=(Re=n.option)==null?void 0:Re.customSeriesData[be];return`<span style='color:${(Le==null?void 0:Le.color)||"#000"};'>${R(Ee,Le)}</span>`}return Ee})),align:vue.unref(f).map(he=>he.textAlign),index:n.option.showIndex,indexHeader:n.option.indexHeader,waitTime:n.option.waitTime?n.option.waitTime*1e3:2e3,headerHeight:n.option.headerHeight??35,carousel:n.option.carousel||"single",rowNum:n.option.rowNum??5,headerBGC:n.option.headerBGC||"#f6f8fa",oddRowBGC:n.option.oddRowBGC||"#fff",evenRowBGC:n.option.evenRowBGC||"#fff",columnWidth:vue.unref(f).map(he=>he.width)},onClick:E,style:vue.normalizeStyle({width:"100%",height:Y.maxHeight})},null,8,["config","style"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createElementVNode("div",_hoisted_3$2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),he=>(vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle({height:`${n.option.headerHeight??35}px`,background:n.option.headerBGC||"#f6f8fa",color:`${he.headColor||"#000"}`,justifyContent:he.textAlign,flex:he.width?`0 0 ${he.width}px`:1,padding:"0 10px",fontSize:"var(--fontSize)",overflow:"hidden"}),class:"flex items-center"},vue.toDisplayString(he.text||he.key),5))),256))]),vue.createVNode(vue.unref(elementPlus.ElScrollbar),{"max-height":Y.maxHeight},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.option.dataset.source,(he,be)=>(vue.openBlock(),vue.createElementBlock("div",{class:"flex cursor-pointer",onClick:vue.withModifiers(Ee=>P(Ee,{rowIndex:be}),["stop"])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),Ee=>{var Oe,Re;return vue.openBlock(),vue.createElementBlock("div",{class:"flex items-center flex-1",style:vue.normalizeStyle({height:`${n.option.headerHeight||35}px`,color:`${Ee.color||"#000"}`,justifyContent:Ee.textAlign,flex:Ee.width?`0 0 ${Ee.width}px`:1,padding:"5px 10px",fontSize:"var(--fontSize)",background:Number(be)%2==0?((Oe=n.option)==null?void 0:Oe.evenRowBGC)||"#fff":((Re=n.option)==null?void 0:Re.oddRowBGC)||"#fff"})},[Ee.index?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"inline-flex items-center justify-center h-4 rounded",style:vue.normalizeStyle({color:"#fff",background:n.option.headerBGC||"#f6f8fa",padding:"0 3px"})},vue.toDisplayString(Number(be)+1),5)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(R(he[Ee.key],Ee)),1)],64))],4)}),256))],8,_hoisted_4$2))),256))]),_:1},8,["max-height"])],64)),vue.unref(f).some(he=>he.sum)?(vue.openBlock(),vue.createBlock(vue.unref(Tl),{key:2,config:{header:n.option.dataset.dimensions.map(he=>{var be;return(be=n.option)!=null&&be.customSeriesData[he]?v(he):""}),indexHeader:"合计",align:vue.unref(f).map(he=>he.textAlign),index:n.option.showIndex,headerHeight:n.option.headerHeight||35,headerBGC:n.option.headerBGC||"#f6f8fa",columnWidth:vue.unref(f).map(he=>he.width)},style:{width:"100%"}},null,8,["config"])):vue.createCommentVNode("",!0)],4)):vue.createCommentVNode("",!0)],64)):(H=(ie=n.option)==null?void 0:ie.series)!=null&&H.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:3},[vue.unref(m).length>1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",class:"absolute top-2.5 left-2.5 z-50 bg-black text-white p-1.5",onClick:F},{default:vue.withCtx(()=>[vue.createTextVNode(" 返回 ")]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(z,{option:n.option,autoresize:"",ref_key:"echartRef",ref:a,loading:Y.loading,"onZr:mousedown":V,onClick:w,onMouseout:S},null,8,["option","loading"])],64)):Y.modelType=="INDICATORS"?(vue.openBlock(),vue.createBlock(z,{key:n.option.id,option:n.option.option,autoresize:"",ref_key:"echartRef",ref:a,loading:Y.loading,"onZr:mousedown":V,onClick:w,onMouseout:S},null,8,["option","loading"])):vue.createCommentVNode("",!0),vue.createVNode(K,{modelValue:vue.unref(c),"onUpdate:modelValue":oe[0]||(oe[0]=he=>vue.isRef(c)?c.value=he:null),title:"查看明细",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(ee,{title:"统计:",class:"mb-2"}),vue.createVNode(le,{height:null,tableData:Object.keys(vue.unref(_)).map(he=>({label:he,prop:he})),list:[vue.unref(_)],loading:!1},null,8,["tableData","list"]),vue.createVNode(ee,{title:"钻取明细:",class:"mt-4 mb-2"}),vue.createVNode(se,{id:vue.unref(y).modelId,keyName:"modelIndicatorsId",title:vue.unref(y).modelName,isDownLoad:!0,url:"/api/ace-data-center/model-indicators/drilling",formatParamsFunc:b,defParamsFunc:C},null,8,["id","title"])]),_:1},8,["modelValue"]),((ne=Y.option.dataShow)!=null&&ne.deep||(G=Y.option.dataShow)!=null&&G.deep2||(te=Y.option.dataShow)!=null&&te.fullscreen)&&Y.option.dataShow.deepOpen?(vue.openBlock(),vue.createElementBlock("div",{key:5,class:"absolute right-2 top-2",style:vue.normalizeStyle({right:`${Y.option.dataShow.deepOpenRight||2}%`,top:`${Y.option.dataShow.deepOpenTop||2}%`})},[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:Y.option.dataShow.deepOpenContent||"点击图表可下钻数据"},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock("svg",{viewBox:"0 0 1024 1024",width:Y.option.dataShow.deepOpenContentSize||30,height:Y.option.dataShow.deepOpenContentSize||30},[vue.createElementVNode("path",{d:"M508.330667 106.837333L120.576 297.813333a38.4 38.4 0 1 1-33.962667-68.949333L491.434667 29.525333a38.4 38.4 0 0 1 34.133333 0.085334l400.384 199.338666a38.4 38.4 0 0 1-34.218667 68.778667L508.330667 106.837333z m-21.333334 888.064c-5.632 0-11.264-5.632-16.981333-11.349333l-112.981333-112.981333a61.013333 61.013333 0 0 1-16.981334-39.594667c0-11.264 5.632-28.16 16.981334-39.509333a54.613333 54.613333 0 0 1 79.104 0l16.981333 16.981333V548.437333c0-33.877333 22.613333-56.490667 56.490667-56.490666s56.490667 22.613333 56.490666 56.490666v260.010667l16.981334-17.066667a54.613333 54.613333 0 0 1 79.104 0 54.613333 54.613333 0 0 1 0 79.189334l-113.066667 112.981333c-5.632 5.717333-11.264 5.717333-16.896 11.349333-16.981333 5.632-33.962667 5.632-45.226667 0z m21.418667-695.808L140.8 486.314667l163.669333 80.896a38.4 38.4 0 1 1-34.133333 68.778666L38.229333 521.216a38.4 38.4 0 0 1-0.426666-68.693333L491.008 221.866667a38.4 38.4 0 0 1 34.730667 0l453.290666 229.973333a38.4 38.4 0 0 1 0 68.437333L751.616 635.818667A38.4 38.4 0 0 1 716.8 567.466667l160.085333-81.322667-368.469333-186.965333z",fill:Y.option.dataShow.deepOpenColor||"#000"},null,8,_hoisted_6)],8,_hoisted_5))]),_:1},8,["content"])],4)):vue.createCommentVNode("",!0),n.isCheckClick&&n.indicatorsId?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:6},[vue.withDirectives(vue.createElementVNode("div",{class:"tooltip",ref_key:"hoveredElement",ref:u,onMouseover:$,onMouseout:S,style:vue.normalizeStyle({position:"absolute",left:vue.unref(x).x+"px",top:vue.unref(x).y+"px"})},[(ae=(re=Y.option)==null?void 0:re.dataShow)!=null&&ae.deep?(vue.openBlock(),vue.createElementBlock("div",{key:0,onClick:N},[_hoisted_7,vue.createTextVNode(" 数据下钻 ")])):vue.createCommentVNode("",!0),(ce=(ue=Y.option)==null?void 0:ue.dataShow)!=null&&ce.deep2&&((fe=(de=Y.option)==null?void 0:de.dataShow)!=null&&fe.deep2Id)?(vue.openBlock(),vue.createElementBlock("div",{key:1,onClick:O},[_hoisted_8,vue.createTextVNode(" 二级指标 ")])):vue.createCommentVNode("",!0),(pe=(ve=Y.option)==null?void 0:ve.dataShow)!=null&&pe.fullscreen&&((ge=(me=Y.option)==null?void 0:me.dataShow)!=null&&ge.fullscreenId)&&((Ge=($e=Y.option)==null?void 0:$e.dataShow)!=null&&Ge.fullscreenName)?(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:M},[_hoisted_9,vue.createTextVNode(" "+vue.toDisplayString(Y.option.dataShow.fullscreenName),1)])):vue.createCommentVNode("",!0)],36),[[vue.vShow,vue.unref(x).x&&vue.unref(x).y]]),vue.createVNode(_sfc_main$4,{ref_key:"appDeepRef",ref:l},null,512),vue.createVNode(vue.unref(elementPlus.ElDialog),{class:"ace-screen-dialog",modelValue:vue.unref(D),"onUpdate:modelValue":oe[2]||(oe[2]=he=>vue.isRef(D)?D.value=he:null),"append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"close-on-press-escape":!1},{default:vue.withCtx(()=>[vue.createElementVNode("div",{onClick:oe[1]||(oe[1]=vue.withModifiers(he=>D.value=!1,["stop"])),class:"ace-screen-dialog-close"},_hoisted_11),vue.createElementVNode("iframe",{src:vue.unref(L).data},null,8,_hoisted_12)]),_:1},8,["modelValue"])],64)):vue.createCommentVNode("",!0)],64)}}}),AppCustomChart_vue_vue_type_style_index_0_scoped_d060dcf0_lang="",aceCustomChart=_export_sfc$2(_sfc_main$3,[["__scopeId","data-v-d060dcf0"]]),_hoisted_1$2={class:"appChart"},_hoisted_2$2={key:2,class:"relative fadeIn animated",style:{height:"500px"}},_sfc_main$2=vue.defineComponent({__name:"AppChart",props:{type:{default:""},options:{default:null},loading:{type:Boolean,default:!1}},setup(i){const n=i,r=vue.ref(null);return vue.watch(()=>n.options,async o=>{if(o){if(n.type==9){const{code:a,mapName:l}=n.options,s=await fetch(`/map/${a}.json`).then(u=>u.json());core.registerMap(l,s)}r.value=n.options}},{deep:!0,immediate:!0}),(o,a)=>{const l=vue.resolveComponent("aceCustomChart"),s=vue.resolveComponent("AppEmpty"),u=vue.resolveComponent("AppTable"),c=vue.resolveComponent("v-chart");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[["7","10"].includes(String(o.type))?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[typeof o.options=="object"?(vue.openBlock(),vue.createBlock(l,{key:0,option:o.options,chartType:String(o.type)},null,8,["option","chartType"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(o.options),1)],64))],64)):o.type==8?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[o.options.length==0?(vue.openBlock(),vue.createBlock(s,{key:0,description:"暂无数据"})):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[Array.isArray(o.options)?(vue.openBlock(),vue.createBlock(u,{key:1,tableData:Object.keys(o.options[0]).map(d=>({label:d,prop:d})),list:o.options},null,8,["tableData","list"])):(vue.openBlock(),vue.createBlock(l,{key:0,option:o.options,chartType:String(o.type)},null,8,["option","chartType"]))],64))],64)):vue.unref(r)&&typeof vue.unref(r)=="object"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$2,[vue.createVNode(c,{ref:"echart",option:vue.unref(r),autoresize:""},null,8,["option"])])):vue.createCommentVNode("",!0)])),[[vue.unref(elementPlus.vLoading),o.type==""||o.loading]])}}}),_hoisted_1$1={class:"flex items-center justify-between app-header"},_hoisted_2$1={class:"flex items-center"},_hoisted_3$1=vue.createElementVNode("span",{class:"inline-block w-1 h-4 mr-2",style:{background:"var(--el-color-primary)"}},null,-1),_hoisted_4$1={class:"text-base font-bold"},_sfc_main$1=vue.defineComponent({__name:"AppHeader",props:{title:{default:""}},setup(i){return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("div",_hoisted_2$1,[_hoisted_3$1,vue.createElementVNode("span",_hoisted_4$1,vue.toDisplayString(n.title),1),vue.renderSlot(n.$slots,"left")]),vue.renderSlot(n.$slots,"default")]))}}),_hoisted_1=["width","height"],_hoisted_2=["fill"],_hoisted_3=vue.createElementVNode("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"},null,-1),_hoisted_4=[_hoisted_3],_sfc_main=vue.defineComponent({__name:"AppLoading",props:{color:{default:"#5887da"},size:{default:"10"}},setup(i){const n=i;return(r,o)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:`${n.size}px`,height:`${n.size}px`,viewBox:"0 0 50 50","xml:space":"preserve"},[vue.createElementVNode("path",{fill:r.color,d:"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z",transform:"rotate(275.098 25 25)"},_hoisted_4,8,_hoisted_2)],8,_hoisted_1))}}),aceComponentsLib={install(i,n){if(console.log(`ace-component-lib-${version}`),i.use(t),i.component("aceBigScreen",aceBigScreen),i.component("aceBigScreenPreview",aceBigScreenPreview),i.component("aceBigScreenPreviewSlide",aceBigScreenPriviewSlide),i.component("aceIndicatorReport",aceIndicatorReport),editor.Boot&&editor.Boot.registerModule(aceIndicatorReportPlugin),i.component("aceIndicator",_sfc_main$1d),i.component("aceIndicatorPreview",_sfc_main$1g),i.component("aceIndicatorSystemPreview",aceIndicatorSystemPreview),i.component("aceIndicatorDesign",aceIndicatorDesign),i.component("aceIndicatorCustomSearch",aceIndicatorCustomSearch),i.component("aceCustomChart",aceCustomChart),i.component("aceChart",_sfc_main$2),i.component("aceSqLIntergration",_sfc_main$V),i.component("aceSqLImport",_sfc_main$17),i.component("aceDbShadow",_sfc_main$12),i.component("aceFlow",aceFlow),i.component("aceModel",_sfc_main$j),i.component("aceApiImport",_sfc_main$d),i.component("aceDynamicList",aceDynamicList),i.component("aceDynamicSearch",aceDynamicSearch),i.component("aceDynamicSearchEdit",aceDynamicSearchEdit),i.component("aceModelSearchSetting",_sfc_main$y),i.component("aceModelConn",_sfc_main$N),i.component("aceModelSql",_sfc_main$M),i.component("aceModelNormal",_sfc_main$L),i.component("aceModelExcel",_sfc_main$K),i.component("aceModelExtract",_sfc_main$J),i.component("aceModelExtractLog",_sfc_main$G),i.component("aceModelView",aceModelView),i.component("aceModelDbExtract",_sfc_main$z),i.component("aceHeader",_sfc_main$1),i.component("aceLoading",_sfc_main),n!=null&&n.components)for(const[r,o]of Object.entries(n.components)){const a=r.replace(".vue","").split("/").at(-1);i.component(a,o.default)}n!=null&&n.dict&&(i.config.globalProperties.$globalDict=n.dict),n!=null&&n.exportExcel&&(i.config.globalProperties.$baseExportExcel=n.exportExcel),n!=null&&n.utils&&(i.config.globalProperties.$globalUtils=n.utils),n!=null&&n.predefineColors&&(i.config.globalProperties.$globalPreColor=n.predefineColors),n!=null&&n.hooks&&(i.config.globalProperties.$globalHooks=n.hooks),i.config.globalProperties.$aceDynamicSearch=useDynamicSearch}},index={aceComponentsLib};return index});
|