"use strict";
/*
 * ATTENTION: An "eval-source-map" devtool has been used.
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunknocode_platform"] = self["webpackChunknocode_platform"] || []).push([[1980],{

/***/ "./src/hooks/useFormDataList.ts":
/*!**************************************!*\
  !*** ./src/hooks/useFormDataList.ts ***!
  \**************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty2 = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = exports.SELECT_ACTIONS = void 0;\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _concat = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\"));\nvar _filter = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\"));\nvar _includes = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/includes */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js\"));\nvar _find = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js\"));\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\nvar _menuTableUtil = __webpack_require__(/*! @/utils/menuTableUtil */ \"./src/utils/menuTableUtil.js\");\nvar _env = __webpack_require__(/*! @/constants/env */ \"./src/constants/env.js\");\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _useFormDataListState3 = _interopRequireWildcard(__webpack_require__(/*! ./useFormDataListState */ \"./src/hooks/useFormDataListState.ts\"));\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _useAppContext2 = _interopRequireDefault(__webpack_require__(/*! @/hooks/useAppContext */ \"./src/hooks/useAppContext.js\"));\nvar _PageEventService = __webpack_require__(/*! @/service/PageEventService */ \"./src/service/PageEventService.ts\");\nvar _menuTableActions = __webpack_require__(/*! @/utils/menuTableActions */ \"./src/utils/menuTableActions.ts\");\nvar _menuTableAppActions = __webpack_require__(/*! @/utils/menuTableAppActions */ \"./src/utils/menuTableAppActions.ts\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n// import { TableContext } from '@/context/apps'\n\nvar LoadingMsg = '数据加载中...';\nvar SELECT_ACTIONS = exports.SELECT_ACTIONS = {\n  check_all: 'check-all',\n  uncheck_all: 'uncheck-all',\n  check: 'check',\n  uncheck: 'uncheck'\n};\nvar useFormDataList = function useFormDataList(formInfo, options, tableActions) {\n  // 改为加载首面统一接口获取筛选条件，不再每次请求表格都获取\n  var _useAppContext = (0, _useAppContext2.default)(),\n    _useAppContext$state = _useAppContext.state,\n    state = _useAppContext$state === void 0 ? {} : _useAppContext$state;\n  var compareTypes = state.compareTypes,\n    defaultAdminFormId = state.defaultAdminFormId,\n    defaultAppsFormId = state.defaultAppsFormId;\n  var appId = formInfo.appId,\n    formId = formInfo.formId,\n    env = formInfo.env,\n    _formInfo$viewAuth = formInfo.viewAuth,\n    viewAuth = _formInfo$viewAuth === void 0 ? true : _formInfo$viewAuth,\n    _formInfo$pending = formInfo.pending,\n    pending = _formInfo$pending === void 0 ? false : _formInfo$pending,\n    setPending = formInfo.setPending;\n  var _options$needSerial = options.needSerial,\n    needSerial = _options$needSerial === void 0 ? false : _options$needSerial,\n    _options$loadMore = options.loadMore,\n    loadMore = _options$loadMore === void 0 ? false : _options$loadMore,\n    _options$loadData = options.loadData,\n    loadData = _options$loadData === void 0 ? true : _options$loadData,\n    _options$updateFooter = options.updateFooter,\n    updateFooter = _options$updateFooter === void 0 ? false : _options$updateFooter,\n    _options$isMob = options.isMob,\n    isMob = _options$isMob === void 0 ? false : _options$isMob,\n    _options$horizontal = options.horizontal,\n    horizontal = _options$horizontal === void 0 ? false : _options$horizontal,\n    operateCol = options.operateCol,\n    _options$columnsDataT = options.columnsDataTranform,\n    columnsDataTranform = _options$columnsDataT === void 0 ? _menuTableUtil.columnsDataTranform : _options$columnsDataT;\n  var sendFooterDataSource = tableActions.sendFooterDataSource,\n    getColHeadFilterConfig = tableActions.getColHeadFilterConfig,\n    getColHeadFilters = tableActions.getColHeadFilters,\n    getInitFormDataList = tableActions.getInitFormDataList,\n    loadFormListWithParams = tableActions.loadFormListWithParams,\n    onSaveFormListSetting = tableActions.onSaveFormListSetting,\n    loadEnumFilterValue = tableActions.getEnumFilterValue,\n    _getStatInfo = tableActions.getStatInfo,\n    getUpdateFooterDataSource = tableActions.getUpdateFooterDataSource,\n    getNewFilters = tableActions.getNewFilters,\n    onDeleteFormDataListItem = tableActions.onDeleteFormDataListItem,\n    onSavePageSize = tableActions.onSavePageSize,\n    getOrderBy = tableActions.getOrderBy,\n    getFormDataListSetting = tableActions.getFormDataListSetting;\n  var _useFormDataListState = (0, _useFormDataListState3.default)(),\n    _useFormDataListState2 = (0, _slicedToArray2.default)(_useFormDataListState, 2),\n    formDataListState = _useFormDataListState2[0],\n    setFormDataListState = _useFormDataListState2[1];\n  var dataSource = formDataListState.dataSource,\n    footerDataSource = formDataListState.footerDataSource,\n    pageNo = formDataListState.pageNo,\n    pageSize = formDataListState.pageSize,\n    totalCount = formDataListState.totalCount,\n    listItemConfig = formDataListState.listItemConfig,\n    listFilterConfig = formDataListState.listFilterConfig,\n    configuredFilterItems = formDataListState.configuredFilterItems,\n    bizButtons = formDataListState.bizButtons,\n    listFilters = formDataListState.listFilters,\n    searchKeywords = formDataListState.searchKeywords,\n    orderBy = formDataListState.orderBy,\n    orderInfo = formDataListState.orderInfo,\n    colHeadFilter = formDataListState.colHeadFilter,\n    enumFilterValue = formDataListState.enumFilterValue,\n    stateInfo = formDataListState.stateInfo,\n    schemaId = formDataListState.schemaId,\n    selectedIds = formDataListState.selectedIds,\n    selectStatus = formDataListState.selectStatus,\n    notInSelectedIds = formDataListState.notInSelectedIds,\n    selectedCount = formDataListState.selectedCount;\n  var defualtFormId = env === _env.ENV_APP ? defaultAppsFormId : env === _env.ENV_ADMIN ? defaultAdminFormId : '';\n  var formListParamsMemo = (0, _react.useMemo)(function () {\n    return {\n      appId: appId,\n      formId: formId,\n      env: env,\n      listItemConfig: listItemConfig,\n      listFilters: listFilters,\n      pageNo: pageNo,\n      pageSize: pageSize,\n      searchKeywords: searchKeywords,\n      updateFooter: true,\n      orderBy: orderBy,\n      orderInfo: orderInfo,\n      viewAuth: viewAuth,\n      schemaId: schemaId\n    };\n  }, [appId, formId, env, listItemConfig, listFilters, pageNo, pageSize, searchKeywords, orderBy, orderInfo, viewAuth, schemaId]);\n  var setFormDataListStateWithPostFooter = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data, listFilters, searchKeywords) {\n      var newFooterDataSource;\n      return _regenerator.default.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            if (!updateFooter) {\n              _context.next = 6;\n              break;\n            }\n            _context.next = 3;\n            return getUpdateFooterDataSource === null || getUpdateFooterDataSource === void 0 ? void 0 : getUpdateFooterDataSource(appId, formId, env, pageNo, pageSize, listFilters, searchKeywords, listItemConfig, footerDataSource);\n          case 3:\n            _context.t0 = _context.sent;\n            _context.next = 7;\n            break;\n          case 6:\n            _context.t0 = footerDataSource;\n          case 7:\n            newFooterDataSource = _context.t0;\n            setFormDataListState(_objectSpread(_objectSpread({}, data), {}, {\n              footerDataSource: newFooterDataSource\n            }));\n          case 9:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    }));\n    return function (_x, _x2, _x3) {\n      return _ref.apply(this, arguments);\n    };\n  }(), [appId, formId, env, pageNo, pageSize, listItemConfig, footerDataSource, updateFooter, setFormDataListState]);\n  var getSelectedId = (0, _react.useCallback)(function (_ref2) {\n    var _ref2$status = _ref2.status,\n      status = _ref2$status === void 0 ? selectStatus : _ref2$status,\n      info = _ref2.info;\n    var _ref3 = info || {},\n      _ref3$newDataSource = _ref3.newDataSource,\n      newDataSource = _ref3$newDataSource === void 0 ? dataSource : _ref3$newDataSource,\n      _ref3$newNotInIds = _ref3.newNotInIds,\n      newNotInIds = _ref3$newNotInIds === void 0 ? notInSelectedIds : _ref3$newNotInIds,\n      _ref3$newSelectedIds = _ref3.newSelectedIds,\n      newSelectedIds = _ref3$newSelectedIds === void 0 ? selectedIds : _ref3$newSelectedIds;\n    switch (status) {\n      case _useFormDataListState3.CHECK:\n        return newSelectedIds;\n      case _useFormDataListState3.CHECK_ALL:\n        return (0, _map.default)(newDataSource).call(newDataSource, function (item) {\n          return item.id;\n        });\n      case _useFormDataListState3.CHECK_CANCEL:\n        return (0, _menuTableUtil.getSelectedIdByInfo)(newDataSource, newNotInIds);\n      default:\n        return [];\n    }\n  }, [dataSource, notInSelectedIds, selectStatus, selectedIds]);\n\n  // 区分是否是loadMore模式 用于数据更新\n  var setPostState = (0, _react.useCallback)(function (_ref4) {\n    var config = _ref4.config,\n      _ref4$noPreData = _ref4.noPreData,\n      noPreData = _ref4$noPreData === void 0 ? false : _ref4$noPreData,\n      callback = _ref4.callback,\n      updateFooter = _ref4.updateFooter,\n      _ref4$clearSelectInfo = _ref4.clearSelectInfo,\n      clearSelectInfo = _ref4$clearSelectInfo === void 0 ? false : _ref4$clearSelectInfo;\n    var setFormState = updateFooter ? setFormDataListStateWithPostFooter : setFormDataListState;\n    var listFilters = config.listFilters,\n      searchKeywords = config.searchKeywords;\n    var newSelectInfo = clearSelectInfo ? _menuTableAppActions.initSelectInfo : {};\n    var prevDataSource = noPreData ? [] : dataSource; // 搜索和筛选要清空原先数据， 否则在移动端loadMore下，搜索数据会叠加原来数据\n    return /*#__PURE__*/function () {\n      var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(doPost) {\n        var data;\n        return _regenerator.default.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              _context2.next = 2;\n              return doPost(config);\n            case 2:\n              data = _context2.sent;\n              if (data) {\n                if (loadMore) {\n                  setFormState(_objectSpread(_objectSpread({}, data), {}, {\n                    dataSource: (0, _concat.default)(prevDataSource).call(prevDataSource, data.dataSource)\n                  }, newSelectInfo), listFilters, searchKeywords); // 合并最新config和表格data到state\n                } else {\n                  setFormState(_objectSpread(_objectSpread({}, data), newSelectInfo), listFilters, searchKeywords);\n                }\n                callback === null || callback === void 0 || callback(data);\n              } else {\n                setFormState(_objectSpread({\n                  dataSource: [],\n                  footerDataSource: [],\n                  lastPage: false\n                }, newSelectInfo), listFilters, searchKeywords);\n              }\n            case 4:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2);\n      }));\n      return function (_x4) {\n        return _ref5.apply(this, arguments);\n      };\n    }();\n  }, [setFormDataListState, setFormDataListStateWithPostFooter, loadMore, dataSource]);\n\n  // 区分是否是loadMore模式，并且重新请求footerDataSource数据， 用于数据更新\n  var setPostStateWithPostFooter = (0, _react.useCallback)(function (_ref6) {\n    var config = _ref6.config,\n      _ref6$noPreData = _ref6.noPreData,\n      noPreData = _ref6$noPreData === void 0 ? false : _ref6$noPreData,\n      callback = _ref6.callback,\n      _ref6$clearSelectInfo = _ref6.clearSelectInfo,\n      clearSelectInfo = _ref6$clearSelectInfo === void 0 ? false : _ref6$clearSelectInfo;\n    return setPostState({\n      config: config,\n      noPreData: noPreData,\n      callback: callback,\n      updateFooter: true,\n      clearSelectInfo: clearSelectInfo\n    });\n  }, [setPostState]);\n  var getColumns = (0, _react.useCallback)(function (listItemConfig) {\n    var colOptions = {\n      primaryKey: 'number',\n      isMob: isMob,\n      needSerial: needSerial,\n      horizontal: horizontal,\n      operateCol: operateCol\n    };\n    var columns = columnsDataTranform(listItemConfig, colOptions, appId, formId);\n    var visibleColumnKeys = (0, _menuTableUtil.getVisibleColumnKeys)(columns);\n    return {\n      columns: columns,\n      visibleColumnKeys: visibleColumnKeys\n    };\n  }, [isMob, needSerial, horizontal, operateCol, appId, formId, columnsDataTranform]);\n\n  // 用于初始化\n  var setInitPostState = (0, _react.useCallback)(function (config) {\n    var closeMessage = (0, _utils.showLoadingMessage)(LoadingMsg);\n    return /*#__PURE__*/function () {\n      var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(doPost) {\n        var data, colHeadFilters, _getColumns, columns, visibleColumnKeys, result;\n        return _regenerator.default.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              setPending === null || setPending === void 0 || setPending(true);\n              _context3.next = 3;\n              return doPost(config);\n            case 3:\n              data = _context3.sent;\n              if (!data) {\n                _context3.next = 13;\n                break;\n              }\n              colHeadFilters = (0, _menuTableUtil.getColHeadFilterByConfigured)(data.configuredFilterItems);\n              _getColumns = getColumns(data.listItemConfig), columns = _getColumns.columns, visibleColumnKeys = _getColumns.visibleColumnKeys;\n              result = _objectSpread(_objectSpread({}, data), {}, {\n                colHeadFilters: colHeadFilters,\n                columns: columns,\n                visibleColumnKeys: visibleColumnKeys,\n                schemaId: config.schemaId || ''\n              });\n              setFormDataListState(result);\n              closeMessage();\n              return _context3.abrupt(\"return\", result);\n            case 13:\n              setFormDataListState({\n                dataSource: [],\n                footerDataSource: [],\n                lastPage: true\n              });\n              closeMessage();\n              return _context3.abrupt(\"return\", {});\n            case 16:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3);\n      }));\n      return function (_x5) {\n        return _ref7.apply(this, arguments);\n      };\n    }();\n  }, [setFormDataListState, getColumns, setPending]);\n  var onAfterConfirm = (0, _react.useCallback)(function (totalCount) {\n    _WebUI.WebMsg === null || _WebUI.WebMsg === void 0 || _WebUI.WebMsg.showNotificationMsg({\n      // todo 重构把这部分提取到外面统一处理\n      pageId: '',\n      param: [{\n        type: 'success',\n        content: \"\\u7B5B\\u9009\\u51FA\".concat(totalCount, \"\\u6761\\u8BB0\\u5F55\\u3002\")\n      }]\n    });\n  }, [_WebUI.WebMsg]);\n  var onLoadInitData = function onLoadInitData(appId, formId, env, viewAuth, curSchemaId) {\n    return setInitPostState({\n      appId: appId,\n      formId: formId,\n      schemaId: curSchemaId,\n      env: env,\n      viewAuth: viewAuth,\n      compareTypes: compareTypes,\n      searchKeywords: searchKeywords\n    })(getInitFormDataList);\n  };\n  var onLoadSetting = function onLoadSetting(appId, formId, env, viewAuth, curSchemaId) {\n    return setInitPostState({\n      appId: appId,\n      formId: formId,\n      schemaId: curSchemaId,\n      env: env,\n      viewAuth: viewAuth,\n      compareTypes: compareTypes\n    })(getFormDataListSetting);\n  };\n  var onLoadMoreData = (0, _react.useCallback)(function (pageNo) {\n    setPostStateWithPostFooter({\n      config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n        pageNo: pageNo\n      })\n    })(loadFormListWithParams);\n  }, [setPostStateWithPostFooter, formListParamsMemo]);\n  var onUpdateDataSource = (0, _react.useCallback)(function (dataSource) {\n    setFormDataListState({\n      dataSource: dataSource\n    });\n  }, [setFormDataListState]);\n  var onAggCellChange = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(fieldName, item, panelType) {\n      var field, data;\n      return _regenerator.default.wrap(function _callee4$(_context4) {\n        while (1) switch (_context4.prev = _context4.next) {\n          case 0:\n            field = footerDataSource[0][fieldName]; // 发生值改变的单元格字段\n            if (!(0, _menuTableUtil.isSameField)(field, item)) {\n              _context4.next = 3;\n              break;\n            }\n            return _context4.abrupt(\"return\");\n          case 3:\n            _context4.next = 5;\n            return sendFooterDataSource(appId, formId, env, fieldName, item, panelType);\n          case 5:\n            data = (0, _menuTableUtil.prevHandFooterDataSource)(fieldName, item, panelType, footerDataSource);\n            setFormDataListState({\n              footerDataSource: data\n            });\n          case 7:\n          case \"end\":\n            return _context4.stop();\n        }\n      }, _callee4);\n    }));\n    return function (_x6, _x7, _x8) {\n      return _ref8.apply(this, arguments);\n    };\n  }(), [appId, formId, env, footerDataSource, setFormDataListState]);\n  var getStatInfo = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(fieldName) {\n      return _regenerator.default.wrap(function _callee5$(_context5) {\n        while (1) switch (_context5.prev = _context5.next) {\n          case 0:\n            _context5.next = 2;\n            return _getStatInfo === null || _getStatInfo === void 0 ? void 0 : _getStatInfo({\n              appId: appId,\n              formId: formId,\n              env: env,\n              fieldName: fieldName,\n              listFilters: listFilters,\n              pageSize: pageSize,\n              pageNo: pageNo,\n              searchKeywords: searchKeywords,\n              schemaId: schemaId\n            });\n          case 2:\n            return _context5.abrupt(\"return\", _context5.sent);\n          case 3:\n          case \"end\":\n            return _context5.stop();\n        }\n      }, _callee5);\n    }));\n    return function (_x9) {\n      return _ref9.apply(this, arguments);\n    };\n  }(), [appId, formId, env, listFilters, pageSize, pageNo, searchKeywords, schemaId]);\n  var onAggVisibleChange = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(fieldName) {\n      var data;\n      return _regenerator.default.wrap(function _callee6$(_context6) {\n        while (1) switch (_context6.prev = _context6.next) {\n          case 0:\n            _context6.next = 2;\n            return getStatInfo(fieldName);\n          case 2:\n            data = _context6.sent;\n            setFormDataListState({\n              stateInfo: data\n            });\n          case 4:\n          case \"end\":\n            return _context6.stop();\n        }\n      }, _callee6);\n    }));\n    return function (_x10) {\n      return _ref10.apply(this, arguments);\n    };\n  }(), [getStatInfo, stateInfo, setFormDataListState]);\n  var onFilterConfirm = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(configuredFilterItems) {\n      var newConfiguredFilterItems, newColHeadFilters, listFilters;\n      return _regenerator.default.wrap(function _callee7$(_context7) {\n        while (1) switch (_context7.prev = _context7.next) {\n          case 0:\n            newConfiguredFilterItems = (0, _menuTableUtil.getEffectiveFilterItems)(configuredFilterItems);\n            newColHeadFilters = (0, _menuTableUtil.getColHeadFilterByConfigured)(newConfiguredFilterItems);\n            _context7.next = 4;\n            return getNewFilters === null || getNewFilters === void 0 ? void 0 : getNewFilters(appId, formId, env, newConfiguredFilterItems);\n          case 4:\n            listFilters = _context7.sent;\n            setFormDataListState({\n              colHeadFilters: newColHeadFilters,\n              listFilters: listFilters,\n              configuredFilterItems: newConfiguredFilterItems,\n              showFilterSettingPop: false\n            });\n            setPostStateWithPostFooter({\n              config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n                pageNo: 1,\n                // 筛选结果跳转到第一页\n                colHeadFilters: newColHeadFilters,\n                listFilters: listFilters,\n                configuredFilterItems: newConfiguredFilterItems,\n                showFilterSettingPop: false\n              }),\n              noPreData: true,\n              callback: function callback(data) {\n                onAfterConfirm === null || onAfterConfirm === void 0 || onAfterConfirm(data === null || data === void 0 ? void 0 : data.totalCount);\n              },\n              // 筛选结果跳转到第一页\n              clearSelectInfo: true\n            })(loadFormListWithParams);\n          case 7:\n          case \"end\":\n            return _context7.stop();\n        }\n      }, _callee7);\n    }));\n    return function (_x11) {\n      return _ref11.apply(this, arguments);\n    };\n  }(), [formListParamsMemo, setPostStateWithPostFooter, appId, formId, env, setFormDataListState]);\n  var onColFilterConfirm = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(currentFieldFilterItems, headField) {\n      var otherFieldsFilters, newConfiguredFilterItems, newColHeadFilters, listFilters;\n      return _regenerator.default.wrap(function _callee8$(_context8) {\n        while (1) switch (_context8.prev = _context8.next) {\n          case 0:\n            // publishUserEvent({\n            //   appId,\n            //   formId,\n            //   action: 'au_ch_fil_comf'\n            // })\n            otherFieldsFilters = (0, _menuTableUtil.getOtherFieldsFilters)(headField, configuredFilterItems, listFilterConfig);\n            newConfiguredFilterItems = (0, _menuTableUtil.mergeFilterItems)(otherFieldsFilters, currentFieldFilterItems);\n            newConfiguredFilterItems = (0, _menuTableUtil.getEffectiveFilterItems)(newConfiguredFilterItems);\n            newColHeadFilters = (0, _menuTableUtil.getColHeadFilterByConfigured)(newConfiguredFilterItems);\n            _context8.next = 6;\n            return getColHeadFilters === null || getColHeadFilters === void 0 ? void 0 : getColHeadFilters(appId, formId, env, newConfiguredFilterItems, headField);\n          case 6:\n            listFilters = _context8.sent;\n            setFormDataListState({\n              // 更新配置\n              colHeadFilters: newColHeadFilters,\n              listFilters: listFilters,\n              configuredFilterItems: newConfiguredFilterItems\n            });\n            setPostStateWithPostFooter({\n              // 更新数据\n              config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n                pageNo: 1,\n                // 筛选结果跳转到第一页\n                colHeadFilters: newColHeadFilters,\n                listFilters: listFilters,\n                configuredFilterItems: newConfiguredFilterItems\n              }),\n              callback: function callback(data) {\n                onAfterConfirm === null || onAfterConfirm === void 0 || onAfterConfirm(data === null || data === void 0 ? void 0 : data.totalCount);\n              },\n              // 筛选结果跳转到第一页\n              clearSelectInfo: true\n            })(loadFormListWithParams);\n          case 9:\n          case \"end\":\n            return _context8.stop();\n        }\n      }, _callee8);\n    }));\n    return function (_x12, _x13) {\n      return _ref12.apply(this, arguments);\n    };\n  }(), [formListParamsMemo, setPostStateWithPostFooter, onAfterConfirm, setFormDataListState, configuredFilterItems, listFilterConfig]);\n  var handleSelected = (0, _react.useCallback)(function (data) {\n    // 兼容移动端\n    var newDataSource = loadMore ? (0, _concat.default)(dataSource).call(dataSource, data.dataSource || []) : data.dataSource;\n    var newSelectedIds = getSelectedId({\n      info: {\n        newDataSource: newDataSource\n      }\n    });\n    setFormDataListState({\n      selectedIds: newSelectedIds\n    });\n  }, [getSelectedId, loadMore, dataSource]);\n  var onPaginationChange = (0, _react.useCallback)(function (pageNo, newPageSize) {\n    setPostStateWithPostFooter({\n      config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n        pageSize: newPageSize || pageSize,\n        pageNo: pageNo\n      }),\n      callback: handleSelected\n    })(loadFormListWithParams);\n    newPageSize && (onSavePageSize === null || onSavePageSize === void 0 ? void 0 : onSavePageSize(appId, formId, env, newPageSize));\n  }, [formListParamsMemo, setPostStateWithPostFooter, onSavePageSize, env, handleSelected, pageSize]);\n\n  // 根据更新后的dataSource和已删除的id，计算新的选中信息\n  // singleDel开启处理操作栏及PopBill中的单项删除\n  var handleDeleteSelectedId = (0, _react.useCallback)(function (curDataSource, deletedId) {\n    var singleDel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var ids = Array.isArray(deletedId) ? deletedId : [deletedId];\n    var deleteCount = totalCount - ids.length;\n    if (selectStatus === _useFormDataListState3.CHECK_CANCEL) {\n      // 删除的可能是未勾选的\n      var _filterAndCount = (0, _menuTableUtil.filterAndCount)(ids, notInSelectedIds),\n        _filterAndCount2 = (0, _slicedToArray2.default)(_filterAndCount, 2),\n        newNotInIds = _filterAndCount2[0],\n        count = _filterAndCount2[1];\n      var newCount = count === 0 ? selectedCount - ids.length : selectedCount;\n      var newSelectedIds = getSelectedId({\n        info: {\n          newDataSource: curDataSource,\n          newNotInIds: newNotInIds\n        }\n      });\n      setFormDataListState({\n        selectedIds: newSelectedIds,\n        notInSelectedIds: newNotInIds,\n        selectedCount: (0, _menuTableUtil.getResonableCount)(newCount),\n        totalCount: deleteCount\n      });\n    } else {\n      // 勾选的单项删除的id一定在selectedIds中，操作栏的不一定\n      var _filterAndCount3 = (0, _menuTableUtil.filterAndCount)(ids, selectedIds),\n        _filterAndCount4 = (0, _slicedToArray2.default)(_filterAndCount3, 2),\n        _newSelectedIds = _filterAndCount4[0],\n        _count = _filterAndCount4[1];\n      var _newCount = singleDel ? selectedCount - _count : selectedCount - ids.length;\n      setFormDataListState({\n        selectedIds: _newSelectedIds,\n        selectedCount: (0, _menuTableUtil.getResonableCount)(_newCount),\n        totalCount: deleteCount\n      });\n    }\n  }, [notInSelectedIds, selectedIds, selectedCount, selectStatus, getSelectedId, totalCount]);\n\n  // 批量删除，刷新请求回来后再处理勾选\n  var deleteUpdateCallback = (0, _react.useCallback)(function (deletedId, singleDel) {\n    return function (data) {\n      handleDeleteSelectedId(data.dataSource, deletedId, singleDel);\n    };\n  }, [handleDeleteSelectedId]);\n\n  // 返回promise\n  var onAfterDeleteRows = (0, _react.useCallback)(function (deletedId, currentPageData) {\n    var singleDel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var delCallback = arguments.length > 3 ? arguments[3] : undefined;\n    var ids = Array.isArray(deletedId) ? deletedId : [deletedId];\n    var deleteCount = ids.length;\n    var prevTotalPage = (0, _menuTableUtil.calTotalPage)(pageSize, totalCount);\n    var nextTotalCount = totalCount - deleteCount;\n    var nextTotalPage = (0, _menuTableUtil.calTotalPage)(pageSize, nextTotalCount);\n    // deleteUpdateCallback为前端计算新的勾选信息逻辑，delCallback满足部分删除失败场景使用后端返回的失败id作为新的勾选项\n    var callback = delCallback || deleteUpdateCallback(ids, singleDel);\n    // 刷新前，删除本地数据，否则已选条数会有误\n    setFormDataListState({\n      dataSource: currentPageData\n    });\n    if (deleteCount >= dataSource.length) {\n      // 页码有可能改动的情况\n      return setPostStateWithPostFooter({\n        config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n          pageNo: nextTotalPage >= pageNo ? pageNo : nextTotalPage\n        }),\n        callback: callback\n      })(loadFormListWithParams);\n    } else {\n      return setPostStateWithPostFooter({\n        config: formListParamsMemo,\n        callback: callback\n      })(loadFormListWithParams);\n    }\n  }, [formListParamsMemo, setPostStateWithPostFooter, pageSize, pageNo, totalCount, dataSource, deleteUpdateCallback]);\n\n  // 保留所有配置进行刷新，不带顶部loading\n  var onAfterSave = (0, _react.useCallback)(function () {\n    return setPostStateWithPostFooter({\n      config: formListParamsMemo\n    })(loadFormListWithParams);\n  }, [formListParamsMemo, setPostStateWithPostFooter]);\n  var onAfterAddRows = (0, _react.useCallback)(function () {\n    var addCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n    var nextTotalCount = totalCount + addCount;\n    var nextTotalPage = (0, _menuTableUtil.calTotalPage)(pageSize, nextTotalCount); // 新增一行或多行数据，页码自动跳转到后面\n    setPostStateWithPostFooter({\n      config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n        pageNo: nextTotalPage\n      }),\n      clearSelectInfo: true\n    })(loadFormListWithParams);\n  }, [formListParamsMemo, setPostStateWithPostFooter]);\n  var handleRowDelete = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(pkId, callback) {\n      var res, newTableDataSource;\n      return _regenerator.default.wrap(function _callee9$(_context9) {\n        while (1) switch (_context9.prev = _context9.next) {\n          case 0:\n            (0, _PageEventService.publishUserEvent)({\n              appId: appId,\n              formId: formId,\n              action: 'au_lo_del_comf'\n            });\n            _context9.prev = 1;\n            _context9.next = 4;\n            return onDeleteFormDataListItem(appId, formId, pkId);\n          case 4:\n            res = _context9.sent;\n            newTableDataSource = (0, _filter.default)(dataSource).call(dataSource, function (item) {\n              return item.id !== pkId;\n            });\n            onAfterDeleteRows(pkId, newTableDataSource, true);\n            callback === null || callback === void 0 || callback(res);\n            (0, _utils.showNotice)('success', '删除成功');\n            _context9.next = 14;\n            break;\n          case 11:\n            _context9.prev = 11;\n            _context9.t0 = _context9[\"catch\"](1);\n            (0, _utils.showNotice)('error', _context9.t0.message);\n          case 14:\n          case \"end\":\n            return _context9.stop();\n        }\n      }, _callee9, null, [[1, 11]]);\n    }));\n    return function (_x14, _x15) {\n      return _ref13.apply(this, arguments);\n    };\n  }(), [appId, formId, dataSource, onAfterDeleteRows, onDeleteFormDataListItem]);\n  var onRowDelete = (0, _react.useCallback)(function (pkId, callback) {\n    (0, _PageEventService.publishUserEvent)({\n      appId: appId,\n      formId: formId,\n      action: 'au_lo_del'\n    });\n    (0, _utils.showDeleteConfirmModal)({\n      title: '',\n      message: '确定删除该记录吗？',\n      detail: '',\n      onOk: function onOk() {\n        return handleRowDelete(pkId, callback);\n      },\n      onCancel: function onCancel() {}\n    });\n  }, [appId, formId, handleRowDelete]);\n\n  // 返回 已选id和filter 的拼接串，传给后端\n  var getSelectedQueryString = (0, _react.useCallback)(function () {\n    return (0, _menuTableUtil.getSelectedSQL)({\n      status: selectStatus,\n      selectedIds: selectedIds,\n      notInIds: notInSelectedIds,\n      filter: listFilters === null || listFilters === void 0 ? void 0 : listFilters[0]\n    });\n  }, [selectStatus, selectedIds, notInSelectedIds, listFilters]);\n  var setSelectedInfo = (0, _react.useCallback)(function () {\n    var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectedIds;\n    var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : selectStatus;\n    var notInIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : notInSelectedIds;\n    var newCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : selectedCount;\n    setFormDataListState({\n      selectedIds: ids,\n      selectStatus: status,\n      notInSelectedIds: notInIds,\n      selectedCount: newCount\n    });\n  }, [selectStatus, selectedIds, notInSelectedIds, selectedCount]);\n\n  // 保留所有配置进行刷新，带顶部loading\n  var onRefreshWithSetting = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {\n    var closeMessage, newConfig, _ref15, _ref15$listFilterConf, newFilterConfig, _ref15$listItemConfig, newItemConfig, _ref15$listTreeConfig, newTreeConfig, newFilterFieldNames, newConfiguredFilterItems, filterInfo, newColHeadFilters, _listFilters, newConfigSortIds, newSortItems, newOrderInfo, _orderBy;\n    return _regenerator.default.wrap(function _callee10$(_context10) {\n      while (1) switch (_context10.prev = _context10.next) {\n        case 0:\n          closeMessage = (0, _utils.showLoadingMessage)(LoadingMsg);\n          _context10.prev = 1;\n          _context10.next = 4;\n          return getFormDataListSetting({\n            schemaId: schemaId\n          });\n        case 4:\n          newConfig = _context10.sent;\n          _ref15 = newConfig || {}, _ref15$listFilterConf = _ref15.listFilterConfig, newFilterConfig = _ref15$listFilterConf === void 0 ? [] : _ref15$listFilterConf, _ref15$listItemConfig = _ref15.listItemConfig, newItemConfig = _ref15$listItemConfig === void 0 ? [] : _ref15$listItemConfig, _ref15$listTreeConfig = _ref15.listTreeConfig, newTreeConfig = _ref15$listTreeConfig === void 0 ? [] : _ref15$listTreeConfig;\n          newFilterFieldNames = (0, _map.default)(newFilterConfig).call(newFilterConfig, function (item) {\n            return item.fieldName;\n          }); // 过滤无权限的旧字段\n          newConfiguredFilterItems = (0, _filter.default)(configuredFilterItems).call(configuredFilterItems, function (item) {\n            return (0, _includes.default)(newFilterFieldNames).call(newFilterFieldNames, item.fieldName);\n          });\n          filterInfo = {}; // 已配置筛选项中含有无权限字段则过滤后重新请求\n          if (!(newConfiguredFilterItems.length !== configuredFilterItems.length)) {\n            _context10.next = 15;\n            break;\n          }\n          newColHeadFilters = (0, _menuTableUtil.getColHeadFilterByConfigured)(newConfiguredFilterItems);\n          _context10.next = 13;\n          return getNewFilters === null || getNewFilters === void 0 ? void 0 : getNewFilters(appId, formId, env, newConfiguredFilterItems);\n        case 13:\n          _listFilters = _context10.sent;\n          filterInfo = {\n            colHeadFilters: newColHeadFilters,\n            configuredFilterItems: newConfiguredFilterItems,\n            listFilters: _listFilters\n          };\n        case 15:\n          newConfigSortIds = (0, _map.default)(newItemConfig).call(newItemConfig, function (item) {\n            return item.number;\n          });\n          newSortItems = (0, _filter.default)(orderInfo).call(orderInfo, function (item) {\n            return (0, _includes.default)(newConfigSortIds).call(newConfigSortIds, item.number);\n          });\n          newOrderInfo = {}; // 已配置排序中含有无权限字段则过滤后重新请求\n          if (!(newSortItems.length !== orderInfo.length)) {\n            _context10.next = 23;\n            break;\n          }\n          _context10.next = 21;\n          return getOrderBy(appId, formId, env, orderInfo);\n        case 21:\n          _orderBy = _context10.sent;\n          newOrderInfo = {\n            orderBy: _orderBy,\n            orderInfo: newSortItems\n          };\n        case 23:\n          setFormDataListState(_objectSpread(_objectSpread({\n            listFilterConfig: newFilterConfig,\n            listItemConfig: newItemConfig,\n            listTreeConfig: newTreeConfig\n          }, filterInfo), newOrderInfo));\n          delete newOrderInfo.orderInfo;\n          _context10.next = 27;\n          return setPostStateWithPostFooter({\n            config: _objectSpread(_objectSpread(_objectSpread({}, formListParamsMemo), filterInfo), newOrderInfo),\n            noPreData: true\n          })(loadFormListWithParams);\n        case 27:\n          closeMessage();\n          _context10.next = 33;\n          break;\n        case 30:\n          _context10.prev = 30;\n          _context10.t0 = _context10[\"catch\"](1);\n          closeMessage({\n            type: 'error',\n            content: (_context10.t0 === null || _context10.t0 === void 0 ? void 0 : _context10.t0.message) || '刷新失败'\n          });\n        case 33:\n        case \"end\":\n          return _context10.stop();\n      }\n    }, _callee10, null, [[1, 30]]);\n  })), [appId, formId, env, configuredFilterItems, orderInfo]);\n\n  // 保持操作失败条目的选中\n  var keepErrSelect = (0, _react.useCallback)(function (result) {\n    if (result) {\n      var errIds = (0, _menuTableUtil.getDelData)(result);\n      var newSelectInfo = {\n        selectStatus: _useFormDataListState3.CHECK,\n        selectedIds: errIds,\n        notInSelectedIds: [],\n        selectedCount: errIds.length\n      };\n      setFormDataListState(newSelectInfo);\n    }\n  }, []);\n\n  // 出现部分记录删除失败则会刷新表单\n  var onBatchDelete = (0, _react.useCallback)(function () {\n    var params = {\n      filter: getSelectedQueryString(),\n      queryFilter: (listFilters === null || listFilters === void 0 ? void 0 : listFilters[0]) || ''\n    };\n    return (0, _menuTableActions.onDeleteItemsWithFilter)(appId, formId, schemaId, searchKeywords, params, orderBy).then(function (res) {\n      var successCount = res.successCount,\n        result = res.result;\n      var newTotal = totalCount - successCount;\n      // 真实被后端删除的全部id\n      var realDelIds = (0, _menuTableUtil.getDelData)(result, false);\n      if (loadMore) {\n        // 移动端删除后过滤dataSource即可，不能重新请求页面数据\n        var newDataSource = (0, _menuTableUtil.filterData)(realDelIds, dataSource);\n        setFormDataListState({\n          selectedIds: [],\n          notInSelectedIds: [],\n          selectStatus: _useFormDataListState3.CHECK,\n          selectedCount: 0,\n          dataSource: newDataSource,\n          totalCount: newTotal\n        });\n      } else {\n        onAfterDeleteRows(realDelIds, (0, _menuTableUtil.filterData)(realDelIds, dataSource));\n        setFormDataListState(_objectSpread({}, _menuTableAppActions.initSelectInfo));\n      }\n      return res;\n    }).catch(function (err) {\n      var _ref16 = err.data || {},\n        result = _ref16.result;\n      // 保持未删除条目的选中\n      var realDelIds = (0, _menuTableUtil.getDelData)(result, false);\n      var refreshPromise;\n      if (loadMore) {\n        keepErrSelect(result);\n        refreshPromise = setPostStateWithPostFooter({\n          config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n            pageNo: 1\n          }),\n          noPreData: true\n        })(loadFormListWithParams);\n      } else {\n        // 走常规的删除后翻页检查，callback中重置勾选信息\n        refreshPromise = onAfterDeleteRows(realDelIds, (0, _menuTableUtil.filterData)(realDelIds, dataSource), false);\n      }\n      return refreshPromise.then(function (res) {\n        keepErrSelect(result);\n        // 只要有删除失败的都要给错误提示\n        throw err;\n      });\n    });\n  }, [appId, formId, searchKeywords, dataSource, onAfterDeleteRows, loadMore, totalCount, orderBy, listFilters, schemaId]);\n  var onListSettingConfirm = (0, _react.useCallback)(function (keys, lockIndex, listData) {\n    var _context11;\n    var obj = {};\n    listItemConfig.forEach(function (item) {\n      obj[item.number] = item;\n    });\n    var newListItemConfig = listData === null || listData === void 0 ? void 0 : (0, _map.default)(listData).call(listData, function (item) {\n      return _objectSpread(_objectSpread({}, obj[item.key]), {}, {\n        display: !!(0, _find.default)(keys).call(keys, function (key) {\n          return key === item.key;\n        })\n      });\n    });\n    // 移动端无锁定列lockIndex是undefined，但不能影响pc的列锁定\n    lockIndex !== undefined && (newListItemConfig === null || newListItemConfig === void 0 ? void 0 : newListItemConfig.forEach(function (col, i) {\n      col.locked = i <= lockIndex;\n    }));\n    var lockedKeys = newListItemConfig === null || newListItemConfig === void 0 ? void 0 : (0, _map.default)(_context11 = (0, _filter.default)(newListItemConfig).call(newListItemConfig, function (item) {\n      return item.locked;\n    })).call(_context11, function (item) {\n      return item.number;\n    });\n    setFormDataListState({\n      showListSettingPop: false,\n      listItemConfig: newListItemConfig || listItemConfig\n    });\n    onSaveFormListSetting === null || onSaveFormListSetting === void 0 || onSaveFormListSetting(appId, formId, env, keys, lockedKeys);\n  }, [setFormDataListState, listItemConfig, appId, formId, env]);\n  var onFilterItemDelete = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(i) {\n      var newItems;\n      return _regenerator.default.wrap(function _callee11$(_context12) {\n        while (1) switch (_context12.prev = _context12.next) {\n          case 0:\n            newItems = configuredFilterItems === null || configuredFilterItems === void 0 ? void 0 : (0, _filter.default)(configuredFilterItems).call(configuredFilterItems, function (item, index) {\n              return i !== index;\n            });\n            onFilterConfirm(newItems);\n          case 2:\n          case \"end\":\n            return _context12.stop();\n        }\n      }, _callee11);\n    }));\n    return function (_x16) {\n      return _ref17.apply(this, arguments);\n    };\n  }(), [configuredFilterItems, onFilterConfirm]);\n  var onChangeFilters = (0, _react.useCallback)(function (colHeadFilters) {\n    setFormDataListState({\n      colHeadFilters: colHeadFilters\n    });\n  }, [setFormDataListState]);\n\n  // 刷新需要重新获取所有表格配置和数据（保留了关键词）\n  var onRefresh = (0, _react.useCallback)(function () {\n    return onLoadInitData(appId, formId || defualtFormId, env, viewAuth);\n  }, [appId, formId, defualtFormId, env, onLoadInitData, viewAuth]);\n\n  // const onRefresh = useCallback(() => {\n  //   return setPostStateWithPostFooter(formListParamsMemo, true)(loadFormListWithParams)\n  // }, [formListParamsMemo, setPostStateWithPostFooter])\n\n  var onSearch = (0, _react.useCallback)(function (value) {\n    // 关键词搜索时回到第一页\n    setFormDataListState({\n      searchKeywords: value,\n      pageNo: 1\n    });\n  }, [setFormDataListState]);\n  var onColSort = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(orderInfo) {\n      var orderBy;\n      return _regenerator.default.wrap(function _callee12$(_context13) {\n        while (1) switch (_context13.prev = _context13.next) {\n          case 0:\n            _context13.next = 2;\n            return getOrderBy(appId, formId, env, orderInfo);\n          case 2:\n            orderBy = _context13.sent;\n            setFormDataListState({\n              orderInfo: orderInfo,\n              orderBy: orderBy\n            });\n            setPostState({\n              config: _objectSpread(_objectSpread({}, formListParamsMemo), {}, {\n                orderBy: orderBy\n              })\n            })(loadFormListWithParams);\n          case 5:\n          case \"end\":\n            return _context13.stop();\n        }\n      }, _callee12);\n    }));\n    return function (_x17) {\n      return _ref18.apply(this, arguments);\n    };\n  }(), [appId, formId, env, formListParamsMemo, setFormDataListState, setPostState]);\n  var onSetShowListSettingPop = (0, _react.useCallback)(function (v) {\n    setFormDataListState({\n      showListSettingPop: v\n    });\n  }, [setFormDataListState]);\n  var onSetShowFilterSettingPop = (0, _react.useCallback)(function (v) {\n    setFormDataListState({\n      showFilterSettingPop: v\n    });\n  }, [setFormDataListState]);\n  var onSetShowSortSettingPop = (0, _react.useCallback)(function (v) {\n    setFormDataListState({\n      showSortSettingPop: v\n    });\n  }, [setFormDataListState]);\n  var withoutSearchKeywordsParamsMemo = (0, _react.useMemo)(function () {\n    return {\n      appId: appId,\n      formId: formId,\n      schemaId: schemaId,\n      env: env,\n      listItemConfig: listItemConfig,\n      listFilters: listFilters,\n      pageNo: pageNo,\n      pageSize: pageSize,\n      updateFooter: true,\n      orderBy: orderBy,\n      orderInfo: orderInfo,\n      viewAuth: viewAuth\n    };\n  }, [appId, formId, schemaId, env, listItemConfig, listFilters, pageNo, pageSize, orderBy, orderInfo, viewAuth]);\n  var loadSearchResult = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(searchKeywords) {\n      return _regenerator.default.wrap(function _callee13$(_context14) {\n        while (1) switch (_context14.prev = _context14.next) {\n          case 0:\n            setPostStateWithPostFooter({\n              config: _objectSpread(_objectSpread({}, withoutSearchKeywordsParamsMemo), {}, {\n                searchKeywords: searchKeywords\n              }),\n              noPreData: true,\n              // 搜索需清空原有数据\n              clearSelectInfo: true\n            })(loadFormListWithParams);\n          case 1:\n          case \"end\":\n            return _context14.stop();\n        }\n      }, _callee13);\n    }));\n    return function (_x18) {\n      return _ref19.apply(this, arguments);\n    };\n  }(), [withoutSearchKeywordsParamsMemo, setPostStateWithPostFooter]);\n  var debounceSearch = (0, _react.useMemo)(function () {\n    return (0, _utils.debounce)(loadSearchResult, 500);\n  }, [loadSearchResult]);\n  var handleDebounceSearch = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(searchKeywords) {\n      return _regenerator.default.wrap(function _callee14$(_context15) {\n        while (1) switch (_context15.prev = _context15.next) {\n          case 0:\n            debounceSearch(searchKeywords);\n          case 1:\n          case \"end\":\n            return _context15.stop();\n        }\n      }, _callee14);\n    }));\n    return function (_x19) {\n      return _ref20.apply(this, arguments);\n    };\n  }(), [debounceSearch]);\n  var getColHeadFilter = (0, _react.useCallback)(function (fieldName) {\n    var filtersExceptFieldEnumType = (0, _menuTableUtil.getFiltersExceptFieldEnumType)(fieldName, configuredFilterItems); // 发送其余筛选条件去查询枚举值,即当前字段且是枚举类型的条件除外\n    return getColHeadFilterConfig(appId, formId, env, fieldName, filtersExceptFieldEnumType, schemaId);\n  }, [appId, formId, env, configuredFilterItems, schemaId]);\n  var onColHeadFilterVisibleChange = (0, _react.useCallback)(function (number) {\n    // if (v) {\n    // clearTimeout(timer.current)\n    // timer.current = setTimeout(() => {\n    //   setFormDataListState({\n    //     colHeadFilter: {\n    //       ...colHeadFilter,\n    //       [number]: data\n    //     },\n    //     colLoading: true\n    //   })\n    // }, LOADING_TIME_OUT)\n    getColHeadFilter === null || getColHeadFilter === void 0 || getColHeadFilter(number).then(function (data) {\n      // clearTimeout(timer.current)\n\n      var fieldItemConfig = (0, _find.default)(listItemConfig).call(listItemConfig, function (item) {\n        return item.number === number;\n      }) || {};\n      setFormDataListState({\n        colHeadFilter: _objectSpread(_objectSpread({}, colHeadFilter), {}, (0, _defineProperty2.default)({}, number, {\n          fieldFilterConfig: _objectSpread(_objectSpread({}, data.fieldFilterConfig), fieldItemConfig),\n          groupInfo: data.groupInfo,\n          configuredFilter: {\n            items: (0, _menuTableUtil.getConfiguredFilter)(configuredFilterItems, number, fieldItemConfig.type),\n            enumEqCompareType: '001'\n          }\n        }))\n        // colLoading: false\n      });\n    });\n    // }\n  }, [getColHeadFilter, colHeadFilter, configuredFilterItems, listItemConfig]);\n\n  // 如果当前枚举类型是由其他比较类型转换过来的，需要传递最新的configuredFilterItems\n  var getEnumFilterValue = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref21 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(v, newConfiguredFilterItems) {\n      var withSchemaId,\n        filterrows,\n        _args15 = arguments;\n      return _regenerator.default.wrap(function _callee15$(_context16) {\n        while (1) switch (_context16.prev = _context16.next) {\n          case 0:\n            withSchemaId = _args15.length > 2 && _args15[2] !== undefined ? _args15[2] : false;\n            filterrows = {\n              fieldName: v === null || v === void 0 ? void 0 : v.fieldName,\n              compareType: v === null || v === void 0 ? void 0 : v.compareType,\n              value: v === null || v === void 0 ? void 0 : v.value\n            }; // loadEnumFilterValue中有容错判断，Boolean(schemaId)为false时不会传schemaId\n            _context16.next = 4;\n            return loadEnumFilterValue(appId, formId, env, newConfiguredFilterItems || configuredFilterItems, listFilterConfig, filterrows, '', withSchemaId && schemaId);\n          case 4:\n            return _context16.abrupt(\"return\", _context16.sent);\n          case 5:\n          case \"end\":\n            return _context16.stop();\n        }\n      }, _callee15);\n    }));\n    return function (_x20, _x21) {\n      return _ref21.apply(this, arguments);\n    };\n  }(), [appId, formId, env, configuredFilterItems, listFilterConfig, schemaId]);\n  var onGetEnumFilterValue = (0, _react.useCallback)( /*#__PURE__*/function () {\n    var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(v, configuredFilterItems) {\n      var withSchemaId,\n        _args16 = arguments;\n      return _regenerator.default.wrap(function _callee16$(_context17) {\n        while (1) switch (_context17.prev = _context17.next) {\n          case 0:\n            withSchemaId = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : false;\n            _context17.next = 3;\n            return getEnumFilterValue({\n              fieldName: v === null || v === void 0 ? void 0 : v.fieldName,\n              compareType: v === null || v === void 0 ? void 0 : v.compareType,\n              value: v === null || v === void 0 ? void 0 : v.value\n            }, configuredFilterItems, withSchemaId).then(function (data) {\n              setFormDataListState({\n                enumFilterValue: _objectSpread(_objectSpread({}, enumFilterValue), {}, (0, _defineProperty2.default)({}, v === null || v === void 0 ? void 0 : v.fieldName, data))\n              });\n            });\n          case 3:\n            return _context17.abrupt(\"return\", _context17.sent);\n          case 4:\n          case \"end\":\n            return _context17.stop();\n        }\n      }, _callee16);\n    }));\n    return function (_x22, _x23) {\n      return _ref22.apply(this, arguments);\n    };\n  }(), [getEnumFilterValue, enumFilterValue]);\n  (0, _react.useEffect)(function () {\n    var _getColumns2 = getColumns(listItemConfig),\n      columns = _getColumns2.columns,\n      visibleColumnKeys = _getColumns2.visibleColumnKeys;\n    setFormDataListState({\n      columns: columns,\n      visibleColumnKeys: visibleColumnKeys\n    });\n  }, [listItemConfig, getColumns]);\n  (0, _react.useEffect)(function () {\n    setFormDataListState({\n      // 切换页面搜索框内容置空， searchKeywords设置为null，避免和搜索内容删除后是''的情况冲突\n      searchKeywords: null,\n      selectedIds: [],\n      selectStatus: _useFormDataListState3.CHECK,\n      notInSelectedIds: [],\n      selectedCount: 0\n    });\n    try {\n      loadData && !pending && onLoadInitData(appId, formId || defualtFormId, env, viewAuth); //  滚动加载会自动从第一页加载\n    } catch (e) {\n      setFormDataListState({\n        dataSource: [],\n        footerDataSource: [],\n        pageNo: 1,\n        pageSize: 20,\n        totalCount: 0,\n        lastPage: true,\n        formName: '',\n        loading: false,\n        listItemConfig: [],\n        listFilterConfig: [],\n        listTreeConfig: [],\n        listStatInfo: [],\n        configuredFilterItems: [],\n        listFilters: []\n      });\n    }\n  }, [setFormDataListState, appId, formId, defualtFormId, env, loadData, viewAuth, pending]);\n  (0, _react.useEffect)(function () {\n    typeof searchKeywords === 'string' && handleDebounceSearch(searchKeywords);\n  }, [searchKeywords]);\n  var onSelectChange = (0, _react.useCallback)(function (_ref23) {\n    var next = _ref23.next,\n      _ref23$key = _ref23.key,\n      key = _ref23$key === void 0 ? '' : _ref23$key,\n      action = _ref23.action;\n    var ids = (0, _menuTableUtil.getIds)(key);\n    switch (action) {\n      case SELECT_ACTIONS.check_all:\n        setSelectedInfo(next || getSelectedId({\n          status: _useFormDataListState3.CHECK_ALL\n        }), _useFormDataListState3.CHECK_ALL, [], totalCount);\n        break;\n      case SELECT_ACTIONS.uncheck_all:\n        setSelectedInfo([], _useFormDataListState3.CHECK, [], 0);\n        break;\n      case SELECT_ACTIONS.check:\n        if (selectStatus === _useFormDataListState3.CHECK) {\n          setFormDataListState({\n            selectedIds: (0, _concat.default)(selectedIds).call(selectedIds, ids),\n            selectedCount: selectedCount + 1\n          });\n        } else {\n          var newNotInIds = (0, _menuTableUtil.filterId)(ids, notInSelectedIds);\n          setFormDataListState({\n            selectedIds: next || getSelectedId({\n              info: {\n                newNotInIds: newNotInIds\n              }\n            }),\n            notInSelectedIds: newNotInIds,\n            selectedCount: selectedCount + 1\n          });\n        }\n        break;\n      case SELECT_ACTIONS.uncheck:\n        if (selectStatus === _useFormDataListState3.CHECK) {\n          setFormDataListState({\n            selectedIds: (0, _menuTableUtil.filterId)(ids, selectedIds),\n            selectedCount: selectedCount - 1\n          });\n        } else {\n          var _newNotInIds = (0, _concat.default)(notInSelectedIds).call(notInSelectedIds, ids);\n          setSelectedInfo(next || getSelectedId({\n            status: _useFormDataListState3.CHECK_CANCEL,\n            info: {\n              newNotInIds: _newNotInIds\n            }\n          }), _useFormDataListState3.CHECK_CANCEL, _newNotInIds, selectedCount - 1);\n        }\n        break;\n    }\n  }, [selectStatus, selectedIds, notInSelectedIds, setSelectedInfo, totalCount, selectedCount, getSelectedId]);\n  var actions = {\n    onAfterAddRows: onAfterAddRows,\n    onAfterDeleteRows: onAfterDeleteRows,\n    onAfterSave: onAfterSave,\n    onPaginationChange: onPaginationChange,\n    onListSettingConfirm: onListSettingConfirm,\n    onFilterItemDelete: onFilterItemDelete,\n    onFilterConfirm: onFilterConfirm,\n    onRefresh: onRefresh,\n    onRefreshWithSetting: onRefreshWithSetting,\n    onSearch: onSearch,\n    onChangeFilters: onChangeFilters,\n    onSetShowFilterSettingPop: onSetShowFilterSettingPop,\n    onSetShowListSettingPop: onSetShowListSettingPop,\n    onSetShowSortSettingPop: onSetShowSortSettingPop,\n    onAggCellChange: onAggCellChange,\n    getColHeadFilter: getColHeadFilter,\n    onColHeadFilterVisibleChange: onColHeadFilterVisibleChange,\n    getEnumFilterValue: getEnumFilterValue,\n    getStatInfo: getStatInfo,\n    onColFilterConfirm: onColFilterConfirm,\n    handleRowDelete: handleRowDelete,\n    onRowDelete: onRowDelete,\n    onLoadMoreData: onLoadMoreData,\n    onLoadInitData: onLoadInitData,\n    onLoadSetting: onLoadSetting,\n    onUpdateDataSource: onUpdateDataSource,\n    onColSort: onColSort,\n    onGetEnumFilterValue: onGetEnumFilterValue,\n    onAggVisibleChange: onAggVisibleChange,\n    setFormDataListState: setFormDataListState,\n    onSelectChange: onSelectChange,\n    onBatchDelete: onBatchDelete,\n    getSelectedQueryString: getSelectedQueryString,\n    setSelectedInfo: setSelectedInfo,\n    handleDeleteSelectedId: handleDeleteSelectedId,\n    keepErrSelect: keepErrSelect\n  };\n  return [formDataListState, actions, _WebUI.TableContext];\n};\nvar _default = exports[\"default\"] = useFormDataList;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/hooks/useFormDataList.ts\n");

