@icos-desktop/react-components 2.0.46 → 2.0.48

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.
@@ -457,6 +457,10 @@ interface SenseContentTableProps extends TableProps {
457
457
  * 表格默认分页条数,默认 1000
458
458
  */
459
459
  pageSize?: number;
460
+ /**
461
+ * 表格最大总数
462
+ */
463
+ maxTotal?: number;
460
464
  /**
461
465
  * 单击实体
462
466
  * @param record
@@ -1,7 +1,7 @@
1
1
  import { message, Form, Input, TreeSelect, Collapse, App, Button, Tooltip, Modal as Modal$1, List, Space, Table, Radio, Checkbox, Popover, theme, Select, Tree, DatePicker, InputNumber, Image, Steps as Steps$1, Upload as Upload$1, Progress, Cascader, Empty, Slider, Tabs as Tabs$1, Breadcrumb, Segmented, Divider, Spin, Splitter } from '@xirang/design-antd';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, forwardRef, useEffect, useImperativeHandle, useRef, memo, useMemo, createRef } from 'react';
4
- import { useRequest, useMount, useDebounceEffect, useAntdTable, useExternal, useAsyncEffect, useDeepCompareEffect } from 'ahooks';
4
+ import { useRequest, useMount, useSize, useDebounceEffect, useAntdTable, useExternal, useAsyncEffect, useDeepCompareEffect } from 'ahooks';
5
5
  import { omit, cloneDeep, isEmpty, debounce, pick } from 'lodash';
6
6
  import qs from 'qs';
7
7
  import { produce } from 'immer';
@@ -3939,7 +3939,7 @@ function createInstance(instanceConfig) {
3939
3939
  * 接口请求
3940
3940
  */
3941
3941
  var request = createInstance({
3942
- timeout: 10000,
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$2 = function (total) {
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$2(res_1.total); } }));
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 }));
@@ -5325,36 +5325,74 @@ var SvgSetting = function SvgSetting(props) {
5325
5325
  })));
5326
5326
  };
5327
5327
 
5328
- var css_248z$11 = ":root {\n --ant-table-empty-stroke-color: #d9d9d9;\n}\n.index-module_container__triFT {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.index-module_container__triFT.index-module_no-pagination__DUAKv .ant-table {\n height: 100%;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\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 .ant-table-wrapper .ant-table-cell-fix-right-first::after {\n box-shadow: none;\n}\n.index-module_container__triFT .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .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 .ant-empty-image svg path {\n stroke: var(--ant-table-empty-stroke-color, #d9d9d9);\n}\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-title,\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-footer,\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-cell,\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-tbody > tr > th,\n.index-module_container__triFT .ant-table-wrapper .ant-table .ant-table-tbody > tr > td,\n.index-module_container__triFT .ant-table-wrapper .ant-table tfoot > tr > th,\n.index-module_container__triFT .ant-table-wrapper .ant-table tfoot > tr > td {\n max-width: 380px;\n}\n.index-module_container__triFT .ant-table {\n height: calc(100% - 56px);\n}\n.index-module_container__triFT .ant-table-wrapper,\n.index-module_container__triFT .ant-spin-nested-loading,\n.index-module_container__triFT .ant-spin-container,\n.index-module_container__triFT .ant-table-container,\n.index-module_container__triFT .ant-table-content {\n height: 100%;\n}\n.index-module_container__triFT .ant-table-content {\n overflow: auto !important;\n}\n.index-module_container__triFT .ant-table-thead {\n position: sticky;\n top: 0;\n z-index: 10;\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 .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
5329
- var styles$$ = {"container":"index-module_container__triFT","no-pagination":"index-module_no-pagination__DUAKv","columns-config":"index-module_columns-config__pSkLQ","columns-config-popup":"index-module_columns-config-popup__-d8ej"};
5328
+ var css_248z$11 = ":root {\n --ant-table-empty-stroke-color: #d9d9d9;\n}\n.index-module_container__triFT {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.index-module_container__triFT:not(.index-module_pagination__eCJE3) .ant-table {\n height: 100%;\n}\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-title,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-footer,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-cell,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-thead > tr > th,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-tbody > tr > th,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table .ant-table-tbody > tr > td,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table tfoot > tr > th,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper .ant-table tfoot > tr > td {\n max-width: 380px;\n}\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table {\n height: calc(100% - 56px);\n}\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-wrapper,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-spin-nested-loading,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-spin-container,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-container,\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-content {\n height: 100%;\n}\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-content {\n overflow: auto !important;\n}\n.index-module_container__triFT:not(.index-module_virtual__iU2Fi) .ant-table-thead {\n position: sticky;\n top: 0;\n z-index: 10;\n}\n.index-module_container__triFT .index-module_columns-config__pSkLQ {\n position: absolute;\n top: 12px;\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 .ant-table-wrapper .ant-table-cell-fix-right-first::after {\n box-shadow: none;\n}\n.index-module_container__triFT .ant-table-cell {\n line-height: 24px;\n}\n.index-module_container__triFT .ant-table-wrapper .ant-table-container::before,\n.index-module_container__triFT .ant-table-wrapper .ant-table-container::after {\n display: none;\n}\n.index-module_container__triFT .ant-table-cell-scrollbar {\n display: none;\n}\n.index-module_container__triFT .ant-table-thead .ant-table-cell {\n overflow: hidden;\n}\n.index-module_container__triFT .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 .ant-empty-image svg path {\n stroke: var(--ant-table-empty-stroke-color, #d9d9d9);\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 .rc-virtual-list-holder {\n overflow-x: hidden;\n}\n";
5329
+ var styles$$ = {"container":"index-module_container__triFT","pagination":"index-module_pagination__eCJE3","virtual":"index-module_virtual__iU2Fi","columns-config":"index-module_columns-config__pSkLQ","columns-config-popup":"index-module_columns-config-popup__-d8ej"};
5330
5330
  styleInject(css_248z$11);
