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

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

"use strict";

var tryToString = __webpack_require__("0d51");

var $TypeError = TypeError;

module.exports = function (O, P) {
  if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
};


/***/ }),

/***/ "2044":
/***/ (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__("3e4b");
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("7b79f80f", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var uncurryThis = __webpack_require__("e330");
var notARegExp = __webpack_require__("5a34");
var requireObjectCoercible = __webpack_require__("1d80");
var toString = __webpack_require__("577e");
var correctIsRegExpLogic = __webpack_require__("ab13");

var stringIndexOf = uncurryThis(''.indexOf);

// `String.prototype.includes` method
// https://tc39.es/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~stringIndexOf(
      toString(requireObjectCoercible(this)),
      toString(notARegExp(searchString)),
      arguments.length > 1 ? arguments[1] : undefined
    );
  }
});


/***/ }),

/***/ "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();
}


/***/ }),

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

"use strict";

// Should throw an error on invalid iterator
// https://issues.chromium.org/issues/336839115
module.exports = function (methodName, argument) {
  // eslint-disable-next-line es/no-iterator -- required for testing
  var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
  if (method) try {
    method.call({ next: null }, argument).next();
  } catch (error) {
    return true;
  }
};


/***/ }),

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

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


// module
exports.push([module.i, ".upload-demo-list[data-v-483684fe]{position:relative}.upload-demo-list .demo-upload-list-cover[data-v-483684fe]{display:none;position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.6)}.upload-demo-list .demo-upload-list-cover i[data-v-483684fe]{color:#fff}.upload-demo-list:hover .demo-upload-list-cover[data-v-483684fe]{display:block;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}", ""]);

// exports


/***/ }),

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

"use strict";

var isObject = __webpack_require__("861d");
var classof = __webpack_require__("c6b6");
var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
};


/***/ }),

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

"use strict";

var isRegExp = __webpack_require__("44e7");

var $TypeError = TypeError;

module.exports = function (it) {
  if (isRegExp(it)) {
    throw new $TypeError("The method doesn't accept regular expressions");
  } return it;
};


/***/ }),

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

"use strict";

var defineBuiltIn = __webpack_require__("cb2d");

module.exports = function (target, src, options) {
  for (var key in src) defineBuiltIn(target, key, src[key], options);
  return target;
};


/***/ }),

/***/ "71fd":
/***/ (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_ImgUpload_vue_vue_type_style_index_0_id_483684fe_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2044");
/* 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_ImgUpload_vue_vue_type_style_index_0_id_483684fe_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_ImgUpload_vue_vue_type_style_index_0_id_483684fe_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "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);
  }
});


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var toObject = __webpack_require__("7b0b");
var toAbsoluteIndex = __webpack_require__("23cb");
var toIntegerOrInfinity = __webpack_require__("5926");
var lengthOfArrayLike = __webpack_require__("07fa");
var setArrayLength = __webpack_require__("3a34");
var doesNotExceedSafeInteger = __webpack_require__("3511");
var arraySpeciesCreate = __webpack_require__("65f0");
var createProperty = __webpack_require__("8418");
var deletePropertyOrThrow = __webpack_require__("083a");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');

var max = Math.max;
var min = Math.min;

// `Array.prototype.splice` method
// https://tc39.es/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  splice: function splice(start, deleteCount /* , ...items */) {
    var O = toObject(this);
    var len = lengthOfArrayLike(O);
    var actualStart = toAbsoluteIndex(start, len);
    var argumentsLength = arguments.length;
    var insertCount, actualDeleteCount, A, k, from, to;
    if (argumentsLength === 0) {
      insertCount = actualDeleteCount = 0;
    } else if (argumentsLength === 1) {
      insertCount = 0;
      actualDeleteCount = len - actualStart;
    } else {
      insertCount = argumentsLength - 2;
      actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
    }
    doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
    A = arraySpeciesCreate(O, actualDeleteCount);
    for (k = 0; k < actualDeleteCount; k++) {
      from = actualStart + k;
      if (from in O) createProperty(A, k, O[from]);
    }
    A.length = actualDeleteCount;
    if (insertCount < actualDeleteCount) {
      for (k = actualStart; k < len - actualDeleteCount; k++) {
        from = k + actualDeleteCount;
        to = k + insertCount;
        if (from in O) O[to] = O[from];
        else deletePropertyOrThrow(O, to);
      }
      for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
    } else if (insertCount > actualDeleteCount) {
      for (k = len - actualDeleteCount; k > actualStart; k--) {
        from = k + actualDeleteCount - 1;
        to = k + insertCount - 1;
        if (from in O) O[to] = O[from];
        else deletePropertyOrThrow(O, to);
      }
    }
    for (k = 0; k < insertCount; k++) {
      O[k + actualStart] = arguments[k + 2];
    }
    setArrayLength(O, len - actualDeleteCount + insertCount);
    return A;
  }
});


