@icos-desktop/react-components 1.0.0-beta.31 → 1.0.0-beta.32
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 +63 -37
- package/build/index.js +63 -37
- package/build/index.umd.js +63 -37
- package/build/types/components/BookTable/BookTable.d.ts +2 -2
- package/build/types/components/SenseManager/SenseManager.d.ts +2 -2
- package/build/types/components/SenseTable/SenseTable.d.ts +2 -2
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
@@ -2302,7 +2302,7 @@ var preMessage = function preMessage(fn) {
|
|
2302
2302
|
* warning(1 === 2, 'some error'); // print some error
|
2303
2303
|
* ```
|
2304
2304
|
*/
|
2305
|
-
function warning$
|
2305
|
+
function warning$4(valid, message) {
|
2306
2306
|
if (!valid && console !== undefined) {
|
2307
2307
|
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
|
2308
2308
|
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
|
@@ -2336,7 +2336,7 @@ function call(method, valid, message) {
|
|
2336
2336
|
|
2337
2337
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
2338
2338
|
function warningOnce(valid, message) {
|
2339
|
-
call(warning$
|
2339
|
+
call(warning$4, valid, message);
|
2340
2340
|
}
|
2341
2341
|
|
2342
2342
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
@@ -2352,7 +2352,7 @@ function camelCase(input) {
|
|
2352
2352
|
return g.toUpperCase();
|
2353
2353
|
});
|
2354
2354
|
}
|
2355
|
-
function warning$
|
2355
|
+
function warning$3(valid, message) {
|
2356
2356
|
warningOnce(valid, "[@ant-design/icons] ".concat(message));
|
2357
2357
|
}
|
2358
2358
|
function isIconDefinition(target) {
|
@@ -2451,7 +2451,7 @@ var IconBase = function IconBase(props) {
|
|
2451
2451
|
};
|
2452
2452
|
}
|
2453
2453
|
useInsertStyles(svgRef);
|
2454
|
-
warning$
|
2454
|
+
warning$3(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
2455
2455
|
if (!isIconDefinition(icon)) {
|
2456
2456
|
return null;
|
2457
2457
|
}
|
@@ -9208,9 +9208,9 @@ function ResizeObserver$1(props, ref) {
|
|
9208
9208
|
var childNodes = typeof children === 'function' ? [children] : toArray$b(children);
|
9209
9209
|
{
|
9210
9210
|
if (childNodes.length > 1) {
|
9211
|
-
warning$
|
9211
|
+
warning$4(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');
|
9212
9212
|
} else if (childNodes.length === 0) {
|
9213
|
-
warning$
|
9213
|
+
warning$4(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
|
9214
9214
|
}
|
9215
9215
|
}
|
9216
9216
|
return childNodes.map(function (child, index) {
|
@@ -9661,7 +9661,7 @@ var Theme = /*#__PURE__*/function () {
|
|
9661
9661
|
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
|
9662
9662
|
this.id = uuid$6;
|
9663
9663
|
if (derivatives.length === 0) {
|
9664
|
-
warning$
|
9664
|
+
warning$4(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
|
9665
9665
|
}
|
9666
9666
|
uuid$6 += 1;
|
9667
9667
|
}
|
@@ -9874,7 +9874,7 @@ var useCleanupRegister = function useCleanupRegister(deps) {
|
|
9874
9874
|
function register(fn) {
|
9875
9875
|
if (cleanupFlag) {
|
9876
9876
|
{
|
9877
|
-
warning$
|
9877
|
+
warning$4(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
|
9878
9878
|
}
|
9879
9879
|
return;
|
9880
9880
|
}
|
@@ -11543,6 +11543,7 @@ const devUseWarning = component => {
|
|
11543
11543
|
};
|
11544
11544
|
return typeWarning;
|
11545
11545
|
} ;
|
11546
|
+
var warning$2 = warning$1;
|
11546
11547
|
|
11547
11548
|
// ZombieJ: We export single file here since
|
11548
11549
|
// ConfigProvider use this which will make loop deps
|
@@ -12302,7 +12303,7 @@ function registerTheme(globalPrefixCls, theme) {
|
|
12302
12303
|
if (canUseDom()) {
|
12303
12304
|
updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
|
12304
12305
|
} else {
|
12305
|
-
warning$
|
12306
|
+
warning$2(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') ;
|
12306
12307
|
}
|
12307
12308
|
}
|
12308
12309
|
|
@@ -14554,7 +14555,7 @@ var __rest$$ = undefined && undefined.__rest || function (s, e) {
|
|
14554
14555
|
*/
|
14555
14556
|
let existThemeConfig = false;
|
14556
14557
|
const warnContext = componentName => {
|
14557
|
-
warning$
|
14558
|
+
warning$2(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) ;
|
14558
14559
|
} ;
|
14559
14560
|
// These props is used by `useContext` directly in sub component
|
14560
14561
|
const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
|
@@ -14589,7 +14590,7 @@ const setGlobalConfig = props => {
|
|
14589
14590
|
}
|
14590
14591
|
if (theme) {
|
14591
14592
|
if (isLegacyTheme(theme)) {
|
14592
|
-
warning$
|
14593
|
+
warning$2(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') ;
|
14593
14594
|
registerTheme(getGlobalPrefixCls(), theme);
|
14594
14595
|
} else {
|
14595
14596
|
globalTheme = theme;
|
@@ -14921,7 +14922,7 @@ ConfigProvider.config = setGlobalConfig;
|
|
14921
14922
|
ConfigProvider.useConfig = useConfig;
|
14922
14923
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
14923
14924
|
get: () => {
|
14924
|
-
warning$
|
14925
|
+
warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') ;
|
14925
14926
|
return SizeContext;
|
14926
14927
|
}
|
14927
14928
|
});
|
@@ -22050,10 +22051,10 @@ var Dialog = function Dialog(props) {
|
|
22050
22051
|
{
|
22051
22052
|
['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {
|
22052
22053
|
// (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)
|
22053
|
-
warning$
|
22054
|
+
warning$4(!(prop in props), "".concat(prop, " is deprecated, please use styles instead."));
|
22054
22055
|
});
|
22055
22056
|
if ('wrapClassName' in props) {
|
22056
|
-
warning$
|
22057
|
+
warning$4(false, "wrapClassName is deprecated, please use classNames instead.");
|
22057
22058
|
}
|
22058
22059
|
}
|
22059
22060
|
var lastOutSideActiveElementRef = useRef();
|
@@ -27565,7 +27566,7 @@ const ConfirmDialogWrapper = props => {
|
|
27565
27566
|
if (mergedGetContainer === false) {
|
27566
27567
|
mergedGetContainer = undefined;
|
27567
27568
|
{
|
27568
|
-
warning$
|
27569
|
+
warning$2(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') ;
|
27569
27570
|
}
|
27570
27571
|
}
|
27571
27572
|
return /*#__PURE__*/React__default.createElement(ConfirmDialogWrapper$1, Object.assign({}, props, {
|
@@ -27691,7 +27692,7 @@ function modalGlobalConfig(_ref) {
|
|
27691
27692
|
let {
|
27692
27693
|
rootPrefixCls
|
27693
27694
|
} = _ref;
|
27694
|
-
warning$
|
27695
|
+
warning$2(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') ;
|
27695
27696
|
defaultRootPrefixCls = rootPrefixCls;
|
27696
27697
|
}
|
27697
27698
|
|
@@ -29371,7 +29372,7 @@ var Input$4 = function Input(props, ref) {
|
|
29371
29372
|
onOriginCompositionStart = originProps.onCompositionStart,
|
29372
29373
|
onOriginCompositionEnd = originProps.onCompositionEnd,
|
29373
29374
|
style = originProps.style;
|
29374
|
-
warning$
|
29375
|
+
warning$4(!('maxLength' in inputNode.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled.");
|
29375
29376
|
inputNode = /*#__PURE__*/React.cloneElement(inputNode, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
|
29376
29377
|
type: 'search'
|
29377
29378
|
}, originProps), {}, {
|
@@ -30972,7 +30973,7 @@ function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable,
|
|
30972
30973
|
var _targetEle$getRootNod, _popupEle$getRootNode;
|
30973
30974
|
var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);
|
30974
30975
|
var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);
|
30975
|
-
warning$
|
30976
|
+
warning$4(targetRoot === popupRoot, "trigger element and popup element should in same shadow root.");
|
30976
30977
|
}
|
30977
30978
|
return function () {
|
30978
30979
|
win.removeEventListener('pointerdown', onPointerDown, true);
|
@@ -62697,7 +62698,7 @@ function useRange(range) {
|
|
62697
62698
|
minCount = range.minCount,
|
62698
62699
|
maxCount = range.maxCount;
|
62699
62700
|
{
|
62700
|
-
warning$
|
62701
|
+
warning$4(!editable || !draggableTrack, '`editable` can not work with `draggableTrack`.');
|
62701
62702
|
}
|
62702
62703
|
return [true, editable, !editable && draggableTrack, minCount || 0, maxCount];
|
62703
62704
|
}, [range]);
|
@@ -66137,7 +66138,7 @@ Form.useFormInstance = useFormInstance;
|
|
66137
66138
|
Form.useWatch = useWatch$1;
|
66138
66139
|
Form.Provider = FormProvider;
|
66139
66140
|
Form.create = () => {
|
66140
|
-
warning$
|
66141
|
+
warning$2(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') ;
|
66141
66142
|
};
|
66142
66143
|
|
66143
66144
|
/* eslint-disable no-nested-ternary */
|
@@ -66610,7 +66611,7 @@ function useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTra
|
|
66610
66611
|
}
|
66611
66612
|
} catch (error) {
|
66612
66613
|
/* istanbul ignore next */
|
66613
|
-
warning$
|
66614
|
+
warning$4(false, "[rc-image] ".concat(error));
|
66614
66615
|
}
|
66615
66616
|
}
|
66616
66617
|
return function () {
|
@@ -114600,8 +114601,8 @@ var showTotal$1 = function (total) {
|
|
114600
114601
|
total,
|
114601
114602
|
"\u6761")));
|
114602
114603
|
};
|
114603
|
-
var BookTable = function (props) {
|
114604
|
-
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense;
|
114604
|
+
var BookTable = forwardRef(function (props, ref) {
|
114605
|
+
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense, onRefresh = props.onRefresh;
|
114605
114606
|
var showContextMenu = Fe$1({ id: ContextMenu$2.id }).show;
|
114606
114607
|
// 分页
|
114607
114608
|
var _a = useState(__assign$h({}, PAGINATION)), pagination = _a[0], setPagination = _a[1];
|
@@ -114639,7 +114640,12 @@ var BookTable = function (props) {
|
|
114639
114640
|
});
|
114640
114641
|
}); }, {
|
114641
114642
|
refreshDeps: [templateId, JSON.stringify(viewCodes), keyword, JSON.stringify(filter), sorter],
|
114642
|
-
}), loading = _d.loading, data = _d.data;
|
114643
|
+
}), loading = _d.loading, data = _d.data, refresh = _d.refresh;
|
114644
|
+
// 触发刷新
|
114645
|
+
var handleRefresh = function () {
|
114646
|
+
refresh();
|
114647
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
114648
|
+
};
|
114643
114649
|
var onRow = function (record) { return ({
|
114644
114650
|
onClick: function () {
|
114645
114651
|
setHighlightId(record.bookId);
|
@@ -114753,6 +114759,9 @@ var BookTable = function (props) {
|
|
114753
114759
|
ellipsis: true,
|
114754
114760
|
},
|
114755
114761
|
];
|
114762
|
+
useImperativeHandle(ref, function () { return ({
|
114763
|
+
refresh: handleRefresh,
|
114764
|
+
}); });
|
114756
114765
|
return (React__default.createElement("div", { className: styles$B.container },
|
114757
114766
|
React__default.createElement("div", { className: styles$B.table },
|
114758
114767
|
React__default.createElement(ProTable, { header: [
|
@@ -114766,7 +114775,7 @@ var BookTable = function (props) {
|
|
114766
114775
|
{ code: 'regionName', name: '关联地理层级', defaultShow: false },
|
114767
114776
|
], columns: columns, dataSource: data, loading: loading, pagination: pagination, size: "small", rowKey: function (record) { return record.bookId; }, onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
114768
114777
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? React__default.createElement(ContextMenu$2, { config: contextMenuConfig }) : null));
|
114769
|
-
};
|
114778
|
+
});
|
114770
114779
|
|
114771
114780
|
// 基于当前用户权限全量查询政府组织
|
114772
114781
|
function getOrgList(params) {
|
@@ -242418,9 +242427,9 @@ var showTotal = function (total) {
|
|
242418
242427
|
total,
|
242419
242428
|
"\u6761")));
|
242420
242429
|
};
|
242421
|
-
var SenseTable = function (props) {
|
242430
|
+
var SenseTable = forwardRef(function (props, ref) {
|
242422
242431
|
var _a;
|
242423
|
-
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;
|
242432
|
+
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, onRefresh = props.onRefresh;
|
242424
242433
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242425
242434
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242426
242435
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242634,7 +242643,12 @@ var SenseTable = function (props) {
|
|
242634
242643
|
JSON.stringify(filter),
|
242635
242644
|
sorter,
|
242636
242645
|
],
|
242637
|
-
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource;
|
242646
|
+
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource, refresh = _m.refresh;
|
242647
|
+
// 触发刷新
|
242648
|
+
var handleRefresh = function () {
|
242649
|
+
refresh();
|
242650
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
242651
|
+
};
|
242638
242652
|
var onRow = function (record) { return ({
|
242639
242653
|
onClick: function () {
|
242640
242654
|
setHighlightId(record.sense_global_code);
|
@@ -242676,6 +242690,7 @@ var SenseTable = function (props) {
|
|
242676
242690
|
switch (_a.label) {
|
242677
242691
|
case 0: return [4 /*yield*/, deleteSense({ senseGlobalCodes: [record.sense_global_code] }).then(function () {
|
242678
242692
|
message.success('删除成功');
|
242693
|
+
handleRefresh();
|
242679
242694
|
})];
|
242680
242695
|
case 1:
|
242681
242696
|
_a.sent();
|
@@ -242702,6 +242717,9 @@ var SenseTable = function (props) {
|
|
242702
242717
|
setPagination(__assign$h(__assign$h({}, pagination), _pagination));
|
242703
242718
|
setSorter(_sorter);
|
242704
242719
|
};
|
242720
|
+
useImperativeHandle(ref, function () { return ({
|
242721
|
+
refresh: handleRefresh,
|
242722
|
+
}); });
|
242705
242723
|
return (React__default.createElement("div", { className: styles$a.container },
|
242706
242724
|
React__default.createElement("div", { className: classNames(styles$a.table, (_a = {},
|
242707
242725
|
_a[styles$a['hidden-row-selected-num']] = !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length),
|
@@ -242709,7 +242727,7 @@ var SenseTable = function (props) {
|
|
242709
242727
|
React__default.createElement(ProTable, { header: header, columns: columns, dataSource: dataSource, loading: loading, pagination: pagination, size: "small", rowKey: "sense_global_code", onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
242710
242728
|
React__default.createElement(TagsModal, { open: showTagsModal, onCancel: handleCloseTagsModal, data: curRecord }),
|
242711
242729
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? (React__default.createElement(ContextMenu$1, { config: contextMenuConfig, authTypes: authTypes })) : null));
|
242712
|
-
};
|
242730
|
+
});
|
242713
242731
|
|
242714
242732
|
// 日期范围选择器表单格式转换
|
242715
242733
|
var getRangePickerConversion = function (format) {
|
@@ -243009,9 +243027,13 @@ var css_248z$7 = ".SenseManager-module_container__PpQ0P {\n display: flex;\n w
|
|
243009
243027
|
var styles$7 = {"container":"SenseManager-module_container__PpQ0P","main":"SenseManager-module_main__bwIz-","header":"SenseManager-module_header__ZY2W-","breadcrumb":"SenseManager-module_breadcrumb__TDY-G","full":"SenseManager-module_full__qAuqZ","tabs":"SenseManager-module_tabs__WZOwj","filter":"SenseManager-module_filter__uFxyQ"};
|
243010
243028
|
styleInject(css_248z$7);
|
243011
243029
|
|
243012
|
-
var SenseManager = function (props) {
|
243030
|
+
var SenseManager = forwardRef(function (props, ref) {
|
243013
243031
|
var _a;
|
243014
243032
|
var _b = props.viewType, viewType = _b === void 0 ? 'system' : _b, _c = props.views, views = _c === void 0 ? [] : _c, showBookGroupTable = props.showBookGroupTable, showBookTable = props.showBookTable, showSenseTable = props.showSenseTable, bookContextMenuConfig = props.bookContextMenuConfig, senseContextMenuConfig = props.senseContextMenuConfig, enableTag = props.enableTag, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, onCreateSense = props.onCreateSense, onShowSense = props.onShowSense, onEditSense = props.onEditSense, onClickSense = props.onClickSense, onDoubleClickSense = props.onDoubleClickSense;
|
243033
|
+
// 台账表格 ref
|
243034
|
+
var bookTableRef = useRef();
|
243035
|
+
// 实体记录表格 ref
|
243036
|
+
var senseTableRef = useRef();
|
243015
243037
|
// 当前选中的分类
|
243016
243038
|
var _d = useState(''), activeCategory = _d[0], setActiveCategory = _d[1];
|
243017
243039
|
// Tabs 选中的 key
|
@@ -243030,7 +243052,7 @@ var SenseManager = function (props) {
|
|
243030
243052
|
var _m = useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
243031
243053
|
// 显示 Tabs
|
243032
243054
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
243033
|
-
var
|
243055
|
+
var _o = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
243034
243056
|
var res;
|
243035
243057
|
return __generator$2(this, function (_a) {
|
243036
243058
|
switch (_a.label) {
|
@@ -243048,7 +243070,7 @@ var SenseManager = function (props) {
|
|
243048
243070
|
}); }, {
|
243049
243071
|
ready: !!showTabs,
|
243050
243072
|
refreshDeps: [showTabs],
|
243051
|
-
}).data;
|
243073
|
+
}), tabItems = _o.data, refreshTabItems = _o.refresh;
|
243052
243074
|
// 设置选中的分类
|
243053
243075
|
var handleChangeActiveCategory = function (key) {
|
243054
243076
|
setTabsActiveKey('book');
|
@@ -243060,7 +243082,7 @@ var SenseManager = function (props) {
|
|
243060
243082
|
setActiveCategory(key);
|
243061
243083
|
};
|
243062
243084
|
// 面包屑, 当前页面名称
|
243063
|
-
var
|
243085
|
+
var _p = useMemo$1(function () {
|
243064
243086
|
var _a;
|
243065
243087
|
var list = [];
|
243066
243088
|
// 视图
|
@@ -243108,7 +243130,7 @@ var SenseManager = function (props) {
|
|
243108
243130
|
}
|
243109
243131
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243110
243132
|
return [list, name];
|
243111
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243133
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _p[0], currentName = _p[1];
|
243112
243134
|
// 台账组
|
243113
243135
|
var renderBookGroup = function () {
|
243114
243136
|
return (React__default.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243121,7 +243143,7 @@ var SenseManager = function (props) {
|
|
243121
243143
|
};
|
243122
243144
|
// 台账
|
243123
243145
|
var renderBook = function (templateId) {
|
243124
|
-
return (React__default.createElement(BookTable, { viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243146
|
+
return (React__default.createElement(BookTable, { ref: bookTableRef, viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243125
243147
|
if (showSenseTable) {
|
243126
243148
|
setTabsActiveKey('book');
|
243127
243149
|
setKeywordValue('');
|
@@ -243133,7 +243155,7 @@ var SenseManager = function (props) {
|
|
243133
243155
|
};
|
243134
243156
|
// 实体记录
|
243135
243157
|
var renderSense = function (templateId, bookId) {
|
243136
|
-
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 }));
|
243158
|
+
return (React__default.createElement(SenseTable, { ref: senseTableRef, 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, onRefresh: refreshTabItems }));
|
243137
243159
|
};
|
243138
243160
|
// 渲染内容
|
243139
243161
|
var renderMain = function () {
|
@@ -243186,6 +243208,10 @@ var SenseManager = function (props) {
|
|
243186
243208
|
}
|
243187
243209
|
});
|
243188
243210
|
}); }, [activeCategory, tabsActiveKey, bookGroup, book]);
|
243211
|
+
useImperativeHandle(ref, function () { return ({
|
243212
|
+
refreshBookTable: function () { var _a; return (_a = bookTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243213
|
+
refreshSenseTable: function () { var _a; return (_a = senseTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243214
|
+
}); });
|
243189
243215
|
return (React__default.createElement("div", { className: styles$7.container },
|
243190
243216
|
React__default.createElement(SideBar, { viewType: viewType, views: views, activeCategory: activeCategory, onChange: handleChangeActiveCategory }),
|
243191
243217
|
React__default.createElement("div", { className: styles$7.main },
|
@@ -243210,7 +243236,7 @@ var SenseManager = function (props) {
|
|
243210
243236
|
setKeyword(v);
|
243211
243237
|
}, placeholder: currentName ? "\u5728\u201C".concat(currentName, "\u201D\u4E2D\u641C\u7D22") : '请输入关键词搜索' }))),
|
243212
243238
|
activeCategory ? renderMain() : null)));
|
243213
|
-
};
|
243239
|
+
});
|
243214
243240
|
|
243215
243241
|
var settings$8 = {
|
243216
243242
|
name: 'CcosSenseManager',
|
package/build/index.js
CHANGED
@@ -2322,7 +2322,7 @@ var preMessage = function preMessage(fn) {
|
|
2322
2322
|
* warning(1 === 2, 'some error'); // print some error
|
2323
2323
|
* ```
|
2324
2324
|
*/
|
2325
|
-
function warning$
|
2325
|
+
function warning$4(valid, message) {
|
2326
2326
|
if (!valid && console !== undefined) {
|
2327
2327
|
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
|
2328
2328
|
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
|
@@ -2356,7 +2356,7 @@ function call(method, valid, message) {
|
|
2356
2356
|
|
2357
2357
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
2358
2358
|
function warningOnce(valid, message) {
|
2359
|
-
call(warning$
|
2359
|
+
call(warning$4, valid, message);
|
2360
2360
|
}
|
2361
2361
|
|
2362
2362
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
@@ -2372,7 +2372,7 @@ function camelCase(input) {
|
|
2372
2372
|
return g.toUpperCase();
|
2373
2373
|
});
|
2374
2374
|
}
|
2375
|
-
function warning$
|
2375
|
+
function warning$3(valid, message) {
|
2376
2376
|
warningOnce(valid, "[@ant-design/icons] ".concat(message));
|
2377
2377
|
}
|
2378
2378
|
function isIconDefinition(target) {
|
@@ -2471,7 +2471,7 @@ var IconBase = function IconBase(props) {
|
|
2471
2471
|
};
|
2472
2472
|
}
|
2473
2473
|
useInsertStyles(svgRef);
|
2474
|
-
warning$
|
2474
|
+
warning$3(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
2475
2475
|
if (!isIconDefinition(icon)) {
|
2476
2476
|
return null;
|
2477
2477
|
}
|
@@ -9228,9 +9228,9 @@ function ResizeObserver$1(props, ref) {
|
|
9228
9228
|
var childNodes = typeof children === 'function' ? [children] : toArray$b(children);
|
9229
9229
|
{
|
9230
9230
|
if (childNodes.length > 1) {
|
9231
|
-
warning$
|
9231
|
+
warning$4(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');
|
9232
9232
|
} else if (childNodes.length === 0) {
|
9233
|
-
warning$
|
9233
|
+
warning$4(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
|
9234
9234
|
}
|
9235
9235
|
}
|
9236
9236
|
return childNodes.map(function (child, index) {
|
@@ -9681,7 +9681,7 @@ var Theme = /*#__PURE__*/function () {
|
|
9681
9681
|
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
|
9682
9682
|
this.id = uuid$6;
|
9683
9683
|
if (derivatives.length === 0) {
|
9684
|
-
warning$
|
9684
|
+
warning$4(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
|
9685
9685
|
}
|
9686
9686
|
uuid$6 += 1;
|
9687
9687
|
}
|
@@ -9894,7 +9894,7 @@ var useCleanupRegister = function useCleanupRegister(deps) {
|
|
9894
9894
|
function register(fn) {
|
9895
9895
|
if (cleanupFlag) {
|
9896
9896
|
{
|
9897
|
-
warning$
|
9897
|
+
warning$4(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
|
9898
9898
|
}
|
9899
9899
|
return;
|
9900
9900
|
}
|
@@ -11563,6 +11563,7 @@ const devUseWarning = component => {
|
|
11563
11563
|
};
|
11564
11564
|
return typeWarning;
|
11565
11565
|
} ;
|
11566
|
+
var warning$2 = warning$1;
|
11566
11567
|
|
11567
11568
|
// ZombieJ: We export single file here since
|
11568
11569
|
// ConfigProvider use this which will make loop deps
|
@@ -12322,7 +12323,7 @@ function registerTheme(globalPrefixCls, theme) {
|
|
12322
12323
|
if (canUseDom()) {
|
12323
12324
|
updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
|
12324
12325
|
} else {
|
12325
|
-
warning$
|
12326
|
+
warning$2(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') ;
|
12326
12327
|
}
|
12327
12328
|
}
|
12328
12329
|
|
@@ -14574,7 +14575,7 @@ var __rest$$ = undefined && undefined.__rest || function (s, e) {
|
|
14574
14575
|
*/
|
14575
14576
|
let existThemeConfig = false;
|
14576
14577
|
const warnContext = componentName => {
|
14577
|
-
warning$
|
14578
|
+
warning$2(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) ;
|
14578
14579
|
} ;
|
14579
14580
|
// These props is used by `useContext` directly in sub component
|
14580
14581
|
const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
|
@@ -14609,7 +14610,7 @@ const setGlobalConfig = props => {
|
|
14609
14610
|
}
|
14610
14611
|
if (theme) {
|
14611
14612
|
if (isLegacyTheme(theme)) {
|
14612
|
-
warning$
|
14613
|
+
warning$2(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') ;
|
14613
14614
|
registerTheme(getGlobalPrefixCls(), theme);
|
14614
14615
|
} else {
|
14615
14616
|
globalTheme = theme;
|
@@ -14941,7 +14942,7 @@ ConfigProvider.config = setGlobalConfig;
|
|
14941
14942
|
ConfigProvider.useConfig = useConfig;
|
14942
14943
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
14943
14944
|
get: () => {
|
14944
|
-
warning$
|
14945
|
+
warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') ;
|
14945
14946
|
return SizeContext;
|
14946
14947
|
}
|
14947
14948
|
});
|
@@ -22070,10 +22071,10 @@ var Dialog = function Dialog(props) {
|
|
22070
22071
|
{
|
22071
22072
|
['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {
|
22072
22073
|
// (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)
|
22073
|
-
warning$
|
22074
|
+
warning$4(!(prop in props), "".concat(prop, " is deprecated, please use styles instead."));
|
22074
22075
|
});
|
22075
22076
|
if ('wrapClassName' in props) {
|
22076
|
-
warning$
|
22077
|
+
warning$4(false, "wrapClassName is deprecated, please use classNames instead.");
|
22077
22078
|
}
|
22078
22079
|
}
|
22079
22080
|
var lastOutSideActiveElementRef = React.useRef();
|
@@ -27585,7 +27586,7 @@ const ConfirmDialogWrapper = props => {
|
|
27585
27586
|
if (mergedGetContainer === false) {
|
27586
27587
|
mergedGetContainer = undefined;
|
27587
27588
|
{
|
27588
|
-
warning$
|
27589
|
+
warning$2(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') ;
|
27589
27590
|
}
|
27590
27591
|
}
|
27591
27592
|
return /*#__PURE__*/React.createElement(ConfirmDialogWrapper$1, Object.assign({}, props, {
|
@@ -27711,7 +27712,7 @@ function modalGlobalConfig(_ref) {
|
|
27711
27712
|
let {
|
27712
27713
|
rootPrefixCls
|
27713
27714
|
} = _ref;
|
27714
|
-
warning$
|
27715
|
+
warning$2(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') ;
|
27715
27716
|
defaultRootPrefixCls = rootPrefixCls;
|
27716
27717
|
}
|
27717
27718
|
|
@@ -29391,7 +29392,7 @@ var Input$4 = function Input(props, ref) {
|
|
29391
29392
|
onOriginCompositionStart = originProps.onCompositionStart,
|
29392
29393
|
onOriginCompositionEnd = originProps.onCompositionEnd,
|
29393
29394
|
style = originProps.style;
|
29394
|
-
warning$
|
29395
|
+
warning$4(!('maxLength' in inputNode.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled.");
|
29395
29396
|
inputNode = /*#__PURE__*/React__namespace.cloneElement(inputNode, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
|
29396
29397
|
type: 'search'
|
29397
29398
|
}, originProps), {}, {
|
@@ -30992,7 +30993,7 @@ function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable,
|
|
30992
30993
|
var _targetEle$getRootNod, _popupEle$getRootNode;
|
30993
30994
|
var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);
|
30994
30995
|
var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);
|
30995
|
-
warning$
|
30996
|
+
warning$4(targetRoot === popupRoot, "trigger element and popup element should in same shadow root.");
|
30996
30997
|
}
|
30997
30998
|
return function () {
|
30998
30999
|
win.removeEventListener('pointerdown', onPointerDown, true);
|
@@ -62717,7 +62718,7 @@ function useRange(range) {
|
|
62717
62718
|
minCount = range.minCount,
|
62718
62719
|
maxCount = range.maxCount;
|
62719
62720
|
{
|
62720
|
-
warning$
|
62721
|
+
warning$4(!editable || !draggableTrack, '`editable` can not work with `draggableTrack`.');
|
62721
62722
|
}
|
62722
62723
|
return [true, editable, !editable && draggableTrack, minCount || 0, maxCount];
|
62723
62724
|
}, [range]);
|
@@ -66157,7 +66158,7 @@ Form.useFormInstance = useFormInstance;
|
|
66157
66158
|
Form.useWatch = useWatch$1;
|
66158
66159
|
Form.Provider = FormProvider;
|
66159
66160
|
Form.create = () => {
|
66160
|
-
warning$
|
66161
|
+
warning$2(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') ;
|
66161
66162
|
};
|
66162
66163
|
|
66163
66164
|
/* eslint-disable no-nested-ternary */
|
@@ -66630,7 +66631,7 @@ function useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTra
|
|
66630
66631
|
}
|
66631
66632
|
} catch (error) {
|
66632
66633
|
/* istanbul ignore next */
|
66633
|
-
warning$
|
66634
|
+
warning$4(false, "[rc-image] ".concat(error));
|
66634
66635
|
}
|
66635
66636
|
}
|
66636
66637
|
return function () {
|
@@ -114620,8 +114621,8 @@ var showTotal$1 = function (total) {
|
|
114620
114621
|
total,
|
114621
114622
|
"\u6761")));
|
114622
114623
|
};
|
114623
|
-
var BookTable = function (props) {
|
114624
|
-
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense;
|
114624
|
+
var BookTable = React.forwardRef(function (props, ref) {
|
114625
|
+
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense, onRefresh = props.onRefresh;
|
114625
114626
|
var showContextMenu = Fe$1({ id: ContextMenu$2.id }).show;
|
114626
114627
|
// 分页
|
114627
114628
|
var _a = React.useState(__assign$h({}, PAGINATION)), pagination = _a[0], setPagination = _a[1];
|
@@ -114659,7 +114660,12 @@ var BookTable = function (props) {
|
|
114659
114660
|
});
|
114660
114661
|
}); }, {
|
114661
114662
|
refreshDeps: [templateId, JSON.stringify(viewCodes), keyword, JSON.stringify(filter), sorter],
|
114662
|
-
}), loading = _d.loading, data = _d.data;
|
114663
|
+
}), loading = _d.loading, data = _d.data, refresh = _d.refresh;
|
114664
|
+
// 触发刷新
|
114665
|
+
var handleRefresh = function () {
|
114666
|
+
refresh();
|
114667
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
114668
|
+
};
|
114663
114669
|
var onRow = function (record) { return ({
|
114664
114670
|
onClick: function () {
|
114665
114671
|
setHighlightId(record.bookId);
|
@@ -114773,6 +114779,9 @@ var BookTable = function (props) {
|
|
114773
114779
|
ellipsis: true,
|
114774
114780
|
},
|
114775
114781
|
];
|
114782
|
+
React.useImperativeHandle(ref, function () { return ({
|
114783
|
+
refresh: handleRefresh,
|
114784
|
+
}); });
|
114776
114785
|
return (React.createElement("div", { className: styles$B.container },
|
114777
114786
|
React.createElement("div", { className: styles$B.table },
|
114778
114787
|
React.createElement(ProTable, { header: [
|
@@ -114786,7 +114795,7 @@ var BookTable = function (props) {
|
|
114786
114795
|
{ code: 'regionName', name: '关联地理层级', defaultShow: false },
|
114787
114796
|
], columns: columns, dataSource: data, loading: loading, pagination: pagination, size: "small", rowKey: function (record) { return record.bookId; }, onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
114788
114797
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? React.createElement(ContextMenu$2, { config: contextMenuConfig }) : null));
|
114789
|
-
};
|
114798
|
+
});
|
114790
114799
|
|
114791
114800
|
// 基于当前用户权限全量查询政府组织
|
114792
114801
|
function getOrgList(params) {
|
@@ -242438,9 +242447,9 @@ var showTotal = function (total) {
|
|
242438
242447
|
total,
|
242439
242448
|
"\u6761")));
|
242440
242449
|
};
|
242441
|
-
var SenseTable = function (props) {
|
242450
|
+
var SenseTable = React.forwardRef(function (props, ref) {
|
242442
242451
|
var _a;
|
242443
|
-
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;
|
242452
|
+
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, onRefresh = props.onRefresh;
|
242444
242453
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242445
242454
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242446
242455
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242654,7 +242663,12 @@ var SenseTable = function (props) {
|
|
242654
242663
|
JSON.stringify(filter),
|
242655
242664
|
sorter,
|
242656
242665
|
],
|
242657
|
-
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource;
|
242666
|
+
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource, refresh = _m.refresh;
|
242667
|
+
// 触发刷新
|
242668
|
+
var handleRefresh = function () {
|
242669
|
+
refresh();
|
242670
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
242671
|
+
};
|
242658
242672
|
var onRow = function (record) { return ({
|
242659
242673
|
onClick: function () {
|
242660
242674
|
setHighlightId(record.sense_global_code);
|
@@ -242696,6 +242710,7 @@ var SenseTable = function (props) {
|
|
242696
242710
|
switch (_a.label) {
|
242697
242711
|
case 0: return [4 /*yield*/, deleteSense({ senseGlobalCodes: [record.sense_global_code] }).then(function () {
|
242698
242712
|
message.success('删除成功');
|
242713
|
+
handleRefresh();
|
242699
242714
|
})];
|
242700
242715
|
case 1:
|
242701
242716
|
_a.sent();
|
@@ -242722,6 +242737,9 @@ var SenseTable = function (props) {
|
|
242722
242737
|
setPagination(__assign$h(__assign$h({}, pagination), _pagination));
|
242723
242738
|
setSorter(_sorter);
|
242724
242739
|
};
|
242740
|
+
React.useImperativeHandle(ref, function () { return ({
|
242741
|
+
refresh: handleRefresh,
|
242742
|
+
}); });
|
242725
242743
|
return (React.createElement("div", { className: styles$a.container },
|
242726
242744
|
React.createElement("div", { className: classNames(styles$a.table, (_a = {},
|
242727
242745
|
_a[styles$a['hidden-row-selected-num']] = !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length),
|
@@ -242729,7 +242747,7 @@ var SenseTable = function (props) {
|
|
242729
242747
|
React.createElement(ProTable, { header: header, columns: columns, dataSource: dataSource, loading: loading, pagination: pagination, size: "small", rowKey: "sense_global_code", onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
242730
242748
|
React.createElement(TagsModal, { open: showTagsModal, onCancel: handleCloseTagsModal, data: curRecord }),
|
242731
242749
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? (React.createElement(ContextMenu$1, { config: contextMenuConfig, authTypes: authTypes })) : null));
|
242732
|
-
};
|
242750
|
+
});
|
242733
242751
|
|
242734
242752
|
// 日期范围选择器表单格式转换
|
242735
242753
|
var getRangePickerConversion = function (format) {
|
@@ -243029,9 +243047,13 @@ var css_248z$7 = ".SenseManager-module_container__PpQ0P {\n display: flex;\n w
|
|
243029
243047
|
var styles$7 = {"container":"SenseManager-module_container__PpQ0P","main":"SenseManager-module_main__bwIz-","header":"SenseManager-module_header__ZY2W-","breadcrumb":"SenseManager-module_breadcrumb__TDY-G","full":"SenseManager-module_full__qAuqZ","tabs":"SenseManager-module_tabs__WZOwj","filter":"SenseManager-module_filter__uFxyQ"};
|
243030
243048
|
styleInject(css_248z$7);
|
243031
243049
|
|
243032
|
-
var SenseManager = function (props) {
|
243050
|
+
var SenseManager = React.forwardRef(function (props, ref) {
|
243033
243051
|
var _a;
|
243034
243052
|
var _b = props.viewType, viewType = _b === void 0 ? 'system' : _b, _c = props.views, views = _c === void 0 ? [] : _c, showBookGroupTable = props.showBookGroupTable, showBookTable = props.showBookTable, showSenseTable = props.showSenseTable, bookContextMenuConfig = props.bookContextMenuConfig, senseContextMenuConfig = props.senseContextMenuConfig, enableTag = props.enableTag, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, onCreateSense = props.onCreateSense, onShowSense = props.onShowSense, onEditSense = props.onEditSense, onClickSense = props.onClickSense, onDoubleClickSense = props.onDoubleClickSense;
|
243053
|
+
// 台账表格 ref
|
243054
|
+
var bookTableRef = React.useRef();
|
243055
|
+
// 实体记录表格 ref
|
243056
|
+
var senseTableRef = React.useRef();
|
243035
243057
|
// 当前选中的分类
|
243036
243058
|
var _d = React.useState(''), activeCategory = _d[0], setActiveCategory = _d[1];
|
243037
243059
|
// Tabs 选中的 key
|
@@ -243050,7 +243072,7 @@ var SenseManager = function (props) {
|
|
243050
243072
|
var _m = React.useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
243051
243073
|
// 显示 Tabs
|
243052
243074
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
243053
|
-
var
|
243075
|
+
var _o = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
243054
243076
|
var res;
|
243055
243077
|
return __generator$2(this, function (_a) {
|
243056
243078
|
switch (_a.label) {
|
@@ -243068,7 +243090,7 @@ var SenseManager = function (props) {
|
|
243068
243090
|
}); }, {
|
243069
243091
|
ready: !!showTabs,
|
243070
243092
|
refreshDeps: [showTabs],
|
243071
|
-
}).data;
|
243093
|
+
}), tabItems = _o.data, refreshTabItems = _o.refresh;
|
243072
243094
|
// 设置选中的分类
|
243073
243095
|
var handleChangeActiveCategory = function (key) {
|
243074
243096
|
setTabsActiveKey('book');
|
@@ -243080,7 +243102,7 @@ var SenseManager = function (props) {
|
|
243080
243102
|
setActiveCategory(key);
|
243081
243103
|
};
|
243082
243104
|
// 面包屑, 当前页面名称
|
243083
|
-
var
|
243105
|
+
var _p = React.useMemo(function () {
|
243084
243106
|
var _a;
|
243085
243107
|
var list = [];
|
243086
243108
|
// 视图
|
@@ -243128,7 +243150,7 @@ var SenseManager = function (props) {
|
|
243128
243150
|
}
|
243129
243151
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243130
243152
|
return [list, name];
|
243131
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243153
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _p[0], currentName = _p[1];
|
243132
243154
|
// 台账组
|
243133
243155
|
var renderBookGroup = function () {
|
243134
243156
|
return (React.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243141,7 +243163,7 @@ var SenseManager = function (props) {
|
|
243141
243163
|
};
|
243142
243164
|
// 台账
|
243143
243165
|
var renderBook = function (templateId) {
|
243144
|
-
return (React.createElement(BookTable, { viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243166
|
+
return (React.createElement(BookTable, { ref: bookTableRef, viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243145
243167
|
if (showSenseTable) {
|
243146
243168
|
setTabsActiveKey('book');
|
243147
243169
|
setKeywordValue('');
|
@@ -243153,7 +243175,7 @@ var SenseManager = function (props) {
|
|
243153
243175
|
};
|
243154
243176
|
// 实体记录
|
243155
243177
|
var renderSense = function (templateId, bookId) {
|
243156
|
-
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 }));
|
243178
|
+
return (React.createElement(SenseTable, { ref: senseTableRef, 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, onRefresh: refreshTabItems }));
|
243157
243179
|
};
|
243158
243180
|
// 渲染内容
|
243159
243181
|
var renderMain = function () {
|
@@ -243206,6 +243228,10 @@ var SenseManager = function (props) {
|
|
243206
243228
|
}
|
243207
243229
|
});
|
243208
243230
|
}); }, [activeCategory, tabsActiveKey, bookGroup, book]);
|
243231
|
+
React.useImperativeHandle(ref, function () { return ({
|
243232
|
+
refreshBookTable: function () { var _a; return (_a = bookTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243233
|
+
refreshSenseTable: function () { var _a; return (_a = senseTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243234
|
+
}); });
|
243209
243235
|
return (React.createElement("div", { className: styles$7.container },
|
243210
243236
|
React.createElement(SideBar, { viewType: viewType, views: views, activeCategory: activeCategory, onChange: handleChangeActiveCategory }),
|
243211
243237
|
React.createElement("div", { className: styles$7.main },
|
@@ -243230,7 +243256,7 @@ var SenseManager = function (props) {
|
|
243230
243256
|
setKeyword(v);
|
243231
243257
|
}, placeholder: currentName ? "\u5728\u201C".concat(currentName, "\u201D\u4E2D\u641C\u7D22") : '请输入关键词搜索' }))),
|
243232
243258
|
activeCategory ? renderMain() : null)));
|
243233
|
-
};
|
243259
|
+
});
|
243234
243260
|
|
243235
243261
|
var settings$8 = {
|
243236
243262
|
name: 'CcosSenseManager',
|
package/build/index.umd.js
CHANGED
@@ -2323,7 +2323,7 @@
|
|
2323
2323
|
* warning(1 === 2, 'some error'); // print some error
|
2324
2324
|
* ```
|
2325
2325
|
*/
|
2326
|
-
function warning$
|
2326
|
+
function warning$4(valid, message) {
|
2327
2327
|
if (!valid && console !== undefined) {
|
2328
2328
|
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
|
2329
2329
|
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
|
@@ -2357,7 +2357,7 @@
|
|
2357
2357
|
|
2358
2358
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
2359
2359
|
function warningOnce(valid, message) {
|
2360
|
-
call(warning$
|
2360
|
+
call(warning$4, valid, message);
|
2361
2361
|
}
|
2362
2362
|
|
2363
2363
|
/** @see Same as {@link warning}, but only warn once for the same message */
|
@@ -2373,7 +2373,7 @@
|
|
2373
2373
|
return g.toUpperCase();
|
2374
2374
|
});
|
2375
2375
|
}
|
2376
|
-
function warning$
|
2376
|
+
function warning$3(valid, message) {
|
2377
2377
|
warningOnce(valid, "[@ant-design/icons] ".concat(message));
|
2378
2378
|
}
|
2379
2379
|
function isIconDefinition(target) {
|
@@ -2472,7 +2472,7 @@
|
|
2472
2472
|
};
|
2473
2473
|
}
|
2474
2474
|
useInsertStyles(svgRef);
|
2475
|
-
warning$
|
2475
|
+
warning$3(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
2476
2476
|
if (!isIconDefinition(icon)) {
|
2477
2477
|
return null;
|
2478
2478
|
}
|
@@ -9229,9 +9229,9 @@
|
|
9229
9229
|
var childNodes = typeof children === 'function' ? [children] : toArray$b(children);
|
9230
9230
|
{
|
9231
9231
|
if (childNodes.length > 1) {
|
9232
|
-
warning$
|
9232
|
+
warning$4(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');
|
9233
9233
|
} else if (childNodes.length === 0) {
|
9234
|
-
warning$
|
9234
|
+
warning$4(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
|
9235
9235
|
}
|
9236
9236
|
}
|
9237
9237
|
return childNodes.map(function (child, index) {
|
@@ -9682,7 +9682,7 @@
|
|
9682
9682
|
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
|
9683
9683
|
this.id = uuid$6;
|
9684
9684
|
if (derivatives.length === 0) {
|
9685
|
-
warning$
|
9685
|
+
warning$4(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
|
9686
9686
|
}
|
9687
9687
|
uuid$6 += 1;
|
9688
9688
|
}
|
@@ -9895,7 +9895,7 @@
|
|
9895
9895
|
function register(fn) {
|
9896
9896
|
if (cleanupFlag) {
|
9897
9897
|
{
|
9898
|
-
warning$
|
9898
|
+
warning$4(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
|
9899
9899
|
}
|
9900
9900
|
return;
|
9901
9901
|
}
|
@@ -11564,6 +11564,7 @@
|
|
11564
11564
|
};
|
11565
11565
|
return typeWarning;
|
11566
11566
|
} ;
|
11567
|
+
var warning$2 = warning$1;
|
11567
11568
|
|
11568
11569
|
// ZombieJ: We export single file here since
|
11569
11570
|
// ConfigProvider use this which will make loop deps
|
@@ -12323,7 +12324,7 @@
|
|
12323
12324
|
if (canUseDom()) {
|
12324
12325
|
updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
|
12325
12326
|
} else {
|
12326
|
-
warning$
|
12327
|
+
warning$2(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') ;
|
12327
12328
|
}
|
12328
12329
|
}
|
12329
12330
|
|
@@ -14575,7 +14576,7 @@
|
|
14575
14576
|
*/
|
14576
14577
|
let existThemeConfig = false;
|
14577
14578
|
const warnContext = componentName => {
|
14578
|
-
warning$
|
14579
|
+
warning$2(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) ;
|
14579
14580
|
} ;
|
14580
14581
|
// These props is used by `useContext` directly in sub component
|
14581
14582
|
const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
|
@@ -14610,7 +14611,7 @@
|
|
14610
14611
|
}
|
14611
14612
|
if (theme) {
|
14612
14613
|
if (isLegacyTheme(theme)) {
|
14613
|
-
warning$
|
14614
|
+
warning$2(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') ;
|
14614
14615
|
registerTheme(getGlobalPrefixCls(), theme);
|
14615
14616
|
} else {
|
14616
14617
|
globalTheme = theme;
|
@@ -14942,7 +14943,7 @@
|
|
14942
14943
|
ConfigProvider.useConfig = useConfig;
|
14943
14944
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
14944
14945
|
get: () => {
|
14945
|
-
warning$
|
14946
|
+
warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') ;
|
14946
14947
|
return SizeContext;
|
14947
14948
|
}
|
14948
14949
|
});
|
@@ -22071,10 +22072,10 @@
|
|
22071
22072
|
{
|
22072
22073
|
['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {
|
22073
22074
|
// (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)
|
22074
|
-
warning$
|
22075
|
+
warning$4(!(prop in props), "".concat(prop, " is deprecated, please use styles instead."));
|
22075
22076
|
});
|
22076
22077
|
if ('wrapClassName' in props) {
|
22077
|
-
warning$
|
22078
|
+
warning$4(false, "wrapClassName is deprecated, please use classNames instead.");
|
22078
22079
|
}
|
22079
22080
|
}
|
22080
22081
|
var lastOutSideActiveElementRef = React.useRef();
|
@@ -27586,7 +27587,7 @@
|
|
27586
27587
|
if (mergedGetContainer === false) {
|
27587
27588
|
mergedGetContainer = undefined;
|
27588
27589
|
{
|
27589
|
-
warning$
|
27590
|
+
warning$2(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') ;
|
27590
27591
|
}
|
27591
27592
|
}
|
27592
27593
|
return /*#__PURE__*/React.createElement(ConfirmDialogWrapper$1, Object.assign({}, props, {
|
@@ -27712,7 +27713,7 @@
|
|
27712
27713
|
let {
|
27713
27714
|
rootPrefixCls
|
27714
27715
|
} = _ref;
|
27715
|
-
warning$
|
27716
|
+
warning$2(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') ;
|
27716
27717
|
defaultRootPrefixCls = rootPrefixCls;
|
27717
27718
|
}
|
27718
27719
|
|
@@ -29392,7 +29393,7 @@
|
|
29392
29393
|
onOriginCompositionStart = originProps.onCompositionStart,
|
29393
29394
|
onOriginCompositionEnd = originProps.onCompositionEnd,
|
29394
29395
|
style = originProps.style;
|
29395
|
-
warning$
|
29396
|
+
warning$4(!('maxLength' in inputNode.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled.");
|
29396
29397
|
inputNode = /*#__PURE__*/React__namespace.cloneElement(inputNode, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
|
29397
29398
|
type: 'search'
|
29398
29399
|
}, originProps), {}, {
|
@@ -30993,7 +30994,7 @@
|
|
30993
30994
|
var _targetEle$getRootNod, _popupEle$getRootNode;
|
30994
30995
|
var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);
|
30995
30996
|
var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);
|
30996
|
-
warning$
|
30997
|
+
warning$4(targetRoot === popupRoot, "trigger element and popup element should in same shadow root.");
|
30997
30998
|
}
|
30998
30999
|
return function () {
|
30999
31000
|
win.removeEventListener('pointerdown', onPointerDown, true);
|
@@ -62718,7 +62719,7 @@
|
|
62718
62719
|
minCount = range.minCount,
|
62719
62720
|
maxCount = range.maxCount;
|
62720
62721
|
{
|
62721
|
-
warning$
|
62722
|
+
warning$4(!editable || !draggableTrack, '`editable` can not work with `draggableTrack`.');
|
62722
62723
|
}
|
62723
62724
|
return [true, editable, !editable && draggableTrack, minCount || 0, maxCount];
|
62724
62725
|
}, [range]);
|
@@ -66158,7 +66159,7 @@
|
|
66158
66159
|
Form.useWatch = useWatch$1;
|
66159
66160
|
Form.Provider = FormProvider;
|
66160
66161
|
Form.create = () => {
|
66161
|
-
warning$
|
66162
|
+
warning$2(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') ;
|
66162
66163
|
};
|
66163
66164
|
|
66164
66165
|
/* eslint-disable no-nested-ternary */
|
@@ -66631,7 +66632,7 @@
|
|
66631
66632
|
}
|
66632
66633
|
} catch (error) {
|
66633
66634
|
/* istanbul ignore next */
|
66634
|
-
warning$
|
66635
|
+
warning$4(false, "[rc-image] ".concat(error));
|
66635
66636
|
}
|
66636
66637
|
}
|
66637
66638
|
return function () {
|
@@ -114621,8 +114622,8 @@
|
|
114621
114622
|
total,
|
114622
114623
|
"\u6761")));
|
114623
114624
|
};
|
114624
|
-
var BookTable = function (props) {
|
114625
|
-
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense;
|
114625
|
+
var BookTable = React.forwardRef(function (props, ref) {
|
114626
|
+
var templateId = props.templateId, viewCodes = props.viewCodes, keyword = props.keyword, filter = props.filter, contextMenuConfig = props.contextMenuConfig, onDoubleClick = props.onDoubleClick, onCreateSense = props.onCreateSense, onRefresh = props.onRefresh;
|
114626
114627
|
var showContextMenu = Fe$1({ id: ContextMenu$2.id }).show;
|
114627
114628
|
// 分页
|
114628
114629
|
var _a = React.useState(__assign$h({}, PAGINATION)), pagination = _a[0], setPagination = _a[1];
|
@@ -114660,7 +114661,12 @@
|
|
114660
114661
|
});
|
114661
114662
|
}); }, {
|
114662
114663
|
refreshDeps: [templateId, JSON.stringify(viewCodes), keyword, JSON.stringify(filter), sorter],
|
114663
|
-
}), loading = _d.loading, data = _d.data;
|
114664
|
+
}), loading = _d.loading, data = _d.data, refresh = _d.refresh;
|
114665
|
+
// 触发刷新
|
114666
|
+
var handleRefresh = function () {
|
114667
|
+
refresh();
|
114668
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
114669
|
+
};
|
114664
114670
|
var onRow = function (record) { return ({
|
114665
114671
|
onClick: function () {
|
114666
114672
|
setHighlightId(record.bookId);
|
@@ -114774,6 +114780,9 @@
|
|
114774
114780
|
ellipsis: true,
|
114775
114781
|
},
|
114776
114782
|
];
|
114783
|
+
React.useImperativeHandle(ref, function () { return ({
|
114784
|
+
refresh: handleRefresh,
|
114785
|
+
}); });
|
114777
114786
|
return (React.createElement("div", { className: styles$B.container },
|
114778
114787
|
React.createElement("div", { className: styles$B.table },
|
114779
114788
|
React.createElement(ProTable, { header: [
|
@@ -114787,7 +114796,7 @@
|
|
114787
114796
|
{ code: 'regionName', name: '关联地理层级', defaultShow: false },
|
114788
114797
|
], columns: columns, dataSource: data, loading: loading, pagination: pagination, size: "small", rowKey: function (record) { return record.bookId; }, onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
114789
114798
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? React.createElement(ContextMenu$2, { config: contextMenuConfig }) : null));
|
114790
|
-
};
|
114799
|
+
});
|
114791
114800
|
|
114792
114801
|
// 基于当前用户权限全量查询政府组织
|
114793
114802
|
function getOrgList(params) {
|
@@ -242439,9 +242448,9 @@ ${indent}columns: ${matrix.columns}
|
|
242439
242448
|
total,
|
242440
242449
|
"\u6761")));
|
242441
242450
|
};
|
242442
|
-
var SenseTable = function (props) {
|
242451
|
+
var SenseTable = React.forwardRef(function (props, ref) {
|
242443
242452
|
var _a;
|
242444
|
-
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;
|
242453
|
+
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, onRefresh = props.onRefresh;
|
242445
242454
|
var _b = App.useApp(), message = _b.message, modal = _b.modal;
|
242446
242455
|
var showContextMenu = Fe$1({ id: ContextMenu$1.id }).show;
|
242447
242456
|
var _c = useKsCode(), ksCodeMap = _c.ksCodeMap, ksCodeLoaded = _c.loaded;
|
@@ -242655,7 +242664,12 @@ ${indent}columns: ${matrix.columns}
|
|
242655
242664
|
JSON.stringify(filter),
|
242656
242665
|
sorter,
|
242657
242666
|
],
|
242658
|
-
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource;
|
242667
|
+
}), loading = _m.loading, _o = _m.data, _p = _o === void 0 ? {} : _o, header = _p.header, columns = _p.columns, dataSource = _p.dataSource, refresh = _m.refresh;
|
242668
|
+
// 触发刷新
|
242669
|
+
var handleRefresh = function () {
|
242670
|
+
refresh();
|
242671
|
+
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
|
242672
|
+
};
|
242659
242673
|
var onRow = function (record) { return ({
|
242660
242674
|
onClick: function () {
|
242661
242675
|
setHighlightId(record.sense_global_code);
|
@@ -242697,6 +242711,7 @@ ${indent}columns: ${matrix.columns}
|
|
242697
242711
|
switch (_a.label) {
|
242698
242712
|
case 0: return [4 /*yield*/, deleteSense({ senseGlobalCodes: [record.sense_global_code] }).then(function () {
|
242699
242713
|
message.success('删除成功');
|
242714
|
+
handleRefresh();
|
242700
242715
|
})];
|
242701
242716
|
case 1:
|
242702
242717
|
_a.sent();
|
@@ -242723,6 +242738,9 @@ ${indent}columns: ${matrix.columns}
|
|
242723
242738
|
setPagination(__assign$h(__assign$h({}, pagination), _pagination));
|
242724
242739
|
setSorter(_sorter);
|
242725
242740
|
};
|
242741
|
+
React.useImperativeHandle(ref, function () { return ({
|
242742
|
+
refresh: handleRefresh,
|
242743
|
+
}); });
|
242726
242744
|
return (React.createElement("div", { className: styles$a.container },
|
242727
242745
|
React.createElement("div", { className: classNames(styles$a.table, (_a = {},
|
242728
242746
|
_a[styles$a['hidden-row-selected-num']] = !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length),
|
@@ -242730,7 +242748,7 @@ ${indent}columns: ${matrix.columns}
|
|
242730
242748
|
React.createElement(ProTable, { header: header, columns: columns, dataSource: dataSource, loading: loading, pagination: pagination, size: "small", rowKey: "sense_global_code", onRow: onRow, rowClassName: rowClassName, onChange: handleChangeTable })),
|
242731
242749
|
React.createElement(TagsModal, { open: showTagsModal, onCancel: handleCloseTagsModal, data: curRecord }),
|
242732
242750
|
(contextMenuConfig === null || contextMenuConfig === void 0 ? void 0 : contextMenuConfig.length) ? (React.createElement(ContextMenu$1, { config: contextMenuConfig, authTypes: authTypes })) : null));
|
242733
|
-
};
|
242751
|
+
});
|
242734
242752
|
|
242735
242753
|
// 日期范围选择器表单格式转换
|
242736
242754
|
var getRangePickerConversion = function (format) {
|
@@ -243030,9 +243048,13 @@ ${indent}columns: ${matrix.columns}
|
|
243030
243048
|
var styles$7 = {"container":"SenseManager-module_container__PpQ0P","main":"SenseManager-module_main__bwIz-","header":"SenseManager-module_header__ZY2W-","breadcrumb":"SenseManager-module_breadcrumb__TDY-G","full":"SenseManager-module_full__qAuqZ","tabs":"SenseManager-module_tabs__WZOwj","filter":"SenseManager-module_filter__uFxyQ"};
|
243031
243049
|
styleInject(css_248z$7);
|
243032
243050
|
|
243033
|
-
var SenseManager = function (props) {
|
243051
|
+
var SenseManager = React.forwardRef(function (props, ref) {
|
243034
243052
|
var _a;
|
243035
243053
|
var _b = props.viewType, viewType = _b === void 0 ? 'system' : _b, _c = props.views, views = _c === void 0 ? [] : _c, showBookGroupTable = props.showBookGroupTable, showBookTable = props.showBookTable, showSenseTable = props.showSenseTable, bookContextMenuConfig = props.bookContextMenuConfig, senseContextMenuConfig = props.senseContextMenuConfig, enableTag = props.enableTag, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, onCreateSense = props.onCreateSense, onShowSense = props.onShowSense, onEditSense = props.onEditSense, onClickSense = props.onClickSense, onDoubleClickSense = props.onDoubleClickSense;
|
243054
|
+
// 台账表格 ref
|
243055
|
+
var bookTableRef = React.useRef();
|
243056
|
+
// 实体记录表格 ref
|
243057
|
+
var senseTableRef = React.useRef();
|
243036
243058
|
// 当前选中的分类
|
243037
243059
|
var _d = React.useState(''), activeCategory = _d[0], setActiveCategory = _d[1];
|
243038
243060
|
// Tabs 选中的 key
|
@@ -243051,7 +243073,7 @@ ${indent}columns: ${matrix.columns}
|
|
243051
243073
|
var _m = React.useState(null), filterConfig = _m[0], setFilterConfig = _m[1];
|
243052
243074
|
// 显示 Tabs
|
243053
243075
|
var showTabs = bookGroup && !book && showBookTable && showSenseTable;
|
243054
|
-
var
|
243076
|
+
var _o = useRequest(function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
243055
243077
|
var res;
|
243056
243078
|
return __generator$2(this, function (_a) {
|
243057
243079
|
switch (_a.label) {
|
@@ -243069,7 +243091,7 @@ ${indent}columns: ${matrix.columns}
|
|
243069
243091
|
}); }, {
|
243070
243092
|
ready: !!showTabs,
|
243071
243093
|
refreshDeps: [showTabs],
|
243072
|
-
}).data;
|
243094
|
+
}), tabItems = _o.data, refreshTabItems = _o.refresh;
|
243073
243095
|
// 设置选中的分类
|
243074
243096
|
var handleChangeActiveCategory = function (key) {
|
243075
243097
|
setTabsActiveKey('book');
|
@@ -243081,7 +243103,7 @@ ${indent}columns: ${matrix.columns}
|
|
243081
243103
|
setActiveCategory(key);
|
243082
243104
|
};
|
243083
243105
|
// 面包屑, 当前页面名称
|
243084
|
-
var
|
243106
|
+
var _p = React.useMemo(function () {
|
243085
243107
|
var _a;
|
243086
243108
|
var list = [];
|
243087
243109
|
// 视图
|
@@ -243129,7 +243151,7 @@ ${indent}columns: ${matrix.columns}
|
|
243129
243151
|
}
|
243130
243152
|
var name = ((_a = list[list.length - 1]) === null || _a === void 0 ? void 0 : _a.title) || '';
|
243131
243153
|
return [list, name];
|
243132
|
-
}, [activeCategory, bookGroup, book]), breadcrumbItems =
|
243154
|
+
}, [activeCategory, bookGroup, book]), breadcrumbItems = _p[0], currentName = _p[1];
|
243133
243155
|
// 台账组
|
243134
243156
|
var renderBookGroup = function () {
|
243135
243157
|
return (React.createElement(BookGroupTable, { viewCodes: [activeCategory], keyword: keyword, filter: filter, onDoubleClick: function (data) {
|
@@ -243142,7 +243164,7 @@ ${indent}columns: ${matrix.columns}
|
|
243142
243164
|
};
|
243143
243165
|
// 台账
|
243144
243166
|
var renderBook = function (templateId) {
|
243145
|
-
return (React.createElement(BookTable, { viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243167
|
+
return (React.createElement(BookTable, { ref: bookTableRef, viewCodes: [activeCategory], templateId: templateId, keyword: keyword, filter: filter, contextMenuConfig: bookContextMenuConfig, onDoubleClick: function (data) {
|
243146
243168
|
if (showSenseTable) {
|
243147
243169
|
setTabsActiveKey('book');
|
243148
243170
|
setKeywordValue('');
|
@@ -243154,7 +243176,7 @@ ${indent}columns: ${matrix.columns}
|
|
243154
243176
|
};
|
243155
243177
|
// 实体记录
|
243156
243178
|
var renderSense = function (templateId, bookId) {
|
243157
|
-
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 }));
|
243179
|
+
return (React.createElement(SenseTable, { ref: senseTableRef, 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, onRefresh: refreshTabItems }));
|
243158
243180
|
};
|
243159
243181
|
// 渲染内容
|
243160
243182
|
var renderMain = function () {
|
@@ -243207,6 +243229,10 @@ ${indent}columns: ${matrix.columns}
|
|
243207
243229
|
}
|
243208
243230
|
});
|
243209
243231
|
}); }, [activeCategory, tabsActiveKey, bookGroup, book]);
|
243232
|
+
React.useImperativeHandle(ref, function () { return ({
|
243233
|
+
refreshBookTable: function () { var _a; return (_a = bookTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243234
|
+
refreshSenseTable: function () { var _a; return (_a = senseTableRef.current) === null || _a === void 0 ? void 0 : _a.refresh(); },
|
243235
|
+
}); });
|
243210
243236
|
return (React.createElement("div", { className: styles$7.container },
|
243211
243237
|
React.createElement(SideBar, { viewType: viewType, views: views, activeCategory: activeCategory, onChange: handleChangeActiveCategory }),
|
243212
243238
|
React.createElement("div", { className: styles$7.main },
|
@@ -243231,7 +243257,7 @@ ${indent}columns: ${matrix.columns}
|
|
243231
243257
|
setKeyword(v);
|
243232
243258
|
}, placeholder: currentName ? "\u5728\u201C".concat(currentName, "\u201D\u4E2D\u641C\u7D22") : '请输入关键词搜索' }))),
|
243233
243259
|
activeCategory ? renderMain() : null)));
|
243234
|
-
};
|
243260
|
+
});
|
243235
243261
|
|
243236
243262
|
var settings$8 = {
|
243237
243263
|
name: 'CcosSenseManager',
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { BookTableProps } from './BookTable.d';
|
3
|
-
declare const BookTable: React.
|
2
|
+
import { BookTableProps, BookTableRef } from './BookTable.d';
|
3
|
+
declare const BookTable: React.ForwardRefExoticComponent<BookTableProps & React.RefAttributes<BookTableRef>>;
|
4
4
|
export default BookTable;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { SenseManagerProps } from './SenseManager.d';
|
3
|
-
declare const SenseManager: React.
|
2
|
+
import { SenseManagerProps, SenseManagerRef } from './SenseManager.d';
|
3
|
+
declare const SenseManager: React.ForwardRefExoticComponent<SenseManagerProps & React.RefAttributes<SenseManagerRef>>;
|
4
4
|
export default SenseManager;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { SenseTableProps } from './SenseTable.d';
|
3
|
-
declare const SenseTable: React.
|
2
|
+
import { SenseTableProps, SenseTableRef } from './SenseTable.d';
|
3
|
+
declare const SenseTable: React.ForwardRefExoticComponent<SenseTableProps & React.RefAttributes<SenseTableRef>>;
|
4
4
|
export default SenseTable;
|