5331
5331
 
5332
+ // 计算最大宽度
5333
+ var getMaxWidth = function (texts) {
5334
+ var canvas = document.createElement('canvas');
5335
+ var context = canvas.getContext('2d');
5336
+ context.font = '14px Arial';
5337
+ return Math.min(texts.reduce(function (maxWidth, text) {
5338
+ var columnWidth = context.measureText(text).width + 32;
5339
+ return Math.max(maxWidth, columnWidth);
5340
+ }, 0), 380);
5341
+ };
5332
5342
  var ProTable = function (_a) {
5333
5343
  var _b;
5334
- var _c = _a.header, header = _c === void 0 ? [] : _c, _d = _a.columns, columns = _d === void 0 ? [] : _d, _e = _a.pagination, pagination = _e === void 0 ? false : _e, props = __rest(_a, ["header", "columns", "pagination"]);
5344
+ var _c = _a.header, header = _c === void 0 ? [] : _c, _d = _a.columns, columns = _d === void 0 ? [] : _d, _e = _a.pagination, pagination = _e === void 0 ? false : _e, dataSource = _a.dataSource, virtual = _a.virtual, props = __rest(_a, ["header", "columns", "pagination", "dataSource", "virtual"]);
5335
5345
  // 表头显示配置
5336
5346
  var _f = useState([]), headerValue = _f[0], setHeaderValue = _f[1];
5347
+ var containerRef = useRef();
5337
5348
  var token = theme.useToken().token;
5349
+ var containerSize = useSize(containerRef);
5338
5350
  // 表格列配置修改
5339
5351
  var handleHeaderConfigChange = function (value) {
5340
5352
  setHeaderValue(value);
5341
5353
  };
5342
5354
  // 表格列
5343
- var columnsMerge = useMemo(function () {
5355
+ var _g = useMemo(function () {
5344
5356
  var newColumns = columns.filter(function (item) {
5345
5357
  return headerValue.includes(item.key || item.dataIndex);
5346
5358
  });
5359
+ var tableWidth = 36;
5347
5360
  if (newColumns.length > 0) {
5348
- newColumns.push({
5349
- title: (React__default.createElement("div", { className: styles$$['columns-config'] },
5350
- React__default.createElement(SvgSetting, null),
5351
- React__default.createElement(Select, { popupClassName: styles$$['columns-config-popup'], mode: "multiple", showSearch: false, defaultActiveFirstOption: false, popupMatchSelectWidth: 122, placement: "bottomRight", value: headerValue, onChange: handleHeaderConfigChange, options: header.filter(function (item) { return !item.hidden; }), fieldNames: { label: 'name', value: 'code' } }))),
5352
- width: 36,
5353
- fixed: 'right',
5354
- });
5361
+ if (virtual) {
5362
+ return [
5363
+ __spreadArray(__spreadArray([], newColumns.map(function (item) {
5364
+ var width = getMaxWidth(__spreadArray([
5365
+ item.title
5366
+ ], (dataSource || []).map(function (it) { return it[item.dataIndex]; }), true)) || undefined;
5367
+ tableWidth += width;
5368
+ return __assign(__assign({}, item), { width: width });
5369
+ }), true), [
5370
+ {
5371
+ title: (React__default.createElement("div", { className: styles$$['columns-config'] },
5372
+ React__default.createElement(SvgSetting, null),
5373
+ React__default.createElement(Select, { popupClassName: styles$$['columns-config-popup'], mode: "multiple", showSearch: false, defaultActiveFirstOption: false, popupMatchSelectWidth: 122, placement: "bottomRight", value: headerValue, onChange: handleHeaderConfigChange, options: header.filter(function (item) { return !item.hidden; }), fieldNames: { label: 'name', value: 'code' } }))),
5374
+ width: 36,
5375
+ fixed: 'right',
5376
+ },
5377
+ ], false),
5378
+ tableWidth,
5379
+ ];
5380
+ }
5381
+ return [
5382
+ __spreadArray(__spreadArray([], newColumns, true), [
5383
+ {
5384
+ title: (React__default.createElement("div", { className: styles$$['columns-config'] },
5385
+ React__default.createElement(SvgSetting, null),
5386
+ React__default.createElement(Select, { popupClassName: styles$$['columns-config-popup'], mode: "multiple", showSearch: false, defaultActiveFirstOption: false, popupMatchSelectWidth: 122, placement: "bottomRight", value: headerValue, onChange: handleHeaderConfigChange, options: header.filter(function (item) { return !item.hidden; }), fieldNames: { label: 'name', value: 'code' } }))),
5387
+ width: 36,
5388
+ fixed: 'right',
5389
+ },
5390
+ ], false),
5391
+ tableWidth,
5392
+ ];
5355
5393
  }
5356
- return newColumns;
5357
- }, [JSON.stringify(columns), headerValue]);
5394
+ return [[], 0];
5395
+ }, [JSON.stringify(columns), headerValue, JSON.stringify(dataSource)]), columnsMerge = _g[0], x = _g[1];
5358
5396
  useEffect(function () {
5359
5397
  // 表头配置
5360
5398
  setHeaderValue((header === null || header === void 0 ? void 0 : header.filter(function (item) { return item.defaultShow; }).map(function (item) { return item.code; })) || []);
@@ -5362,10 +5400,16 @@ var ProTable = function (_a) {
5362
5400
  useEffect(function () {
5363
5401
  document.documentElement.style.setProperty('--ant-table-empty-stroke-color', token.colorTextSecondary);
5364
5402
  }, [token.colorTextSecondary]);
5365
- return (React__default.createElement("div", { className: classNames(styles$$.container, (_b = {},
5366
- _b[styles$$['no-pagination']] = pagination === false,
5403
+ return (React__default.createElement("div", { ref: containerRef, className: classNames(styles$$.container, (_b = {},
5404
+ _b[styles$$.pagination] = pagination !== false,
5405
+ _b[styles$$.virtual] = virtual,
5367
5406
  _b)) },
5368
- React__default.createElement(Table, __assign({}, props, { pagination: pagination, columns: columnsMerge, scroll: { x: 'max-content' } }))));
5407
+ React__default.createElement(Table, __assign({}, props, { pagination: pagination, columns: columnsMerge, dataSource: dataSource, scroll: virtual
5408
+ ? {
5409
+ x: Math.min(x, containerSize === null || containerSize === void 0 ? void 0 : containerSize.width),
5410
+ y: Math.max(0, (containerSize === null || containerSize === void 0 ? void 0 : containerSize.height) - 40 - 56),
5411
+ }
5412
+ : { x: 'max-content' }, virtual: virtual }))));
5369
5413
  };
5370
5414
  var ProTable$1 = memo(ProTable);
5371
5415
 
@@ -5911,7 +5955,7 @@ var renderAuthTypes = function (authTypes) {
5911
5955
  return '-';
5912
5956
  };
5913
5957
  // 显示总数 最大展示10000条
5914
- var showTotal$1 = function (total) {
5958
+ var showTotal$2 = function (total) {
5915
5959
  if (total === void 0) { total = 0; }
5916
5960
  return (React__default.createElement(Space, { align: "center" },
5917
5961
  total > 10000 ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A10000\u6761" },
@@ -5966,7 +6010,7 @@ var BookTable = forwardRef(function (props, ref) {
5966
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 }))];
5967
6011
  case 1:
5968
6012
  res = _b.sent();
5969
- 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); } }));
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); } }));
5970
6014
  return [2 /*return*/, res === null || res === void 0 ? void 0 : res.list];
