1
0

chunk-65a2c9bd.8b36c5b5.js 3.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65a2c9bd"],{1126:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-container",[a("el-header",[a("div",{staticClass:"xq-header-left flex align-center"}),a("div",{staticClass:"xq-header-center flex-sub flex align-center justify-between"},[a("div",{staticClass:"flex align-center"},[a("span",{staticClass:"font15"},[e._v("当前位置:")]),a("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/"},replace:!0}},[e._v("首页")]),a("el-breadcrumb-item",{attrs:{to:{path:e.prePagePath},replace:!0}},[e._v(e._s(e.prePageName))]),a("el-breadcrumb-item",[e._v("方案资料-PDF")])],1)],1),a("el-button",{staticClass:"xq-custom-btn",attrs:{size:"small",round:""},on:{click:e.handleBackPage}},[e._v("返回")])],1),a("div",{staticClass:"xq-header-right"})]),a("el-main",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("div",{staticClass:"xq-article-block"},[a("div",{staticClass:"xq-article-title"},[a("span",{staticClass:"color333 font24 fontW700"},[e._v(e._s(e.itemName))])]),a("div",{staticClass:"xq-article-line"}),a("div",{staticClass:"xq-article-pdf"},[e.isMobileDevices?a("div",{attrs:{id:"viewpdfEle"}}):a("iframe",{attrs:{src:e.pdfUrl,frameborder:"0",width:"100%"}})])]),a("el-backtop",{attrs:{target:".el-main",bottom:95,right:35}})],1)],1)},r=[],n=a("5530"),s=(a("ac1f"),a("00b4"),a("b0c0"),a("d3b7"),a("3ca3"),a("ddb0"),a("99af"),a("365c"),a("2f62")),o={name:"articledetail",data:function(){return{loading:!1,prePagePath:"",prePageName:"",cid:"",timer:null,timeNumber:0,itemName:"",pdfUrl:"",loadTre:null}},computed:Object(n["a"])(Object(n["a"])({},Object(s["d"])({isCollapse:function(e){return e.isCollapse}})),{},{isMobileDevices:function(){var e=/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return e||t}}),mounted:function(){var e=this;this.timeNumber=0,this.prePagePath=this.$route.query.path,this.prePageName=this.$route.query.name,this.pdfUrl=decodeURI(this.$route.query.url),this.isMobileDevices&&this.$nextTick((function(){e.loadTre=e.$loading({lock:!0,text:"正在加载PDF,加载时间可能较长,请稍等...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});var t=setTimeout((function(){clearTimeout(t),e.loadPDF(e.pdfUrl)}),300)})),this.itemName=this.$route.query.itemName,this.timer=setInterval((function(){e.timeNumber++}),1e3)},methods:Object(n["a"])(Object(n["a"])({},Object(s["c"])(["setCollapse","setRecordArr"])),{},{setCollapseFunc:function(e){this.setCollapse(e)},handleBackPage:function(){this.$router.go(-1)},loadPDF:function(e){var t=this,a=document.getElementById("viewpdfEle");pdfjsLib.getDocument(e).promise.then((function(e){for(var i=e.numPages,r=[],n=1;n<=i;n++)r.push(e.getPage(n));Promise.all(r).then((function(e){t.renderPdf(0,e,a)}))}))},renderPdf:function(e,t,a){var i=this,r=t[e],n=r.getViewport({scale:1.5}),s=document.createElement("canvas"),o=s.getContext("2d");s.height=n.height,s.width=n.width;var c={canvasContext:o,viewport:n};r.render(c).promise.then((function(){e++,t.length>e?i.renderPdf(e,t,a):i.loadTre.close(),a.appendChild(s)})).catch((function(e){i.loadTre.close()}))}}),destroyed:function(){this.timer&&clearInterval(this.timer),this.setRecordArr("<p>".concat(this.prePageName,"-").concat(this.itemName,"-讲解时长").concat(this.timeNumber,"s</p>"))}},c=o,l=(a("3796"),a("2877")),d=Object(l["a"])(c,i,r,!1,null,"18f64fbf",null);t["default"]=d.exports},3796:function(e,t,a){"use strict";a("a549")},a549:function(e,t,a){}}]);