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

;// 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: ./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/increased-form/src/main.vue?vue&type=template&id=901a565e&

var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-increased-form"
  }, [_c("div", {
    staticClass: "jdf-increased-edit-form"
  }, [_c("el-form", _vm._b({
    ref: "vForm",
    attrs: {
      model: _vm.formData,
      rules: _vm.rules
    },
    nativeOn: {
      submit: function submit($event) {
        $event.preventDefault();
      }
    }
  }, "el-form", _vm.formAttrs, false), _vm._l(_vm.configs, function (t, i) {
    return _c("el-row", {
      key: i,
      staticClass: "flex"
    }, _vm._l(t, function (item, index) {
      var _class;
      return _c("el-col", {
        key: index,
        staticClass: "grid-cell",
        attrs: {
          span: item.colSpan
        }
      }, [item.subTitle ? _c("div", {
        staticClass: "jdf-sub-title"
      }, [_vm._v(_vm._s(item.formElName))]) : !item.hideCol ? _c("el-form-item", {
        staticClass: "required",
        class: (_class = {
          "jdf-increased-form-down": item.mulitInput
        }, defineProperty_default()(_class, item.elType, true), defineProperty_default()(_class, item.defineClassName, item.defineClassName), _class),
        attrs: {
          prop: _vm.fieldsIsEdit(item.formElCode, t) ? item.formElCode : "",
          set: [_vm.ismulitInputColumns = !_vm.isEmpty(item.mulitInputColumns), _vm.mulitInputItem = _vm.ismulitInputColumns ? item.mulitInputColumns : item.mulitInputRows]
        }
      }, [[!item.hideLabel ? _c("span", {
        attrs: {
          slot: "label"
        },
        slot: "label"
      }, [_vm._v("\n                " + _vm._s(item.alias || item.formElName) + "\n              ")]) : _vm._e(), item.mulitInputList ? _vm._l(_vm.mulitInputItem, function (v, vIndex) {
        return _c("el-row", {
          key: vIndex,
          staticClass: "flex inputList"
        }, _vm._l(v, function (ti, tIndex) {
          return _c("el-col", {
            key: tIndex,
            staticClass: "grid-cell",
            attrs: {
              span: ti.colSpan
            }
          }, [_c("el-form-item", {
            staticClass: "required",
            class: [{
              "flex-column": _vm.ismulitInputColumns
            }, ti.defineClassName || ""],
            attrs: {
              prop: _vm.fieldsIsEdit(ti.formElCode, v) ? ti.formElCode : ""
            }
          }, [_c("span", {
            class: {
              "not-justify": ti.notJustify
            },
            attrs: {
              slot: "label"
            },
            slot: "label"
          }, [_vm._v("\n                        " + _vm._s(ti.formElName) + "\n                      ")]), ti.render ? _c("FormExpand", {
            attrs: {
              "form-item-data": ti
            }
          }) : _c("jdf-common-input", _vm._g(_vm._b({
            class: {
              "flex-in-row": ti.appendLabel || ti.prependLabel || ti.attrs && ti.attrs.showPlaceholderIcon
            },
            attrs: {
              "el-type": ti.elType || "input",
              "is-edit": _vm.fieldsIsEdit(ti.formElCode, v),
              options: _vm.fieldOptions(_vm.formData, ti.options),
              readonly: _vm.fieldReadonly(ti.formElCode)
            },
            on: {
              getDynamicTable: function getDynamicTable(val) {
                return _vm.getDynamicTable(val, ti);
              }
            },
            nativeOn: {
              click: function click($event) {
                _vm.openOrClick(ti.elType, ti.formElCode, _vm.fieldsIsEdit(t.formElCode, v), ti);
              }
            },
            scopedSlots: _vm._u([ti.attrs && ti.attrs.showPlaceholderIcon ? {
              key: "appendIcon",
              fn: function fn() {
                return [_c("el-tooltip", {
                  attrs: {
                    placement: "bottom",
                    effect: "light",
                    "visible-arrow": false
                  }
                }, [_c("div", {
                  attrs: {
                    slot: "content"
                  },
                  slot: "content"
                }, [_vm._v(_vm._s(ti.attrs.placeholder))]), _c("i", {
                  staticClass: "jdf-tooltip-icon el-icon-info"
                })])];
              },
              proxy: true
            } : null, ti.appendText || ti.appendLabel ? {
              key: "appendText",
              fn: function fn() {
                return [_c("div", {
                  staticClass: "jdf-increase-form-mulit-input-append"
                }, [_vm._v(_vm._s(ti.appendText || ti.appendLabel))])];
              },
              proxy: true
            } : null, ti.prependText || ti.prependLabel ? {
              key: "prependText",
              fn: function fn() {
                return [_c("div", {
                  staticClass: "jdf-increase-form-mulit-input-prepend"
                }, [_vm._v(_vm._s(ti.prependText || ti.prependLabel))])];
              },
              proxy: true
            } : null], null, true),
            model: {
              value: _vm.formData[ti.formElCode],
              callback: function callback($$v) {
                _vm.$set(_vm.formData, ti.formElCode, $$v);
              },
              expression: "formData[ti.formElCode]"
            }
          }, "jdf-common-input", _vm.getCommonInputAttrs(ti.attrs), false), _vm.getEvent(ti)), [_vm._v("\n                        " + _vm._s(ti.formatter && !_vm.fieldsIsEdit(ti.formElCode, v) ? ti.formatter(_vm.formData[ti.formElCode]) : _vm.formData[ti.formElCode]) + "\n                      ")])], 1)], 1);
        }), 1);
      }) : [item.render ? _c("FormExpand", {
        attrs: {
          "form-item-data": item
        }
      }) : _c("jdf-common-input", _vm._g(_vm._b({
        staticClass: "location-down-jdf-common-input",
        class: {
          "flex-in-row": item.appendLabel || item.prependLabel || item.attrs && item.attrs.showPlaceholderIcon
        },
        attrs: {
          "el-type": item.elType || "input",
          "is-edit": _vm.fieldsIsEdit(item.formElCode, t),
          options: _vm.fieldOptions(_vm.formData, item.options),
          readonly: _vm.fieldReadonly(item.formElCode)
        },
        nativeOn: {
          click: function click($event) {
            _vm.openOrClick(item.elType, item.formElCode, _vm.fieldsIsEdit(item.formElCode, t), item);
          }
        },
        scopedSlots: _vm._u([item.attrs && item.attrs.showPlaceholderIcon ? {
          key: "appendIcon",
          fn: function fn() {
            return [_c("el-tooltip", {
              attrs: {
                placement: "bottom",
                effect: "light",
                "visible-arrow": false
              }
            }, [_c("div", {
              attrs: {
                slot: "content"
              },
              slot: "content"
            }, [_vm._v(_vm._s(item.attrs.placeholder))]), _c("i", {
              staticClass: "jdf-tooltip-icon el-icon-info"
            })])];
          },
          proxy: true
        } : null, item.appendText || item.appendLabel ? {
          key: "appendText",
          fn: function fn() {
            return [_c("div", {
              staticClass: "jdf-increase-form-append"
            }, [_vm._v(_vm._s(item.appendText || item.appendLabel))])];
          },
          proxy: true
        } : null, item.prependText || item.prependLabel ? {
          key: "prependText",
          fn: function fn() {
            return [_c("div", {
              staticClass: "jdf-increase-form-prepend"
            }, [_vm._v(_vm._s(item.prependText || item.prependLabel))])];
          },
          proxy: true
        } : null], null, true),
        model: {
          value: _vm.formData[item.formElCode],
          callback: function callback($$v) {
            _vm.$set(_vm.formData, item.formElCode, $$v);
          },
          expression: "formData[item.formElCode]"
        }
      }, "jdf-common-input", _vm.getAttrs(item), false), _vm.getEvent(item)), [_vm._v(_vm._s(item.formatter && !_vm.fieldsIsEdit(item.formElCode, t) ? item.formatter(_vm.formData[item.formElCode]) : _vm.formData[item.formElCode]))]), item.showBtn && !_vm.isDone && _vm.fieldsIsEdit(item.formElCode, t) ? _c("el-button", _vm._g(_vm._b({
        staticClass: "jdf-increased-form-down-btn",
        class: defineProperty_default()({}, item.btnObj.defineClassName, [item.btnObj.defineClassName]),
        on: {
          click: function click($event) {
            return _vm.btnOpen(item, true);
          }
        }
      }, "el-button", item.btnObj.btnAttrs, false), _vm.getEvent(item.btnObj)), [_vm._v(_vm._s(item.btnObj.name) + "\n                ")]) : _vm._e()], item.mulitInput ? _c("div", {
        staticClass: "jdf-increase-form-mulit-list"
      }, _vm._l(item.mulitInputArr || [], function (fieldObj, fieldIndex) {
        return _c("div", {
          key: fieldIndex
        }, [fieldObj.render ? _c("FormExpand", {
          attrs: {
            "form-item-data": fieldObj
          }
        }) : _c("div", {
          staticClass: "jdf-increase-form-mulit-content"
        }, [_c("jdf-common-input", _vm._b({
          class: {
            "flex-in-row": fieldObj.appendLabel || fieldObj.prependLabel || fieldObj.attrs && fieldObj.attrs.showPlaceholderIcon
          },
          attrs: {
            "el-type": fieldObj.elType || "input",
            clearable: "",
            "is-edit": _vm.fieldsIsEdit(fieldObj.formElCode, item.mulitInputArr),
            options: _vm.fieldOptions(_vm.formData, item.options),
            readonly: _vm.fieldReadonly(fieldObj.formElCode)
          },
          nativeOn: {
            click: function click($event) {
              _vm.openOrClick(fieldObj.elType, fieldObj.formElCode, _vm.fieldsIsEdit(fieldObj.formElCode, item.mulitInputArr), fieldObj);
            }
          },
          scopedSlots: _vm._u([fieldObj.attrs && fieldObj.attrs.showPlaceholderIcon ? {
            key: "appendIcon",
            fn: function fn() {
              return [_c("el-tooltip", {
                attrs: {
                  placement: "bottom",
                  effect: "light",
                  "visible-arrow": false
                }
              }, [_c("div", {
                attrs: {
                  slot: "content"
                },
                slot: "content"
              }, [_vm._v(_vm._s(fieldObj.attrs.placeholder))]), _c("i", {
                staticClass: "jdf-tooltip-icon el-icon-info"
              })])];
            },
            proxy: true
          } : null, fieldObj.appendText || fieldObj.appendLabel ? {
            key: "appendText",
            fn: function fn() {
              return [_c("div", {
                staticClass: "jdf-increase-form-mulit-row-append"
              }, [_vm._v(_vm._s(fieldObj.appendText || fieldObj.appendLabel))])];
            },
            proxy: true
          } : null, fieldObj.prependText || fieldObj.prependLabel ? {
            key: "prependText",
            fn: function fn() {
              return [_c("div", {
                staticClass: "jdf-increase-form-mulit-row-prepend"
              }, [_vm._v(_vm._s(fieldObj.prependText || fieldObj.prependLabel))])];
            },
            proxy: true
          } : null], null, true),
          model: {
            value: _vm.formData[fieldObj.formElCode],
            callback: function callback($$v) {
              _vm.$set(_vm.formData, fieldObj.formElCode, $$v);
            },
            expression: "formData[fieldObj.formElCode]"
          }
        }, "jdf-common-input", _vm.getCommonInputAttrs(fieldObj.attrs), false), [_vm._v("\n                      " + _vm._s(fieldObj.formatter && !_vm.fieldsIsEdit(fieldObj.formElCode, item.mulitInputArr) ? fieldObj.formatter(_vm.formData[fieldObj.formElCode]) : _vm.formData[fieldObj.formElCode]) + "\n                    ")]), fieldObj.showBtn && !_vm.isDone && _vm.fieldsIsEdit(fieldObj.formElCode, item.mulitInputArr) ? _c("el-button", _vm._g(_vm._b({
          staticClass: "jdf-increased-form-down-btn",
          class: defineProperty_default()({}, fieldObj.btnObj.defineClassName, [fieldObj.btnObj.defineClassName]),
          on: {
            click: function click($event) {
              return _vm.btnOpen(fieldObj, true);
            }
          }
        }, "el-button", fieldObj.btnObj.btnAttrs || {}, false), _vm.getEvent(fieldObj.btnObj)), [_vm._v(_vm._s(fieldObj.btnObj.name) + "\n                    ")]) : _vm._e()], 1)], 1);
      }), 0) : _vm._e()]], 2) : _vm._e()], 1);
    }), 1);
  }), 1), _vm.renderVisible ? _c("jdf-render-dialog", {
    attrs: {
      visible: _vm.renderVisible,
      "default-selected-list": _vm.defaultSelectedList,
      "multiple-selected-list": _vm.multipleSelectedList,
      item: _vm.getItem()
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.renderVisible = $event;
      },
      getSelectData: _vm.getSelectData,
      select: _vm.doSelect
    }
  }) : _vm._e()], 1)]);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/increased-form/src/main.vue?vue&type=template&id=901a565e&

