/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	// The require scope
/******/ 	var __webpack_require__ = {};
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// 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 });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* binding */ process_flow; }
});

;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/process-flow/src/main.vue?vue&type=template&id=6a49c43c&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-process-flow"
  }, [_c("el-dialog", _vm._b({
    directives: [{
      name: "el-drag-dialog",
      rawName: "v-el-drag-dialog",
      value: true,
      expression: "true"
    }],
    ref: "elDialog",
    attrs: {
      width: _vm.dialogWidth,
      title: _vm.dialogTitle,
      visible: _vm.visible,
      "modal-append-to-body": _vm.modalAppendToBody,
      "append-to-body": _vm.appendToBody,
      top: "10vh"
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.visible = $event;
      },
      closed: _vm.closeDialog
    }
  }, "el-dialog", _vm.dialogAttrs, false), [_vm.showViewChartBtn ? _c("el-button", {
    staticClass: "change-chart-btn",
    attrs: {
      type: "primary"
    },
    on: {
      click: function click($event) {
        _vm.viewChart = !_vm.viewChart;
      }
    }
  }, [_vm._v("\n      " + _vm._s(_vm.viewChart ? "查看流程记录" : "查看流程图") + "\n    ")]) : _vm._e(), _vm.viewChart ? _c("flow-chart", {
    attrs: {
      piid: _vm.piid,
      "color-map": _vm.colorMap
    }
  }) : _c("el-table", _vm._g(_vm._b({
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loading,
      expression: "loading"
    }],
    attrs: {
      data: _vm.list
    }
  }, "el-table", _vm.tableAttrs, false), _vm.tableEvents), [_vm._l(_vm.columns, function (item, index) {
    return [["index", "selection"].includes(item.type) ? _c("el-table-column", {
      key: "".concat(item.prop, "Index"),
      attrs: {
        label: item.label,
        width: item.width,
        "min-width": item.minWidth,
        align: item.align,
        type: item.type
      }
    }) : _vm.useBrowserTitle ? _c("el-table-column", {
      key: item.prop,
      attrs: {
        width: item.width,
        "min-width": item.minWidth,
        label: item.label,
        prop: item.prop,
        align: item.align
      },
      scopedSlots: _vm._u([{
        key: "default",
        fn: function fn(_ref) {
          var row = _ref.row;
          return [_c("span", {
            staticClass: "tooltip",
            class: {
              "not-handle": !row.operateTime
            },
            attrs: {
              set: _vm.text = item.formatter ? item.formatter(row) : row[item.prop],
              title: _vm.text
            }
          }, [_vm._v(_vm._s(_vm.text))])];
        }
      }], null, true)
    }) : _c("el-table-column", {
      key: index,
      attrs: {
        "show-overflow-tooltip": "",
        width: item.width,
        "min-width": item.minWidth,
        label: item.label,
        prop: item.prop,
        align: item.align
      },
      scopedSlots: _vm._u([{
        key: "default",
        fn: function fn(_ref2) {
          var row = _ref2.row;
          return [_c("span", {
            class: {
              "not-handle": !row.operateTime
            },
            attrs: {
              set: _vm.text = item.formatter ? item.formatter(row) : row[item.prop]
            }
          }, [_vm._v(_vm._s(_vm.text))])];
        }
      }], null, true)
    })];
  })], 2)], 1)], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/process-flow/src/main.vue?vue&type=template&id=6a49c43c&

;// CONCATENATED MODULE: external "@babel/runtime/helpers/asyncToGenerator"
var asyncToGenerator_namespaceObject = require("@babel/runtime/helpers/asyncToGenerator");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/regenerator"
var regenerator_namespaceObject = require("@babel/runtime/regenerator");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_namespaceObject);
;// CONCATENATED MODULE: external "jdf-jssdk"
var external_jdf_jssdk_namespaceObject = require("jdf-jssdk");
;// CONCATENATED MODULE: external "globalthis/implementation"
var implementation_namespaceObject = require("globalthis/implementation");
;// CONCATENATED MODULE: external "xregexp"
var external_xregexp_namespaceObject = require("xregexp");
var external_xregexp_default = /*#__PURE__*/__webpack_require__.n(external_xregexp_namespaceObject);
;// CONCATENATED MODULE: ./src/directives/el-drag-dialog/drag.js
/*
 * @Author: lirl
 * @Date: 2020-08-03 10:31:13
 * @LastEditTime: 2022-12-07 14:35:00
 * @Description: dialog拖动
 */



