module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 156);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
        injectStyles.call(
          this,
          (options.functional ? this.parent : this).$root.$options.shadowRoot
        )
      }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 156:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/aos-flow/src/main.vue?vue&type=template&id=559fd22e&
var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _vm.showFlow
    ? _c(
        "div",
        { staticClass: "aos-flow" },
        [
          _vm.showType === "horizontal"
            ? _c(
                "div",
                { staticClass: "aos-flow-horizontal" },
                [
                  _c("div", { staticClass: "aos-flow-step clearfix" }, [
                    _c("div", { staticClass: "aos-flow-task" }, [
                      _c("span", { staticClass: "aos-flow-task-title" }, [
                        _vm._v("任务名称 : ")
                      ]),
                      _c(
                        "span",
                        {
                          staticClass: "aos-flow-task-name",
                          attrs: { title: _vm.taskDetail.processInstanceName }
                        },
                        [_vm._v(_vm._s(_vm.taskDetail.processInstanceName))]
                      )
                    ]),
                    _c("div", { staticClass: "aos-flow-task" }, [
                      _c("span", { staticClass: "aos-flow-task-title" }, [
                        _vm._v("当前环节 : ")
                      ]),
                      _c(
                        "span",
                        {
                          staticClass: "aos-flow-task-name",
                          attrs: { title: _vm.taskDetail.name }
                        },
                        [_vm._v(_vm._s(_vm.taskDetail.name))]
                      )
                    ])
                  ]),
                  _c(
                    "div",
                    { staticClass: "aos-flow-button clearfix" },
                    [
                      _c(
                        "el-button",
                        {
                          attrs: { type: "text", icon: "el-icon-tickets" },
                          on: { click: _vm.handleCheckHistory }
                        },
                        [_vm._v("审批意见")]
                      ),
                      _vm._t("flow-button"),
                      _c(
                        "el-button",
                        {
                          attrs: { disabled: _vm.disabled, type: "primary" },
                          on: { click: _vm.handleAgree }
                        },
                        [_vm._v("提交")]
                      ),
                      _vm.showReject
                        ? _c(
                            "el-button",
                            {
                              attrs: { disabled: _vm.disabled },
                              on: { click: _vm.handleReject }
                            },
                            [_vm._v("退回")]
                          )
                        : _vm._e(),
                      _vm.showRefuse
                        ? _c(
                            "el-button",
                            {
                              attrs: { disabled: _vm.disabled },
                              on: { click: _vm.handleRefuse }
                            },
                            [_vm._v("拒绝")]
                          )
                        : _vm._e(),
                      _vm.showBackBtn
                        ? _c("el-button", { on: { click: _vm.handleBack } }, [
                            _vm._v("返回")
                          ])
                        : _vm._e()
                    ],
                    2
                  ),
                  _c(
                    "el-dialog",
                    {
                      attrs: {
                        title: _vm.messageTitle,
                        visible: _vm.showMessage,
                        width: "30%",
                        "before-close": _vm.handleCloseMessage,
                        "append-to-body": true
                      },
                      on: {
                        "update:visible": function($event) {
                          _vm.showMessage = $event
                        }
                      }
                    },
                    [
                      _c("div", { staticClass: "aos-flow-message" }, [
                        _c(
                          "div",
                          [
                            _c(
                              "span",
                              { staticClass: "aos-flow-message-title" },
                              [_vm._v("意见")]
                            ),
                            _c("el-input", {
                              attrs: {
                                type: "textarea",
                                autosize: { minRows: 2 }
                              },
                              model: {
                                value: _vm.outMessage,
                                callback: function($$v) {
                                  _vm.outMessage = $$v
                                },
                                expression: "outMessage"
                              }
                            })
                          ],
                          1
                        )
                      ]),
                      _c(
                        "span",
                        { attrs: { slot: "footer" }, slot: "footer" },
                        [
                          _c(
                            "el-button",
                            { on: { click: _vm.handleCloseMessage } },
                            [_vm._v("取消")]
                          ),
                          _c(
                            "el-button",
                            {
                              attrs: { type: "primary" },
                              on: { click: _vm.handleHorizontalSubmitMessage }
                            },
                            [_vm._v("确定")]
                          )
                        ],
                        1
                      )
                    ]
                  )
                ],
                1
              )
            : _c("div", { staticClass: "aos-flow-vertical" }, [
                _c(
                  "div",
                  { staticClass: "aos-part" },
                  [
                    _c(
                      "el-button",
                      {
                        attrs: { type: "text", icon: "el-icon-setting" },
                        on: { click: _vm.changeType }
                      },
                      [_vm._v("审批")]
                    ),
                    _c("span", { staticStyle: { margin: "0 8px" } }, [
                      _vm._v("/")
                    ]),
                    _c(
                      "el-button",
                      {
                        staticStyle: { "margin-left": "0px" },
                        attrs: { type: "text", icon: "el-icon-tickets" },
                        on: { click: _vm.handleCheckHistory }
                      },
                      [_vm._v("审批意见")]
                    )
                  ],
                  1
                ),
                _c(
                  "div",
                  {
                    directives: [
                      {
                        name: "show",
                        rawName: "v-show",
                        value: !_vm.showApprovalMessage,
                        expression: "!showApprovalMessage"
                      }
                    ]
                  },
                  [
                    _c("div", { staticClass: "aos-part" }, [
                      _vm._v("审批类型 : ")
                    ]),
                    _c(
                      "div",
                      { staticClass: "aos-part" },
                      [
                        _c(
                          "el-radio-group",
                          {
                            on: { change: _vm.handleApprovalCheckChange },
                            model: {
                              value: _vm.approvalCheckedType,
                              callback: function($$v) {
                                _vm.approvalCheckedType = $$v
                              },
                              expression: "approvalCheckedType"
                            }
                          },
                          [
                            _c(
                              "el-radio",
                              { attrs: { disabled: _vm.disabled, label: 0 } },
                              [_vm._v("通过")]
                            ),
                            _vm.showReject
                              ? _c(
                                  "el-radio",
                                  {
                                    attrs: { disabled: _vm.disabled, label: 1 }
                                  },
                                  [_vm._v("驳回")]
                                )
                              : _vm._e(),
                            _vm.showRefuse
                              ? _c(
                                  "el-radio",
                                  {
                                    attrs: { disabled: _vm.disabled, label: 2 }
                                  },
                                  [_vm._v("拒绝")]
                                )
                              : _vm._e()
                          ],
                          1
                        )
                      ],
                      1
                    ),
                    (_vm.reasonList && _vm.reasonList.length > 0) ||
                    Object.keys(_vm.reasonGroupObject).length > 0
                      ? _c("div", { staticClass: "aos-part" }, [
                          _c(
                            "span",
                            { staticClass: "aos-flow-message-title" },
                            [_vm._v("意见 : ")]
                          )
                        ])
                      : _vm._e(),
                    Object.keys(_vm.reasonGroupObject).length === 0 &&
                    _vm.reasonList &&
                    _vm.reasonList.length > 0
                      ? _c(
                          "div",
                          { staticClass: "aos-part" },
                          [
                            _c(
                              "el-select",
                              {
                                staticStyle: { display: "block" },
                                attrs: { placeholder: "请选择原因" },
                                on: { change: _vm.handleReasonChange },
                                model: {
                                  value: _vm.reason,
                                  callback: function($$v) {
                                    _vm.reason = $$v
                                  },
                                  expression: "reason"
                                }
                              },
                              _vm._l(_vm.reasonList, function(item) {
                                return _c("el-option", {
                                  key: item,
                                  attrs: { label: item, value: item }
                                })
                              }),
                              1
                            )
                          ],
                          1
                        )
                      : _vm._e(),
                    _vm.reasonGroupObject &&
                    Object.keys(_vm.reasonGroupObject).length > 0
                      ? _c(
                          "div",
                          { staticClass: "aos-part" },
                          [
                            _c(
                              "el-select",
                              {
                                staticStyle: { display: "block" },
                                attrs: { placeholder: "请选择原因" },
                                on: { change: _vm.handleReasonChange },
                                model: {
                                  value: _vm.reason,
                                  callback: function($$v) {
                                    _vm.reason = $$v
                                  },
                                  expression: "reason"
                                }
                              },
                              _vm._l(_vm.reasonGroupObject, function(
                                item,
                                index
                              ) {
                                return _c(
                                  "el-option-group",
                                  { key: index, attrs: { label: index } },
                                  _vm._l(item, function(child) {
                                    return _c("el-option", {
                                      key: child,
                                      attrs: { label: child, value: child }
                                    })
                                  }),
                                  1
                                )
                              }),
                              1
                            )
                          ],
                          1
                        )
                      : _vm._e(),
                    _vm.showRejectRadio && _vm.rejectActivitys.length > 0
                      ? _c("div", { staticClass: "aos-part" }, [
                          _c(
                            "span",
                            { staticClass: "aos-flow-message-title" },
                            [_vm._v("选择驳回环节 : ")]
                          )
                        ])
                      : _vm._e(),
                    _vm.showRejectRadio && _vm.rejectActivitys.length > 0
                      ? _c("div", { staticClass: "aos-part" }, [
                          _c(
                            "div",
                            [
                              _c(
                                "el-radio-group",
                                {
                                  staticClass: "aos-flow-reject-group",
                                  model: {
                                    value: _vm.rejectNode,
                                    callback: function($$v) {
                                      _vm.rejectNode = $$v
                                    },
                                    expression: "rejectNode"
                                  }
                                },
                                _vm._l(_vm.rejectActivitys, function(item) {
                                  return _c(
                                    "el-radio",
                                    {
                                      key: item.activityId,
                                      staticClass: "aos-flow-reject-radio",
                                      attrs: { label: item.activityId }
                                    },
                                    [_vm._v(_vm._s(item.activityName))]
                                  )
                                }),
                                1
                              )
                            ],
                            1
                          )
                        ])
                      : _vm._e(),
                    _vm._m(0),
                    _c(
                      "div",
                      { staticClass: "aos-part" },
                      [
                        _c("el-input", {
                          attrs: {
                            type: "textarea",
                            autosize: { minRows: 2 },
                            placeholder: "请在此输入内部意见"
                          },
                          model: {
                            value: _vm.message,
                            callback: function($$v) {
                              _vm.message = $$v
                            },
                            expression: "message"
                          }
                        })
                      ],
                      1
                    ),
                    _vm._m(1),
                    _c(
                      "div",
                      { staticClass: "aos-part" },
                      [
                        _c("el-input", {
                          attrs: {
                            type: "textarea",
                            autosize: { minRows: 2 },
                            placeholder: "请在此输入外部意见"
                          },
                          model: {
                            value: _vm.outMessage,
                            callback: function($$v) {
                              _vm.outMessage = $$v
                            },
                            expression: "outMessage"
                          }
                        })
                      ],
                      1
                    ),
                    _c(
                      "div",
                      { staticClass: "aos-images" },
                      [
                        _vm._l(_vm.imagesList, function(item, index) {
                          return _c(
                            "div",
                            {
                              key: index,
                              staticClass: "aos-image-box",
                              on: {
                                mouseout: function($event) {
                                  _vm.handleImageMouseOut(index)
                                },
                                mouseover: function($event) {
                                  _vm.handleImageMouseOver(index)
                                }
                              }
                            },
                            [
                              _c("img", {
                                attrs: {
                                  src:
                                    "/bpm/task/file-download/" +
                                    _vm.taskId +
                                    "/" +
                                    item.id,
                                  alt: "流程附件图片"
                                }
                              }),
                              _c(
                                "span",
                                {
                                  directives: [
                                    {
                                      name: "show",
                                      rawName: "v-show",
                                      value: _vm.activeItemIndex === index,
                                      expression: "activeItemIndex === index"
                                    }
                                  ]
                                },
                                [
                                  _c("i", {
                                    staticClass: "el-icon-search aos-flow-icon",
                                    attrs: { title: "查看" },
                                    on: {
                                      click: function($event) {
                                        _vm.handleViewImage(item)
                                      }
                                    }
                                  }),
                                  _c(
                                    "a",
                                    {
                                      staticClass: "aos-flow-icon",
                                      attrs: {
                                        title: "下载",
                                        href:
                                          "/bpm/task/file-download/" +
                                          _vm.taskId +
                                          "/" +
                                          item.id
                                      },
                                      on: {
                                        click: function($event) {
                                          _vm.handleDownload(item)
                                        }
                                      }
                                    },
                                    [
                                      _c("i", {
                                        staticClass: "el-icon-download"
                                      })
                                    ]
                                  ),
                                  _c("i", {
                                    staticClass: "el-icon-delete aos-flow-icon",
                                    attrs: { title: "删除" },
                                    on: {
                                      click: function($event) {
                                        _vm.handleDeleteImage(item)
                                      }
                                    }
                                  })
                                ]
                              )
                            ]
                          )
                        }),
                        _c(
                          "el-upload",
                          {
                            staticClass: "aos-flow-upload",
                            attrs: {
                              drag: "",
                              action: "/bpm/task/upload/" + _vm.taskId,
                              "on-success": _vm.handleUploadSuccess,
                              "show-file-list": false
                            }
                          },
                          [
                            _c("i", {
                              staticClass: "el-icon-upload",
                              staticStyle: { "font-size": "40px", margin: "0" }
                            }),
                            _c(
                              "div",
                              {
                                staticClass: "el-upload__text",
                                staticStyle: {
                                  "font-size": "12px",
                                  margin: "0 8px"
                                }
                              },
                              [
                                _vm._v("将文件拖到此处或"),
                                _c("em", [_vm._v("点击上传")])
                              ]
                            )
                          ]
                        )
                      ],
                      2
                    ),
                    _c(
                      "el-dialog",
                      {
                        attrs: {
                          visible: _vm.dialogVisible,
                          "append-to-body": true,
                          title: "流程附件预览"
                        },
                        on: {
                          "update:visible": function($event) {
                            _vm.dialogVisible = $event
                          }
                        }
                      },
                      [
                        _c("img", {
                          attrs: {
                            width: "100%",
                            src: _vm.dialogImageUrl,
                            alt: ""
                          }
                        })
                      ]
                    ),
                    _c(
                      "div",
                      { staticClass: "aos-part aos-submit-btn" },
                      [
                        _c(
                          "el-button",
                          {
                            attrs: { type: "primary" },
                            on: { click: _vm.handleVerticalSubmitMessage }
                          },
                          [_vm._v("确定")]
                        )
                      ],
                      1
                    )
                  ],
                  1
                ),
                _c(
                  "div",
                  {
                    directives: [
                      {
                        name: "show",
                        rawName: "v-show",
                        value: _vm.showApprovalMessage,
                        expression: "showApprovalMessage"
                      }
                    ]
                  },
                  [
                    _c(
                      "el-timeline",
                      { attrs: { reverse: _vm.reverse } },
                      _vm._l(_vm.translateHistoryDetailList, function(
                        ele,
                        key
                      ) {
                        return _c(
                          "el-timeline-item",
                          {
                            key: key,
                            attrs: {
                              timestamp: _vm.$time.formatTime(ele.date),
                              placement: "top",
                              color: ele.color
                            }
                          },
                          [
                            !ele.startEnd
                              ? _c("el-card", [
                                  _c("h4", [
                                    _vm._v(
                                      "\n              【" +
                                        _vm._s(ele.taskName) +
                                        "】" +
                                        _vm._s(ele.userName) +
                                        "\n              "
                                    ),
                                    _c("span", [
                                      _vm._v(
                                        _vm._s(_vm.$time.formatTime(ele.date))
                                      )
                                    ])
                                  ]),
                                  ele.url && ele.url.length > 0
                                    ? _c(
                                        "p",
                                        [
                                          _vm._l(ele.url, function(
                                            item,
                                            index
                                          ) {
                                            return [
                                              item.type !== "pdf"
                                                ? _c("img", {
                                                    key: index,
                                                    staticStyle: {
                                                      width: "150px",
                                                      cursor: "pointer"
                                                    },
                                                    attrs: {
                                                      src: item.url,
                                                      alt: "",
                                                      title: "点击预览大图"
                                                    },
                                                    on: {
                                                      click: function($event) {
                                                        _vm.handleViewTimeLineImage(
                                                          item.url
                                                        )
                                                      }
                                                    }
                                                  })
                                                : _c("span", { key: index }, [
                                                    _c("i", {
                                                      staticClass: "el-icon-pdf"
                                                    })
                                                  ])
                                            ]
                                          })
                                        ],
                                        2
                                      )
                                    : _vm._e(),
                                  _c("p", [
                                    _c(
                                      "span",
                                      { staticStyle: { "font-weight": "600" } },
                                      [_vm._v(_vm._s(ele.operate))]
                                    ),
                                    ele.reason
                                      ? _c("span", [
                                          _c(
                                            "span",
                                            {
                                              staticStyle: {
                                                "font-weight": "600"
                                              }
                                            },
                                            [_vm._v("原因：")]
                                          ),
                                          _vm._v(_vm._s(ele.reason))
                                        ])
                                      : _vm._e()
                                  ]),
                                  ele.remind
                                    ? _c("p", [
                                        _c(
                                          "span",
                                          {
                                            staticStyle: {
                                              "font-weight": "600"
                                            }
                                          },
                                          [_vm._v("意见：")]
                                        ),
                                        _vm._v(_vm._s(ele.remind))
                                      ])
                                    : _vm._e(),
                                  ele.innerRemind
                                    ? _c("p", [
                                        _c(
                                          "span",
                                          {
                                            staticStyle: {
                                              "font-weight": "600"
                                            }
                                          },
                                          [_vm._v("内部意见：")]
                                        ),
                                        _vm._v(_vm._s(ele.innerRemind))
                                      ])
                                    : _vm._e(),
                                  ele.auditRecord
                                    ? _c("p", [
                                        _c(
                                          "span",
                                          {
                                            staticStyle: {
                                              "font-weight": "600"
                                            }
                                          },
                                          [_vm._v("备注：")]
                                        ),
                                        _vm._v(_vm._s(ele.auditRecord))
                                      ])
                                    : _vm._e(),
                                  ele.changeRecord &&
                                  ele.changeRecord.length > 0
                                    ? _c(
                                        "div",
                                        [
                                          _c(
                                            "span",
                                            {
                                              staticStyle: {
                                                "font-weight": "600"
                                              }
                                            },
                                            [_vm._v("任务人变更记录：")]
                                          ),
                                          _vm._l(ele.changeRecord, function(
                                            item,
                                            index
                                          ) {
                                            return _c(
                                              "p",
                                              {
                                                key: index,
                                                staticStyle: {
                                                  "padding-left": "16px"
                                                }
                                              },
                                              [_vm._v(_vm._s(item.record))]
                                            )
                                          })
                                        ],
                                        2
                                      )
                                    : _vm._e()
                                ])
                              : _vm._e(),
                            ele.startEnd
                              ? _c("el-card", [
                                  _c("h4", [
                                    _c("span", [
                                      _vm._v(_vm._s(ele.startEndName))
                                    ])
                                  ])
                                ])
                              : _vm._e()
                          ],
                          1
                        )
                      }),
                      1
                    )
                  ],
                  1
                )
              ]),
          _c(
            "el-dialog",
            {
              attrs: {
                title: "历史审批",
                visible: _vm.showHistory,
                width: "50%",
                "before-close": _vm.handleCloseHistory,
                "append-to-body": true
              },
              on: {
                "update:visible": function($event) {
                  _vm.showHistory = $event
                }
              }
            },
            [
              _c(
                "div",
                { staticClass: "aos-flow-history" },
                [
                  _c(
                    "el-timeline",
                    { attrs: { reverse: _vm.reverse } },
                    _vm._l(_vm.translateHistoryDetailList, function(ele, key) {
                      return _c(
                        "el-timeline-item",
                        {
                          key: key,
                          attrs: {
                            timestamp: _vm.$time.formatTime(ele.date),
                            color: ele.color,
                            placement: "top"
                          }
                        },
                        [
                          !ele.startEnd
                            ? _c("el-card", [
                                _c("h4", [
                                  _vm._v(
                                    "\n              【" +
                                      _vm._s(ele.taskName) +
                                      "】" +
                                      _vm._s(ele.userName) +
                                      "\n              "
                                  ),
                                  _c("span", [
                                    _vm._v(
                                      _vm._s(_vm.$time.formatTime(ele.date))
                                    )
                                  ])
                                ]),
                                ele.url && ele.url.length > 0
                                  ? _c(
                                      "p",
                                      [
                                        _vm._l(ele.url, function(item, index) {
                                          return [
                                            item.type !== "pdf"
                                              ? _c("img", {
                                                  key: index,
                                                  staticStyle: {
                                                    width: "150px",
                                                    cursor: "pointer"
                                                  },
                                                  attrs: {
                                                    src: item.url,
                                                    alt: "",
                                                    title: "点击预览大图"
                                                  },
                                                  on: {
                                                    click: function($event) {
                                                      _vm.handleViewTimeLineImage(
                                                        item.url
                                                      )
                                                    }
                                                  }
                                                })
                                              : _c("span", { key: index }, [
                                                  _c("i", {
                                                    staticClass: "el-icon-pdf"
                                                  })
                                                ])
                                          ]
                                        })
                                      ],
                                      2
                                    )
                                  : _vm._e(),
                                _c("p", [
                                  _c(
                                    "span",
                                    { staticStyle: { "font-weight": "600" } },
                                    [_vm._v(_vm._s(ele.operate))]
                                  ),
                                  ele.reason
                                    ? _c("span", [
                                        _c(
                                          "span",
                                          {
                                            staticStyle: {
                                              "font-weight": "600"
                                            }
                                          },
                                          [_vm._v("原因：")]
                                        ),
                                        _vm._v(_vm._s(ele.reason))
                                      ])
                                    : _vm._e()
                                ]),
                                ele.remind
                                  ? _c("p", [
                                      _c(
                                        "span",
                                        {
                                          staticStyle: { "font-weight": "600" }
                                        },
                                        [_vm._v("意见：")]
                                      ),
                                      _vm._v(_vm._s(ele.remind))
                                    ])
                                  : _vm._e(),
                                ele.innerRemind
                                  ? _c("p", [
                                      _c(
                                        "span",
                                        {
                                          staticStyle: { "font-weight": "600" }
                                        },
                                        [_vm._v("内部意见：")]
                                      ),
                                      _vm._v(_vm._s(ele.innerRemind))
                                    ])
                                  : _vm._e(),
                                ele.auditRecord
                                  ? _c("p", [
                                      _c(
                                        "span",
                                        {
                                          staticStyle: { "font-weight": "600" }
                                        },
                                        [_vm._v("备注：")]
                                      ),
                                      _vm._v(_vm._s(ele.auditRecord))
                                    ])
                                  : _vm._e(),
                                ele.changeRecord && ele.changeRecord.length > 0
                                  ? _c(
                                      "div",
                                      [
                                        _c(
                                          "span",
                                          {
                                            staticStyle: {
                                              "font-weight": "600"
                                            }
                                          },
                                          [_vm._v("任务人变更记录：")]
                                        ),
                                        _vm._l(ele.changeRecord, function(
                                          item,
                                          index
                                        ) {
                                          return _c(
                                            "p",
                                            {
                                              key: index,
                                              staticStyle: {
                                                "padding-left": "16px"
                                              }
                                            },
                                            [_vm._v(_vm._s(item.record))]
                                          )
                                        })
                                      ],
                                      2
                                    )
                                  : _vm._e()
                              ])
                            : _vm._e(),
                          ele.startEnd
                            ? _c("el-card", [
                                _c("h4", [
                                  _c("span", [_vm._v(_vm._s(ele.startEndName))])
                                ])
                              ])
                            : _vm._e()
                        ],
                        1
                      )
                    }),
                    1
                  )
                ],
                1
              )
            ]
          )
        ],
        1
      )
    : _vm._e()
}
var staticRenderFns = [
  function() {
    var _vm = this
    var _h = _vm.$createElement
    var _c = _vm._self._c || _h
    return _c("div", { staticClass: "aos-part" }, [
      _c("span", { staticClass: "aos-flow-message-title" }, [
        _vm._v("内部意见 : ")
      ])
    ])
  },
  function() {
    var _vm = this
    var _h = _vm.$createElement
    var _c = _vm._self._c || _h
    return _c("div", { staticClass: "aos-part" }, [
      _c("span", { staticClass: "aos-flow-message-title" }, [
        _vm._v("外部意见 : ")
      ])
    ])
  }
]
render._withStripped = true


