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

;// 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/dynamic-table/src/main.vue?vue&type=template&id=b5010562&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-dynamic-table"
  }, [_vm.isEdit && _vm.btnIsTop || _vm.title ? _c("div", {
    staticClass: "dynamic-table-title"
  }, [_c("div", {
    staticClass: "title-text"
  }, [_vm._v(_vm._s(_vm.title))]), !_vm.isEmpty(_vm.buttonsDisplayed) && _vm.btnIsTop ? _c("div", {
    staticClass: "operate-btn-group"
  }, _vm._l(_vm.buttonsDisplayed, function (item, index) {
    return _c("span", {
      key: index,
      staticClass: "operate-btn-group-item"
    }, [item.isShow ? _c("el-button", {
      attrs: {
        icon: item.icon,
        size: "small",
        type: "primary"
      },
      on: {
        click: function click($event) {
          return _vm.doEvent(item);
        }
      }
    }, [_vm._v(_vm._s(item.text) + "\n        ")]) : _vm._e()], 1);
  }), 0) : _vm._e()]) : _vm._e(), _c("el-form", {
    ref: "baseForm",
    staticClass: "base-form",
    attrs: {
      model: _vm.baseForm,
      "auto-complete": "on"
    }
  }, [_c("el-table", _vm._g(_vm._b({
    key: _vm.tableKey,
    ref: "multipleTable",
    staticStyle: {
      width: "100%"
    },
    attrs: {
      border: "",
      data: _vm.collapse && this.isCollapseList ? _vm.slice(_vm.baseForm.tableList, 0, _vm.collapseNum) : _vm.baseForm.tableList,
      "tooltip-effect": "dark",
      "row-class-name": _vm.tableRowClassName,
      "header-cell-class-name": _vm.headerRowClass
    },
    on: {
      "selection-change": _vm.handleSelectionChange
    }
  }, "el-table", _vm.$attrs, false), _vm.$listeners), [_vm.isEdit && _vm.selection && _vm.checkBox ? _c("el-table-column", {
    key: "select",
    attrs: {
      fixed: _vm.selectionFixed,
      type: "selection",
      width: "65",
      align: "center",
      selectable: _vm.selectable
    }
  }) : _vm._e(), _vm.serialNoCol ? _c("el-table-column", {
    key: "num",
    attrs: {
      type: "index",
      fixed: _vm.serialNoColFixed,
      align: "center",
      width: "70",
      label: "序号",
      "class-name": "dynamic-no-col"
    }
  }) : _vm._e(), _vm._l(_vm.colsConfigList, function (item, index) {
    return _c("el-table-column", _vm._b({
      key: index,
      attrs: {
        align: item.align || "center",
        label: item.label,
        width: item.width
      },
      scopedSlots: _vm._u([{
        key: "default",
        fn: function fn(scope) {
          return [item.render ? _c("TableExpand", {
            attrs: {
              row: scope.row,
              index: scope.$index,
              render: item.render
            }
          }) : _c("el-form-item", {
            staticClass: "all",
            class: ["all", {
              "flex-in-row": item.appendLabel || item.prependLabel
            }],
            attrs: {
              prop: "tableList.".concat(scope.$index, ".").concat(item.key),
              rules: _vm.rulesFun(item.rules, scope.row, scope.$index),
              set: [_vm.isEditItem = _vm.isEdit && _vm.isEditRow(scope.row) && _vm.isEditOrDisFun(item, scope.$index, "isEdit"), _vm.disabledItem = _vm.isDisabledRow(scope.row) || _vm.isEditOrDisFun(item, scope.$index, "disabled"), _vm.requiredIcon = _vm.isEdit && item.requiredIcon]
            }
          }, [item.appendText || item.appendLabel ? [_c("div", [_vm._v(_vm._s(item.appendText || item.appendLabel))])] : _vm._e(), item.elType === "org" ? _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("el-input", _vm._b({
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              readonly: ""
            },
            on: {
              change: function change($event) {
                return _vm.handleChange($event, item, scope.$index, scope.row);
              }
            },
            nativeOn: {
              click: function click($event) {
                return _vm.open(scope.$index, item, "orgTreeVisible");
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "el-input", item.attrs, false)) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1) : item.elType === "identity" ? _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("el-input", _vm._b({
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              readonly: ""
            },
            on: {
              change: function change($event) {
                return _vm.handleChange($event, item, scope.$index, scope.row);
              }
            },
            nativeOn: {
              click: function click($event) {
                return _vm.open(scope.$index, item, "identityTreeVisible");
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "el-input", item.attrs, false)) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1) : item.elType === "groupOrg" ? _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("el-input", _vm._b({
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              readonly: ""
            },
            on: {
              change: function change($event) {
                return _vm.handleChange($event, item, scope.$index, scope.row);
              }
            },
            nativeOn: {
              click: function click($event) {
                return _vm.open(scope.$index, item, "groupOrgTreeVisible");
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "el-input", item.attrs, false)) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1) : item.elType === "groupIdentity" ? _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("el-input", _vm._b({
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              readonly: ""
            },
            on: {
              change: function change($event) {
                return _vm.handleChange($event, item, scope.$index, scope.row);
              }
            },
            nativeOn: {
              click: function click($event) {
                return _vm.open(scope.$index, item, "groupIdentityTreeVisible");
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "el-input", item.attrs, false)) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1) : item.elType === "cascader" ? _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("el-cascader", _vm._b({
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              options: item.options,
              props: item.cascaderProps
            },
            on: {
              change: function change($event) {
                return _vm.handleChange($event, item, scope.$index, scope.row);
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "el-cascader", item.attrs, false)) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1) : item.elType === "upload" ? _c("div", {
            staticClass: "table-row"
          }, [_c("div", {
            staticStyle: {
              width: "100%"
            }
          }, [_c("jdf-upload-file", _vm._b({
            ref: "upload",
            refInFor: true,
            attrs: {
              "is-edit": _vm.isEditItem
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "jdf-upload-file", item.attrs, false)), _vm.isEditItem && item.attrs.showComment && !item.attrs.disabled ? _c("div", {
            staticClass: "type-info",
            domProps: {
              innerHTML: _vm._s(item.attrs.comment)
            }
          }) : _vm._e()], 1), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()]) : _c("div", {
            staticClass: "table-row"
          }, [_vm.isEditItem ? _c("jdf-common-input", _vm._g(_vm._b({
            staticClass: "common-input",
            attrs: {
              isEdit: _vm.isEditItem,
              disabled: _vm.disabledItem,
              "el-type": item.elType,
              options: item.options ? _vm.getOptions(item, scope.$index, scope.row) : []
            },
            on: {
              change: function change($event) {
                return _vm.commonInputChange($event, item, scope.$index, scope.row);
              }
            },
            model: {
              value: scope.row[item.key],
              callback: function callback($$v) {
                _vm.$set(scope.row, item.key, $$v);
              },
              expression: "scope.row[item.key]"
            }
          }, "jdf-common-input", item.attrs, false), _vm.getItem(item)), [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]) : _c("div", {
            class: _vm.contentOmissionStyle(item)
          }, [_vm._v("\n                " + _vm._s(item.formatter ? item.formatter(scope.row[item.key], scope.row, scope.column, scope.$index) : scope.row[item.key]) + "\n              ")]), _vm.requiredIcon ? _c("div", {
            staticClass: "table-row-flag"
          }, [_vm._v("*")]) : _vm._e()], 1), item.prependText || item.prependLabel ? [_c("div", [_vm._v(_vm._s(item.prependText || item.prependLabel))])] : _vm._e()], 2)];
        }
      }], null, true)
    }, "el-table-column", item.attrs, false));
  }), _vm.isEdit && _vm.selection && _vm.operate ? _c("el-table-column", {
    attrs: {
      align: "center",
      fixed: _vm.selectionFixed ? "right" : _vm.selectionFixed,
      width: "70",
      label: "操作"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function fn(scope) {
        return _vm.isEditRow(scope.row) && scope.row.delete !== false ? [_c("el-link", {
          attrs: {
            type: "danger",
            icon: "el-icon-delete icon-delete",
            underline: false
          },
          on: {
            click: function click($event) {
              return _vm.deleteRow(scope.$index);
            }
          }
        })] : undefined;
      }
    }], null, true)
  }) : _vm._e()], 2)], 1), _c("div", {
    staticClass: "operate-list"
  }, [_vm.isShowCollapseBtn ? _c("div", {
    staticClass: "view-more"
  }, [this.isCollapseList ? [_c("el-link", {
    attrs: {
      type: "info",
      underline: false
    },
    nativeOn: {
      click: function click($event) {
        return _vm.viewMore.apply(null, arguments);
      }
    }
  }, [_vm._v("展开"), _c("i", {
    staticClass: "el-icon-arrow-down"
  })])] : [_c("el-link", {
    attrs: {
      type: "info",
      underline: false
    },
    nativeOn: {
      click: function click($event) {
        return _vm.collapseMore.apply(null, arguments);
      }
    }
  }, [_vm._v("折叠"), _c("i", {
    staticClass: "el-icon-arrow-up"
  })])]], 2) : _vm._e(), !_vm.isEmpty(_vm.buttonsDisplayed) && !_vm.btnIsTop ? _c("div", {
    staticClass: "operate-btn-group"
  }, _vm._l(_vm.buttonsDisplayed, function (item, index) {
    return _c("span", {
      key: index,
      staticClass: "operate-btn-group-item"
    }, [item.isShow ? _c("el-button", {
      attrs: {
        size: "small",
        type: "primary",
        icon: item.icon
      },
      on: {
        click: function click($event) {
          return _vm.doEvent(item);
        }
      }
    }, [_vm._v(_vm._s(item.text) + "\n        ")]) : _vm._e()], 1);
  }), 0) : _vm._e()]), _vm.orgTreeVisible ? _c("jdf-org-tree-transfer", _vm._b({
    ref: "orgTree",
    attrs: {
      visible: _vm.orgTreeVisible,
      "default-selected-list": _vm.defaultSelectedList
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.orgTreeVisible = $event;
      },
      select: _vm.doSelect
    }
  }, "jdf-org-tree-transfer", _vm.treeAttrsAll, false)) : _vm._e(), _vm.identityTreeVisible ? _c("jdf-identity-tree-transfer", _vm._b({
    ref: "identityTree",
    attrs: {
      visible: _vm.identityTreeVisible,
      "default-selected-list": _vm.defaultSelectedList
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.identityTreeVisible = $event;
      },
      select: _vm.doSelect
    }
  }, "jdf-identity-tree-transfer", _vm.treeAttrsAll, false)) : _vm._e(), _vm.groupOrgTreeVisible ? _c("jdf-group-org-tree-transfer", _vm._b({
    ref: "groupOrgTree",
    attrs: {
      visible: _vm.groupOrgTreeVisible,
      "default-selected-list": _vm.defaultSelectedList
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.groupOrgTreeVisible = $event;
      },
      select: _vm.doSelect
    }
  }, "jdf-group-org-tree-transfer", _vm.treeAttrsAll, false)) : _vm._e(), _vm.groupIdentityTreeVisible ? _c("jdf-group-identity-tree-transfer", _vm._b({
    ref: "groupIdentityTree",
    attrs: {
      visible: _vm.groupIdentityTreeVisible,
      "default-selected-list": _vm.defaultSelectedList
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.groupIdentityTreeVisible = $event;
      },
      select: _vm.doSelect
    }
  }, "jdf-group-identity-tree-transfer", _vm.treeAttrsAll, false)) : _vm._e(), _vm.importVisible ? _c("jdf-upload-modal", _vm._g(_vm._b({
    attrs: {
      visible: _vm.importVisible
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.importVisible = $event;
      }
    }
  }, "jdf-upload-modal", _vm.importAttrsAll, false), _vm.$listeners)) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/dynamic-table/src/main.vue?vue&type=template&id=b5010562&

;// 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/helpers/defineProperty"
var defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_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/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 "lodash/isFunction"
var isFunction_namespaceObject = require("lodash/isFunction");
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_namespaceObject);
;// CONCATENATED MODULE: external "lodash/pullAllBy"
var pullAllBy_namespaceObject = require("lodash/pullAllBy");
var pullAllBy_default = /*#__PURE__*/__webpack_require__.n(pullAllBy_namespaceObject);
;// CONCATENATED MODULE: external "lodash/hasIn"
var hasIn_namespaceObject = require("lodash/hasIn");
var hasIn_default = /*#__PURE__*/__webpack_require__.n(hasIn_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/map"
var map_namespaceObject = require("lodash/map");
var map_default = /*#__PURE__*/__webpack_require__.n(map_namespaceObject);
;// CONCATENATED MODULE: external "lodash/slice"
var slice_namespaceObject = require("lodash/slice");
var slice_default = /*#__PURE__*/__webpack_require__.n(slice_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/isEmptyStr.js
/*
 * @Author: lirl
 * @Date: 2023-02-26 20:29:26
 * @Description: 判断是否为空字符串
 */
function isEmptyStr_isEmptyStr(str) {
  return str === '' || str === null || str === undefined;
}
;// 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/isString"
var isString_namespaceObject = require("lodash/isString");
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/message.js


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




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

/**
 * 消息提示框.
 * @param {String} text 消息提示文字
 * @param {String} type success/warning/info/error,默认为success
 */
var message = function message(text) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2000;
  var showClose = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  var className = type === 'success' ? 'pj-common-message' : 'pj-ui-validate';
  return (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 external_element_ui_namespaceObject.MessageBox.alert(content, '提示', {
    confirmButtonText: '确定',
    type: type,
    dangerouslyUseHTMLString: false,
    center: center
  });
};

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

/**
 * 弹出接口错误信息
 */
var alertErrorMsg = function alertErrorMsg(error) {
  if (!error) {
    return;
  }
  if (isString_default()(error)) {
    messageAlert(error, 'warning');
    return;
  }
  var ssoPage = sessionStorage.getItem('ssoPage');
  if (TOKEN_CODES.includes(error.code) && ssoPage) {
    implementation_namespaceObject.window.open(decodeURIComponent(ssoPage), '_self');
  } else {
    var msg = error === null || error === void 0 ? void 0 : error.message;
    msg && messageAlert(msg, 'warning');
  }
};
var showSubmitPrompt = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(msg, wordLimit, isRequired, yesCallback, cancelCallback) {
    var inputWordLimit, _yield$MessageBox$pro, value;
    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          _context2.prev = 0;
          inputWordLimit = wordLimit !== null && wordLimit !== void 0 ? wordLimit : 200;
          _context2.next = 4;
          return MessageBox.prompt(msg, '流程提交', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            cancelButtonClass: 'fr ml10',
            confirmButtonClass: 'fr',
            inputValidator: function inputValidator(v) {
              if (isRequired && isEmptyStr(v)) {
                return '请填写意见';
              }
              if ((v === null || v === void 0 ? void 0 : v.length) > inputWordLimit) {
                return "\u8BF7\u6700\u591A\u8F93\u5165".concat(inputWordLimit, "\u5B57");
              }
              return true;
            },
            inputErrorMessage: '请填写意见',
            closeOnClickModal: false,
            inputType: 'textarea',
            inputPlaceholder: "\u8BF7\u586B\u5199\u610F\u89C1\uFF0C\u6700\u591A".concat(inputWordLimit, "\u5B57")
          });
        case 4:
          _yield$MessageBox$pro = _context2.sent;
          value = _yield$MessageBox$pro.value;
          yesCallback === null || yesCallback === void 0 ? void 0 : yesCallback(value);
          _context2.next = 12;
          break;
        case 9:
          _context2.prev = 9;
          _context2.t0 = _context2["catch"](0);
          cancelCallback === null || cancelCallback === void 0 ? void 0 : cancelCallback();
        case 12:
        case "end":
          return _context2.stop();
      }
    }, _callee2, null, [[0, 9]]);
  }));
  return function showSubmitPrompt(_x4, _x5, _x6, _x7, _x8) {
    return _ref2.apply(this, arguments);
  };
}()));
;// CONCATENATED MODULE: external "lodash/intersectionWith"
var intersectionWith_namespaceObject = require("lodash/intersectionWith");
var intersectionWith_default = /*#__PURE__*/__webpack_require__.n(intersectionWith_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isObject"
var isObject_namespaceObject = require("lodash/isObject");
var isObject_default = /*#__PURE__*/__webpack_require__.n(isObject_namespaceObject);
;// CONCATENATED MODULE: ./src/mixins/dynamicTableMixin.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: lijx
 * @Date: 2023-03-29 15:21:27
 * @LastEditTime: 2023-03-29 17:51:42
 * @Description: 动态表格混入
 */


/* harmony default export */ var dynamicTableMixin = ({
  props: {
    // 表格按钮标题
    bizTitle: {
      type: String,
      default: ''
    },
    // 导入组件属性
    importAttrs: {
      type: Object,
      default: function _default() {}
    },
    // 导入方法
    importFunc: Function,
    // 下载模板方法
    downloadTemplateFunc: Function
  },
  data: function data() {
    return {
      // 导入组件显隐
      importVisible: false
    };
  },
  computed: {
    // 导入组件属性
    importAttrsAll: function importAttrsAll() {
      var _this$importAttrs, _this$importAttrs2;
      return _objectSpread(_objectSpread({}, this.importAttrs), {}, {
        // 'import-func'和'download-template-func'会覆盖v-bind中同名方法，为兼容保留原方法
        importFunc: ((_this$importAttrs = this.importAttrs) === null || _this$importAttrs === void 0 ? void 0 : _this$importAttrs['import-func']) || this.importFunc,
        downloadTemplateFunc: ((_this$importAttrs2 = this.importAttrs) === null || _this$importAttrs2 === void 0 ? void 0 : _this$importAttrs2['download-template-func']) || this.downloadTemplateFunc
      });
    }
  },
  methods: {
    /**
     * 显示的按钮组
     * @param {Array} objects 默认按钮组和自定义按钮组拼接后数组
     * @param {Array} others 需展示的按钮组
     * @param {String} objectsKey objects数组的过滤属性
     * @param {String} othersKey others数组的过滤属性
     * @returns 
     */
    buttonsDisplayedCommon: function buttonsDisplayedCommon(objects, others, objectsKey, othersKey) {
      var _this = this;
      return intersectionWith_default()(objects, others,
      // 兼容字符串数组和对象数组2种方式
      function (ojbVal, othVal) {
        return ojbVal[objectsKey] === (isObject_default()(othVal) ? othVal[othersKey] : othVal);
      }).map(function (t) {
        var _others$filter$0$isSh, _others$filter, _others$filter$;
        return _objectSpread(_objectSpread({}, t), {}, {
          // showBizTitle为true，按钮名拼接表格标题
          text: "".concat(t.text).concat(t.showBizTitle ? _this.bizTitle : ''),
          // 存在isShow属性时，根据isShow控制按钮显隐；无isShow属性，根据isEdit进行控制
          isShow: (_others$filter$0$isSh = (_others$filter = others.filter(function (v) {
            return (v === null || v === void 0 ? void 0 : v[othersKey]) === t[objectsKey];
          })) === null || _others$filter === void 0 ? void 0 : (_others$filter$ = _others$filter[0]) === null || _others$filter$ === void 0 ? void 0 : _others$filter$.isShow) !== null && _others$filter$0$isSh !== void 0 ? _others$filter$0$isSh : _this.isEdit
        });
      });
    }
  }
});
;// CONCATENATED MODULE: external "lodash/transform"
var transform_namespaceObject = require("lodash/transform");
var transform_default = /*#__PURE__*/__webpack_require__.n(transform_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/upload-modal/src/main.vue?vue&type=template&id=dd1e43cc&
var mainvue_type_template_id_dd1e43cc_render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("el-dialog", _vm._b({
    directives: [{
      name: "el-drag-dialog",
      rawName: "v-el-drag-dialog",
      value: true,
      expression: "true"
    }],
    ref: "elDialog",
    attrs: {
      visible: _vm.dialogVisible,
      title: _vm.modalTitle,
      "custom-class": "jdf-upload-modal"
    },
    on: {
      "update:visible": function updateVisible($event) {
        _vm.dialogVisible = $event;
      }
    }
  }, "el-dialog", _vm.dialogAttrs, false), [_c("div", {
    directives: [{
      name: "loading",
      rawName: "v-loading",
      value: _vm.loading,
      expression: "loading"
    }]
  }, [_vm._t("beforeTmpEl"), _vm.downloadTemplate ? _c("div", {
    staticClass: "row"
  }, [_c("div", {
    staticClass: "step-title title"
  }, [_vm._v("步骤一：下载模板")]), _c("el-button", {
    attrs: {
      type: "primary",
      size: "small",
      plain: "",
      loading: _vm.downloadLoading
    },
    on: {
      click: _vm.download
    }
  }, [_vm._v("下载模板")])], 1) : _vm._e(), _vm._t("beforeUploadEl"), _c("div", {
    staticClass: "row"
  }, [_c("div", {
    staticClass: "title"
  }, [_vm.downloadTemplate || !_vm.isEmpty(_vm.$slots) ? _c("span", {
    staticClass: "step-title"
  }, [_vm._v("\n          步骤" + _vm._s(_vm.downloadTemplate && !_vm.isEmpty(_vm.$slots) ? "三" : "二") + "：\n        ")]) : _vm._e(), _c("span", [_vm._v(_vm._s(_vm.importPrompt))])]), _vm.type === "upload" ? _c("div", [_c("div", {
    staticClass: "button-group"
  }, [_c("el-upload", {
    ref: "multipleUpload",
    attrs: {
      action: "#",
      "http-request": _vm.uploadFile,
      "on-change": _vm.changeFiles,
      accept: _vm.accept,
      limit: _vm.limit,
      multiple: _vm.multiple,
      "file-list": _vm.fileList,
      "on-exceed": _vm.onExceed,
      "auto-upload": _vm.autoUpload,
      "before-upload": _vm.beforeUpload
    }
  }, [_c("el-button", {
    attrs: {
      slot: "trigger",
      size: "small",
      type: "primary"
    },
    slot: "trigger"
  }, [_vm._v("选取文件")]), !_vm.autoUpload ? _c("el-button", {
    staticClass: "ml10",
    attrs: {
      size: "small",
      type: "success",
      loading: _vm.manualUploadLoading
    },
    on: {
      click: _vm.manualUpload
    }
  }, [_vm._v("\n              上传到服务器\n            ")]) : _vm._e()], 1)], 1)]) : _c("div", {
    staticClass: "import-row"
  }, [_c("el-input", {
    staticClass: "input-with-select",
    attrs: {
      readonly: ""
    },
    model: {
      value: _vm.fileFullName,
      callback: function callback($$v) {
        _vm.fileFullName = $$v;
      },
      expression: "fileFullName"
    }
  }, [_c("el-upload", {
    staticClass: "import-excel-btn",
    attrs: {
      slot: "append",
      action: "#",
      "http-request": _vm.autoImport,
      "on-change": _vm.changeImportFile,
      "show-file-list": false,
      accept: _vm.accept,
      "auto-upload": _vm.autoUpload
    },
    slot: "append"
  }, [_c("el-button", {
    attrs: {
      size: "small",
      type: "primary",
      icon: "el-icon-folder-opened"
    }
  }, [_vm._v("\n              " + _vm._s(_vm.autoUpload ? "选择并导入文件" : "选择文件") + "\n            ")])], 1)], 1), !_vm.autoUpload ? _c("el-button", {
    staticClass: "ml10",
    attrs: {
      type: "success",
      size: "small",
      icon: "el-icon-upload2",
      loading: _vm.importLoading
    },
    on: {
      click: _vm.manualImport
    }
  }, [_vm._v("导入文件")]) : _vm._e()], 1)])], 2), _c("div", {
    staticClass: "dialog-footer",
    attrs: {
      slot: "footer"
    },
    slot: "footer"
  }, [_c("el-button", {
    attrs: {
      size: "small"
    },
    on: {
      click: function click($event) {
        _vm.dialogVisible = false;
      }
    }
  }, [_vm._v("关 闭")])], 1)]);
};
var mainvue_type_template_id_dd1e43cc_staticRenderFns = [];
mainvue_type_template_id_dd1e43cc_render._withStripped = true;

;// CONCATENATED MODULE: ./packages/upload-modal/src/main.vue?vue&type=template&id=dd1e43cc&

;// CONCATENATED MODULE: external "jdf-jssdk"
var external_jdf_jssdk_namespaceObject = require("jdf-jssdk");
;// CONCATENATED MODULE: external "lodash/head"
var head_namespaceObject = require("lodash/head");
var head_default = /*#__PURE__*/__webpack_require__.n(head_namespaceObject);
;// CONCATENATED MODULE: external "lodash/last"
var last_namespaceObject = require("lodash/last");
var last_default = /*#__PURE__*/__webpack_require__.n(last_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/getFileNameAndExtension.js
/*
 * @Author: lirl
 * @Date: 2023-02-26 20:56:02
 * @Description: 获取文件名称及扩展名
 */


function getFileNameAndExtension(fileName) {
  if (fileName) {
    var array = fileName.split('.');
    return {
      name: head_default()(array),
      extension: last_default()(array)
    };
  }
  return {};
}
;// 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: ./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: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/upload-modal/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; }








/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfUploadModal',
  directives: {
    elDragDialog: el_drag_dialog
  },
  mixins: [dialogAttrs],
  props: {
    // 是导入还是上传 import/upload
    type: {
      type: String,
      default: 'import'
    },
    // dialog是否可见
    visible: {
      type: Boolean,
      default: false
    },
    // dialogtitle
    modalTitle: {
      type: String,
      default: '导入数据'
    },
    // 导入/上传区域提示文字
    importPrompt: {
      type: String,
      default: '请上传已完成的文件'
    },
    // 接受上传的文件类型（thumbnail-mode 模式下此参数无效）
    accept: {
      type: String,
      default: '.xls,.xlsx'
    },
    // 是否下载模板
    downloadTemplate: {
      type: Boolean,
      default: false
    },
    // 附件上传关联的业务id
    bizId: String,
    // 附件目标存储空间
    spaceCode: String,
    // 附件自定义文件类型
    fileType: String,
    // 是否支持多选文件
    multiple: {
      type: Boolean,
      default: false
    },
    // 最大允许上传个数
    limit: {
      type: Number,
      default: 10
    },
    // 上传文件前的钩子，参数为elementui上传组件返回的文件列表
    beforeUploadFunc: Function,
    // 上传文件后，文件数据保存到业务表的方法，参数为文件上传成功后返回的文件信息列表
    saveFunc: Function,
    // 附件最大大小，单位为MB
    maxSize: {
      type: Number,
      default: 20
    },
    downloadTemplateFunc: Function,
    // 导入方法，参数为导入excel文件的FormData对象
    importFunc: Function,
    // 是否实时上传
    autoUpload: {
      type: Boolean,
      default: true
    }
  },
  data: function data() {
    return {
      isEmpty: (isEmpty_default()),
      // dialog是否可见
      dialogVisible: false,
      // 上传loading
      loading: false,
      downloadLoading: false,
      importLoading: false,
      manualUploadLoading: false,
      // 多文件上传时文件列表
      fileList: [],
      // 多文件上传时临时暂存的文件列表
      temporaryFileList: [],
      // 单文件上传时要上传的单个文件对象
      fileRaw: {},
      // 单文件上传时上传文件的完整名称
      fileFullName: '',
      lockScroll: this.$JDF.lockScroll
    };
  },
  watch: {
    visible: {
      handler: function handler(val) {
        if (val) {
          this.dialogVisible = val;
          this.fileList = [];
          this.fileRaw = {};
          this.fileFullName = '';
          this.temporaryFileList = [];
          // 添加关闭弹窗事件
          this.addCloseDialogEvent();
        }
      },
      immediate: true
    },
    dialogVisible: function dialogVisible(val) {
      this.$emit('update:visible', val);
    }
  },
  methods: {
    /**
     * 点击下载模板按钮操作
     */
    download: function download() {
      var _this = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var _this$downloadTemplat;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.prev = 0;
              _this.downloadLoading = true;
              _context.next = 4;
              return (_this$downloadTemplat = _this.downloadTemplateFunc) === null || _this$downloadTemplat === void 0 ? void 0 : _this$downloadTemplat.call(_this);
            case 4:
              _context.next = 9;
              break;
            case 6:
              _context.prev = 6;
              _context.t0 = _context["catch"](0);
              alertErrorMsg(_context.t0);
            case 9:
              _context.prev = 9;
              _this.downloadLoading = false;
              return _context.finish(9);
            case 12:
            case "end":
              return _context.stop();
          }
        }, _callee, null, [[0, 6, 9, 12]]);
      }))();
    },
    /**
     * 监听upload框变化 - 单文件上传
     * @param {Object} file 上传的附件信息
     */
    changeImportFile: function changeImportFile(file) {
      this.fileRaw = file.raw;
      this.fileFullName = file.name;
    },
    /**
     * 监听upload框变化 - 多文件上传
     * @param {Object} file 上传文件的信息
     * @param {Array} fileList 文件列表
     */
    changeFiles: function changeFiles(file, fileList) {
      this.temporaryFileList = this.multiple && !this.autoUpload ? fileList.map(function (t) {
        return t.raw;
      }) : [file.raw];
    },
    /**
     * 校验文件扩展名
     * @param {Array} fileList 文件列表
     */
    invalidExtension: function invalidExtension() {
      var _this2 = this;
      var fileList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      return fileList.some(function (t) {
        return !_this2.accept.includes(getFileNameAndExtension(t.name).extension);
      });
    },
    /**
     * 校验文件大小是否超出
     * @param {Array} fileList 文件列表
     */
    exceedSize: function exceedSize() {
      var _this3 = this;
      var fileList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      return fileList.some(function (t) {
        return t.size / 1024 / 1024 > _this3.maxsize;
      });
    },
    /**
     * 文件上传前校验，参数为上传的文件，若返回 Promise 且被 reject，则停止上传
     * @param {Array} fileList
     */
    validateFiles: function validateFiles(fileList) {
      if (isFunction_default()(this.beforeUploadFunc) && !this.beforeUploadFunc(fileList)) {
        return false;
      }
      // 如果接收附件类型不为空，则校验附件类型
      if (this.accept && this.invalidExtension(fileList)) {
        message("\u4E0A\u4F20\u6587\u4EF6\u53EA\u80FD\u662F".concat(this.accept, "\u683C\u5F0F\uFF01"), 'warning');
        return false;
      }
      // 判断附件大小是否超过限制大小
      if (this.type === 'upload' && this.exceedSize(fileList)) {
        message("\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(this.maxsize, "MB\uFF01"));
        return false;
      }
      return true;
    },
    /**
     * 文件自动上传-上传前校验
     */
    beforeUpload: function beforeUpload(file) {
      return this.validateFiles([file]);
    },
    /**
     * 文件导入上传事件
     */
    autoImport: function autoImport() {
      var _this4 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee2() {
        var _this4$importFunc;
        return regenerator_default().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              // 创建formData
              _this4.loading = true;
              _context2.prev = 1;
              _context2.next = 4;
              return (_this4$importFunc = _this4.importFunc) === null || _this4$importFunc === void 0 ? void 0 : _this4$importFunc.call(_this4, _this4.fileRaw);
            case 4:
              _this4.$emit('importCallback');
              _context2.next = 10;
              break;
            case 7:
              _context2.prev = 7;
              _context2.t0 = _context2["catch"](1);
              alertErrorMsg(_context2.t0);
            case 10:
              _context2.prev = 10;
              _this4.loading = false;
              return _context2.finish(10);
            case 13:
            case "end":
              return _context2.stop();
          }
        }, _callee2, null, [[1, 7, 10, 13]]);
      }))();
    },
    /**
     * 手动导入上传事件
     */
    manualImport: function manualImport() {
      var _this5 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee3() {
        var formData, _this5$importFunc;
        return regenerator_default().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              formData = new FormData();
              formData.append('file', _this5.fileRaw);
              _this5.importLoading = true;
              _context3.prev = 3;
              _context3.next = 6;
              return (_this5$importFunc = _this5.importFunc) === null || _this5$importFunc === void 0 ? void 0 : _this5$importFunc.call(_this5, formData);
            case 6:
              _this5.$emit('importCallback');
              _context3.next = 12;
              break;
            case 9:
              _context3.prev = 9;
              _context3.t0 = _context3["catch"](3);
              alertErrorMsg(_context3.t0);
            case 12:
              _context3.prev = 12;
              _this5.importLoading = false;
              return _context3.finish(12);
            case 15:
            case "end":
              return _context3.stop();
          }
        }, _callee3, null, [[3, 9, 12, 15]]);
      }))();
    },
    /**
     * 文件超出个数限制时的钩子
     */
    onExceed: function onExceed() {
      message("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(this.limit, "\u4E2A\u6587\u4EF6"), 'warning');
    },
    /**
     * 点击上传到服务器按钮
     * 1. 校验文件列表
     * 2. 校验文件
     * 3. 上传文件
     */
    manualUpload: function manualUpload() {
      var _this6 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee5() {
        var temporaryFileList, _this6$saveFunc, uploadParam, fileApi, funcs, datas;
        return regenerator_default().wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
            case 0:
              temporaryFileList = _this6.temporaryFileList;
              if (!isEmpty_default()(temporaryFileList)) {
                _context5.next = 4;
                break;
              }
              message('请先选择要上传的文件', 'warning');
              return _context5.abrupt("return");
            case 4:
              if (_this6.validateFiles(temporaryFileList)) {
                _context5.next = 6;
                break;
              }
              return _context5.abrupt("return");
            case 6:
              _context5.prev = 6;
              _this6.manualUploadLoading = true;
              uploadParam = {
                owner: _this6.bizId,
                spaceCode: _this6.spaceCode,
                fileType: _this6.fileType
              };
              fileApi = new external_jdf_jssdk_namespaceObject.FileService(_this6.$JDF.baseUrl);
              funcs = _this6.temporaryFileList.map( /*#__PURE__*/function () {
                var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee4(t, index) {
                  var res;
                  return regenerator_default().wrap(function _callee4$(_context4) {
                    while (1) switch (_context4.prev = _context4.next) {
                      case 0:
                        _context4.next = 2;
                        return fileApi.upload(mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, uploadParam), {}, {
                          sortNum: index,
                          file: t
                        }));
                      case 2:
                        res = _context4.sent;
                        return _context4.abrupt("return", res);
                      case 4:
                      case "end":
                        return _context4.stop();
                    }
                  }, _callee4);
                }));
                return function (_x, _x2) {
                  return _ref.apply(this, arguments);
                };
              }());
              _context5.next = 13;
              return Promise.all(funcs);
            case 13:
              datas = _context5.sent;
              _context5.next = 16;
              return (_this6$saveFunc = _this6.saveFunc) === null || _this6$saveFunc === void 0 ? void 0 : _this6$saveFunc.call(_this6, datas);
            case 16:
              message('上传成功');
              _context5.next = 22;
              break;
            case 19:
              _context5.prev = 19;
              _context5.t0 = _context5["catch"](6);
              alertErrorMsg(_context5.t0);
            case 22:
              _context5.prev = 22;
              _this6.manualUploadLoading = false;
              return _context5.finish(22);
            case 25:
            case "end":
              return _context5.stop();
          }
        }, _callee5, null, [[6, 19, 22, 25]]);
      }))();
    },
    /**
     * 文件上传方法
     */
    uploadFile: function uploadFile() {
      var _this7 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee6() {
        var _this7$temporaryFileL, file, _this7$saveFunc, res;
        return regenerator_default().wrap(function _callee6$(_context6) {
          while (1) switch (_context6.prev = _context6.next) {
            case 0:
              _this7$temporaryFileL = slicedToArray_default()(_this7.temporaryFileList, 1), file = _this7$temporaryFileL[0];
              _this7.loading = true;
              _context6.prev = 2;
              _context6.next = 5;
              return new external_jdf_jssdk_namespaceObject.FileService(_this7.$JDF.baseUrl).upload({
                owner: _this7.bizId,
                spaceCode: _this7.spaceCode,
                fileType: _this7.fileType,
                file: file
              });
            case 5:
              res = _context6.sent;
              _context6.next = 8;
              return (_this7$saveFunc = _this7.saveFunc) === null || _this7$saveFunc === void 0 ? void 0 : _this7$saveFunc.call(_this7, [res]);
            case 8:
              message('上传成功');
              _context6.next = 14;
              break;
            case 11:
              _context6.prev = 11;
              _context6.t0 = _context6["catch"](2);
              alertErrorMsg(_context6.t0);
            case 14:
              _context6.prev = 14;
              _this7.loading = false;
              return _context6.finish(14);
            case 17:
            case "end":
              return _context6.stop();
          }
        }, _callee6, null, [[2, 11, 14, 17]]);
      }))();
    }
  }
});
;// CONCATENATED MODULE: ./packages/upload-modal/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/upload-modal/src/main.vue





