@icos-desktop/react-components 1.0.0-beta.26 → 1.0.0-beta.27
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/build/index.esm.js
CHANGED
@@ -85542,7 +85542,7 @@ function styleInject(css, ref) {
|
|
85542
85542
|
}
|
85543
85543
|
}
|
85544
85544
|
|
85545
|
-
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85545
|
+
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell.ant-table-cell-fix-right {\n background: #143868 !important;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85546
85546
|
var styles$E = {"container":"index-module_container__triFT","header-back":"index-module_header-back__tuzbu","columns-config":"index-module_columns-config__pSkLQ","table":"index-module_table__qzQGs","columns-config-popup":"index-module_columns-config-popup__-d8ej"};
|
85547
85547
|
styleInject(css_248z$H);
|
85548
85548
|
|
@@ -242370,7 +242370,7 @@ var showTotal = function (total) {
|
|
242370
242370
|
};
|
242371
242371
|
var SenseTable = function (props) {
|
242372
242372
|
var _a;
|
242373
|
-
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242373
|
+
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, filterConfig = props.filterConfig, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242374
242374
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242375
242375
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242376
242376
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242387,7 +242387,6 @@ var SenseTable = function (props) {
|
|
242387
242387
|
var _j = useState(null), curRecord = _j[0], setCurRecord = _j[1];
|
242388
242388
|
// 显示全部标签弹窗
|
242389
242389
|
var _k = useState(false), showTagsModal = _k[0], setShowTagsModal = _k[1];
|
242390
|
-
var senseFilterConfig = [];
|
242391
242390
|
// 资源权限
|
242392
242391
|
var authTypes = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
242393
242392
|
var res;
|
@@ -242423,8 +242422,9 @@ var SenseTable = function (props) {
|
|
242423
242422
|
};
|
242424
242423
|
// 获取筛选参数
|
242425
242424
|
var getFilterParams = function () {
|
242425
|
+
var _a;
|
242426
242426
|
var filterItems = [];
|
242427
|
-
|
242427
|
+
(_a = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
|
242428
242428
|
var value = filter === null || filter === void 0 ? void 0 : filter[item.fieldId];
|
242429
242429
|
if (value && value.length) {
|
242430
242430
|
// 日期选择
|
@@ -242790,7 +242790,7 @@ var RangePicker$1 = DatePicker.RangePicker;
|
|
242790
242790
|
var Filter = function (props) {
|
242791
242791
|
var _a;
|
242792
242792
|
var _b, _c;
|
242793
|
-
var book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242793
|
+
var activeTable = props.activeTable, book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242794
242794
|
var form = Form.useForm()[0];
|
242795
242795
|
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
242796
242796
|
// 实体记录筛选配置
|
@@ -242798,15 +242798,15 @@ var Filter = function (props) {
|
|
242798
242798
|
return __generator$2(this, function (_a) {
|
242799
242799
|
switch (_a.label) {
|
242800
242800
|
case 0: return [4 /*yield*/, getBookFilterConfig({
|
242801
|
-
bookId: book.bookId,
|
242802
|
-
templateId: bookGroup.bookGroupId,
|
242801
|
+
bookId: book === null || book === void 0 ? void 0 : book.bookId,
|
242802
|
+
templateId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId,
|
242803
242803
|
})];
|
242804
242804
|
case 1: return [2 /*return*/, _a.sent()];
|
242805
242805
|
}
|
242806
242806
|
});
|
242807
242807
|
}); }, {
|
242808
|
-
ready: enableTag && book,
|
242809
|
-
refreshDeps: [enableTag, book, bookGroup],
|
242808
|
+
ready: enableTag && (book || (activeTable === 'sense' && bookGroup)),
|
242809
|
+
refreshDeps: [enableTag, activeTable, book, bookGroup],
|
242810
242810
|
}).data;
|
242811
242811
|
// 筛选窗口变化
|
242812
242812
|
var handleOpenChange = function (visible) {
|
@@ -242822,7 +242822,7 @@ var Filter = function (props) {
|
|
242822
242822
|
var handleFilter = function () {
|
242823
242823
|
var values = form.getFieldsValue();
|
242824
242824
|
var isEmpty = isAllValuesEmpty(values);
|
242825
|
-
onFilter(isEmpty ? null : values);
|
242825
|
+
onFilter(isEmpty ? null : values, filterConfig);
|
242826
242826
|
setOpen(false);
|
242827
242827
|
};
|
242828
242828
|
// 台账组
|
@@ -242862,13 +242862,15 @@ var Filter = function (props) {
|
|
242862
242862
|
};
|
242863
242863
|
// 渲染表单项
|
242864
242864
|
var renderFormItems = function () {
|
242865
|
-
if (
|
242865
|
+
if (activeTable === 'sense') {
|
242866
242866
|
return renderSense();
|
242867
242867
|
}
|
242868
|
-
if (
|
242868
|
+
else if (activeTable === 'book') {
|
242869
242869
|
return renderBook();
|
242870
242870
|
}
|
242871
|
-
|
242871
|
+
else if (activeTable === 'bookGroup') {
|
242872
|
+
return renderBookGroup();
|
242873
|
+
}
|
242872
242874
|
};
|
242873
242875
|
// 显示内容
|
242874
242876
|
var content = (React__default.createElement("div", { className: styles$9.content },
|
@@ -242884,7 +242886,9 @@ var Filter = function (props) {
|
|
242884
242886
|
form.resetFields();
|
242885
242887
|
}
|
242886
242888
|
}, [filter]);
|
242887
|
-
if (
|
242889
|
+
if (activeTable === 'sense' &&
|
242890
|
+
!((_b = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _b === void 0 ? void 0 : _b.length) &&
|
242891
|
+
!((_c = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.tagValues) === null || _c === void 0 ? void 0 : _c.length)) {
|
242888
242892
|
return null;
|
242889
242893
|
}
|
242890
242894
|
return (React__default.createElement(Popover, { content: content, open: open, onOpenChange: handleOpenChange, trigger: "click", placement: "bottomRight" },
|
@@ -242967,6 +242971,7 @@ var SenseManager = function (props) {
|
|
242967
242971
|
var _k = useState(''), keyword = _k[0], setKeyword = _k[1];
|
242968
242972
|
// 筛选
|
242969
242973
|
var _l = useState(null), filter = _l[0], setFilter = _l[1];
|
242974
|
+
var _m = useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
242970
242975
|
// 显示 Tabs
|
242971
242976
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
242972
242977
|
var tabItems = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
@@ -242999,7 +243004,7 @@ var SenseManager = function (props) {
|
|
242999
243004
|
setActiveCategory(key);
|
243000
243005
|
};
|
243001
243006
|
// 面包屑, 当前页面名称
|
243002
|
-
var
|
243007
|
+
var _o = useMemo$1(function () {
|
243003
243008
|
var _a;
|
243004
243009
|
var list = [];
|
243005
243010
|
// 视图
|
@@ -243047,7 +243052,7 @@ var SenseManager = function (props) {
|
|
243047
243052
|
}
|
243048
243053
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243049
243054
|
return [list, name];
|
243050
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243055
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _o[0], currentName = _o[1];
|
243051
243056
|
// 台账组
|
243052
243057
|
var renderBookGroup = function () {
|
243053
243058
|
return (React__default.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243072,7 +243077,7 @@ var SenseManager = function (props) {
|
|
243072
243077
|
};
|
243073
243078
|
// 实体记录
|
243074
243079
|
var renderSense = function (templateId, bookId) {
|
243075
|
-
return (React__default.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243080
|
+
return (React__default.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, filterConfig: filterConfig, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243076
243081
|
};
|
243077
243082
|
// 渲染内容
|
243078
243083
|
var renderMain = function () {
|
@@ -243135,11 +243140,13 @@ var SenseManager = function (props) {
|
|
243135
243140
|
React__default.createElement(Breadcrumb, { items: breadcrumbItems, separator: ">" })),
|
243136
243141
|
showTabs ? (React__default.createElement("div", { className: styles$7.tabs },
|
243137
243142
|
React__default.createElement(Tabs, { innerGap: 8, items: tabItems, activeKey: tabsActiveKey, onChange: function (key) {
|
243143
|
+
setFilter(null);
|
243138
243144
|
setTabsActiveKey(key);
|
243139
243145
|
} }))) : null,
|
243140
243146
|
React__default.createElement("div", { className: styles$7.filter },
|
243141
|
-
React__default.createElement(Filter, { book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter) {
|
243147
|
+
React__default.createElement(Filter, { activeTable: activeTable, book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter, filterConfig) {
|
243142
243148
|
setFilter(filter);
|
243149
|
+
setFilterConfig(filterConfig);
|
243143
243150
|
} }),
|
243144
243151
|
React__default.createElement(Input.Search, { style: { width: 320 }, allowClear: true, value: keywordValue, onChange: function (e) {
|
243145
243152
|
setKeywordValue(e.target.value);
|
package/build/index.js
CHANGED
@@ -85562,7 +85562,7 @@ function styleInject(css, ref) {
|
|
85562
85562
|
}
|
85563
85563
|
}
|
85564
85564
|
|
85565
|
-
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85565
|
+
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell.ant-table-cell-fix-right {\n background: #143868 !important;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85566
85566
|
var styles$E = {"container":"index-module_container__triFT","header-back":"index-module_header-back__tuzbu","columns-config":"index-module_columns-config__pSkLQ","table":"index-module_table__qzQGs","columns-config-popup":"index-module_columns-config-popup__-d8ej"};
|
85567
85567
|
styleInject(css_248z$H);
|
85568
85568
|
|
@@ -242390,7 +242390,7 @@ var showTotal = function (total) {
|
|
242390
242390
|
};
|
242391
242391
|
var SenseTable = function (props) {
|
242392
242392
|
var _a;
|
242393
|
-
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242393
|
+
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, filterConfig = props.filterConfig, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242394
242394
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242395
242395
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242396
242396
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242407,7 +242407,6 @@ var SenseTable = function (props) {
|
|
242407
242407
|
var _j = React.useState(null), curRecord = _j[0], setCurRecord = _j[1];
|
242408
242408
|
// 显示全部标签弹窗
|
242409
242409
|
var _k = React.useState(false), showTagsModal = _k[0], setShowTagsModal = _k[1];
|
242410
|
-
var senseFilterConfig = [];
|
242411
242410
|
// 资源权限
|
242412
242411
|
var authTypes = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
242413
242412
|
var res;
|
@@ -242443,8 +242442,9 @@ var SenseTable = function (props) {
|
|
242443
242442
|
};
|
242444
242443
|
// 获取筛选参数
|
242445
242444
|
var getFilterParams = function () {
|
242445
|
+
var _a;
|
242446
242446
|
var filterItems = [];
|
242447
|
-
|
242447
|
+
(_a = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
|
242448
242448
|
var value = filter === null || filter === void 0 ? void 0 : filter[item.fieldId];
|
242449
242449
|
if (value && value.length) {
|
242450
242450
|
// 日期选择
|
@@ -242810,7 +242810,7 @@ var RangePicker$1 = DatePicker.RangePicker;
|
|
242810
242810
|
var Filter = function (props) {
|
242811
242811
|
var _a;
|
242812
242812
|
var _b, _c;
|
242813
|
-
var book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242813
|
+
var activeTable = props.activeTable, book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242814
242814
|
var form = Form.useForm()[0];
|
242815
242815
|
var _d = React.useState(false), open = _d[0], setOpen = _d[1];
|
242816
242816
|
// 实体记录筛选配置
|
@@ -242818,15 +242818,15 @@ var Filter = function (props) {
|
|
242818
242818
|
return __generator$2(this, function (_a) {
|
242819
242819
|
switch (_a.label) {
|
242820
242820
|
case 0: return [4 /*yield*/, getBookFilterConfig({
|
242821
|
-
bookId: book.bookId,
|
242822
|
-
templateId: bookGroup.bookGroupId,
|
242821
|
+
bookId: book === null || book === void 0 ? void 0 : book.bookId,
|
242822
|
+
templateId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId,
|
242823
242823
|
})];
|
242824
242824
|
case 1: return [2 /*return*/, _a.sent()];
|
242825
242825
|
}
|
242826
242826
|
});
|
242827
242827
|
}); }, {
|
242828
|
-
ready: enableTag && book,
|
242829
|
-
refreshDeps: [enableTag, book, bookGroup],
|
242828
|
+
ready: enableTag && (book || (activeTable === 'sense' && bookGroup)),
|
242829
|
+
refreshDeps: [enableTag, activeTable, book, bookGroup],
|
242830
242830
|
}).data;
|
242831
242831
|
// 筛选窗口变化
|
242832
242832
|
var handleOpenChange = function (visible) {
|
@@ -242842,7 +242842,7 @@ var Filter = function (props) {
|
|
242842
242842
|
var handleFilter = function () {
|
242843
242843
|
var values = form.getFieldsValue();
|
242844
242844
|
var isEmpty = isAllValuesEmpty(values);
|
242845
|
-
onFilter(isEmpty ? null : values);
|
242845
|
+
onFilter(isEmpty ? null : values, filterConfig);
|
242846
242846
|
setOpen(false);
|
242847
242847
|
};
|
242848
242848
|
// 台账组
|
@@ -242882,13 +242882,15 @@ var Filter = function (props) {
|
|
242882
242882
|
};
|
242883
242883
|
// 渲染表单项
|
242884
242884
|
var renderFormItems = function () {
|
242885
|
-
if (
|
242885
|
+
if (activeTable === 'sense') {
|
242886
242886
|
return renderSense();
|
242887
242887
|
}
|
242888
|
-
if (
|
242888
|
+
else if (activeTable === 'book') {
|
242889
242889
|
return renderBook();
|
242890
242890
|
}
|
242891
|
-
|
242891
|
+
else if (activeTable === 'bookGroup') {
|
242892
|
+
return renderBookGroup();
|
242893
|
+
}
|
242892
242894
|
};
|
242893
242895
|
// 显示内容
|
242894
242896
|
var content = (React.createElement("div", { className: styles$9.content },
|
@@ -242904,7 +242906,9 @@ var Filter = function (props) {
|
|
242904
242906
|
form.resetFields();
|
242905
242907
|
}
|
242906
242908
|
}, [filter]);
|
242907
|
-
if (
|
242909
|
+
if (activeTable === 'sense' &&
|
242910
|
+
!((_b = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _b === void 0 ? void 0 : _b.length) &&
|
242911
|
+
!((_c = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.tagValues) === null || _c === void 0 ? void 0 : _c.length)) {
|
242908
242912
|
return null;
|
242909
242913
|
}
|
242910
242914
|
return (React.createElement(Popover, { content: content, open: open, onOpenChange: handleOpenChange, trigger: "click", placement: "bottomRight" },
|
@@ -242987,6 +242991,7 @@ var SenseManager = function (props) {
|
|
242987
242991
|
var _k = React.useState(''), keyword = _k[0], setKeyword = _k[1];
|
242988
242992
|
// 筛选
|
242989
242993
|
var _l = React.useState(null), filter = _l[0], setFilter = _l[1];
|
242994
|
+
var _m = React.useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
242990
242995
|
// 显示 Tabs
|
242991
242996
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
242992
242997
|
var tabItems = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
@@ -243019,7 +243024,7 @@ var SenseManager = function (props) {
|
|
243019
243024
|
setActiveCategory(key);
|
243020
243025
|
};
|
243021
243026
|
// 面包屑, 当前页面名称
|
243022
|
-
var
|
243027
|
+
var _o = React.useMemo(function () {
|
243023
243028
|
var _a;
|
243024
243029
|
var list = [];
|
243025
243030
|
// 视图
|
@@ -243067,7 +243072,7 @@ var SenseManager = function (props) {
|
|
243067
243072
|
}
|
243068
243073
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243069
243074
|
return [list, name];
|
243070
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243075
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _o[0], currentName = _o[1];
|
243071
243076
|
// 台账组
|
243072
243077
|
var renderBookGroup = function () {
|
243073
243078
|
return (React.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243092,7 +243097,7 @@ var SenseManager = function (props) {
|
|
243092
243097
|
};
|
243093
243098
|
// 实体记录
|
243094
243099
|
var renderSense = function (templateId, bookId) {
|
243095
|
-
return (React.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243100
|
+
return (React.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, filterConfig: filterConfig, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243096
243101
|
};
|
243097
243102
|
// 渲染内容
|
243098
243103
|
var renderMain = function () {
|
@@ -243155,11 +243160,13 @@ var SenseManager = function (props) {
|
|
243155
243160
|
React.createElement(Breadcrumb, { items: breadcrumbItems, separator: ">" })),
|
243156
243161
|
showTabs ? (React.createElement("div", { className: styles$7.tabs },
|
243157
243162
|
React.createElement(Tabs, { innerGap: 8, items: tabItems, activeKey: tabsActiveKey, onChange: function (key) {
|
243163
|
+
setFilter(null);
|
243158
243164
|
setTabsActiveKey(key);
|
243159
243165
|
} }))) : null,
|
243160
243166
|
React.createElement("div", { className: styles$7.filter },
|
243161
|
-
React.createElement(Filter, { book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter) {
|
243167
|
+
React.createElement(Filter, { activeTable: activeTable, book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter, filterConfig) {
|
243162
243168
|
setFilter(filter);
|
243169
|
+
setFilterConfig(filterConfig);
|
243163
243170
|
} }),
|
243164
243171
|
React.createElement(Input.Search, { style: { width: 320 }, allowClear: true, value: keywordValue, onChange: function (e) {
|
243165
243172
|
setKeywordValue(e.target.value);
|
package/build/index.umd.js
CHANGED
@@ -85563,7 +85563,7 @@
|
|
85563
85563
|
}
|
85564
85564
|
}
|
85565
85565
|
|
85566
|
-
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85566
|
+
var css_248z$H = ".index-module_container__triFT {\n position: relative;\n width: calc(100% - 24px);\n height: 100%;\n}\n.index-module_container__triFT .index-module_header-back__tuzbu {\n position: absolute;\n top: 0;\n left: 0;\n right: -24px;\n height: 40px;\n background: linear-gradient(270deg, rgba(69, 147, 255, 0.2) 72.24%, rgba(69, 147, 255, 0.2) 100%);\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\n right: -20px;\n width: 16px;\n height: 16px;\n z-index: 9;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ > svg {\n position: absolute;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select {\n opacity: 0;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector {\n width: 16px;\n height: 16px;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ .ant-select .ant-select-selector .ant-select-selection-overflow {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs {\n height: 100%;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell.ant-table-cell-fix-right {\n background: #143868 !important;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table .ant-table-thead > tr > td {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell.ant-table-cell-fix-right {\n background: transparent;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n + 1) .ant-table-cell.ant-table-cell-fix-right {\n background: #081F3F;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n),\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):nth-child(2n) .ant-table-cell.ant-table-cell-fix-right {\n background: #0F2647;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover,\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right):hover .ant-table-cell.ant-table-cell-fix-right {\n background: #094863;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row:has(.ant-table-cell-fix-right) .ant-table-cell.ant-table-cell-fix-right {\n transition: none;\n}\n.index-module_container__triFT .index-module_table__qzQGs .ant-table-row.ant-table-row-selected .ant-table-cell.ant-table-cell-fix-right {\n background: #094863 !important;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item {\n position: relative;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-content {\n position: absolute;\n left: 32px;\n width: -webkit-fill-available;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item .ant-select-item-option-state {\n position: absolute;\n left: 8px;\n top: 8px;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected {\n background: transparent;\n}\n.index-module_columns-config-popup__-d8ej .ant-select-item.ant-select-item-option-selected:hover {\n background: #396abf;\n}\n.index-module_columns-config-popup__-d8ej .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
|
85567
85567
|
var styles$E = {"container":"index-module_container__triFT","header-back":"index-module_header-back__tuzbu","columns-config":"index-module_columns-config__pSkLQ","table":"index-module_table__qzQGs","columns-config-popup":"index-module_columns-config-popup__-d8ej"};
|
85568
85568
|
styleInject(css_248z$H);
|
85569
85569
|
|
@@ -242391,7 +242391,7 @@ ${indent}columns: ${matrix.columns}
|
|
242391
242391
|
};
|
242392
242392
|
var SenseTable = function (props) {
|
242393
242393
|
var _a;
|
242394
|
-
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242394
|
+
var bookId = props.bookId, templateId = props.templateId, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, filterConfig = props.filterConfig, contextMenuConfig = props.contextMenuConfig, enableTag = props.enableTag, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onShowSense = props.onShowSense, onEditSense = props.onEditSense;
|
242395
242395
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242396
242396
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242397
242397
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242408,7 +242408,6 @@ ${indent}columns: ${matrix.columns}
|
|
242408
242408
|
var _j = React.useState(null), curRecord = _j[0], setCurRecord = _j[1];
|
242409
242409
|
// 显示全部标签弹窗
|
242410
242410
|
var _k = React.useState(false), showTagsModal = _k[0], setShowTagsModal = _k[1];
|
242411
|
-
var senseFilterConfig = [];
|
242412
242411
|
// 资源权限
|
242413
242412
|
var authTypes = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
242414
242413
|
var res;
|
@@ -242444,8 +242443,9 @@ ${indent}columns: ${matrix.columns}
|
|
242444
242443
|
};
|
242445
242444
|
// 获取筛选参数
|
242446
242445
|
var getFilterParams = function () {
|
242446
|
+
var _a;
|
242447
242447
|
var filterItems = [];
|
242448
|
-
|
242448
|
+
(_a = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
|
242449
242449
|
var value = filter === null || filter === void 0 ? void 0 : filter[item.fieldId];
|
242450
242450
|
if (value && value.length) {
|
242451
242451
|
// 日期选择
|
@@ -242811,7 +242811,7 @@ ${indent}columns: ${matrix.columns}
|
|
242811
242811
|
var Filter = function (props) {
|
242812
242812
|
var _a;
|
242813
242813
|
var _b, _c;
|
242814
|
-
var book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242814
|
+
var activeTable = props.activeTable, book = props.book, bookGroup = props.bookGroup, enableTag = props.enableTag, filter = props.filter, onFilter = props.onFilter;
|
242815
242815
|
var form = Form.useForm()[0];
|
242816
242816
|
var _d = React.useState(false), open = _d[0], setOpen = _d[1];
|
242817
242817
|
// 实体记录筛选配置
|
@@ -242819,15 +242819,15 @@ ${indent}columns: ${matrix.columns}
|
|
242819
242819
|
return __generator$2(this, function (_a) {
|
242820
242820
|
switch (_a.label) {
|
242821
242821
|
case 0: return [4 /*yield*/, getBookFilterConfig({
|
242822
|
-
bookId: book.bookId,
|
242823
|
-
templateId: bookGroup.bookGroupId,
|
242822
|
+
bookId: book === null || book === void 0 ? void 0 : book.bookId,
|
242823
|
+
templateId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId,
|
242824
242824
|
})];
|
242825
242825
|
case 1: return [2 /*return*/, _a.sent()];
|
242826
242826
|
}
|
242827
242827
|
});
|
242828
242828
|
}); }, {
|
242829
|
-
ready: enableTag && book,
|
242830
|
-
refreshDeps: [enableTag, book, bookGroup],
|
242829
|
+
ready: enableTag && (book || (activeTable === 'sense' && bookGroup)),
|
242830
|
+
refreshDeps: [enableTag, activeTable, book, bookGroup],
|
242831
242831
|
}).data;
|
242832
242832
|
// 筛选窗口变化
|
242833
242833
|
var handleOpenChange = function (visible) {
|
@@ -242843,7 +242843,7 @@ ${indent}columns: ${matrix.columns}
|
|
242843
242843
|
var handleFilter = function () {
|
242844
242844
|
var values = form.getFieldsValue();
|
242845
242845
|
var isEmpty = isAllValuesEmpty(values);
|
242846
|
-
onFilter(isEmpty ? null : values);
|
242846
|
+
onFilter(isEmpty ? null : values, filterConfig);
|
242847
242847
|
setOpen(false);
|
242848
242848
|
};
|
242849
242849
|
// 台账组
|
@@ -242883,13 +242883,15 @@ ${indent}columns: ${matrix.columns}
|
|
242883
242883
|
};
|
242884
242884
|
// 渲染表单项
|
242885
242885
|
var renderFormItems = function () {
|
242886
|
-
if (
|
242886
|
+
if (activeTable === 'sense') {
|
242887
242887
|
return renderSense();
|
242888
242888
|
}
|
242889
|
-
if (
|
242889
|
+
else if (activeTable === 'book') {
|
242890
242890
|
return renderBook();
|
242891
242891
|
}
|
242892
|
-
|
242892
|
+
else if (activeTable === 'bookGroup') {
|
242893
|
+
return renderBookGroup();
|
242894
|
+
}
|
242893
242895
|
};
|
242894
242896
|
// 显示内容
|
242895
242897
|
var content = (React.createElement("div", { className: styles$9.content },
|
@@ -242905,7 +242907,9 @@ ${indent}columns: ${matrix.columns}
|
|
242905
242907
|
form.resetFields();
|
242906
242908
|
}
|
242907
242909
|
}, [filter]);
|
242908
|
-
if (
|
242910
|
+
if (activeTable === 'sense' &&
|
242911
|
+
!((_b = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterItems) === null || _b === void 0 ? void 0 : _b.length) &&
|
242912
|
+
!((_c = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.tagValues) === null || _c === void 0 ? void 0 : _c.length)) {
|
242909
242913
|
return null;
|
242910
242914
|
}
|
242911
242915
|
return (React.createElement(Popover, { content: content, open: open, onOpenChange: handleOpenChange, trigger: "click", placement: "bottomRight" },
|
@@ -242988,6 +242992,7 @@ ${indent}columns: ${matrix.columns}
|
|
242988
242992
|
var _k = React.useState(''), keyword = _k[0], setKeyword = _k[1];
|
242989
242993
|
// 筛选
|
242990
242994
|
var _l = React.useState(null), filter = _l[0], setFilter = _l[1];
|
242995
|
+
var _m = React.useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
242991
242996
|
// 显示 Tabs
|
242992
242997
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
242993
242998
|
var tabItems = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
@@ -243020,7 +243025,7 @@ ${indent}columns: ${matrix.columns}
|
|
243020
243025
|
setActiveCategory(key);
|
243021
243026
|
};
|
243022
243027
|
// 面包屑, 当前页面名称
|
243023
|
-
var
|
243028
|
+
var _o = React.useMemo(function () {
|
243024
243029
|
var _a;
|
243025
243030
|
var list = [];
|
243026
243031
|
// 视图
|
@@ -243068,7 +243073,7 @@ ${indent}columns: ${matrix.columns}
|
|
243068
243073
|
}
|
243069
243074
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243070
243075
|
return [list, name];
|
243071
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243076
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _o[0], currentName = _o[1];
|
243072
243077
|
// 台账组
|
243073
243078
|
var renderBookGroup = function () {
|
243074
243079
|
return (React.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243093,7 +243098,7 @@ ${indent}columns: ${matrix.columns}
|
|
243093
243098
|
};
|
243094
243099
|
// 实体记录
|
243095
243100
|
var renderSense = function (templateId, bookId) {
|
243096
|
-
return (React.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243101
|
+
return (React.createElement(SenseTable, { viewCodes: [activeCategory], bookId: bookId, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, keyword: keyword, filter: filter, filterConfig: filterConfig, contextMenuConfig: senseContextMenuConfig, enableTag: enableTag, onShowSense: onShowSense, onEditSense: onEditSense, onClick: onClickSense, onDoubleClick: onDoubleClickSense }));
|
243097
243102
|
};
|
243098
243103
|
// 渲染内容
|
243099
243104
|
var renderMain = function () {
|
@@ -243156,11 +243161,13 @@ ${indent}columns: ${matrix.columns}
|
|
243156
243161
|
React.createElement(Breadcrumb, { items: breadcrumbItems, separator: ">" })),
|
243157
243162
|
showTabs ? (React.createElement("div", { className: styles$7.tabs },
|
243158
243163
|
React.createElement(Tabs, { innerGap: 8, items: tabItems, activeKey: tabsActiveKey, onChange: function (key) {
|
243164
|
+
setFilter(null);
|
243159
243165
|
setTabsActiveKey(key);
|
243160
243166
|
} }))) : null,
|
243161
243167
|
React.createElement("div", { className: styles$7.filter },
|
243162
|
-
React.createElement(Filter, { book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter) {
|
243168
|
+
React.createElement(Filter, { activeTable: activeTable, book: book, bookGroup: bookGroup, enableTag: enableTag, filter: filter, onFilter: function (filter, filterConfig) {
|
243163
243169
|
setFilter(filter);
|
243170
|
+
setFilterConfig(filterConfig);
|
243164
243171
|
} }),
|
243165
243172
|
React.createElement(Input.Search, { style: { width: 320 }, allowClear: true, value: keywordValue, onChange: function (e) {
|
243166
243173
|
setKeywordValue(e.target.value);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
interface FilterProps {
|
3
|
+
activeTable: '' | 'bookGroup' | 'book' | 'sense';
|
3
4
|
book: any;
|
4
5
|
bookGroup: any;
|
5
6
|
enableTag: boolean;
|
6
7
|
filter: any;
|
7
|
-
onFilter: (filter: any) => void;
|
8
|
+
onFilter: (filter: any, filterConfig?: any) => void;
|
8
9
|
}
|
9
10
|
declare const Filter: React.FC<FilterProps>;
|
10
11
|
export default Filter;
|