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

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return workFlowStatusTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unitStatusTypes; });
/* unused harmony export planStatusTypes */
/* unused harmony export riskColorTypes */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return statusListTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return borrowListTypes; });
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d81d");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _enumTagType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a96a");

// 用于构造枚举字段管理对象

function enumManager(name, enums) {
  var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  var values = enums.map(function (item) {
    return item.value;
  });
  var index = values.indexOf(value);
  return enums[index].type;
}
var workFlowStatusTypes = function workFlowStatusTypes(value) {
  return enumManager('workFlowStatus', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* workFlowStatus */ "g"], value);
};
var unitStatusTypes = function unitStatusTypes(value) {
  return enumManager('unitStatus', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* unitStatus */ "e"], value);
};
var planStatusTypes = function planStatusTypes(value) {
  return enumManager('planStatus', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* planStatus */ "b"], value);
};
var riskColorTypes = function riskColorTypes(value) {
  return enumManager('riskColor', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* riskColor */ "c"], value);
};
var statusListTypes = function statusListTypes(value) {
  return enumManager('statusList', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* statusList */ "d"], value);
};
var borrowListTypes = function borrowListTypes(value) {
  return enumManager('borrowList', _enumTagType__WEBPACK_IMPORTED_MODULE_1__[/* borrowList */ "a"], value);
};

/***/ }),

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


/***/ }),

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


/***/ }),

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

"use strict";

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

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');

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


/***/ }),

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

"use strict";
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("159b");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);


/**
 * @description 去除表单的placeholder
 * @param {string} selector 选择器
 */
function clearPlaceholder(selector) {
  var dom = document.querySelector(selector);
  if (dom) {
    var inputs = dom.querySelectorAll('input');
    var textareas = dom.querySelectorAll('textarea');
    inputs.forEach(function (input) {
      input.setAttribute('placeholder', '');
    });
    textareas.forEach(function (input) {
      input.setAttribute('placeholder', '');
    });
  }
}
/* harmony default export */ __webpack_exports__["a"] = (clearPlaceholder);

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
/* 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_array_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4de4");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("14d9");
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("e439");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("dbb4");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("b64b");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("159b");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ade3");









function ownKeys(e, r) {
  var t = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    r && (o = o.filter(function (r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    })), t.push.apply(t, o);
  }
  return t;
}
function _objectSpread2(e) {
  for (var r = 1; r < arguments.length; r++) {
    var t = null != arguments[r] ? arguments[r] : {};
    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
      Object(_defineProperty_js__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(e, r, t[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
    });
  }
  return e;
}


/***/ }),

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


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var $find = __webpack_require__("b727").find;
var addToUnscopables = __webpack_require__("44d2");

var FIND = 'find';
var SKIPS_HOLES = true;

// Shouldn't skip holes
// eslint-disable-next-line es/no-array-prototype-find -- testing
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });

// `Array.prototype.find` method
// https://tc39.es/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);


/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return workFlowStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return unitStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return planStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return statusList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return borrowList; });
/* unused harmony export evaluateStatus */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return riskColor; });
/* unused harmony export riskList */
/* unused harmony export lslList */
/* unused harmony export lsLevel */
/* unused harmony export lecLevel */
/* unused harmony export lssList */
/* unused harmony export leclList */
/* unused harmony export leceList */
/* unused harmony export leccList */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return wordsList; });
// 用于管理枚举字段

// 审批状态
var workFlowStatus = [{
  label: '待提交',
  value: 0,
  type: 'primary'
}, {
  label: '审核中',
  value: 1,
  type: 'warning'
}, {
  label: '已完成',
  value: 2,
  type: 'success'
}, {
  label: '已驳回',
  value: 3,
  type: 'danger'
}];

// 单位入厂状态
var unitStatus = [{
  label: '待入厂',
  value: 0,
  type: 'primary'
}, {
  label: '在厂',
  value: 1,
  type: 'success'
}, {
  label: '已退厂',
  value: 2,
  type: 'danger'
}, {
  label: '黑名单',
  value: 3,
  type: 'danger'
}];

// 危险源辨识计划 计划状态
var planStatus = [{
  label: '待发布',
  value: 0,
  type: 'primary'
}, {
  label: '已发布',
  value: 1,
  type: 'warning'
}, {
  label: '已逾期',
  value: 2,
  type: 'danger'
}, {
  label: '已完成',
  value: 3,
  type: 'success'
}];

// 工器具管理-试验状态
var statusList = [{
  label: '正常',
  value: 0,
  type: 'success'
}, {
  label: '超期未检',
  value: 1,
  type: 'danger'
}, {
  label: '即将到期',
  value: 2,
  type: 'warning'
}, {
  label: '报废',
  value: 3,
  type: 'danger'
}];

// 工器具管理-借用状态
var borrowList = [{
  label: '借用中',
  value: 0,
  type: 'primary'
}, {
  label: '不可借',
  value: 1,
  type: 'danger'
}, {
  label: '可借',
  value: 2,
  type: 'success'
}];

// 评估状态计算
var evaluateStatus = [{
  value: 0,
  label: '待评估',
  type: 'primary'
}, {
  value: 1,
  displayName: '已评估',
  type: 'success'
}, {
  value: 2,
  label: '已逾期',
  type: 'danger'
}, {
  value: 3,
  label: '被驳回',
  type: 'danger'
}];

// 管控级别对应的风险颜色
var riskColor = [{
  value: '重大风险',
  type: '红色'
}, {
  value: '较大风险',
  type: '橙色'
}, {
  value: '一般风险',
  type: '黄色'
}, {
  value: '低风险',
  type: '蓝色'
}];

// 风险等级
var riskList = [{
  label: '重大风险',
  value: 0
}, {
  label: '较大风险',
  value: 1
}, {
  label: '一般风险',
  value: 2
}, {
  label: '低风险',
  value: 3
}];

// 风险等级
var lslList = [{
  label: '企业经常发生此类事故过5分',
  value: 5
}, {
  label: '企业管控措施不足预期发生4分',
  value: 4
}, {
  label: '行业内有发生过此类事故3分',
  value: 3
}, {
  label: '偶尔发生此类事故2分',
  value: 2
}, {
  label: '没有发生过1分',
  value: 1
}];

// 风险等级
var lsLevel = [{
  min: 20,
  max: 25,
  deep: 'A/1级',
  level: '重大风险',
  color: '红色',
  value: 0
}, {
  min: 15,
  max: 16,
  deep: 'B/2级',
  level: '较大风险',
  color: '橙色',
  value: 1
}, {
  min: 9,
  max: 12,
  deep: 'C/3级',
  level: '一般风险',
  color: '黄色',
  value: 2
}, {
  min: 4,
  max: 8,
  deep: 'D/4级',
  level: '低风险',
  color: '蓝色',
  value: 3
}, {
  min: 1,
  max: 3,
  deep: 'E/5级',
  level: '低风险',
  color: '蓝色',
  value: 4
}];

// 风险等级
var lecLevel = [{
  max: 2000000,
  min: 320,
  deep: 'A/1级',
  level: '重大风险',
  color: '红色',
  value: 0
}, {
  min: 160,
  max: 320,
  deep: 'B/2级',
  level: '较大风险',
  color: '橙色',
  value: 1
}, {
  min: 70,
  max: 160,
  deep: 'C/3级',
  level: '一般风险',
  color: '黄色',
  value: 2
}, {
  min: 20,
  max: 70,
  deep: 'D/4级',
  level: '低风险',
  color: '蓝色',
  value: 3
}, {
  min: 0,
  max: 20,
  deep: 'E/5级',
  level: '低风险',
  color: '蓝色',
  value: 4
}];

