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

/***/ 0:
/***/ (function(module, exports) {

/* (ignored) */

/***/ }),

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


/***/ }),

/***/ "2a8e":
/***/ (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__("8802");
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("f87de392", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "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":"12a421af-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/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__("c7eb");

// 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.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/esnext.iterator.constructor.js
var esnext_iterator_constructor = __webpack_require__("0643");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.filter.js
var esnext_iterator_filter = __webpack_require__("2382");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
var esnext_iterator_for_each = __webpack_require__("4e3e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.map.js
var esnext_iterator_map = __webpack_require__("a573");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.reduce.js
var esnext_iterator_reduce = __webpack_require__("9d4a");

// 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(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var promiseList;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _this2.fileList = [];
              _this2.copyFileList = [];
              promiseList = [];
              fileIds.forEach(/*#__PURE__*/function () {
                var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee(id) {
                  return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
                    while (1) switch (_context.prev = _context.next) {
                      case 0:
                        promiseList.push(fileApi.get(id));
                      case 1:
                      case "end":
                        return _context.stop();
                    }
                  }, _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 5:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    // 附件，删除
    fnDeleteFileReg: function fnDeleteFileReg() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _yield$fileApi$callDe, _yield$fileApi$callDe2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _context3.next = 2;
              return fileApi.callDelete(_this3.fileId);
            case 2:
              _yield$fileApi$callDe = _context3.sent;
              _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 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    },
    importListFile: function importListFile(params) {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee4() {
        var _yield$fileApi$upload, _yield$fileApi$upload2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              // 上传附件
              _this4.uploadLoading = true;
              _context4.next = 3;
              return fileApi.upload({
                files: [params.file]
              });
            case 3:
              _yield$fileApi$upload = _context4.sent;
              _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 9:
            case "end":
              return _context4.stop();
          }
        }, _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(regeneratorRuntime["a" /* default */])().mark(function _callee5() {
        var _yield$fileApi$downlo, _yield$fileApi$downlo2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
            case 0:
              _context5.next = 2;
              return fileApi.download(file.id, {
                returnType: 'Blob'
              });
            case 2:
              _yield$fileApi$downlo = _context5.sent;
              _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 7:
            case "end":
              return _context5.stop();
          }
        }, _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(regeneratorRuntime["a" /* default */])().mark(function _callee6() {
        var strList, type, typeMap, imageList;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee6$(_context6) {
          while (1) switch (_context6.prev = _context6.next) {
            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.next = 7;
                break;
              }
              _this7.$message.warning('只支持pdf和图片预览');
              return _context6.abrupt("return");
            case 7:
              if (!(imageList.indexOf(type) > -1)) {
                _context6.next = 11;
                break;
              }
              _this7.imgContent = "".concat(_this7.fileUrl, "image/").concat(file.id);
              _this7.$refs.elImage.clickHandler();
              return _context6.abrupt("return");
            case 11:
              window.open("".concat(_this7.fileUrl, "preview/").concat(file.id, "?contentType=application/pdf"));
            case 12:
            case "end":
              return _context6.stop();
          }
        }, _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');


/***/ }),

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


/***/ }),

/***/ "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


/***/ }),