/** 宽度高度为百分比 */
var PERSENT_WH = external_xregexp_default()('%', 'g');
/** 宽度高度为像素 */
var PIXEL_WH = external_xregexp_default()('px', 'g');
/* harmony default export */ var drag = ({
  bind: function bind(el, binding, vnode) {
    // 自定义属性，判断是否可拖拽
    if (!binding.value) return;
    var dialogHeaderEl = el.querySelector('.el-dialog__header');
    var dragDom = el.querySelector('.el-dialog');
    dialogHeaderEl.style.cssText += ';cursor:move;';
    dragDom.style.cssText += ';top:0px;';

    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
    var getStyle = function () {
      if (implementation_namespaceObject.window.document.currentStyle) {
        return function (dom, attr) {
          return dom.currentStyle[attr];
        };
      }
      return function (dom, attr) {
        return getComputedStyle(dom, false)[attr];
      };
    }();
    dialogHeaderEl.onmousedown = function (e) {
      // 鼠标按下，计算当前元素距离可视区的距离
      var disX = e.clientX - dialogHeaderEl.offsetLeft;
      var disY = e.clientY - dialogHeaderEl.offsetTop;
      var dragDomWidth = dragDom.offsetWidth;
      var dragDomheight = dragDom.offsetHeight;
      var screenWidth = implementation_namespaceObject.document.body.clientWidth;
      var screenHeight = implementation_namespaceObject.document.body.clientHeight;
      var minDragDomLeft = dragDom.offsetLeft + dragDomWidth * 0.7;
      var maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth * 0.3;
      var minDragDomTop = dragDom.offsetTop;
      var maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight * 0.3;

      // 获取到的值带px 正则匹配替换
      var styL = getStyle(dragDom, 'left');
      var styT = getStyle(dragDom, 'top');
      if (styL.includes('%')) {
        styL = +implementation_namespaceObject.document.body.clientWidth * (+external_xregexp_default().replace(styL, PERSENT_WH, '') / 100);
        styT = +implementation_namespaceObject.document.body.clientHeight * (+external_xregexp_default().replace(styT, PERSENT_WH, '') / 100);
      } else {
        styL = +external_xregexp_default().replace(styL, PIXEL_WH, '');
        styT = +external_xregexp_default().replace(styT, PIXEL_WH, '');
      }
      implementation_namespaceObject.document.onmousemove = function (evt) {
        // 通过事件委托，计算移动的距离
        var left = evt.clientX - disX;
        var top = evt.clientY - disY;

        // 边界处理
        if (-left > minDragDomLeft) {
          left = -minDragDomLeft;
        } else if (left > maxDragDomLeft) {
          left = maxDragDomLeft;
        }
        if (-top > minDragDomTop) {
          top = -minDragDomTop;
        } else if (top > maxDragDomTop) {
          top = maxDragDomTop;
        }

        // 移动当前元素
        dragDom.style.cssText += ";left:".concat(left + styL, "px;top:").concat(top + styT, "px;");

        // emit onDrag event
        vnode.child.$emit('dragDialog');
      };
      implementation_namespaceObject.document.onmouseup = function () {
        implementation_namespaceObject.document.onmousemove = null;
        implementation_namespaceObject.document.onmouseup = null;
      };
    };
  }
});
;// CONCATENATED MODULE: ./src/directives/el-drag-dialog/index.js


var install = function install(Vue) {
  Vue.directive('el-drag-dialog', drag);
};
if (implementation_namespaceObject.window.Vue) {
  implementation_namespaceObject.window['el-drag-dialog'] = drag;
  implementation_namespaceObject.window.Vue.use(install);
}
drag.install = install;
/* harmony default export */ var el_drag_dialog = (drag);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/defineProperty"
var defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_namespaceObject);
;// CONCATENATED MODULE: ./src/mixins/dialogAttrs.js

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/* eslint-disable no-undef */
/* eslint-disable no-param-reassign */
/*
 * @Author: lirl
 * @Date: 2023-02-02 19:37:40
 * @Description: file content
 */
/* harmony default export */ var dialogAttrs = ({
  data: function data() {
    var _this$$JDF = this.$JDF,
      dialogAttrs = _this$$JDF.dialogAttrs,
      lockScroll = _this$$JDF.lockScroll;
    return {
      // el-dialog属性，closeOnClickModal需要设为false，这样才可以向遮罩层添加关闭弹窗事件
      dialogAttrs: dialogAttrs ? _objectSpread(_objectSpread({}, dialogAttrs), {}, {
        closeOnClickModal: false
      }) : {
        appendToBody: true,
        lockScroll: lockScroll !== null && lockScroll !== void 0 ? lockScroll : false,
        closeOnClickModal: false,
        closeOnPressEscape: false,
        customClass: 'jdf-common-dialog'
      },
      // 当前为拖动鼠标还是点击鼠标
      isMove: false
    };
  },
  methods: {
    /**
     * 添加关闭弹窗事件，鼠标拖动到遮罩时不关闭弹窗，鼠标点击到遮罩时关闭弹窗
     */
    addCloseDialogEvent: function addCloseDialogEvent(dialogRef) {
      var _this = this;
      this.$nextTick(function () {
        var isMove = _this.isMove;
        var dialogEles = document.querySelectorAll('.el-dialog__wrapper');
        var handleMousemove = function handleMousemove() {
          isMove = true;
        };
        dialogEles === null || dialogEles === void 0 ? void 0 : dialogEles.forEach(function (ele) {
          if (ele) {
            ele.onclick = function (event) {
              if (!isMove && event.target === ele) {
                var dialogName = dialogRef || 'elDialog';
                _this.$refs[dialogName].handleClose();
              }
            };
            ele.onmousedown = function () {
              isMove = false;
              window.addEventListener('mousemove', handleMousemove);
            };
            ele.onmouseup = function () {
              return window.removeEventListener('mousemove', handleMousemove);
            };
          }
        });
      });
    }
  }
});
;// CONCATENATED MODULE: external "element-ui"
var external_element_ui_namespaceObject = require("element-ui");
;// CONCATENATED MODULE: external "lodash/isString"
var isString_namespaceObject = require("lodash/isString");
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/message.js


/*
 * @Author: lirl
 * @Date: 2020-06-03 15:09:21
 * @LastEditTime: 2023-03-02 14:10:57
 * @Description: 消息提示
 */
// 信息提示框




var TOKEN_CODES = ['B004-000-10', 'B004-000-11', 'B004-000-09'];

/**
 * 消息提示框.
 * @param {String} text 消息提示文字
 * @param {String} type success/warning/info/error,默认为success
 */
var message = function message(text) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2000;
  var showClose = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  var className = type === 'success' ? 'pj-common-message' : 'pj-ui-validate';
  return Message({
    message: text,
    type: type,
    offset: 300,
    dangerouslyUseHTMLString: false,
    duration: duration,
    showClose: showClose,
    customClass: className
  });
};

