(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9f2ba790","chunk-2d0c9207"],{"024b":function(t,e,a){"use strict";a("525c")},"19c0":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordered:!1}},[e("a-col",{staticClass:"clName",attrs:{span:4}},[e("a-tree",{staticStyle:{height:"500px","overflow-y":"auto"},attrs:{treeData:t.treeData,defaultExpandAll:t.defaultExpandAll},on:{select:this.onSelect}})],1),e("a-col",{attrs:{span:2}}),e("a-col",{attrs:{span:18}},[e("a-spin",{attrs:{tip:"Loading...",spinning:t.spinning}},t._l(t.dataSource,(function(i,n){return e("div",{key:n},[e("a-row",[e("a-col",{attrs:{span:24}},[e("p",[e("a-divider",{attrs:{orientation:"left"}},[t._v(t._s(i.fileName))])],1)]),e("a-col",{attrs:{span:24}},[i.filePdfPath?[e("div",{staticStyle:{float:"left",width:"104px",height:"104px","margin-right":"10px",margin:"0 8px 8px 0"}},[e("div",{staticStyle:{width:"100%",height:"100%",position:"relative",padding:"8px"},on:{click:function(e){return t.pdfPreview(i.title)}}},[e("img",{staticStyle:{width:"100%"},attrs:{src:a("c6cf8")}})])])]:[t._v('\n (暂无材料,点击"选择文件"或"扫描上传"上传文件)\n ')]],2)],1)],1)})),0)],1),e("pdf-preview-modal",{ref:"pdfmodal"})],1)},n=[],s=a("0fea"),d=a("9fb0"),r=a("2b0e"),l=a("588f"),o=[{id:"1",key:"1",title:"实例.pdf",fileCode:"shili",fileName:"实例",filePdfPath:"实例"}],c={name:"JeecgPdfView",components:{PdfPreviewModal:l["default"]},data:function(){return{description:"PDF预览页面",treeData:[{title:"所有PDF电子档",key:"0-0",children:o}],dataSource:o,allData:o,defaultExpandAll:!0,spinning:!1,url:{pdfList:"/api/pdfList"}}},created:function(){},methods:{loadData:function(){var t=this;this.spinning=!1,Object(s["c"])(this.url.pdfList).then((function(e){e.length>0&&(t.allData=e,t.dataSource=e,t.treeData[0].children=e),t.spinning=!1}))},pdfPreview:function(t){var e=r["default"].ls.get(d["a"]);this.headers={"X-Access-Token":e},this.$refs.pdfmodal.previewFiles(t,e)},onSelect:function(t,e){this.dataSource=[],void 0===t[0]||"0-0"===t[0]?this.dataSource=this.allData:this.dataSource.push(e.node._props.dataRef)},modalFormOk:function(){this.loadData()}}},f=c,p=(a("024b"),a("2877")),u=Object(p["a"])(f,i,n,!1,null,"56cba639",null);e["default"]=u.exports},"525c":function(t,e,a){},"588f":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{display:"none"}},[e("iframe",{attrs:{id:t.id,src:t.url,frameborder:"0",width:"100%",height:"550px",scrolling:"auto"}})])},n=[],s=a("2b0e"),d=a("9fb0"),r={name:"PdfPreviewModal",data:function(){return{url:window._CONFIG["pdfDomainURL"],id:"pdfPreviewIframe",headers:{}}},created:function(){var t=s["default"].ls.get(d["a"]);this.headers={"X-Access-Token":t}},computed:{},mounted:function(){window.addEventListener("message",this.handleScanFileMessage)},methods:{handleScanFileMessage:function(t){t.data},previewFiles:function(t,e){var a=document.getElementById("pdfPreviewIframe"),i={title:t,token:e};a.contentWindow.postMessage(i,"*")}}},l=r,o=a("2877"),c=Object(o["a"])(l,i,n,!1,null,"5088ac45",null);e["default"]=c.exports},c6cf8:function(t,e,a){t.exports=a.p+"img/pdf4.a7783614.jpg"}}]);