/***/ "57b7":
/***/ (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":"12a421af-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/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue?vue&type=template&id=4a4dbff4&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"h-full"},[_c('div',{staticClass:"h-full flex"},[_c('div',{staticClass:"h-full w-300px flex-shrink-0"},[_c('el-card',{staticClass:"h-full"},[_c('div',{staticClass:"mb-10px flex items-center text-14px"},[_c('span',{staticClass:"border-l-3 border-color-primary flex-1 pl-10px text-18px"},[_vm._v("资质类型")]),_c('el-dropdown',[_c('span',{staticClass:"el-dropdown-link"},[_c('i',{staticClass:"iconfont icon-line-moreVertical text-14px font-bold"})]),_c('el-dropdown-menu',{attrs:{"slot":"dropdown"},slot:"dropdown"},[_c('el-dropdown-item',{nativeOn:{"click":function($event){return _vm.operateTree(true)}}},[_vm._v("展开全部")]),_c('el-dropdown-item',{nativeOn:{"click":function($event){return _vm.operateTree(false)}}},[_vm._v("收起全部")])],1)],1)],1),_c('div',{staticClass:"flex mb-10px"},[_c('el-input',{staticClass:"mr-10px flex-1",attrs:{"size":"small","placeholder":"请输入搜索内容","prefix-icon":"el-icon-search","clearable":""},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.searchTreeData($event)}},model:{value:(_vm.treeKeyword),callback:function ($$v) {_vm.treeKeyword=$$v},expression:"treeKeyword"}}),_c('el-button',{staticClass:"!h-36px",attrs:{"type":"primary","size":"mini"},on:{"click":_vm.searchTreeData}},[_vm._v("搜索")])],1),_c('div',{staticClass:"tree overflow-y-auto"},[(_vm.treeStandBy)?_c('el-tree',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.treeLoading),expression:"treeLoading"}],ref:"tree",attrs:{"default-expand-all":_vm.defaultExpandAll,"highlight-current":"","data":_vm.treeData,"filter-node-method":_vm.filterTreeNode,"expand-on-click-node":false,"props":_vm.defaultTreeProps,"node-key":"id","default-expanded-keys":_vm.defaultExpandIds},on:{"node-click":_vm.handleDocNodeClick,"node-expand":_vm.nodeExpand,"node-collapse":_vm.nodeCollapse},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var node = ref.node;
var data = ref.data;
return _c('div',{staticClass:"node-item"},[_c('div',{staticClass:"custom-tree-node"},[_c('p',{staticClass:"flex-1 mr-15px truncate",attrs:{"title":node.label}},[_vm._v("\n                  "+_vm._s(node.label)+"\n                ")]),_c('div',{staticClass:"mr-5px"},[(
                      data.code === 'ContractorEntryGuide' ||
                        (!data.code && data.dicType === 'ContractorEntryGuide')
                    )?_c('el-dropdown',[_c('span',{staticClass:"el-dropdown-link"},[_c('i',{staticClass:"iconfont icon-line-moreVertical text-14px font-bold"})]),_c('el-dropdown-menu',{attrs:{"slot":"dropdown"},slot:"dropdown"},[_c('el-dropdown-item',{attrs:{"disabled":!(_vm.$hasAccess('createType') && data.code === 'ContractorEntryGuide')},nativeOn:{"click":function($event){return _vm.handleTreeData($event, 'createChild', data)}}},[_vm._v("新增")]),_c('el-dropdown-item',{attrs:{"disabled":!(
                            _vm.$hasAccess('updateType') &&
                            !data.code &&
                            data.dicType === 'ContractorEntryGuide'
                          )},nativeOn:{"click":function($event){return _vm.handleTreeData($event, data.parentId ? 'editChild' : 'edit', data)}}},[_vm._v("编辑")]),_c('el-dropdown-item',{attrs:{"disabled":!(
                            _vm.$hasAccess('deleteType') &&
                            !data.code &&
                            data.dicType === 'ContractorEntryGuide'
                          )},nativeOn:{"click":function($event){return _vm.removeTreeData($event, data)}}},[_vm._v("删除")])],1)],1):_vm._e()],1)])])}}],null,false,3897241847)}):_vm._e()],1)])],1),_c('div',{staticClass:"h-full rightCol flex-auto w-0px ml-10px"},[_c('el-card',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],staticClass:"h-full"},[_c('div',{staticClass:"flex mb-20px"},[_c('el-input',{staticClass:"!w-50 !mr-10px",attrs:{"size":"small","clearable":"","placeholder":"标题名称"},model:{value:(_vm.searchForm.name),callback:function ($$v) {_vm.$set(_vm.searchForm, "name", $$v)},expression:"searchForm.name"}}),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.searchList}},[_vm._v("搜索")]),_c('el-button',{attrs:{"size":"small"},on:{"click":_vm.resetText}},[_vm._v("重置")]),_c('el-button',{attrs:{"disabled":!_vm.$hasAccess('create'),"type":"primary","size":"small"},on:{"click":function($event){return _vm.openDeviceDialog('create')}}},[_vm._v("新增")])],1),_c('el-table',{attrs:{"data":_vm.tableData,"height":"calc(100% - 110px)","border":"","stripe":""}},[_c('el-table-column',{attrs:{"type":"index","label":"序号","width":"60","show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"label":"资质名称","prop":"title","show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"label":"资质内容","prop":"titleContent","min-width":"200px","show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"label":"资质类别","prop":"directoryName","show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"label":"上传示例","prop":"fileId","show-overflow-tooltip":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('FormUpload',{attrs:{"showText":true},model:{value:(scope.row.fileId),callback:function ($$v) {_vm.$set(scope.row, "fileId", $$v)},expression:"scope.row.fileId"}})]}}])}),_c('el-table-column',{attrs:{"label":"上传时间","prop":"creationTime","width":"200px","show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"label":"操作","width":"200"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"disabled":!_vm.$hasAccess('read'),"size":"mini"},on:{"click":function($event){return _vm.openDeviceDialog('detail', scope.row)}}},[_vm._v("查看")]),_c('el-button',{attrs:{"disabled":!_vm.$hasAccess('update'),"size":"mini"},on:{"click":function($event){return _vm.openDeviceDialog('edit', scope.row)}}},[_vm._v("编辑")]),_c('el-button',{attrs:{"disabled":!_vm.$hasAccess('delete'),"size":"mini"},on:{"click":function($event){return _vm.removeTableData(scope.row)}}},[_vm._v("删除")])]}}])})],1),_c('div',{staticClass:"flex justify-end mt-20px"},[_c('el-pagination',{attrs:{"background":"","current-page":_vm.pageNo,"layout":"total, sizes, prev, pager, next, jumper","page-size":_vm.pageSize,"total":_vm.total,"page-sizes":[15, 30, 45, 60, 75, 90]},on:{"size-change":_vm.searchList,"current-change":_vm.findList,"update:currentPage":function($event){_vm.pageNo=$event},"update:current-page":function($event){_vm.pageNo=$event},"update:pageSize":function($event){_vm.pageSize=$event},"update:page-size":function($event){_vm.pageSize=$event}}})],1)],1)],1)]),_c('el-dialog',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"small-dialog",attrs:{"close-on-click-modal":false,"title":_vm.treeDialogTitle,"visible":_vm.treeDialog,"width":"718px"},on:{"update:visible":function($event){_vm.treeDialog=$event},"open":_vm.dialogOpened}},[_c('el-form',{ref:"treeForm",attrs:{"model":_vm.treeForm,"rules":_vm.treeRules,"label-width":"150px"}},[(_vm.lastName)?_c('el-form-item',{attrs:{"label":"上级目录","prop":"lastName"}},[_c('el-input',{attrs:{"disabled":"","placeholder":"请输入目录名称","value":_vm.lastName,"size":"small","clearable":""}})],1):_vm._e(),_c('el-form-item',{attrs:{"label":"目录名称","prop":"name"}},[_c('el-input',{attrs:{"placeholder":"请输入目录名称","size":"small","clearable":"","maxlength":"50","show-word-limit":""},model:{value:(_vm.treeForm.name),callback:function ($$v) {_vm.$set(_vm.treeForm, "name", $$v)},expression:"treeForm.name"}})],1),_c('el-form-item',{attrs:{"label":"排序序号","prop":"sortNum"}},[_c('el-input',{attrs:{"placeholder":"请输入排序序号","size":"small","clearable":"","maxlength":"5","show-word-limit":""},model:{value:(_vm.treeForm.sortNum),callback:function ($$v) {_vm.$set(_vm.treeForm, "sortNum", _vm._n($$v))},expression:"treeForm.sortNum"}})],1)],1),_c('div',{staticClass:"dialog-footer flex justify-center items-center",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"size":"small","type":"primary","icon":"iconfont icon-save","loading":_vm.saveLoading},on:{"click":_vm.saveTreeForm}},[_vm._v("保存")]),_c('el-button',{attrs:{"size":"small","icon":"iconfont icon-close"},on:{"click":function($event){_vm.treeDialog = false}}},[_vm._v("取消")])],1)],1),_c('el-dialog',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"small-dialog",attrs:{"close-on-click-modal":false,"title":_vm.deviceDialogTitle,"visible":_vm.deviceDialog,"width":"718px"},on:{"update:visible":function($event){_vm.deviceDialog=$event},"open":_vm.dialogOpened}},[(_vm.deviceDialog)?_c('el-form',{ref:"aptitudeForm",attrs:{"model":_vm.aptitudeForm,"rules":_vm.aptitudeRules,"label-width":"150px"}},[_c('el-form-item',{attrs:{"label":"资质名称","prop":"title"}},[_c('el-input',{attrs:{"placeholder":"请输入资质名称","size":"small","clearable":"","disabled":_vm.tableFormDisabled,"maxlength":"50","show-word-limit":""},model:{value:(_vm.aptitudeForm.title),callback:function ($$v) {_vm.$set(_vm.aptitudeForm, "title", $$v)},expression:"aptitudeForm.title"}})],1),_c('el-form-item',{attrs:{"label":"资质内容","prop":"titleContent"}},[_c('el-input',{attrs:{"placeholder":"请输入资质内容","size":"small","clearable":"","disabled":_vm.tableFormDisabled,"type":"textarea","rows":3,"maxlength":"500","show-word-limit":""},model:{value:(_vm.aptitudeForm.titleContent),callback:function ($$v) {_vm.$set(_vm.aptitudeForm, "titleContent", $$v)},expression:"aptitudeForm.titleContent"}})],1),_c('el-form-item',{attrs:{"label":"资质类别","prop":"directoryName"}},[_c('el-input',{attrs:{"placeholder":"请输入资质类别","size":"small","clearable":"","disabled":true},model:{value:(_vm.aptitudeForm.directoryName),callback:function ($$v) {_vm.$set(_vm.aptitudeForm, "directoryName", $$v)},expression:"aptitudeForm.directoryName"}})],1),_c('el-form-item',{attrs:{"label":"是否必需","prop":"isRequired"}},[_c('el-radio-group',{attrs:{"disabled":_vm.tableFormDisabled},model:{value:(_vm.aptitudeForm.isRequired),callback:function ($$v) {_vm.$set(_vm.aptitudeForm, "isRequired", $$v)},expression:"aptitudeForm.isRequired"}},[_c('el-radio',{attrs:{"label":true}},[_vm._v("是")]),_c('el-radio',{attrs:{"label":false}},[_vm._v("否")])],1)],1),_c('el-form-item',{ref:"formUpload",attrs:{"label":"示例文件","prop":"fileId"}},[_c('FormUpload',{attrs:{"disabled":_vm.tableFormDisabled},on:{"change":_vm.fileIdChange},model:{value:(_vm.aptitudeForm.fileId),callback:function ($$v) {_vm.$set(_vm.aptitudeForm, "fileId", $$v)},expression:"aptitudeForm.fileId"}})],1)],1):_vm._e(),(!_vm.tableFormDisabled)?_c('div',{staticClass:"dialog-footer flex justify-center items-center",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"size":"small","type":"primary","icon":"iconfont icon-save","loading":_vm.saveLoading},on:{"click":_vm.saveDeviceForm}},[_vm._v("保存")]),_c('el-button',{attrs:{"size":"small","icon":"iconfont icon-close"},on:{"click":function($event){_vm.deviceDialog = false}}},[_vm._v("取消")])],1):_vm._e()],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue?vue&type=template&id=4a4dbff4&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
var createForOfIteratorHelper = __webpack_require__("b85c");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__("c7eb");

// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

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

// 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.find.js
var es_array_find = __webpack_require__("7db0");

// 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.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.json.stringify.js
var es_json_stringify = __webpack_require__("e9c4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// 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/esnext.iterator.constructor.js
var esnext_iterator_constructor = __webpack_require__("0643");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.filter.js
var esnext_iterator_filter = __webpack_require__("2382");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.find.js
var esnext_iterator_find = __webpack_require__("fffc");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
var esnext_iterator_for_each = __webpack_require__("4e3e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.map.js
var esnext_iterator_map = __webpack_require__("a573");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.reduce.js
var esnext_iterator_reduce = __webpack_require__("9d4a");

// 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/dayjs/dayjs.min.js
var dayjs_min = __webpack_require__("5a0c");
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);

// EXTERNAL MODULE: ./node_modules/@wiz-api/abp-application/lib/abp-application.umd.js
var abp_application_umd = __webpack_require__("39d3");

// EXTERNAL MODULE: ./node_modules/@wiz-api/data-category-management/lib/data-category-management.umd.js
var data_category_management_umd = __webpack_require__("2adf");

// EXTERNAL MODULE: ./node_modules/@wiz-api/contractor-management/lib/contractor-management.umd.js
var contractor_management_umd = __webpack_require__("77b0");

// EXTERNAL MODULE: ./src/components/safety/FileUpload/FormUpload.vue + 4 modules
var FormUpload = __webpack_require__("324b");

// 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/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue?vue&type=script&lang=js























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






var dataCategoryApi = new data_category_management_umd["DataCategoryApi"]();
var abpApplicationConfigurationApi = new abp_application_umd["AbpApplicationConfigurationApi"]();
var guidanceConfigurationDirectoryApi = new contractor_management_umd["GuidanceConfigurationDirectoryApi"]();
var guidanceConfigurationApi = new contractor_management_umd["GuidanceConfigurationApi"]();
/* harmony default export */ var ContractorGuidelineConfigurationvue_type_script_lang_js = ({
  name: 'contractor-guideline-configuration',
  components: {
    FormUpload: FormUpload["default"]
  },
  data: function data() {
    var _this = this;
    var validateType = function validateType(rule, value, callback) {
      if (_this.aptitudeForm.type.length > 0) {
        callback();
      } else {
        callback(new Error('设备类别不能为空'));
      }
    };
    return {
      lastName: '',
      defaultExpandAll: false,
      treeStandBy: true,
      // 是否显目录树 用于刷新树
      searchForm: {
        name: ''
      },
      fileList: [],
      saveLoading: false,
      currentTreeSelect: {},
      pageNo: 1,
      pageSize: 15,
      total: 0,
      treeHandleType: '',
      treeForm: {},
      treeRules: {
        type: [{
          required: true,
          message: '必填',
          trigger: ['blur', 'change']
        }],
        unitId: [{
          required: true,
          message: '必填',
          trigger: ['blur', 'change']
        }],
        name: [{
          required: true,
          message: '必填',
          trigger: ['blur', 'change']
        }],
        sortNum: [{
          required: true,
          message: '必填',
          trigger: ['blur', 'change']
        }]
      },
      typeList: [],
      treeDialog: false,
      treeDialogTitle: '',
      deviceDialogTitle: '',
      aptitudeRules: {
        // title: [{ required: true, validator: validateType, trigger: 'change' }],
        title: [{
          required: true,
          message: '请输入资质名称',
          trigger: 'blur'
        }],
        titleContent: [{
          required: true,
          message: '请输入资质内容',
          trigger: 'blur'
        }],
        directoryName: [{
          required: true,
          message: '请选择资质类别',
          trigger: 'blur'
        }],
        isRequired: [{
          required: true,
          message: '请选择是否必需',
          trigger: 'blur'
        }],
        fileId: [{
          required: true,
          message: '请上传示例文件',
          trigger: ['blur', 'change']
        }],
        creationTime: [{
          required: true,
          message: '请输入',
          trigger: 'blur'
        }]
      },
      aptitudeForm: {},
      deviceDialog: false,
      deviceHandleType: '',
      showTypeDetail: false,
      treeKeyword: '',
      treeLoading: false,
      defaultTreeProps: {
        children: 'children',
        label: 'name'
      },
      // 原数据
      originTree: [],
      treeData: [],
      defaultExpandIds: [],
      keyword: '',
      tableData: [],
      loading: false,
      isDisabledIsLeaf: false,
      moduleAuth: null,
      pid: '',
      parenList: []
    };
  },
  created: function created() {
    this.getConfig();
    // this.getTreeData()
  },
  computed: {
    tableFormDisabled: function tableFormDisabled() {
      return this.deviceHandleType === 'detail';
    }
  },
  methods: {
    fileIdChange: function fileIdChange() {
      this.$refs.formUpload.$emit('el.form.change');
    },
    operateTree: function operateTree(bool) {
      var _this2 = this;
      this.defaultExpandIds = this.$options.data().defaultExpandIds;
      this.treeStandBy = false;
      this.defaultExpandAll = bool;
      this.$nextTick(function () {
        _this2.treeStandBy = true;
      });
    },
    getConfig: function getConfig() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$abpApplication, _yield$abpApplication2, err, abpConfigList, _yield$dataCategoryAp, _yield$dataCategoryAp2, DiverListErr, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return abpApplicationConfigurationApi.get();
            case 2:
              _yield$abpApplication = _context.sent;
              _yield$abpApplication2 = Object(slicedToArray["a" /* default */])(_yield$abpApplication, 2);
              err = _yield$abpApplication2[0];
              abpConfigList = _yield$abpApplication2[1];
              _context.next = 8;
              return dataCategoryApi.getByCode({
                code: abpConfigList.setting.values['ContractorManagement.DataCategory.ApplyGuide']
              });
            case 8:
              _yield$dataCategoryAp = _context.sent;
              _yield$dataCategoryAp2 = Object(slicedToArray["a" /* default */])(_yield$dataCategoryAp, 2);
              DiverListErr = _yield$dataCategoryAp2[0];
              res = _yield$dataCategoryAp2[1];
              if (!DiverListErr) {
                _this3.parenList = res.dataItems;
                _this3.getTreeData();
              }
            case 13:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    getTreeData: function getTreeData() {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _yield$guidanceConfig, _yield$guidanceConfig2, err, res, map;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _this4.treeLoading = true;
              _context2.next = 3;
              return guidanceConfigurationDirectoryApi.pagedListQuery({
                maxResultCount: 10000
              });
            case 3:
              _yield$guidanceConfig = _context2.sent;
              _yield$guidanceConfig2 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig, 2);
              err = _yield$guidanceConfig2[0];
              res = _yield$guidanceConfig2[1];
              if (!err) {
                map = res.items.reduce(function (pre, item) {
                  // this.defaultExpandIds.push(item.id)
                  if (!pre[item.dicType]) {
                    pre[item.dicType] = [];
                  }
                  pre[item.dicType].push(item);
                  return pre;
                }, {});
                _this4.treeData = _this4.parenList.map(function (item) {
                  item.children = map[item.code] ? _this4.JSONToTree(map[item.code]) : [];
                  item.name = item.displayName;
                  return item;
                });
                // 初始化选中第一资质类型
                // this.currentTreeSelect = this.treeData[0]?.children[0]
                // this.defaultExpandIds = [this.treeData[0].id]
                // this.$nextTick(() => {
                //   this.$refs.tree.setCurrentKey(this.treeData[0]?.children[0]?.id)
                // })
                _this4.findList();
              }
              _this4.treeLoading = false;
            case 9:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    filterTreeNode: function filterTreeNode(value, data) {
      if (!value) {
        return true;
      }
      return data.name.indexOf(value) !== -1;
    },
    searchTreeData: function searchTreeData() {
      this.$refs.tree.filter(this.treeKeyword);
    },
    // 节点展开
    nodeExpand: function nodeExpand(data) {
      this.defaultExpandIds.push(data.id);
    },
    // 节点关闭
    nodeCollapse: function nodeCollapse(data) {
      this.defaultExpandIds = _.difference(this.defaultExpandIds, [data.id]);
    },
    handleDocNodeClick: function handleDocNodeClick(data) {
      this.currentTreeSelect = data;
      this.searchList();
    },
    handleTreeData: function handleTreeData(e, type, data) {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _this5$treeData$find;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              if (type === 'createChild') {
                _this5.lastName = data.name;
              } else {
                _this5.lastName = (_this5$treeData$find = _this5.treeData.find(function (item) {
                  return item.code === 'ContractorEntryGuide';
                })) === null || _this5$treeData$find === void 0 ? void 0 : _this5$treeData$find.name;
              }
              // this.lastName
              _this5.treeForm = _this5.$options.data().treeForm;
              if (e && e.stopPropagation) {
                e.stopPropagation();
              } else {
                e.cancelBubble = true;
              }
              if (type !== 'create') {
                _this5.defaultExpandIds.push(data.id);
              }
              _this5.treeHandleType = type;
              if (type === 'create' || type === 'createChild') {
                _this5.treeDialogTitle = '新增目录';
                _this5.treeForm.parentId = data.code ? null : data.id;
                _this5.treeForm.dicType = data.code || data.dicType;
              } else {
                _this5.treeForm = JSON.parse(JSON.stringify(data));
                _this5.treeDialogTitle = '编辑目录';
              }
              _this5.treeDialog = true;
            case 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    },
    // 是否禁用子节点勾选
    dialogOpened: function dialogOpened() {
      var _this6 = this;
      if (this.treeDialog) {
        this.$nextTick(function () {
          _this6.$refs.treeForm.clearValidate();
        });
      } else {
        this.$nextTick(function () {
          _this6.$refs.aptitudeForm.clearValidate();
        });
      }
    },
    removeTreeData: function removeTreeData(e, data) {
      var _this7 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee5() {
        var _yield$guidanceConfig3, _yield$guidanceConfig4, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
            case 0:
              _context5.next = 2;
              return guidanceConfigurationApi.pagedListQuery({
                directoryId: data.id
              });
            case 2:
              _yield$guidanceConfig3 = _context5.sent;
              _yield$guidanceConfig4 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig3, 2);
              err = _yield$guidanceConfig4[0];
              res = _yield$guidanceConfig4[1];
              if (!res.totalCount) {
                _context5.next = 9;
                break;
              }
              _this7.$message.warning({
                showClose: true,
                message: '当前节点存在资质'
              });
              return _context5.abrupt("return");
            case 9:
              if (e && e.stopPropagation) {
                e.stopPropagation();
              } else {
                e.cancelBubble = true;
              }
              if (_.isEmpty(data.children)) {
                _context5.next = 13;
                break;
              }
              _this7.$message.warning({
                showClose: true,
                message: '此目录下关联着多个子目录，请删除全部子目录才能被删除！'
              });
              return _context5.abrupt("return");
            case 13:
              _this7.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee4() {
                var _yield$guidanceConfig5, _yield$guidanceConfig6, delErr, delRes;
                return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee4$(_context4) {
                  while (1) switch (_context4.prev = _context4.next) {
                    case 0:
                      _context4.next = 2;
                      return guidanceConfigurationDirectoryApi.callDelete(data.id);
                    case 2:
                      _yield$guidanceConfig5 = _context4.sent;
                      _yield$guidanceConfig6 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig5, 2);
                      delErr = _yield$guidanceConfig6[0];
                      delRes = _yield$guidanceConfig6[1];
                      if (!delErr) {
                        _this7.defaultExpandIds = _.difference(_this7.defaultExpandIds, [data.id]);
                        _this7.$message.success({
                          showClose: true,
                          message: '删除成功！'
                        });
                        _this7.getTreeData();
                      } else {
                        _this7.$message.error({
                          showClose: true,
                          message: delRes.msg
                        });
                      }
                    case 7:
                    case "end":
                      return _context4.stop();
                  }
                }, _callee4);
              }))).catch(function () {});
            case 14:
            case "end":
              return _context5.stop();
          }
        }, _callee5);
      }))();
    },
    saveTreeForm: function saveTreeForm() {
      var _this8 = this;
      this.$refs.treeForm.validate(/*#__PURE__*/function () {
        var _ref2 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee6(valid) {
          var nextErr, message, _yield$guidanceConfig7, _yield$guidanceConfig8, err, res, _yield$guidanceConfig9, _yield$guidanceConfig10, _err, _res;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee6$(_context6) {
            while (1) switch (_context6.prev = _context6.next) {
              case 0:
                if (!valid) {
                  _context6.next = 26;
                  break;
                }
                _this8.saveLoading = true;
                nextErr = null;
                message = '';
                if (_this8.treeHandleType === 'create') {
                  _this8.treeForm.parentId = null;
                } else {
                  _this8.treeForm.unitId = null;
                }
                if (!(_this8.treeHandleType === 'create' || _this8.treeHandleType === 'createChild')) {
                  _context6.next = 16;
                  break;
                }
                _context6.next = 8;
                return guidanceConfigurationDirectoryApi.create({
                  body: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this8.treeForm), {}, {
                    isFixed: true
                  })
                });
              case 8:
                _yield$guidanceConfig7 = _context6.sent;
                _yield$guidanceConfig8 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig7, 2);
                err = _yield$guidanceConfig8[0];
                res = _yield$guidanceConfig8[1];
                nextErr = err;
                message = '新增成功！';
                _context6.next = 24;
                break;
              case 16:
                _context6.next = 18;
                return guidanceConfigurationDirectoryApi.update(_this8.treeForm.id, {
                  body: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this8.treeForm), {}, {
                    isFixed: true
                  })
                });
              case 18:
                _yield$guidanceConfig9 = _context6.sent;
                _yield$guidanceConfig10 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig9, 2);
                _err = _yield$guidanceConfig10[0];
                _res = _yield$guidanceConfig10[1];
                nextErr = _err;
                message = '编辑成功！';
              case 24:
                if (!nextErr) {
                  _this8.$message.success({
                    showClose: true,
                    message: message
                  });
                  _this8.getTreeData();
                  _this8.treeDialog = false;
                }
                _this8.saveLoading = false;
              case 26:
              case "end":
                return _context6.stop();
            }
          }, _callee6);
        }));
        return function (_x) {
          return _ref2.apply(this, arguments);
        };
      }());
    },
    resetText: function resetText() {
      this.searchForm.name = '';
      this.searchList();
    },
    searchList: function searchList() {
      this.pageNo = 1;
      this.findList();
    },
    // 数组转化成树结构
    JSONToTree: function JSONToTree(data) {
      var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var pid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'parentId';
      var tree = [];
      var temp = [];
      // eslint-disable-next-line no-restricted-syntax
      var _iterator = Object(createForOfIteratorHelper["a" /* default */])(data),
        _step;
      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var i = _step.value;
          if (i[pid] === parent) {
            var obj = i;
            temp = this.JSONToTree(data, i.id, pid);
            if (temp.length > 0) {
              obj.children = temp;
            }
            tree.push(obj);
          }
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }
      return tree;
    },
    findList: function findList() {
      var _this9 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee7() {
        var _yield$guidanceConfig11, _yield$guidanceConfig12, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee7$(_context7) {
          while (1) switch (_context7.prev = _context7.next) {
            case 0:
              _this9.loading = true;
              _context7.next = 3;
              return guidanceConfigurationApi.pagedListQuery({
                directoryId: _this9.currentTreeSelect.id,
                skipCount: (_this9.pageNo - 1) * _this9.pageSize,
                maxResultCount: _this9.pageSize,
                title: _this9.searchForm.name
              });
            case 3:
              _yield$guidanceConfig11 = _context7.sent;
              _yield$guidanceConfig12 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig11, 2);
              err = _yield$guidanceConfig12[0];
              res = _yield$guidanceConfig12[1];
              if (!err) {
                res.items.forEach(function (item) {
                  item.creationTime = dayjs_min_default()(item.creationTime).format('YYYY-MM-DD HH:mm:ss');
                });
                _this9.tableData = res.items;
                _this9.total = res.totalCount;
              }
              _this9.loading = false;
            case 9:
            case "end":
              return _context7.stop();
          }
        }, _callee7);
      }))();
    },
    removeTableData: function removeTableData(data) {
      var _this10 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee9() {
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee9$(_context9) {
          while (1) switch (_context9.prev = _context9.next) {
            case 0:
              _this10.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee8() {
                var _yield$guidanceConfig13, _yield$guidanceConfig14, err, res;
                return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee8$(_context8) {
                  while (1) switch (_context8.prev = _context8.next) {
                    case 0:
                      _context8.next = 2;
                      return guidanceConfigurationApi.callDelete(data.id);
                    case 2:
                      _yield$guidanceConfig13 = _context8.sent;
                      _yield$guidanceConfig14 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig13, 2);
                      err = _yield$guidanceConfig14[0];
                      res = _yield$guidanceConfig14[1];
                      if (!err) {
                        _this10.$message.success({
                          showClose: true,
                          message: '删除成功！'
                        });
                        if (_this10.tableData.length === 1 && _this10.pageNo !== 1) {
                          _this10.pageNo -= 1;
                        }
                        _this10.findList();
                      }
                    case 7:
                    case "end":
                      return _context8.stop();
                  }
                }, _callee8);
              }))).catch(function () {});
            case 1:
            case "end":
              return _context9.stop();
          }
        }, _callee9);
      }))();
    },
    openDeviceDialog: function openDeviceDialog(type, data) {
      var _this11 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee10() {
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee10$(_context10) {
          while (1) switch (_context10.prev = _context10.next) {
            case 0:
              _this11.aptitudeForm = _this11.$options.data().aptitudeForm;
              if (!(type === 'create')) {
                _context10.next = 8;
                break;
              }
              if (!(!_this11.currentTreeSelect || _this11.currentTreeSelect.code || JSON.stringify(_this11.currentTreeSelect) === '{}')) {
                _context10.next = 5;
                break;
              }
              _this11.$message.warning({
                showClose: true,
                message: '请选择目录树叶子节点！'
              });
              return _context10.abrupt("return");
            case 5:
              _this11.deviceDialogTitle = '新增';
              _context10.next = 10;
              break;
            case 8:
              _this11.aptitudeForm = JSON.parse(JSON.stringify(data));
              _this11.deviceDialogTitle = type === 'edit' ? '编辑' : '查看';
            case 10:
              if (_this11.currentTreeSelect.name) {
                _this11.aptitudeForm.directoryName = _this11.currentTreeSelect.name;
              }
              _this11.showTypeDetail = false;
              _this11.deviceHandleType = type;
              _this11.deviceDialog = true;
            case 14:
            case "end":
              return _context10.stop();
          }
        }, _callee10);
      }))();
    },
    saveDeviceForm: function saveDeviceForm() {
      var _this12 = this;
      this.$refs.aptitudeForm.validate(/*#__PURE__*/function () {
        var _ref4 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee11(valid) {
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee11$(_context11) {
            while (1) switch (_context11.prev = _context11.next) {
              case 0:
                if (valid) {
                  // this.aptitudeForm.fileName = this.$refs.formUpload.fileList[0].name
                  if (_this12.deviceHandleType === 'create') {
                    _this12.createDevie();
                  } else {
                    _this12.updateDevice();
                  }
                }
              case 1:
              case "end":
                return _context11.stop();
            }
          }, _callee11);
        }));
        return function (_x2) {
          return _ref4.apply(this, arguments);
        };
      }());
    },
    createDevie: function createDevie() {
      var _this13 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee12() {
        var _yield$guidanceConfig15, _yield$guidanceConfig16, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee12$(_context12) {
          while (1) switch (_context12.prev = _context12.next) {
            case 0:
              if (!_this13.tableData.find(function (item) {
                return item.title === _this13.aptitudeForm.title;
              })) {
                _context12.next = 3;
                break;
              }
              _this13.$message.warning({
                showClose: true,
                message: "\u5DF2\u5B58\u5728".concat(_this13.aptitudeForm.title)
              });
              return _context12.abrupt("return");
            case 3:
              _this13.saveLoading = true;
              _context12.next = 6;
              return guidanceConfigurationApi.create({
                body: Object(objectSpread2["a" /* default */])({
                  directoryId: _this13.currentTreeSelect.id
                }, _this13.aptitudeForm)
              });
            case 6:
              _yield$guidanceConfig15 = _context12.sent;
              _yield$guidanceConfig16 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig15, 2);
              err = _yield$guidanceConfig16[0];
              res = _yield$guidanceConfig16[1];
              if (!err) {
                _this13.$message.success({
                  showClose: true,
                  message: '新增成功！'
                });
                _this13.findList();
                _this13.deviceDialog = false;
              }
              _this13.saveLoading = false;
            case 12:
            case "end":
              return _context12.stop();
          }
        }, _callee12);
      }))();
    },
    updateDevice: function updateDevice() {
      var _this14 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee13() {
        var _yield$guidanceConfig17, _yield$guidanceConfig18, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee13$(_context13) {
          while (1) switch (_context13.prev = _context13.next) {
            case 0:
              _this14.saveLoading = true;
              _context13.next = 3;
              return guidanceConfigurationApi.update(_this14.aptitudeForm.id, {
                body: Object(objectSpread2["a" /* default */])({
                  directoryId: _this14.currentTreeSelect.id
                }, _this14.aptitudeForm)
              });
            case 3:
              _yield$guidanceConfig17 = _context13.sent;
              _yield$guidanceConfig18 = Object(slicedToArray["a" /* default */])(_yield$guidanceConfig17, 2);
              err = _yield$guidanceConfig18[0];
              res = _yield$guidanceConfig18[1];
              if (!err) {
                _this14.$message.success({
                  showClose: true,
                  message: '编辑成功！'
                });
                _this14.findList();
                _this14.deviceDialog = false;
              }
              _this14.saveLoading = false;
            case 9:
            case "end":
              return _context13.stop();
          }
        }, _callee13);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue?vue&type=script&lang=js
 /* harmony default export */ var views_ContractorGuidelineConfigurationvue_type_script_lang_js = (ContractorGuidelineConfigurationvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue?vue&type=style&index=0&id=4a4dbff4&prod&scoped=true&lang=scss
var ContractorGuidelineConfigurationvue_type_style_index_0_id_4a4dbff4_prod_scoped_true_lang_scss = __webpack_require__("cfa2");

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

// CONCATENATED MODULE: ./src/modules/contractor-management-sm/views/ContractorGuidelineConfiguration.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  views_ContractorGuidelineConfigurationvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "4a4dbff4",
  null
  
)

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

/***/ }),

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


