数通互联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
35 KiB

import{d as ie,r as G,a as J,b as Ue,h as R,o as g,f as O,w as s,m as o,x as A,L as Ce,c as E,e as le,F as P,l as y,j as K,B as Me,a7 as De,_ as Oe,I as de,G as Ae,t as ee,k as N,M as he,N as ze,z as ye,A as Ie,n as oe,v as je,u as qe,C as Be,y as pe,p as Fe,a5 as Xe,D as Ye,a3 as Te,g as We,a4 as Ge,a8 as $e,W as Ne,E as Se,a9 as Ke,Y as Pe,X as Le,q as He,S as Ve,aa as Ee}from"./index-3679850f.js";import{_ as Je,a as Qe}from"./vueFile.vue_vue_type_script_setup_true_lang-604207ac.js";import{_ as Ze}from"./aceDrawer.vue_vue_type_script_setup_true_lang-7e84294c.js";import{g as el,a as ll}from"./getData-b87e5deb.js";const tl=["bg.jpg","bg2.jpg","bg3.jpg","head_bg.png"],ol=[],nl=[],ve={bg:tl,border:ol,img:nl},al={class:"img-list"},sl=["onClick"],il=["src"],cl={key:0},rl=ie({__name:"upload",emits:["click"],setup(ne,{expose:U,emit:b}){const p=G(!1),r=G(),D=G("bg"),e=J(()=>{if(!ve)return[];const d=[];for(const V in ve)d.push(V);return d}),q=J(()=>D.value.name==="upload"?[]:ve?ve[D.value]:[]),x=J(()=>`./static/screen/${D.value}/`),k=d=>{p.value=!1,b("click",x.value+d,r.value)},L=d=>{D.value="upload",Me(()=>{q.value.unshift(d.path)})};return U({open:(d,V)=>{p.value=!0,r.value=V,d?D.value=d:D.value=e.value[0]}}),Ue(()=>{}),(d,V)=>{const v=R("el-button"),Y=R("el-upload"),z=R("el-tab-pane"),Z=R("el-tabs"),te=R("el-dialog");return g(),O(te,{modelValue:p.value,"onUpdate:modelValue":V[1]||(V[1]=j=>p.value=j),width:"800px",title:"选择上传图片"},{default:s(()=>{var j;return[o(Y,{action:Ce(De),"on-success":L,"show-file-list":!1},{default:s(()=>[o(v,{type:"primary"},{default:s(()=>[A("上传")]),_:1})]),_:1},8,["action"]),o(Z,{modelValue:D.value,"onUpdate:modelValue":V[0]||(V[0]=B=>D.value=B)},{default:s(()=>[(g(!0),E(P,null,le(e.value,B=>(g(),O(z,{label:B,name:B,key:B},null,8,["label","name"]))),128)),o(z,{label:"上传",name:"upload"})]),_:1},8,["modelValue"]),y("div",al,[y("ul",null,[(g(!0),E(P,null,le(q.value,B=>(g(),E("li",{key:B,onClick:ae=>k(B)},[y("img",{src:x.value+B,alt:""},null,8,il)],8,sl))),128))]),(j=q.value)!=null&&j.length?K("",!0):(g(),E("p",cl,"暂无相关素材资源"))])]}),_:1},8,["modelValue"])}}});const ul=Oe(rl,[["__scopeId","data-v-b06a5e4b"]]),pl={key:0},dl=y("h3",null,"接口数据处理事件",-1),fl=y("h3",null,"全局数据",-1),gl=y("h3",null,"接口数据处理事件",-1),vl=ie({__name:"configControl",props:{config:{}},emits:["update:config","openDrawer","update"],setup(ne,{expose:U,emit:b}){const p=ne,r=G({}),D=G(),e=J(()=>r.value.type),q=c=>{b("update:config",Object.assign({},p.config,c))},x=de({bgColor:"",bgLinear:"",bgAngle:0,bgUpload:"",bgSelect:""});Ae(()=>p.config,c=>{if(!Object.keys(r.value).length){const n=c.background||"";if(n.indexOf("url")!==-1){const M=new RegExp("(?<=url\\()(.*?)(?=\\))","g"),S=n.match(M);Object.assign(x,{bgUpload:S,bgSelect:3})}else if(n.indexOf("linear")!==-1){const S=n.substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,(?![^(]*\))(?![^"']*["'](?:[^"']*["'][^"']*["'])*[^"']*$)/);Object.assign(x,{bgColor:S[1].trim(),bgLinear:S[2].trim(),bgAngle:Number(S[0].replace("deg","")),bgSelect:2})}else Object.assign(x,{bgColor:n,bgSelect:1})}},{immediate:!0});const k=()=>{let c="";switch(x.bgSelect){case 1:c=x.bgColor;break;case 2:c=`linear-gradient(${x.bgAngle}deg, ${x.bgColor}, ${x.bgLinear})`;break;case 3:c=`url(${x.bgUpload})`;break}L("background",c)},L=(c,n)=>{q({[c]:n})},a=c=>{r.value=c},d=J(()=>{var c,n,M,S;if(Object.keys(r.value).length){const{config:_={},position:m,type:I}=r.value;return[{type:"group",title:"位置信息"},{label:"width",value:m.width,placeholder:"请输入宽度",key:"width",path:"position"},{label:"height",value:m.height,placeholder:"请输入高度",key:"height",path:"position"},{type:"number",label:"left",value:m.left,placeholder:"图层位置",key:"left",path:"position"},{type:"number",label:"top",value:m.top,key:"top",path:"position"},{type:"number",label:"right",value:m.right,placeholder:"设置后left为auto",key:"right",path:"position"},{type:"number",label:"bottom",value:m.bottom,placeholder:"设置后top为auto",key:"bottom",path:"positi