// 风险等级
var lssList = [{
  label: '人员死亡损失百万以上5分',
  value: 5
}, {
  label: '丧失劳动力损失50万以上4分',
  value: 4
}, {
  label: '轻伤或慢性疾病一万元以上3分',
  value: 3
}, {
  label: '轻微伤一万元以下2分',
  value: 2
}, {
  label: '无伤亡无损失1分',
  value: 1
}];
var leclList = [{
  label: '完全可以预料到会发生10分',
  value: 10
}, {
  label: '相当可能6分',
  value: 6
}, {
  label: '可能，但不经常3分',
  value: 3
}, {
  label: '可能性小，完全意外1分',
  value: 1
}, {
  label: '极不可能0.2分',
  value: 0.2
}, {
  label: '实际不可能0.1分',
  value: 0.1
}];
var leceList = [{
  label: '一日连续暴露10分',
  value: 10
}, {
  label: '每天工作时问内暴露6分',
  value: 6
}, {
  label: '每周一次，或偶然暴露3分',
  value: 3
}, {
  label: '每月一次暴露2分',
  value: 2
}, {
  label: '每年几次暴露1分',
  value: 1
}, {
  label: '非常罕见的暴露0.5分',
  value: 0.5
}];
var leccList = [{
  label: '10人以上死亡造成重大财产损失100分',
  value: 100
}, {
  label: '数人死亡，或造成很大财产损失40分',
  value: 40
}, {
  label: '一人死亡，或造成一定的财产损失15分',
  value: 15
}, {
  label: '严重，重伤，致残，或较小的财产损失7分',
  value: 7
}, {
  label: '轻伤或很小的财产损失3分',
  value: 3
}, {
  label: '无伤亡，不利于基本的安全卫生要求1分',
  value: 1
}];
var wordsList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];

/***/ }),

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


/***/ }),