/***/ }),

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

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


// module
exports.push([module.i, ".tree[data-v-4a4dbff4]{height:calc(100% - 74px)}.tree[data-v-4a4dbff4]  .el-tree-node__content{height:35px}.tree[data-v-4a4dbff4]  .el-tree-node__content .node-item{width:calc(100% - 24px)}.tree[data-v-4a4dbff4]  .el-tree-node__content .node-item .custom-tree-node{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px}.button-normal.el-button.el-tooltip[data-v-4a4dbff4]{padding:6px 12px!important;width:unset!important;height:unset!important}[data-v-4a4dbff4] .el-select__tags .el-tag{overflow:hidden;max-width:100%;text-overflow:ellipsis}[data-v-4a4dbff4] .el-card__body{height:100%}.required-text--color[data-v-4a4dbff4]{color:#ff3a30}.down-file--color[data-v-4a4dbff4]{color:#acdbff}", ""]);

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

/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var toObject = __webpack_require__("7b0b");
var lengthOfArrayLike = __webpack_require__("07fa");
var doesNotExceedSafeInteger = __webpack_require__("3511");
var createProperty = __webpack_require__("8418");
var arraySpeciesCreate = __webpack_require__("65f0");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("1212");

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');

// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');

// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  concat: function concat(arg) {
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = lengthOfArrayLike(E);
        doesNotExceedSafeInteger(n + len);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        doesNotExceedSafeInteger(n + 1);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    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;
};


