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

;// 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/identity-tree-transfer/src/main.vue?vue&type=template&id=2aacbdd8&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-select-person jdf-transfer"
  }, [_vm.dialogVisible ? _c("el-dialog", _vm._b({
    directives: [{
      name: "el-drag-dialog",
      rawName: "v-el-drag-dialog",
      value: true,
      expression: "true"
    }],
    ref: "elDialog",
    class: {
      "jdf-transfer-to-body": _vm.appendToBody
    },
    attrs: {
      title: _vm.dialogTitle,
      visible: _vm.dialogVisible,
      "modal-append-to-body": _vm.modalAppendToBody,
      "append-to-body": _vm.appendToBody,
      top: "10vh",
      "custom-class": "jdf-select-person-dialog"
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.dialogVisible = $event;
      }
    }
  }, "el-dialog", _vm.dialogAttrs, false), [_c("div", {
    staticClass: "tree-title"
  }, [_vm._v(_vm._s(_vm.noticeText))]), _c("div", {
    staticClass: "tree-div"
  }, [_c("div", {
    staticClass: "candidate-area"
  }, [_c("div", {
    staticClass: "title-text"
  }, [_c("span", [_vm._v(_vm._s(_vm.treeTitle))]), _vm.multiple && !_vm.orgSingle ? _c("el-link", {
    staticClass: "all-text jdf-fr jdf-mr10 blue",
    attrs: {
      underline: false,
      type: "primary"
    },
    on: {
      click: _vm.selectAll
    }
  }, [_vm._v("全选")]) : _vm._e()], 1), _vm.lazy ? _c("div", {
    staticClass: "jdf-tree-content"
  }, [_vm.filterable ? _c("div", {
    staticClass: "search-content",
    on: {
      click: function click($event) {
        $event.stopPropagation();
      },
      keyup: function keyup($event) {
        $event.stopPropagation();
      }
    }
  }, [_c("el-form", {
    attrs: {
      model: _vm.searchObj
    },
    nativeOn: {
      submit: function submit($event) {
        $event.preventDefault();
      }
    }
  }, [_c("el-form-item", {
    attrs: {
      label: ""
    }
  }, [_c("el-input", _vm._b({
    attrs: {
      size: "small",
      clearable: ""
    },
    on: {
      clear: _vm.lazyFilter
    },
    nativeOn: {
      keyup: function keyup($event) {
        if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
        $event.preventDefault();
        return _vm.lazyFilter.apply(null, arguments);
      }
    },
    model: {
      value: _vm.searchObj.lazyFilterText,
      callback: function callback($$v) {
        _vm.$set(_vm.searchObj, "lazyFilterText", $$v);
      },
      expression: "searchObj.lazyFilterText"
    }
  }, "el-input", _vm.searchInputAttrs, false))], 1)], 1)], 1) : _vm._e(), _c("el-tree", _vm._b({
    ref: "jdfTree",
    staticClass: "jdf-tree",
    attrs: {
      props: _vm.props,
      "node-key": "id",
      lazy: "",
      load: _vm.loadTree,
      "empty-text": _vm.emptyText,
      "default-expanded-keys": _vm.expandKeys,
      data: _vm.lazyFilterDatas
    },
    on: {
      "node-click": _vm.handleNodeClick
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function fn(_ref) {
        var data = _ref.data;
        return [_c("span", {
          staticClass: "jdf-node-name",
          class: {
            "node-disabled": _vm.nodeChecked(data.id)
          }
        }, [_vm._v("\n                " + _vm._s(data.name) + "\n              ")])];
      }
    }], null, false, 1654259366)
  }, "el-tree", _vm.treeAttrs, false))], 1) : _c("div", {
    staticClass: "jdf-tree-content"
  }, [_vm.filterable ? _c("div", {
    staticClass: "search-content",
    on: {
      click: function click($event) {
        $event.stopPropagation();
      },
      keyup: function keyup($event) {
        $event.stopPropagation();
      }
    }
  }, [_c("el-form", {
    attrs: {
      model: _vm.searchObj
    },
    nativeOn: {
      submit: function submit($event) {
        $event.preventDefault();
      }
    }
  }, [_c("el-form-item", {
    attrs: {
      label: ""
    }
  }, [_c("el-input", _vm._b({
    attrs: {
      size: "small",
      clearable: ""
    },
    on: {
      input: _vm.filterLeftTree,
      change: _vm.filterLeftTree
    },
    model: {
      value: _vm.searchObj.filterText,
      callback: function callback($$v) {
        _vm.$set(_vm.searchObj, "filterText", $$v);
      },
      expression: "searchObj.filterText"
    }
  }, "el-input", _vm.searchInputAttrs, false))], 1)], 1)], 1) : _vm._e(), _c("el-tree", _vm._b({
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loading,
      expression: "loading"
    }],
    ref: "jdfTree",
    staticClass: "jdf-tree",
    attrs: {
      props: _vm.props,
      data: _vm.treeData,
      "node-key": "id",
      "empty-text": _vm.emptyText,
      "default-expanded-keys": _vm.expandKeys,
      "filter-node-method": _vm.filterIdentityNode,
      "default-expand-all": _vm.expandAll
    },
    on: {
      "node-click": _vm.handleNodeClick
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function fn(_ref2) {
        var data = _ref2.data;
        return [_c("span", {
          staticClass: "jdf-node-name",
          class: {
            "node-disabled": _vm.nodeChecked(data.id)
          }
        }, [_vm._v("\n                " + _vm._s(data.name) + "\n              ")])];
      }
    }], null, false, 1654259366)
  }, "el-tree", _vm.treeAttrs, false))], 1)]), _c("div", {
    staticClass: "flex-center"
  }, [_c("div", {
    staticClass: "transfer-btn"
  }, [_c("div", {
    staticClass: "btn-top"
  }, [_c("el-button", {
    attrs: {
      type: "primary",
      icon: "el-icon-arrow-right",
      size: "mini"
    }
  })], 1), _c("div", {
    staticClass: "btn-bottom"
  }, [_c("el-button", {
    attrs: {
      size: "mini",
      icon: "el-icon-arrow-left"
    }
  })], 1)])]), _c("div", {
    staticClass: "choosed-area"
  }, [_c("div", {
    staticClass: "title-text"
  }, [_c("span", [_vm._v("已选列表（" + _vm._s(_vm.selectedList.length) + "）")]), _c("el-link", {
    staticClass: "empty-text jdf-fr jdf-mr10",
    class: _vm.selectedList.length !== 0 ? "blue" : "gray",
    attrs: {
      underline: false,
      type: "info"
    },
    on: {
      click: _vm.clearItem
    }
  }, [_vm._v("清空")])], 1), _c("div", {
    staticClass: "jdf-tree-content"
  }, [_vm.filterable ? _c("div", {
    staticClass: "search-content",
    on: {
      click: function click($event) {
        $event.stopPropagation();
      },
      keyup: function keyup($event) {
        $event.stopPropagation();
      }
    }
  }, [_c("el-form", {
    attrs: {
      model: _vm.searchObj
    },
    nativeOn: {
      submit: function submit($event) {
        $event.preventDefault();
      }
    }
  }, [_c("el-form-item", {
    attrs: {
      label: ""
    }
  }, [_c("el-input", _vm._b({
    attrs: {
      size: "small",
      clearable: ""
    },
    on: {
      change: _vm.filterRightTree,
      input: _vm.filterRightTree
    },
    model: {
      value: _vm.searchObj.filterChooseText,
      callback: function callback($$v) {
        _vm.$set(_vm.searchObj, "filterChooseText", $$v);
      },
      expression: "searchObj.filterChooseText"
    }
  }, "el-input", _vm.searchInputAttrs, false))], 1)], 1)], 1) : _vm._e(), _c("el-tree", {
    ref: "ctree",
    staticClass: "jdf-tree",
    attrs: {
      "node-key": "id",
      props: {
        label: _vm.showField,
        children: "children",
        isLeaf: "isLeaf"
      },
      "highlight-current": "",
      data: _vm.selectedList,
      "filter-node-method": _vm.filterIdentityNode,
      "empty-text": ""
    },
    on: {
      "node-click": _vm.removeData
    }
  })], 1)])]), _c("div", {
    staticClass: "dialog-footer",
    attrs: {
      slot: "footer"
    },
    slot: "footer"
  }, [_c("el-button", {
    attrs: {
      type: "primary"
    },
    on: {
      click: _vm.confirm
    }
  }, [_vm._v("确定")]), _c("el-button", {
    on: {
      click: _vm.hide
    }
  }, [_vm._v("取消")])], 1)]) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/identity-tree-transfer/src/main.vue?vue&type=template&id=2aacbdd8&

