((typeof self !== 'undefined' ? self : this)["webpackJsonpcontractor_management_sm"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpcontractor_management_sm"] || []).push([[35],{

/***/ "2909":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("6b75");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js

function _arrayWithoutHoles(r) {
  if (Array.isArray(r)) return Object(arrayLikeToArray["a" /* default */])(r);
}

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
var es_symbol = __webpack_require__("a4d3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("e01a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
var es_symbol_iterator = __webpack_require__("d28b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
var es_array_from = __webpack_require__("a630");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js








function _iterableToArray(r) {
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("06c5");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
var es_error_cause = __webpack_require__("d9e2");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js

function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(r) {
  return _arrayWithoutHoles(r) || _iterableToArray(r) || Object(unsupportedIterableToArray["a" /* default */])(r) || _nonIterableSpread();
}


/***/ }),

/***/ "324b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"28eb61d9-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/safety/FileUpload/FormUpload.vue?vue&type=template&id=3feabb7c&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.showText)?_c('div',[_c('el-upload',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.uploadLoading),expression:"uploadLoading"},{name:"show",rawName:"v-show",value:(_vm.copyFileList.length < _vm.limit),expression:"copyFileList.length < limit"}],ref:"upload",class:{ show_upload_text: !(_vm.copyFileList.length < _vm.limit) },staticStyle:{"display":"block"},attrs:{"disabled":_vm.disabled,"drag":_vm.drag && _vm.copyFileList.length < _vm.limit,"action":"https://xx.yy.zz","file-list":_vm.fileList,"limit":_vm.limit,"auto-upload":false,"on-change":_vm.onChange,"before-upload":_vm.beforeUpload,"multiple":false,"http-request":_vm.importListFile,"show-file-list":false,"on-exceed":_vm.handleExceed}},[(_vm.drag && _vm.copyFileList.length < _vm.limit)?[_c('i',{staticClass:"el-icon-upload"}),_c('div',{staticClass:"el-upload__text"},[_vm._v("\n          "+_vm._s(_vm.uploadTipText)+"，或\n          "),_c('em',[_vm._v("点击上传")])]),_c('div',{staticClass:"el-upload__tip",attrs:{"slot":"tip"},slot:"tip"},[_vm._v("\n          "+_vm._s(_vm.tip)+"\n        ")])]:_vm._e(),(!_vm.drag && _vm.copyFileList.length < _vm.limit)?[_c('el-button',{attrs:{"disabled":_vm.disabled,"size":"small","type":"primary"}},[_vm._v("点击上传")])]:_vm._e()],2),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.copyFileList.length),expression:"copyFileList.length"}],staticClass:"inline-block"},[_vm._t("content",_vm._l((_vm.copyFileList),function(item,index){return _c('div',{key:index,staticClass:"p-0px hover:bg-slate-100 flex items-center text-blue-500"},[_c('span',{staticClass:"cursor-pointer",on:{"click":function($event){return _vm.onPreview(item)}}},[_vm._v(_vm._s(item.name))]),_c('span',{staticClass:"ml-5px cursor-pointer",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('i',{staticClass:"icon-bg-display iconfont"})]),(!_vm.disabled)?_c('span',{staticClass:"ml-5px cursor-pointer",on:{"click":function($event){return _vm.beforeRemove(item)}}},[_c('i',{staticClass:"icon-bg-delete iconfont hover:text-rose-700 hover:shadow"})]):_vm._e()])}))],2)],1):_c('div',{staticClass:"inline-block w-full min-h-30px flex items-center"},[_vm._t("content",_vm._l((_vm.copyFileList),function(item,index){return _c('div',{key:index,staticClass:"p-0px hover:bg-slate-100 truncate"},[_c('span',{staticClass:"cursor-pointer text-blue-500 underline decoration-1",on:{"click":function($event){return _vm.viewFile(item)}}},[_vm._v(_vm._s(item.name))])])}))],2),_c('el-image',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"elImage",attrs:{"src":_vm.imgContent,"preview-src-list":[_vm.imgContent]}})],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/FileUpload/FormUpload.vue?vue&type=template&id=3feabb7c&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
var toConsumableArray = __webpack_require__("2909");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regenerator.js + 1 modules
var regenerator = __webpack_require__("c14f");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("3835");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.at.js
var es_array_at = __webpack_require__("33d1");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
var es_array_join = __webpack_require__("a15b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
var es_array_push = __webpack_require__("14d9");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
var es_iterator_constructor = __webpack_require__("e9f5");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
var es_iterator_filter = __webpack_require__("910d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
var es_iterator_for_each = __webpack_require__("7d54");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
var es_iterator_map = __webpack_require__("ab43");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.reduce.js
var es_iterator_reduce = __webpack_require__("9485");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
var es_number_constructor = __webpack_require__("a9e3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.at-alternative.js
var es_string_at_alternative = __webpack_require__("ea98");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
var web_url = __webpack_require__("2b3d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.to-json.js
var web_url_to_json = __webpack_require__("bf19");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
var web_url_search_params = __webpack_require__("9861");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
var web_url_search_params_delete = __webpack_require__("88a7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
var web_url_search_params_has = __webpack_require__("271a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
var web_url_search_params_size = __webpack_require__("5494");

// EXTERNAL MODULE: ./node_modules/@wiz-api/file-management/lib/file-management.umd.js
var file_management_umd = __webpack_require__("3c33");

// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib??ref--12-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/safety/FileUpload/FormUpload.vue?vue&type=script&lang=js
































//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


var fileApi = new file_management_umd["FileApi"]();
/* harmony default export */ var FormUploadvue_type_script_lang_js = ({
  name: 'form-upload',
  model: {
    prop: 'fileIds',
    event: 'change'
  },
  props: {
    // 上传提示文本
    uploadTipText: {
      type: String,
      default: '一次只能上传一个文件'
    },
    // 是否只显示文本
    showText: {
      default: false
    },
    // 文件数量
    limit: {
      default: 1
    },
    // 文件大小不超过，单位m，默认100，
    maxSize: {
      type: Number,
      default: 50
    },
    // 文件总大小不超过，单位m，默认100，
    totalMaxSize: {
      type: Number,
      default: 0
    },
    // 可上传文件类型;为空数组时可以
    accept: {
      type: Array,
      default: function _default() {
        return ['pdf', 'jpg', 'png'];
        // 图片格式默认前3个
        // 'jpeg', 'gif', 'psd', 'bmp', 'tiff'
      }
    },
    disabled: {
      disabled: false
    },
    fileIds: {
      default: ''
    },
    // tip: {
    //   type: String,
    //   default: '请上传相关方进场审查资料示例，仅支持上传pdf/jpg/png格式，每次上传不超过100M',
    // },
    // 是否能拖拽，拖拽比较占位置，不拖拽使用按钮上传
    drag: {
      default: true
    }
  },
  computed: {
    tip: function tip() {
      var type = this.accept && this.accept.length ? "\u4EC5\u652F\u6301\u4E0A\u4F20".concat(this.accept.join('/'), "\u683C\u5F0F,") : '';
      var totalMaxSize = this.totalMaxSize ? ",\u6587\u4EF6\u603B\u5927\u5C0F\u4E0D\u8D85\u8FC7".concat(this.totalMaxSize, "M") : '';
      return "".concat(type, "\u6BCF\u6B21\u4E0A\u4F20\u4E0D\u8D85\u8FC7").concat(this.maxSize, "M").concat(totalMaxSize);
    },
    fileUrl: function fileUrl() {
      var fileServer = Wiz.GetModuleServer('file-management');
      return "".concat(fileServer, "/api/file-management/files/public/");
    }
  },
  data: function data() {
    return {
      // fileList上传的时候会改变值，自己写个copyFileList
      fileList: [],
      copyFileList: [],
      // 图片预览信息
      imgContent: null,
      totalSize: 0,
      uploadLoading: false,
      uploadedFileIds: []
    };
  },
  created: function created() {
    // if (this.fileIds) {
    //   this.fnGetFileList(this.fileIds.split(','))
    //   this.getTotalMaxSize()
    // } else {
    //   this.copyFileList = []
    // }
  },
  watch: {
    fileIds: {
      immediate: true,
      handler: function handler(fileIds) {
        if (fileIds) {
          this.fnGetFileList(fileIds.split(','));
          this.getTotalMaxSize();
        } else {
          this.totalSize = 0;
          this.fileList = [];
          this.copyFileList = [];
          this.$emit('exposeFileList', []);
        }
      }
    }
  },
  methods: {
    // 文件超出限制钩子
    handleExceed: function handleExceed() {
      this.$message.warning('文件个数超出限制');
    },
    beforeUpload: function beforeUpload(file) {
      var maxSize = file.size / 1024 / 1024;
      var name = file.name;
      if (maxSize > this.maxSize) {
        this.$message.warning("\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(this.maxSize, "M"));
        return false;
      }
      var fileSuffix = name.substring(name.lastIndexOf('.') + 1).toLowerCase();
      if (this.accept && this.accept.length > 0 && !this.accept.map(function (i) {
        return i.toLowerCase();
      }).includes(fileSuffix)) {
        this.$message.warning({
          showClose: true,
          message: "\u4E0A\u4F20\u6587\u4EF6\u53EA\u80FD\u662F".concat(this.accept.join('/')),
          type: 'warning'
        });
        return false;
      }
      if (this.totalMaxSize && this.totalSize + maxSize > this.totalMaxSize) {
        this.$message({
          showClose: true,
          message: "\u6587\u4EF6\u603B\u5927\u5C0F\u9650\u5236".concat(this.totalMaxSize, "M\u5185"),
          type: 'warning'
        });
        return false;
      }
      return true;
    },
    // 文件总大小
    getTotalMaxSize: function getTotalMaxSize() {
      var _this = this;
      var ids = this.fileIds.split(',');
      var list = [];
      ids.forEach(function (id) {
        list.push(fileApi.getFileInfoVersion(id));
      });
      Promise.all(list).then(function (res) {
        _this.totalSize = res.reduce(function (pre, item) {
          var _item = Object(slicedToArray["a" /* default */])(item, 2),
            err = _item[0],
            fileRes = _item[1];
          if (!err) {
            pre += fileRes.size;
          }
          return pre;
        }, 0) / 1024 / 1024;
      });
    },
    // 获取附件列表
    fnGetFileList: function fnGetFileList(fileIds) {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var promiseList;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              _this2.fileList = [];
              _this2.copyFileList = [];
              promiseList = [];
              fileIds.forEach(/*#__PURE__*/function () {
                var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee(id) {
                  return Object(regenerator["a" /* default */])().w(function (_context) {
                    while (1) switch (_context.n) {
                      case 0:
                        promiseList.push(fileApi.get(id));
                      case 1:
                        return _context.a(2);
                    }
                  }, _callee);
                }));
                return function (_x) {
                  return _ref.apply(this, arguments);
                };
              }());
              Promise.all(promiseList).then(function (fileList) {
                fileList.forEach(function (item) {
                  var _item2 = Object(slicedToArray["a" /* default */])(item, 2),
                    err = _item2[0],
                    res = _item2[1];
                  _this2.copyFileList.push(res);
                  _this2.fileList.push(res);
                  _this2.$emit('exposeFileList', _this2.copyFileList);
                });
              }).catch();
            case 1:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    },
    // 附件，删除
    fnDeleteFileReg: function fnDeleteFileReg() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3() {
        var _yield$fileApi$callDe, _yield$fileApi$callDe2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context3) {
          while (1) switch (_context3.n) {
            case 0:
              _context3.n = 1;
              return fileApi.callDelete(_this3.fileId);
            case 1:
              _yield$fileApi$callDe = _context3.v;
              _yield$fileApi$callDe2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$callDe, 2);
              err = _yield$fileApi$callDe2[0];
              res = _yield$fileApi$callDe2[1];
              if (!err) {
                _this3.$message({
                  message: '删除成功',
                  type: 'success'
                });
                _this3.fileList = [];
                _this3.$emit('change', '');
              }
            case 2:
              return _context3.a(2);
          }
        }, _callee3);
      }))();
    },
    importListFile: function importListFile(params) {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee4() {
        var _yield$fileApi$upload, _yield$fileApi$upload2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context4) {
          while (1) switch (_context4.n) {
            case 0:
              // 上传附件
              _this4.uploadLoading = true;
              _context4.n = 1;
              return fileApi.upload({
                files: [params.file]
              });
            case 1:
              _yield$fileApi$upload = _context4.v;
              _yield$fileApi$upload2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$upload, 2);
              err = _yield$fileApi$upload2[0];
              res = _yield$fileApi$upload2[1];
              _this4.uploadLoading = false;
              if (!err) {
                _this4.$emit('change', [].concat(Object(toConsumableArray["a" /* default */])(_this4.copyFileList), Object(toConsumableArray["a" /* default */])(res)).map(function (i) {
                  return i.id;
                }).join(','));
                // this.fnGetFileList(res[0].id)
              }
            case 2:
              return _context4.a(2);
          }
        }, _callee4);
      }))();
    },
    onChange: function onChange(file, fileList) {
      this.fileList = fileList;
      this.$refs.upload.submit();
    },
    beforeRemove: function beforeRemove(file) {
      var _this5 = this;
      return this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        callback: function callback(action) {
          if (action === 'confirm') {
            // this.fnDeleteFileReg(file.id)
            // this.fnDeleteFileReg(this.fileId)
            // 模拟删除
            _this5.copyFileList = _this5.copyFileList.filter(function (i) {
              return i.id !== file.id;
            });
            _this5.fileList = _this5.copyFileList;
            _this5.$emit('exposeFileList', _this5.copyFileList);
            _this5.$emit('change', _this5.copyFileList.map(function (i) {
              return i.id;
            }).join(','));
          }
        }
      });
    },
    onPreview: function onPreview(file) {
      var type = file.name.split('.').at(-1).toLowerCase();
      var typeMap = {
        pdf: 'application/pdf'
      };
      var imageList = ['jpg', 'png', 'jpg', 'jpeg', 'gif', 'psd', 'bmp', 'tiff'];
      if (typeMap[type]) {
        window.open("".concat(this.fileUrl, "preview/").concat(file.id, "?contentType=application/pdf"));
        return;
      }
      if (imageList.indexOf(type) > -1) {
        this.imgContent = "".concat(this.fileUrl, "image/").concat(file.id);
        this.$refs.elImage.clickHandler();
        return;
      }
      this.downLoadFile(file);
    },
    // 附件，下载
    downLoadFile: function downLoadFile(file) {
      var _this6 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee5() {
        var _yield$fileApi$downlo, _yield$fileApi$downlo2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context5) {
          while (1) switch (_context5.n) {
            case 0:
              _context5.n = 1;
              return fileApi.download(file.id, {
                returnType: 'Blob'
              });
            case 1:
              _yield$fileApi$downlo = _context5.v;
              _yield$fileApi$downlo2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$downlo, 2);
              err = _yield$fileApi$downlo2[0];
              res = _yield$fileApi$downlo2[1];
              if (!err) {
                _this6.exportFile(res, file.name);
              }
            case 2:
              return _context5.a(2);
          }
        }, _callee5);
      }))();
    },
    // 下载文件
    exportFile: function exportFile(data, name) {
      var blob = new Blob([data], {
        type: 'application/pdf'
      });
      var blobUrl = window.URL.createObjectURL(blob);
      var templink = document.createElement('a');
      templink.style.display = 'none';
      templink.href = blobUrl;
      templink.setAttribute('download', "".concat(name));
      document.body.appendChild(templink);
      templink.click();
      document.body.removeChild(templink);
      window.URL.revokeObjectURL(blobUrl);
      this.$message({
        type: 'success',
        message: '下载成功!'
      });
    },
    // 查看文件
    viewFile: function viewFile(file) {
      var _this7 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee6() {
        var strList, type, typeMap, imageList;
        return Object(regenerator["a" /* default */])().w(function (_context6) {
          while (1) switch (_context6.n) {
            case 0:
              strList = file.name.split('.');
              type = strList[strList.length - 1].toLowerCase();
              typeMap = {
                pdf: 'application/pdf'
              };
              imageList = ['jpg', 'png', 'jpg', 'jpeg', 'gif', 'psd', 'bmp', 'tiff'];
              if (!(!typeMap[type] && !(imageList.indexOf(type) > -1))) {
                _context6.n = 1;
                break;
              }
              _this7.$message.warning('只支持pdf和图片预览');
              return _context6.a(2);
            case 1:
              if (!(imageList.indexOf(type) > -1)) {
                _context6.n = 2;
                break;
              }
              _this7.imgContent = "".concat(_this7.fileUrl, "image/").concat(file.id);
              _this7.$refs.elImage.clickHandler();
              return _context6.a(2);
            case 2:
              window.open("".concat(_this7.fileUrl, "preview/").concat(file.id, "?contentType=application/pdf"));
            case 3:
              return _context6.a(2);
          }
        }, _callee6);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/components/safety/FileUpload/FormUpload.vue?vue&type=script&lang=js
 /* harmony default export */ var FileUpload_FormUploadvue_type_script_lang_js = (FormUploadvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/safety/FileUpload/FormUpload.vue?vue&type=style&index=0&id=3feabb7c&prod&lang=scss&scoped=true
var FormUploadvue_type_style_index_0_id_3feabb7c_prod_lang_scss_scoped_true = __webpack_require__("45f3");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/safety/FileUpload/FormUpload.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  FileUpload_FormUploadvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "3feabb7c",
  null
  
)

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

/***/ }),

