import{o as I,i as x,k as d,S as P,n as B}from"./index.8a64ecdf.js";import{d as K,an as E,al as D,ak as w,Q as M,r as S,x as O,k as l,v as U,n as f,j,P as G,w as H,a8 as J,o as c,c as Q,M as r,G as v,T as _,E as V,a as b,H as R,N as y,I as q,ao as z,J as F,u as W,am as X}from"./vue.95e072e2.js";import"./elementPlus.58179425.js";import"./echarts.72dc8373.js";const Y={class:"layout-parent"},Z={class:"flex-1"},$=K({name:"layoutParentView"}),ie=K({...$,setup(ee){const g=X(()=>B(()=>import("./iframes.3c90a21d.js"),["assets/iframes.3c90a21d.js","assets/vue.95e072e2.js"])),t=E(),k=D(),A=I(),N=x(),{keepAliveNames:i,cachedViews:h}=w(A),{themeConfig:n}=w(N),e=M({refreshRouterViewKey:"",iframeRefreshKey:"",keepAliveNameList:[],iframeList:[]}),u=S(!0);O("refreshView",function(){u.value=!1,f(()=>{u.value=!0})});const m=l(()=>n.value.animation),T=l(()=>n.value.isTagsview?h.value:e.keepAliveNameList),p=l(()=>t.meta.isIframe),L=async()=>{k.getRoutes().forEach(a=>{a.meta.isIframe&&(a.meta.isIframeOpen=!1,a.meta.loading=!0,e.iframeList.push({...a}))})};return U(()=>{e.keepAliveNameList=i.value,d.on("onTagsViewRefreshRouterView",a=>{e.keepAliveNameList=i.value.filter(s=>t.name!==s),e.refreshRouterViewKey="",e.iframeRefreshKey="",f(()=>{e.refreshRouterViewKey=a,e.iframeRefreshKey=a,e.keepAliveNameList=i.value})})}),j(()=>{L(),f(()=>{setTimeout(()=>{if(n.value.isCacheTagsView){let a=P.get("tagsViewList")||[];h.value=a.filter(s=>{var o;return(o=s.meta)==null?void 0:o.isKeepAlive}).map(s=>s.name)}},0)})}),G(()=>{d.off("onTagsViewRefreshRouterView",()=>{})}),H(()=>t.fullPath,()=>{e.refreshRouterViewKey=decodeURI(t.fullPath)},{immediate:!0}),(a,s)=>{const o=J("router-view");return c(),Q("div",Y,[r(o,null,{default:v(({Component:C})=>[r(_,{name:m.value,mode:"out-in"},{default:v(()=>[u.value?(c(),V(z,{key:0,include:T.value},[b("div",Z,[R((c(),V(q(C),{key:e.refreshRouterViewKey,class:"w100"})),[[y,!p.value]])])],1032,["include"])):F("",!0)]),_:2},1032,["name"])]),_:1}),r(_,{name:m.value,mode:"out-in"},{default:v(()=>[R(r(W(g),{class:"w100",refreshKey:e.iframeRefreshKey,name:m.value,list:e.iframeList},null,8,["refreshKey","name","list"]),[[y,p.value]])]),_:1},8,["name"])])}}});export{ie as default};