/**
 * 弹出提示框.
 * @param {String} content 提示内容
 * @param {String} type 提示类型 success / info / warning / error
 * @param {Boolean} center 是否居中显示
 */
var messageAlert = function messageAlert(content) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var center = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  return external_element_ui_namespaceObject.MessageBox.alert(content, '提示', {
    confirmButtonText: '确定',
    type: type,
    dangerouslyUseHTMLString: false,
    center: center
  });
};

/**
 * 弹出确认框.
 * @param {String} content 提示内容
 * @param {Function} yes 点击确定按钮的回调
 * @param {Function} cancel 点击取消按钮的回调
 * @returns Promise 调用方式： mmessageConfirm("提示信息", () => {
 *  alert('确定');
 * }, () => {
 *  alert('取消');
 * })
 */
var messageConfirm = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(content, yes, cancel) {
    var title,
      _args = arguments;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          title = _args.length > 3 && _args[3] !== undefined ? _args[3] : '温馨提示';
          _context.prev = 1;
          _context.next = 4;
          return MessageBox.confirm(content, title, {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            cancelButtonClass: 'fr ml10',
            confirmButtonClass: 'fr',
            type: 'warning',
            lockScroll: false,
            dangerouslyUseHTMLString: false,
            iconClass: 'el-icon-question orange'
          });
        case 4:
          return _context.abrupt("return", yes === null || yes === void 0 ? void 0 : yes());
        case 7:
          _context.prev = 7;
          _context.t0 = _context["catch"](1);
          cancel === null || cancel === void 0 ? void 0 : cancel();
          return _context.abrupt("return", false);
        case 11:
        case "end":
          return _context.stop();
      }
    }, _callee, null, [[1, 7]]);
  }));
  return function messageConfirm(_x, _x2, _x3) {
    return _ref.apply(this, arguments);
  };
}()));
var showErrorMsg = function showErrorMsg(error, customClass) {
  var msg = isString(error) ? error : error === null || error === void 0 ? void 0 : error.message;
  msg && Message({
    message: msg,
    type: 'warning',
    offset: 300,
    dangerouslyUseHTMLString: false,
    duration: 3000,
    showClose: true,
    customClass: customClass
  });
};

/**
 * 弹出接口错误信息
 */
var alertErrorMsg = function alertErrorMsg(error) {
  if (!error) {
    return;
  }
  if (isString_default()(error)) {
    messageAlert(error, 'warning');
    return;
  }
  var ssoPage = sessionStorage.getItem('ssoPage');
  if (TOKEN_CODES.includes(error.code) && ssoPage) {
    implementation_namespaceObject.window.open(decodeURIComponent(ssoPage), '_self');
  } else {
    var msg = error === null || error === void 0 ? void 0 : error.message;
    msg && messageAlert(msg, 'warning');
  }
};
var showSubmitPrompt = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(msg, wordLimit, isRequired, yesCallback, cancelCallback) {
    var inputWordLimit, _yield$MessageBox$pro, value;
    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          _context2.prev = 0;
          inputWordLimit = wordLimit !== null && wordLimit !== void 0 ? wordLimit : 200;
          _context2.next = 4;
          return MessageBox.prompt(msg, '流程提交', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            cancelButtonClass: 'fr ml10',
            confirmButtonClass: 'fr',
            inputValidator: function inputValidator(v) {
              if (isRequired && isEmptyStr(v)) {
                return '请填写意见';
              }
              if ((v === null || v === void 0 ? void 0 : v.length) > inputWordLimit) {
                return "\u8BF7\u6700\u591A\u8F93\u5165".concat(inputWordLimit, "\u5B57");
              }
              return true;
            },
            inputErrorMessage: '请填写意见',
            closeOnClickModal: false,
            inputType: 'textarea',
            inputPlaceholder: "\u8BF7\u586B\u5199\u610F\u89C1\uFF0C\u6700\u591A".concat(inputWordLimit, "\u5B57")
          });
        case 4:
          _yield$MessageBox$pro = _context2.sent;
          value = _yield$MessageBox$pro.value;
          yesCallback === null || yesCallback === void 0 ? void 0 : yesCallback(value);
          _context2.next = 12;
          break;
        case 9:
          _context2.prev = 9;
          _context2.t0 = _context2["catch"](0);
          cancelCallback === null || cancelCallback === void 0 ? void 0 : cancelCallback();
        case 12:
        case "end":
          return _context2.stop();
      }
    }, _callee2, null, [[0, 9]]);
  }));
  return function showSubmitPrompt(_x4, _x5, _x6, _x7, _x8) {
    return _ref2.apply(this, arguments);
  };
}()));
;// CONCATENATED MODULE: external "dayjs"
var external_dayjs_namespaceObject = require("dayjs");
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/day-util.js
/*
 * @Author: lirl
 * @Date: 2020-04-21 10:08:54
 * @LastEditTime: 2022-04-21 09:40:22
 * @Description: 日期转换工具方法
 */


/**
 * 将毫秒值的时间格式化为format格式.
 * @param {Number} millisecond 毫秒
 * @param {String} format 要转换的格式
 */
var formatMillisecondToString = function formatMillisecondToString(millisecond) {
  var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
  return millisecond ? external_dayjs_default()(millisecond).format(format) : '';
};

/**
 * 获取当前时间的毫秒值
 */
var getCurrentMillisecond = function getCurrentMillisecond() {
  return dayjs().valueOf();
};

