Files
qhmes/web-dist/js/JeecgPdfView-Do79dcPN.js
2026-06-16 18:19:57 +08:00

2 lines
2.3 KiB
Java

import{a1 as P,ai as C,au as D}from"./index-X7Y8jykP.js";import{e as S,r as l,u as N,y as $,z as s,A as o,f as a,Q as u,C as d,F as v,D as x,E as k,G as B}from"./vue-vendor-DNhG1Cve.js";import{C as V}from"./index-BwqG9R3y.js";import{O as b}from"./index-CuWaQdlK.js";import{A}from"./index-DO7ZhK45.js";import{_ as E}from"./index-C7ckZv9Z.js";import I from"./index-saD4h7VJ.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./index-Cl-8Hzo4.js";import"./useMaxLevel-DE205ncc.js";import"./eagerComputed-BTlOruLW.js";import"./index-BuONesFs.js";const _=[{id:"1",key:"1",title:"实例.pdf",fileCode:"shili",fileName:"实例",filePdfPath:"实例"}],F=S({name:"JeecgPdfView",setup(){const t=P(),i=l([{title:"所有PDF电子档",key:"0-0",children:_}]),n=l(_),p=l(_),g=l(`${t.domainUrl}/sys/common/pdf/pdfPreviewIframe`);function h(e){let r=document.getElementById("pdfPreviewIframe"),f={title:e,token:C()};r.contentWindow.postMessage(f,"*")}function c(e,r){n.value=[],e[0]===void 0||e[0]==="0-0"?n.value=N(p):n.value.push(r.node.dataRef)}return{url:g,dataSource:n,treeData:i,allData:p,onSelect:c,pdfPreview:h}}}),j="/assets/pdf4-CYCZkNHn.jpg",G=["onClick"],J={style:{display:"none"}},O=["src"];function T(t,i,n,p,g,h){const c=E,e=A,r=I,f=b,w=V;return s(),$(w,{bordered:!1},{default:o(()=>[a(f,null,{default:o(()=>[a(e,{span:4,class:"clName"},{default:o(()=>[a(c,{treeData:t.treeData,defaultExpandAll:!0,onSelect:t.onSelect,style:{height:"500px","overflow-y":"auto"}},null,8,["treeData","onSelect"])]),_:1}),a(e,{span:18},{default:o(()=>[(s(!0),d(v,null,x(t.dataSource,(m,y)=>(s(),d("div",{key:y},[a(e,{span:24},{default:o(()=>[a(r,{orientation:"left"},{default:o(()=>[k(B(m.fileName),1)]),_:2},1024)]),_:2},1024),a(e,{span:24},{default:o(()=>[m.filePdfPath?(s(),d("div",{key:0,onClick:W=>t.pdfPreview(m.title)},[...i[0]||(i[0]=[u("img",{style:{width:"80px",height:"80px"},src:j},null,-1)])],8,G)):(s(),d(v,{key:1},[k(' (暂无材料,点击"选择文件""扫描上传"上传文件) ')],64))]),_:2},1024)]))),128))]),_:1})]),_:1}),u("div",J,[u("iframe",{id:"pdfPreviewIframe",src:t.url,frameborder:"0",width:"100%",height:"550px",scrolling:"auto"},null,8,O)])]),_:1})}const ne=D(F,[["render",T]]);export{ne as default};