/***/ }),

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

"use strict";

var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

module.exports = function (METHOD_NAME) {
  var regexp = /./;
  try {
    '/./'[METHOD_NAME](regexp);
  } catch (error1) {
    try {
      regexp[MATCH] = false;
      return '/./'[METHOD_NAME](regexp);
    } catch (error2) { /* empty */ }
  } return false;
};


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var call = __webpack_require__("c65b");
var aCallable = __webpack_require__("59ed");
var anObject = __webpack_require__("825a");
var getIteratorDirect = __webpack_require__("46c4");
var createIteratorProxy = __webpack_require__("c5cc");
var callWithSafeIterationClosing = __webpack_require__("9bdd");
var iteratorClose = __webpack_require__("2a62");
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__("2baa");
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f");
var IS_PURE = __webpack_require__("c430");

var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
  && iteratorHelperWithoutClosingOnEarlyError('map', TypeError);

var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;

var IteratorProxy = createIteratorProxy(function () {
  var iterator = this.iterator;
  var result = anObject(call(this.next, iterator));
  var done = this.done = !!result.done;
  if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
});

// `Iterator.prototype.map` method
// https://tc39.es/ecma262/#sec-iterator.prototype.map
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
  map: function map(mapper) {
    anObject(this);
    try {
      aCallable(mapper);
    } catch (error) {
      iteratorClose(this, 'throw', error);
    }

    if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);

    return new IteratorProxy(getIteratorDirect(this), {
      mapper: mapper
    });
  }
});


/***/ }),

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

"use strict";

var arraySlice = __webpack_require__("f36a");

var floor = Math.floor;

var sort = function (array, comparefn) {
  var length = array.length;

  if (length < 8) {
    // insertion sort
    var i = 1;
    var element, j;

    while (i < length) {
      j = i;
      element = array[i];
      while (j && comparefn(array[j - 1], element) > 0) {
        array[j] = array[--j];
      }
      if (j !== i++) array[j] = element;
    }
  } else {
    // merge sort
    var middle = floor(length / 2);
    var left = sort(arraySlice(array, 0, middle), comparefn);
    var right = sort(arraySlice(array, middle), comparefn);
    var llength = left.length;
    var rlength = right.length;
    var lindex = 0;
    var rindex = 0;

    while (lindex < llength || rindex < rlength) {
      array[lindex + rindex] = (lindex < llength && rindex < rlength)
        ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
        : lindex < llength ? left[lindex++] : right[rindex++];
    }
  }

  return array;
};

module.exports = sort;


/***/ }),

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

"use strict";

var iteratorClose = __webpack_require__("2a62");

module.exports = function (iters, kind, value) {
  for (var i = iters.length - 1; i >= 0; i--) {
    if (iters[i] === undefined) continue;
    try {
      value = iteratorClose(iters[i].iterator, kind, value);
    } catch (error) {
      kind = 'throw';
      value = error;
    }
  }
  if (kind === 'throw') throw value;
  return value;
};


/***/ }),

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

"use strict";