;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/process-flow/src/flow-chart.vue?vue&type=template&id=7b028bd3&
var flow_chartvue_type_template_id_7b028bd3_render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "FlowChart"
  }, [_vm._m(0), _vm._m(1), _c("div", {
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loading,
      expression: "loading"
    }],
    staticStyle: {
      "min-height": "300px"
    },
    attrs: {
      id: "flowGraph"
    }
  })]);
};
var flow_chartvue_type_template_id_7b028bd3_staticRenderFns = [function () {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticStyle: {
      width: "0px",
      opacity: "0"
    }
  }, [_c("i", {
    staticClass: "iconfont icon-yonghu-xianxing"
  })]);
}, function () {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", [_c("span", [_c("span", {
    staticClass: "node-info green"
  }, [_vm._v("绿色")]), _c("span", [_vm._v(":此节点所有任务处理完成；")])]), _c("span", [_c("span", {
    staticClass: "node-info red"
  }, [_vm._v("红色")]), _c("span", [_vm._v(":此节点有任务，但没有任何一项完成；")])]), _c("span", [_c("span", {
    staticClass: "node-info green"
  }, [_vm._v("绿")]), _c("span", {
    staticClass: "node-info red"
  }, [_vm._v("红")]), _c("span", [_vm._v(":此节点有部分任务完成。")])]), _c("p", {
    staticClass: "text"
  }, [_vm._v("当您将鼠标悬停在流程图环节节点上时，即可获取详细的环节处理情况信息。")]), _c("span", {
    staticStyle: {
      opacity: "0"
    },
    attrs: {
      id: "text"
    }
  })]);
}];
flow_chartvue_type_template_id_7b028bd3_render._withStripped = true;

;// CONCATENATED MODULE: ./packages/process-flow/src/flow-chart.vue?vue&type=template&id=7b028bd3&

;// CONCATENATED MODULE: external "@antv/g6"
var g6_namespaceObject = require("@antv/g6");
var g6_default = /*#__PURE__*/__webpack_require__.n(g6_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/classCallCheck"
var classCallCheck_namespaceObject = require("@babel/runtime/helpers/classCallCheck");
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/createClass"
var createClass_namespaceObject = require("@babel/runtime/helpers/createClass");
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass_namespaceObject);
;// CONCATENATED MODULE: ./packages/process-flow/src/rectAttr.js



function rectAttr_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function rectAttr_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? rectAttr_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : rectAttr_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/*
 * @Author: lirl
 * @Date: 2023-01-16 17:44:03
 * @Description: file content
 */

/**
 * @param {*} str : 字符串
 * @param {*} fontSize ： 字符串fontsize
 */
function getMaxLabelWidth(str, fontSize) {
  var dom = implementation_namespaceObject.document.getElementById('text');
  dom.innerHTML = str;
  dom.style.fontSize = fontSize;
  return dom.getBoundingClientRect().width + 60;
}

// 环节类型和iconfont的映射
// 0 : 普通环节 1： 开始环节 2： 结束环节  3.自动提交环节
// g6的iconfont图标请参考https://g6-v3-2.antv.vision/zh/docs/manual/advanced/iconfont
// 值为 \u + 图标的unicode
var iconMap = {
  0: "\uE8C8",
  1: "\uE626",
  2: "\uE614",
  3: "\uE64D"
};
var nodeAttr = /*#__PURE__*/function () {
  function nodeAttr(shape, fill, stroke, height, width) {
    classCallCheck_default()(this, nodeAttr);
    this.fill = fill;
    this.stroke = stroke;
    this.height = height;
    this.width = width;
    this.shape = shape;
    this.iconMap = iconMap;
  }
  createClass_default()(nodeAttr, [{
    key: "getAttr",
    value: function getAttr(cfg, fontSize) {
      var _cfg$fill = cfg.fill,
        fill = _cfg$fill === void 0 ? this.fill : _cfg$fill,
        _cfg$stroke = cfg.stroke,
        stroke = _cfg$stroke === void 0 ? this.stroke : _cfg$stroke,
        size = cfg.size,
        nodeType = cfg.nodeType,
        id = cfg.id,
        cid = cfg.cid,
        label = cfg.label;
      var height = (size === null || size === void 0 ? void 0 : size[1]) || cfg.height || this.height;
      var width = (size === null || size === void 0 ? void 0 : size[0]) || cfg.width || this.width;
      var maxWidth = getMaxLabelWidth(label, fontSize);
      var trueWidth = Math.max(width, maxWidth);
      return {
        fill: fill,
        stroke: stroke,
        height: height,
        width: trueWidth,
        x: -trueWidth / 2,
        y: -height / 2,
        radius: 4,
        nodeType: nodeType,
        id: id,
        cid: cid,
        originWidth: width
      };
    }
  }, {
    key: "getHalfAttr",
    value: function getHalfAttr(cfg, fontSize) {
      var attr = this.getAttr(cfg, fontSize);
      var width = attr.width;
      return [rectAttr_objectSpread(rectAttr_objectSpread({}, attr), {}, {
        width: width / 2,
        radius: [4, 0, 0, 4],
        stroke: null
      }), rectAttr_objectSpread(rectAttr_objectSpread({}, attr), {}, {
        width: width / 2,
        radius: [0, 4, 4, 0],
        x: 0,
        stroke: null
      })];
    }
  }, {
    key: "getImageAttr",
    value: function getImageAttr(cfg, trueWidth) {
      var size = cfg.size,
        nodeType = cfg.nodeType;
      var width = (size === null || size === void 0 ? void 0 : size[0]) || cfg.width || this.width;
      return {
        x: -Math.max(trueWidth, width) / 2 + 8,
        y: -2,
        fontSize: 22,
        textAlign: 'left',
        textBaseline: 'middle',
        text: iconMap[nodeType] || 'ue614',
        fontFamily: 'iconfont',
        fill: '#99B9B9'
      };
    }
  }]);
  return nodeAttr;
}();
/* harmony default export */ var rectAttr = (nodeAttr);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/inherits"
var inherits_namespaceObject = require("@babel/runtime/helpers/inherits");
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/possibleConstructorReturn"
var possibleConstructorReturn_namespaceObject = require("@babel/runtime/helpers/possibleConstructorReturn");
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/getPrototypeOf"
var getPrototypeOf_namespaceObject = require("@babel/runtime/helpers/getPrototypeOf");
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf_namespaceObject);
;// CONCATENATED MODULE: ./packages/process-flow/src/circleAttr.js