/***/ "ad0b":
/***/ (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":"44521ab8-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/ShortTermContractorDetail.vue?vue&type=template&id=7601192c&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('el-card',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showPersonForm),expression:"!showPersonForm"}],staticClass:"h-full",attrs:{"body-style":{ height: '100%' }}},[_c('div',{staticClass:"h-full flex flex-col"},[_c('div',{staticClass:"overflow-y-auto overflow-x-hidden flex-auto"},[(['update', 'approve'].includes(_vm.mode))?_c('div',{staticClass:"flex items-center h-32px"},[_c('p',{staticClass:"pl-10px border-l-3px text-18px border-color-primary"},[_vm._v("\n            "+_vm._s(_vm.titleType)+_vm._s(_vm.$t('单位信息'))+"\n          ")])]):_c('el-page-header',{attrs:{"content":("" + _vm.titleType + (_vm.$t('单位信息')))},on:{"back":function($event){return _vm.$router.go(-1)}}}),_c('el-form',{ref:"form",staticClass:"my-20px contractor-form",attrs:{"model":_vm.form,"rules":_vm.rules,"label-width":"150px"}},[_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('承包商单位名称'))),"prop":"name"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.updateMode && !_vm.canEdit},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, "name", $$v)},expression:"form.name"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('承包商单位简称'))),"prop":"abbreviation"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.updateMode && !_vm.canEdit},model:{value:(_vm.form.abbreviation),callback:function ($$v) {_vm.$set(_vm.form, "abbreviation", $$v)},expression:"form.abbreviation"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('在厂周期'))),"prop":"period"}},[_c('el-date-picker',{staticClass:"!w-full",attrs:{"type":"daterange","size":"small","range-separator":"至","start-placeholder":("" + (_vm.$t('开始日期'))),"end-placeholder":("" + (_vm.$t('结束日期'))),"disabled":!_vm.canEdit},model:{value:(_vm.form.period),callback:function ($$v) {_vm.$set(_vm.form, "period", $$v)},expression:"form.period"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('承包商单位负责人'))),"prop":"leaderName"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.canEdit},on:{"blur":_vm.validateLeaderAccount},model:{value:(_vm.form.leaderName),callback:function ($$v) {_vm.$set(_vm.form, "leaderName", $$v)},expression:"form.leaderName"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('联系电话'))),"prop":"phoneNumber"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.canEdit},on:{"blur":_vm.validateLeaderAccount},model:{value:(_vm.form.phoneNumber),callback:function ($$v) {_vm.$set(_vm.form, "phoneNumber", $$v)},expression:"form.phoneNumber"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('个人账号'))),"prop":"leaderAccount"}},[_c('div',{staticClass:"inline-block",attrs:{"slot":"label"},slot:"label"},[_c('el-tooltip',{attrs:{"content":"请联系相关专业主管,确认账号开通格式,否则将无法审批通过","placement":"top","effect":"dark"}},[_c('span',{staticClass:"iconfont icon-bg-circleInfo mr-5px"})]),_c('span',[_vm._v(_vm._s(_vm.$t('个人账号')))])],1),_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.canEdit || _vm.disabledAccount},model:{value:(_vm.form.leaderAccount),callback:function ($$v) {_vm.$set(_vm.form, "leaderAccount", $$v)},expression:"form.leaderAccount"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('身份证号码'))),"prop":"leaderIdCard"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.canEdit},model:{value:(_vm.form.leaderIdCard),callback:function ($$v) {_vm.$set(_vm.form, "leaderIdCard", $$v)},expression:"form.leaderIdCard"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('邮箱'))),"prop":"email"}},[_c('el-input',{attrs:{"placeholder":("" + (_vm.$t('请输入'))),"disabled":!_vm.canEdit},model:{value:(_vm.form.email),callback:function ($$v) {_vm.$set(_vm.form, "email", $$v)},expression:"form.email"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":"所属专业","prop":"ownerdSpecialtyId"}},[_c('el-select',{staticClass:"w-full",attrs:{"filterable":"","placeholder":"请选择所属专业","clearable":"","disabled":!_vm.updateMode && !_vm.canEdit},model:{value:(_vm.form.ownerdSpecialtyId),callback:function ($$v) {_vm.$set(_vm.form, "ownerdSpecialtyId", $$v)},expression:"form.ownerdSpecialtyId"}},_vm._l((_vm.specialtyList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.name,"value":item.id}})}),1)],1)],1)],1)],1),(![0, 2, 3].includes(_vm.form.approvalStatus))?_c('div',{staticClass:"my-20px"},[_c('div',{staticClass:"flex items-center h-32px mb-10px"},[_c('p',{staticClass:"pl-10px border-l-3px text-18px border-color-primary"},[_vm._v("\n              "+_vm._s(_vm.titleType)+_vm._s(_vm.$t('人员信息'))+"\n            ")])]),_c('div',{staticClass:"flex flex-wrap"},[_c('el-input',{staticClass:"w-200px mr-10px mb-10px",attrs:{"clearable":"","size":"small","maxlength":50,"placeholder":("" + (_vm.$t('人员姓名')))},model:{value:(_vm.search.name),callback:function ($$v) {_vm.$set(_vm.search, "name", $$v)},expression:"search.name"}}),_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.searchList}},[_vm._v("搜索")]),_c('el-button',{attrs:{"size":"small"},on:{"click":_vm.reset}},[_vm._v("重置")]),_c('el-button',{attrs:{"size":"small","type":"primary","disabled":_vm.disabledOperation},on:{"click":function($event){return _vm.operate('create')}}},[_vm._v("添加人员")]),_c('el-button',{attrs:{"size":"small","type":"danger","disabled":_vm.disabledOperation},on:{"click":_vm.batchDelete}},[_vm._v("批量删除")]),_c('el-button',{attrs:{"size":"small","disabled":_vm.disabledOperation},on:{"click":_vm.batchImoport}},[_vm._v("导入")]),_c('el-button',{attrs:{"size":"small"},on:{"click":_vm.exportPersonList}},[_vm._v("导出")]),_c('el-button',{attrs:{"size":"small","type":"primary","disabled":_vm.disabledOperation},on:{"click":function($event){return _vm.openApprovalDialog('submit')}}},[_vm._v("一键提交")]),_c('el-button',{attrs:{"size":"small","type":"primary","disabled":_vm.disabledOperation},on:{"click":function($event){return _vm.openApprovalDialog('approval')}}},[_vm._v("一键审批")]),_c('el-button',{attrs:{"size":"small","disabled":_vm.disabledOperation},on:{"click":function($event){return _vm.setBlack(true)}}},[_vm._v("加入黑名单")]),_c('el-button',{attrs:{"size":"small","disabled":_vm.disabledOperation},on:{"click":function($event){return _vm.setBlack(false)}}},[_vm._v("移除黑名单")])],1),_c('el-table',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],ref:"table",staticClass:"mt-10px",attrs:{"data":_vm.tableData,"stripe":"","border":"","row-key":"id"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"60","align":"center","reserve-selection":true}}),_c('el-table-column',{attrs:{"prop":"department","label":("" + (_vm.$t('所属单位'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"name","label":("" + (_vm.$t('姓名'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"phoneNumber","label":("" + (_vm.$t('联系电话'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"projectName","label":("" + (_vm.$t('关联项目'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"gender","label":("" + (_vm.$t('性别'))),"show-overflow-tooltip":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.gender === '1')?_c('span',[_vm._v(_vm._s(_vm.$t('男')))]):(scope.row.gender === '0')?_c('span',[_vm._v(_vm._s(_vm.$t('女')))]):_vm._e()]}}],null,false,199066534)}),_c('el-table-column',{attrs:{"prop":"isTempWork","label":("" + (_vm.$t('是否临时用工'))),"show-overflow-tooltip":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v(_vm._s(scope.row.isTempWork ? _vm.$t('是') : _vm.$t('否')))]}}],null,false,4181028454)}),_c('el-table-column',{attrs:{"prop":"employeeTypeStr","label":("" + (_vm.$t('人员分类'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"postJobCategoryStr","label":("" + (_vm.$t('职务工种'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"isSpecialJob","label":("" + (_vm.$t('是否特种作业'))),"show-overflow-tooltip":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v(_vm._s(scope.row.isSpecialJob ? _vm.$t('是') : _vm.$t('否')))]}}],null,false,992124365)}),_c('el-table-column',{attrs:{"prop":"jobCategoryStr","label":("" + (_vm.$t('工种'))),"show-overflow-tooltip":""}}),_c('el-table-column',{attrs:{"prop":"status","width":"80","label":("" + (_vm.$t('人员状态')))},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-tag',{attrs:{"size":"mini","type":_vm.unitStatusTypes(scope.row.status)}},[_vm._v(_vm._s(scope.row.statusStr))])]}}],null,false,1663676149)}),_c('el-table-column',{attrs:{"prop":"isBlacklist","width":"100","label":("" + (_vm.$t('是否黑名单')))},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.isBlacklist === true)?_c('el-tag',{attrs:{"size":"mini","type":"danger"}},[_vm._v("是")]):(scope.row.isBlacklist === false)?_c('el-tag',{attrs:{"size":"mini","type":"success"}},[_vm._v("否")]):_c('span')]}}],null,false,4231549299)}),_c('el-table-column',{attrs:{"prop":"approvalStatus","width":"80","label":("" + (_vm.$t('流程状态')))},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-tag',{attrs:{"size":"mini","type":_vm.workFlowStatusTypes(scope.row.approvalStatus)}},[_vm._v(_vm._s(scope.row.approvalStatusStr))])]}}],null,false,2377881184)}),_c('el-table-column',{attrs:{"label":"操作","width":"270px","fixed":"right"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('table-operate-button',{key:scope.row.id,attrs:{"buttons":_vm.buttons(scope.row)}})]}}],null,false,4037317850)})],1),_c('el-pagination',{staticClass:"mt-20px text-right",attrs:{"background":"","current-page":_vm.page.pageNo,"page-sizes":[15, 30, 45, 60, 75, 90],"page-size":_vm.page.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.total},on:{"update:currentPage":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"update:current-page":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"size-change":_vm.searchList,"current-change":_vm.findList,"update:pageSize":function($event){return _vm.$set(_vm.page, "pageSize", $event)},"update:page-size":function($event){return _vm.$set(_vm.page, "pageSize", $event)}}})],1):_vm._e()],1),(['update', 'approve'].includes(_vm.mode))?_c('div',{staticClass:"text-center pt-20px border-t-1px border-color-default"},[(_vm.mode === 'update')?_c('el-button',{attrs:{"size":"small","type":"primary","loading":_vm.formBtnLoading},on:{"click":function($event){return _vm.save('save')}}},[_vm._v("保存")]):_vm._e(),(
            ['update', 'approve'].includes(_vm.mode) &&
              ([0, 3].includes(_vm.form.approvalStatus) ||
                ([2].includes(_vm.form.approvalStatus) && _vm.form.taskId))
          )?_c('el-button',{attrs:{"size":"small","type":"primary","loading":_vm.formBtnLoading},on:{"click":function($event){return _vm.save('submit')}}},[_vm._v("提交")]):_vm._e(),(_vm.mode === 'approve' && !_vm.form.isBlackList && [1].includes(_vm.form.approvalStatus))?_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":function($event){_vm.approvalDialog = true}}},[_vm._v(_vm._s(_vm.$t('审批')))]):_vm._e(),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){return _vm.$router.go(-1)}}},[_vm._v(_vm._s(_vm.$t('取消')))])],1):_vm._e()]),(_vm.approvalFlowDialog)?_c('ApprovalFlowDialog',{attrs:{"visible":_vm.approvalFlowDialog,"id":_vm.flowTaskId},on:{"update:visible":function($event){_vm.approvalFlowDialog=$event},"cancel":function($event){_vm.approvalFlowDialog = false}}}):_vm._e(),_c('ApprovalDialog',{attrs:{"visible":_vm.approvalDialog,"loading":_vm.approvalLoading},on:{"update:visible":function($event){_vm.approvalDialog=$event},"submit":_vm.submitApproval}})],1),(_vm.showPersonForm)?_c('ShortTermContractorPerson',{attrs:{"formMode":_vm.formMode,"formId":_vm.formId,"formContractorId":_vm.form.id},on:{"back":_vm.backToForm}}):_vm._e(),_c('wiz-upload-file',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{"uploadFileProps":_vm.uploadFileProps},on:{"exportTemplate":_vm.exportTemplate,"importTemplate":_vm.importTemplate,"exportResults":_vm.exportResults}}),_c('ShortTermBatchApprovalDialog',{attrs:{"visible":_vm.batchApprovalVisible,"type":_vm.dialogType,"contractorId":_vm.form.id},on:{"update:visible":function($event){_vm.batchApprovalVisible=$event},"finished":_vm.searchList}}),_c('el-dialog',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"mini-dialog",attrs:{"close-on-click-modal":false,"title":"加入黑名单","visible":_vm.dialogBlackShow},on:{"update:visible":function($event){_vm.dialogBlackShow=$event}}},[_c('el-form',{ref:"formBlack",attrs:{"label-width":"150px","rules":_vm.rulesForm,"model":_vm.formBlack}},[_c('el-form-item',{attrs:{"label":"评价等级","prop":"evaluationlevel"}},[_c('el-rate',{staticClass:"!leading-loose",attrs:{"show-text":""},model:{value:(_vm.formBlack.evaluationlevel),callback:function ($$v) {_vm.$set(_vm.formBlack, "evaluationlevel", $$v)},expression:"formBlack.evaluationlevel"}})],1),_c('el-form-item',{attrs:{"label":"评价意见","prop":"evaluationOpinions"}},[_c('el-input',{attrs:{"type":"textarea","rows":4,"maxlength":"500","show-word-limit":"","placeholder":"请填写评价意见"},model:{value:(_vm.formBlack.evaluationOpinions),callback:function ($$v) {_vm.$set(_vm.formBlack, "evaluationOpinions", $$v)},expression:"formBlack.evaluationOpinions"}})],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","loading":_vm.saveLoading},on:{"click":_vm.saveBlackList}},[_vm._v("确定")]),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.dialogBlackShow = false}}},[_vm._v("取消")])],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/contractor-management-sm/views/ShortTermContractorDetail.vue?vue&type=template&id=7601192c&scoped=true

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