var call = __webpack_require__("c65b");
var create = __webpack_require__("7c73");
var createNonEnumerableProperty = __webpack_require__("9112");
var defineBuiltIns = __webpack_require__("6964");
var wellKnownSymbol = __webpack_require__("b622");
var InternalStateModule = __webpack_require__("69f3");
var getMethod = __webpack_require__("dc4a");
var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype;
var createIterResultObject = __webpack_require__("4754");
var iteratorClose = __webpack_require__("2a62");
var iteratorCloseAll = __webpack_require__("b64e");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ITERATOR_HELPER = 'IteratorHelper';
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
var NORMAL = 'normal';
var THROW = 'throw';
var setInternalState = InternalStateModule.set;

var createIteratorProxyPrototype = function (IS_ITERATOR) {
  var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);

  return defineBuiltIns(create(IteratorPrototype), {
    next: function next() {
      var state = getInternalState(this);
      // for simplification:
      //   for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
      //   for `%IteratorHelperPrototype%.next` - just a value
      if (IS_ITERATOR) return state.nextHandler();
      if (state.done) return createIterResultObject(undefined, true);
      try {
        var result = state.nextHandler();
        return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
      } catch (error) {
        state.done = true;
        throw error;
      }
    },
    'return': function () {
      var state = getInternalState(this);
      var iterator = state.iterator;
      state.done = true;
      if (IS_ITERATOR) {
        var returnMethod = getMethod(iterator, 'return');
        return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
      }
      if (state.inner) try {
        iteratorClose(state.inner.iterator, NORMAL);
      } catch (error) {
        return iteratorClose(iterator, THROW, error);
      }
      if (state.openIters) try {
        iteratorCloseAll(state.openIters, NORMAL);
      } catch (error) {
        return iteratorClose(iterator, THROW, error);
      }
      if (iterator) iteratorClose(iterator, NORMAL);
      return createIterResultObject(undefined, true);
    }
  });
};

var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
var IteratorHelperPrototype = createIteratorProxyPrototype(false);

createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');

module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
  var IteratorProxy = function Iterator(record, state) {
    if (state) {
      state.iterator = record.iterator;
      state.next = record.next;
    } else state = record;
    state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
    state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
    state.nextHandler = nextHandler;
    state.counter = 0;
    state.done = false;
    setInternalState(this, state);
  };

  IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;

  return IteratorProxy;
};


/***/ }),