;// 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/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/flatMap"
var flatMap_namespaceObject = require("lodash/flatMap");
var flatMap_default = /*#__PURE__*/__webpack_require__.n(flatMap_namespaceObject);
;// CONCATENATED MODULE: external "lodash/transform"
var transform_namespaceObject = require("lodash/transform");
var transform_default = /*#__PURE__*/__webpack_require__.n(transform_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isFunction"
var isFunction_namespaceObject = require("lodash/isFunction");
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_namespaceObject);
;// CONCATENATED MODULE: external "lodash/reduce"
var reduce_namespaceObject = require("lodash/reduce");
var reduce_default = /*#__PURE__*/__webpack_require__.n(reduce_namespaceObject);
;// CONCATENATED MODULE: external "lodash/ceil"
var ceil_namespaceObject = require("lodash/ceil");
var ceil_default = /*#__PURE__*/__webpack_require__.n(ceil_namespaceObject);
;// CONCATENATED MODULE: external "lodash/cloneDeep"
var cloneDeep_namespaceObject = require("lodash/cloneDeep");
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep_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/drop"
var drop_namespaceObject = require("lodash/drop");
var drop_default = /*#__PURE__*/__webpack_require__.n(drop_namespaceObject);
;// CONCATENATED MODULE: external "lodash/omit"
var omit_namespaceObject = require("lodash/omit");
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: external "globalthis/implementation"
var implementation_namespaceObject = require("globalthis/implementation");
;// CONCATENATED MODULE: ./src/utils/tools/validateForm.js