// 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.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.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// 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/es.string.search.js
var es_string_search = __webpack_require__("841c");

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

// EXTERNAL MODULE: ./node_modules/@wiz-api/team-management/lib/team-management.umd.js
var team_management_umd = __webpack_require__("88c7");

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

// EXTERNAL MODULE: ./node_modules/@wiz-api/account/lib/account.umd.js
var account_umd = __webpack_require__("32d0");

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

// 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: ./src/assets/js/CommonDownload.js
var CommonDownload = __webpack_require__("d6fb");

// EXTERNAL MODULE: external "_"
var external_ = __webpack_require__("60bb");

// EXTERNAL MODULE: ./src/assets/js/safety/ClearPlaceholder.js
var ClearPlaceholder = __webpack_require__("5180");

// EXTERNAL MODULE: ./src/components/safety/enumField/enumTypeMethods.js
var enumTypeMethods = __webpack_require__("21d8");

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














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










var specialtyApi = new team_management_umd["SpecialtyApi"]();
var periodContractorApi = new contractor_management_umd["PeriodContractorApi"]();
var periodContractorPersonnelApi = new contractor_management_umd["PeriodContractorPersonnelApi"]();
var eafAccountApi = new account_umd["EafAccountApi"]();
var eafUserApi = new account_umd["EafUserApi"]();
var eafUserQueryApi = new account_umd["EafUserQueryApi"]();
var fileApi = new file_management_umd["FileApi"]();
var ApprovalFlowDialog = function ApprovalFlowDialog() {
  return Promise.all(/* import() */[__webpack_require__.e(3), __webpack_require__.e(36)]).then(__webpack_require__.bind(null, "dfed"));
};
var ApprovalDialog = function ApprovalDialog() {
  return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "c592"));
};
var ShortTermContractorPerson = function ShortTermContractorPerson() {
  return Promise.all(/* import() */[__webpack_require__.e(2), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, "1633"));
};
var TableOperateButton = function TableOperateButton() {
  return __webpack_require__.e(/* import() */ 12).then(__webpack_require__.bind(null, "f22d"));
};
var ShortTermBatchApprovalDialog = function ShortTermBatchApprovalDialog() {
  return __webpack_require__.e(/* import() */ 44).then(__webpack_require__.bind(null, "bd62"));
};
/* harmony default export */ var ShortTermContractorDetailvue_type_script_lang_js = ({
  components: {
    ApprovalFlowDialog: ApprovalFlowDialog,
    ApprovalDialog: ApprovalDialog,
    ShortTermContractorPerson: ShortTermContractorPerson,
    TableOperateButton: TableOperateButton,
    ShortTermBatchApprovalDialog: ShortTermBatchApprovalDialog
  },
  data: function data() {
    return {
      search: {
        name: ''
      },
      form: {
        isBlackList: false,
        period: []
      },
      formBtnLoading: false,
      rules: {
        name: [{
          required: true
        }],
        abbreviation: [{
          required: true
        }],
        leaderName: [{
          required: true
        }],
        phoneNumber: [{
          required: true
        }],
        leaderAccount: [{
          required: true
        }],
        period: [{
          required: true
        }],
        ownerdSpecialtyId: [{
          required: true
        }]
      },
      specialtyList: [],
      tableData: [],
      flowTaskId: null,
      approvalFlowDialog: false,
      page: {
        pageNo: 1,
        pageSize: 15
      },
      total: 0,
      loading: false,
      showPersonForm: false,
      formMode: '',
      formId: '',
      approvalDialog: false,
      approvalLoading: false,
      uploadFileProps: {
        visible: false,
        // 是否开启弹窗
        active: 0,
        // 目前状态页面0为下载模板 1为上传模板 2为完成
        btnLoading: false,
        // 按钮加载状态
        isTestAndVerify: true,
        // 是否开启校验格式
        type: ['xlsx', 'xls'],
        // 检验文件格式，为数组可传多种同类型格式
        successCount: 0,
        // 上传成功条数
        failureCount: 0,
        // 上传失败条数
        resultFile: '' // 导入结果id，下载导入结果时需要使用
      },
      selection: [],
      batchApprovalVisible: false,
      dialogType: '',
      dialogBlackShow: false,
      rulesForm: {
        evaluationlevel: [{
          required: true,
          message: '请选择评价等级',
          trigger: ['blur', 'change']
        }]
      },
      formBlack: {
        evaluationOpinions: ''
      },
      saveLoading: false,
      disabledAccount: false
    };
  },
  computed: {
    unitStatusTypes: function unitStatusTypes() {
      return function (val) {
        return Object(enumTypeMethods["c" /* unitStatusTypes */])(val);
      };
    },
    currentUser: function currentUser() {
      var userInfo = Wiz.AuthHooks.GetUserInfo();
      return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.profile) || {};
    },
    mode: function mode() {
      return this.$route.query.mode;
    },
    disabledOperation: function disabledOperation() {
      return ['read', 'approve'].includes(this.mode) || this.form.isBlackList;
    },
    updateMode: function updateMode() {
      return ['update'].includes(this.mode);
    },
    canEdit: function canEdit() {
      return ['approve'].includes(this.mode) && this.form.approvalStatus === 2;
    },
    titleType: function titleType() {
      var modeObj = {
        create: '新增',
        update: '编辑',
        read: '查看',
        approve: '查看'
      };
      return "".concat(this.$t("".concat(modeObj[this.mode])));
    },
    workFlowStatusTypes: function workFlowStatusTypes() {
      return function (val) {
        var type = '';
        switch (val) {
          case 0:
            type = 'primary';
            break;
          case 1:
            type = 'warning';
            break;
          case 9:
            type = 'success';
            break;
          default:
            type = 'danger';
            break;
        }
        return type;
      };
    },
    buttons: function buttons() {
      var _this = this;
      return function (val) {
        return [{
          text: '查看',
          click: function click() {
            return _this.operate('read', val);
          },
          isShow: true
        }, {
          text: '编辑',
          click: function click() {
            return _this.operate('update', val);
          },
          // 流程状态不为审核中和已完成或者已完成是承包商负责人、非黑名单
          isShow: (![1, 9].includes(val.approvalStatus) || val.approvalStatus === 9 && val.type === 0) && !val.isBlacklist && !_this.disabledOperation
        }, {
          text: '删除',
          click: function click() {
            return _this.deleteData(val);
          },
          // 流程状态不为审核中和已完成，不为承包商负责人
          isShow: ![1, 9].includes(val.approvalStatus) && !_this.disabledOperation && val.type !== 0
        }, {
          text: '提交',
          click: function click() {
            return _this.operate('submit', val);
          },
          // 待提交、被驳回（只有提交人能再次提交）、已撤回状态和非黑名单下能提交
          isShow: ([0, 3].includes(val.approvalStatus) || [2].includes(val.approvalStatus) && val.taskId) && !val.isBlacklist && !_this.disabledOperation
        }, {
          text: '审批',
          click: function click() {
            return _this.operate('approve', val);
          },
          // 是下一审批人且流程状态为审核中
          isShow: val.oprateCode === '001' && [1].includes(val.approvalStatus) && !_this.disabledOperation
        }, {
          text: '撤回',
          click: function click() {
            return _this.operate('withdraw', val);
          },
          // 流程状态为审核中
          isShow: [1].includes(val.approvalStatus) && !val.isBlacklist && !_this.disabledOperation && val.activeRevocation === 1
        }, {
          text: '查看流程',
          click: function click() {
            return _this.handleFlow(val);
          },
          isShow: val.flowTaskId
        }, {
          text: '重置密码',
          click: function click() {
            return _this.resetPassword(val);
          },
          // 流程状态为已完成且非黑名单
          isShow: [9].includes(val.approvalStatus) && !val.isBlacklist && !_this.disabledOperation
        }, {
          text: '解锁账号',
          click: function click() {
            return _this.unlockUser(val);
          },
          // 流程状态为已完成且
          isShow: [9].includes(val.approvalStatus) && _this.updateMode
        }];
      };
    }
  },
  methods: {
    validateLeaderAccount: function validateLeaderAccount() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$eafUserQueryAp, _yield$eafUserQueryAp2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _this2.disabledAccount = false;
              if (!(_this2.form.leaderName && _this2.form.phoneNumber)) {
                _context.next = 9;
                break;
              }
              _context.next = 4;
              return eafUserQueryApi.getEafUserByNameAndPhone({
                name: _this2.form.leaderName,
                phone: _this2.form.phoneNumber
              });
            case 4:
              _yield$eafUserQueryAp = _context.sent;
              _yield$eafUserQueryAp2 = Object(slicedToArray["a" /* default */])(_yield$eafUserQueryAp, 2);
              err = _yield$eafUserQueryAp2[0];
              res = _yield$eafUserQueryAp2[1];
              if (!err && res) {
                _this2.$set(_this2.form, 'leaderAccount', res.userName);
                _this2.$set(_this2.form, 'leaderId', res.id);
                _this2.disabledAccount = true;
              }
            case 9:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    operate: function operate(type, row) {
      var _this3 = this;
      switch (type) {
        case 'create':
          this.showPersonForm = true;
          this.formMode = 'create';
          break;
        case 'update':
        case 'read':
        case 'approve':
          this.showPersonForm = true;
          this.formMode = type;
          this.formId = row.id;
          break;
        case 'submit':
          this.$confirm('是否确认提交当前记录？', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
            var apiRes;
            return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  _this3.loading = true;
                  apiRes = [];
                  if (!(row.approvalStatus === 2)) {
                    _context2.next = 8;
                    break;
                  }
                  _context2.next = 5;
                  return periodContractorPersonnelApi.approve({
                    body: {
                      id: row.id,
                      isPass: true,
                      approve: '',
                      taskId: row.taskId
                    }
                  });
                case 5:
                  apiRes = _context2.sent;
                  _context2.next = 11;
                  break;
                case 8:
                  _context2.next = 10;
                  return periodContractorPersonnelApi.submit_0(row.id);
                case 10:
                  apiRes = _context2.sent;
                case 11:
                  if (!apiRes[0]) {
                    _this3.$message.success('提交成功！');
                    _this3.findList();
                  } else {
                    _this3.loading = false;
                  }
                case 12:
                case "end":
                  return _context2.stop();
              }
            }, _callee2);
          }))).catch(function () {});
          break;
        case 'withdraw':
          this.$confirm('是否确认撤回当前记录？', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
            var _yield$periodContract, _yield$periodContract2, err;
            return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  _this3.loading = true;
                  _context3.next = 3;
                  return periodContractorPersonnelApi.approve({
                    body: {
                      id: row.id,
                      isPass: true,
                      approve: '',
                      taskId: row.flowTaskId,
                      isRevocation: true
                    }
                  });
                case 3:
                  _yield$periodContract = _context3.sent;
                  _yield$periodContract2 = Object(slicedToArray["a" /* default */])(_yield$periodContract, 1);
                  err = _yield$periodContract2[0];
                  if (!err) {
                    _this3.$message.success('撤回成功！');
                    _this3.findList();
                  } else {
                    _this3.loading = false;
                  }
                case 7:
                case "end":
                  return _context3.stop();
              }
            }, _callee3);
          }))).catch(function () {});
          break;
        default:
          break;
      }
    },
    backToForm: function backToForm() {
      this.showPersonForm = false;
      this.searchList();
    },
    deleteData: function deleteData(row) {
      var _this4 = this;
      if (row.type === 0) {
        this.$message.warning('不允许删除承包商负责人数据！');
        return;
      }
      this.$confirm('是否确定删除？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee4() {
        var _yield$periodContract3, _yield$periodContract4, err;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              _context4.next = 2;
              return periodContractorPersonnelApi.callDelete(row.id);
            case 2:
              _yield$periodContract3 = _context4.sent;
              _yield$periodContract4 = Object(slicedToArray["a" /* default */])(_yield$periodContract3, 1);
              err = _yield$periodContract4[0];
              if (!err) {
                _this4.$message.success('删除成功！');
                _this4.searchList();
              }
            case 6:
            case "end":
              return _context4.stop();
          }
        }, _callee4);
      }))).catch(function () {});
    },
    // 重置密码
    resetPassword: function resetPassword(row) {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee6() {
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee6$(_context6) {
          while (1) switch (_context6.prev = _context6.next) {
            case 0:
              _this5.$confirm('是否确认重置密码？', '重置密码', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee5() {
                var _yield$eafAccountApi$, _yield$eafAccountApi$2, err;
                return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee5$(_context5) {
                  while (1) switch (_context5.prev = _context5.next) {
                    case 0:
                      _context5.next = 2;
                      return eafAccountApi.clearPasswordToDefault({
                        body: {
                          userId: row.userId
                        }
                      });
                    case 2:
                      _yield$eafAccountApi$ = _context5.sent;
                      _yield$eafAccountApi$2 = Object(slicedToArray["a" /* default */])(_yield$eafAccountApi$, 1);
                      err = _yield$eafAccountApi$2[0];
                      if (!err) {
                        _this5.$message.success('重置密码成功');
                      }
                    case 6:
                    case "end":
                      return _context5.stop();
                  }
                }, _callee5);
              }))).catch(function () {});
            case 1:
            case "end":
              return _context6.stop();
          }
        }, _callee6);
      }))();
    },
    unlockUser: function unlockUser(row) {
      var _this6 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee7() {
        var _yield$eafUserApi$unl, _yield$eafUserApi$unl2, err;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee7$(_context7) {
          while (1) switch (_context7.prev = _context7.next) {
            case 0:
              _context7.next = 2;
              return eafUserApi.unlockUser({
                userId: row.userId
              });
            case 2:
              _yield$eafUserApi$unl = _context7.sent;
              _yield$eafUserApi$unl2 = Object(slicedToArray["a" /* default */])(_yield$eafUserApi$unl, 1);
              err = _yield$eafUserApi$unl2[0];
              if (!err) {
                _this6.$message.success('账号已成功解锁!');
                _this6.findList();
              }
            case 6:
            case "end":
              return _context7.stop();
          }
        }, _callee7);
      }))();
    },
    // 查看流程
    handleFlow: function handleFlow(row) {
      this.flowTaskId = row.flowTaskId;
      if (typeof this.flowTaskId === 'string' && _.includes(this.flowTaskId, '-')) {
        window.wiz.OpenWorkFlowDesignByFlowId(this.flowTaskId);
      } else {
        this.approvalFlowDialog = true;
      }
    },
    searchList: function searchList() {
      this.page.pageNo = 1;
      this.findList();
    },
    findList: function findList() {
      var _this7 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee8() {
        var _yield$periodContract5, _yield$periodContract6, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee8$(_context8) {
          while (1) switch (_context8.prev = _context8.next) {
            case 0:
              _this7.$refs.table && _this7.$refs.table.clearSelection();
              _this7.selection = [];
              _this7.loading = true;
              _context8.next = 5;
              return periodContractorPersonnelApi.pagedListQuery(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this7.search), {}, {
                skipCount: (_this7.page.pageNo - 1) * _this7.page.pageSize,
                maxResultCount: _this7.page.pageSize,
                contractorId: _this7.form.id
              }));
            case 5:
              _yield$periodContract5 = _context8.sent;
              _yield$periodContract6 = Object(slicedToArray["a" /* default */])(_yield$periodContract5, 2);
              err = _yield$periodContract6[0];
              res = _yield$periodContract6[1];
              if (!err) {
                _this7.tableData = res.items;
                _this7.total = res.totalCount;
              }
              _this7.loading = false;
            case 11:
            case "end":
              return _context8.stop();
          }
        }, _callee8);
      }))();
    },
    reset: function reset() {
      this.search = this.$options.data().search;
      this.searchList();
    },
    getSpecialtyList: function getSpecialtyList() {
      var _this8 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee9() {
        var _yield$specialtyApi$g, _yield$specialtyApi$g2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee9$(_context9) {
          while (1) switch (_context9.prev = _context9.next) {
            case 0:
              _context9.next = 2;
              return specialtyApi.getSpecialtyDropDown();
            case 2:
              _yield$specialtyApi$g = _context9.sent;
              _yield$specialtyApi$g2 = Object(slicedToArray["a" /* default */])(_yield$specialtyApi$g, 2);
              err = _yield$specialtyApi$g2[0];
              res = _yield$specialtyApi$g2[1];
              if (!err) {
                _this8.specialtyList = res;
                _this8.specialtyList.unshift({
                  id: '00000000-0000-0000-0000-000000000000',
                  name: '无专业'
                });
              }
            case 7:
            case "end":
              return _context9.stop();
          }
        }, _callee9);
      }))();
    },
    getDetail: function getDetail() {
      var _this9 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee10() {
        var _yield$periodContract7, _yield$periodContract8, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee10$(_context10) {
          while (1) switch (_context10.prev = _context10.next) {
            case 0:
              _context10.next = 2;
              return periodContractorApi.getInfo(_this9.$route.query.id);
            case 2:
              _yield$periodContract7 = _context10.sent;
              _yield$periodContract8 = Object(slicedToArray["a" /* default */])(_yield$periodContract7, 2);
              err = _yield$periodContract8[0];
              res = _yield$periodContract8[1];
              if (!err) {
                _this9.form = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, res), {}, {
                  period: [dayjs_min_default()(res.startDate).format('YYYY-MM-DD'), dayjs_min_default()(res.endDate).format('YYYY-MM-DD')]
                });
                _this9.validateLeaderAccount();
                _this9.searchList();
              }
            case 7:
            case "end":
              return _context10.stop();
          }
        }, _callee10);
      }))();
    },
    save: function save(type) {
      var _this10 = this;
      this.$refs.form.validate(/*#__PURE__*/function () {
        var _ref5 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee11(valid) {
          var apiRes, msgType, body;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee11$(_context11) {
            while (1) switch (_context11.prev = _context11.next) {
              case 0:
                if (!valid) {
                  _context11.next = 28;
                  break;
                }
                _this10.formBtnLoading = true;
                apiRes = [];
                msgType = '';
                body = Object(external_["cloneDeep"])(_this10.form);
                body.startDate = dayjs_min_default()(_this10.form.period[0]).format('YYYY-MM-DD 00:00:00');
                body.endDate = dayjs_min_default()(_this10.form.period[1]).format('YYYY-MM-DD 23:59:59');
                if (!(type === 'submit')) {
                  _context11.next = 22;
                  break;
                }
                msgType = '提交';
                // 驳回调审批接口
                if (!(_this10.form.approvalStatus === 2)) {
                  _context11.next = 17;
                  break;
                }
                _context11.next = 12;
                return periodContractorApi.update(_this10.form.id, {
                  body: body
                });
              case 12:
                _context11.next = 14;
                return periodContractorApi[_this10.form.isDelay ? 'delayApprove' : 'approve']({
                  body: {
                    id: _this10.form.id,
                    isPass: true,
                    approve: '',
                    taskId: _this10.form.taskId
                  }
                });
              case 14:
                apiRes = _context11.sent;
                _context11.next = 20;
                break;
              case 17:
                _context11.next = 19;
                return periodContractorApi.submit({
                  body: body
                });
              case 19:
                apiRes = _context11.sent;
              case 20:
                _context11.next = 26;
                break;
              case 22:
                msgType = '编辑';
                _context11.next = 25;
                return periodContractorApi.update(_this10.form.id, {
                  body: body
                });
              case 25:
                apiRes = _context11.sent;
              case 26:
                _this10.formBtnLoading = false;
                if (!apiRes[0]) {
                  _this10.$message.success("".concat(msgType, "\u6210\u529F\uFF01"));
                  _this10.$router.go(-1);
                }
              case 28:
              case "end":
                return _context11.stop();
            }
          }, _callee11);
        }));
        return function (_x) {
          return _ref5.apply(this, arguments);
        };
      }());
    },
    submitApproval: function submitApproval(data) {
      var _this11 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee12() {
        var _yield$periodContract9, _yield$periodContract10, err;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee12$(_context12) {
          while (1) switch (_context12.prev = _context12.next) {
            case 0:
              _this11.approvalLoading = true;
              _context12.next = 3;
              return periodContractorApi[_this11.form.isDelay ? 'delayApprove' : 'approve']({
                body: {
                  id: _this11.form.id,
                  isPass: data.isPass,
                  approve: data.opinion,
                  taskId: _this11.form.taskId
                }
              });
            case 3:
              _yield$periodContract9 = _context12.sent;
              _yield$periodContract10 = Object(slicedToArray["a" /* default */])(_yield$periodContract9, 1);
              err = _yield$periodContract10[0];
              _this11.approvalLoading = false;
              if (!err) {
                _this11.approvalDialog = false;
                _this11.$message.success('审批成功！');
                _this11.$router.go(-1);
              }
            case 8:
            case "end":
              return _context12.stop();
          }
        }, _callee12);
      }))();
    },
    // 人员导入
    batchImoport: function batchImoport() {
      this.uploadFileProps.active = 0;
      this.uploadFileProps.visible = true;
    },
    // 下载模板
    exportTemplate: function exportTemplate() {
      var _this12 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee13() {
        var _yield$periodContract11, _yield$periodContract12, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee13$(_context13) {
          while (1) switch (_context13.prev = _context13.next) {
            case 0:
              _context13.next = 2;
              return periodContractorPersonnelApi.importFromExcelTemplateFile();
            case 2:
              _yield$periodContract11 = _context13.sent;
              _yield$periodContract12 = Object(slicedToArray["a" /* default */])(_yield$periodContract11, 2);
              err = _yield$periodContract12[0];
              res = _yield$periodContract12[1];
              if (!err) {
                Object(CommonDownload["a" /* download */])('短期承包商人员导入模板.xlsx', res, 'application/octet-stream');
                _this12.$message({
                  showClose: true,
                  message: '模板下载成功',
                  type: 'success'
                });
              }
            case 7:
            case "end":
              return _context13.stop();
          }
        }, _callee13);
      }))();
    },
    // 上传文件
    importTemplate: function importTemplate(file) {
      var _this13 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee14() {
        var formData, _yield$periodContract13, _yield$periodContract14, err, res, _res$data, _res$data2, _res$data3;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee14$(_context14) {
          while (1) switch (_context14.prev = _context14.next) {
            case 0:
              _this13.uploadFileProps.btnLoading = true;
              formData = new FormData();
              _.forIn({
                file: file
              }, function (value, key) {
                formData.append('input', value);
              });
              _context14.next = 5;
              return periodContractorPersonnelApi.importFromExcelFile({
                file: formData.get('input'),
                contractorId: _this13.form.id
              });
            case 5:
              _yield$periodContract13 = _context14.sent;
              _yield$periodContract14 = Object(slicedToArray["a" /* default */])(_yield$periodContract13, 2);
              err = _yield$periodContract14[0];
              res = _yield$periodContract14[1];
              if (!err) {
                if (res.code === 1) {
                  _this13.uploadFileProps.successCount = (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.numberSuccesses;
                  _this13.uploadFileProps.failureCount = (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.numberFailures;
                  // 如需兼容老样式，则resultFile字段为空或者不设置皆可
                  _this13.uploadFileProps.resultFile = (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.fileId;
                  _this13.uploadFileProps.active = 2;
                  _this13.searchList();
                } else {
                  _this13.$message({
                    showClose: true,
                    message: res.msg,
                    type: 'error'
                  });
                }
              }
              _this13.uploadFileProps.btnLoading = false;
            case 11:
            case "end":
              return _context14.stop();
          }
        }, _callee14);
      }))();
    },
    exportResults: function exportResults() {
      var _this14 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee15() {
        var _yield$fileApi$downlo, _yield$fileApi$downlo2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee15$(_context15) {
          while (1) switch (_context15.prev = _context15.next) {
            case 0:
              _context15.next = 2;
              return fileApi.download(_this14.uploadFileProps.resultFile, {
                returnType: 'Blob'
              });
            case 2:
              _yield$fileApi$downlo = _context15.sent;
              _yield$fileApi$downlo2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$downlo, 2);
              err = _yield$fileApi$downlo2[0];
              res = _yield$fileApi$downlo2[1];
              if (!err) {
                Object(CommonDownload["a" /* download */])('短期承包商人员导入结果.xlsx', res, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
              }
            case 7:
            case "end":
              return _context15.stop();
          }
        }, _callee15);
      }))();
    },
    handleSelectionChange: function handleSelectionChange(selection) {
      this.selection = selection;
    },
    // 导出
    exportPersonList: function exportPersonList() {
      var _this15 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee16() {
        var _yield$periodContract15, _yield$periodContract16, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee16$(_context16) {
          while (1) switch (_context16.prev = _context16.next) {
            case 0:
              if (!(_this15.selection.length === 0)) {
                _context16.next = 3;
                break;
              }
              _this15.$message.warning('请选择需要导出的人员数据！');
              return _context16.abrupt("return");
            case 3:
              _context16.next = 5;
              return periodContractorPersonnelApi.exportToExcelFile({
                body: {
                  contractorId: _this15.form.id,
                  ids: Object(external_["map"])(_this15.selection, 'id')
                }
              });
            case 5:
              _yield$periodContract15 = _context16.sent;
              _yield$periodContract16 = Object(slicedToArray["a" /* default */])(_yield$periodContract15, 2);
              err = _yield$periodContract16[0];
              res = _yield$periodContract16[1];
              if (!err) {
                Object(CommonDownload["a" /* download */])('短期承包商人员导出.xlsx', res, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
                _this15.$message({
                  showClose: true,
                  message: '下载成功',
                  type: 'success'
                });
              }
            case 10:
            case "end":
              return _context16.stop();
          }
        }, _callee16);
      }))();
    },
    // 批量删除
    batchDelete: function batchDelete() {
      var _this16 = this;
      if (this.selection.length === 0) {
        this.$message.warning('请勾选数据！');
        return;
      }
      var filterApproval = this.selection.find(function (item) {
        return [1].includes(item.approvalStatus);
      });
      if (filterApproval) {
        this.$message.warning('所选数据包含审核中的数据！');
        return;
      }
      var filterStatus = this.selection.find(function (item) {
        return [1].includes(item.status);
      });
      if (filterStatus) {
        this.$message.warning('所选数据包含在厂状态的数据！');
        return;
      }
      var filterLeader = this.selection.find(function (item) {
        return item.type === 0;
      });
      if (filterLeader) {
        this.$message.warning('所选数据包含承包商负责人！');
        return;
      }
      this.$confirm('是否确定删除？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee17() {
        var _yield$periodContract17, _yield$periodContract18, err;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee17$(_context17) {
          while (1) switch (_context17.prev = _context17.next) {
            case 0:
              _context17.next = 2;
              return periodContractorPersonnelApi.deleteMany({
                ids: Object(external_["map"])(_this16.selection, 'id')
              });
            case 2:
              _yield$periodContract17 = _context17.sent;
              _yield$periodContract18 = Object(slicedToArray["a" /* default */])(_yield$periodContract17, 1);
              err = _yield$periodContract18[0];
              if (!err) {
                _this16.$message.success('删除成功！');
                _this16.searchList();
              }
            case 6:
            case "end":
              return _context17.stop();
          }
        }, _callee17);
      }))).catch(function () {});
    },
    openApprovalDialog: function openApprovalDialog(type) {
      this.dialogType = type;
      this.batchApprovalVisible = true;
    },
    setBlack: function setBlack(isBlack) {
      var _this$selection,
        _this17 = this;
      if (((_this$selection = this.selection) === null || _this$selection === void 0 ? void 0 : _this$selection.length) === 0) {
        this.$message.warning('请选择记录');
        return;
      }
      if (isBlack) {
        var filterData = Object(external_["filter"])(this.selection, function (item) {
          return item.isBlacklist;
        });
        if (filterData.length > 0) {
          this.$message.warning('请选择非黑名单记录');
          return;
        }
        // 加入黑名单
        this.dialogBlackShow = true;
        this.$nextTick(function () {
          _this17.$refs.formBlack.resetFields();
        });
      } else {
        var _filterData = Object(external_["filter"])(this.selection, function (item) {
          return !item.isBlacklist;
        });
        if (_filterData.length > 0) {
          this.$message.warning('请选择黑名单记录');
          return;
        }
        this.$confirm('确认移除黑名单？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(/*#__PURE__*/Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee18() {
          var _yield$periodContract19, _yield$periodContract20, err;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee18$(_context18) {
            while (1) switch (_context18.prev = _context18.next) {
              case 0:
                _context18.next = 2;
                return periodContractorPersonnelApi.moveOutBlacklist({
                  body: Object(external_["map"])(_this17.selection, 'id')
                });
              case 2:
                _yield$periodContract19 = _context18.sent;
                _yield$periodContract20 = Object(slicedToArray["a" /* default */])(_yield$periodContract19, 1);
                err = _yield$periodContract20[0];
                if (!err) {
                  _this17.$message.success('移除黑名单成功！');
                  _this17.findList();
                }
              case 6:
              case "end":
                return _context18.stop();
            }
          }, _callee18);
        }))).catch(function () {});
      }
    },
    saveBlackList: function saveBlackList() {
      var _this18 = this;
      this.$refs.formBlack.validate(/*#__PURE__*/function () {
        var _ref8 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee19(valid) {
          var _yield$periodContract21, _yield$periodContract22, err;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee19$(_context19) {
            while (1) switch (_context19.prev = _context19.next) {
              case 0:
                if (!valid) {
                  _context19.next = 9;
                  break;
                }
                _this18.saveLoading = true;
                _context19.next = 4;
                return periodContractorPersonnelApi.moveToBlacklist({
                  body: Object(external_["map"])(_this18.selection, function (item) {
                    return {
                      id: item.id,
                      appraiseGrade: _this18.formBlack.evaluationlevel,
                      appraiseOpinion: _this18.formBlack.evaluationOpinions
                    };
                  })
                });
              case 4:
                _yield$periodContract21 = _context19.sent;
                _yield$periodContract22 = Object(slicedToArray["a" /* default */])(_yield$periodContract21, 1);
                err = _yield$periodContract22[0];
                _this18.saveLoading = false;
                if (!err) {
                  _this18.$message.success('设置黑名单成功！');
                  _this18.dialogBlackShow = false;
                  _this18.findList();
                }
              case 9:
              case "end":
                return _context19.stop();
            }
          }, _callee19);
        }));
        return function (_x2) {
          return _ref8.apply(this, arguments);
        };
      }());
    }
  },
  mounted: function mounted() {
    var _this19 = this;
    return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee20() {
      return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee20$(_context20) {
        while (1) switch (_context20.prev = _context20.next) {
          case 0:
            Object(ClearPlaceholder["a" /* default */])('.contractor-form');
            _context20.next = 3;
            return _this19.getSpecialtyList();
          case 3:
            _context20.next = 5;
            return _this19.getDetail();
          case 5:
          case "end":
            return _context20.stop();
        }
      }, _callee20);
    }))();
  }
});
// CONCATENATED MODULE: ./src/modules/contractor-management-sm/views/ShortTermContractorDetail.vue?vue&type=script&lang=js
 /* harmony default export */ var views_ShortTermContractorDetailvue_type_script_lang_js = (ShortTermContractorDetailvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

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





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  views_ShortTermContractorDetailvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "7601192c",
  null
  
)

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

