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

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

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


// module
exports.push([module.i, ".approval-dialog .el-dialog__body{overflow:unset}", ""]);

// exports


/***/ }),

/***/ "d573":
/***/ (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":"29850416-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/portal-management/components/PublishApproval.vue?vue&type=template&id=95dc2620
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:"mini-dialog approval-dialog",attrs:{"title":"审批","visible":_vm.dialogVisible,"close-on-click-modal":false,"before-close":_vm.closeDialog,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"rules":_vm.rules,"label-width":"150px","label-position":"right"}},[_c('el-form-item',{attrs:{"label":"审批结果","prop":"isPass"}},[_c('el-radio-group',{on:{"input":_vm.passChange},model:{value:(_vm.form.isPass),callback:function ($$v) {_vm.$set(_vm.form, "isPass", $$v)},expression:"form.isPass"}},[_c('el-radio',{attrs:{"label":0}},[_vm._v("通过")]),_c('el-radio',{attrs:{"label":1}},[_vm._v("不通过")]),_c('el-radio',{attrs:{"label":2}},[_vm._v("否决")])],1)],1),_c('el-form-item',{attrs:{"label":"审批意见","prop":"approve"}},[_c('el-input',{attrs:{"type":"textarea","maxlength":"500","rows":3,"placeholder":"请输入"},model:{value:(_vm.form.approve),callback:function ($$v) {_vm.$set(_vm.form, "approve", $$v)},expression:"form.approve"}})],1)],1),_c('div',{staticClass:"text-center",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{staticClass:"iconfont icon-save",attrs:{"size":"small","type":"primary"},on:{"click":function($event){return _vm.save()}}},[_vm._v("保存")]),_c('el-button',{staticClass:"iconfont icon-close",attrs:{"size":"small"},on:{"click":function($event){return _vm.closeDialog()}}},[_vm._v("取消")])],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-management/components/PublishApproval.vue?vue&type=template&id=95dc2620

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js + 1 modules
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.filter.js
var es_array_filter = __webpack_require__("4de4");

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

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.sub.js
var es_string_sub = __webpack_require__("4c53");

// EXTERNAL MODULE: ./node_modules/@wiz-api/workbench-std/lib/workbench-std.umd.js
var workbench_std_umd = __webpack_require__("78a9");

// 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/portal-management/components/PublishApproval.vue?vue&type=script&lang=js







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