/***/ }),

/***/ "./src/utils/menuTableAppActions.ts":
/*!******************************************!*\
  !*** ./src/utils/menuTableAppActions.ts ***!
  \******************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.initSelectInfo = exports.getInitFormDataList = exports.getFormDataListSetting = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/objectWithoutProperties */ \"../../node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _apps = __webpack_require__(/*! @/actions/apps */ \"./src/actions/apps.ts\");\nvar _menuTableUtil = __webpack_require__(/*! ./menuTableUtil */ \"./src/utils/menuTableUtil.js\");\nvar _listSettingUtil = __webpack_require__(/*! ./listSettingUtil */ \"./src/utils/listSettingUtil.js\");\nvar _ = __webpack_require__(/*! . */ \"./src/utils/index.tsx\");\nvar _useFormDataListState = __webpack_require__(/*! @/hooks/useFormDataListState */ \"./src/hooks/useFormDataListState.ts\");\nvar _excluded = [\"listItemConfig\", \"configuredFilterItems\", \"listFilters\", \"listFilterConfig\", \"listStatInfo\", \"formName\", \"configuredPageSize\", \"orderBy\", \"orderInfo\", \"name\"];\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar initSelectInfo = exports.initSelectInfo = {\n  selectedIds: [],\n  // 选中id（常规选中的是跨页已勾选的id，全选后取消勾选保存的是当前页选中的id）\n  selectStatus: _useFormDataListState.CHECK,\n  // 全选状态\n  notInSelectedIds: [],\n  // 全选后，取消勾选的id\n  selectedCount: 0 // 选中条数\n};\nvar getInitFormDataList = exports.getInitFormDataList = /*#__PURE__*/function () {\n  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {\n    var appId, formId, schemaId, env, viewAuth, compareTypes, searchKeywords, _ref3, listItemConfig, configuredFilterItems, listFilters, listFilterConfig, listStatInfo, formName, configuredPageSize, orderBy, orderInfo, name, other, args, data, dataSource, pageSize, totalCount, pageNo, lastPage, footerDataSource;\n    return _regenerator.default.wrap(function _callee$(_context) {\n      while (1) switch (_context.prev = _context.next) {\n        case 0:\n          appId = _ref.appId, formId = _ref.formId, schemaId = _ref.schemaId, env = _ref.env, viewAuth = _ref.viewAuth, compareTypes = _ref.compareTypes, searchKeywords = _ref.searchKeywords;\n          if (!(!appId || !formId || !schemaId)) {\n            _context.next = 3;\n            break;\n          }\n          return _context.abrupt(\"return\");\n        case 3:\n          _context.prev = 3;\n          _context.next = 6;\n          return getFormDataListSetting({\n            appId: appId,\n            formId: formId,\n            env: env,\n            schemaId: schemaId,\n            compareTypes: compareTypes\n          });\n        case 6:\n          _context.t0 = _context.sent;\n          if (_context.t0) {\n            _context.next = 9;\n            break;\n          }\n          _context.t0 = {};\n        case 9:\n          _ref3 = _context.t0;\n          listItemConfig = _ref3.listItemConfig;\n          configuredFilterItems = _ref3.configuredFilterItems;\n          listFilters = _ref3.listFilters;\n          listFilterConfig = _ref3.listFilterConfig;\n          listStatInfo = _ref3.listStatInfo;\n          formName = _ref3.formName;\n          configuredPageSize = _ref3.configuredPageSize;\n          orderBy = _ref3.orderBy;\n          orderInfo = _ref3.orderInfo;\n          name = _ref3.name;\n          other = (0, _objectWithoutProperties2.default)(_ref3, _excluded);\n          if (viewAuth) {\n            _context.next = 23;\n            break;\n          }\n          return _context.abrupt(\"return\", {\n            dataSource: [],\n            footerDataSource: [],\n            pageSize: 20,\n            pageNo: 1,\n            totalCount: 0,\n            lastPage: true,\n            formName: formName,\n            loading: false,\n            listItemConfig: listItemConfig,\n            listFilterConfig: listFilterConfig,\n            listStatInfo: listStatInfo,\n            configuredFilterItems: [],\n            // 不显示视图的默认筛选\n            listFilters: listFilters,\n            orderBy: orderBy,\n            orderInfo: orderInfo\n          });\n        case 23:\n          args = (0, _menuTableUtil.getArgs)(listFilters === null || listFilters === void 0 ? void 0 : listFilters[0], {\n            env: env,\n            page_size: configuredPageSize,\n            order_by: orderBy,\n            schemaId: schemaId,\n            search: searchKeywords\n          });\n          _context.next = 26;\n          return (0, _apps.getFormDataList)(appId, formId, args);\n        case 26:\n          data = _context.sent;\n          dataSource = data.rows, pageSize = data.pageSize, totalCount = data.totalCount, pageNo = data.pageNo, lastPage = data.lastPage;\n          footerDataSource = (0, _menuTableUtil.getInitFooterDataSource)(listItemConfig, listStatInfo);\n          return _context.abrupt(\"return\", _objectSpread(_objectSpread({\n            dataSource: dataSource,\n            footerDataSource: footerDataSource,\n            pageSize: pageSize,\n            pageNo: pageNo,\n            totalCount: totalCount,\n            lastPage: lastPage,\n            formName: formName,\n            loading: false,\n            listItemConfig: listItemConfig,\n            listFilterConfig: listFilterConfig,\n            listStatInfo: listStatInfo,\n            configuredFilterItems: [],\n            // 不显示视图的默认筛选\n            schemaConfiguredFilterItems: configuredFilterItems,\n            listFilters: listFilters,\n            orderBy: orderBy,\n            orderInfo: orderInfo\n          }, other), initSelectInfo));\n        case 32:\n          _context.prev = 32;\n          _context.t1 = _context[\"catch\"](3);\n          console.error(_context.t1.message || '表单已被删除');\n          (0, _.showNotice)('error', _context.t1.message || '表单已被删除');\n          // showNotice('error', '数据发生异常')\n        case 36:\n        case \"end\":\n          return _context.stop();\n      }\n    }, _callee, null, [[3, 32]]);\n  }));\n  return function getInitFormDataList(_x) {\n    return _ref2.apply(this, arguments);\n  };\n}();\nvar getFormDataListSetting = exports.getFormDataListSetting = /*#__PURE__*/function () {\n  var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {\n    var appId, formId, env, schemaId, compareTypesMap, formSetting, data, listFilterConfig;\n    return _regenerator.default.wrap(function _callee2$(_context2) {\n      while (1) switch (_context2.prev = _context2.next) {\n        case 0:\n          appId = _ref4.appId, formId = _ref4.formId, env = _ref4.env, schemaId = _ref4.schemaId, compareTypesMap = _ref4.compareTypes;\n          _context2.next = 3;\n          return (0, _apps.getFormDataListSettingBySchemaId)(schemaId);\n        case 3:\n          formSetting = _context2.sent;\n          data = formSetting === null || formSetting === void 0 ? void 0 : formSetting.rows[0];\n          listFilterConfig = (0, _listSettingUtil.getListFilterConfig)(data.listItemConfig, data.listFilterConfig);\n          return _context2.abrupt(\"return\", _objectSpread(_objectSpread({}, data), {}, {\n            listFilterConfig: listFilterConfig,\n            listFilters: data.filters\n          }));\n        case 7:\n        case \"end\":\n          return _context2.stop();\n      }\n    }, _callee2);\n  }));\n  return function getFormDataListSetting(_x2) {\n    return _ref5.apply(this, arguments);\n  };\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/utils/menuTableAppActions.ts\n");

/***/ })

}]);