import{m as v}from"./mittBus-95140f7c-1782572373740v=1.0.0.js";import{u as w}from"./useIframe-1ee24748-1782572373740v=1.0.0.js";import{y as D,h as B,c as T,r as g,m as x,U as I,ar as k,z as o,A as s,B as _,K as A,u as a,M as p}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{_ as M}from"./index-f6f689f9-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const L={class:"preview-module"},N={class:"preview-iframe","element-loading-text":"\u52A0\u8F7D\u4E2D..."},C=["src"],F={key:1,class:"preview-iframe-error"},P=D({name:"PreviewModule"}),R=D({...P,props:{iframeMode:{default:"EVENT_DETAIL"},pageType:{default:"add"}},setup(S){const{iframeRef:E,iframeReady:d,addReadySendData:y,readySendDataList:t,onIframeLoad:m,onIframeError:f,sendData:l,iframeLoadError:i}=w("EVENT_ADD");B(d,(r,e)=>{r&&r!==e&&t.value&&t.value.length>0&&(t.value.forEach(n=>{l(n)}),t.value=[])});const h=T(()=>"https://hzsdxyjs.ccnu.edu.cn/hkeventh5/#"),c=g(`${h.value}/pages/matchPart/detail/preview`);return x(()=>{v.on("WatchEventBaseInfoFormData",r=>{let e={data:r.data,subModuleType:r.dataType,moduleType:"EVENT_ADD"};d.value?l(e):y(e)})}),I(()=>{v.off("WatchEventBaseInfoFormData"),c.value=""}),(r,e)=>{const n=k("loading");return o(),s("div",L,[e[2]||(e[2]=_("div",{class:"preview-module-header"},[_("div",{class:"preview-module-header-title"},"\u6548\u679C\u9884\u89C8")],-1)),A((o(),s("div",N,[a(i)?p("v-if",!0):(o(),s("iframe",{key:0,src:a(c),frameborder:"0",ref_key:"iframeRef",ref:E,onLoad:e[0]||(e[0]=(...u)=>a(m)&&a(m)(...u)),onError:e[1]||(e[1]=(...u)=>a(f)&&a(f)(...u))},null,40,C)),a(i)?(o(),s("div",F,"\u52A0\u8F7D\u5931\u8D25")):p("v-if",!0)])),[[n,!a(d)&&!a(i)]])])}}});const j=M(R,[["__scopeId","data-v-6cc480d9"]]);export{j as default};