;// 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: ./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/identity-tree/src/main.vue?vue&type=template&id=404aeb74&
var mainvue_type_template_id_404aeb74_render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-select-person"
  }, [_vm.dialogVisible ? _c("el-dialog", _vm._b({
    directives: [{
      name: "el-drag-dialog",
      rawName: "v-el-drag-dialog",
      value: true,
      expression: "true"
    }],
    ref: "elDialog",
    attrs: {
      title: _vm.dialogTitle,
      visible: _vm.dialogVisible,
      "modal-append-to-body": _vm.modalAppendToBody,
      "append-to-body": _vm.appendToBody,
      top: "10vh",
      "custom-class": "jdf-select-person-dialog"
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.dialogVisible = $event;
      }
    }
  }, "el-dialog", _vm.dialogAttrs, false), [_c("el-row", {
    staticClass: "jdf-search"
  }, [_vm.filterable && !_vm.lazy ? _c("el-input", {
    attrs: {
      placeholder: "请输入人员名称进行搜索"
    },
    on: {
      input: _vm.filterLeftTree,
      change: _vm.filterLeftTree
    },
    model: {
      value: _vm.searchObj.filterText,
      callback: function callback($$v) {
        _vm.$set(_vm.searchObj, "filterText", $$v);
      },
      expression: "searchObj.filterText"
    }
  }) : _vm._e()], 1), _c("el-row", {
    staticClass: "jdf-select-person-tree",
    attrs: {
      gutter: 20
    }
  }, [_c("el-col", {
    attrs: {
      span: 12
    }
  }, [_c("div", {
    staticClass: "jdf-select-person-left"
  }, [_c("div", {
    staticClass: "jdf-select-tree-title"
  }, [_vm._v(_vm._s(_vm.treeTitle))]), _vm.lazy ? _c("el-tree", _vm._b({
    ref: "jdfTree",
    attrs: {
      props: _vm.props,
      "node-key": "id",
      load: _vm.loadTree,
      "empty-text": _vm.emptyText,
      lazy: "",
      "default-expanded-keys": _vm.expandKeys
    },
    on: {
      "node-click": _vm.handleNodeClick
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function fn(_ref) {
        var data = _ref.data;
        return [_c("span", {
          staticClass: "jdf-node-name",
          class: {
            "node-disabled": _vm.nodeChecked(data.id)
          }
        }, [_vm._v("\n                " + _vm._s(data.name) + "\n              ")])];
      }
    }], null, false, 1654259366)
  }, "el-tree", _vm.treeAttrs, false)) : _c("el-tree", _vm._b({
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loading,
      expression: "loading"
    }],
    ref: "jdfTree",
    attrs: {
      props: _vm.props,
      data: _vm.treeData,
      "node-key": "id",
      "empty-text": _vm.emptyText,
      "default-expanded-keys": _vm.expandKeys,
      "filter-node-method": _vm.filterIdentityNode,
      "default-expand-all": _vm.expandAll
    },
    on: {
      "node-click": _vm.handleNodeClick
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function fn(_ref2) {
        var data = _ref2.data;
        return [_c("span", {
          staticClass: "jdf-node-name",
          class: {
            "node-disabled": _vm.nodeChecked(data.id)
          }
        }, [_vm._v("\n                " + _vm._s(data.name) + "\n              ")])];
      }
    }], null, false, 1654259366)
  }, "el-tree", _vm.treeAttrs, false))], 1)]), _c("el-col", {
    attrs: {
      span: 12
    }
  }, [_c("div", {
    staticClass: "jdf-select-person-right"
  }, [_c("div", {
    staticClass: "jdf-select-tree-title"
  }, [_c("span", [_vm._v("\n              已选\n              "), _vm.selectedList.length ? _c("span", [_vm._v("\n                （" + _vm._s(_vm.selectedList.length) + "）\n              ")]) : _vm._e()]), _c("a", {
    staticClass: "jdf-fr",
    class: _vm.selectedList.length !== 0 ? "blue" : "gray",
    on: {
      click: _vm.clearItem
    }
  }, [_vm._v("清空")])]), _c("div", {
    staticClass: "jdf-select-person-list"
  }, _vm._l(_vm.selectedList, function (item, index) {
    return _c("div", {
      key: index,
      staticClass: "jdf-select-person-item",
      on: {
        click: function click($event) {
          return _vm.removeItem(item, index);
        }
      }
    }, [_c("span", [_vm._v(_vm._s(item[_vm.showField]))])]);
  }), 0)])])], 1), _c("div", {
    staticClass: "dialog-footer",
    attrs: {
      slot: "footer"
    },
    slot: "footer"
  }, [_c("el-button", {
    attrs: {
      type: "primary"
    },
    on: {
      click: _vm.confirm
    }
  }, [_vm._v("确定")]), _c("el-button", {
    on: {
      click: _vm.hide
    }
  }, [_vm._v("取消")])], 1)], 1) : _vm._e()], 1);
};
var mainvue_type_template_id_404aeb74_staticRenderFns = [];
mainvue_type_template_id_404aeb74_render._withStripped = true;