/* normalize component */
;
var component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  mainvue_type_template_id_dd1e43cc_render,
  mainvue_type_template_id_dd1e43cc_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: ./packages/table/src/components/table-expand.js
/*
 * @Author: lirl
 * @Date: 2020-05-18 16:04:40
 * @LastEditTime: 2022-04-21 09:41:56
 * @Description: file content
 */
/* harmony default export */ var table_expand = ({
  name: 'TableExpand',
  // 使组件无状态
  functional: true,
  props: {
    // render函数 用于进行渲染
    render: {
      type: Function,
      default: function _default() {}
    },
    // 表格行数据
    row: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    // 行索引
    index: {
      type: Number,
      default: 0
    },
    // 表格列数据
    column: {
      type: Object,
      default: null
    }
  },
  render: function render(h, ctx) {
    // 组装要被使用的数据
    var params = {
      row: ctx.props.row,
      index: ctx.props.index
    };
    // 如果有表格列数据则加到params里
    if (ctx.props.column) {
      params.column = ctx.props.column;
    }
    // 返回props中的渲染函数进行渲染
    return ctx.props.render(h, params);
  }
});
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/dynamic-table/src/main.vue?vue&type=script&lang=js&





function src_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 src_mainvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? src_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)) : src_mainvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }













// 引入表格扩展渲染组件