// CONCATENATED MODULE: ./packages/aos-flow/src/main.vue?vue&type=template&id=559fd22e&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/aos-flow/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'AosFlow',
  props: {
    // 表单状态判断,true为表单已处理好,false为表单未处理好
    operation: {
      type: Boolean
    },
    // 表单未处理好的提示信息
    operationMessage: {
      type: String,
      default: '当前表单未处理'
    },
    // 是否显示操作按钮
    disabled: {
      type: Boolean,
      default: false
    },
    // 是否显示意见框
    showMessage: {
      type: Boolean,
      default: false
    },
    // 点击操作之前
    beforeAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    // 点击同意操作之前
    agreeBeforeAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    rejectBeforeAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    refuseBeforeAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    // 点击提交按钮之前触发事件
    submitBeforeAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    // 同意时是否走agreeBeforeAction方法
    agreeBefore: {
      type: Boolean,
      default: false
    },
    // // 驳回是否走rejectBeforeAction方法
    // rejectBefore: {
    //   type: Boolean,
    //   default: false
    // },
    // // 拒绝是否走refuseBeforeAction方法
    // refuseBefore: {
    //   type: Boolean,
    //   default: false
    // },
    // 提交时是否走submitBeforeAgree方法
    submitBefore: {
      type: Boolean,
      default: false
    },
    // 返回按钮返回的URL,默认返回任务中心
    backRouter: {
      type: String,
      default: '/bpm/task'
    },
    // 提交确认成功之后跳转的页面
    confirmBackRouter: {
      type: String,
      default: '/bpm/task'
    },
    // 是否显示返回按钮
    showBackBtn: {
      type: Boolean,
      default: true
    },
    // 显示的风格,horizontal:水平 vertical: 垂直
    showType: {
      type: String,
      default: 'horizontal'
    },
    // agreeBeforeAction方法:false同步请求,true有异步请求
    agreeAsycHttp: {
      type: Boolean,
      default: false
    },
    // 是否自动触发提交,true为自动提交
    autoOperate: {
      type: Boolean,
      default: true
    },
    // 是否自动触发驳回
    autoReject: {
      type: Boolean,
      default: true
    },
    // 是否自动触发拒绝
    autoRefuse: {
      type: Boolean,
      default: true
    },
    // 是否水平版 自动拒绝
    autoHorizontalRefuse: {
      type: Boolean,
      default: true
    },
    // 水平版拒绝前的校验函数
    beforeHorizantalRefuseAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    // 是否水平版 自动驳回
    autoHorizontalReject: {
      type: Boolean,
      default: true
    },
    // 水平版驳回前的校验函数
    beforeHorizantalRejectAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    },
    autoSubmit: {
      type: Boolean,
      default: true
    },
    // 弹框 点击确认前事件
    beforeSubmitAction: {
      type: Function,
      default: function _default() {
        return true;
      }
    }
  },
  data: function data() {
    return {
      showFlow: false, // 是否显示流程审批按钮
      active: 0,
      showReject: false, //是否显示驳回按钮
      showRefuse: false, // 是否显示拒绝按钮
      showRejectRadio: false, // 是否显示驳回环节
      rejectActivitys: '', // 驳回信息(包含环节等)
      refuseReasons: [], // 拒绝原因
      rejectReasons: [], // 驳回原因
      completeReasons: [], // 通过原因
      completeGroupReasons: {}, // 通过的组原因
      refuseGroupReasons: {}, // 通过的组原因
      rejectGroupReasons: {}, // 通过的组原因
      reasonList: [], //原因
      reasonGroupObject: {}, //组原因
      taskId: '', // 当前任务id
      processInstanceId: '', //流程id
      startEndMessage: '', // 审批开始结束信息
      showHistory: false, // 显示历史信息
      taskDetail: '', // 任务详细
      historyDetailList: '', // 历史审批意见,
      translateHistoryDetailList: '', // 转换过类型的历史审批意见
      messageTitle: '', //意见dailog名称
      operationType: true, // 操作的类型,true为通过,false为驳回
      // showMessage: false, // 是否显示意见dialog 改为双向数据绑定
      message: '', // 内部意见
      outMessage: '', //外部意见
      reason: '', // 选择的原因
      rejectNode: '', //驳回节点
      auditRecord: '', // 审批意见
      messageSuccess: false, // 通过或拒绝是否成功
      approvalCheckedType: '',
      rejectType: '',
      showApprovalMessage: false, // 切换审批和审批意见,默认为审批
      approvalType: '', // 当前审批类型
      reverse: false,
      dialogImageUrl: '', // 图片的url
      dialogVisible: false, // 图片预览
      imagesList: [],
      activeItemIndex: ''
    };
  },

  methods: {
    getImageList: function getImageList() {
      var _this = this;

      this.$http({
        url: '/bpm/task/files/' + this.taskId,
        method: 'get'
      }).then(function (res) {
        _this.imagesList = res.data;
      }).catch(function () {
        _this.$message({
          type: 'error',
          message: '获取流程附件出错'
        });
      });
    },

    // 图片删除
    handleRemove: function handleRemove(file, fileList) {
      console.log(file, fileList);
    },

    // 图片预览
    handlePictureCardPreview: function handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    handleUploadSuccess: function handleUploadSuccess(response, file, fileLis) {
      this.imagesList.push(response);
    },
    handleImageMouseOut: function handleImageMouseOut(index) {
      this.activeItemIndex = '';
    },
    handleImageMouseOver: function handleImageMouseOver(index) {
      this.activeItemIndex = index;
    },
    handleViewImage: function handleViewImage(item) {
      this.dialogVisible = true;
      this.dialogImageUrl = '/bpm/task/file-download/' + this.taskId + '/' + item.id;
    },
    handleViewTimeLineImage: function handleViewTimeLineImage(url) {
      this.dialogVisible = true;
      this.dialogImageUrl = url;
    },
    handleDownload: function handleDownload(item) {
      var a = document.createElement('a');
      if (typeof a.download === 'undefined') {
        var newUrl = window.location.protocol + "//" + window.location.host + '/bpm/task/file-download/' + this.taskId + '/' + item.id;
        window.open(newUrl);
      }
    },
    handleDeleteImage: function handleDeleteImage(item) {
      var _this2 = this;

      this.$confirm('确认删除当前附件？', '删除提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(function () {
        _this2.$http({
          url: '/bpm/task/file-delete/' + _this2.taskId + '/' + item.id,
          method: 'delete'
        }).then(function (res) {
          _this2.getImageList();
        }).catch(function () {
          _this2.$message({
            type: 'error',
            message: '删除流程附件出错'
          });
        });
      });
    },

    // 切换到审批
    changeType: function changeType() {
      this.showApprovalMessage = false;
    },

    // 原因选择 
    handleReasonChange: function handleReasonChange(val) {
      this.reason = val;
    },

    // 获取驳回是否显示按钮,以及驳回的id
    getConfig: function getConfig() {
      var _this3 = this;

      this.$http({
        method: 'get',
        url: '/bpm/task/opconfig/' + this.taskId
      }).then(function (res) {
        if (res.status === 200) {
          if (res.data.rejectAble) {
            _this3.showReject = true;
          }
          if (res.data.refuseAble) {
            _this3.showRefuse = true;
          }
          _this3.rejectReasons = res.data.rejectReasons;
          if (res.data.completeReasons) {
            _this3.completeReasons = res.data.completeReasons;
          }
          if (res.data.completeGroupReasons) {
            _this3.completeGroupReasons = res.data.completeGroupReasons;
          }
          if (res.data.refuseReasons) {
            _this3.refuseReasons = res.data.refuseReasons;
          }
          if (res.data.refuseGroupReasons) {
            _this3.refuseGroupReasons = res.data.refuseGroupReasons;
          }
          if (res.data.rejectActivitys) {
            _this3.rejectActivitys = res.data.rejectActivitys;
          }
          if (res.data.rejectGroupReasons) {
            _this3.rejectGroupReasons = res.data.rejectGroupReasons;
          }
        }
      }).catch(function () {
        _this3.$message({
          type: 'error',
          message: '请求流程按钮配置出错'
        });
      });
    },

    // 获取审批意见
    getApprovalMessage: function getApprovalMessage() {
      var _this4 = this;

      this.$http({
        method: 'get',
        url: '/bpm/task/comment-by-taskid/' + this.taskId
      }).then(function (res) {
        var resData = res;
        var that = _this4;
        var getStartEnd = that.getStartEnd();
        window.Promise.all([getStartEnd]).then(function () {
          that.historyDetailList = resData.data;
          that.translateHistoryDetailList = JSON.parse(JSON.stringify(resData.data));
          var commentsTemp = {};
          if (that.startEndMessage.endTime) {
            that.$set(commentsTemp, '00000000000000', {});
            that.$set(commentsTemp['00000000000000'], 'color', '#67C23A');
            that.$set(commentsTemp['00000000000000'], 'startEnd', true);
            that.$set(commentsTemp['00000000000000'], 'startEndName', '结束');
            that.$set(commentsTemp['00000000000000'], 'date', that.startEndMessage.endTime);
          }
          that.translateHistoryDetailList.forEach(function (element) {
            if (commentsTemp[element.taskId] === undefined) {
              that.$set(commentsTemp, element.taskId, {});
            }
            that.translateHistoryDetailList.forEach(function (element) {
              if (commentsTemp[element.taskId] == undefined) {
                that.$set(commentsTemp, element.taskId, {});
              }
              that.$set(commentsTemp[element.taskId], 'taskName', element.taskName);
              if (element.type !== "claim") {
                that.$set(commentsTemp[element.taskId], 'color', '#67C23A');
                that.$set(commentsTemp[element.taskId], "userCode", element.userCode);
                if (element.userName) {
                  that.$set(commentsTemp[element.taskId], "userName", element.userName);
                }
                that.$set(commentsTemp[element.taskId], "date", element.date);
                that.$set(commentsTemp[element.taskId], 'startEnd', false);
              }

              // 意见内容
              if (element.type.indexOf("|remind") > -1) {
                that.$set(commentsTemp[element.taskId], "remind", element.message);
              } else if (element.type.indexOf("|innerRemind") > -1) {
                that.$set(commentsTemp[element.taskId], "innerRemind", element.message);
              } else if (element.type.indexOf("|auditRecord") > -1) {
                that.$set(commentsTemp[element.taskId], "auditRecord", element.message);
              } else if (element.type.indexOf("|reason") > -1) {
                that.$set(commentsTemp[element.taskId], "reason", element.message);
              }

              // 操作类型
              if (element.type === "optype") {
                if (element.message === 'complete') {
                  that.$set(commentsTemp[element.taskId], "operate", '同意');
                } else if (element.message === 'reject') {
                  that.$set(commentsTemp[element.taskId], "operate", '驳回');
                } else if (element.message === 'refuse') {
                  that.$set(commentsTemp[element.taskId], "operate", '拒绝');
                }
              } else if (element.type === "file") {
                that.$set(commentsTemp[element.taskId], 'type', 'file');
                if (!commentsTemp[element.taskId].url) {
                  that.$set(commentsTemp[element.taskId], 'url', []);
                }
                commentsTemp[element.taskId].url.push({
                  type: element.message.split('.')[1],
                  url: '/bpm/task/file-download/' + _this4.taskId + '/' + element.id
                });
              } else if (element.type === "claim") {
                if (!commentsTemp[element.taskId].changeRecord) {
                  that.$set(commentsTemp[element.taskId], 'changeRecord', []);
                }
                commentsTemp[element.taskId].changeRecord.push({
                  record: that.$time.formatTime(element.date) + ' ' + element.message
                });
              } else {
                if (element.type.indexOf("complete") > -1) {
                  that.$set(commentsTemp[element.taskId], "operate", '同意');
                } else if (element.type.indexOf("reject") > -1) {
                  that.$set(commentsTemp[element.taskId], "operate", '驳回');
                } else if (element.type.indexOf("refuse") > -1) {
                  that.$set(commentsTemp[element.taskId], "operate", '拒绝');
                }
              }
            });
            if (that.startEndMessage.startTime) {
              that.$set(commentsTemp, 'start', {});
              that.$set(commentsTemp.start, 'color', '#67C23A');
              that.$set(commentsTemp.start, 'startEnd', true);
              that.$set(commentsTemp.start, 'startEndName', '开始');
              that.$set(commentsTemp.start, 'date', that.startEndMessage.startTime);
            }
            that.translateHistoryDetailList = commentsTemp;
          });
        }).catch(function () {
          _this4.$message({
            type: 'error',
            message: '请求审批意见出错'
          });
        });
      });
    },

    // 获取任务详细
    getTaskDetail: function getTaskDetail() {
      var _this5 = this;

      this.$http({
        method: 'get',
        url: '/bpm/task/info/' + this.taskId
      }).then(function (res) {
        if (res.data) {
          _this5.taskDetail = res.data;
        }
      }).catch(function () {
        _this5.$message({
          type: 'error',
          message: '请求任务详细出错'
        });
      });
    },
    getTaskId: function getTaskId() {
      if (this.$route.query && this.$route.query.taskId) {
        this.taskId = this.$route.query.taskId;
        this.showFlow = true;
        this.getConfig();
        this.getTaskDetail();
      }
      if (this.$route.query && this.$route.query.processInstanceId) {
        this.processInstanceId = this.$route.query.processInstanceId;
      }
    },
    getStartEnd: function getStartEnd() {
      var _this6 = this;

      return this.$http({
        method: 'get',
        url: '/bpm/process/' + this.processInstanceId
      }).then(function (res) {
        if (res.status === 200) {
          _this6.startEndMessage = res.data;
        }
      }).catch(function () {
        _this6.$message({
          type: 'error',
          message: '请求审批开始结束信息出错'
        });
      });
    },

    // 查看历史
    handleCheckHistory: function handleCheckHistory() {
      if (this.showType === 'horizontal') {
        this.showHistory = true;
      } else {
        this.showApprovalMessage = true;
      }
      this.getApprovalMessage();
    },

    // 关闭历史
    handleCloseHistory: function handleCloseHistory() {
      // this.$confirm('确认关闭?','关闭',{
      //   confirmButtonText: '确定',
      //   cancelButtonText: '取消',
      //   type: 'warning',
      // }).then(() => {
      this.showHistory = false;
      // });
    },
    handleAgreeBeforeAction: function handleAgreeBeforeAction() {
      if (this.operation) {
        if (this.showType === 'horizontal') {
          this.$emit('update:showMessage', true);
        }
      } else {
        this.$message({
          type: 'info',
          message: this.operationMessage
        });
      }
      if (!!this.agreeBeforeAction && this.agreeAsycHttp) {
        return this.agreeBeforeAction;
      } else {
        if (!this.agreeBeforeAction()) {
          return false;
        }
        return true;
      }
    },
    handleBeforeAction: function handleBeforeAction() {
      if (!this.beforeAction()) {
        return false;
      }
      if (this.operation) {
        if (this.showType === 'horizontal') {
          this.$emit('update:showMessage', true);
        }
      } else {
        this.$message({
          type: 'info',
          message: this.operationMessage
        });
      }
      return true;
    },

    // 选择的审批类型: 0:通过,1:驳回,2:拒绝
    handleApprovalCheckChange: function handleApprovalCheckChange(label) {
      this.approvalCheckedType = label;
      if (label === 0) {
        this.handleAgree();
      } else if (label === 1) {
        this.handleReject();
      } else if (label === 2) {
        this.handleRefuse();
      }
      this.reason = '';
      this.auditRecord = '';
      this.rejectNode = '';
      this.$emit('approval-change', label);
    },

    // 点击通过按钮
    handleAgree: function handleAgree() {
      this.approvalType = 'agree';
      if (this.showType === 'horizontal') {
        this.$emit("change", 'submit');
        if (this.submitBefore) {
          this.submitBeforeAction();
        } else {
          this.handleBeforeAction();
        }
      } else {
        this.$emit("change", 'agree');
        this.reasonList = this.completeReasons;
        this.reasonGroupObject = this.completeGroupReasons;
        this.showRejectRadio = false;
        this.operationType = true;
      }
    },

    // 点击退回驳回按钮
    handleReject: function handleReject() {
      this.approvalType = 'reject';
      if (this.showType === 'horizontal') {
        this.$emit("change", 'back');
        // if(this.handleBeforeAction()){
        this.reasonList = this.rejectReasons;
        this.reasonGroupObject = this.rejectGroupReasons;
        this.messageTitle = "退回";
        this.showRejectRadio = true;
        this.operationType = false;
        this.$emit('update:showMessage', true);
        // this.handleSubmitMessage();
        // }
      } else {
        this.$emit("change", 'reject');
        this.reasonList = this.rejectReasons;
        this.reasonGroupObject = this.rejectGroupReasons;
        this.messageTitle = "驳回";
        this.showRejectRadio = true;
        this.operationType = false;
      }
    },

    // 点击拒绝按钮
    handleRefuse: function handleRefuse() {
      this.approvalType = 'refuse';
      this.$emit("change", 'refuse');
      if (this.showType === 'horizontal') {
        if (this.handleBeforeAction()) {
          this.reasonList = this.refuseReasons;
          this.reasonGroupObject = this.refuseGroupReasons;
          this.messageTitle = "拒绝";
          this.showRejectRadio = false;
          // this.$emit('update:showMessage',true);
        }
      } else {
        this.reasonList = this.refuseReasons;
        this.reasonGroupObject = this.refuseGroupReasons;
        this.showRejectRadio = false;
      }
    },
    handleBack: function handleBack() {
      this.$router.push(this.confirmBackRouter);
    },

    // 关闭意见
    handleCloseMessage: function handleCloseMessage() {
      // this.$confirm('确认关闭?','关闭',{
      //   confirmButtonText: '确定',
      //   cancelButtonText: '取消',
      //   type: 'warning',
      // }).then(() => {
      this.$emit('update:showMessage', false);
      // });
    },
    handleVerticalSubmitMessage: function handleVerticalSubmitMessage() {
      var _this7 = this;

      if (this.approvalCheckedType === '') {
        this.$message({
          type: 'error',
          message: '请选择审批类型'
        });
        return;
      } else if (this.approvalCheckedType === 1) {
        if (!this.rejectNode) {
          this.$message({
            type: 'error',
            message: '请选择驳回环节'
          });
          return;
        }
      }
      if (this.reasonGroupObject && Object.keys(this.reasonGroupObject).length > 0 || this.reasonList && this.reasonList.length > 0) {
        var message = void 0;
        if (this.approvalType === 'agree') {
          message = '请选择通过原因';
        } else if (this.approvalType === 'reject') {
          message = '请选择驳回原因';
        } else if (this.approvalType === 'refuse') {
          message = '请选择拒绝原因';
        }
        if (!this.reason) {
          this.$message({
            type: 'error',
            message: message
          });
          return;
        }
      }
      if (!this.message) {
        this.$message({
          type: 'error',
          message: '请输入内部意见'
        });
        return;
      }
      if (!this.outMessage) {
        this.$message({
          type: 'error',
          message: '请输入外部意见'
        });
        return;
      }
      if (this.agreeBefore && this.approvalType === 'agree') {
        if (this.autoOperate) {
          if (this.agreeAsycHttp) {
            this.agreeBeforeAction().then(function (valid) {
              if (valid) {
                _this7.handleSubmitMessage();
              }
            });
          } else {
            if (this.handleAgreeBeforeAction()) {
              this.handleSubmitMessage();
            }
          }
        } else {
          this.handleAgreeBeforeAction();
        }
      }
      if (this.approvalType === 'reject') {
        if (this.autoReject) {
          if (this.rejectBeforeAction()) {
            this.handleSubmitMessage();
          }
        } else {
          this.rejectBeforeAction();
        }
      }
      if (this.approvalType === 'refuse') {
        if (this.autoRefuse) {
          if (this.refuseBeforeAction()) {
            this.handleSubmitMessage();
          }
        } else {
          this.refuseBeforeAction();
        }
      }
    },
    handleHorizontalSubmitMessage: function handleHorizontalSubmitMessage() {
      if (this.approvalType === 'agree') {
        if (!this.autoSubmit) {
          this.beforeSubmitAction();
        } else {
          this.handleSubmitMessage();
        }
      }
      if (this.approvalType === 'refuse') {
        if (!this.autoHorizontalRefuse) {
          this.beforeHorizantalRefuseAction();
        } else {
          this.handleSubmitMessage();
        }
      }
      if (this.approvalType === 'reject') {
        if (!this.autoHorizontalReject) {
          this.beforeHorizantalRejectAction();
        } else {
          this.handleSubmitMessage();
        }
      }
    },
    handleSubmitMessage: function handleSubmitMessage() {
      var _this8 = this;

      var submit = this.submitMessage();
      window.Promise.all([submit]).then(function () {
        _this8.$emit('after-action', _this8.messageSuccess);
        if (_this8.messageSuccess) {
          _this8.$router.push(_this8.backRouter);
        }
      }).catch(function (error) {
        console.log(error);
      });
    },

    // 意见提交,operationType: true 通过
    submitMessage: function submitMessage() {
      var _this9 = this;

      var url = void 0;
      var submitData = {};
      // let success = false;
      if (this.showType === 'horizontal') {
        if (this.approvalType === 'agree') {
          url = '/bpm/task/complete/' + this.taskId;
          submitData = {
            auditRecord: this.auditRecord,
            innerRemind: this.message,
            remind: this.outMessage,
            reason: this.reason
          };
        } else if (this.approvalType === 'reject') {
          url = '/bpm/task/reject/' + this.taskId;
          submitData = {
            targetActivityId: this.rejectActivitys[0].activityId,
            remind: this.outMessage
          };
        } else if (this.approvalType === 'refuse') {
          url = '/bpm/task/refuse/' + this.taskId;
          submitData = {
            remind: this.outMessage
          };
        }
      } else {
        if (this.reasonGroupObject && Object.keys(this.reasonGroupObject).length > 0 || this.reasonList && this.reasonList.length > 0) {
          var message = void 0;
          if (this.approvalType === 'agree') {
            message = '请选择通过原因';
          } else if (this.approvalType === 'reject') {
            message = '请选择驳回原因';
          } else if (this.approvalType === 'refuse') {
            message = '请选择拒绝原因';
          }
          if (!this.reason) {
            this.$message({
              type: 'error',
              message: message
            });
            return;
          }
        }
        if (!this.message) {
          this.$message({
            type: 'error',
            message: '请输入内部意见'
          });
          return;
        }
        if (!this.outMessage) {
          this.$message({
            type: 'error',
            message: '请输入外部意见'
          });
          return;
        }
        if (this.approvalType === 'agree') {
          url = '/bpm/task/complete/' + this.taskId;
          submitData = {
            auditRecord: this.auditRecord,
            innerRemind: this.message,
            remind: this.outMessage,
            reason: this.reason
          };
        } else if (this.approvalType === 'reject') {
          url = '/bpm/task/reject/' + this.taskId;
          submitData = {
            auditRecord: this.auditRecord,
            innerRemind: this.message,
            remind: this.outMessage,
            targetActivityId: this.rejectNode,
            reason: this.reason
          };
        } else if (this.approvalType === 'refuse') {
          url = '/bpm/task/refuse/' + this.taskId;
          submitData = {
            auditRecord: this.auditRecord,
            innerRemind: this.message,
            remind: this.outMessage,
            reason: this.reason
          };
        }
      }

      return this.$http({
        method: 'post',
        url: url,
        data: submitData
      }).then(function (res) {
        if (res.status === 200) {
          var successMessage = '';
          if (_this9.approvalType === 'agree') {
            if (_this9.showType === 'horizontal') {
              successMessage = "提交成功";
            } else {
              successMessage = "通过成功";
            }
          } else if (_this9.approvalType === 'reject') {
            if (_this9.showType === 'horizontal') {
              successMessage = "退回成功";
              _this9.$emit('update:showMessage', false);
            } else {
              successMessage = "驳回成功";
            }
          } else {
            successMessage = "拒绝成功";
          }
          _this9.$message({
            type: 'success',
            message: successMessage
          });
          _this9.messageSuccess = true;
        }
      }).catch(function () {
        var errorMessage = '';
        if (_this9.approvalType === 'agree') {
          if (_this9.showType === 'horizontal') {
            errorMessage = "提交失败";
          } else {
            errorMessage = "通过失败";
          }
        } else if (_this9.approvalType === 'reject') {
          if (_this9.showType === 'horizontal') {
            errorMessage = "退回失败";
          } else {
            errorMessage = "驳回失败";
          }
        } else {
          errorMessage = "拒绝失败";
        }
        _this9.$message({
          type: 'error',
          message: errorMessage
        });
        _this9.messageSuccess = false;
      });
    }
  },
  created: function created() {
    this.getTaskId();
    this.getImageList();
  }
});
// CONCATENATED MODULE: ./packages/aos-flow/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/aos-flow/src/main.vue





/* normalize component */

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

/* hot reload */
if (false) { var api; }
component.options.__file = "packages/aos-flow/src/main.vue"
/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/aos-flow/index.js

main.install = function (Vue) {
  Vue.component(main, main.name);
};
/* harmony default export */ var aos_flow = __webpack_exports__["default"] = (main);

/***/ })

/******/ });