import{d as F,f as i,u as C,U as r,a2 as l,ad as E,af as a,k as o,a3 as u,ae as B,G as k,a5 as S,a4 as _,F as w}from"./vue-vendor-CxLCUzY4.js";import{aY as D,b3 as N,_ as $}from"./index-B_2CoVdl.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";const v=[{id:"1",key:"1",title:"实例.pdf",fileCode:"shili",fileName:"实例",filePdfPath:"实例"}],b=F({name:"JeecgPdfView",setup(){const t=D(),d=i([{title:"所有PDF电子档",key:"0-0",children:v}]),n=i(v),c=i(v),h=i(`${t.domainUrl}/sys/common/pdf/pdfPreviewIframe`);function g(e){let s=document.getElementById("pdfPreviewIframe"),p={title:e,token:N()};s.contentWindow.postMessage(p,"*")}function f(e,s){n.value=[],e[0]===void 0||e[0]==="0-0"?n.value=C(c):n.value.push(s.node.dataRef)}return{url:h,dataSource:n,treeData:d,allData:c,onSelect:f,pdfPreview:g}}}),x="/assets/pdf4-CYCZkNHn.jpg",V=["onClick"],I={style:{display:"none"}},A=["src"];function j(t,d,n,c,h,g){const f=r("a-tree"),e=r("a-col"),s=r("a-divider"),p=r("a-row"),P=r("a-card");return l(),E(P,{bordered:!1},{default:a(()=>[o(p,null,{default:a(()=>[o(e,{span:4,class:"clName"},{default:a(()=>[o(f,{treeData:t.treeData,defaultExpandAll:!0,onSelect:t.onSelect,style:{height:"500px","overflow-y":"auto"}},null,8,["treeData","onSelect"])]),_:1}),o(e,{span:18},{default:a(()=>[(l(!0),u(w,null,B(t.dataSource,(m,y)=>(l(),u("div",{key:y},[o(e,{span:24},{default:a(()=>[o(s,{orientation:"left"},{default:a(()=>[k(S(m.fileName),1)]),_:2},1024)]),_:2},1024),o(e,{span:24},{default:a(()=>[m.filePdfPath?(l(),u("div",{key:0,onClick:G=>t.pdfPreview(m.title)},d[0]||(d[0]=[_("img",{style:{width:"80px",height:"80px"},src:x},null,-1)]),8,V)):(l(),u(w,{key:1},[k(' (暂无材料，点击"选择文件"或"扫描上传"上传文件) ')],64))]),_:2},1024)]))),128))]),_:1})]),_:1}),_("div",I,[_("iframe",{id:"pdfPreviewIframe",src:t.url,frameborder:"0",width:"100%",height:"550px",scrolling:"auto"},null,8,A)])]),_:1})}const H=$(b,[["render",j]]);export{H as default};
