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