var config = Wiz.globalSettings.dynamicModules.modules['portal-management-std'].config;
var columnFlowApi = new workbench_std_umd["ColumnFlowApi"]();
/* harmony default export */ var PublishApprovalvue_type_script_lang_js = ({
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    data: {
      type: Object,
      required: true
    }
  },
  data: function data() {
    return {
      form: {
        isPass: 0,
        isImportantInfo: null,
        approve: '',
        userIds: [],
        backStepId: ''
      },
      rules: {
        isPass: [{
          required: true,
          message: '请选择审批结果',
          trigger: 'change'
        }],
        isImportantInfo: [{
          required: true,
          message: '请选择是否重要稿件',
          trigger: 'change'
        }],
        userIds: [{
          required: true,
          message: '请选择审批人员',
          trigger: 'change'
        }],
        backStepId: [{
          required: true,
          message: '请选择退回节点',
          trigger: 'change'
        }]
      },
      flow: {},
      handlerData: [],
      backStepList: [],
      config: config
    };
  },
  computed: {
    dialogVisible: {
      get: function get() {
        return this.visible;
      },
      set: function set(val) {
        this.$emit('update:visible', val);
      }
    },
    userInfo: function userInfo() {
      return Wiz.AuthHooks.GetUserInfo;
    }
  },
  watch: {
    dialogVisible: function dialogVisible(val) {
      if (val) {
        this.getTaskInfo();
      }
    }
  },
  methods: {
    passChange: function passChange() {
      this.form.userIds = [];
      this.form.backStepId = '';
    },
    getTaskInfo: function getTaskInfo() {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$columnFlowApi$, _yield$columnFlowApi$2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return columnFlowApi.getFlowTaskInfo({
                flowTaskId: _this.data.taskId
              });
            case 2:
              _yield$columnFlowApi$ = _context.sent;
              _yield$columnFlowApi$2 = Object(slicedToArray["a" /* default */])(_yield$columnFlowApi$, 2);
              err = _yield$columnFlowApi$2[0];
              res = _yield$columnFlowApi$2[1];
              if (!err) {
                _this.flow = res;
                // this.getFlowStep()
                // if (this.flow.stepId === config.partyPropagandistStepId) {
                //   this.form.isImportantInfo = false
                // }
                // if (this.flow.stepId === config.partyLeadershipStepId) {
                //   this.getNextStepHandler()
                // }
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    getFlowStep: function getFlowStep() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _this2$userInfo, _this2$userInfo$profi;
        var _yield$columnFlowApi$3, _yield$columnFlowApi$4, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return columnFlowApi.getFlowProcess({
                userId: (_this2$userInfo = _this2.userInfo) === null || _this2$userInfo === void 0 ? void 0 : (_this2$userInfo$profi = _this2$userInfo.profile) === null || _this2$userInfo$profi === void 0 ? void 0 : _this2$userInfo$profi.sub,
                taskId: _this2.data.taskId
              });
            case 2:
              _yield$columnFlowApi$3 = _context2.sent;
              _yield$columnFlowApi$4 = Object(slicedToArray["a" /* default */])(_yield$columnFlowApi$3, 2);
              err = _yield$columnFlowApi$4[0];
              res = _yield$columnFlowApi$4[1];
              if (!err) {
                _this2.backStepList = _.filter(res, function (item) {
                  return item.status === 1;
                });
              }
            case 7:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    getNextStepHandler: function getNextStepHandler() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _this3$userInfo, _this3$userInfo$profi;
        var _yield$columnFlowApi$5, _yield$columnFlowApi$6, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _context3.next = 2;
              return columnFlowApi.getStepDefaultHanderByName({
                userId: (_this3$userInfo = _this3.userInfo) === null || _this3$userInfo === void 0 ? void 0 : (_this3$userInfo$profi = _this3$userInfo.profile) === null || _this3$userInfo$profi === void 0 ? void 0 : _this3$userInfo$profi.sub,
                flowId: _this3.flow.flowId,
                stepName: config.companyLeadershipStepName // 公司领导审核
              });
            case 2:
              _yield$columnFlowApi$5 = _context3.sent;
              _yield$columnFlowApi$6 = Object(slicedToArray["a" /* default */])(_yield$columnFlowApi$5, 2);
              err = _yield$columnFlowApi$6[0];
              res = _yield$columnFlowApi$6[1];
              if (!err) {
                _this3.handlerData = res;
              }
            case 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    },
    save: function save() {
      var _this4 = this;
      this.$refs.form.validate( /*#__PURE__*/function () {
        var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee4(valid) {
          var _yield$columnFlowApi$7, _yield$columnFlowApi$8, err;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee4$(_context4) {
            while (1) switch (_context4.prev = _context4.next) {
              case 0:
                if (!valid) {
                  _context4.next = 10;
                  break;
                }
                if (_this4.data.taskId) {
                  _context4.next = 4;
                  break;
                }
                _this4.$message.warning('未获取到下一步审批节点!');
                return _context4.abrupt("return");
              case 4:
                _context4.next = 6;
                return columnFlowApi.approve({
                  body: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this4.form), _this4.data), {}, {
                    isPass: _this4.form.isPass !== 1,
                    isFinished: _this4.form.isPass === 2 ? true : null
                  })
                });
              case 6:
                _yield$columnFlowApi$7 = _context4.sent;
                _yield$columnFlowApi$8 = Object(slicedToArray["a" /* default */])(_yield$columnFlowApi$7, 1);
                err = _yield$columnFlowApi$8[0];
                if (!err) {
                  _this4.$message.success('审批成功!');
                  _this4.$emit('save');
                  _this4.closeDialog();
                }
              case 10:
              case "end":
                return _context4.stop();
            }
          }, _callee4);
        }));
        return function (_x) {
          return _ref.apply(this, arguments);
        };
      }());
    },
    closeDialog: function closeDialog(done) {
      this.form = this.$options.data().form;
      this.$refs.form.clearValidate();
      if (done) {
        done();
      } else {
        this.dialogVisible = false;
      }
    }
  }
});
// CONCATENATED MODULE: ./src/modules/portal-management/components/PublishApproval.vue?vue&type=script&lang=js
 /* harmony default export */ var components_PublishApprovalvue_type_script_lang_js = (PublishApprovalvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/portal-management/components/PublishApproval.vue?vue&type=style&index=0&id=95dc2620&prod&lang=scss
var PublishApprovalvue_type_style_index_0_id_95dc2620_prod_lang_scss = __webpack_require__("d723");

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

// CONCATENATED MODULE: ./src/modules/portal-management/components/PublishApproval.vue






/* normalize component */

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

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

/***/ }),

/***/ "d723":
/***/ (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_PublishApproval_vue_vue_type_style_index_0_id_95dc2620_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ea4c");
/* 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_PublishApproval_vue_vue_type_style_index_0_id_95dc2620_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PublishApproval_vue_vue_type_style_index_0_id_95dc2620_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "ea4c":
/***/ (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__("cea8");
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("317a43a4", content, true, {"sourceMap":false,"shadowMode":false});

/***/ })

}]);
//# sourceMappingURL=portal-management-std.umd.88.js.map