/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createForOfIteratorHelper; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a4d3");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e01a");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d28b");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("d9e2");
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e260");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3ca3");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ddb0");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("06c5");









function _createForOfIteratorHelper(r, e) {
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  if (!t) {
    if (Array.isArray(r) || (t = Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(r)) || e && r && "number" == typeof r.length) {
      t && (r = t);
      var _n = 0,
        F = function F() {};
      return {
        s: F,
        n: function n() {
          return _n >= r.length ? {
            done: !0
          } : {
            done: !1,
            value: r[_n++]
          };
        },
        e: function e(r) {
          throw r;
        },
        f: F
      };
    }
    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }
  var o,
    a = !0,
    u = !1;
  return {
    s: function s() {
      t = t.call(r);
    },
    n: function n() {
      var r = t.next();
      return a = r.done, r;
    },
    e: function e(r) {
      u = !0, o = r;
    },
    f: function f() {
      try {
        a || null == t["return"] || t["return"]();
      } finally {
        if (u) throw o;
      }
    }
  };
}


/***/ }),

/***/ "cfa2":
/***/ (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_ContractorGuidelineConfiguration_vue_vue_type_style_index_0_id_4a4dbff4_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a8e");
/* 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_ContractorGuidelineConfiguration_vue_vue_type_style_index_0_id_4a4dbff4_prod_scoped_true_lang_scss__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_ContractorGuidelineConfiguration_vue_vue_type_style_index_0_id_4a4dbff4_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "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.29.js.map