/******/ (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 */ form_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/form-process-flow/src/main.vue?vue&type=template&id=5f238784&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-form-process-flow"
  }, [_c("el-table", _vm._g(_vm._b({
    attrs: {
      data: _vm.list,
      "v-loading": _vm.loading
    }
  }, "el-table", _vm.tableAttrs, false), _vm.tableEvents), [_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,
        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.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))])];
        }
      }], null, true)
    })];
  })], 2)], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/form-process-flow/src/main.vue?vue&type=template&id=5f238784&

;// 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 "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/form-process-flow/src/main.vue?vue&type=script&lang=js&




/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfFormProcessFlow',
  props: {
    // 流程实例id
    piid: {
      type: String,
      default: '',
      required: 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
    },
    tableAttrs: {
      type: Object,
      default: function _default() {}
    },
    tableEvents: {
      type: Object,
      default: function _default() {}
    },
    // 显示的类型 0 - 只显示待办, 1 - 只显示待阅, 2 - 待办待阅都显示
    showType: {
      type: Number,
      default: 0
    },
    // 是否过滤自动节点
    filterAuto: {
      type: Boolean,
      default: true
    }
  },
  watch: {
    piid: {
      handler: function handler(val) {
        val && this.getList(val);
      },
      immediate: true
    }
  },
  data: function data() {
    return {
      list: [],
      loading: false,
      api: ['getTaskFlowList', 'getReadFlowList', 'getProcessFlowList']
    };
  },
  methods: {
    /**
     * 查询列表
     */
    getList: function getList(piid) {
      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](piid);
            case 5:
              data = _context.sent;
              if (_this.filterAuto) {
                _this.list = data.filter(function (t) {
                  return t.operateUser.userId !== '<system>';
                });
              } else {
                _this.list = data;
              }
            case 7:
              _context.prev = 7;
              _this.loading = false;
              return _context.finish(7);
            case 10:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[0,, 7, 10]]);
      }))();
    }
  }
});
;// CONCATENATED MODULE: ./packages/form-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: ./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/form-process-flow/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/form-process-flow/index.js

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