/***/ "33d1":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var toObject = __webpack_require__("7b0b");
var lengthOfArrayLike = __webpack_require__("07fa");
var toIntegerOrInfinity = __webpack_require__("5926");
var addToUnscopables = __webpack_require__("44d2");

// `Array.prototype.at` method
// https://tc39.es/ecma262/#sec-array.prototype.at
$({ target: 'Array', proto: true }, {
  at: function at(index) {
    var O = toObject(this);
    var len = lengthOfArrayLike(O);
    var relativeIndex = toIntegerOrInfinity(index);
    var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
    return (k < 0 || k >= len) ? undefined : O[k];
  }
});

addToUnscopables('at');


/***/ }),

/***/ "45f3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_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_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormUpload_vue_vue_type_style_index_0_id_3feabb7c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("96c7");
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_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_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormUpload_vue_vue_type_style_index_0_id_3feabb7c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_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_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormUpload_vue_vue_type_style_index_0_id_3feabb7c_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "48ff":
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__("2350")(false);
// imports


// module
exports.push([module.i, ".show_upload_text[data-v-3feabb7c]  .el-upload--text{display:none}[data-v-3feabb7c] .el-dialog__body{padding-top:0;height:calc(100% - 60px)}", ""]);

// exports


/***/ }),