;// CONCATENATED MODULE: ./packages/identity-tree/src/main.vue?vue&type=template&id=404aeb74&

;// 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 "lodash/cloneDeep"
var cloneDeep_namespaceObject = require("lodash/cloneDeep");
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep_namespaceObject);
;// CONCATENATED MODULE: external "jdf-jssdk"
var external_jdf_jssdk_namespaceObject = require("jdf-jssdk");
;// CONCATENATED MODULE: external "@babel/runtime/helpers/slicedToArray"
var slicedToArray_namespaceObject = require("@babel/runtime/helpers/slicedToArray");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/toConsumableArray"
var toConsumableArray_namespaceObject = require("@babel/runtime/helpers/toConsumableArray");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_namespaceObject);
;// 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: external "lodash/differenceBy"
var differenceBy_namespaceObject = require("lodash/differenceBy");
var differenceBy_default = /*#__PURE__*/__webpack_require__.n(differenceBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/toLower"
var toLower_namespaceObject = require("lodash/toLower");
var toLower_default = /*#__PURE__*/__webpack_require__.n(toLower_namespaceObject);
;// CONCATENATED MODULE: external "lodash/uniqBy"
var uniqBy_namespaceObject = require("lodash/uniqBy");
var uniqBy_default = /*#__PURE__*/__webpack_require__.n(uniqBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/map"
var map_namespaceObject = require("lodash/map");
var map_default = /*#__PURE__*/__webpack_require__.n(map_namespaceObject);
;// CONCATENATED MODULE: external "lodash/sortBy"
var sortBy_namespaceObject = require("lodash/sortBy");
var sortBy_default = /*#__PURE__*/__webpack_require__.n(sortBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/groupBy"
var groupBy_namespaceObject = require("lodash/groupBy");
var groupBy_default = /*#__PURE__*/__webpack_require__.n(groupBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isArray"
var isArray_namespaceObject = require("lodash/isArray");
var isArray_default = /*#__PURE__*/__webpack_require__.n(isArray_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: external "lodash/slice"
var slice_namespaceObject = require("lodash/slice");
var slice_default = /*#__PURE__*/__webpack_require__.n(slice_namespaceObject);
;// CONCATENATED MODULE: external "lodash/pickBy"
var pickBy_namespaceObject = require("lodash/pickBy");
var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/intersectionBy"
var intersectionBy_namespaceObject = require("lodash/intersectionBy");
var intersectionBy_default = /*#__PURE__*/__webpack_require__.n(intersectionBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/unionBy"
var unionBy_namespaceObject = require("lodash/unionBy");
var unionBy_default = /*#__PURE__*/__webpack_require__.n(unionBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/flatMap"
var flatMap_namespaceObject = require("lodash/flatMap");
var flatMap_default = /*#__PURE__*/__webpack_require__.n(flatMap_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/setOrderToData.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; }
/*
 * @Author: lirl
 * @Date: 2023-05-11 19:57:13
 * @Description: 将排序序号放到data数据中
 */
function setOrderToData(data, node) {
  var _data$nodeOrder;
  return _objectSpread(_objectSpread({}, data), {}, {
    nodeOrder: (_data$nodeOrder = data.nodeOrder) !== null && _data$nodeOrder !== void 0 ? _data$nodeOrder : node.id
  });
}
;// CONCATENATED MODULE: ./src/utils/tools/getTreeVisibleLeafNodes.js
/*
 * @Author: lirl
 * @Date: 2023-02-26 21:23:51
 * @Description: 获取tree的节点中所有显示的叶子节点
 */


function getTreeVisibleLeafNodes(treeNodes) {
  var fn = function fn(nodes) {
    return flatMap_default()(nodes, function (node) {
      if (node.visible) {
        var data = node.data;
        return data.isLeaf ? setOrderToData(data, node) : fn(node.childNodes);
      }
      return null;
    });
  };
  return fn(treeNodes).filter(function (t) {
    return t;
  });
}
;// CONCATENATED MODULE: ./src/utils/tools/getTreeVisibleNodes.js


function getTreeVisibleNodes_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 getTreeVisibleNodes_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? getTreeVisibleNodes_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : getTreeVisibleNodes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/*
 * @Author: lirl
 * @Date: 2023-02-26 22:33:43
 * @Description: 获取tree的节点中所有显示的节点
 */


function getTreeVisibleNodes(treeNodes) {
  var fn = function fn(nodes) {
    return flatMap_default()(nodes, function (node) {
      if (node.visible) {
        var data = setOrderToData(node.data, node);
        return data.isLeaf ? data : [getTreeVisibleNodes_objectSpread(getTreeVisibleNodes_objectSpread({}, data), {}, {
          children: [],
          isLeaf: true
        })].concat(toConsumableArray_default()(fn(node.childNodes)));
      }
      return null;
    });
  };
  return fn(treeNodes).filter(function (t) {
    return t;
  });
}
;// CONCATENATED MODULE: ./src/utils/tools/setTreeDataOrder.js

function setTreeDataOrder_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 setTreeDataOrder_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? setTreeDataOrder_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : setTreeDataOrder_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/*
 * @Author: lirl
 * @Date: 2023-02-26 20:47:26
 * @Description: 设置树中每个节点的顺序
 */

var fn = function fn(array) {
  return map_default()(array, function (item, index) {
    var obj = setTreeDataOrder_objectSpread(setTreeDataOrder_objectSpread({}, item), {}, {
      order: index
    });
    if (!item.isLeaf) {
      obj.children = fn(item.children);
    }
    return obj;
  });
};
function setTreeDataOrder(array) {
  return fn(array);
}
;// CONCATENATED MODULE: ./src/utils/tools/convertOrgTreeNode.js
/*
 * @Author: lirl
 * @Date: 2023-02-26 20:58:08
 * @Description: 将组织对象转为组织树规定的格式
 */
function convertOrgTreeNode(org) {
  var _org$isLeaf;
  return {
    id: org.id,
    isLeaf: (_org$isLeaf = org.isLeaf) !== null && _org$isLeaf !== void 0 ? _org$isLeaf : false,
    name: org.orgName,
    order: org.orderNum,
    pid: "".concat(org.parentId),
    type: 'ORG',
    orgObj: org
  };
}
;// 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 = (/* unused pure expression or super */ null && (['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 (0,external_element_ui_namespaceObject.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 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_default()(error) ? error : error === null || error === void 0 ? void 0 : error.message;
  msg && (0,external_element_ui_namespaceObject.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(error)) {
    messageAlert(error, 'warning');
    return;
  }
  var ssoPage = sessionStorage.getItem('ssoPage');
  if (TOKEN_CODES.includes(error.code) && ssoPage) {
    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 "lodash/isNil"
var isNil_namespaceObject = require("lodash/isNil");
var isNil_default = /*#__PURE__*/__webpack_require__.n(isNil_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/getTreeExpandKeys.js

/*
 * @Author: lirl
 * @Date: 2023-02-26 21:41:57
 * @Description: 获取树默认展开的节点
 */



function getTreeExpandKeys(tree, expandLevel) {
  if (isNil_default()(expandLevel)) {
    return [];
  }
  if (expandLevel === 0) {
    return map_default()(tree, 'id');
  }
  var fn = function fn(arr, level) {
    return flatMap_default()(arr, function (t) {
      var _t$orgObj$orgLevel, _t$orgObj;
      if (!t || t.type === 'IDENTITY') {
        return null;
      }
      var orgLevel = (_t$orgObj$orgLevel = (_t$orgObj = t.orgObj) === null || _t$orgObj === void 0 ? void 0 : _t$orgObj.orgLevel) !== null && _t$orgObj$orgLevel !== void 0 ? _t$orgObj$orgLevel : level;
      if (orgLevel < expandLevel) {
        return [t.id].concat(toConsumableArray_default()(fn(t.children, level + 1)));
      }
      if (orgLevel === expandLevel) {
        return t.id;
      }
      return null;
    });
  };
  return fn(tree, 0).filter(function (t) {
    return t;
  });
}
;// CONCATENATED MODULE: ./src/mixins/dialogAttrs.js

function dialogAttrs_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 dialogAttrs_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? dialogAttrs_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : dialogAttrs_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 ? dialogAttrs_objectSpread(dialogAttrs_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: ./src/mixins/treeMixin.js





function treeMixin_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 treeMixin_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? treeMixin_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : treeMixin_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/*
 * @Author: lirl
 * @Date: 2022-09-06 14:20:53
 * @Description: 选组织选人树公共混入
 */























// 组织层级分隔符
var ORG_SEPARATOR = '/';
/* harmony default export */ var treeMixin = ({
  mixins: [dialogAttrs],
  props: {
    // 组件是否展示
    visible: Boolean,
    // 是否多选
    multiple: {
      type: Boolean,
      default: false
    },
    // 是否可搜索
    filterable: {
      type: Boolean,
      default: true
    },
    // 树为空时显示数据
    emptyText: {
      type: String,
      default: '无数据'
    },
    // 默认已选中的列表
    defaultSelectedList: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 展开的层级
    expandLevel: {
      type: Number,
      default: 0
    },
    // 是否默认全部展开
    expandAll: {
      type: Boolean,
      default: false
    },
    // 确认前事件
    beforeClose: Function,
    // 遮罩层是否插入至 body 元素上，若为 false，则遮罩层会插入至 Dialog 的父元素上
    modalAppendToBody: {
      type: Boolean,
      default: true
    },
    // Dialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 true
    appendToBody: {
      type: Boolean,
      default: false
    },
    // 提示信息
    noticeText: {
      type: String,
      default: ''
    },
    // 同一组织只能选择一个人
    orgSingle: {
      type: Boolean,
      default: false
    },
    // 如果是多选，选择后是否移除左侧已选的数据
    multipleSelectRemoveLeft: {
      type: Boolean,
      default: true
    },
    // 树的属性
    treeAttrs: {
      type: Object,
      default: function _default() {}
    },
    // 树的节点是否可拖拽
    draggable: {
      type: Boolean,
      default: true
    },
    // 已选值中展示的字段，如果需要显示组织路径，可传orgPath
    showField: {
      type: String,
      default: 'name'
    },
    // 当showField为orgPath时，可传此参数用于设置显示的orgPath从第几级开始
    orgStartRank: {
      type: Number,
      default: 1
    },
    // 搜索使用的treeId
    treeId: [Number, String],
    // 搜索使用的orgId
    orgId: [Number, String],
    // 是否懒加载
    lazy: {
      type: Boolean,
      default: false
    },
    // 自定义数据
    customData: {
      type: Object,
      default: function _default() {}
    },
    // 是否隐藏人员节点
    isHiddenIdentity: {
      type: Boolean,
      default: false
    },
    // 选择的最大数量限制
    max: Number,
    // 超出后提示信息
    exceedMessage: String
  },
  data: function data() {
    return {
      dialogVisible: false,
      // tree的属性
      props: {
        label: 'name',
        children: 'children',
        isLeaf: 'isLeaf'
      },
      // 不是懒加载时，树的数据
      treeData: [],
      // 已选列表
      selectedList: [],
      // 默认展开的节点
      expandKeys: [],
      loading: false,
      lockScroll: this.$JDF.lockScroll,
      // 懒加载组件过滤结果
      lazyFilterDatas: [],
      // 根节点
      rootNode: {},
      resolveFn: function resolveFn() {},
      searchObj: {
        filterText: '',
        filterChooseText: '',
        lazyFilterText: ''
      },
      nodeLevel: {
        // 顶层组织level
        firstOrg: 0,
        // 次顶层组织level
        secondOrg: 1
      }
    };
  },
  watch: {
    visible: {
      handler: function handler(val) {
        val && this.show();
      },
      immediate: true
    },
    dialogVisible: function dialogVisible(val) {
      this.$emit('update:visible', val);
    }
  },
  computed: {
    selectRemoveLeft: function selectRemoveLeft() {
      return this.multiple && this.multipleSelectRemoveLeft && !this.orgSingle && !this.canSelectNoLeaf;
    },
    orgService: function orgService() {
      return new external_jdf_jssdk_namespaceObject.OrgBaseService(this.$JDF.baseUrl);
    }
  },
  methods: {
    /**
     * 取消
     */
    hide: function hide() {
      this.dialogVisible = false;
    },
    /**
     * 回显已选值
     */
    echoSelectedNodes: function echoSelectedNodes() {
      var defaultSelectedList = this.defaultSelectedList;
      if (isEmpty_default()(defaultSelectedList)) {
        this.selectedList = [];
        return;
      }
      var jdfTree = this.$refs.jdfTree,
        removeNode = this.removeNode,
        selectRemoveLeft = this.selectRemoveLeft;
      // 因为业务传过来的已选数据中，数据对象不全，只有id和name，所以此处在tree渲染后，需要将selectedList的值根据id设置为全量的数据
      this.selectedList = cloneDeep_default()(defaultSelectedList.map(function (item) {
        var node = jdfTree.getNode(item.id);
        // 如果是多选，并且multipleSelectRemoveLeft为true，则回显后，将选中的数据从左侧节点移除
        selectRemoveLeft && removeNode(node);
        return node !== null && node !== void 0 && node.data ? treeMixin_objectSpread(treeMixin_objectSpread({}, node.data), {}, {
          orgPath: item.orgPath,
          nodeOrder: node.id
        }) : item;
      }));
    },
    /**
     * 移除默认选中数据
     */
    removeDefaultSelected: function removeDefaultSelected() {
      if (this.selectRemoveLeft) {
        var jdfTree = this.$refs.jdfTree,
          removeNode = this.removeNode;
        this.selectedList.forEach(function (item) {
          var node = jdfTree.getNode(item.id);
          // 如果是多选，并且multipleSelectRemoveLeft为true，则回显后，将选中的数据从左侧节点移除
          removeNode(node);
        });
      }
    },
    /**
     * 处理懒加载的数据
     * 1. 为每条数据添加order属性
     * 2. 如果是多选，并且multipleSelectRemoveLeft为true，则将数据中的，在selectedList中的数据移除
     * 3. 因为业务传过来的已选数据中，数据对象不全，只有id和name，所以每次展开节点后，需要将selectedList中的数据根据id替换为全量数据
     * @param {Array} datas 数据列表
     */
    dealLazyLoadDatas: function dealLazyLoadDatas(datas) {
      var orderList = map_default()(datas, function (v, index) {
        return treeMixin_objectSpread(treeMixin_objectSpread({}, v), {}, {
          order: index
        });
      });
      if (this.selectRemoveLeft) {
        var selectedList = this.selectedList;
        // 重新为selectedList赋值
        this.selectedList = map_default()(selectedList, function (v) {
          var _orderList$find;
          return (_orderList$find = orderList.find(function (t) {
            return t.id === v.id;
          })) !== null && _orderList$find !== void 0 ? _orderList$find : v;
        });
        return differenceBy_default()(orderList, selectedList, 'id');
      }
      return orderList;
    },
    /**
     * 处理同步加载的树的数据
     * 1. 如果树数据为空，则返回空数组
     * 2. 如果是多选，并且multipleSelectRemoveLeft为true，则为每条数据添加一个orderIndex属性，
     * 为了在选中数据，左侧节点移除后，点击右侧已选节点，数据可以回到最初的位置
     * @param {Object} data 树的数据
     */
    dealSyncLoadDatas: function dealSyncLoadDatas(data) {
      if (isEmpty_default()(data)) {
        return [];
      }
      var datas = isArray_default()(data) ? data : [data];
      return this.selectRemoveLeft ? setTreeDataOrder(datas) : datas;
    },
    /**
     * 校验选择的最大个数限制
     */
    validateMax: function validateMax() {
      var max = this.max;
      if (this.max && this.multiple && this.selectedList.length === max) {
        var _this$exceedMessage;
        message((_this$exceedMessage = this.exceedMessage) !== null && _this$exceedMessage !== void 0 ? _this$exceedMessage : this.noticeText, 'warning');
        return false;
      }
      return true;
    },
    /**
     * 将选择的组织放到已选中
     * @param {Object} nodeData 已选数据
     * @param {Object} node 点击的节点
     */
    setOrgSelected: function setOrgSelected(nodeData, node) {
      if (!this.validateMax()) {
        return;
      }
      /**
       * 因要实现选择后，已选列表的顺序需要与组织树的顺序一致，但是人员信息中并没有人员在组织树中的全量排序号。
       * 此处观察数据后发现，树初始化后的节点的node对象中的id字段，是有序的，且是节点在整棵树中的全量序号，
       * 所以使用node的id作为人员的全量排序号
       */
      var data = setOrderToData(nodeData, node);
      var selected = treeMixin_objectSpread(treeMixin_objectSpread({}, data), {}, {
        orgObj: pickBy_default()(data.orgObj, function (v) {
          return v;
        }),
        children: [],
        isLeaf: true
      });
      // 如果需要展示orgPath，则获取节点的orgPath
      if (this.showField === 'orgPath') {
        // 根据orgDeepId，拿到orgPath
        var jdfTree = this.$refs.jdfTree;
        var deepNames = map_default()(slice_default()(data.orgObj.orgDeepId.split(ORG_SEPARATOR), this.orgStartRank), function (t) {
          var n = jdfTree.getNode(t);
          return n.data.name;
        });
        selected.orgPath = deepNames.join(ORG_SEPARATOR);
      }
      if (this.multiple) {
        // 如果是多选，并且multipleSelectRemoveLeft为true，则选中后，将选中的数据从左侧节点移除
        this.selectRemoveLeft && this.removeNode(data);
        this.selectedList = sortBy_default()(uniqBy_default()([].concat(toConsumableArray_default()(this.selectedList), [selected]), function (v) {
          return "".concat(v.id);
        }), 'nodeOrder');
      } else {
        this.selectedList = [selected];
      }
    },
    /**
     * 将数据放到已选中
     * @param {Object} data 已选数据
     * @param {Object} node 节点对应的 Node
     */
    setToSelected: function setToSelected(nodeData, node) {
      if (!this.validateMax()) {
        return;
      }
      /**
       * 因要实现选择后，已选列表的顺序需要与组织树的顺序一致，但是人员信息中并没有人员在组织树中的全量排序号。
       * 此处观察数据后发现，树初始化后的节点的node对象中的id字段，是有序的，且是节点在整棵树中的全量序号，
       * 所以使用node的id作为人员的全量排序号
       */
      var data = setOrderToData(nodeData, node);
      var selected = treeMixin_objectSpread(treeMixin_objectSpread({}, data), {}, {
        children: [],
        isLeaf: true
      });
      // 多选
      if (this.multiple) {
        // 如果是多选，并且multipleSelectRemoveLeft为true，则选中后，将选中的数据从左侧节点移除
        this.selectRemoveLeft && this.removeNode(data);
        // 是否需要部门限选一人
        var exist = this.orgSingle ? this.orgUniq(this.selectedList, selected) : this.selectedList;
        this.selectedList = sortBy_default()(uniqBy_default()([].concat(toConsumableArray_default()(exist), [selected]), function (v) {
          return "".concat(v.id);
        }), 'nodeOrder');
      } else {
        this.selectedList = [selected];
      }
    },
    /**
     * 部门限制选一人
     */
    orgUniq: function orgUniq(selectedList, selected) {
      // 从已选人员中, 去除跟当前节点部门相同的节点，并将当前节点加进去
      return [].concat(toConsumableArray_default()(selectedList), [selected]).filter(function (t) {
        return t.pid !== selected.pid;
      });
    },
    /**
     * 全选(只选择当前展示的节点)
     */
    selectAll: function selectAll() {
      // 获取当前树展示的节点
      var visibleNodes = this.$refs.jdfTree.root.childNodes;
      /**
       * 过滤展示的数据
       * 如果可以选择非叶子节点，则获取所有状态为visible的节点，并将非叶子节点转为叶子节点在右侧已选树展示；
       * 如果只能选择叶子节点，则获取所有展示的叶子节点。
       * 因要实现选择后，已选列表的顺序需要与组织树的顺序一致，但是人员信息中并没有人员在组织树中的全量排序号。
       * 此处观察数据后发现，树初始化后节点的node对象中的id字段，是有序的，且是节点在整棵树中的全量序号，
       * 所以在构建数据时将nodeOrder字段放到data对象中，在选择数据后，已选列表中按照nodeOrder进行全量排序。
       */
      var flatNodes = this.canSelectNoLeaf ? getTreeVisibleNodes(visibleNodes) : getTreeVisibleLeafNodes(visibleNodes);
      if (!isEmpty_default()(flatNodes)) {
        var selectedList = this.selectedList;
        // 设置已选值
        this.selectedList = cloneDeep_default()(isEmpty_default()(selectedList) ? flatNodes : sortBy_default()(unionBy_default()(selectedList, flatNodes, 'id'), 'nodeOrder'));
      }

      // 如果选中后要移除左侧树的数据，则移除节点
      if (this.selectRemoveLeft) {
        var removeNode = this.removeNode;
        flatNodes.forEach(function (item) {
          return removeNode(item);
        });
      }
    },
    /**
     * 同一级如果既有人员又有组织，则将人员放到组织上面
     */
    buildChildrenDatas: function buildChildrenDatas(parentNode, appendData) {
      var IDENTITY = external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.IDENTITY,
        ORG = external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.ORG;
      var childDatas = map_default()(parentNode.childNodes, 'data');
      // 人员树回选组织节点时，使用组织树排序
      if (this.searchType === 'identity' && appendData.type === IDENTITY) {
        var users = childDatas.filter(function (t) {
          return t.type === IDENTITY;
        });
        var sortUsers = sortBy_default()(isArray_default()(appendData) ? [].concat(toConsumableArray_default()(users), toConsumableArray_default()(appendData)) : [].concat(toConsumableArray_default()(users), [appendData]), 'order');
        var orgs = childDatas.filter(function (t) {
          return t.type === ORG;
        });
        return [].concat(toConsumableArray_default()(sortUsers), toConsumableArray_default()(orgs));
      }
      // 组织树排序
      return sortBy_default()(isArray_default()(appendData) ? [].concat(toConsumableArray_default()(childDatas), toConsumableArray_default()(appendData)) : [].concat(toConsumableArray_default()(childDatas), [appendData]), 'order');
    },
    /**
     * 清空已选
     */
    clearItem: function clearItem() {
      var selectedList = this.selectedList;
      if (isEmpty_default()(selectedList)) {
        return;
      }
      this.selectedList = [];
      // 如果移除选中数据，则清空已选后，需要将已选数据再放回左侧树中
      if (this.selectRemoveLeft) {
        if (!this.lazy && isEmpty_default()(this.treeData)) {
          this.treeData = cloneDeep_default()(sortBy_default()(selectedList, 'order'));
        } else {
          // 将选中数据按pid分组
          var groupByPid = groupBy_default()(selectedList, 'pid');
          var jdfTree = this.$refs.jdfTree;
          var buildChildrenDatas = this.buildChildrenDatas;
          // 遍历groupByPid，将数据放回指定的父节点下
          Object.entries(groupByPid).forEach(function (item) {
            var _item = slicedToArray_default()(item, 2),
              key = _item[0],
              value = _item[1];
            var parentNode = jdfTree.getNode(key);
            jdfTree.updateKeyChildren(key, buildChildrenDatas(parentNode, value));
          });
        }
      }
    },
    /**
     * 移除已选
     * @param {Number} index 移除的数据的索引
     */
    removeItem: function removeItem(item, index) {
      this.selectedList.splice(index, 1);
      this.selectRemoveLeft && this.updateParentKeyChildren(item);
    },
    /**
     * 从树中移除已选
     */
    removeData: function removeData(data) {
      this.$refs.ctree.remove(data);
      this.selectRemoveLeft && this.updateParentKeyChildren(data);
    },
    /**
     * 移除节点
     * @param {Object} data 
     */
    removeNode: function removeNode(data) {
      this.$refs.jdfTree.remove(data);
    },
    /**
     * 更新父节点的子节点列表
     * @param {Object} data 选中的数据
     */
    updateParentKeyChildren: function updateParentKeyChildren(data) {
      var jdfTree = this.$refs.jdfTree;
      var pid = data.pid;
      var parentNode = jdfTree.getNode(pid);
      if (parentNode) {
        jdfTree.updateKeyChildren(pid, this.buildChildrenDatas(parentNode, data));
      } else {
        this.treeData = cloneDeep_default()(sortBy_default()([].concat(toConsumableArray_default()(this.treeData), [data]), 'order'));
      }
      // !this.lazy && this.filterLeftTree();
    },
    /**
     * 设置节点的选中状态
     * @param {String} id 节点id
     */
    nodeChecked: function nodeChecked(id) {
      return this.selectRemoveLeft ? false : this.selectedList.some(function (t) {
        return t.id === id;
      });
    },
    /**
     * 拖拽时判定目标节点能否被放置。
     * type 参数有三种情况：'prev'、'inner' 和 'next'，分别表示放置在目标节点前、插入至目标节点和放置在目标节点后
     * @param {Object} draggingNode 被拖拽的节点
     * @param {Object} dropNode 被放置的节点
     * @param {String} type 类型
     */
    allowDrop: function allowDrop(draggingNode, dropNode, type) {
      return type !== 'inner';
    },
    /**
     * 懒加载树过滤人员
     * @param {String} val 支持用户名、用户编码、账号、身份名、组织名
     */
    lazyFilter: function lazyFilter() {
      var _this = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var search, res;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              search = _this.searchObj.lazyFilterText;
              if (!search) {
                _context.next = 10;
                break;
              }
              _this.$refs.jdfTree.$data.store.lazy = false;
              _context.next = 5;
              return _this.orgService[_this.searchType === 'org' ? 'getOrgTreeByTreeId' : 'getOrgAndUserTree'](_this.treeId, search);
            case 5:
              res = _context.sent;
              _this.lazyFilterDatas = res ? [res] : [];
              _this.$nextTick(function () {
                var removeNode = _this.removeNode;
                _this.selectedList.forEach(function (item) {
                  var node = _this.$refs.jdfTree.getNode(item.id);
                  // 如果是多选，并且multipleSelectRemoveLeft为true，则回显后，将选中的数据从左侧节点移除
                  node && removeNode(node);
                });
              });
              _context.next = 14;
              break;
            case 10:
              _this.$refs.jdfTree.$data.store.lazy = true;
              _this.lazyFilterDatas = [];
              _this.rootNode.childNodes = [];
              _this.loadTree(_this.rootNode, _this.resolveFn);
            case 14:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    /**
     * 过滤左侧树
     */
    filterLeftTree: function filterLeftTree() {
      this.$refs.jdfTree.filter(this.searchObj.filterText);
    },
    /**
     * 过滤右侧树
     */
    filterRightTree: function filterRightTree() {
      this.$refs.ctree.filter(this.searchObj.filterChooseText);
    },
    /**
     * 过滤组织
     */
    filterOrgNode: function filterOrgNode(value, data) {
      if (!value) {
        return true;
      }
      return data.name.includes(value); // || data.orgObj?.orgCode.includes(value);
    },
    /**
     * 过滤人员
     */
    filterIdentityNode: function filterIdentityNode(value, data) {
      var _data$userIdentityObj, _data$userIdentityObj2;
      if (!value) {
        return true;
      }
      // 如果是人员树但是隐藏人员节点，则搜索时只搜索组织
      if (this.isHiddenIdentity) {
        return data.type === external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.ORG && data.name.includes(value);
      }
      if (data.type !== external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.IDENTITY) {
        return false;
      }
      var loginName = (_data$userIdentityObj = (_data$userIdentityObj2 = data.userIdentityObj) === null || _data$userIdentityObj2 === void 0 ? void 0 : _data$userIdentityObj2.loginName) !== null && _data$userIdentityObj !== void 0 ? _data$userIdentityObj : '';
      if (loginName.includes('@')) {
        var _loginName$split = loginName.split('@');
        var _loginName$split2 = slicedToArray_default()(_loginName$split, 1);
        loginName = _loginName$split2[0];
      }
      return data.name.includes(value) || loginName.includes(toLower_default()(value));
    },
    /**
     * 递归将数据重新赋值
     */
    setSelectedList: function setSelectedList(data) {
      var _this2 = this;
      return data.reduce(function (result, t) {
        var item = cloneDeep_default()(t);
        var children = item.children;
        return [].concat(toConsumableArray_default()(result), [item], toConsumableArray_default()(isEmpty_default()(children) ? [] : _this2.setSelectedList(children)));
      }, []);
    },
    /**
     * 点击确定按钮
     */
    confirm: function confirm() {
      var _this3 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee2() {
        var _this3$beforeClose;
        var selectedList, isHiddenIdentity, showField;
        return regenerator_default().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              selectedList = _this3.selectedList, isHiddenIdentity = _this3.isHiddenIdentity, showField = _this3.showField;
              _context2.next = 3;
              return (_this3$beforeClose = _this3.beforeClose) === null || _this3$beforeClose === void 0 ? void 0 : _this3$beforeClose.call(_this3, selectedList);
            case 3:
              // isHiddenIdentity为true时，将已选数据通过根节点重新赋值，补充children属性
              isHiddenIdentity && (_this3.selectedList = intersectionBy_default()(_this3.setSelectedList(_this3.treeDataAll), selectedList, 'id'));
              _this3.$emit('select', _this3.selectedList, showField);
              _this3.hide();
            case 6:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    /**
     * 组织树懒加载方法公共方法
     * @param {*} node
     * @param {*} resolve
     * @param {Boolean} isIdentityTree true：identity树；false：org树
     */
    loadTreeCommon: function loadTreeCommon(node, resolve, isIdentityTree) {
      var _this4 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee3() {
        var _this4$orgId, _this4$expandKeys;
        var _this4$nodeLevel, firstOrg, secondOrg, level, id, topOrg, getChildFunc, childAllList, childList;
        return regenerator_default().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _this4$nodeLevel = _this4.nodeLevel, firstOrg = _this4$nodeLevel.firstOrg, secondOrg = _this4$nodeLevel.secondOrg;
              level = node.level, id = node.data.id; // 加载顶级组织
              if (!(level === firstOrg)) {
                _context3.next = 10;
                break;
              }
              _this4.rootNode = node;
              _this4.resolveFn = resolve;
              // 根据treeId加载顶级组织，并渲染顶级组织信息
              _context3.next = 7;
              return _this4.orgService.getRootOrgByTreeId(_this4.treeId);
            case 7:
              topOrg = _context3.sent;
              // 如果展开层级大于等于0，则默认展开第一级
              _this4.expandLevel >= 0 && (_this4.expandKeys = [topOrg.id]);
              return _context3.abrupt("return", resolve([convertOrgTreeNode(topOrg)]));
            case 10:
              getChildFunc = isIdentityTree ? 'getChildOrgAndUserList' : 'getChildOrgList'; // 根据组织id获取直属下级
              _context3.next = 13;
              return _this4.orgService[getChildFunc](level === secondOrg
              // 加载次顶级组织时，根据orgId获取下级
              ? (_this4$orgId = _this4.orgId) !== null && _this4$orgId !== void 0 ? _this4$orgId : id : id, _this4.treeId);
            case 13:
              childAllList = _context3.sent;
              // 对identity树进行过滤
              // true：过滤领导节点，false：返回全部节点
              childList = isIdentityTree && !_this4.isLeader ? _this4.isLeaderNode(childAllList) : childAllList; // 如果当前节点的层级小于要展开的层级，则展开当前节点
              level <= _this4.expandLevel && (_this4$expandKeys = _this4.expandKeys).push.apply(_this4$expandKeys, toConsumableArray_default()(map_default()(childList, 'id')));
              return _context3.abrupt("return", resolve(_this4.dealLazyLoadDatas(childList)));
            case 17:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    },
    /**
     * 根据treeId同步获取整颗树
     */
    getTreeSync: function getTreeSync() {
      var _this5 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee4() {
        return regenerator_default().wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              _context4.prev = 0;
              _this5.loading = true;
              _context4.next = 4;
              return _this5.loadTreeByTreeIdSync(_this5.treeId);
            case 4:
              _context4.next = 9;
              break;
            case 6:
              _context4.prev = 6;
              _context4.t0 = _context4["catch"](0);
              showErrorMsg(_context4.t0);
            case 9:
              _context4.prev = 9;
              _this5.loading = false;
              return _context4.finish(9);
            case 12:
            case "end":
              return _context4.stop();
          }
        }, _callee4, null, [[0, 6, 9, 12]]);
      }))();
    },
    /**
     * 获取展开的层级，将树展开
     */
    expandNode: function expandNode() {
      if (!this.expandAll) {
        // 获取所有非叶子节点
        this.expandKeys = getTreeExpandKeys(this.treeData, this.expandLevel);
      }
    },
    /**
     * 根据树id加载组织树
     * @param {String} treeId 树id
     * @param {Boolean} isIdentityTree true：identity树；false：org树
     */
    loadTreeSyncCommon: function loadTreeSyncCommon(treeId, isIdentityTree) {
      var _this6 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee5() {
        var orgTreeData, getTreeFunc;
        return regenerator_default().wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
            case 0:
              if (isEmpty_default()(_this6.customData)) {
                _context5.next = 2;
                break;
              }
              return _context5.abrupt("return", cloneDeep_default()(_this6.customData));
            case 2:
              if (!_this6.orgId) {
                _context5.next = 7;
                break;
              }
              _context5.next = 5;
              return _this6.orgService.getOrgTreeByOrgId(_this6.orgId);
            case 5:
              orgTreeData = _context5.sent;
              return _context5.abrupt("return", isIdentityTree ? orgTreeData : _this6.removeOrgIdentity([orgTreeData]));
            case 7:
              // 人员树和组织树获取方法不同
              getTreeFunc = isIdentityTree ? 'getOrgAndUserTree' : 'getOrgTreeByTreeId'; // 如果没传orgCode，则根据treeId获取整颗树
              return _context5.abrupt("return", _this6.orgService[getTreeFunc](treeId));
            case 9:
            case "end":
              return _context5.stop();
          }
        }, _callee5);
      }))();
    },
    /**
     * 剔除人员，只剩组织的方法
     * 根据orgId获取该组织下人员以及组织，由于目前获取到的是该orgId下的所有人员和组织，如果只展示组织，就必须将人员剔除掉
     */
    removeOrgIdentity: function removeOrgIdentity(data) {
      var _this7 = this;
      return data === null || data === void 0 ? void 0 : data.map(function (t) {
        return treeMixin_objectSpread(treeMixin_objectSpread({}, t), {}, {
          children: isEmpty_default()(t.children) ? [] : _this7.removeOrgIdentity(t.children.filter(function (v) {
            return v.type === external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.ORG;
          }).map(function (m) {
            return treeMixin_objectSpread(treeMixin_objectSpread({}, m), {}, {
              isLeaf: !isEmpty_default()(m.children)
            });
          }))
        });
      });
    }
  }
});
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/identity-tree/src/main.vue?vue&type=script&lang=js&






/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfIdentityTree',
  directives: {
    elDragDialog: el_drag_dialog
  },
  mixins: [treeMixin],
  props: {
    // dialog标题
    dialogTitle: {
      type: String,
      default: '选择人员'
    },
    // 组织树顶部的标题
    treeTitle: {
      type: String,
      default: '可选列表'
    },
    // 搜索输入框属性
    searchInputAttrs: {
      type: Object,
      default: function _default() {
        return {
          placeholder: '搜索：姓名（汉字/拼音）',
          'prefix-icon': 'el-icon-search'
        };
      }
    },
    // 是否显示领导
    isLeader: {
      type: Boolean,
      default: true
    }
  },
  data: function data() {
    return {
      searchType: 'identity'
    };
  },
  methods: {
    /**
     * 展示dialog
     */
    show: function show() {
      var _this = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var searchObj;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _this.dialogVisible = true;
              searchObj = _this.searchObj;
              searchObj.filterText = '';
              searchObj.filterChooseText = '';
              searchObj.lazyFilterText = '';
              // 如果不是懒加载，则获取树的数据
              if (!_this.lazy) {
                _context.next = 9;
                break;
              }
              _this.selectedList = cloneDeep_default()(_this.defaultSelectedList);
              _context.next = 12;
              break;
            case 9:
              _context.next = 11;
              return _this.getIdentityTreeSync();
            case 11:
              // 回显已选中的数据
              _this.$nextTick(function () {
                _this.echoSelectedNodes();
              });
            case 12:
              // 添加关闭弹窗事件
              _this.addCloseDialogEvent();
            case 13:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    /**
     * 组织树懒加载方法
     * @param {*} node
     * @param {*} resolve
     */
    loadTree: function loadTree(node, resolve) {
      var _this2 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee2() {
        return regenerator_default().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              return _context2.abrupt("return", _this2.loadTreeCommon(node, resolve, true));
            case 1:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    /**
     * 根据treeId同步获取整颗树
     */
    getIdentityTreeSync: function getIdentityTreeSync() {
      var _this3 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee3() {
        return regenerator_default().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              return _context3.abrupt("return", _this3.getTreeSync());
            case 1:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    },
    /**
     * 根据树id加载组织树
     * @param {String} treeId 树id
     */
    loadTreeByTreeIdSync: function loadTreeByTreeIdSync(treeId) {
      var _this4 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee4() {
        var datas, tree;
        return regenerator_default().wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              _context4.next = 2;
              return _this4.loadTreeSyncCommon(treeId, true);
            case 2:
              datas = _context4.sent;
              tree = datas ? [datas] : []; // true：返回全部节点，false：过滤领导节点
              _this4.treeData = _this4.isLeader ? tree : _this4.getNoLeaderList(tree);
              // 获取展开的层级，将树展开
              _this4.expandNode();
            case 6:
            case "end":
              return _context4.stop();
          }
        }, _callee4);
      }))();
    },
    /**
     * 筛选全部非领导节点
     */
    getNoLeaderList: function getNoLeaderList(data) {
      var _this5 = this;
      return this.isLeaderNode(data).map(function (item) {
        var nodeItem = cloneDeep_default()(item);
        var children = nodeItem.children;
        // 存在子节点时，继续进行筛选
        children && (nodeItem.children = _this5.getNoLeaderList(children));
        return nodeItem;
      });
    },
    /**
     * 筛选当前节点下非领导节点
     * @param {*} data
     * @return {*} 非领导节点
     */
    isLeaderNode: function isLeaderNode(data) {
      var IDENTITY = external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.IDENTITY;
      // 过滤type为IDENTITY人员，且为领导的节点
      return data.filter(function (t) {
        var _t$userIdentityObj;
        return !(t.type === IDENTITY && (_t$userIdentityObj = t.userIdentityObj) !== null && _t$userIdentityObj !== void 0 && _t$userIdentityObj.isLeader);
      });
    },
    /**
     * 点击节点选择
     */
    handleNodeClick: function handleNodeClick(data, node) {
      // 只能选择人员
      if (data.type !== external_jdf_jssdk_namespaceObject.OrgResultTypeEnum.IDENTITY) {
        return;
      }
      this.setToSelected(data, node);
    }
  }
});
;// CONCATENATED MODULE: ./packages/identity-tree/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/identity-tree/src/main.vue





/* normalize component */
;
var component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  mainvue_type_template_id_404aeb74_render,
  mainvue_type_template_id_404aeb74_staticRenderFns,
  false,
  null,
  null,
  null
  
)

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


/* harmony default export */ var identity_tree_transfer_src_mainvue_type_script_lang_js_ = ({
  name: 'JdfIdentityTreeTransfer',
  extends: main,
  directives: {
    elDragDialog: el_drag_dialog
  }
});
;// CONCATENATED MODULE: ./packages/identity-tree-transfer/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var packages_identity_tree_transfer_src_mainvue_type_script_lang_js_ = (identity_tree_transfer_src_mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./packages/identity-tree-transfer/src/main.vue





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

/* harmony default export */ var src_main = (main_component.exports);
;// CONCATENATED MODULE: ./packages/identity-tree-transfer/index.js

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