@icos-desktop/react-components 2.0.40 → 2.0.41
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/icos-desktop.d.ts +9 -1
- package/dist/icos-desktop.js +35 -35
- package/dist/icos-desktop.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/icos-desktop.d.ts
CHANGED
@@ -414,7 +414,7 @@ interface SenseContentTableProps extends TableProps {
|
|
414
414
|
/**
|
415
415
|
* 实体记录唯一标识
|
416
416
|
*/
|
417
|
-
senseGlobalCodes
|
417
|
+
senseGlobalCodes?: string[];
|
418
418
|
/**
|
419
419
|
* 数据表名
|
420
420
|
*/
|
@@ -454,6 +454,10 @@ interface SenseContentTableProps extends TableProps {
|
|
454
454
|
* 已选行数,用于显示数量
|
455
455
|
*/
|
456
456
|
selectedRowLength?: number;
|
457
|
+
/**
|
458
|
+
* 表格默认分页条数,默认 1000
|
459
|
+
*/
|
460
|
+
pageSize?: number;
|
457
461
|
/**
|
458
462
|
* 单击实体
|
459
463
|
* @param record
|
@@ -1331,6 +1335,10 @@ interface TagConfigProps {
|
|
1331
1335
|
* 视图编码
|
1332
1336
|
*/
|
1333
1337
|
viewCode?: string;
|
1338
|
+
/**
|
1339
|
+
* 每页条数
|
1340
|
+
*/
|
1341
|
+
pageSize?: number;
|
1334
1342
|
/**
|
1335
1343
|
* 自定义表格列
|
1336
1344
|
*/
|
package/dist/icos-desktop.js
CHANGED
@@ -4777,7 +4777,7 @@ var Modal = function (props) {
|
|
4777
4777
|
};
|
4778
4778
|
|
4779
4779
|
// 分页
|
4780
|
-
var PAGINATION
|
4780
|
+
var PAGINATION = {
|
4781
4781
|
current: 1,
|
4782
4782
|
total: 0,
|
4783
4783
|
pageSize: 50,
|
@@ -4810,7 +4810,7 @@ var TargetModal = function (props) {
|
|
4810
4810
|
var bookGroupId = props.bookGroupId, viewCode = props.viewCode, open = props.open, onCancel = props.onCancel, onOk = props.onOk;
|
4811
4811
|
var message = App.useApp().message;
|
4812
4812
|
// 分页
|
4813
|
-
var _a = useState(__assign({}, PAGINATION
|
4813
|
+
var _a = useState(__assign({}, PAGINATION)), pagination = _a[0], setPagination = _a[1];
|
4814
4814
|
// 搜索关键词
|
4815
4815
|
var _b = useState(''), keywordValue = _b[0], setKeywordValue = _b[1];
|
4816
4816
|
var _c = useState(''), keyword = _c[0], setKeyword = _c[1];
|
@@ -4824,7 +4824,7 @@ var TargetModal = function (props) {
|
|
4824
4824
|
if (!open) return [3 /*break*/, 2];
|
4825
4825
|
return [4 /*yield*/, getTargetGroupBook({
|
4826
4826
|
page: pagination.current || 1,
|
4827
|
-
pageSize: pagination.pageSize || PAGINATION
|
4827
|
+
pageSize: pagination.pageSize || PAGINATION.pageSize,
|
4828
4828
|
templateId: bookGroupId,
|
4829
4829
|
viewCode: viewCode,
|
4830
4830
|
bookName: keyword,
|
@@ -4832,7 +4832,7 @@ var TargetModal = function (props) {
|
|
4832
4832
|
case 1:
|
4833
4833
|
res_1 = _a.sent();
|
4834
4834
|
if (res_1) {
|
4835
|
-
setPagination(__assign(__assign({}, pagination), { total: res_1.total ? (res_1.total > 10000 ? 10000 : res_1.total) : 0, current: res_1.pageNum || 1, pageSize: res_1.pageSize || pagination.pageSize || PAGINATION
|
4835
|
+
setPagination(__assign(__assign({}, pagination), { total: res_1.total ? (res_1.total > 10000 ? 10000 : res_1.total) : 0, current: res_1.pageNum || 1, pageSize: res_1.pageSize || pagination.pageSize || PAGINATION.pageSize, showTotal: function () { return showTotal$2(res_1.total); } }));
|
4836
4836
|
return [2 /*return*/, res_1 === null || res_1 === void 0 ? void 0 : res_1.list];
|
4837
4837
|
}
|
4838
4838
|
setPagination(__assign(__assign({}, pagination), { total: 0 }));
|
@@ -4870,7 +4870,7 @@ var TargetModal = function (props) {
|
|
4870
4870
|
setKeywordValue('');
|
4871
4871
|
setKeyword('');
|
4872
4872
|
setSelected(null);
|
4873
|
-
setPagination(__assign({}, PAGINATION
|
4873
|
+
setPagination(__assign({}, PAGINATION));
|
4874
4874
|
}
|
4875
4875
|
}, [open]);
|
4876
4876
|
return (React__default.createElement(Modal, { title: "\u9009\u62E9\u76EE\u6807\u53F0\u8D26", open: open, width: 800, onCancel: onCancel, onOk: handleOk, destroyOnClose: true },
|
@@ -5382,7 +5382,7 @@ var ProTable = function (_a) {
|
|
5382
5382
|
}, [token.colorTextSecondary]);
|
5383
5383
|
return (React__default.createElement(ResizeObserver, { onResize: handleTableResize },
|
5384
5384
|
React__default.createElement("div", { className: styles$$.container },
|
5385
|
-
React__default.createElement(Table, __assign({}, props, { pagination: pagination, scroll: { x: tableWidth, y: tableHeight }, columns: columnsMerge })))));
|
5385
|
+
React__default.createElement(Table, __assign({}, props, { pagination: pagination, scroll: __assign({ x: tableWidth, y: tableHeight }, props.scroll), columns: columnsMerge })))));
|
5386
5386
|
};
|
5387
5387
|
var ProTable$1 = memo(ProTable);
|
5388
5388
|
|
@@ -5954,7 +5954,7 @@ var BookTable = forwardRef(function (props, ref) {
|
|
5954
5954
|
var showContextMenu = useContextMenu({ id: ContextMenu$4.id }).show;
|
5955
5955
|
var _c = useExportModal$2(), onExport = _c.onExport, ExportModal = _c.ExportModal;
|
5956
5956
|
// 分页
|
5957
|
-
var _d = useState(__assign({}, PAGINATION
|
5957
|
+
var _d = useState(__assign({}, PAGINATION)), pagination = _d[0], setPagination = _d[1];
|
5958
5958
|
// 排序
|
5959
5959
|
var _e = useState(null), sorter = _e[0], setSorter = _e[1];
|
5960
5960
|
// 当前高亮的行
|
@@ -5983,7 +5983,7 @@ var BookTable = forwardRef(function (props, ref) {
|
|
5983
5983
|
return [4 /*yield*/, getBookList$1(__assign(__assign(__assign({ viewCodes: viewCodes, displayWay: displayWay, templateId: templateId, nodeCode: nodeCode, keyword: keyword }, filterParams), sortParams), { page: pagination.current, pageSize: pagination.pageSize }))];
|
5984
5984
|
case 1:
|
5985
5985
|
res = _b.sent();
|
5986
|
-
setPagination(__assign(__assign({}, pagination), { total: (res === null || res === void 0 ? void 0 : res.total) ? (res.total > 10000 ? 10000 : res.total) : 0, current: (res === null || res === void 0 ? void 0 : res.pageNum) || 1, pageSize: (res === null || res === void 0 ? void 0 : res.pageSize) || PAGINATION
|
5986
|
+
setPagination(__assign(__assign({}, pagination), { total: (res === null || res === void 0 ? void 0 : res.total) ? (res.total > 10000 ? 10000 : res.total) : 0, current: (res === null || res === void 0 ? void 0 : res.pageNum) || 1, pageSize: (res === null || res === void 0 ? void 0 : res.pageSize) || PAGINATION.pageSize, showTotal: function () { return showTotal$1(res === null || res === void 0 ? void 0 : res.total); } }));
|
5987
5987
|
return [2 /*return*/, res === null || res === void 0 ? void 0 : res.list];
|
5988
5988
|
}
|
5989
5989
|
});
|
@@ -8932,7 +8932,7 @@ var ErrorMsgModal = function (_a) {
|
|
8932
8932
|
var _b = useState([]), header = _b[0], setHeader = _b[1];
|
8933
8933
|
var _c = useState(''), operateMsg = _c[0], setOperateMsg = _c[1];
|
8934
8934
|
var _d = useState([]), dataSource = _d[0], setDataSource = _d[1];
|
8935
|
-
var _e = useState(__assign({}, PAGINATION
|
8935
|
+
var _e = useState(__assign({}, PAGINATION)), pagination = _e[0], setPagination = _e[1];
|
8936
8936
|
var _f = useState(false), loading = _f[0], setLoading = _f[1];
|
8937
8937
|
var columns = header.map(function (item) { return ({
|
8938
8938
|
dataIndex: item.code,
|
@@ -9012,7 +9012,7 @@ var ImportTable = function () {
|
|
9012
9012
|
});
|
9013
9013
|
}); }, {
|
9014
9014
|
refreshDeps: [params],
|
9015
|
-
defaultParams: [PAGINATION
|
9015
|
+
defaultParams: [PAGINATION],
|
9016
9016
|
}).tableProps;
|
9017
9017
|
var columns = [
|
9018
9018
|
{
|
@@ -10139,29 +10139,29 @@ var css_248z$B = ".SenseContentTable-module_container__tE9m5 {\n display: flex;
|
|
10139
10139
|
var styles$B = {"container":"SenseContentTable-module_container__tE9m5","filter":"SenseContentTable-module_filter__j0qaP","btns":"SenseContentTable-module_btns__3OS4x","table":"SenseContentTable-module_table__RBtdO","hidden-row-selected-num":"SenseContentTable-module_hidden-row-selected-num__cdzcv"};
|
10140
10140
|
styleInject(css_248z$B);
|
10141
10141
|
|
10142
|
-
var PAGINATION = {
|
10143
|
-
current: 1,
|
10144
|
-
total: 0,
|
10145
|
-
pageSize: 1000,
|
10146
|
-
pageSizeOptions: [10, 20, 50, 100, 500, 1000],
|
10147
|
-
showSizeChanger: true,
|
10148
|
-
showQuickJumper: true,
|
10149
|
-
hideOnSinglePage: false,
|
10150
|
-
showTotal: function (total) { return "\u5171 ".concat(total, " \u6761"); },
|
10151
|
-
};
|
10152
10142
|
var SenseContentTable = forwardRef(function (props, ref) {
|
10153
10143
|
var _a;
|
10154
10144
|
var _b, _c;
|
10155
|
-
var senseGlobalCodes = props.senseGlobalCodes, tableName = props.tableName, extraParams = props.extraParams, timeFieldName = props.timeFieldName, timeFieldFormat = props.timeFieldFormat, filterConfig = props.filterConfig, showExportButton = props.showExportButton, customButtons = props.customButtons, customColumns = props.customColumns, selectedRowLength = props.selectedRowLength, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onRefresh = props.onRefresh, proTableContainerHeight = props.proTableContainerHeight, tableProps = __rest(props, ["senseGlobalCodes", "tableName", "extraParams", "timeFieldName", "timeFieldFormat", "filterConfig", "showExportButton", "customButtons", "customColumns", "selectedRowLength", "onClick", "onDoubleClick", "onRefresh", "proTableContainerHeight"]);
|
10156
|
-
var
|
10145
|
+
var senseGlobalCodes = props.senseGlobalCodes, tableName = props.tableName, extraParams = props.extraParams, timeFieldName = props.timeFieldName, timeFieldFormat = props.timeFieldFormat, filterConfig = props.filterConfig, showExportButton = props.showExportButton, customButtons = props.customButtons, customColumns = props.customColumns, selectedRowLength = props.selectedRowLength, _d = props.pageSize, pageSize = _d === void 0 ? 1000 : _d, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onRefresh = props.onRefresh, proTableContainerHeight = props.proTableContainerHeight, tableProps = __rest(props, ["senseGlobalCodes", "tableName", "extraParams", "timeFieldName", "timeFieldFormat", "filterConfig", "showExportButton", "customButtons", "customColumns", "selectedRowLength", "pageSize", "onClick", "onDoubleClick", "onRefresh", "proTableContainerHeight"]);
|
10146
|
+
var PAGINATION = {
|
10147
|
+
current: 1,
|
10148
|
+
total: 0,
|
10149
|
+
pageSize: pageSize || 1000,
|
10150
|
+
pageSizeOptions: [10, 20, 50, 100, 500, 1000],
|
10151
|
+
showSizeChanger: true,
|
10152
|
+
showQuickJumper: true,
|
10153
|
+
hideOnSinglePage: false,
|
10154
|
+
showTotal: function (total) { return "\u5171 ".concat(total, " \u6761"); },
|
10155
|
+
};
|
10156
|
+
var _e = useExportModal(), onExport = _e.onExport, ExportModal = _e.ExportModal;
|
10157
10157
|
// 分页
|
10158
|
-
var
|
10158
|
+
var _f = useState(__assign({}, PAGINATION)), pagination = _f[0], setPagination = _f[1];
|
10159
10159
|
// 筛选参数
|
10160
|
-
var
|
10160
|
+
var _g = useState({}), filter = _g[0], setFilter = _g[1];
|
10161
10161
|
// 表格选中
|
10162
10162
|
// const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
10163
10163
|
// 接口参数
|
10164
|
-
var
|
10164
|
+
var _h = useState({}), apiParams = _h[0], setApiParams = _h[1];
|
10165
10165
|
var token = theme.useToken().token;
|
10166
10166
|
// 获取筛选参数
|
10167
10167
|
var getFilterParams = function () {
|
@@ -10195,11 +10195,11 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10195
10195
|
};
|
10196
10196
|
// 获取表头数据
|
10197
10197
|
var getColumns = function (header) {
|
10198
|
-
var columns = header.map(function (item) { return (__assign({ title: item.name, key: item.code, dataIndex: item.code,
|
10198
|
+
var columns = header.map(function (item) { return (__assign({ title: item.name, key: item.code, dataIndex: item.code, sorter: false, ellipsis: true }, customColumns === null || customColumns === void 0 ? void 0 : customColumns[item.code])); });
|
10199
10199
|
return columns;
|
10200
10200
|
};
|
10201
10201
|
// 表格数据
|
10202
|
-
var
|
10202
|
+
var _j = useRequest(function () { return __awaiter(void 0, void 0, void 0, function () {
|
10203
10203
|
var filterParams, res;
|
10204
10204
|
var _a, _b, _c, _d;
|
10205
10205
|
return __generator(this, function (_e) {
|
@@ -10220,7 +10220,7 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10220
10220
|
});
|
10221
10221
|
}); }, {
|
10222
10222
|
refreshDeps: [JSON.stringify(senseGlobalCodes), tableName, JSON.stringify(filter)],
|
10223
|
-
}), loading =
|
10223
|
+
}), loading = _j.loading, _k = _j.data, _l = _k === void 0 ? {} : _k, header = _l.header, columns = _l.columns, dataSource = _l.dataSource, refresh = _j.refresh;
|
10224
10224
|
// 显示按钮
|
10225
10225
|
var showButtons = function () {
|
10226
10226
|
if (customButtons) {
|
@@ -10284,7 +10284,7 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10284
10284
|
// rowClassName={rowClassName}
|
10285
10285
|
onChange: handleChangeTable,
|
10286
10286
|
// rowSelection={rowSelection}
|
10287
|
-
containerHeight: proTableContainerHeight }, tableProps))),
|
10287
|
+
containerHeight: proTableContainerHeight, scroll: { x: 'max-content', y: null } }, tableProps))),
|
10288
10288
|
React__default.createElement(ExportModal, null)));
|
10289
10289
|
});
|
10290
10290
|
|
@@ -15885,7 +15885,7 @@ styleInject(css_248z$3);
|
|
15885
15885
|
|
15886
15886
|
var Search$1 = Input.Search;
|
15887
15887
|
var SenseList = function (_a) {
|
15888
|
-
var name = _a.name, bookId = _a.bookId, selectedTag = _a.selectedTag, templateId = _a.templateId, viewCode = _a.viewCode, customColumns = _a.customColumns;
|
15888
|
+
var name = _a.name, bookId = _a.bookId, selectedTag = _a.selectedTag, templateId = _a.templateId, viewCode = _a.viewCode, pageSize = _a.pageSize, customColumns = _a.customColumns;
|
15889
15889
|
var showContextMenu = useContextMenu({ id: ContextMenu.id }).show;
|
15890
15890
|
var _b = App.useApp(), modal = _b.modal, message = _b.message;
|
15891
15891
|
var _c = useState([]), selectBookIds = _c[0], setSelectBookIds = _c[1];
|
@@ -15980,7 +15980,7 @@ var SenseList = function (_a) {
|
|
15980
15980
|
bookId ? null : (React__default.createElement(Select, { style: { width: 260 }, placeholder: "\u8BF7\u9009\u62E9\u6240\u5C5E\u53F0\u8D26", options: bookOptions, onChange: handleChangeSelectBookIds, value: selectBookIds, fieldNames: { label: 'bookName', value: 'bookId' }, mode: "multiple", maxTagCount: "responsive", showSearch: true, filterOption: function (k, option) { return option.bookName.includes(k); } })),
|
15981
15981
|
React__default.createElement(Search$1, { style: { width: 200 }, placeholder: "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD", onSearch: handleSearch, allowClear: true }))),
|
15982
15982
|
React__default.createElement("div", { className: styles$3.main },
|
15983
|
-
React__default.createElement(SenseTable, { ref: senseTableRef, bookId: bookId, bookIds: selectBookIds, keyword: keyword, templateId: templateId, viewCodes: viewCode ? [viewCode] : undefined, rowSelection: rowSelection, onRow: onRow, enableTag: "edit", customColumns: customColumns, writeAuth: true })),
|
15983
|
+
React__default.createElement(SenseTable, { ref: senseTableRef, bookId: bookId, bookIds: selectBookIds, keyword: keyword, templateId: templateId, viewCodes: viewCode ? [viewCode] : undefined, pageSize: pageSize, rowSelection: rowSelection, onRow: onRow, enableTag: "edit", customColumns: customColumns, writeAuth: true })),
|
15984
15984
|
React__default.createElement(ContextMenu, { disabled: !selectedTag })));
|
15985
15985
|
};
|
15986
15986
|
|
@@ -16133,13 +16133,13 @@ var styles$1 = {"container":"TagConfig-module_container__YV3Kx"};
|
|
16133
16133
|
styleInject(css_248z$1);
|
16134
16134
|
|
16135
16135
|
var TagConfig = function (props) {
|
16136
|
-
var name = props.name, templateId = props.templateId, bookId = props.bookId, viewCode = props.viewCode, customColumns = props.customColumns;
|
16136
|
+
var name = props.name, templateId = props.templateId, bookId = props.bookId, viewCode = props.viewCode, pageSize = props.pageSize, customColumns = props.customColumns;
|
16137
16137
|
var _a = useState(null), selectedTag = _a[0], setSelectedTag = _a[1];
|
16138
16138
|
return (React__default.createElement(Splitter, { className: styles$1.container },
|
16139
16139
|
React__default.createElement(Splitter.Panel, { defaultSize: 240, min: 180, max: 600 },
|
16140
16140
|
React__default.createElement(TagList, { templateId: templateId, selectedTag: selectedTag, setSelectedTag: setSelectedTag })),
|
16141
16141
|
React__default.createElement(Splitter.Panel, null,
|
16142
|
-
React__default.createElement(SenseList, { name: name, bookId: bookId, templateId: templateId, viewCode: viewCode, selectedTag: selectedTag, customColumns: customColumns }))));
|
16142
|
+
React__default.createElement(SenseList, { name: name, bookId: bookId, templateId: templateId, viewCode: viewCode, pageSize: pageSize, selectedTag: selectedTag, customColumns: customColumns }))));
|
16143
16143
|
};
|
16144
16144
|
|
16145
16145
|
var settings$2 = {
|
@@ -16274,11 +16274,11 @@ var CcosVideoPlayer = function (props) {
|
|
16274
16274
|
CcosVideoPlayer.settings = settings$1;
|
16275
16275
|
|
16276
16276
|
try {
|
16277
|
-
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.
|
16277
|
+
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.41","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-28 15:43:21"}');
|
16278
16278
|
}
|
16279
16279
|
catch (err) {
|
16280
16280
|
console.warn(err);
|
16281
|
-
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.
|
16281
|
+
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.41","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-28 15:43:21"}';
|
16282
16282
|
}
|
16283
16283
|
|
16284
16284
|
export { BookDetail, BookGroupImport, BookGroupTable, BookImport, BookInfo, BookSelect, BookTable, CcosBookDetail, CcosImportTable, CcosSenseCreate, CcosSenseDetail, CcosSenseEdit, CcosSenseFullTable, CcosSenseManager, CcosSenseSearch, CcosSenseTree, CcosSenseView, CcosTagConfig, CcosVideoPlayer, EntityClassFilter, EntityClassTreeSelect, ImportTable, Modal, OrgTreeSelect, PersonSelector, ProSearch, ProTable$1 as ProTable, RegionCascader, RegionTreeSelect, RelationGraph, SenseContentTable, SenseCreate, SenseDetail, SenseEdit, SenseForm, SenseFullTable, SenseInfo, SenseManager, SenseSearch, SenseTable, SenseTree, SenseView, TagConfig, TagTreeSelect, VideoControl, VideoPlayer, setCconfig as config };
|