chunk-035c2a6e.c4f027aa.js.map 15 KB

1
  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?7c09","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?feb1"],"names":["render","_vm","this","_c","_self","staticClass","previewable","info","url","includes","fileType","ref","attrs","concat","datum_info","content","iframeHeight","on","iframeOnLoad","_v","is_encrypt","_e","staticRenderFns","components","Pdf","data","iframeLoading","methods","$refs","contentWindow","document","body","scrollHeight","created","option","$route","params","component","show","pdf_watermarkText","loading","currentRate","props","pdfUrl","type","String","default","platform","watermarkText","userInfo","interval","computed","indexOf","OSS_URL","phone","replace","slice","mounted","_this","JSON","parse","localStorage","getItem","setInterval","parseFloat","Math","random","toFixed","min","clearInterval","window","addEventListener","onMessage","beforeDestroy","removeEventListener","e","_this2","setTimeout"],"mappings":"+IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQ,CAC3FJ,EAAIK,aACJL,EAAIM,KAAKC,MACR,CAAC,MAAO,OAAQ,OAAOC,SAASR,EAAIM,KAAKG,UAC1CP,EAAG,SAAS,CAACQ,IAAI,gBAAgBN,YAAY,gBAAgBO,MAAM,CAAC,UAAY,KAAK,IAAK,qDAAAC,OAAsDZ,EAAIM,KAAKC,KAAM,OAASP,EAAIa,WAAWC,QAAQ,OAASd,EAAIe,cAAcC,GAAG,CAAC,KAAOhB,EAAIiB,gBACzOjB,EAAIK,aACJL,EAAIM,KAAKC,MACc,QAAtBP,EAAIM,KAAKG,UAA4C,SAAtBT,EAAIM,KAAKG,UACzCP,EAAG,MAAM,CAACE,YAAY,eA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ACA,WACA,MAIa,OAAAe,E,6CCnBf,W","file":"js/chunk-035c2a6e.c4f027aa.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrap\"},[(\n _vm.previewable &&\n _vm.info.url &&\n !['doc', 'docx', 'pdf'].includes(_vm.info.fileType)\n )?_c('iframe',{ref:\"iframeContent\",staticClass:\"iframeContent\",attrs:{\"scrolling\":\"no\",\"src\":`https://view.officeapps.live.com/op/view.aspx?src=${_vm.info.url}`,\"srcdoc\":_vm.datum_info.content,\"height\":_vm.iframeHeight},on:{\"load\":_vm.iframeOnLoad}}):(\n _vm.previewable &&\n _vm.info.url &&\n (_vm.info.fileType === 'doc' || _vm.info.fileType === 'docx')\n )?_c('div',{staticClass:\"doc-preview\"},[_c('a',{attrs:{\"href\":`https://view.officeapps.live.com/op/view.aspx?src=${_vm.info.url}`}},[_vm._v(\"点击word预览文档\")])]):(_vm.previewable && _vm.info.url && _vm.info.fileType === 'pdf')?_c('div',{staticClass:\"doc-preview\"},[_c('Pdf',{ref:\"jsPdf\",attrs:{\"pdfUrl\":_vm.info.url,\"is_encrypt\":_vm.info.is_encrypt}})],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrap\">\r\n <iframe\r\n v-if=\"\r\n previewable &&\r\n info.url &&\r\n !['doc', 'docx', 'pdf'].includes(info.fileType)\r\n \"\r\n scrolling=\"no\"\r\n ref=\"iframeContent\"\r\n class=\"iframeContent\"\r\n :src=\"`https://view.officeapps.live.com/op/view.aspx?src=${info.url}`\"\r\n :srcdoc=\"datum_info.content\"\r\n :height=\"iframeHeight\"\r\n @load=\"iframeOnLoad\"\r\n >\r\n </iframe>\r\n\r\n <div\r\n class=\"doc-preview\"\r\n v-else-if=\"\r\n previewable &&\r\n info.url &&\r\n (info.fileType === 'doc' || info.fileType === 'docx')\r\n \"\r\n >\r\n <a :href=\"`https://view.officeapps.live.com/op/view.aspx?src=${info.url}`\"\r\n >点击word预览文档</a\r\n >\r\n </div>\r\n\r\n <div\r\n class=\"doc-preview\"\r\n v-else-if=\"previewable && info.url && info.fileType === 'pdf'\"\r\n >\r\n <Pdf ref=\"jsPdf\" :pdfUrl=\"info.url\" :is_encrypt=\"info.is_encrypt\" />\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 info: {},\r\n datum_info: {},\r\n };\r\n },\r\n methods: {\r\n iframeOnLoad() {\r\n this.iframeLoading = false;\r\n this.iframeHeight =\r\n this.$refs[\"iframeContent\"].contentWindow.document.body.scrollHeight;\r\n },\r\n },\r\n created() {\r\n const option = this.$route.params;\r\n this.previewable = option.previewable;\r\n this.info = option.info;\r\n this.datum_info = option.datum_info;\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.wrap {\r\n margin-top: -80px;\r\n height: calc(100vh - 15px);\r\n .iframeContent {\r\n width: 100%;\r\n min-height: calc(100vh - 44px);\r\n border: none;\r\n }\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!./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=bfa7d880&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=bfa7d880&prod&lang=scss&scoped=true&\"\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 \"bfa7d880\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../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=bfa7d880&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrap\"},[(_vm.show)?_c('iframe',{staticClass:\"box\",attrs:{\"scrolling\":\"no\",\"src\":`./pdf/web/viewer.html?file=${_vm.url}&watermark_text=${_vm.pdf_watermarkText}&is_encrypt=${_vm.is_encrypt}#page=1`}}):_vm._e(),(_vm.loading)?_c('div',{staticClass:\"loading\"},[(_vm.currentRate == 100)?_c('el-progress',{staticClass:\"progress\",attrs:{\"type\":\"circle\",\"status\":\"success\",\"percentage\":100}}):_c('el-progress',{staticClass:\"progress\",attrs:{\"type\":\"circle\",\"percentage\":_vm.currentRate}})],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrap\">\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=${pdf_watermarkText}&is_encrypt=${is_encrypt}#page=1`\"\r\n ></iframe>\r\n <div class=\"loading\" v-if=\"loading\">\r\n <el-progress\r\n type=\"circle\"\r\n status=\"success\"\r\n class=\"progress\"\r\n v-if=\"currentRate == 100\"\r\n :percentage=\"100\"\r\n ></el-progress>\r\n <el-progress\r\n type=\"circle\"\r\n class=\"progress\"\r\n v-else\r\n :percentage=\"currentRate\"\r\n ></el-progress>\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 userInfo: {},\r\n show: false,\r\n currentRate: 0,\r\n interval: null,\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 // return \"http://192.168.2.36:8080/Pig.pdf\";\r\n },\r\n pdf_watermarkText() {\r\n return this.userInfo.phone\r\n ? this.userInfo.phone.replace(this.userInfo.phone.slice(3, 7), \"****\")\r\n : this.watermarkText;\r\n },\r\n },\r\n mounted() {\r\n this.userInfo = JSON.parse(localStorage.getItem(\"user_info\") || `{}`);\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 }, 200);\r\n }\r\n },\r\n },\r\n};\r\n</script>\r\n<style scoped>\r\n.wrap {\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\r\n.progress {\r\n transform: scale(1.5);\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=39798072&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=39798072&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 \"39798072\",\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=39798072&prod&scoped=true&lang=css&\""],"sourceRoot":""}