5971
6015
  }
5972
6016
  });
@@ -6813,7 +6857,7 @@ var styles$T = {"container":"SenseTable-module_container__lRFoG","table":"SenseT
6813
6857
  styleInject(css_248z$T);
6814
6858
 
6815
6859
  // 显示总数 最大展示10000条
6816
- var showTotal = function (total) {
6860
+ var showTotal$1 = function (total) {
6817
6861
  if (total === void 0) { total = 0; }
6818
6862
  return (React__default.createElement(Space, { align: "center" },
6819
6863
  total > 10000 ? (React__default.createElement(Tooltip, { title: "\u6700\u5927\u5C55\u793A10000\u6761" },
@@ -7045,7 +7089,7 @@ var SenseTable = forwardRef(function (props, ref) {
7045
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 }))];
7046
7090
  case 1:
7047
7091
  res = _f.sent();
7048
- 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); } }));
7049
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)); });
7050
7094
  return [2 /*return*/, {
7051
7095
  header: __spreadArray(__spreadArray([], header, true), [
@@ -10122,10 +10166,22 @@ var css_248z$B = ".SenseContentTable-module_container__tE9m5 {\n display: flex;
10122
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"};
10123
10167
  styleInject(css_248z$B);
10124
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
+ };
10125
10181
  var SenseContentTable = forwardRef(function (props, ref) {
10126
10182
  var _a;
10127
10183
  var _b, _c;
10128
- 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"]);
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"]);
10129
10185
  var PAGINATION = {
10130
10186
  current: 1,
10131
10187
  total: 0,
@@ -10156,7 +10212,6 @@ var SenseContentTable = forwardRef(function (props, ref) {
10156
10212
  (_a = params.conditions).push.apply(_a, extraParams.conditions);
10157
10213
  }
10158
10214
  if (filter) {
10159
- console.log(filter);
10160
10215
  Object.keys(filter).forEach(function (key) {
10161
10216
  var _a;
10162
10217
  if (key === 'time') {
@@ -10184,20 +10239,26 @@ var SenseContentTable = forwardRef(function (props, ref) {
10184
10239
  // 表格数据
10185
10240
  var _j = useRequest(function () { return __awaiter(void 0, void 0, void 0, function () {
10186
10241
  var filterParams, res;
10187
- var _a, _b, _c, _d;
10188
- return __generator(this, function (_e) {
10189
- switch (_e.label) {
10242
+ var _a, _b, _c, _d, _e, _f;
10243
+ return __generator(this, function (_g) {
10244
+ switch (_g.label) {
10190
10245
  case 0:
10191
10246
  filterParams = getFilterParams();
10192
10247
  setApiParams(__assign(__assign({ senseGlobalCodes: senseGlobalCodes, tableName: tableName }, filterParams), extraParams));
10193
10248
  return [4 /*yield*/, getSenseContentList(__assign(__assign(__assign({ senseGlobalCodes: senseGlobalCodes, tableName: tableName }, filterParams), extraParams), { page: pagination.current, pageSize: pagination.pageSize }))];
10194
10249
  case 1:
10195
- res = _e.sent();
10196
- setPagination(__assign(__assign({}, pagination), { total: ((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.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 }));
10250
+ res = _g.sent();
10251
+ setPagination(__assign(__assign({}, pagination), { total: maxTotal
10252
+ ? ((_a = res === null || res === void 0 ? void 0 : res.body) === null || _a === void 0 ? void 0 : _a.total)
10253
+ ? res.body.total > maxTotal
10254
+ ? maxTotal
10255
+ : (_b = res === null || res === void 0 ? void 0 : res.body) === null || _b === void 0 ? void 0 : _b.total
10256
+ : 0
10257
+ : (_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 }));
10197
10258
  return [2 /*return*/, {
10198
10259
  header: (res === null || res === void 0 ? void 0 : res.header) || [],
10199
10260
  columns: getColumns(res === null || res === void 0 ? void 0 : res.header),
10200
- dataSource: (_d = res === null || res === void 0 ? void 0 : res.body) === null || _d === void 0 ? void 0 : _d.list,
10261
+ dataSource: (_f = res === null || res === void 0 ? void 0 : res.body) === null || _f === void 0 ? void 0 : _f.list,
10201
10262
  }];
10202
10263
  }
10203
10264
  });
@@ -10271,9 +10332,7 @@ var SenseContentTable = forwardRef(function (props, ref) {
10271
10332
  // rowKey="sense_global_code"
10272
10333
  onRow: onRow,
10273
10334
  // rowClassName={rowClassName}
10274
- onChange: handleChangeTable,
10275
- // rowSelection={rowSelection}
10276
- containerHeight: proTableContainerHeight, scroll: { x: 'max-content', y: null } }, tableProps))),
10335
+ onChange: handleChangeTable }, tableProps))),
10277
10336
  React__default.createElement(ExportModal, null)));
10278
10337
  });
10279
10338
 
@@ -16263,11 +16322,11 @@ var CcosVideoPlayer = function (props) {
16263
16322
  CcosVideoPlayer.settings = settings$1;
16264
16323
 
16265
16324
  try {
16266
- window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.46","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-28 19:48:27"}');
16325
+ window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.0.48","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-29 14:33:52"}');
16267
16326
  }
16268
16327
  catch (err) {
16269
16328
  console.warn(err);
16270
- window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.46","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-28 19:48:27"}';
16329
+ window._ICOS_DESKTOP_VERSION_ = '{"version":"2.0.48","branch":"remotes/origin/release_v2.0.0","buildDate":"2025-04-29 14:33:52"}';
16271
16330
  }
16272
16331
 
16273
16332
  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 };