/***/ }),

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


/***/ }),

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

"use strict";

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

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("53ca");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.to-primitive.js
var es_symbol_to_primitive = __webpack_require__("8172");

// 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.date.to-primitive.js
var es_date_to_primitive = __webpack_require__("efec");

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

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





function toPrimitive(t, r) {
  if ("object" != Object(esm_typeof["a" /* default */])(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != Object(esm_typeof["a" /* default */])(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

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


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == Object(esm_typeof["a" /* default */])(i) ? i : i + "";
}

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

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var toObject = __webpack_require__("7b0b");
var nativeKeys = __webpack_require__("df75");
var fails = __webpack_require__("d039");

var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  keys: function keys(it) {
    return nativeKeys(toObject(it));
  }
});


/***/ }),

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

"use strict";
/* unused harmony export downLoadExcel */
/* unused harmony export downloadBlob */
/* unused harmony export downloadFile */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return download; });
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e260");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("3ca3");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ddb0");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2b3d");
/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_web_url_to_json_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("bf19");
/* harmony import */ var core_js_modules_web_url_to_json_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_to_json_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("9861");
/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("88a7");
/* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("271a");
/* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("5494");
/* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9__);










/*
 * @Author:
 * @LastEditTime: 2022-01-10 14:41:15
 * @Description:公共下载方法
 */