function circleAttr_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function circleAttr_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? circleAttr_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : circleAttr_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/*
 * @Author: lirl
 * @Date: 2022-10-29 19:56:49
 * @Description: file content
 */
// circle 节点参数

var CircleAttr = /*#__PURE__*/function (_NodeAttr) {
  inherits_default()(CircleAttr, _NodeAttr);
  var _super = _createSuper(CircleAttr);
  function CircleAttr(shape, fill, stroke, r) {
    var _this;
    classCallCheck_default()(this, CircleAttr);
    _this = _super.call(this, shape, fill, stroke, r, r);
    _this.imgAttr = {
      x: 0,
      y: 0,
      fontSize: 20,
      textAlign: 'center',
      textBaseline: 'middle',
      fontFamily: 'iconfont',
      fill: '#6F93AF'
    };
    return _this;
  }
  createClass_default()(CircleAttr, [{
    key: "getAttr",
    value: function getAttr(cfg) {
      var _cfg$nodeType = cfg.nodeType,
        nodeType = _cfg$nodeType === void 0 ? this.nodeType : _cfg$nodeType,
        _cfg$stroke = cfg.stroke,
        stroke = _cfg$stroke === void 0 ? this.stroke : _cfg$stroke,
        _cfg$fill = cfg.fill,
        fill = _cfg$fill === void 0 ? this.fill : _cfg$fill;
      return {
        nodeType: nodeType,
        r: 25,
        fill: fill,
        stroke: stroke,
        x: 0,
        y: 0
      };
    }
  }, {
    key: "getImageAttr",
    value: function getImageAttr(cfg) {
      var nodeType = cfg.nodeType;
      return circleAttr_objectSpread(circleAttr_objectSpread({}, this.imgAttr), {}, {
        text: this.iconMap[nodeType] || 'uf04b'
      });
    }
  }]);
  return CircleAttr;
}(rectAttr);
/* harmony default export */ var circleAttr = (CircleAttr);
;// CONCATENATED MODULE: ./packages/process-flow/src/CustomNode.js


/* eslint-disable no-underscore-dangle */
/*
 * @Author: lirl
 * @Date: 2023-01-16 17:44:03
 * @Description: file content
 */



var anchorPoints = [
// 锚点相对坐标，前4个坐标顺序不能变，兼容之前流程图锚点顺序。
[0, 0.5], [0.5, 0], [0.5, 1], [1, 0.5], [0.1, 0], [0.2, 0], [0.3, 0], [0.4, 0], [0.6, 0], [0.7, 0], [0.8, 0], [0.9, 0], [0.1, 1], [0.2, 1], [0.3, 1], [0.4, 1], [0.6, 1], [0.7, 1], [0.8, 1], [0.9, 1], [0, 0.25], [0, 0.75], [1, 0.25], [1, 0.75]];
var CustomNode = /*#__PURE__*/function () {
  function CustomNode(shape, fill, stroke, name, width, height, fontSize) {
    classCallCheck_default()(this, CustomNode);
    this.shape = shape;
    this.fill = fill;
    this.stroke = stroke;
    this.name = name;
    this.height = height;
    this.width = width;
    this.fontSize = fontSize;
  }
  createClass_default()(CustomNode, [{
    key: "drawer",
    value: function drawer(cfg, group) {
      var _nodeStyle = cfg._nodeStyle;
      // 更据添加节点参数， 判断节点类型
      var attr = _nodeStyle === 'circle' ? new circleAttr(_nodeStyle, this.fill, this.stroke, this.width) : new rectAttr(_nodeStyle, this.fill, this.stroke, this.width, this.height);
      // group的显示顺序和添加顺序一致， 即越晚添加的group显示在上层
      // ------- mainGroup, 主体的circle或者rect
      var mainGroup = group.addGroup({
        id: 'mainGroup',
        name: 'mainGroup',
        capture: true
      });

      // rect 或者 circle的属性
      var mainAttrs = attr.getAttr(cfg, this.fontSize);
      var keyShape = mainGroup.addShape(attr.shape, {
        attrs: mainAttrs,
        name: 'key-shape'
      });
      // ------- mainGroup  end

      // ------  为了显示两种颜色， 用colorgroup 添加两个小的rect
      if (cfg._nodeStyle !== 'circle') {
        var colorGroup = group.addGroup({
          id: 'colorGroup',
          name: 'colorGroup'
        });
        var halfAttr = attr.getHalfAttr(cfg, this.fontSize);
        halfAttr.forEach(function (att) {
          colorGroup.addShape(attr.shape, {
            attrs: att,
            name: 'color-shape'
          });
        });
      }
      // ---- colorgroup end

      // ------- 图片和文字Group
      var imgTextGroup = group.addGroup({
        id: 'imgTextGroup',
        name: 'imgGroup'
      });
      var imageAttr = attr.getImageAttr(cfg, mainAttrs.width);
      if (cfg.img) {
        imgTextGroup.addShape('text', {
          attrs: imageAttr,
          name: 'img-shape'
        });
      }
      // const imageX = imageAttr.fontSize;
      // const { width, originWidth } = mainAttrs;
      imgTextGroup.addShape('text', {
        attrs: {
          x: 0,
          y: 0,
          textAlign: 'center',
          textBaseline: 'middle',
          text: cfg.label || '',
          fill: '#000',
          id: 'label',
          fontSize: this.fontSize
        },
        name: 'text-shape'
      });
      // -------- 图片文字group end

      return keyShape;
    }
  }, {
    key: "regiestNode",
    value: function regiestNode() {
      var self = this;
      g6_default().registerNode(this.name, {
        draw: function draw(cfg, group) {
          return self.drawer(cfg, group);
        },
        update: function update(cfg, item) {
          var _container$findById;
          var container = item.getContainer();
          var mainGroup = container.findById('mainGroup');
          var keyShape = mainGroup.get('children')[0];
          var colorShapes = (_container$findById = container.findById('colorGroup')) === null || _container$findById === void 0 ? void 0 : _container$findById.get('children');
          if (colorShapes && colorShapes.length > 0) {
            colorShapes.forEach(function (shape, index) {
              shape.attr({
                fill: cfg.rectFill && cfg.rectFill[index] || cfg.fill
              });
            });
          } else {
            keyShape.attr({
              fill: cfg.fill
            });
          }
        },
        getAnchorPoints: function getAnchorPoints() {
          return anchorPoints;
        }
      });
    }
  }]);
  return CustomNode;
}();
/* harmony default export */ var src_CustomNode = (CustomNode);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/process-flow/src/flow-chart.vue?vue&type=script&lang=js&