/*
 * @Author: lirl
 * @Date: 2023-02-26 21:50:39
 * @Description: 校验表单
 */

function validateForm(form) {
  var focusError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  return new Promise(function (resolve) {
    if (!form) {
      resolve();
    }
    form.validate(function (valid) {
      if (valid) {
        resolve();
      } else if (focusError) {
        setTimeout(function () {
          var _document$getElements = implementation_namespaceObject.document.getElementsByClassName('is-error'),
            _document$getElements2 = slicedToArray_default()(_document$getElements, 1),
            error = _document$getElements2[0];
          if (error) {
            var selector = error.querySelector('input,textarea');
            selector && selector.focus();
          }
        }, 100);
      }
    });
  });
}
;// CONCATENATED MODULE: external "element-ui"
var external_element_ui_namespaceObject = require("element-ui");
;// CONCATENATED MODULE: external "lodash/mapKeys"
var mapKeys_namespaceObject = require("lodash/mapKeys");
var mapKeys_default = /*#__PURE__*/__webpack_require__.n(mapKeys_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/validateFormByAlert.js

/*
 * @Author: lirl
 * @Date: 2023-02-26 22:00:41
 * @Description: 表单校验,以弹窗的方式
 */




function validateFormByAlert(form) {
  var focusError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  return new Promise(function (resolve, reject) {
    if (!form) {
      resolve();
    }
    form.validate(function (valid, object) {
      if (valid) {
        resolve();
      } else if (focusError) {
        var messageErrorTip = [];
        mapKeys_default()(object, function (v) {
          messageErrorTip.push(v);
        });
        var _flatMap = flatMap_default()(messageErrorTip),
          _flatMap2 = slicedToArray_default()(_flatMap, 1),
          tip = _flatMap2[0].message;
        (0,external_element_ui_namespaceObject.Message)({
          message: tip,
          type: 'warning',
          offset: 300,
          dangerouslyUseHTMLString: false,
          duration: 3000,
          showClose: true,
          customClass: 'pj-validate'
        });
        setTimeout(function () {
          var _document$getElements = implementation_namespaceObject.document.getElementsByClassName('is-error'),
            _document$getElements2 = slicedToArray_default()(_document$getElements, 1),
            error = _document$getElements2[0];
          if (error) {
            var selector = error.querySelector('input,textarea');
            selector && selector.focus();
          }
        }, 100);
        reject();
      }
    });
  });
}
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/render-dialog/src/main.vue?vue&type=script&lang=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; }
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfRenderDialog',
  props: {
    item: Object,
    visible: Boolean
  },
  render: function render(h) {
    var item = this.item;
    if (item.render) {
      return item.render;
    }
    return h(item.type, {
      class: _objectSpread({}, item.classObj),
      style: _objectSpread({}, item.styleObj),
      on: _objectSpread(_objectSpread({}, this.$listeners), item.on),
      attrs: _objectSpread(_objectSpread({}, this.$attrs), item.attrs),
      props: _objectSpread(_objectSpread({}, item.props), {}, {
        visible: this.visible
      }),
      domProps: _objectSpread({}, item.domProps)
      // 作用域插槽的格式为
      // { name: props => VNode | Array<VNode> }
      // scopedSlots: {
      //   default: (p) => h('span', p.option),
      // },
      // // 如果组件是其它组件的子组件，需为插槽指定名称
      // slot: 'name-of-slot',
      // // 其它特殊顶层 property
      // key: 'myKey',
      // ref: 'myRef',
      // // 如果你在渲染函数中给多个元素都应用了相同的 ref 名，
      // // 那么 `$refs.myRef` 会变成一个数组。
      // refInFor: true
    }, []);
  }
});
;// CONCATENATED MODULE: ./packages/render-dialog/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/render-dialog/src/main.vue
var main_render, main_staticRenderFns
;