var downLoadExcel = function downLoadExcel() {
  var fileName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '下载文件';
  var data = arguments.length > 1 ? arguments[1] : undefined;
  var blob = new Blob([data], {
    type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  });
  var link = document.createElement('a');
  link.href = window.URL.createObjectURL(blob);
  link.download = "".concat(fileName);
  link.click();
  window.URL.revokeObjectURL(link.href);
};
var downloadBlob = function downloadBlob(data) {
  var blob = new Blob([data], {
    type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  });
  var link = document.createElement('a');
  link.href = window.URL.createObjectURL(blob);
  link.download = '下载文件';
  link.click();
  window.URL.revokeObjectURL(link.href);
};
var downloadFile = function downloadFile(fileName, content) {
  var blob = new Blob([content], {
    type: 'application/vnd.ms-excel'
  });
  var url = window.URL.createObjectURL(blob);
  window.open(url, '_blank');
};
var download = function download() {
  var fileName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '下载文件';
  var data = arguments.length > 1 ? arguments[1] : undefined;
  var type = arguments.length > 2 ? arguments[2] : undefined;
  var blob = new Blob([data], {
    type: type
  });
  var link = document.createElement('a');
  link.href = window.URL.createObjectURL(blob);
  link.download = "".concat(fileName);
  link.click();
  window.URL.revokeObjectURL(link.href);
};


/***/ }),

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


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var DESCRIPTORS = __webpack_require__("83ab");
var ownKeys = __webpack_require__("56ef");
var toIndexedObject = __webpack_require__("fc6a");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var createProperty = __webpack_require__("8418");

// `Object.getOwnPropertyDescriptors` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
    var O = toIndexedObject(object);
    var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
    var keys = ownKeys(O);
    var result = {};
    var index = 0;
    var key, descriptor;
    while (keys.length > index) {
      descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
      if (descriptor !== undefined) createProperty(result, key, descriptor);
    }
    return result;
  }
});


/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var toIndexedObject = __webpack_require__("fc6a");
var nativeGetOwnPropertyDescriptor = __webpack_require__("06cf").f;
var DESCRIPTORS = __webpack_require__("83ab");

var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  }
});


/***/ })

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