var btnList = [{
  text: '添加',
  flag: 'add',
  eventName: 'add',
  icon: 'iconfont icon-tianjia'
}, {
  text: '插入',
  flag: 'insert',
  eventName: 'insert',
  icon: 'iconfont icon-charu'
}, {
  text: '删除',
  flag: 'delete',
  eventName: 'batchDelete',
  icon: 'iconfont icon-lajitong'
}, {
  text: '修改',
  flag: 'editor',
  eventName: 'disabledClick',
  icon: 'iconfont icon-bianji'
}, {
  text: '导入',
  flag: 'import',
  eventName: 'importTable',
  icon: 'iconfont icon-daoru'
}];
/* harmony default export */ var dynamic_table_src_mainvue_type_script_lang_js_ = ({
  name: 'JdfDynamicTable',
  components: {
    JdfUploadModal: main,
    TableExpand: table_expand
  },
  mixins: [dynamicTableMixin],
  model: {
    prop: 'value',
    event: 'change-v'
  },
  props: {
    // 表格要展示的数据
    value: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 是否可编辑
    isEdit: {
      type: Boolean,
      default: true
    },
    selection: {
      type: Boolean,
      default: true
    },
    selectionFixed: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    },
    operation: {
      type: Array,
      default: function _default() {
        return ['add', 'insert', 'delete', 'editor'];
      }
    },
    operationList: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    tableData: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    tableDataOption: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    serialNoCol: {
      type: Boolean,
      default: true
    },
    serialNoColFixed: {
      type: Boolean,
      default: false
    },
    newObjFormat: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    // 按钮是否展示在上方
    btnIsTop: {
      type: Boolean,
      default: true
    },
    // 新增传入的方法
    addFun: Function,
    // 单个删除传入的方法
    deleteFun: Function,
    // 多行删除传入的方法
    batchDeleteFun: Function,
    // 是否能够选中本行
    selectableFun: Function,
    // 是否展示复选框（首列多选）
    checkBox: {
      type: Boolean,
      default: true
    },
    // 是否展示操作列（尾列删除）
    operate: {
      type: Boolean,
      default: true
    },
    // 编辑行条件
    editRowCondition: {
      type: [Function, Boolean],
      default: true
    },
    // 禁用行条件
    disabledRowCondition: {
      type: [Function, Boolean],
      default: false
    },
    // 是否折叠
    collapse: {
      type: Boolean,
      default: false
    },
    // 默认展示数量
    collapseNum: {
      type: Number,
      default: 5
    },
    // 自定义行样式
    rowClassName: {
      type: [Function, String],
      default: function _default() {}
    }
  },
  data: function data() {
    return {
      slice: (slice_default()),
      isEmpty: (isEmpty_default()),
      currentOrg: {
        index: 0,
        colConfig: null
      },
      treeAttrs: {
        multiple: false,
        lazy: false,
        filterable: false,
        showField: 'name',
        emptyText: '无数据',
        expandLevel: 1,
        expandAll: false,
        canSelectNoLeaf: false,
        dialogTitle: '选择',
        modalAppendToBody: true,
        appendToBody: false
      },
      // 表格列配置
      colsConfigList: [],
      // 表格数据
      baseForm: {
        tableList: []
      },
      // 选中的行
      multipleSelection: [],
      // 选人选组织控件默认已选的数据
      defaultSelectedList: [],
      orgTreeVisible: false,
      identityTreeVisible: false,
      groupOrgTreeVisible: false,
      groupIdentityTreeVisible: false,
      tableKey: 1,
      // 是否展示折叠后数据
      isCollapseList: true
    };
  },
  computed: {
    // 显示的按钮
    buttonsDisplayed: function buttonsDisplayed() {
      // 拼接按钮组，并根据showBtns进行展示过滤
      return this.buttonsDisplayedCommon([].concat(btnList, toConsumableArray_default()(this.operationList)), this.operation, 'flag', 'name');
    },
    // 内容移除省略样式控制
    contentOmissionStyle: function contentOmissionStyle() {
      return function (item) {
        var _item$attrs;
        return (_item$attrs = item.attrs) !== null && _item$attrs !== void 0 && _item$attrs.showOverflowTooltip ? 'readonly-text content-omission' : 'readonly-text';
      };
    },
    // 表格数据v-model赋值优先级大于v-bind
    tableListAssign: function tableListAssign() {
      // v-model值为空时，采用v-bind赋值
      return isEmpty_default()(this.value) ? this.tableData : this.value;
    },
    // 是否展示折叠展开按钮
    isShowCollapseBtn: function isShowCollapseBtn() {
      return this.collapse && this.baseForm.tableList.length > this.collapseNum;
    }
  },
  watch: {
    tableListAssign: {
      handler: function handler(val) {
        this.baseForm.tableList = val;
      },
      immediate: true,
      deep: true
    },
    tableDataOption: {
      handler: function handler(val) {
        this.colsConfigList = cloneDeep_default()(val);
        this.tableKey += 1;
      },
      immediate: true,
      deep: true
    },
    'baseForm.tableList': {
      handler: function handler(val) {
        this.$emit('change-v', val);
      },
      deep: true,
      immediate: true
    }
  },
  methods: {
    /**
     * 在列值上加className
     * 现状：index和select默认写在了组件，并没有传入进来，rowClass是从第一列开始，所以加星号去除前两列，
     * 去除index和select所以需要减去2
     * 后续打算将该组件重写，重新设计必填星号以及其它功能
     */
    headerRowClass: function headerRowClass(_ref) {
      var _this$colsConfigList;
      var columnIndex = _ref.columnIndex;
      return ((_this$colsConfigList = this.colsConfigList[columnIndex - 2]) === null || _this$colsConfigList === void 0 ? void 0 : _this$colsConfigList.requiredStar) && 'jdf-table-star' || '';
    },
    // 校验判断 如果rules是一个函数 则返回 当前行数据和索引 反之返回rules
    rulesFun: function rulesFun(rules, row, index) {
      return isFunction_default()(rules) ? rules(row, index) : rules;
    },
    // 仅对 type=selection 的列有效，类型为 Function，Function 的返回值用来决定这一行的 CheckBox 是否可以勾选
    selectable: function selectable(row) {
      var _this$selectableFun, _this$selectableFun2;
      // 优先根据当前行编辑条件，判断复选框是否可选
      if (isFunction_default()(this.editRowCondition)) {
        return this.editRowCondition(row);
      }
      if (isFunction_default()(this.disabledRowCondition)) {
        return this.disabledRowCondition(row);
      }
      return (_this$selectableFun = (_this$selectableFun2 = this.selectableFun) === null || _this$selectableFun2 === void 0 ? void 0 : _this$selectableFun2.call(this, row)) !== null && _this$selectableFun !== void 0 ? _this$selectableFun : true;
    },
    validateField: function validateField(data) {
      this.$refs.baseForm.validateField(data);
    },
    insert: function insert() {
      this.$emit('insert');
    },
    /**
     * 为每行添加一个rowIndex
     */
    tableRowClassName: function tableRowClassName(_ref2) {
      var row = _ref2.row,
        rowIndex = _ref2.rowIndex;
      // 需要为每行的数据对象添加一个属性
      // eslint-disable-next-line no-param-reassign
      row.rowIndex = rowIndex;
      return isFunction_default()(this.rowClassName) ? this.rowClassName({
        row: row,
        rowIndex: rowIndex
      }) : this.rowClassName;
    },
    /**
     * 点击操作按钮执行事件
     * @param {Object} item 当前选中按钮
     */
    doEvent: function doEvent(item) {
      var flag = item.flag;
      // 判断是否为默认按钮
      if (btnList.some(function (ele) {
        return ele.flag === flag;
      })) {
        this[item.eventName]();
      } else {
        this.$emit(item.eventName, this.baseForm.tableList, this.multipleSelection);
      }
    },
    /**
     * 获取列的下拉候选值
     * @param {Object} col 列配置
     * @param {Number} index 当前所属行
     * @param {Object} row 当前行
     */
    getOptions: function getOptions(col, index, row) {
      var _options$index;
      var options = col.options,
        linkage = col.linkage,
        linkageKey = col.linkageKey;
      // 如果是函数，直接返回
      if (isFunction_default()(options)) {
        return options(row);
      }
      // 如果不是联动的选择框或者属于联动组中的顶级，则返回options
      if (!linkage || !linkageKey) {
        return options;
      }
      // 如果是联动中的子集，则根据当前操作的行获取下拉数据
      return (_options$index = options[index]) !== null && _options$index !== void 0 ? _options$index : [];
    },
    /**
     * 监听输入框变化
     * @param {String} val 值
     * @param {Object} col 列配置对象
     * @param {Number} rowIndex 所在行
     * @param {Object} rowData 所在行数据
     */
    handleChange: function handleChange(value, col, rowIndex, rowData) {
      this.$emit('valueChange', {
        value: value,
        col: col,
        rowIndex: rowIndex,
        rowData: rowData,
        tableData: this.baseForm.tableList
      });
    },
    /**
     * 监听commonInput数据变化
     * @param {String} val 值
     * @param {Object} col 列配置对象
     * @param {Number} index 所在行
     * @param {Object} row 所在行数据
     */
    commonInputChange: function commonInputChange(val, col, index, row) {
      var _this = this;
      this.handleChange(val, col, index, row);
      if (!col.linkage) {
        return;
      }
      // 获取配置信息
      var options = this.getOptions(col, index, row);
      // 当前行数据
      var rowData = this.baseForm.tableList[index];
      // 如果是清空当前选中的值，则清空子集的值与候选项
      if (isEmptyStr_isEmptyStr(val)) {
        this.colsConfigList.filter(function (t) {
          return t.linkage && t.linkageGroupFlag === col.linkageGroupFlag && t.linkageLevel > col.linkageLevel;
        }).forEach(function (t) {
          _this.$set(rowData, t.key, '');
          // eslint-disable-next-line no-param-reassign
          t.options[index] = [];
        });
      } else {
        // 获取当前选中的值对应的配置
        var option = options.find(function (t) {
          return t.value === val;
        });
        // 如果有子集
        if (!isEmpty_default()(option.children)) {
          // 清空子集中该行的options
          this.colsConfigList.filter(function (t) {
            return t.linkage && t.linkageGroupFlag === col.linkageGroupFlag && t.linkageLevel > col.linkageLevel;
          }).forEach(function (t) {
            // 如果子集的上级联动key等于当前操作的dom的key，则设置其options为当前操作的options的children
            if (t.linkageKey === col.key) {
              // eslint-disable-next-line no-param-reassign
              t.options[index] = cloneDeep_default()(option.children);
            } else {
              // 重置其他子集的options
              // eslint-disable-next-line no-param-reassign
              t.options[index] = [];
            }
            // 清空子集已选的数据
            _this.$set(rowData, t.key, '');
          });
        }
      }
    },
    // 修改
    disabledClick: function disabledClick() {
      this.$emit('disabledEvent');
    },
    /**
     * 当前行是否可编辑
     * @param {Object} row 当前行
     */
    isEditRow: function isEditRow(row) {
      var editRowCondition = this.editRowCondition;
      return isFunction_default()(editRowCondition) ? editRowCondition(row) : editRowCondition;
    },
    /**
     * 当前行是否禁用
     * @param {Object} row 当前行
     */
    isDisabledRow: function isDisabledRow(row) {
      var disabledRowCondition = this.disabledRowCondition;
      return isFunction_default()(disabledRowCondition) ? disabledRowCondition(row) : disabledRowCondition;
    },
    /**
     * 判断是否处于只读或禁用
     * @param {Object} item 当前行配置
     * @param {Number} index 当前行索引
     * @param {String} key disabled或isEdit
     */
    isEditOrDisFun: function isEditOrDisFun(item, index, key) {
      if (hasIn_default()(item.attrs, key)) {
        return isFunction_default()(item.attrs[key]) ? item.attrs[key](this.baseForm.tableList[index]) : item.attrs[key];
      }
      return key === 'isEdit';
    },
    /**
     * 打开选组织、选身份、群组选组织、群组选身份dialog
     * @param {Number} index 当前行的索引
     * @param {Object} col 当前列的数据
     * @param {String} visibleField 要赋值的字段
     */
    open: function open(index, col, visibleField) {
      if (this.isEditOrDisFun(col, index, 'disabled')) {
        return;
      }
      this.currentOrg = {
        index: index,
        colConfig: col
      };
      // 合并tree的通用配置和列配置
      this.treeAttrsAll = src_mainvue_type_script_lang_js_objectSpread(src_mainvue_type_script_lang_js_objectSpread({}, this.treeAttrs), col.treeAttrs);
      this.defaultSelectedList = this.baseForm.tableList[index]["".concat(col.key, "Selected")];
      this[visibleField] = true;
    },
    /**
     * 选择数据
     * @param {Array} datas 已选数据
     */
    doSelect: function doSelect(datas) {
      var _this$currentOrg = this.currentOrg,
        colConfig = _this$currentOrg.colConfig,
        index = _this$currentOrg.index;
      var key = colConfig.key;
      var rowData = this.baseForm.tableList[index];
      this.$set(rowData, key, map_default()(datas, this.treeAttrsAll.showField || 'name').join(','));
      this.$set(rowData, "".concat(key, "Selected"), datas);
      this.$emit('selectOrgOrIdentity', {
        value: datas,
        col: colConfig,
        rowIndex: index,
        rowData: rowData,
        tableData: this.baseForm.tableList
      });
    },
    // 数据校验
    check: function check() {
      return validateForm(this.$refs.baseForm);
    },
    /**
     * 新增一行
     */
    add: function add() {
      var _this2 = this;
      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee() {
        var _this2$addFun;
        return regenerator_default().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return (_this2$addFun = _this2.addFun) === null || _this2$addFun === void 0 ? void 0 : _this2$addFun.call(_this2, _this2.baseForm.tableList);
            case 2:
              _this2.baseForm.tableList.push(cloneDeep_default()(_this2.newObjFormat));
              // 新增数据，默认展开
              _this2.isCollapseList = false;
            case 4:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    /**
     * 单行删除
     * @param {Number} index 删除行的索引
     */
    deleteRow: function deleteRow(index) {
      var _this3 = this;
      messageConfirm('确定删除此行？', /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee2() {
        var _this3$deleteFun;
        return regenerator_default().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return (_this3$deleteFun = _this3.deleteFun) === null || _this3$deleteFun === void 0 ? void 0 : _this3$deleteFun.call(_this3, index);
            case 2:
              _this3.baseForm.tableList.splice(index, 1);
            case 3:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      })));
    },
    /**
     * 多选框选中
     * @param {Object} rows  选中的行
     */
    handleSelectionChange: function handleSelectionChange(rows) {
      this.multipleSelection = rows;
    },
    /**
     * 多条删除
     */
    batchDelete: function batchDelete() {
      var _this4 = this;
      var multipleSelection = this.multipleSelection;
      if (isEmpty_default()(multipleSelection)) {
        message('请选择要删除的行', 'warning');
        return;
      }
      messageConfirm('确认删除选中的行？', /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee3() {
        var _this4$batchDeleteFun;
        var tableList;
        return regenerator_default().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              tableList = _this4.baseForm.tableList;
              _context3.next = 3;
              return (_this4$batchDeleteFun = _this4.batchDeleteFun) === null || _this4$batchDeleteFun === void 0 ? void 0 : _this4$batchDeleteFun.call(_this4, multipleSelection);
            case 3:
              _this4.baseForm.tableList = cloneDeep_default()(pullAllBy_default()(tableList, multipleSelection, 'rowIndex'));
              _this4.$refs.multipleTable.clearSelection();
              _this4.$emit('batchDelete', tableList, multipleSelection);
            case 6:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      })));
    },
    /**
     * 获取表单数据
     */
    getData: function getData() {
      return this.baseForm.tableList;
    },
    /**
     * 导入
     */
    importTable: function importTable() {
      this.importVisible = true;
    },
    /**
     * 展开更多 
     */
    viewMore: function viewMore() {
      this.isCollapseList = false;
    },
    /**
     * 折叠更多
     */
    collapseMore: function collapseMore() {
      this.isCollapseList = true;
    },
    /**
     * 解析业务传进来的事件比如blur，click等事件，实现业务本身方法
     * @param {object} item 
     */
    getItem: function getItem(item) {
      var _this5 = this;
      if (!item) {
        return {};
      }
      var event = item.event;
      if (!event) {
        return {};
      }
      var events = event;
      var formData = this.formData,
        index = this.index;
      var setFormData = function setFormData(k, v) {
        return _this5.$set(formData, k, v);
      };
      return transform_default()(Object.entries(events), function (e, _ref5) {
        var _ref6 = slicedToArray_default()(_ref5, 2),
          k = _ref6[0],
          v = _ref6[1];
        e[k] = function (val, oldVal) {
          return oldVal ? v(val, oldVal, formData, setFormData, index) : v(val, formData, setFormData, index);
        };
      }, {});
    }
  }
});
;// CONCATENATED MODULE: ./packages/dynamic-table/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var packages_dynamic_table_src_mainvue_type_script_lang_js_ = (dynamic_table_src_mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./packages/dynamic-table/src/main.vue





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

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

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