1 |
- {"version":3,"sources":["webpack:///./src/views/information/information-details-content.vue","webpack:///src/views/information/information-details-content.vue","webpack:///./src/views/information/information-details-content.vue?5042","webpack:///./src/views/information/information-details-content.vue?3198","webpack:///./src/views/information/information-details-content.vue?05b6","webpack:///./src/components/pdf/index.vue","webpack:///src/components/pdf/index.vue","webpack:///./src/components/pdf/index.vue?7511","webpack:///./src/components/pdf/index.vue?907a","webpack:///./src/components/pdf/index.vue?440c","webpack:///./src/assets/return.png"],"names":["render","_vm","this","_c","_self","staticClass","attrs","require","on","$event","$router","back","previewable","urlInfo","url","includes","fileType","ref","info","content","iframeHeight","iframeOnLoad","_v","is_encrypt","iframeLoading","_e","staticRenderFns","components","Pdf","data","methods","created","console","component","show","userInfo","phone","slice","watermarkText","loading","currentRate","model","value","rate","callback","$$v","expression","staticStyle","props","pdfUrl","type","default","platform","loadingEndSize","interval","computed","OSS_URL","mounted","clearInterval","window","beforeDestroy","onMessage","setTimeout","module","exports"],"mappings":"wKAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,aAAaC,MAAM,CAAC,IAAMC,EAAQ,QAAuB,IAAM,IAAIC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOR,EAAIS,QAAQC,eAAgBV,EAAIW,aAAeX,EAAIY,QAAQC,MAAS,CAAC,MAAO,OAAQ,OAAOC,SAASd,EAAIY,QAAQG,UAAYb,EAAG,SAAS,CAACc,IAAI,gBAAgBZ,YAAY,gBAAgBC,MAAM,CAAC,IAAK,4DAAsDL,EAAIY,QAAQC,KAAM,OAASb,EAAIiB,KAAKC,QAAQ,OAASlB,EAAImB,aAAa,UAAY,MAAMZ,GAAG,CAAC,KAAOP,EAAIoB,gBAAiBpB,EAAIW,aAAeX,EAAIY,QA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MxB,EAAIsC,QAASpC,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,aAAa,CAACG,MAAM,CAAC,KAAOL,EAAIuC,YAAY,MAAQ,IAAI,KAAOvC,EAAIuC,YAAc,KAAKC,MAAM,CAACC,MAAOzC,EAAI0C,KAAMC,SAAS,SAAUC,GAAM5C,EAAI0C,KAAKE,GAAKC,WAAW,UAAU3C,EAAG,cAAc,CAAC4C,YAAY,CAAC,aAAa,QAAQzC,MAAM,CAAC,KAAO,OAAO,MAAQ,YAAY,CAACL,EAAIqB,GAAG,eAAe,GAAGrB,EAAIwB,QAE3YC,EAAkB,G,wBCsBP,GACfsB,OACAC,QACAC,YACAC,YAEA5B,YACA4B,WAEAC,UACAF,YACAC,cAEAb,eACAY,YACAC,gBAGAtB,gBACA,OACAU,WACAc,iBACAV,QACAH,cACAc,cACAnB,YACAD,UAGAqB,UACAzC,eACA,wBAGA,+BAFA,YAIA0C,qBAGAC,mBAAA,WACA,wBACA,IACA,kEACA,SACA,iBAGA,aACA,sCACA,kBACA,4CAEA,6BACA,oBACAC,0BACA,mBAEA,KACAC,mDAEAC,yBACAD,sDAEA7B,SACA+B,sBAAA,WACA,gCACA,iBACA,IACAH,6BACA,UAEA,qBACAI,uBAEA,GADA,aACA,mBACA,IACAH,uDACA,eAEA,SACA3B,oBAGA,SC/G8V,I,wBCQ1VC,EAAY,eACd,EACAjC,EACA0B,GACA,EACA,KACA,WACA,MAIa,OAAAO,E,2CCnBf,W,mBCAA8B,EAAOC,QAAU","file":"js/chunk-2415f014.2306a0cd.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{staticClass:\"header-wrap\"},[_c('div',{staticClass:\"header\"},[_c('img',{staticClass:\"return-img\",attrs:{\"src\":require(\"@/assets/return.png\"),\"alt\":\"\"},on:{\"click\":function($event){return _vm.$router.back()}}})])]),(_vm.previewable && _vm.urlInfo.url && !(['doc', 'docx', 'pdf'].includes(_vm.urlInfo.fileType)))?_c('iframe',{ref:\"iframeContent\",staticClass:\"iframeContent\",attrs:{\"src\":`https://view.officeapps.live.com/op/view.aspx?src=${_vm.urlInfo.url}`,\"srcdoc\":_vm.info.content,\"height\":_vm.iframeHeight,\"scrolling\":\"no\"},on:{\"load\":_vm.iframeOnLoad}}):(_vm.previewable && _vm.urlInfo.url && (_vm.urlInfo.fileType === 'doc' || _vm.urlInfo.fileType === 'docx'))?_c('div',{staticClass:\"doc-preview\"},[_c('a',{attrs:{\"href\":`https://view.officeapps.live.com/op/view.aspx?src=${_vm.urlInfo.url}`}},[_vm._v(\"点击word预览文档\")])]):(_vm.previewable && _vm.urlInfo.url && _vm.urlInfo.fileType === 'pdf')?_c('div',{staticClass:\"doc-preview\"},[_c('Pdf',{ref:\"jsPdf\",attrs:{\"pdfUrl\":_vm.urlInfo.url,\"is_encrypt\":_vm.urlInfo.is_encrypt}})],1):(_vm.iframeLoading)?_c('div',{staticClass:\"iframe-loading\"},[_vm._v(\"\\n 加载中\\n \")]):_vm._e(),(!_vm.previewable)?_c('div',{staticClass:\"preview-file\"},[_vm._v(\"\\n 此文件不可预览\\n \")]):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div>\r\n <div class=\"header-wrap\">\r\n <div class=\"header\">\r\n <img src=\"@/assets/return.png\" class=\"return-img\" @click=\"$router.back()\" alt=\"\">\r\n \r\n </div>\r\n </div>\r\n <iframe\r\n v-if=\"previewable && urlInfo.url && !(['doc', 'docx', 'pdf'].includes(urlInfo.fileType))\"\r\n :src=\"`https://view.officeapps.live.com/op/view.aspx?src=${urlInfo.url}`\"\r\n ref=\"iframeContent\"\r\n class=\"iframeContent\"\r\n :srcdoc=\"info.content\"\r\n :height=\"iframeHeight\"\r\n scrolling=\"no\"\r\n @load=\"iframeOnLoad\">\r\n </iframe>\r\n\r\n <div class=\"doc-preview\"\r\n v-else-if=\"previewable && urlInfo.url && (urlInfo.fileType === 'doc' || urlInfo.fileType === 'docx')\">\r\n <a :href=\"`https://view.officeapps.live.com/op/view.aspx?src=${urlInfo.url}`\">点击word预览文档</a>\r\n </div>\r\n\r\n <div\r\n class=\"doc-preview\"\r\n v-else-if=\"previewable && urlInfo.url && urlInfo.fileType === 'pdf'\">\r\n <Pdf ref=\"jsPdf\" :pdfUrl=\"urlInfo.url\" :is_encrypt=\"urlInfo.is_encrypt\"/>\r\n </div>\r\n <!-- <pdf-view v-else-if=\"previewable && urlInfo.url && urlInfo.fileType === 'pdf'\" :path=\"urlInfo.url\"/>-->\r\n\r\n <div class=\"iframe-loading\" v-else-if=\"iframeLoading\">\r\n 加载中\r\n </div>\r\n <div v-if=\"!previewable\" class=\"preview-file\">\r\n 此文件不可预览\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Pdf from \"@/components/pdf/index.vue\";\r\n\r\nexport default {\r\n components:{\r\n Pdf\r\n },\r\n data(){\r\n return{\r\n previewable: false, // 是否可预览\r\n iframeLoading: true,\r\n iframeHeight: 0,\r\n urlInfo:{},\r\n info:{}\r\n }\r\n },\r\n methods:{\r\n iframeOnLoad() {\r\n this.iframeLoading = false;\r\n this.iframeHeight = this.$refs['iframeContent'].contentWindow.document.body.scrollHeight\r\n },\r\n },\r\n created(){\r\n console.log(this.$route);\r\n this.previewable=this.$route.params.previewable\r\n this.urlInfo=this.$route.params.urlInfo\r\n this.info=this.$route.params.info\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.search-wrap {\r\n width: 100%;\r\n height: 58px;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 12px;\r\n box-sizing: border-box;\r\n}\r\n\r\n.doc-preview {\r\n padding-top: 45px;\r\n width: 100%;\r\n height: calc(100vh - 44px );\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n.iframeContent {\r\n width: 100%;\r\n min-height: calc(100vh - 44px );\r\n border: none;\r\n}\r\n.header-wrap {\r\n width: 100%;\r\n height: 44px;\r\n display: flex;\r\n flex-direction: column;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 500;\r\n background-color: #FFFFFF;\r\n}\r\n \r\n.header {\r\n width: 100%;\r\n height: 44px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #FFFFFF;\r\n z-index: 999;\r\n padding: 0 15px;\r\n position: relative;\r\n box-sizing: border-box;\r\n}\r\n\r\n.return-img {\r\n position: absolute;\r\n left: 15px;\r\n top: 50%;\r\n transform: translate(0, -50%);\r\n width: 20px;\r\n}\r\n\r\n</style>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./information-details-content.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./information-details-content.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./information-details-content.vue?vue&type=template&id=68c6e568&scoped=true&\"\nimport script from \"./information-details-content.vue?vue&type=script&lang=js&\"\nexport * from \"./information-details-content.vue?vue&type=script&lang=js&\"\nimport style0 from \"./information-details-content.vue?vue&type=style&index=0&id=68c6e568&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"68c6e568\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./information-details-content.vue?vue&type=style&index=0&id=68c6e568&prod&scoped=true&lang=css&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"warp\"},[(_vm.show)?_c('iframe',{staticClass:\"box\",attrs:{\"scrolling\":\"no\",\"src\":`./pdf/web/viewer.html?file=${_vm.url}&watermark_text=${\n _vm.userInfo.phone\n ? _vm.userInfo.phone.slice(0, 3) + '****' + _vm.userInfo.phone.slice(7)\n : _vm.watermarkText\n }&is_encrypt=${_vm.is_encrypt}#page=1`}}):_vm._e(),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('van-circle',{attrs:{\"rate\":_vm.currentRate,\"speed\":100,\"text\":_vm.currentRate + '%'},model:{value:(_vm.rate),callback:function ($$v) {_vm.rate=$$v},expression:\"rate\"}}),_c('van-loading',{staticStyle:{\"margin-top\":\"10px\"},attrs:{\"size\":\"24px\",\"color\":\"#0094ff\"}},[_vm._v(\"数据加载中...\")])],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"warp\">\r\n <iframe\r\n v-if=\"show\"\r\n class=\"box\"\r\n scrolling=\"no\"\r\n :src=\"`./pdf/web/viewer.html?file=${url}&watermark_text=${\r\n userInfo.phone\r\n ? userInfo.phone.slice(0, 3) + '****' + userInfo.phone.slice(7)\r\n : watermarkText\r\n }&is_encrypt=${is_encrypt}#page=1`\"\r\n ></iframe>\r\n <div class=\"loading\" v-if=\"loading\">\r\n <van-circle\r\n v-model=\"rate\"\r\n :rate=\"currentRate\"\r\n :speed=\"100\"\r\n :text=\"currentRate + '%'\"\r\n />\r\n <van-loading size=\"24px\" color=\"#0094ff\" style=\"margin-top: 10px\"\r\n >数据加载中...</van-loading\r\n >\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { OSS_URL } from \"@/common/config\";\r\n\r\nexport default {\r\n props: {\r\n pdfUrl: {\r\n type: String,\r\n default: \"\",\r\n },\r\n is_encrypt: {\r\n default: 1,\r\n },\r\n platform: {\r\n type: String,\r\n default: \"h5\",\r\n },\r\n watermarkText: {\r\n type: String,\r\n default: \"搞一下\",\r\n },\r\n },\r\n data() {\r\n return {\r\n loading: true,\r\n loadingEndSize: 0,\r\n rate: 10,\r\n currentRate: 0,\r\n interval: null,\r\n userInfo: {},\r\n show: false,\r\n };\r\n },\r\n computed: {\r\n url() {\r\n if (this.is_encrypt) {\r\n return this.pdfUrl;\r\n }\r\n return this.pdfUrl.indexOf(\"http\") > -1\r\n ? this.pdfUrl\r\n : OSS_URL + this.pdfUrl;\r\n },\r\n },\r\n mounted() {\r\n if (this.platform === \"h5\") {\r\n try {\r\n this.userInfo = JSON.parse(localStorage.getItem(\"user_info\") || `{}`);\r\n } catch (e) {\r\n this.userInfo = {};\r\n }\r\n }\r\n this.show = true;\r\n this.interval = setInterval(() => {\r\n const currentRate = parseFloat(\r\n (this.currentRate + Math.random() * 10).toFixed(2)\r\n );\r\n this.currentRate = Math.min(currentRate, 95);\r\n if (this.currentRate >= 95) {\r\n clearInterval(this.interval);\r\n this.interval = null;\r\n }\r\n }, 200);\r\n window.addEventListener(\"message\", this.onMessage);\r\n },\r\n beforeDestroy() {\r\n window.removeEventListener(\"message\", this.onMessage);\r\n },\r\n methods: {\r\n onMessage(e) {\r\n if (e.data === \"encry-pdf-loaded\") {\r\n if (this.interval) {\r\n try {\r\n clearInterval(this.interval);\r\n } catch (e) {}\r\n }\r\n this.currentRate = 100;\r\n setTimeout(() => {\r\n this.loading = false;\r\n if (this.platform === \"ios\") {\r\n try {\r\n window.webkit.messageHandlers.loadFinished.postMessage(\r\n \"h5_pdf_view\"\r\n );\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n }, 200);\r\n }\r\n },\r\n },\r\n};\r\n</script>\r\n<style scoped>\r\n.warp {\r\n width: 100vw;\r\n height: 100%;\r\n position: relative;\r\n}\r\n\r\n.box {\r\n width: 100vw;\r\n height: 100%;\r\n border: none;\r\n margin: 0;\r\n padding: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.loading {\r\n width: 100%;\r\n height: 100%;\r\n background: #ffffff;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 999;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=8be9d728&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=8be9d728&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8be9d728\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=8be9d728&prod&scoped=true&lang=css&\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAm5JREFUWEft2MnLTlEYAPDfZx4yK8WCWLBgwQIbSobIkMiwYiMbJX+JWLFRSmJBUoYyLCjDQoREQgghikQiQ4/OW8eXvPfe976fV31ne8+9z+8+59xzn3O6dHjr6nCfXmCrI9RTGeyH2XiEl2XQPQEci5MJ+AlLcKkost3AcTiH6RloN3Z0AnACzmNqhvmBFTj1r4ETE25KBvmObdhbFBf92jHEgYrMBbLRvmEL9pfBtQM4LeHGZ5Cv2ITDZXF1A2fgLOLDaLQv2IhjVXB1AmfhDMZkkM9YW+aD+NNL1DEH5+I0RmYBPmJ1WmKqJu/Xfa0C5+MEhmWKD2kpudiSLN3cCnARjmNIBnmHZbhaB66VDC7HEQzKIG/Tb+x6XbiqwDU4hAEZ5BUW43aduCrA9TiIqE4a7TliuO/VjSsLjA8hSqV8zj3BQjxsB64scDRiKPPs3UzZe9MJwDBEmbSz2/J0JyFLFaJFX6jKMrMdu7oh76ehflY0cNF+VYDx7K3Ygz5ZoCjnYz4+Lhq8SL+qwHj2ZuxD3yzQ04R8UCR4kT6tAOP5G3AA/bNgL9KcvFsE0KxPq8B4fhQFUesNzIK9Tgv3rWaAZtfrAEaM+P8exeAsYPz6luJaM8TfrtcFjBjxgUTxMDQL+D7hr1RF1gkMw7xUfg3PQFF+rcSFKsi6gWGYkwrYURkoNuwxV2NLUKq1AxiAmWkLEKcKjRZbgHUpw4WR7QIGIE4T4lSh+yZqAS4XFbYTGIY4VYg9cpwyNFrHHH00QJMTchLidGFVOkwqlMR2Z7CBGIHYJsTf5UYhWerUU8Aypt/69gIrp+5/GeKfiUBcKeCBb1YAAAAASUVORK5CYII=\""],"sourceRoot":""}
|