import{_ as S,aD as z,aE as U,aF as P,a2 as ne,r as s,o as i,d as u,w as d,f as a,b as r,c as m,t as V,u as p,m as O,D as y,v as oe,a9 as ae,aa as se,j as le,C as ie,a as T,F as j,k as re,l as b}from"./index-34ec9885.js";import{M as B}from"./monaco-editor-4ba4293e.js";const ce={inject:["contain"],components:{AvueEchartCommon:z,AvueEchartVue:U,AvueEchartHtml:P,MonacoEditor:B},watch:{"form.content"(n){this.handleOption()},modelValue:{handler(n){this.form=n},deep:!0},form:{handler(n){this.$emit("update:modelValue",n)},deep:!0}},props:{modelValue:{}},data(){return{common:ne,error:"",vueOption:"",box:!1,reload:!1,options:{height:600,language:"javascript"},form:{}}},methods:{errorChange(n){this.error=n},handleOpen(){this.form=this.modelValue,this.box=!0,this.$nextTick(()=>{this.handleOption()})},handleClose(){this.$emit("update:modelValue",this.form),this.box=!1},handleOption(){this.reload=!1,this.vueOption=this.deepClone(this.form),this.$nextTick(()=>{this.reload=!0})}}},he={class:"code-edit"},de={class:"left"},ue={key:0,class:"right"},me={key:0,class:"tip"};function pe(n,t,c,h,e,l){const k=s("monaco-editor"),_=s("avue-echart-vue"),E=s("avue-echart-common"),x=s("avue-echart-html"),D=s("el-dialog");return i(),u(D,{title:"代码编辑",fullscreen:"","modal-append-to-body":"",modelValue:e.box,"onUpdate:modelValue":t[1]||(t[1]=f=>e.box=f),"append-to-body":"","close-on-click-modal":!1,width:"100%"},{default:d(()=>[a("div",he,[a("div",de,[r(k,{modelValue:e.form.content,"onUpdate:modelValue":t[0]||(t[0]=f=>e.form.content=f),language:e.options.language,height:e.options.height,options:e.options},null,8,["modelValue","language","height","options"])]),e.reload?(i(),m("div",ue,[e.error?(i(),m("div",me,V(e.error),1)):p("",!0),e.form.type==0?(i(),u(_,O({key:1},l.contain&&l.contain.activeObj,{option:e.vueOption,onErrorChange:l.errorChange,width:"100%",height:"100%"}),null,16,["option","onErrorChange"])):e.form.type==1?(i(),u(E,O({key:2},l.contain&&l.contain.activeObj,{"echart-formatter-str":e.vueOption.content,onErrorChange:l.errorChange,width:"100%"}),null,16,["echart-formatter-str","onErrorChange"])):e.form.type==2?(i(),u(x,O({key:3},l.contain&&l.contain.activeObj,{option:e.vueOption,onErrorChange:l.errorChange,width:"100%"}),null,16,["option","onErrorChange"])):p("",!0)])):p("",!0)])]),_:1},8,["modelValue"])}const _e=S(ce,[["render",pe],["__scopeId","data-v-b4a49101"]]),C=oe+"/component",ge=n=>y({url:C+"/list",method:"get",params:n}),L=n=>y({url:C+"/detail",method:"get",params:{id:n}}),fe=n=>y({url:C+"/save",method:"post",data:n}),ve=n=>y({url:C+"/update",method:"post",data:n}),be=n=>y({url:C+"/remove",method:"post",params:{ids:n}});const w=[{label:"vue组件",value:0,content:`