/***/ "c8b3":
/***/ (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/ImgUpload/ImgUpload.vue?vue&type=template&id=483684fe&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload-contain flex justify-start flex-nowrap"},[(!_vm.fileId || _vm.copyFileList.length < _vm.limit)?_c('el-upload',{ref:"upload",staticClass:"!mr-10px mb-10px avatar-upload border-1px border-dashed boder-color-default cursor-pointer hover:border-[var(--systemMainColor)]",style:(Object.assign({}, _vm.classWH)),attrs:{"action":"string","http-request":_vm.importListFile,"show-file-list":false,"auto-upload":false,"multiple":false,"limit":_vm.limit,"on-change":_vm.onChange,"disabled":_vm.isDisabledUploadComponent}},[_c('i',{staticClass:"text-xl text-center",class:[_vm.uploadIcon],style:(Object.assign({}, _vm.classWH, {'line-height': (_vm.uploadHeight + "px")}))})]):_vm._e(),(_vm.copyFileList.length > 0)?_c('div',{staticClass:"flex justify-start items-center flex-wrap"},_vm._l((_vm.copyFileList),function(item,index){return _c('div',{key:index,staticClass:"upload-demo-list mr-10px mb-10px",style:(Object.assign({}, _vm.classWH))},[_c('el-image',{staticClass:"w-full h-full",attrs:{"fit":"contain","src":item.imgContent,"alt":""}}),_c('div',{staticClass:"w-full h-full demo-upload-list-cover"},[_c('i',{staticClass:"el-icon-view text-base",on:{"click":function($event){return _vm.handlePreview(item.imgContent)}}}),_c('i',{staticClass:"el-icon-download text-base ml-10px",on:{"click":function($event){return _vm.handleDownload(item.id)}}}),(_vm.isShowDeleteButton)?_c('i',{staticClass:"el-icon-delete text-base ml-10px",on:{"click":function($event){return _vm.handleDel(index)}}}):_vm._e()])],1)}),0):_vm._e(),_c('el-image',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"elImage",attrs:{"src":_vm.imgContent,"preview-src-list":_vm.baseImageList}})],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/ImgUpload/ImgUpload.vue?vue&type=template&id=483684fe&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/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("3835");

// 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/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// 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.array.splice.js
var es_array_splice = __webpack_require__("a434");

// 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.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.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.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/ImgUpload/ImgUpload.vue?vue&type=script&lang=js




























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


var fileApi = new file_management_umd["FileApi"]();
/* harmony default export */ var ImgUploadvue_type_script_lang_js = ({
  name: 'ImgUpload',
  model: {
    prop: 'fileId',
    event: 'change'
  },
  props: {
    // 0默认 1 私有 2公开
    authLevel: {
      type: Number,
      default: 0
    },
    // 文件id
    fileId: {
      type: String,
      default: ''
    },
    // 可上传文件类型;为空数组时可以
    accept: {
      type: Array,
      default: function _default() {
        return ['jpg', 'png', 'jpeg'];
        // 图片格式默认前3个
        // 'jpeg', 'gif', 'psd', 'bmp', 'tiff'
      }
    },
    // 限制图片尺寸宽高，例如： [375, 240]
    limitImgWHArr: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 限制单个图片大小,以M为单位
    maxSize: {
      type: Number,
      default: 100
    },
    // 限制总的文件大小,以M为单位
    totalMaxSize: {
      type: Number,
      default: 300
    },
    // 上传组件显示的图标,默认为上传图标
    uploadIcon: {
      type: String,
      default: 'el-icon-plus'
    },
    // 是否显示删除按钮
    isShowDeleteButton: {
      type: Boolean,
      default: true
    },
    // 是否禁用上传组件
    isDisabledUploadComponent: {
      type: Boolean,
      default: false
    },
    // 上传组件宽高自定义设置
    uploadWidth: {
      type: Number,
      default: 360
    },
    // 上传组件宽高自定义设置
    uploadHeight: {
      type: Number,
      default: 180
    },
    // 文件数量
    limit: {
      default: 1
    }
  },
  data: function data() {
    return {
      // 图片预览信息
      imgContent: null,
      // 文件对象
      files: null,
      // 文件列表
      fileList: [],
      // 文件复制对象
      copyFileList: []
    };
  },
  created: function created() {
    if (this.fileId) {
      this.getImgContent(this.fileId.split(','));
    } else {
      this.copyFileList = [];
    }
  },
  computed: {
    baseImageList: function baseImageList() {
      return this.copyFileList.map(function (i) {
        return i.imgContent;
      });
    },
    classWH: function classWH() {
      return {
        width: "".concat(this.uploadWidth, "px !important"),
        height: "".concat(this.uploadHeight, "px")
      };
    }
  },
  methods: {
    // 限制图片尺寸
    limitFileWH: function limitFileWH(limitWidth, limitHeight, file) {
      var valid = false;
      var width = limitWidth;
      var height = limitHeight;
      var reader = new FileReader();
      reader.readAsDataURL(file);
      reader.onload = function (e) {
        var data = e.target.result;
        var image = new Image();
        image.src = data;
        image.onload = function () {
          valid = image.width === width && image.height === height;
        };
      };
      return valid;
    },
    // 图片上传覆盖方法
    importListFile: function importListFile(params) {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
        var name, fileSuffix, valid;
        return Object(regenerator["a" /* default */])().w(function (_context) {
          while (1) switch (_context.n) {
            case 0:
              name = params.file.name;
              fileSuffix = name.substring(name.lastIndexOf('.') + 1).toLowerCase();
              if (!(_this.accept && _this.accept.length > 0 && !_this.accept.map(function (i) {
                return i.toLowerCase();
              }).includes(fileSuffix))) {
                _context.n = 1;
                break;
              }
              _this.$message({
                showClose: true,
                message: "\u4E0A\u4F20\u6587\u4EF6\u53EA\u80FD\u662F".concat(_this.accept.join('/')),
                type: 'warning'
              });
              _this.$refs.upload.clearFiles();
              return _context.a(2);
            case 1:
              if (!(params.file.size / 1024 / 1024 > _this.maxSize)) {
                _context.n = 2;
                break;
              }
              _this.$message({
                showClose: true,
                message: "\u56FE\u7247\u4E0A\u4F20\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7".concat(_this.maxSize, "M"),
                type: 'warning'
              });
              _this.$refs.upload.clearFiles();
              return _context.a(2);
            case 2:
              if (!(_this.limitImgWHArr && _this.limitImgWHArr.length === 2)) {
                _context.n = 3;
                break;
              }
              valid = _this.limitFileWH(_this.limitImgWHArr[0], _this.limitImgWHArr[1], params.file);
              if (valid) {
                _context.n = 3;
                break;
              }
              _this.$message({
                showClose: true,
                message: "\u8BF7\u4E0A\u4F20\u5C3A\u5BF8\u4E3A".concat(_this.limitImgWHArr[0], " * ").concat(_this.limitImgWHArr[1], "\u7684\u56FE\u7247"),
                type: 'warning'
              });
              _this.$refs.upload.clearFiles();
              return _context.a(2);
            case 3:
              // 图片上传尺寸
              _this.imgUpload(params);
            case 4:
              return _context.a(2);
          }
        }, _callee);
      }))();
    },
    /**
     * 文件下载
     * @param {*} item 文件id和文件名称
     * @param {*} type download 下载 target 预览（针对pdf进行单独的预览）
     * @param {*} isShowMessageTip boolean, 是否显示下载成功提示字样
     */
    handleDownload: function handleDownload(fileId) {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var _yield$fileApi$downlo, _yield$fileApi$downlo2, err, res, _yield$fileApi$getFil, _yield$fileApi$getFil2, versionErr, versionRes;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              _context2.n = 1;
              return fileApi.download(fileId, {
                returnType: 'Blob'
              });
            case 1:
              _yield$fileApi$downlo = _context2.v;
              _yield$fileApi$downlo2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$downlo, 2);
              err = _yield$fileApi$downlo2[0];
              res = _yield$fileApi$downlo2[1];
              if (err) {
                _context2.n = 3;
                break;
              }
              _context2.n = 2;
              return fileApi.getFileInfoVersion(fileId);
            case 2:
              _yield$fileApi$getFil = _context2.v;
              _yield$fileApi$getFil2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$getFil, 2);
              versionErr = _yield$fileApi$getFil2[0];
              versionRes = _yield$fileApi$getFil2[1];
              if (!versionErr) {
                _this2.exportFile(res, versionRes.name);
              }
            case 3:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    },
    /**
     * 下载文件
     * @param {*} data 文件流
     * @param {*} name 文件名称
     * @param {*} type download 下载 target 预览（针对pdf进行单独的预览）
     * @param {*} isShowMessageTip boolean, 是否显示下载成功提示字样
     */
    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({
        showClose: true,
        message: '下载成功!',
        type: 'success'
      });
    },
    // 图片上传请求
    imgUpload: function imgUpload(params) {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3() {
        var _yield$fileApi$upload, _yield$fileApi$upload2, err, res, copyFileList, copyFilesId;
        return Object(regenerator["a" /* default */])().w(function (_context3) {
          while (1) switch (_context3.n) {
            case 0:
              _context3.n = 1;
              return fileApi.upload({
                authLevel: _this3.authLevel || 0,
                files: [params.file]
              });
            case 1:
              _yield$fileApi$upload = _context3.v;
              _yield$fileApi$upload2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$upload, 2);
              err = _yield$fileApi$upload2[0];
              res = _yield$fileApi$upload2[1];
              if (!err) {
                copyFileList = [].concat(Object(toConsumableArray["a" /* default */])(_this3.copyFileList), Object(toConsumableArray["a" /* default */])(res));
                copyFilesId = copyFileList.map(function (item, index) {
                  return item.id;
                }); // 只用于人员证件上传回调
                _this3.files = params.file;
                // 上传成功回调,用于拿到img的base64,身份证做特殊处理
                _this3.$emit('upload-success', _this3.files);
                _this3.getImgContent([res[0].id]);
                _this3.$emit('change', copyFilesId.join(','));
              }
            case 2:
              return _context3.a(2);
          }
        }, _callee3);
      }))();
    },
    /**
     * 获取图片内容并进行预览
     * @param {*} fileId 文件id
     */
    getImgContent: function getImgContent(fileId) {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee5() {
        var promiseList;
        return Object(regenerator["a" /* default */])().w(function (_context5) {
          while (1) switch (_context5.n) {
            case 0:
              promiseList = [];
              fileId.forEach(/*#__PURE__*/function () {
                var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee4(id) {
                  return Object(regenerator["a" /* default */])().w(function (_context4) {
                    while (1) switch (_context4.n) {
                      case 0:
                        // 获取图片内容
                        promiseList.push(fileApi.getFileContent(id));
                      case 1:
                        return _context4.a(2);
                    }
                  }, _callee4);
                }));
                return function (_x) {
                  return _ref.apply(this, arguments);
                };
              }());
              Promise.all(promiseList).then(function (fileList) {
                fileList.forEach(function (item, index) {
                  var _item = Object(slicedToArray["a" /* default */])(item, 2),
                    err = _item[0],
                    res = _item[1];
                  if (!err) {
                    var file = {
                      id: fileId[index],
                      imgContent: "data:image/jpg;base64,".concat(res.content)
                    };
                    _this4.copyFileList.push(file);
                  }
                });
              }).catch();
            case 1:
              return _context5.a(2);
          }
        }, _callee5);
      }))();
    },
    onChange: function onChange(file, fileList) {
      this.$refs.upload.submit();
    },
    // 预览
    handlePreview: function handlePreview(imgContent) {
      this.imgContent = imgContent;
      this.$refs.elImage.clickHandler();
    },
    // 删除
    handleDel: function handleDel(index) {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee7() {
        return Object(regenerator["a" /* default */])().w(function (_context7) {
          while (1) switch (_context7.n) {
            case 0:
              _this5.$confirm('是否确认删除？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee6() {
                var copyFilesId;
                return Object(regenerator["a" /* default */])().w(function (_context6) {
                  while (1) switch (_context6.n) {
                    case 0:
                      _this5.copyFileList.splice(index, 1);
                      copyFilesId = _this5.copyFileList.map(function (item, iIndex) {
                        return item.id;
                      });
                      _this5.$emit('change', copyFilesId.join(','));
                      _this5.$nextTick(function () {});
                    case 1:
                      return _context6.a(2);
                  }
                }, _callee6);
              }))).catch(function () {});
            case 1:
              return _context7.a(2);
          }
        }, _callee7);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/components/safety/ImgUpload/ImgUpload.vue?vue&type=script&lang=js
 /* harmony default export */ var ImgUpload_ImgUploadvue_type_script_lang_js = (ImgUploadvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/safety/ImgUpload/ImgUpload.vue?vue&type=style&index=0&id=483684fe&prod&lang=scss&scoped=true
var ImgUploadvue_type_style_index_0_id_483684fe_prod_lang_scss_scoped_true = __webpack_require__("71fd");

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

// CONCATENATED MODULE: ./src/components/safety/ImgUpload/ImgUpload.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  ImgUpload_ImgUploadvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "483684fe",
  null
  
)

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

/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var $map = __webpack_require__("b727").map;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');

// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ })

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