function flow_chartvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function flow_chartvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? flow_chartvue_type_script_lang_js_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : flow_chartvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }








var taskType = {
  TODO: '1',
  DONE: '2',
  TOREAD: '3',
  READED: '4',
  AUTODONE: '04'
};

// 1. 待办， 2: 已办, 3：待阅，4：已阅
// 该任务为待办状态
var isRunningType = function isRunningType(task) {
  return [taskType.TODO, taskType.TOREAD].includes(task === null || task === void 0 ? void 0 : task.taskType);
};
// 该任务为已办状态
var isFinishType = function isFinishType(task) {
  return [taskType.DONE, taskType.READED, taskType.AUTODONE].includes(task === null || task === void 0 ? void 0 : task.taskType);
};
/* harmony default export */ var flow_chartvue_type_script_lang_js_ = ({
  props: {
    // 流程实例id
    piid: {
      type: String,
      default: '',
      required: true
    },
    colorMap: {
      type: Object,
      default: function _default() {
        return {
          green: '#79c95b',
          red: '#ff3f3b',
          gray: '#C0C0C0'
        };
      }
    }
  },
  data: function data() {
    return {
      // 流程跟踪列表
      traceList: [],
      loading: false
    };
  },
  created: function created() {
    this.initChart();
  },
  methods: {
    initChart: function initChart() {
      var _this$colorMap = this.colorMap,
        green = _this$colorMap.green,
        red = _this$colorMap.red,
        gray = _this$colorMap.gray;
      var colorObj = {
        green: [green, green],
        gray: [gray, gray],
        red: [red, red],
        greenRed: [green, red],
        greenGray: [green, gray]
      };
      this.getTraceInfo(colorObj);
    },
    /**
     * 获取流程流转信息
     */
    getTraceInfo: function getTraceInfo(colorObj) {
      var _this = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var data;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.prev = 0;
              _this.loading = true;
              _context.next = 4;
              return new external_jdf_jssdk_namespaceObject.ProcessApiService(_this.$JDF.bizUrl).getProcessTraceInfo(_this.piid);
            case 4:
              data = _context.sent;
              _this.traceList = data.traceList;
              _this.renderFlowGraph(data, colorObj);
              _context.next = 12;
              break;
            case 9:
              _context.prev = 9;
              _context.t0 = _context["catch"](0);
              alertErrorMsg(_context.t0);
            case 12:
              _context.prev = 12;
              _this.loading = false;
              return _context.finish(12);
            case 15:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[0, 9, 12, 15]]);
      }))();
    },
    /**
     * 返回环节所绘颜色
     * @param { Array } traceList 流程跟踪列表
     * @returns { String[] } 环节颜色
     */
    getRenderColor: function getRenderColor(traceList, colorObj) {
      if (isEmpty_default()(traceList)) {
        return null;
      }
      // 获取任务列表, 排除待阅、已阅
      var tasks = traceList.map(function (t) {
        return t.taskVo;
      }).filter(function (t) {
        return t;
      });
      // 任务全都是就绪状态，显示红色
      if (tasks.every(function (t) {
        return isRunningType(t);
      })) {
        return colorObj.red;
      }

      // 任务全是完成状态，显示绿色
      if (tasks.every(function (task) {
        return isFinishType(task);
      })) {
        return colorObj.green;
      }
      // 有部分任务是完成状态，显示红绿色
      return tasks.some(function (task) {
        return isFinishType(task);
      }) ? colorObj.greenRed : null;
    },
    /**
     * 创建工具栏
     */
    createToolBar: function createToolBar() {
      var toolbar = new (g6_default()).ToolBar({
        getContent: function getContent() {
          return "\n          <ul class=\"g6-component-toolbar\">\n            <li code=\"zoomIn\" title=\"\u653E\u5927\">\n              <button type=\"button\" class=\"icon\"><i class=\"el-icon-zoom-in\"></i></button>\n            </li>\n            <li code=\"zoomOut\" title=\"\u7F29\u5C0F\">\n              <button type=\"button\" class=\"icon\"><i class=\"el-icon-zoom-out\"></i></button>\n            </li>\n            <li code=\"autoZoom\" title=\"\u9002\u5E94\u5C4F\u5E55\">\n              <button type=\"button\" class=\"icon\"><i class=\"el-icon-full-screen\"></i></button>\n            </li>\n            <li code=\"realZoom\" title=\"\u5B9E\u9645\u5927\u5C0F\">\n              <button type=\"button\" class=\"icon\"><i class=\"el-icon-c-scale-to-original\"></i></button>\n            </li>\n          </ul>\n        ";
        },
        handleClick: function handleClick(code) {
          if (code === 'zoomIn') {
            toolbar.zoomOut();
          } else if (code === 'zoomOut') {
            toolbar.zoomIn();
          } else if (code === 'autoZoom') {
            toolbar.autoZoom();
          } else if (code === 'realZoom') {
            toolbar.realZoom();
          }
        }
      });
      return toolbar;
    },
    /**
     * 为节点创建tooltip
     */
    createTooltip: function createTooltip(traceList) {
      var tooltip = new (g6_default()).Tooltip({
        className: 'flow-tooltip',
        itemTypes: ['node'],
        trigger: 'mouseenter',
        offsetX: 0,
        offsetY: 0,
        shouldBegin: function shouldBegin(e) {
          return !['_BOF', '_EOF'].includes(e.item.getModel().nodeCode);
        },
        getContent: function getContent(e) {
          var _e$item$getModel = e.item.getModel(),
            nodeCode = _e$item$getModel.nodeCode;
          var nodeData = traceList.filter(function (item) {
            return item.nodeKey === nodeCode && item.operateUser;
          });
          if (isEmpty_default()(nodeData)) {
            return '';
          }
          var tooltipHtml = "\n            <div class=\"tooltip\">\n              ".concat(nodeData.map(function (item) {
            var operateTime = item.operateTime;
            return "<div class=\"tooltip-item\">\n                  <div class=\"operate-user\">\n                    <span class=\"label\">\u5904\u7406\u4EBA\uFF1A</span>\n                    <span class=\"text\">".concat(item.operateUser.userName, "</span>\n                  </div>\n                  <div class=\"status\">\n                    <span class=\"label\">\u72B6\u6001\uFF1A</span>\n                    <span class=\"text\" style=\"color: ").concat(operateTime ? '#79c95b' : '#ff3f3b', "\">\n                      ").concat(operateTime ? '已处理' : '未处理', "\n                    </span>\n                  </div>\n                  <div class=\"time\">\n                    <span class=\"label\">\u5904\u7406\u65F6\u95F4\uFF1A</span>\n                    <span class=\"text\">").concat(formatMillisecondToString(operateTime) || '-', "</span>\n                  </div>\n                </div>");
          }).join(''), "\n            </div>");
          return tooltipHtml;
        }
      });
      return tooltip;
    },
    /**
     * 渲染流程图
     */
    renderFlowGraph: function renderFlowGraph(flowData, colorObj) {
      var _flowData$processDefi,
        _this2 = this;
      if (!(flowData !== null && flowData !== void 0 && (_flowData$processDefi = flowData.processDefinition) !== null && _flowData$processDefi !== void 0 && _flowData$processDefi.processContentJson)) {
        return;
      }
      var flowGraph = implementation_namespaceObject.document.getElementById('flowGraph');
      if (!flowGraph) {
        return;
      }
      var customNode = new src_CustomNode('rect', 'rgba(241, 241, 241, 1)', 'rgba(153, 204, 204, 1)', 'Node', 40, 150, 14);
      customNode.regiestNode();
      var graph = new (g6_default()).Graph({
        container: 'flowGraph',
        width: flowGraph.offsetWidth,
        height: 800,
        fitView: true,
        defaultNode: {
          // 节点类型
          type: 'Node'
        },
        modes: {
          // 'zoom-canvas'
          default: ['drag-canvas']
        },
        plugins: [this.createToolBar(), this.createTooltip(flowData.traceList)],
        defaultEdge: {
          type: 'polyline',
          // 边连线
          color: '#C9C9C5',
          style: {
            endArrow: true,
            lineWidth: '2',
            stroke: '#C9C9C5',
            lineAppendWidth: 6,
            offset: 20
          }
        },
        edgeStateStyles: {
          selected: {
            stroke: '#90EE90',
            lineWidth: 3
          }
        }
      });
      var flowObj = JSON.parse(flowData.processDefinition.processContentJson);
      var nodes = flowObj.nodes;
      var transNodes = nodes.map(function (t) {
        return flow_chartvue_type_script_lang_js_objectSpread(flow_chartvue_type_script_lang_js_objectSpread({}, t), {}, {
          _nodeStyle: t.style
        });
      });
      graph.read(flow_chartvue_type_script_lang_js_objectSpread(flow_chartvue_type_script_lang_js_objectSpread({}, flowObj), {}, {
        nodes: transNodes
      }));
      var traceNodeList = flowData.traceList;
      // 过滤掉开始、结束环节
      var normalModes = flowObj.nodes.filter(function (t) {
        return !['_BOF', '_EOF'].includes(t.nodeCode);
      });
      if (!isEmpty_default()(normalModes)) {
        normalModes.forEach(function (mode) {
          var nodeCode = mode.nodeCode;
          var currTraceList = traceNodeList.filter(function (trace) {
            return trace.nodeKey === nodeCode;
          });
          var color = _this2.getRenderColor(currTraceList, colorObj);
          color && graph.updateItem(graph.findById(mode.id), flow_chartvue_type_script_lang_js_objectSpread(flow_chartvue_type_script_lang_js_objectSpread({}, mode), {}, {
            rectFill: color
          }));
        });
      }
    }
  }
});
;// CONCATENATED MODULE: ./packages/process-flow/src/flow-chart.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_flow_chartvue_type_script_lang_js_ = (flow_chartvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* 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
  }
}