/***/ "96c7":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("48ff");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("d21fb75e", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "a15b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var uncurryThis = __webpack_require__("e330");
var IndexedObject = __webpack_require__("44ad");
var toIndexedObject = __webpack_require__("fc6a");
var arrayMethodIsStrict = __webpack_require__("a640");

var nativeJoin = uncurryThis([].join);

var ES3_STRINGS = IndexedObject !== Object;
var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');

// `Array.prototype.join` method
// https://tc39.es/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: FORCED }, {
  join: function join(separator) {
    return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),

/***/ "ea98":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var uncurryThis = __webpack_require__("e330");
var requireObjectCoercible = __webpack_require__("1d80");
var toIntegerOrInfinity = __webpack_require__("5926");
var toString = __webpack_require__("577e");
var fails = __webpack_require__("d039");

var charAt = uncurryThis(''.charAt);

var FORCED = fails(function () {
  // eslint-disable-next-line es/no-string-prototype-at -- safe
  return '𠮷'.at(-2) !== '\uD842';
});

// `String.prototype.at` method
// https://tc39.es/ecma262/#sec-string.prototype.at
$({ target: 'String', proto: true, forced: FORCED }, {
  at: function at(index) {
    var S = toString(requireObjectCoercible(this));
    var len = S.length;
    var relativeIndex = toIntegerOrInfinity(index);
    var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
    return (k < 0 || k >= len) ? undefined : charAt(S, k);
  }
});


/***/ })

}]);
//# sourceMappingURL=contractor-management-sm.umd.35.js.map