/* normalize component */
;
var component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  main_render,
  main_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: ./packages/increased-form/src/form-expand.js
/*
 * @Author: lijx
 * @Date: 2023-03-30 15:56:58
 * @LastEditTime: 2023-03-30 16:22:21
 * @Description: 表单render
 */

/* harmony default export */ var form_expand = ({
  name: 'FormExpand',
  // 使组件无状态
  functional: true,
  props: {
    formItemData: {
      type: Object,
      default: function _default() {}
    }
  },
  render: function render(h, ctx) {
    var formItemData = ctx.props.formItemData;
    // 返回props中的渲染函数进行渲染
    return formItemData.render(h, formItemData);
  }
});
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/increased-form/src/main.vue?vue&type=script&lang=js&



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















var componentsName = {
  // 选组织
  orgTreeVisible: {
    type: 'jdf-org-tree-transfer',
    childNodes: function childNodes() {
      return function () {
        return [];
      };
    }
  },
  // 群组选组织
  groupOrgTreeVisible: {
    type: 'jdf-group-org-tree-transfer',
    childNodes: function childNodes() {
      return function () {
        return [];
      };
    }
  },
  // 选择弹出框
  dialogTableVisible: {
    type: 'jdf-dialog-table',
    childNodes: function childNodes() {
      return function () {
        return [];
      };
    }
  },
  // 群组选身份
  groupIdentityTreeVisible: {
    type: 'jdf-group-identity-tree-transfer',
    childNodes: function childNodes() {
      return function () {
        return [];
      };
    }
  },
  // 选人员
  identityTreeVisible: {
    type: 'jdf-identity-tree-transfer',
    childNodes: function childNodes() {
      return function () {
        return [];
      };
    }
  }
};
/* harmony default export */ var increased_form_src_mainvue_type_script_lang_js_ = ({
  name: 'JdfIncreasedForm',
  model: {
    prop: 'data',
    event: 'change'
  },
  components: {
    JdfRenderDialog: main,
    FormExpand: form_expand
  },
  props: {
    // id
    id: String,
    validateFun: Function,
    index: Number,
    /**
     * 全表单字段是否可编辑
     */
    allFieldsReadonly: {
      type: Boolean,
      default: false
    },
    /**
     * 校验规则
     */
    rules: {
      type: Object,
      default: function _default() {}
    },
    configs: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    /**
     * 文档数据
     */
    data: {
      type: Object,
      default: function _default() {}
    },
    readonlyFields: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    isDone: {
      type: Boolean,
      default: false
    },
    /**
     * 表单属性
     */
    formAttrs: {
      type: Object,
      default: function _default() {}
    },
    /**
     * 是否使用弹窗校验
     */
    validateByAlert: {
      type: Boolean,
      default: true
    },
    // 是否是嵌套在动态表格中的子表单
    subForm: Boolean
  },
  data: function data() {
    var _this = this;
    return {
      isEmpty: (isEmpty_default()),
      pageLoading: false,
      clickField: '',
      // 当前点击的字段的配置
      clickFieldConfig: {},
      // formData: {},
      // orgTreeVisible: false,
      // identityTreeVisible: false,
      // groupOrgTreeVisible: false,
      // groupIdentityTreeVisible: false,
      // 选人选组织控件默认已选的数据
      defaultSelectedList: [],
      // 树属性
      treeAttrs: {},
      // dialogTableVisible: false,
      // dialogTableAttrs
      dialogTableAttrs: {},
      // dialogTableEvent
      dialogTableEvents: {},
      // 打开事件
      openFun: {
        personOrOrg: function personOrOrg(item, isEdit) {
          return _this.open(item, isEdit);
        },
        dialogTable: function dialogTable(item, isEdit) {
          return _this.openTable(item, isEdit);
        }
      },
      multipleSelectedList: [],
      visibleField: '',
      renderVisible: false,
      renderAttrs: {}
    };
  },
  computed: {
    /**
     * 将二维数组平铺开
     */
    formFieldConfig: function formFieldConfig() {
      return flatMap_default()(this.configs);
    },
    formData: {
      get: function get() {
        return this.data;
      },
      set: function set(val) {
        this.$emit('change', val);
      }
    }
  },
  methods: {
    /**
     * 校验表单数据
     */
    validateBusinessForm: function validateBusinessForm() {
      return this.validateByAlert ? validateFormByAlert(this.$refs.vForm) : validateForm(this.$refs.vForm);
    },
    /**
     * 自定义字段是否可编辑
     */
    fieldsIsEdit: function fieldsIsEdit(field) {
      var v = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      if (this.allFieldsReadonly) {
        return false;
      }
      var fields = v.map(function (t) {
        return t.formElCode;
      });
      return fields.includes(field) && this.fieldIsEdit(field, v);
    },
    /**
     * 判断字段是否可编辑
     */
    fieldIsEdit: function fieldIsEdit(field, v) {
      var _v$find;
      return !this.isDone && (v === null || v === void 0 ? void 0 : (_v$find = v.find(function (t) {
        return t.formElCode === field;
      })) === null || _v$find === void 0 ? void 0 : _v$find.editable) === '1';
    },
    /**
     * 适用于选组织/选人员组件
     */
    fieldReadonly: function fieldReadonly(field) {
      return this.readonlyFields.includes(field);
    },
    /**
    * 字段输入框点击事件，打开选人选组织或者table
    * @param elType
    * @param formElCode
    * @param isEdit
    * @param item
    */
    openOrClick: function openOrClick(elType, formElCode, isEdit, item) {
      this.openFun[elType] ? this.openFun[elType](item, isEdit) : this.clickItem(formElCode, isEdit, item);
    },
    /**
     * 按钮点击事件
     */
    btnOpen: function btnOpen(t, isEdit) {
      var btnObj = t.btnObj;
      if (btnObj !== null && btnObj !== void 0 && btnObj.btnEvent) {
        return;
      }
      this.btnClickOpen(t, isEdit);
    },
    /**
     * 按钮点击打开事件，打开选人选组织还是table
     * @param t 字段配置对象
     * @param isEdit 是否可编辑
     */
    btnClickOpen: function btnClickOpen(t, isEdit) {
      var _this$openFun$t$elTyp;
      ((_this$openFun$t$elTyp = this.openFun[t.elType]) !== null && _this$openFun$t$elTyp !== void 0 ? _this$openFun$t$elTyp : this.open)(t, isEdit);
    },
    /**
     * 单击事件
     */
    clickItem: function clickItem(field, isEdit, item) {
      var _this2 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              if (isEdit) {
                // 继承表单业务扩展方法
                _this2.$emit('clickItem', field, item);
              }
            case 1:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    /**
     * 打开选人或者选部门弹框
     */
    open: function open(t, isEdit) {
      if (isEdit) {
        var _t$treeAttrs, _t$treeAttrs2, _t$treeAttrs3;
        var visibleField = t.visibleField,
          formElCode = t.formElCode;
        // 区分打开选人，选部门或者为dialogTable
        this.treeAttrs = mainvue_type_script_lang_js_objectSpread({}, (_t$treeAttrs = t.treeAttrs) !== null && _t$treeAttrs !== void 0 ? _t$treeAttrs : {});
        this.renderAttrs = mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, (_t$treeAttrs2 = t.treeAttrs) !== null && _t$treeAttrs2 !== void 0 ? _t$treeAttrs2 : {}), {}, {
          appendToBody: true
        });
        this.clickField = formElCode;
        this.clickFieldConfig = t;
        // 如果是群组选人，但是隐藏了人员，选的是部门，则在回写时回写已选部门
        if (visibleField === 'groupIdentityTreeVisible' && (_t$treeAttrs3 = t.treeAttrs) !== null && _t$treeAttrs3 !== void 0 && _t$treeAttrs3.isHiddenIdentity) {
          var _formData;
          var formData = this.formData;
          this.defaultSelectedList = (_formData = formData["".concat(formElCode, "DeptSelected")]) !== null && _formData !== void 0 ? _formData : formData["".concat(formElCode, "Selected")];
        } else {
          this.defaultSelectedList = this.formData["".concat(formElCode, "Selected")];
        }
        this.visibleField = visibleField;
        this.renderVisible = true;
      }
    },
    /**
     * 打开
     */
    openTable: function openTable(t, isEdit) {
      if (isEdit) {
        var _t$dialogTableAttrs;
        var visibleField = t.visibleField,
          formElCode = t.formElCode;
        this.renderAttrs = this.buildDialogTableAttrs(mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, this.dialogTableAttrs), (_t$dialogTableAttrs = t.dialogTableAttrs) !== null && _t$dialogTableAttrs !== void 0 ? _t$dialogTableAttrs : {}));
        this.clickField = formElCode;
        this.clickFieldConfig = t;
        this.multipleSelectedList = this.formData["".concat(formElCode, "Selected")];
        this.visibleField = visibleField;
        this.renderVisible = true;
      }
    },
    /**
     * 选择人员或者组织后关闭事件
     */
    doSelect: function doSelect(datas, showField) {
      var _this$$JDF$separator;
      var clickField = this.clickField,
        formData = this.formData,
        $set = this.$set;
      $set(formData, clickField, datas.map(function (t) {
        return t[showField !== null && showField !== void 0 ? showField : 'name'];
      }).join((_this$$JDF$separator = this.$JDF.separator) !== null && _this$$JDF$separator !== void 0 ? _this$$JDF$separator : '，'));
      $set(formData, "".concat(clickField, "Selected"), datas);
      $set(formData, "".concat(clickField, "Ids"), datas.map(function (t) {
        return t.id;
      }).join(','));
      this.$emit('selectIdOrOrg', {
        clickField: clickField,
        datas: datas,
        formData: formData,
        clickFieldConfig: this.clickFieldConfig
      });
    },
    /**
     * 为event事件添加参数
     */
    getEvent: function getEvent(item) {
      var _this3 = this;
      if (!item) {
        return {};
      }
      var event = item.event,
        btnEvent = item.btnEvent;
      if (!(event || btnEvent)) {
        return {};
      }
      var events = event || btnEvent;
      var formData = this.formData,
        index = this.index;
      var setFormData = function setFormData(k, v) {
        return _this3.$set(formData, k, v);
      };
      return transform_default()(Object.entries(events), function (e, _ref) {
        var _ref2 = slicedToArray_default()(_ref, 2),
          k = _ref2[0],
          v = _ref2[1];
        e[k] = function (val, oldVal) {
          return oldVal ? v(val, oldVal, formData, setFormData, index) : v(val, formData, setFormData, index);
        };
      }, {});
    },
    /**
     * options类型判断
     */
    fieldOptions: function fieldOptions(formData) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      return isFunction_default()(options) ? options(formData) : options;
    },
    /*
     * 构建打开表单属性
     */
    buildDialogTableAttrs: function buildDialogTableAttrs(dialogTableAttrs) {
      var _dialogTableAttrs$dia, _dialogTableAttrs$dia2;
      // 查询条件，按钮，列值配置
      return mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, dialogTableAttrs), {}, {
        columns: (_dialogTableAttrs$dia = dialogTableAttrs.dialogTableColumns) !== null && _dialogTableAttrs$dia !== void 0 ? _dialogTableAttrs$dia : [],
        configs: this.buildQueryConfigs(dialogTableAttrs.queryConditionConfigs),
        paginationAttrs: (_dialogTableAttrs$dia2 = dialogTableAttrs.dialogTablePaginationAttrs) !== null && _dialogTableAttrs$dia2 !== void 0 ? _dialogTableAttrs$dia2 : {}
      });
    },
    /**
     * 构建查询参数的二维数组
     * @param queryConditionConfigs 传入的查询参数，一维数组
     */
    buildQueryConfigs: function buildQueryConfigs(queryConditionConfigs) {
      if (!queryConditionConfigs) {
        return [];
      }
      // 判断总共的列数
      var colTotal = reduce_default()(queryConditionConfigs, function (result, v) {
        return result + v.queryColspan;
      }, 0);
      return this.buildQueryItems(queryConditionConfigs, colTotal);
    },
    /**
     * 构建一行数据
     */
    buildQueryItems: function buildQueryItems(queryConditionConfigs, colTotal) {
      // 判断是否是24的几倍,判断是几行
      var rows = ceil_default()(colTotal / 24);
      var configs = cloneDeep_default()(queryConditionConfigs);
      return map_default()(Array(rows), function () {
        var arr = [];
        reduce_default()(configs, function (result, v) {
          if (result < 24) {
            arr.push(mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, v), {}, {
              queryLabel: v.label,
              queryField: v.value,
              colSpan: v.queryColspan,
              elType: v.queryElType,
              attrs: v.queryAttrs
            }));
          }
          return result + v.queryColspan;
        }, 0);
        configs = drop_default()(configs, arr.length);
        return arr;
      });
    },
    /**
     * 获取确定后的事件
     */
    getSelectData: function getSelectData(datas) {
      var showNameField = this.renderAttrs.showNameField;
      var $set = this.$set,
        formData = this.formData,
        clickField = this.clickField,
        separator = this.$JDF.separator;
      // this.$JDF.separator ?? '，'
      $set(formData, clickField, datas.map(function (t) {
        return t[showNameField];
      }).join(separator !== null && separator !== void 0 ? separator : '，'));
      $set(formData, "".concat(clickField, "Selected"), datas);
      this.$emit('selectedTableData', {
        clickField: clickField,
        datas: datas,
        formData: formData,
        clickFieldConfig: this.clickFieldConfig
      });
    },
    /**
     * 根据组件类型获取组件配置
     */
    getItem: function getItem() {
      var visibleField = this.visibleField;
      // 获取组件配置信息
      var componentsObj = componentsName[visibleField];
      if (componentsObj) {
        var item = {
          type: componentsObj.type,
          on: this.$listeners,
          attrs: mainvue_type_script_lang_js_objectSpread({}, this.renderAttrs),
          $scopedSlots: omit_default()([], ['default', 'prependText', 'appendText']),
          props: {
            id: this.id
          },
          childNodes: componentsObj.childNodes([], 'label', 'value')
        };
        return item;
      }
      return {};
    },
    /**
     * 获取配置属性
     * @param {Object} item 配置
     */
    getAttrs: function getAttrs(item) {
      // 如果配置的是上传附件，并且没有传关联的bizId，则将自动生成的bizId放进去
      if (this.subForm && item.elType === 'uploadFile' && !item.attrs.bizId) {
        return mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, item.attrs), {}, {
          bizId: this.data.uploadReleatedId
        });
      }
      return this.getCommonInputAttrs(item.attrs);
    },
    /**
     * 为属性添加默认值
     */
    getCommonInputAttrs: function getCommonInputAttrs(attrs) {
      return mainvue_type_script_lang_js_objectSpread({
        clearable: true
      }, attrs !== null && attrs !== void 0 ? attrs : {});
    },
    /**
     * 获取动态表格内数据
     */
    getDynamicTable: function getDynamicTable(data, item) {
      var elType = item.elType,
        formElCode = item.formElCode;
      // 需要被赋值的elType
      var assignType = 'dynamicTable';
      elType === assignType && (this.formData[formElCode] = cloneDeep_default()(data));
    }
  }
});
;// CONCATENATED MODULE: ./packages/increased-form/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var packages_increased_form_src_mainvue_type_script_lang_js_ = (increased_form_src_mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./packages/increased-form/src/main.vue





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

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

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