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

;// 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/send-tracking/src/main.vue?vue&type=template&id=99bcc19e&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-send-tracking"
  }, [_vm.dialogVisible ? _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.dialogVisible,
      "modal-append-to-body": _vm.modalAppendToBody,
      "append-to-body": _vm.appendToBody,
      top: "10vh",
      "custom-class": "jdf-send-tracking-dialog"
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.dialogVisible = $event;
      }
    }
  }, "el-dialog", _vm.dialogAttrs, false), [_c("div", [_vm.isLazy ? _c("el-table", _vm._b({
    attrs: {
      data: _vm.list,
      lazy: "",
      load: _vm.load,
      "row-key": _vm.rowKey,
      "span-method": _vm.spanMethod,
      "tree-props": {
        children: "children",
        hasChildren: "hasChildren"
      }
    }
  }, "el-table", _vm.tableAttrs, false), [_vm._l(_vm.columns, function (item, index) {
    return [_vm.useBrowserTitle ? _c("el-table-column", {
      key: item.prop,
      attrs: {
        width: item.width,
        "min-width": item.minWidth,
        label: item.label,
        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.nextNodeKey
            },
            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.nextNodeKey
            },
            attrs: {
              set: _vm.text = item.formatter ? item.formatter(row) : row[item.prop]
            }
          }, [_vm._v(_vm._s(_vm.text || (index === 0 ? row.deptName : "")))])];
        }
      }], null, true)
    })];
  })], 2) : _c("el-table", _vm._b({
    attrs: {
      data: _vm.list,
      "row-key": _vm.rowKey,
      "span-method": _vm.spanMethod,
      "tree-props": {
        children: "children",
        hasChildren: "hasChildren"
      }
    }
  }, "el-table", _vm.tableAttrs, false), [_vm._l(_vm.columns, function (item, index) {
    return [_vm.useBrowserTitle ? _c("el-table-column", {
      key: item.prop,
      attrs: {
        width: item.width,
        "min-width": item.minWidth,
        label: item.label,
        align: item.align
      },
      scopedSlots: _vm._u([{
        key: "default",
        fn: function fn(_ref3) {
          var row = _ref3.row;
          return [_c("span", {
            staticClass: "tooltip",
            class: {
              "not-handle": !row.nextNodeKey
            },
            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(_ref4) {
          var row = _ref4.row;
          return [_c("span", {
            class: {
              "not-handle": !row.nextNodeKey
            },
            attrs: {
              set: _vm.text = item.formatter ? item.formatter(row) : row[item.prop]
            }
          }, [_vm._v(_vm._s(_vm.text || (index === 0 ? row.deptName : "")))])];
        }
      }], null, true)
    })];
  })], 2)], 1)]) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/send-tracking/src/main.vue?vue&type=template&id=99bcc19e&

;// 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 "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/index.js??vue-loader-options!./packages/send-tracking/src/main.vue?vue&type=script&lang=js&






/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfSendTracking',
  directives: {
    elDragDialog: el_drag_dialog
  },
  mixins: [dialogAttrs],
  props: {
    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() {}
    },
    // 文字超长时是否使用浏览器默认的title，true：是，false: 否, 使用element-ui的tooltip展示
    useBrowserTitle: {
      type: Boolean,
      default: false
    },
    // 配置列数据源的数据
    columns: {
      type: Array,
      default: function _default() {
        return [{
          prop: 'nodeName',
          label: '环节',
          minWidth: 150
        }, {
          label: '当前处理人',
          width: 100,
          formatter: function formatter(row) {
            var _row$operateUser;
            return (_row$operateUser = row.operateUser) === null || _row$operateUser === void 0 ? void 0 : _row$operateUser.userName;
          }
        }, {
          label: '提交路径',
          prop: 'transitionName',
          width: 150
        }, {
          label: '处理意见',
          prop: 'opinion',
          minWidth: 150
        }, {
          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'
        }];
      }
    },
    isLazy: {
      type: Boolean,
      default: true
    },
    // 是否使用组件内方法
    useComponentFun: {
      type: Boolean,
      default: true
    },
    list: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    rowKey: {
      type: String,
      default: 'id'
    }
  },
  data: function data() {
    return {
      dialogVisible: false,
      loading: false
    };
  },
  methods: {
    /**
     * 隐藏窗口
     */
    hide: function hide() {
      this.dialogVisible = false;
    },
    /**
     * 打开窗口
     */
    show: function show() {
      this.dialogVisible = true;
      // 添加关闭弹窗事件
      this.addCloseDialogEvent();
    },
    /**
     * 懒加载子表格数据
     * 加载子节点数据的函数，lazy 为 true 时生效，函数第二个参数包含了节点的层级信息
     */
    load: function load(tree, treeNode, resolve) {
      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;
              if (!_this.useComponentFun) {
                _context.next = 9;
                break;
              }
              _this.loading = true;
              _context.next = 5;
              return new external_jdf_jssdk_namespaceObject.ProcessService(_this.$JDF.baseUrl).getProcessFlowList(tree.piid);
            case 5:
              data = _context.sent;
              resolve(data);
              _context.next = 10;
              break;
            case 9:
              _this.$emit('loadFun', tree, treeNode, resolve);
            case 10:
              _context.prev = 10;
              _this.loading = false;
              return _context.finish(10);
            case 13:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[0,, 10, 13]]);
      }))();
    },
    /**
     * 合并单元格
     */
    spanMethod: function spanMethod(_ref) {
      var row = _ref.row,
        columnIndex = _ref.columnIndex;
      // 合并有children或者hasChildren的行
      var children = row.children,
        hasChildren = row.hasChildren;
      // 需要合并列
      return (children || hasChildren) && columnIndex === 0 ? [1, this.columns.length] : [1, 1];
    }
  }
});
;// CONCATENATED MODULE: ./packages/send-tracking/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: ./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/send-tracking/src/main.vue





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

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: ./packages/send-tracking/index.js
/*
 * @Author: liujm
 * @Date: 2022-10-03 16:44:15
 * @Description: 发送跟踪组件
 */

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