;// CONCATENATED MODULE: ./packages/process-flow/src/flow-chart.vue





/* normalize component */
;
var component = normalizeComponent(
  src_flow_chartvue_type_script_lang_js_,
  flow_chartvue_type_template_id_7b028bd3_render,
  flow_chartvue_type_template_id_7b028bd3_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var flow_chart = (component.exports);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/process-flow/src/main.vue?vue&type=script&lang=js&








/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfProcessFlow',
  directives: {
    elDragDialog: el_drag_dialog
  },
  mixins: [dialogAttrs],
  components: {
    FlowChart: flow_chart
  },
  props: {
    flowVisible: Boolean,
    // 流程实例id
    piid: {
      type: String,
      default: '',
      required: true
    },
    // 显示的类型 0 - 只显示待办, 1 - 只显示待阅, 2 - 待办待阅都显示
    showType: {
      type: Number,
      default: 0
    },
    // 是否过滤自动节点
    filterAuto: {
      type: Boolean,
      default: true
    },
    // 配置列数据源的数据
    columns: {
      type: Array,
      default: function _default() {
        return [{
          prop: 'nodeName',
          label: '环节名称',
          minWidth: 150
        }, {
          label: '执行人',
          width: 100,
          formatter: function formatter(row) {
            return row.operateUser.userName;
          }
        }, {
          label: '执行人部门',
          width: 200,
          formatter: function formatter(row) {
            return row.operateUser.deptName;
          }
        }, {
          label: '到达时间',
          width: 160,
          formatter: function formatter(row) {
            return formatMillisecondToString(row.createTime);
          },
          align: 'center'
        }, {
          label: '处理时间',
          width: 160,
          formatter: function formatter(row) {
            return formatMillisecondToString(row.operateTime);
          },
          align: 'center'
        }, {
          label: '提交路径',
          prop: 'transitionName',
          width: 150
        }, {
          label: '处理意见',
          prop: 'opinion',
          minWidth: 150
        }];
      }
    },
    // 文字超长时是否使用浏览器默认的title，true：是，false: 否, 使用element-ui的tooltip展示
    useBrowserTitle: {
      type: Boolean,
      default: false
    },
    // dialog标题
    dialogTitle: {
      type: String,
      default: '流程跟踪'
    },
    // dialog宽度
    dialogWidth: {
      type: String,
      default: '1200px'
    },
    // 遮罩层是否插入至 body 元素上，若为 false，则遮罩层会插入至 Dialog 的父元素上
    modalAppendToBody: {
      type: Boolean,
      default: true
    },
    // Dialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 true
    appendToBody: {
      type: Boolean,
      default: false
    },
    tableAttrs: {
      type: Object,
      default: function _default() {}
    },
    tableEvents: {
      type: Object,
      default: function _default() {}
    },
    // 是否显示查看流程图按钮
    showViewChartBtn: {
      type: Boolean,
      default: false
    },
    // 流程图节点的颜色
    colorMap: {
      type: Object,
      default: function _default() {
        return {
          green: '#79c95b',
          red: '#ff3f3b',
          gray: '#C0C0C0'
        };
      }
    }
  },
  data: function data() {
    return {
      visible: false,
      list: [],
      loading: false,
      // 当前是否查看流程图
      viewChart: false,
      api: ['getTaskFlowList', 'getReadFlowList', 'getProcessFlowList'],
      lockScroll: this.$JDF.lockScroll
    };
  },
  watch: {
    flowVisible: {
      handler: function handler(val) {
        val && this.show();
      },
      immediate: true
    },
    showViewChartBtn: {
      handler: function handler(val) {
        this.viewChart = val;
      },
      immediate: true
    }
  },
  methods: {
    show: function show() {
      this.visible = true;
      this.getList();
      // 添加关闭弹窗事件
      this.addCloseDialogEvent();
    },
    /**
     * 查询列表
     */
    getList: function getList() {
      var _this = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var _this$api$_this$showT, fun, data;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.prev = 0;
              _this.loading = true;
              fun = (_this$api$_this$showT = _this.api[_this.showType]) !== null && _this$api$_this$showT !== void 0 ? _this$api$_this$showT : 'getProcessFlowList';
              _context.next = 5;
              return new external_jdf_jssdk_namespaceObject.ProcessService(_this.$JDF.baseUrl)[fun](_this.piid);
            case 5:
              data = _context.sent;
              if (_this.filterAuto) {
                _this.list = data.filter(function (t) {
                  return t.operateUser.userId !== '<system>';
                });
              } else {
                _this.list = data;
              }
              _context.next = 12;
              break;
            case 9:
              _context.prev = 9;
              _context.t0 = _context["catch"](0);
              alertErrorMsg(_context.t0);
            case 12:
              _context.prev = 12;
              _this.loading = false;
              return _context.finish(12);
            case 15:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[0, 9, 12, 15]]);
      }))();
    },
    closeDialog: function closeDialog() {
      this.$emit('update:flowVisible', false);
    }
  }
});
;// CONCATENATED MODULE: ./packages/process-flow/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./packages/process-flow/src/main.vue





/* normalize component */
;
var main_component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (main_component.exports);
;// CONCATENATED MODULE: ./packages/process-flow/index.js

main.install = function (Vue) {
  Vue.component(main.name, main);
};
/* harmony default export */ var process_flow = (main);
module.exports = __webpack_exports__;
/******/ })()
;