@icos-desktop/react-components 2.0.47 → 2.0.49
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 +5 -0
- package/dist/icos-desktop.js +39 -20
- package/dist/icos-desktop.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/icos-desktop.d.ts
CHANGED
@@ -436,6 +436,7 @@ interface SenseContentTableProps extends TableProps {
|
|
436
436
|
filterConfig?: {
|
437
437
|
label: string;
|
438
438
|
column: string;
|
439
|
+
condition?: string;
|
439
440
|
}[];
|
440
441
|
/**
|
441
442
|
* 显示导出数据按钮
|
@@ -457,6 +458,10 @@ interface SenseContentTableProps extends TableProps {
|
|
457
458
|
* 表格默认分页条数,默认 1000
|
458
459
|
*/
|
459
460
|
pageSize?: number;
|
461
|
+
/**
|
462
|
+
* 表格最大总数
|
463
|
+
*/
|
464
|
+
maxTotal?: number;
|
460
465
|
/**
|
461
466
|
* 单击实体
|
462
467
|
* @param record
|
package/dist/icos-desktop.js
CHANGED
@@ -3939,7 +3939,7 @@ function createInstance(instanceConfig) {
|
|
3939
3939
|
* 接口请求
|
3940
3940
|
*/
|
3941
3941
|
var request = createInstance({
|
3942
|
-
timeout:
|
3942
|
+
timeout: 60000,
|
3943
3943
|
timeoutErrorMessage: '请求超时',
|
3944
3944
|
// signal: controller.signal,
|
3945
3945
|
});
|
@@ -4795,7 +4795,7 @@ styleInject(css_248z$16);
|
|
4795
4795
|
|
4796
4796
|
var Search$7 = Input.Search;
|
4797
4797
|
// 显示总数 最大展示10000条
|
4798
|
-
var showTotal$
|
4798
|
+
var showTotal$3 = function (total) {
|
4799
4799
|
if (total === void 0) { total = 0; }
|
4800
4800
|
return (React__default.createElement(Space, { align: "center" },
|
4801
4801
|
total > 10000 ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A10000\u6761" },
|
@@ -4831,7 +4831,7 @@ var TargetModal = function (props) {
|
|
4831
4831
|
case 1:
|
4832
4832
|
res_1 = _a.sent();
|
4833
4833
|
if (res_1) {
|
4834
|
-
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$
|
4834
|
+
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$3(res_1.total); } }));
|
4835
4835
|
return [2 /*return*/, res_1 === null || res_1 === void 0 ? void 0 : res_1.list];
|
4836
4836
|
}
|
4837
4837
|
setPagination(__assign(__assign({}, pagination), { total: 0 }));
|
@@ -5955,7 +5955,7 @@ var renderAuthTypes = function (authTypes) {
|
|
5955
5955
|
return '-';
|
5956
5956
|
};
|
5957
5957
|
// 显示总数 最大展示10000条
|
5958
|
-
var showTotal$
|
5958
|
+
var showTotal$2 = function (total) {
|
5959
5959
|
if (total === void 0) { total = 0; }
|
5960
5960
|
return (React__default.createElement(Space, { align: "center" },
|
5961
5961
|
total > 10000 ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A10000\u6761" },
|
@@ -6010,7 +6010,7 @@ var BookTable = forwardRef(function (props, ref) {
|
|
6010
6010
|
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 }))];
|
6011
6011
|
case 1:
|
6012
6012
|
res = _b.sent();
|
6013
|
-
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$
|
6013
|
+
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$2(res === null || res === void 0 ? void 0 : res.total); } }));
|
6014
6014
|
return [2 /*return*/, res === null || res === void 0 ? void 0 : res.list];
|
6015
6015
|
}
|
6016
6016
|
});
|
@@ -6857,7 +6857,7 @@ var styles$T = {"container":"SenseTable-module_container__lRFoG","table":"SenseT
|
|
6857
6857
|
styleInject(css_248z$T);
|
6858
6858
|
|
6859
6859
|
// 显示总数 最大展示10000条
|
6860
|
-
var showTotal = function (total) {
|
6860
|
+
var showTotal$1 = function (total) {
|
6861
6861
|
if (total === void 0) { total = 0; }
|
6862
6862
|
return (React__default.createElement(Space, { align: "center" },
|
6863
6863
|
total > 10000 ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A10000\u6761" },
|
@@ -7089,7 +7089,7 @@ var SenseTable = forwardRef(function (props, ref) {
|
|
7089
7089
|
return [4 /*yield*/, getSenseList(__assign(__assign(__assign({ bookId: bookId, bookIds: bookIds, templateId: templateId, leafRegionId: leafRegionId, pathRegionId: pathRegionId, viewCodes: viewCodes, keyword: keyword }, filterParams), sortParams), { extendColumnParams: extendColumnParams, page: pagination.current, pageSize: pagination.pageSize, writeAuth: writeAuth }))];
|
7090
7090
|
case 1:
|
7091
7091
|
res = _f.sent();
|
7092
|
-
setPagination(__assign(__assign({}, pagination), { total: ((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total) ? (res.body.total > 10000 ? 10000 : res.body.total) : 0, current: ((_b = res === null || res === void 0 ? void 0 : res.body) === null || _b === void 0 ? void 0 : _b.pageNum) || 1, pageSize: ((_c = res === null || res === void 0 ? void 0 : res.body) === null || _c === void 0 ? void 0 : _c.pageSize) || PAGINATION.pageSize, showTotal: function () { var _a; return showTotal((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total); } }));
|
7092
|
+
setPagination(__assign(__assign({}, pagination), { total: ((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total) ? (res.body.total > 10000 ? 10000 : res.body.total) : 0, current: ((_b = res === null || res === void 0 ? void 0 : res.body) === null || _b === void 0 ? void 0 : _b.pageNum) || 1, pageSize: ((_c = res === null || res === void 0 ? void 0 : res.body) === null || _c === void 0 ? void 0 : _c.pageSize) || PAGINATION.pageSize, showTotal: function () { var _a; return showTotal$1((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total); } }));
|
7093
7093
|
header = (_d = res === null || res === void 0 ? void 0 : res.header) === null || _d === void 0 ? void 0 : _d.filter(function (item) { return !(hideColumns === null || hideColumns === void 0 ? void 0 : hideColumns.includes(item.code)); });
|
7094
7094
|
return [2 /*return*/, {
|
7095
7095
|
header: __spreadArray(__spreadArray([], header, true), [
|
@@ -10166,10 +10166,22 @@ var css_248z$B = ".SenseContentTable-module_container__tE9m5 {\n display: flex;
|
|
10166
10166
|
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"};
|
10167
10167
|
styleInject(css_248z$B);
|
10168
10168
|
|
10169
|
+
// 显示总数 最大展示10000条
|
10170
|
+
var showTotal = function (total, max) {
|
10171
|
+
if (total === void 0) { total = 0; }
|
10172
|
+
if (max === void 0) { max = 10000; }
|
10173
|
+
return (React__default.createElement(Space, { align: "center" },
|
10174
|
+
total > max ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A".concat(max, "\u6761") },
|
10175
|
+
React__default.createElement(ExclamationCircleOutlined, null))) : null,
|
10176
|
+
React__default.createElement("span", null,
|
10177
|
+
"\u5171",
|
10178
|
+
total,
|
10179
|
+
"\u6761")));
|
10180
|
+
};
|
10169
10181
|
var SenseContentTable = forwardRef(function (props, ref) {
|
10170
10182
|
var _a;
|
10171
10183
|
var _b, _c;
|
10172
|
-
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; props.proTableContainerHeight; var tableProps = __rest(props, ["senseGlobalCodes", "tableName", "extraParams", "timeFieldName", "timeFieldFormat", "filterConfig", "showExportButton", "customButtons", "customColumns", "selectedRowLength", "pageSize", "onClick", "onDoubleClick", "onRefresh", "proTableContainerHeight"]);
|
10184
|
+
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, maxTotal = props.maxTotal, onClick = props.onClick, onDoubleClick = props.onDoubleClick, onRefresh = props.onRefresh; props.proTableContainerHeight; var tableProps = __rest(props, ["senseGlobalCodes", "tableName", "extraParams", "timeFieldName", "timeFieldFormat", "filterConfig", "showExportButton", "customButtons", "customColumns", "selectedRowLength", "pageSize", "maxTotal", "onClick", "onDoubleClick", "onRefresh", "proTableContainerHeight"]);
|
10173
10185
|
var PAGINATION = {
|
10174
10186
|
current: 1,
|
10175
10187
|
total: 0,
|
@@ -10200,9 +10212,8 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10200
10212
|
(_a = params.conditions).push.apply(_a, extraParams.conditions);
|
10201
10213
|
}
|
10202
10214
|
if (filter) {
|
10203
|
-
console.log(filter);
|
10204
10215
|
Object.keys(filter).forEach(function (key) {
|
10205
|
-
var _a;
|
10216
|
+
var _a, _b;
|
10206
10217
|
if (key === 'time') {
|
10207
10218
|
if ((_a = filter.time) === null || _a === void 0 ? void 0 : _a.length) {
|
10208
10219
|
params.startTime = filter.time[0];
|
@@ -10210,9 +10221,11 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10210
10221
|
}
|
10211
10222
|
}
|
10212
10223
|
else if (filter[key]) {
|
10224
|
+
console.log(filterConfig);
|
10225
|
+
var condition = (_b = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.find(function (item) { return item.column === key; })) === null || _b === void 0 ? void 0 : _b.condition;
|
10213
10226
|
params.conditions.push({
|
10214
10227
|
column: key,
|
10215
|
-
condition: 'like',
|
10228
|
+
condition: condition || 'like',
|
10216
10229
|
value: filter[key],
|
10217
10230
|
});
|
10218
10231
|
}
|
@@ -10222,26 +10235,32 @@ var SenseContentTable = forwardRef(function (props, ref) {
|
|
10222
10235
|
};
|
10223
10236
|
// 获取表头数据
|
10224
10237
|
var getColumns = function (header) {
|
10225
|
-
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])); });
|
10238
|
+
var columns = header === null || header === void 0 ? void 0 : 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])); });
|
10226
10239
|
return columns;
|
10227
10240
|
};
|
10228
10241
|
// 表格数据
|
10229
10242
|
var _j = useRequest(function () { return __awaiter(void 0, void 0, void 0, function () {
|
10230
10243
|
var filterParams, res;
|
10231
|
-
var _a, _b, _c, _d;
|
10232
|
-
return __generator(this, function (
|
10233
|
-
switch (
|
10244
|
+
var _a, _b, _c, _d, _e, _f;
|
10245
|
+
return __generator(this, function (_g) {
|
10246
|
+
switch (_g.label) {
|
10234
10247
|
case 0:
|
10235
10248
|
filterParams = getFilterParams();
|
10236
10249
|
setApiParams(__assign(__assign({ senseGlobalCodes: senseGlobalCodes, tableName: tableName }, filterParams), extraParams));
|
10237
10250
|
return [4 /*yield*/, getSenseContentList(__assign(__assign(__assign({ senseGlobalCodes: senseGlobalCodes, tableName: tableName }, filterParams), extraParams), { page: pagination.current, pageSize: pagination.pageSize }))];
|
10238
10251
|
case 1:
|
10239
|
-
res =
|
10240
|
-
setPagination(__assign(__assign({}, pagination), { total:
|
10252
|
+
res = _g.sent();
|
10253
|
+
setPagination(__assign(__assign({}, pagination), { total: maxTotal
|
10254
|
+
? ((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total)
|
10255
|
+
? res.body.total > maxTotal
|
10256
|
+
? maxTotal
|
10257
|
+
: (_b = res === null || res === void 0 ? void 0 : res.body) === null || _b === void 0 ? void 0 : _b.total
|
10258
|
+
: 0
|
10259
|
+
: (_c = res === null || res === void 0 ? void 0 : res.body) === null || _c === void 0 ? void 0 : _c.total, current: ((_d = res === null || res === void 0 ? void 0 : res.body) === null || _d === void 0 ? void 0 : _d.pageNum) || 1, pageSize: ((_e = res === null || res === void 0 ? void 0 : res.body) === null || _e === void 0 ? void 0 : _e.pageSize) || PAGINATION.pageSize, showTotal: maxTotal ? function () { var _a; return showTotal((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total, maxTotal); } : pagination.showTotal }));
|
10241
10260
|
return [2 /*return*/, {
|
10242
10261
|
header: (res === null || res === void 0 ? void 0 : res.header) || [],
|
10243
10262
|
columns: getColumns(res === null || res === void 0 ? void 0 : res.header),
|
10244
|
-
dataSource: (
|
10263
|
+
dataSource: (_f = res === null || res === void 0 ? void 0 : res.body) === null || _f === void 0 ? void 0 : _f.list,
|
10245
10264
|
}];
|
10246
10265
|
}
|
10247
10266
|
});
|
@@ -16305,11 +16324,11 @@ var CcosVideoPlayer = function (props) {
|
|
16305
16324
|
CcosVideoPlayer.settings = settings$1;
|
16306
16325
|
|
16307
16326
|
try {
|
16308
|
-
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.
|
16327
|
+
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.49","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-29 14:51:32"}');
|
16309
16328
|
}
|
16310
16329
|
catch (err) {
|
16311
16330
|
console.warn(err);
|
16312
|
-
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.
|
16331
|
+
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.49","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-29 14:51:32"}';
|
16313
16332
|
}
|
16314
16333
|
|
16315
16334
|
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 };
|