exports.ids = [87];
exports.modules = {

/***/ 419:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/pdf/_id.vue?vue&type=template&id=34d2cab7
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', []);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./pages/pdf/_id.vue?vue&type=template&id=34d2cab7

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/pdf/_id.vue?vue&type=script&lang=js
/* harmony default export */ var _idvue_type_script_lang_js = ({
  layout: "blank_layout",
  created() {
    this.$axios.get("/bxh/pdf", {
      params: {
        project_id: +this.$route.params.id
      }
    }).then(res => {
      fetch(res.result.file_path, {
        method: 'get',
        responseType: 'arraybuffer'
      }).then(function (res) {
        if (res.status !== 200) {
          return res.json();
        }
        return res.arrayBuffer();
      }).then(blobRes => {
        // 生成 Blob 对象，设置 type 等信息
        const e = new Blob([blobRes], {
          type: 'application/octet-stream',
          'Content-Disposition': 'attachment'
        });
        // 将 Blob 对象转为 url
        const link = window.URL.createObjectURL(e);
        let a = document.createElement('a');
        a.href = link;
        a.download = res.result.file_name;
        a.click();
      }).catch(err => {
        console.error(err);
      });
    });
  },
  method: {}
});
// CONCATENATED MODULE: ./pages/pdf/_id.vue?vue&type=script&lang=js
 /* harmony default export */ var pdf_idvue_type_script_lang_js = (_idvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./pages/pdf/_id.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  pdf_idvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "658e93b2"
  
)

/* harmony default export */ var _id = __webpack_exports__["default"] = (component.exports);

/***/ })

};;
//# sourceMappingURL=_id.js.map