@bit-sun/business-component 4.2.0-alpha.29 → 4.2.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Business/ImportExport/types.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/pagination.d.ts +22 -0
- package/dist/index.esm.js +106 -6
- package/dist/index.js +106 -6
- package/docs/task-records/2026-07-31-import-export-extraction.md +8 -0
- package/package.json +1 -1
- package/src/components/Business/ImportExport/index.md +5 -5
- package/src/components/Business/ImportExport/index.tsx +39 -1
- package/src/components/Business/ImportExport/types.ts +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +20 -0
- package/src/components/Functional/SearchSelect/index.tsx +19 -6
- package/src/components/Functional/SearchSelect/pagination.ts +57 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE = 100;
|
|
2
|
+
export declare const SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS: number[];
|
|
3
|
+
export declare const SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY = "businessComponentSearchSelectPageSize";
|
|
4
|
+
/**
|
|
5
|
+
* 规范化选择器弹窗分页大小,缓存异常时统一回退到每页 100 条。
|
|
6
|
+
*
|
|
7
|
+
* @param pageSize 待校验的分页大小
|
|
8
|
+
* @returns 合法的分页大小
|
|
9
|
+
*/
|
|
10
|
+
export declare const normalizeSearchSelectModalPageSize: (pageSize: unknown) => number;
|
|
11
|
+
/**
|
|
12
|
+
* 读取所有选择器弹窗共用的分页大小。
|
|
13
|
+
*
|
|
14
|
+
* @returns 缓存中的分页大小,无有效缓存时返回每页 100 条
|
|
15
|
+
*/
|
|
16
|
+
export declare const getSearchSelectModalPageSize: () => number;
|
|
17
|
+
/**
|
|
18
|
+
* 保存所有选择器弹窗共用的分页大小。
|
|
19
|
+
*
|
|
20
|
+
* @param pageSize 用户选择的分页大小
|
|
21
|
+
*/
|
|
22
|
+
export declare const setSearchSelectModalPageSize: (pageSize: unknown) => void;
|
package/dist/index.esm.js
CHANGED
|
@@ -4853,6 +4853,50 @@ function ToCDB$1(selectStr) {
|
|
|
4853
4853
|
var css_248z$6 = ".search_select .ant-select-selector {\n height: 24px;\n overflow: hidden;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow {\n height: 40px;\n flex-wrap: nowrap;\n overflow-x: auto;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow-item {\n align-self: auto;\n}\n.search_select_show {\n display: flex;\n}\n.search_select_show .ant-select-dropdown {\n top: 24px !important;\n width: calc(141%) !important;\n}\n.search_select_show .ant-select-clear {\n right: 33px;\n}\n.search_select_show .ant-select-multiple.ant-select-show-arrow .ant-select-selector,\n.search_select_show .ant-select-multiple.ant-select-allow-clear .ant-select-selector {\n padding-right: 28px;\n}\n.search_select_show.search_select_show_list .ant-select-dropdown {\n top: 24px !important;\n width: calc(100% + 110px) !important;\n}\n.search_select_expand_button {\n position: relative;\n right: -11px;\n width: 30px;\n border-left: 1px solid #d9d9d9;\n height: 24px;\n cursor: pointer;\n font-size: 14px;\n font-weight: bolder;\n}\n.search_select_expand_button span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_expand_button:hover {\n background-color: #005cff;\n color: #fff;\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.search_select_expand_button_disabled:hover {\n background-color: transparent;\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {\n font-family: MiSans-Regular;\n font-weight: 400;\n font-size: 12px;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table tbody > tr > td {\n color: #333333;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column {\n visibility: hidden;\n padding: 0;\n margin: 0;\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n border: none;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column .ant-radio-wrapper,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column .ant-radio-wrapper {\n display: none;\n}\n.search_select_modal_wrapper .ant-modal {\n top: 60px;\n}\n.search_select_modal_wrapper .ant-modal-header {\n padding: 6px 0px 6px 16px;\n}\n.search_select_modal_wrapper .ant-modal-header .ant-modal-title {\n height: 20px;\n color: #000000;\n line-height: 20px;\n}\n.search_select_modal_wrapper .ant-modal-close-x {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.search_select_modal_wrapper .ant-modal-body {\n padding: 0px;\n background: #F3F3F3;\n height: calc(100vh - 235px);\n overflow: hidden;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn.ant-btn-default {\n color: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary,\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n background: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n opacity: 0.5;\n color: #fff;\n}\n.search_select_wrapper {\n position: relative;\n font-size: 14px;\n}\n.search_select_wrapper_topForm .select_list_columns {\n width: 100%;\n padding: 10px 6px 2px 16px;\n background-color: #fff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form {\n padding: 0;\n display: flex;\n align-items: flex-start;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item,\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-col .ant-space {\n font-size: 12px !important;\n margin-right: 0px !important;\n margin-bottom: 8px !important;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row.ant-form-item-row {\n background-color: #fafafa;\n border: 0.8px solid #D9D9D9;\n border-radius: 2px;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row {\n width: 100%;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label {\n width: 110px;\n order: 1;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label label {\n width: 100%;\n text-align: left;\n padding: 0 10px;\n color: #333333;\n font-size: 12px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control {\n order: 2;\n width: 100px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper {\n border: 0;\n font-size: 12px;\n background-color: #fafafa;\n padding: 0 11px;\n height: 24px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-select-selector {\n border: 0 !important;\n background-color: #fafafa !important;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .query_input .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-btn-primary {\n background: #005cff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form > .ant-row > .ant-col {\n order: 2;\n padding-right: 10px;\n}\n.search_select_wrapper_topForm .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper_bottomTable {\n margin: 10px;\n display: flex;\n justify-content: space-between;\n}\n.search_select_wrapper_bottomTable_wrapLeft1,\n.search_select_wrapper_bottomTable_wrapLeft2,\n.search_select_wrapper_bottomTable_wrapRight {\n background: #fff;\n width: calc(50% - 5px);\n}\n.search_select_wrapper_bottomTable_wrapLeft1 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapLeft2 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapRight .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable_wrapLeft1 {\n width: 100%;\n}\n.search_select_wrapper_bottomTable_wrapRight {\n margin-left: 10px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav {\n margin: 0;\n padding: 6px 18.5px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-nav-wrap {\n height: 28px;\n font-size: 14px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-tab {\n padding: 4px 0;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-ink-bar {\n left: 3px !important;\n width: 40px !important;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-extra-content > span {\n color: #005cff;\n cursor: pointer;\n}\n.search_select_wrapper_bottomTable .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder {\n padding: 10px 10px 7px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table.ant-table-small .ant-table-tbody > tr > td {\n color: #333333;\n}\n.search_select_wrapper_bottomTable .ant-checkbox-checked .ant-checkbox-inner {\n color: #005cff;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active a {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active {\n border-color: #005cff;\n}\n.searchSelectSpin > div {\n height: 300px !important;\n}\n.searchSelectMaxTagToolTip .ant-tooltip-inner {\n max-height: 72px;\n overflow-x: auto;\n padding: 0px;\n}\n";
|
|
4854
4854
|
styleInject(css_248z$6);
|
|
4855
4855
|
|
|
4856
|
+
var SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE = 100;
|
|
4857
|
+
var SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS = [10, 20, 50, 100, 500, 1000];
|
|
4858
|
+
var SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY = 'businessComponentSearchSelectPageSize';
|
|
4859
|
+
/**
|
|
4860
|
+
* 规范化选择器弹窗分页大小,缓存异常时统一回退到每页 100 条。
|
|
4861
|
+
*
|
|
4862
|
+
* @param pageSize 待校验的分页大小
|
|
4863
|
+
* @returns 合法的分页大小
|
|
4864
|
+
*/
|
|
4865
|
+
var normalizeSearchSelectModalPageSize = function normalizeSearchSelectModalPageSize(pageSize) {
|
|
4866
|
+
var normalizedPageSize = Number(pageSize);
|
|
4867
|
+
return SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS.includes(normalizedPageSize) ? normalizedPageSize : SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4868
|
+
};
|
|
4869
|
+
/**
|
|
4870
|
+
* 读取所有选择器弹窗共用的分页大小。
|
|
4871
|
+
*
|
|
4872
|
+
* @returns 缓存中的分页大小,无有效缓存时返回每页 100 条
|
|
4873
|
+
*/
|
|
4874
|
+
var getSearchSelectModalPageSize = function getSearchSelectModalPageSize() {
|
|
4875
|
+
if (typeof window === 'undefined') {
|
|
4876
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4877
|
+
}
|
|
4878
|
+
try {
|
|
4879
|
+
return normalizeSearchSelectModalPageSize(window.localStorage.getItem(SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY));
|
|
4880
|
+
} catch (error) {
|
|
4881
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4882
|
+
}
|
|
4883
|
+
};
|
|
4884
|
+
/**
|
|
4885
|
+
* 保存所有选择器弹窗共用的分页大小。
|
|
4886
|
+
*
|
|
4887
|
+
* @param pageSize 用户选择的分页大小
|
|
4888
|
+
*/
|
|
4889
|
+
var setSearchSelectModalPageSize = function setSearchSelectModalPageSize(pageSize) {
|
|
4890
|
+
if (typeof window === 'undefined') {
|
|
4891
|
+
return;
|
|
4892
|
+
}
|
|
4893
|
+
try {
|
|
4894
|
+
window.localStorage.setItem(SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY, String(normalizeSearchSelectModalPageSize(pageSize)));
|
|
4895
|
+
} catch (error) {
|
|
4896
|
+
// 浏览器禁用本地缓存时保留当前分页行为,不阻断选择器使用。
|
|
4897
|
+
}
|
|
4898
|
+
};
|
|
4899
|
+
|
|
4856
4900
|
var zhankaitiaojian = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3Ezhankaitiaojian-icon%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Crect%20id%3D%22path-1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2224%22%20height%3D%2224%22%3E%3C%2Frect%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22%E9%A1%B5%E9%9D%A2-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22icon%22%20transform%3D%22translate%28-702.000000%2C%20-498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22zhankaitiaojian-icon%22%20transform%3D%22translate%28702.000000%2C%20498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22mask-2%22%20fill%3D%22white%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20id%3D%22%E8%92%99%E7%89%88%22%20fill%3D%22%23D8D8D8%22%20opacity%3D%220%22%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0142082%2C6%20L18%2C11.9972435%20L12.0142082%2C18%20L11.04209%2C17.0260337%20L16.0562218%2C11.9972435%20L11.04209%2C6.97396631%20L12.0142082%2C6%20Z%20M6.97257658%2C6%20L12.9583683%2C11.9972435%20L6.97257658%2C18%20L6.00091666%2C17.0260337%20L11.0150485%2C11.9972435%20L6%2C6.97396631%20L6.97257658%2C6%20Z%22%20id%3D%22%E5%BD%A2%E7%8A%B6%22%20fill%3D%22%23005CFF%22%20fill-rule%3D%22nonzero%22%20mask%3D%22url%28%23mask-2%29%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%28-270.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
4857
4901
|
|
|
4858
4902
|
var css_248z$7 = ".property_classify_content {\n margin-bottom: 15px;\n}\n.property_classify_content1 {\n max-height: 350px;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n/* 滚动槽(轨道)宽高 */\n.property_classify_content1::-webkit-scrollbar {\n width: 5px;\n /*对垂直流动条有效*/\n height: 5px;\n /*对水平流动条有效*/\n}\n/* 滚动槽(轨道)样式 */\n.property_classify_content1::-webkit-scrollbar-track {\n background-color: #ffffff;\n border-radius: 8px;\n}\n/*定义滑块颜色、内阴影及圆角*/\n.property_classify_content1::-webkit-scrollbar-thumb {\n border-radius: 7px;\n background-color: #CECECE;\n}\n/*定义两端按钮的样式*/\n.property_classify_content1::-webkit-scrollbar-button {\n display: none;\n}\n.propertyGroup_container {\n display: flex;\n margin-bottom: 16px;\n}\n.propertyGroup_container .propertyGroup_container_left {\n width: 100px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n.propertyGroup_container .propertyGroup_container_right {\n width: 560px;\n flex-shrink: 0;\n flex-grow: 0;\n display: flex;\n flex-wrap: wrap;\n}\n.propertyGroup_container .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.propertyGroup_checkbox_container {\n width: 80px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
@@ -5397,7 +5441,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5397
5441
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
5398
5442
|
var initVal = value || (selectMode ? [] : null);
|
|
5399
5443
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
5400
|
-
var tableInitPageSize =
|
|
5444
|
+
var tableInitPageSize = SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE; // 弹框默认分页 条数
|
|
5401
5445
|
var currentPage = 1;
|
|
5402
5446
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
5403
5447
|
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
@@ -5428,7 +5472,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5428
5472
|
var tableInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5429
5473
|
total: 0,
|
|
5430
5474
|
current: 1,
|
|
5431
|
-
pageSizeOptions:
|
|
5475
|
+
pageSizeOptions: SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS
|
|
5432
5476
|
});
|
|
5433
5477
|
var disabled = !!noOperate || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled);
|
|
5434
5478
|
var isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
@@ -5826,9 +5870,14 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5826
5870
|
};
|
|
5827
5871
|
var showModal = function showModal() {
|
|
5828
5872
|
if (sDisabled) return;
|
|
5873
|
+
var cachedPageSize = getSearchSelectModalPageSize();
|
|
5829
5874
|
setSelectOpen(false);
|
|
5830
5875
|
setSearchValue('');
|
|
5831
5876
|
setModalSearched(false);
|
|
5877
|
+
setTablePagination(_objectSpread2(_objectSpread2({}, tableInitPagination), {}, {
|
|
5878
|
+
pageSize: cachedPageSize,
|
|
5879
|
+
current: 1
|
|
5880
|
+
}));
|
|
5832
5881
|
setIsModalVisible(true);
|
|
5833
5882
|
// 回显
|
|
5834
5883
|
if (value) {
|
|
@@ -5985,17 +6034,20 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5985
6034
|
};
|
|
5986
6035
|
var onSearchTable = function onSearchTable() {
|
|
5987
6036
|
var params = form.getFieldsValue();
|
|
6037
|
+
var pageSize = normalizeSearchSelectModalPageSize(tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize);
|
|
5988
6038
|
setModalSearched(true);
|
|
5989
6039
|
setTableFormParams(params);
|
|
5990
6040
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
5991
|
-
pageSize:
|
|
6041
|
+
pageSize: pageSize,
|
|
6042
|
+
currentPage: 1
|
|
5992
6043
|
}), 2, null);
|
|
5993
6044
|
};
|
|
5994
6045
|
var onResetTable = function onResetTable() {
|
|
6046
|
+
var pageSize = normalizeSearchSelectModalPageSize(tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize);
|
|
5995
6047
|
form.resetFields();
|
|
5996
6048
|
setTableFormParams({});
|
|
5997
6049
|
getData({
|
|
5998
|
-
pageSize:
|
|
6050
|
+
pageSize: pageSize,
|
|
5999
6051
|
currentPage: 1
|
|
6000
6052
|
}, 2);
|
|
6001
6053
|
};
|
|
@@ -6003,8 +6055,10 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6003
6055
|
setCollapsed(!collapsed);
|
|
6004
6056
|
};
|
|
6005
6057
|
var handleTableChange = function handleTableChange(pagination) {
|
|
6058
|
+
var pageSize = normalizeSearchSelectModalPageSize(pagination.pageSize);
|
|
6059
|
+
setSearchSelectModalPageSize(pageSize);
|
|
6006
6060
|
getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
|
|
6007
|
-
pageSize:
|
|
6061
|
+
pageSize: pageSize,
|
|
6008
6062
|
currentPage: pagination.current
|
|
6009
6063
|
}), 2);
|
|
6010
6064
|
};
|
|
@@ -11986,6 +12040,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11986
12040
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11987
12041
|
}
|
|
11988
12042
|
}
|
|
12043
|
+
}, {
|
|
12044
|
+
name: 'qp-orgCode-in',
|
|
12045
|
+
type: 'select',
|
|
12046
|
+
label: '销售组织',
|
|
12047
|
+
field: {
|
|
12048
|
+
type: 'select',
|
|
12049
|
+
props: {
|
|
12050
|
+
mode: 'multiple',
|
|
12051
|
+
notFoundContent: '暂无数据',
|
|
12052
|
+
allowClear: true,
|
|
12053
|
+
showSearch: true,
|
|
12054
|
+
showArrow: true,
|
|
12055
|
+
maxTagCount: 1,
|
|
12056
|
+
optionFilterProp: 'children',
|
|
12057
|
+
filterOption: function filterOption(input, option) {
|
|
12058
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
12059
|
+
}
|
|
12060
|
+
}
|
|
12061
|
+
}
|
|
11989
12062
|
}];
|
|
11990
12063
|
var _queryHeaderParams0 = getQueryHeadersList({
|
|
11991
12064
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -11997,6 +12070,10 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11997
12070
|
'qp-type-in': '1,2'
|
|
11998
12071
|
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
|
|
11999
12072
|
'qp-status-eq': 1
|
|
12073
|
+
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
|
|
12074
|
+
'qp-employeeCode-eq': getEmployeeCode(),
|
|
12075
|
+
'qp-realOrg-eq': true,
|
|
12076
|
+
'qp-status-eq': 10
|
|
12000
12077
|
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in'))]).then(function (x) {
|
|
12001
12078
|
var firstElement = x === null || x === void 0 ? void 0 : x[0];
|
|
12002
12079
|
var allList = firstElement && [firstElement, firstElement];
|
|
@@ -12010,6 +12087,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12010
12087
|
}; // 所属营销区域 树节点不能点判断
|
|
12011
12088
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
12012
12089
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
12090
|
+
formatSource(x, 3, 6, tableSearchForm);
|
|
12013
12091
|
});
|
|
12014
12092
|
modalTableProps = _objectSpread2({
|
|
12015
12093
|
modalTableTitle: '选择客户',
|
|
@@ -44006,6 +44084,27 @@ var isLargeFileExportEnabled = function isLargeFileExportEnabled(config) {
|
|
|
44006
44084
|
};
|
|
44007
44085
|
|
|
44008
44086
|
var BUSINESS_FUNCTION_UNAVAILABLE = '业务功能未配置或已停用,请联系管理员维护业务功能档案';
|
|
44087
|
+
/**
|
|
44088
|
+
* 默认跳转到主应用中的任务中心。
|
|
44089
|
+
*
|
|
44090
|
+
* 无界子应用通过主应用注入的跳转能力切换页面;独立运行时打开主应用地址。
|
|
44091
|
+
*/
|
|
44092
|
+
var defaultNavigateTaskCenter = function defaultNavigateTaskCenter(path) {
|
|
44093
|
+
var _hostWindow$$wujie, _hostWindow$$wujie$pr;
|
|
44094
|
+
var hostWindow = window;
|
|
44095
|
+
var jump = (_hostWindow$$wujie = hostWindow.$wujie) === null || _hostWindow$$wujie === void 0 ? void 0 : (_hostWindow$$wujie$pr = _hostWindow$$wujie.props) === null || _hostWindow$$wujie$pr === void 0 ? void 0 : _hostWindow$$wujie$pr.jump;
|
|
44096
|
+
if (hostWindow.__POWERED_BY_WUJIE__ && typeof jump === 'function') {
|
|
44097
|
+
jump({
|
|
44098
|
+
pathname: path,
|
|
44099
|
+
state: {
|
|
44100
|
+
thisHideInMenuDoNotClose: true
|
|
44101
|
+
}
|
|
44102
|
+
});
|
|
44103
|
+
return;
|
|
44104
|
+
}
|
|
44105
|
+
var normalizedPath = path.startsWith('/') ? path : "/".concat(path);
|
|
44106
|
+
hostWindow.open("".concat(hostWindow.location.origin, "/main-project-front/#").concat(normalizedPath), '_blank');
|
|
44107
|
+
};
|
|
44009
44108
|
/**
|
|
44010
44109
|
* 统一承载导入、快速导出、模板导出和文件任务入口。
|
|
44011
44110
|
*/
|
|
@@ -44019,7 +44118,8 @@ var ImportExportActions = function ImportExportActions(_ref) {
|
|
|
44019
44118
|
taskCenterPath = _ref$taskCenterPath === void 0 ? '/configure/importExport/taskCenter' : _ref$taskCenterPath,
|
|
44020
44119
|
_ref$showTaskDrawer = _ref.showTaskDrawer,
|
|
44021
44120
|
showTaskDrawer = _ref$showTaskDrawer === void 0 ? true : _ref$showTaskDrawer,
|
|
44022
|
-
|
|
44121
|
+
_ref$onNavigateTaskCe = _ref.onNavigateTaskCenter,
|
|
44122
|
+
onNavigateTaskCenter = _ref$onNavigateTaskCe === void 0 ? defaultNavigateTaskCenter : _ref$onNavigateTaskCe;
|
|
44023
44123
|
var _useState = useState(false),
|
|
44024
44124
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44025
44125
|
importVisible = _useState2[0],
|
package/dist/index.js
CHANGED
|
@@ -4876,6 +4876,50 @@ function ToCDB$1(selectStr) {
|
|
|
4876
4876
|
var css_248z$6 = ".search_select .ant-select-selector {\n height: 24px;\n overflow: hidden;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow {\n height: 40px;\n flex-wrap: nowrap;\n overflow-x: auto;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow-item {\n align-self: auto;\n}\n.search_select_show {\n display: flex;\n}\n.search_select_show .ant-select-dropdown {\n top: 24px !important;\n width: calc(141%) !important;\n}\n.search_select_show .ant-select-clear {\n right: 33px;\n}\n.search_select_show .ant-select-multiple.ant-select-show-arrow .ant-select-selector,\n.search_select_show .ant-select-multiple.ant-select-allow-clear .ant-select-selector {\n padding-right: 28px;\n}\n.search_select_show.search_select_show_list .ant-select-dropdown {\n top: 24px !important;\n width: calc(100% + 110px) !important;\n}\n.search_select_expand_button {\n position: relative;\n right: -11px;\n width: 30px;\n border-left: 1px solid #d9d9d9;\n height: 24px;\n cursor: pointer;\n font-size: 14px;\n font-weight: bolder;\n}\n.search_select_expand_button span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_expand_button:hover {\n background-color: #005cff;\n color: #fff;\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.search_select_expand_button_disabled:hover {\n background-color: transparent;\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {\n font-family: MiSans-Regular;\n font-weight: 400;\n font-size: 12px;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table tbody > tr > td {\n color: #333333;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column {\n visibility: hidden;\n padding: 0;\n margin: 0;\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n border: none;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column .ant-radio-wrapper,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column .ant-radio-wrapper {\n display: none;\n}\n.search_select_modal_wrapper .ant-modal {\n top: 60px;\n}\n.search_select_modal_wrapper .ant-modal-header {\n padding: 6px 0px 6px 16px;\n}\n.search_select_modal_wrapper .ant-modal-header .ant-modal-title {\n height: 20px;\n color: #000000;\n line-height: 20px;\n}\n.search_select_modal_wrapper .ant-modal-close-x {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.search_select_modal_wrapper .ant-modal-body {\n padding: 0px;\n background: #F3F3F3;\n height: calc(100vh - 235px);\n overflow: hidden;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn.ant-btn-default {\n color: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary,\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n background: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n opacity: 0.5;\n color: #fff;\n}\n.search_select_wrapper {\n position: relative;\n font-size: 14px;\n}\n.search_select_wrapper_topForm .select_list_columns {\n width: 100%;\n padding: 10px 6px 2px 16px;\n background-color: #fff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form {\n padding: 0;\n display: flex;\n align-items: flex-start;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item,\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-col .ant-space {\n font-size: 12px !important;\n margin-right: 0px !important;\n margin-bottom: 8px !important;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row.ant-form-item-row {\n background-color: #fafafa;\n border: 0.8px solid #D9D9D9;\n border-radius: 2px;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row {\n width: 100%;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label {\n width: 110px;\n order: 1;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label label {\n width: 100%;\n text-align: left;\n padding: 0 10px;\n color: #333333;\n font-size: 12px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control {\n order: 2;\n width: 100px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper {\n border: 0;\n font-size: 12px;\n background-color: #fafafa;\n padding: 0 11px;\n height: 24px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-select-selector {\n border: 0 !important;\n background-color: #fafafa !important;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .query_input .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-btn-primary {\n background: #005cff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form > .ant-row > .ant-col {\n order: 2;\n padding-right: 10px;\n}\n.search_select_wrapper_topForm .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper_bottomTable {\n margin: 10px;\n display: flex;\n justify-content: space-between;\n}\n.search_select_wrapper_bottomTable_wrapLeft1,\n.search_select_wrapper_bottomTable_wrapLeft2,\n.search_select_wrapper_bottomTable_wrapRight {\n background: #fff;\n width: calc(50% - 5px);\n}\n.search_select_wrapper_bottomTable_wrapLeft1 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapLeft2 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapRight .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable_wrapLeft1 {\n width: 100%;\n}\n.search_select_wrapper_bottomTable_wrapRight {\n margin-left: 10px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav {\n margin: 0;\n padding: 6px 18.5px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-nav-wrap {\n height: 28px;\n font-size: 14px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-tab {\n padding: 4px 0;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-ink-bar {\n left: 3px !important;\n width: 40px !important;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-extra-content > span {\n color: #005cff;\n cursor: pointer;\n}\n.search_select_wrapper_bottomTable .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder {\n padding: 10px 10px 7px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table.ant-table-small .ant-table-tbody > tr > td {\n color: #333333;\n}\n.search_select_wrapper_bottomTable .ant-checkbox-checked .ant-checkbox-inner {\n color: #005cff;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active a {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active {\n border-color: #005cff;\n}\n.searchSelectSpin > div {\n height: 300px !important;\n}\n.searchSelectMaxTagToolTip .ant-tooltip-inner {\n max-height: 72px;\n overflow-x: auto;\n padding: 0px;\n}\n";
|
|
4877
4877
|
styleInject(css_248z$6);
|
|
4878
4878
|
|
|
4879
|
+
var SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE = 100;
|
|
4880
|
+
var SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS = [10, 20, 50, 100, 500, 1000];
|
|
4881
|
+
var SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY = 'businessComponentSearchSelectPageSize';
|
|
4882
|
+
/**
|
|
4883
|
+
* 规范化选择器弹窗分页大小,缓存异常时统一回退到每页 100 条。
|
|
4884
|
+
*
|
|
4885
|
+
* @param pageSize 待校验的分页大小
|
|
4886
|
+
* @returns 合法的分页大小
|
|
4887
|
+
*/
|
|
4888
|
+
var normalizeSearchSelectModalPageSize = function normalizeSearchSelectModalPageSize(pageSize) {
|
|
4889
|
+
var normalizedPageSize = Number(pageSize);
|
|
4890
|
+
return SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS.includes(normalizedPageSize) ? normalizedPageSize : SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4891
|
+
};
|
|
4892
|
+
/**
|
|
4893
|
+
* 读取所有选择器弹窗共用的分页大小。
|
|
4894
|
+
*
|
|
4895
|
+
* @returns 缓存中的分页大小,无有效缓存时返回每页 100 条
|
|
4896
|
+
*/
|
|
4897
|
+
var getSearchSelectModalPageSize = function getSearchSelectModalPageSize() {
|
|
4898
|
+
if (typeof window === 'undefined') {
|
|
4899
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4900
|
+
}
|
|
4901
|
+
try {
|
|
4902
|
+
return normalizeSearchSelectModalPageSize(window.localStorage.getItem(SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY));
|
|
4903
|
+
} catch (error) {
|
|
4904
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
4905
|
+
}
|
|
4906
|
+
};
|
|
4907
|
+
/**
|
|
4908
|
+
* 保存所有选择器弹窗共用的分页大小。
|
|
4909
|
+
*
|
|
4910
|
+
* @param pageSize 用户选择的分页大小
|
|
4911
|
+
*/
|
|
4912
|
+
var setSearchSelectModalPageSize = function setSearchSelectModalPageSize(pageSize) {
|
|
4913
|
+
if (typeof window === 'undefined') {
|
|
4914
|
+
return;
|
|
4915
|
+
}
|
|
4916
|
+
try {
|
|
4917
|
+
window.localStorage.setItem(SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY, String(normalizeSearchSelectModalPageSize(pageSize)));
|
|
4918
|
+
} catch (error) {
|
|
4919
|
+
// 浏览器禁用本地缓存时保留当前分页行为,不阻断选择器使用。
|
|
4920
|
+
}
|
|
4921
|
+
};
|
|
4922
|
+
|
|
4879
4923
|
var zhankaitiaojian = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3Ezhankaitiaojian-icon%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Crect%20id%3D%22path-1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2224%22%20height%3D%2224%22%3E%3C%2Frect%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22%E9%A1%B5%E9%9D%A2-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22icon%22%20transform%3D%22translate%28-702.000000%2C%20-498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22zhankaitiaojian-icon%22%20transform%3D%22translate%28702.000000%2C%20498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22mask-2%22%20fill%3D%22white%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20id%3D%22%E8%92%99%E7%89%88%22%20fill%3D%22%23D8D8D8%22%20opacity%3D%220%22%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0142082%2C6%20L18%2C11.9972435%20L12.0142082%2C18%20L11.04209%2C17.0260337%20L16.0562218%2C11.9972435%20L11.04209%2C6.97396631%20L12.0142082%2C6%20Z%20M6.97257658%2C6%20L12.9583683%2C11.9972435%20L6.97257658%2C18%20L6.00091666%2C17.0260337%20L11.0150485%2C11.9972435%20L6%2C6.97396631%20L6.97257658%2C6%20Z%22%20id%3D%22%E5%BD%A2%E7%8A%B6%22%20fill%3D%22%23005CFF%22%20fill-rule%3D%22nonzero%22%20mask%3D%22url%28%23mask-2%29%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%28-270.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
4880
4924
|
|
|
4881
4925
|
var css_248z$7 = ".property_classify_content {\n margin-bottom: 15px;\n}\n.property_classify_content1 {\n max-height: 350px;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n/* 滚动槽(轨道)宽高 */\n.property_classify_content1::-webkit-scrollbar {\n width: 5px;\n /*对垂直流动条有效*/\n height: 5px;\n /*对水平流动条有效*/\n}\n/* 滚动槽(轨道)样式 */\n.property_classify_content1::-webkit-scrollbar-track {\n background-color: #ffffff;\n border-radius: 8px;\n}\n/*定义滑块颜色、内阴影及圆角*/\n.property_classify_content1::-webkit-scrollbar-thumb {\n border-radius: 7px;\n background-color: #CECECE;\n}\n/*定义两端按钮的样式*/\n.property_classify_content1::-webkit-scrollbar-button {\n display: none;\n}\n.propertyGroup_container {\n display: flex;\n margin-bottom: 16px;\n}\n.propertyGroup_container .propertyGroup_container_left {\n width: 100px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n.propertyGroup_container .propertyGroup_container_right {\n width: 560px;\n flex-shrink: 0;\n flex-grow: 0;\n display: flex;\n flex-wrap: wrap;\n}\n.propertyGroup_container .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.propertyGroup_checkbox_container {\n width: 80px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
@@ -5420,7 +5464,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5420
5464
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
5421
5465
|
var initVal = value || (selectMode ? [] : null);
|
|
5422
5466
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
5423
|
-
var tableInitPageSize =
|
|
5467
|
+
var tableInitPageSize = SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE; // 弹框默认分页 条数
|
|
5424
5468
|
var currentPage = 1;
|
|
5425
5469
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
5426
5470
|
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
@@ -5451,7 +5495,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5451
5495
|
var tableInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5452
5496
|
total: 0,
|
|
5453
5497
|
current: 1,
|
|
5454
|
-
pageSizeOptions:
|
|
5498
|
+
pageSizeOptions: SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS
|
|
5455
5499
|
});
|
|
5456
5500
|
var disabled = !!noOperate || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled);
|
|
5457
5501
|
var isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
@@ -5849,9 +5893,14 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5849
5893
|
};
|
|
5850
5894
|
var showModal = function showModal() {
|
|
5851
5895
|
if (sDisabled) return;
|
|
5896
|
+
var cachedPageSize = getSearchSelectModalPageSize();
|
|
5852
5897
|
setSelectOpen(false);
|
|
5853
5898
|
setSearchValue('');
|
|
5854
5899
|
setModalSearched(false);
|
|
5900
|
+
setTablePagination(_objectSpread2(_objectSpread2({}, tableInitPagination), {}, {
|
|
5901
|
+
pageSize: cachedPageSize,
|
|
5902
|
+
current: 1
|
|
5903
|
+
}));
|
|
5855
5904
|
setIsModalVisible(true);
|
|
5856
5905
|
// 回显
|
|
5857
5906
|
if (value) {
|
|
@@ -6008,17 +6057,20 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
6008
6057
|
};
|
|
6009
6058
|
var onSearchTable = function onSearchTable() {
|
|
6010
6059
|
var params = form.getFieldsValue();
|
|
6060
|
+
var pageSize = normalizeSearchSelectModalPageSize(tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize);
|
|
6011
6061
|
setModalSearched(true);
|
|
6012
6062
|
setTableFormParams(params);
|
|
6013
6063
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
6014
|
-
pageSize:
|
|
6064
|
+
pageSize: pageSize,
|
|
6065
|
+
currentPage: 1
|
|
6015
6066
|
}), 2, null);
|
|
6016
6067
|
};
|
|
6017
6068
|
var onResetTable = function onResetTable() {
|
|
6069
|
+
var pageSize = normalizeSearchSelectModalPageSize(tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize);
|
|
6018
6070
|
form.resetFields();
|
|
6019
6071
|
setTableFormParams({});
|
|
6020
6072
|
getData({
|
|
6021
|
-
pageSize:
|
|
6073
|
+
pageSize: pageSize,
|
|
6022
6074
|
currentPage: 1
|
|
6023
6075
|
}, 2);
|
|
6024
6076
|
};
|
|
@@ -6026,8 +6078,10 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
6026
6078
|
setCollapsed(!collapsed);
|
|
6027
6079
|
};
|
|
6028
6080
|
var handleTableChange = function handleTableChange(pagination) {
|
|
6081
|
+
var pageSize = normalizeSearchSelectModalPageSize(pagination.pageSize);
|
|
6082
|
+
setSearchSelectModalPageSize(pageSize);
|
|
6029
6083
|
getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
|
|
6030
|
-
pageSize:
|
|
6084
|
+
pageSize: pageSize,
|
|
6031
6085
|
currentPage: pagination.current
|
|
6032
6086
|
}), 2);
|
|
6033
6087
|
};
|
|
@@ -12009,6 +12063,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12009
12063
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
12010
12064
|
}
|
|
12011
12065
|
}
|
|
12066
|
+
}, {
|
|
12067
|
+
name: 'qp-orgCode-in',
|
|
12068
|
+
type: 'select',
|
|
12069
|
+
label: '销售组织',
|
|
12070
|
+
field: {
|
|
12071
|
+
type: 'select',
|
|
12072
|
+
props: {
|
|
12073
|
+
mode: 'multiple',
|
|
12074
|
+
notFoundContent: '暂无数据',
|
|
12075
|
+
allowClear: true,
|
|
12076
|
+
showSearch: true,
|
|
12077
|
+
showArrow: true,
|
|
12078
|
+
maxTagCount: 1,
|
|
12079
|
+
optionFilterProp: 'children',
|
|
12080
|
+
filterOption: function filterOption(input, option) {
|
|
12081
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
12082
|
+
}
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12012
12085
|
}];
|
|
12013
12086
|
var _queryHeaderParams0 = getQueryHeadersList({
|
|
12014
12087
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -12020,6 +12093,10 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12020
12093
|
'qp-type-in': '1,2'
|
|
12021
12094
|
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
|
|
12022
12095
|
'qp-status-eq': 1
|
|
12096
|
+
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
|
|
12097
|
+
'qp-employeeCode-eq': getEmployeeCode(),
|
|
12098
|
+
'qp-realOrg-eq': true,
|
|
12099
|
+
'qp-status-eq': 10
|
|
12023
12100
|
}, getQueryHeadersItem(_queryHeaderParams0, 'qp-orgCode-in'))]).then(function (x) {
|
|
12024
12101
|
var firstElement = x === null || x === void 0 ? void 0 : x[0];
|
|
12025
12102
|
var allList = firstElement && [firstElement, firstElement];
|
|
@@ -12033,6 +12110,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12033
12110
|
}; // 所属营销区域 树节点不能点判断
|
|
12034
12111
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
12035
12112
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
12113
|
+
formatSource(x, 3, 6, tableSearchForm);
|
|
12036
12114
|
});
|
|
12037
12115
|
modalTableProps = _objectSpread2({
|
|
12038
12116
|
modalTableTitle: '选择客户',
|
|
@@ -44029,6 +44107,27 @@ var isLargeFileExportEnabled = function isLargeFileExportEnabled(config) {
|
|
|
44029
44107
|
};
|
|
44030
44108
|
|
|
44031
44109
|
var BUSINESS_FUNCTION_UNAVAILABLE = '业务功能未配置或已停用,请联系管理员维护业务功能档案';
|
|
44110
|
+
/**
|
|
44111
|
+
* 默认跳转到主应用中的任务中心。
|
|
44112
|
+
*
|
|
44113
|
+
* 无界子应用通过主应用注入的跳转能力切换页面;独立运行时打开主应用地址。
|
|
44114
|
+
*/
|
|
44115
|
+
var defaultNavigateTaskCenter = function defaultNavigateTaskCenter(path) {
|
|
44116
|
+
var _hostWindow$$wujie, _hostWindow$$wujie$pr;
|
|
44117
|
+
var hostWindow = window;
|
|
44118
|
+
var jump = (_hostWindow$$wujie = hostWindow.$wujie) === null || _hostWindow$$wujie === void 0 ? void 0 : (_hostWindow$$wujie$pr = _hostWindow$$wujie.props) === null || _hostWindow$$wujie$pr === void 0 ? void 0 : _hostWindow$$wujie$pr.jump;
|
|
44119
|
+
if (hostWindow.__POWERED_BY_WUJIE__ && typeof jump === 'function') {
|
|
44120
|
+
jump({
|
|
44121
|
+
pathname: path,
|
|
44122
|
+
state: {
|
|
44123
|
+
thisHideInMenuDoNotClose: true
|
|
44124
|
+
}
|
|
44125
|
+
});
|
|
44126
|
+
return;
|
|
44127
|
+
}
|
|
44128
|
+
var normalizedPath = path.startsWith('/') ? path : "/".concat(path);
|
|
44129
|
+
hostWindow.open("".concat(hostWindow.location.origin, "/main-project-front/#").concat(normalizedPath), '_blank');
|
|
44130
|
+
};
|
|
44032
44131
|
/**
|
|
44033
44132
|
* 统一承载导入、快速导出、模板导出和文件任务入口。
|
|
44034
44133
|
*/
|
|
@@ -44042,7 +44141,8 @@ var ImportExportActions = function ImportExportActions(_ref) {
|
|
|
44042
44141
|
taskCenterPath = _ref$taskCenterPath === void 0 ? '/configure/importExport/taskCenter' : _ref$taskCenterPath,
|
|
44043
44142
|
_ref$showTaskDrawer = _ref.showTaskDrawer,
|
|
44044
44143
|
showTaskDrawer = _ref$showTaskDrawer === void 0 ? true : _ref$showTaskDrawer,
|
|
44045
|
-
|
|
44144
|
+
_ref$onNavigateTaskCe = _ref.onNavigateTaskCenter,
|
|
44145
|
+
onNavigateTaskCenter = _ref$onNavigateTaskCe === void 0 ? defaultNavigateTaskCenter : _ref$onNavigateTaskCe;
|
|
44046
44146
|
var _useState = React$1.useState(false),
|
|
44047
44147
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44048
44148
|
importVisible = _useState2[0],
|
|
@@ -71,3 +71,11 @@
|
|
|
71
71
|
- 构建验证:`npm run build` 执行成功,CJS 和 ESM 构建均通过;声明文件中 `services` 为可选属性。
|
|
72
72
|
- 消费端验证:销售单等价源码静态断言通过;正式目标测试因本地缺少 `umi-test` 命令未执行。
|
|
73
73
|
- 后续处理:按用户要求删除本次新增的两个组件库测试文件,保留上述已执行结果作为历史验证记录。
|
|
74
|
+
|
|
75
|
+
## 2026-08-03 任务中心默认跳转
|
|
76
|
+
|
|
77
|
+
- 完成标准:上游未传 `onNavigateTaskCenter` 时,任务抽屉和任务进度中的任务中心入口仍可执行默认跳转;显式传入时继续优先使用上游回调。
|
|
78
|
+
- 默认行为:无界子应用调用主应用注入的 `jump` 并保留任务中心页签,独立运行时打开主应用对应的 Hash 路由。
|
|
79
|
+
- 兼容边界:`onNavigateTaskCenter` 保持可选并作为覆盖点,`taskCenterPath` 继续支持上游修改目标路径。
|
|
80
|
+
- 文档:业务项目接入示例不再要求重复传入 `jumpRoutePath`,API 表补充内置默认值和覆盖说明。
|
|
81
|
+
- 验证:`git diff --check` 通过;`npm run build` 执行成功,CJS 和 ESM 构建均通过。
|
package/package.json
CHANGED
|
@@ -36,11 +36,10 @@ export default () => (
|
|
|
36
36
|
|
|
37
37
|
## 业务项目接入
|
|
38
38
|
|
|
39
|
-
组件默认复用宿主 Umi 项目的 `request
|
|
39
|
+
组件默认复用宿主 Umi 项目的 `request`,并根据运行环境跳转任务中心,业务项目不需要重复创建服务或路由适配器:
|
|
40
40
|
|
|
41
41
|
```tsx | pure
|
|
42
42
|
import { ImportExportActions } from '@bit-sun/business-component';
|
|
43
|
-
import { jumpRoutePath } from '@/utils';
|
|
44
43
|
|
|
45
44
|
export default () => (
|
|
46
45
|
<ImportExportActions
|
|
@@ -53,11 +52,12 @@ export default () => (
|
|
|
53
52
|
quickExportCode="SALES_ORDER_QUICK_EXPORT"
|
|
54
53
|
templateExportCode="SALES_ORDER_TEMPLATE_EXPORT"
|
|
55
54
|
taskCenterPath="/file-task"
|
|
56
|
-
onNavigateTaskCenter={jumpRoutePath}
|
|
57
55
|
/>
|
|
58
56
|
);
|
|
59
57
|
```
|
|
60
58
|
|
|
59
|
+
默认跳转在无界子应用中调用主应用注入的 `jump`,独立运行时打开主应用页面。如果宿主有其他路由机制,可通过 `onNavigateTaskCenter` 覆盖默认行为。
|
|
60
|
+
|
|
61
61
|
如果个别项目的接口不同,可以只覆盖差异服务,其余接口继续使用组件默认实现:
|
|
62
62
|
|
|
63
63
|
```tsx | pure
|
|
@@ -87,7 +87,7 @@ const serviceOverrides = {
|
|
|
87
87
|
| templateExportCode | 模板导出按钮权限编码 | `string` | - |
|
|
88
88
|
| showTaskDrawer | 是否显示最近任务入口 | `boolean` | `true` |
|
|
89
89
|
| taskCenterPath | 任务中心路由 | `string` | `/configure/importExport/taskCenter` |
|
|
90
|
-
| onNavigateTaskCenter |
|
|
90
|
+
| onNavigateTaskCenter | 覆盖默认任务中心跳转行为 | `(path: string) => void` | 内置跨应用跳转 |
|
|
91
91
|
|
|
92
92
|
### ImportExportConfig
|
|
93
93
|
|
|
@@ -100,5 +100,5 @@ const serviceOverrides = {
|
|
|
100
100
|
## 抽取边界
|
|
101
101
|
|
|
102
102
|
- 组件库:交互流程、弹窗、字段预览、任务进度、任务抽屉、公共类型和接口适配工厂。
|
|
103
|
-
-
|
|
103
|
+
- 业务项目:按钮权限及其关联业务功能编码、当前查询条件、请求拦截器,以及特殊场景下对默认路由跳转的覆盖。
|
|
104
104
|
- 后端差异:通过可选 `services` 属性按服务覆盖,不在组件内部判断项目名称。
|
|
@@ -18,6 +18,44 @@ import { authFunc } from '@/utils';
|
|
|
18
18
|
const BUSINESS_FUNCTION_UNAVAILABLE =
|
|
19
19
|
'业务功能未配置或已停用,请联系管理员维护业务功能档案';
|
|
20
20
|
|
|
21
|
+
/** 主应用向无界子应用注入的任务中心跳转能力。 */
|
|
22
|
+
interface TaskCenterHostWindow extends Window {
|
|
23
|
+
__POWERED_BY_WUJIE__?: boolean;
|
|
24
|
+
$wujie?: {
|
|
25
|
+
props?: {
|
|
26
|
+
jump?: (route: {
|
|
27
|
+
pathname: string;
|
|
28
|
+
state: { thisHideInMenuDoNotClose: boolean };
|
|
29
|
+
}) => void;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 默认跳转到主应用中的任务中心。
|
|
36
|
+
*
|
|
37
|
+
* 无界子应用通过主应用注入的跳转能力切换页面;独立运行时打开主应用地址。
|
|
38
|
+
*/
|
|
39
|
+
const defaultNavigateTaskCenter = (path: string) => {
|
|
40
|
+
const hostWindow = window as TaskCenterHostWindow;
|
|
41
|
+
const jump = hostWindow.$wujie?.props?.jump;
|
|
42
|
+
if (hostWindow.__POWERED_BY_WUJIE__ && typeof jump === 'function') {
|
|
43
|
+
jump({
|
|
44
|
+
pathname: path,
|
|
45
|
+
state: {
|
|
46
|
+
thisHideInMenuDoNotClose: true,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
|
53
|
+
hostWindow.open(
|
|
54
|
+
`${hostWindow.location.origin}/main-project-front/#${normalizedPath}`,
|
|
55
|
+
'_blank',
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
21
59
|
/**
|
|
22
60
|
* 统一承载导入、快速导出、模板导出和文件任务入口。
|
|
23
61
|
*/
|
|
@@ -29,7 +67,7 @@ export const ImportExportActions: React.FC<ImportExportActionsProps> = ({
|
|
|
29
67
|
templateExportCode,
|
|
30
68
|
taskCenterPath = '/configure/importExport/taskCenter',
|
|
31
69
|
showTaskDrawer = true,
|
|
32
|
-
onNavigateTaskCenter,
|
|
70
|
+
onNavigateTaskCenter = defaultNavigateTaskCenter,
|
|
33
71
|
}) => {
|
|
34
72
|
const [importVisible, setImportVisible] = useState(false);
|
|
35
73
|
const [importRouteLoading, setImportRouteLoading] = useState(false);
|
|
@@ -1843,6 +1843,20 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1843
1843
|
},
|
|
1844
1844
|
}
|
|
1845
1845
|
},
|
|
1846
|
+
{ name: 'qp-orgCode-in', type: 'select', label: '销售组织', field: {
|
|
1847
|
+
type: 'select',
|
|
1848
|
+
props: {
|
|
1849
|
+
mode: 'multiple',
|
|
1850
|
+
notFoundContent: '暂无数据',
|
|
1851
|
+
allowClear: true,
|
|
1852
|
+
showSearch: true,
|
|
1853
|
+
showArrow: true,
|
|
1854
|
+
maxTagCount: 1,
|
|
1855
|
+
optionFilterProp: 'children',
|
|
1856
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1857
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1858
|
+
},
|
|
1859
|
+
} },
|
|
1846
1860
|
];
|
|
1847
1861
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1848
1862
|
Promise.all([
|
|
@@ -1855,6 +1869,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1855
1869
|
loadSelectSource(`/channel-manage/tagNode/getTree/10`, {
|
|
1856
1870
|
'qp-status-eq': 1,
|
|
1857
1871
|
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1872
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
|
|
1873
|
+
'qp-employeeCode-eq': getEmployeeCode(),
|
|
1874
|
+
'qp-realOrg-eq': true,
|
|
1875
|
+
'qp-status-eq': 10
|
|
1876
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1858
1877
|
]).then((x: any)=>{
|
|
1859
1878
|
const firstElement = x?.[0];
|
|
1860
1879
|
const allList = firstElement && [firstElement, firstElement];
|
|
@@ -1864,6 +1883,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1864
1883
|
const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
|
|
1865
1884
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1866
1885
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
1886
|
+
formatSource(x, 3, 6, tableSearchForm);
|
|
1867
1887
|
})
|
|
1868
1888
|
modalTableProps = {
|
|
1869
1889
|
modalTableTitle: '选择客户',
|
|
@@ -8,6 +8,13 @@ import _, { escapeRegExp, isNil, values, cloneDeep, isEmpty } from "lodash"
|
|
|
8
8
|
import './index.less';
|
|
9
9
|
import { BusinessSearchSelect, QueryMutipleInput, QueryMutipleSearchSelect } from '@/index';
|
|
10
10
|
import { handleSourceName, getFormRowInfo, hasMoreQueryFields, defaultVisibleFieldsCount, getRealStr, getTableHeigth, getCurrentSRKs, getRenderSource, handleParams, convertUrlQueryParams, convertBodyParams, formatSelectedValue, convertResData, makeUniqueValue, handleSelectOptionsShowValue, LightHeightOption, maxTagPlaceholder, getShowStr, handleTableColumns, convertQueryParams } from './utils';
|
|
11
|
+
import {
|
|
12
|
+
getSearchSelectModalPageSize,
|
|
13
|
+
normalizeSearchSelectModalPageSize,
|
|
14
|
+
SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE,
|
|
15
|
+
SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS,
|
|
16
|
+
setSearchSelectModalPageSize,
|
|
17
|
+
} from './pagination';
|
|
11
18
|
import { judgeIsRequestError } from '@/utils/requestUtils';
|
|
12
19
|
import zhankaitiaojian from '../../../assets/zhankaitiaojian-icon.svg';
|
|
13
20
|
import PropertySelector from '@/components/Business/PropertyModal';
|
|
@@ -63,7 +70,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
63
70
|
const selectMode = selectProps?.mode // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
64
71
|
const initVal = value || (selectMode ? [] : null);
|
|
65
72
|
const pageSize = 100 // 下拉框默认分页 条数
|
|
66
|
-
const tableInitPageSize =
|
|
73
|
+
const tableInitPageSize = SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE // 弹框默认分页 条数
|
|
67
74
|
const currentPage = 1
|
|
68
75
|
const selectParamsKey = requestConfig?.filter || 'qp-codeAndName-like'
|
|
69
76
|
const selectParamsInitKey = requestConfig?.filterInit || selectParamsKey
|
|
@@ -86,7 +93,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
86
93
|
const isFormPage = pathname.match(pattern)?.length > 0;
|
|
87
94
|
|
|
88
95
|
const initPagination = { showQuickJumper: true, showSizeChanger: true, showTotal: (total: any) => `共 ${total} 条`, pageSize: tableInitPageSize }
|
|
89
|
-
const tableInitPagination = { ...initPagination, total: 0, current: 1, pageSizeOptions:
|
|
96
|
+
const tableInitPagination = { ...initPagination, total: 0, current: 1, pageSizeOptions: SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS }
|
|
90
97
|
const disabled = !!noOperate || selectProps?.disabled || props?.disabled;
|
|
91
98
|
const isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
92
99
|
const isHaveDValue = () => {
|
|
@@ -399,10 +406,12 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
399
406
|
}
|
|
400
407
|
const showModal = () => {
|
|
401
408
|
if(sDisabled) return;
|
|
402
|
-
|
|
409
|
+
|
|
410
|
+
const cachedPageSize = getSearchSelectModalPageSize();
|
|
403
411
|
setSelectOpen(false)
|
|
404
412
|
setSearchValue('');
|
|
405
413
|
setModalSearched(false);
|
|
414
|
+
setTablePagination({ ...tableInitPagination, pageSize: cachedPageSize, current: 1 });
|
|
406
415
|
|
|
407
416
|
setIsModalVisible(true);
|
|
408
417
|
// 回显
|
|
@@ -532,15 +541,17 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
532
541
|
|
|
533
542
|
const onSearchTable = () => {
|
|
534
543
|
const params = form.getFieldsValue();
|
|
544
|
+
const pageSize = normalizeSearchSelectModalPageSize(tablePagination?.pageSize);
|
|
535
545
|
setModalSearched(true);
|
|
536
546
|
setTableFormParams(params);
|
|
537
|
-
getData({ ...params, pageSize:
|
|
547
|
+
getData({ ...params, pageSize, currentPage: 1 }, 2, null);
|
|
538
548
|
}
|
|
539
549
|
|
|
540
550
|
const onResetTable = () => {
|
|
551
|
+
const pageSize = normalizeSearchSelectModalPageSize(tablePagination?.pageSize);
|
|
541
552
|
form.resetFields();
|
|
542
553
|
setTableFormParams({});
|
|
543
|
-
getData({ pageSize
|
|
554
|
+
getData({ pageSize, currentPage: 1 }, 2)
|
|
544
555
|
}
|
|
545
556
|
|
|
546
557
|
const toggleCollapsed = () => {
|
|
@@ -548,7 +559,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
548
559
|
};
|
|
549
560
|
|
|
550
561
|
const handleTableChange = (pagination) => {
|
|
551
|
-
|
|
562
|
+
const pageSize = normalizeSearchSelectModalPageSize(pagination.pageSize);
|
|
563
|
+
setSearchSelectModalPageSize(pageSize);
|
|
564
|
+
getData({ ...tableFormParams, pageSize, currentPage: pagination.current }, 2)
|
|
552
565
|
}
|
|
553
566
|
|
|
554
567
|
// 扁平化二维数组的方法
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE = 100;
|
|
2
|
+
|
|
3
|
+
export const SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS = [10, 20, 50, 100, 500, 1000];
|
|
4
|
+
|
|
5
|
+
export const SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY = 'businessComponentSearchSelectPageSize';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 规范化选择器弹窗分页大小,缓存异常时统一回退到每页 100 条。
|
|
9
|
+
*
|
|
10
|
+
* @param pageSize 待校验的分页大小
|
|
11
|
+
* @returns 合法的分页大小
|
|
12
|
+
*/
|
|
13
|
+
export const normalizeSearchSelectModalPageSize = (pageSize: unknown): number => {
|
|
14
|
+
const normalizedPageSize = Number(pageSize);
|
|
15
|
+
return SEARCH_SELECT_MODAL_PAGE_SIZE_OPTIONS.includes(normalizedPageSize)
|
|
16
|
+
? normalizedPageSize
|
|
17
|
+
: SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 读取所有选择器弹窗共用的分页大小。
|
|
22
|
+
*
|
|
23
|
+
* @returns 缓存中的分页大小,无有效缓存时返回每页 100 条
|
|
24
|
+
*/
|
|
25
|
+
export const getSearchSelectModalPageSize = (): number => {
|
|
26
|
+
if (typeof window === 'undefined') {
|
|
27
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
return normalizeSearchSelectModalPageSize(
|
|
32
|
+
window.localStorage.getItem(SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY),
|
|
33
|
+
);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return SEARCH_SELECT_MODAL_DEFAULT_PAGE_SIZE;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 保存所有选择器弹窗共用的分页大小。
|
|
41
|
+
*
|
|
42
|
+
* @param pageSize 用户选择的分页大小
|
|
43
|
+
*/
|
|
44
|
+
export const setSearchSelectModalPageSize = (pageSize: unknown): void => {
|
|
45
|
+
if (typeof window === 'undefined') {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
window.localStorage.setItem(
|
|
51
|
+
SEARCH_SELECT_MODAL_PAGE_SIZE_CACHE_KEY,
|
|
52
|
+
String(normalizeSearchSelectModalPageSize(pageSize)),
|
|
53
|
+
);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
// 浏览器禁用本地缓存时保留当前分页行为,不阻断选择器使用。
|
|
56
|
+
}
|
|
57
|
+
};
|