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

/***/ "5518":
/***/ (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_ApprovalFlowDialog_vue_vue_type_style_index_0_id_1d991ce2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c8e5");
/* 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_ApprovalFlowDialog_vue_vue_type_style_index_0_id_1d991ce2_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_ApprovalFlowDialog_vue_vue_type_style_index_0_id_1d991ce2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

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


/***/ }),

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

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


// module
exports.push([module.i, "[data-v-1d991ce2] .el-form-item__label{text-align:right}[data-v-1d991ce2] .el-tabs__content{height:calc(100% - 55px);overflow-y:auto}", ""]);

// exports


/***/ }),

/***/ "c8e5":
/***/ (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__("b82d");
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("1b36ee24", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

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

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

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"28eb61d9-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/safety/ApprovalFlow/ApprovalFlowDialog.vue?vue&type=template&id=1d991ce2&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"mid-dialog",attrs:{"title":_vm.dialogTitle,"visible":_vm.visible,"close-on-click-modal":false,"append-to-body":true},on:{"update:visible":function($event){_vm.visible=$event},"close":function($event){return _vm.$emit('cancel')}}},[_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],staticClass:"w-full h-full"},[(_vm.flowSrc)?_c('iframe',{staticClass:"w-full h-full",attrs:{"src":_vm.flowSrc,"frameborder":"0"}}):_vm._e()])])}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/ApprovalFlow/ApprovalFlowDialog.vue?vue&type=template&id=1d991ce2&scoped=true

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

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/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.concat.js
var es_array_concat = __webpack_require__("99af");

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

// EXTERNAL MODULE: ./node_modules/@wiz-api/emergency-management/lib/emergency-management.umd.js
var emergency_management_umd = __webpack_require__("779f");

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





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


var planApi = new emergency_management_umd["PlanApi"]();
/* harmony default export */ var ApprovalFlowDialogvue_type_script_lang_js = ({
  name: 'approval-flow-dialog',
  props: {
    // visible: {
    //   type: Boolean,
    //   default: false,
    // },
    // 弹窗显隐
    // flowid: {
    //   type: String,
    //   default: '',
    // },
    // groupid: {
    //   type: String,
    //   default: '',
    // },
    id: {
      type: Number
    }
  },
  computed: {
    // dialogVisible: {
    //   get() {
    //     return this.visible
    //   },
    //   set(val) {
    //     this.$emit('update:visible', val)
    //   },
    // },
    dialogTitle: function dialogTitle() {
      return this.$t('查看流程');
    } // dialog标题
  },
  watch: {
    visible: function visible(val) {
      if (!val) {
        this.$emit('update:visible', val);
      }
    }
  },
  data: function data() {
    return {
      flowSrc: '',
      // 嵌入流程图的地址
      flowid: '',
      groupid: '',
      loading: false,
      visible: true
    };
  },
  methods: {
    /**
     * @description 获取iframe嵌入地址的token和ip地址
     */
    getProcessDetail: function getProcessDetail() {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
        var _yield$planApi$getPro, _yield$planApi$getPro2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context) {
          while (1) switch (_context.n) {
            case 0:
              _context.n = 1;
              return planApi.getProcess();
            case 1:
              _yield$planApi$getPro = _context.v;
              _yield$planApi$getPro2 = Object(slicedToArray["a" /* default */])(_yield$planApi$getPro, 2);
              err = _yield$planApi$getPro2[0];
              res = _yield$planApi$getPro2[1];
              if (!err) {
                _this.flowSrc = "".concat(res.apiUrl, "/index.html?loadurl=").concat(encodeURIComponent("/flow/run/process?flowid=".concat(_this.flowid, "&groupid=").concat(_this.groupid, "&status=-1")), "&nroadflow-token=").concat(res.token, "&isiframe=1");
              }
            case 2:
              return _context.a(2);
          }
        }, _callee);
      }))();
    },
    init: function init() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var _yield$planApi$getFlo, _yield$planApi$getFlo2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              _this2.loading = true;
              _context2.n = 1;
              return planApi.getFlowTaskInfo({
                flowTaskId: _this2.id
              });
            case 1:
              _yield$planApi$getFlo = _context2.v;
              _yield$planApi$getFlo2 = Object(slicedToArray["a" /* default */])(_yield$planApi$getFlo, 2);
              err = _yield$planApi$getFlo2[0];
              res = _yield$planApi$getFlo2[1];
              if (!err) {
                _this2.flowid = res.flowId;
                _this2.groupid = res.groupId;
              }
              _context2.n = 2;
              return _this2.getProcessDetail();
            case 2:
              _this2.loading = false;
            case 3:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    }
  },
  created: function created() {
    this.init();
  }
});
// CONCATENATED MODULE: ./src/components/safety/ApprovalFlow/ApprovalFlowDialog.vue?vue&type=script&lang=js
 /* harmony default export */ var ApprovalFlow_ApprovalFlowDialogvue_type_script_lang_js = (ApprovalFlowDialogvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/safety/ApprovalFlow/ApprovalFlowDialog.vue?vue&type=style&index=0&id=1d991ce2&prod&lang=scss&scoped=true
var ApprovalFlowDialogvue_type_style_index_0_id_1d991ce2_prod_lang_scss_scoped_true = __webpack_require__("5518");

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

// CONCATENATED MODULE: ./src/components/safety/ApprovalFlow/ApprovalFlowDialog.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  ApprovalFlow_ApprovalFlowDialogvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "1d991ce2",
  null
  
)

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

/***/ })

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