@bit-sun/business-component 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +93 -110
- package/dist/index.js +93 -110
- package/dist/utils/utils.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/Business/BsSulaQueryTable/setting.tsx +0 -2
- package/src/components/Business/DetailPageWrapper/utils.tsx +0 -2
- package/src/components/Business/columnSettingTable/columnSetting.tsx +0 -2
- package/src/components/Functional/AddSelect/index.tsx +0 -2
- package/src/components/Functional/QueryMutipleInput/index.tsx +0 -2
- package/src/components/Functional/SearchSelect/index.tsx +0 -2
- package/src/utils/utils.ts +0 -11
package/dist/index.esm.js
CHANGED
|
@@ -5,13 +5,13 @@ import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, us
|
|
|
5
5
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
6
6
|
import { UnorderedListOutlined, ProfileTwoTone, ExclamationCircleOutlined, DownOutlined, CopyOutlined, SearchOutlined, CaretLeftOutlined, CloseCircleOutlined, ArrowLeftOutlined, FolderOutlined, EllipsisOutlined, CaretDownOutlined, HomeOutlined, DoubleLeftOutlined, DoubleRightOutlined, MenuUnfoldOutlined, DashOutlined } from '@ant-design/icons';
|
|
7
7
|
import { useDebounceFn } from 'ahooks';
|
|
8
|
-
import { history, formatMessage, useLocation, Link, useModel, useIntl } from 'umi';
|
|
9
|
-
import isEqual$1 from 'lodash/isEqual';
|
|
10
8
|
import { stringify } from 'querystring';
|
|
11
9
|
import { Resizable } from 'react-resizable';
|
|
12
10
|
import { Table as Table$1, request, QueryTable } from 'bssula';
|
|
13
11
|
import { SortableHandle, SortableElement, SortableContainer } from 'react-sortable-hoc';
|
|
14
12
|
import { arrayMoveImmutable } from 'array-move';
|
|
13
|
+
import { history, formatMessage, useLocation, Link, useModel, useIntl } from 'umi';
|
|
14
|
+
import isEqual$1 from 'lodash/isEqual';
|
|
15
15
|
import ProLayout from '@ant-design/pro-layout';
|
|
16
16
|
import cloneDeep from 'lodash/cloneDeep';
|
|
17
17
|
import classNames from 'classnames';
|
|
@@ -2061,108 +2061,6 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2061
2061
|
var css_248z$2 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
|
|
2062
2062
|
styleInject(css_248z$2);
|
|
2063
2063
|
|
|
2064
|
-
var safeIsNaN = Number.isNaN ||
|
|
2065
|
-
function ponyfill(value) {
|
|
2066
|
-
return typeof value === 'number' && value !== value;
|
|
2067
|
-
};
|
|
2068
|
-
function isEqual(first, second) {
|
|
2069
|
-
if (first === second) {
|
|
2070
|
-
return true;
|
|
2071
|
-
}
|
|
2072
|
-
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
2073
|
-
return true;
|
|
2074
|
-
}
|
|
2075
|
-
return false;
|
|
2076
|
-
}
|
|
2077
|
-
function areInputsEqual(newInputs, lastInputs) {
|
|
2078
|
-
if (newInputs.length !== lastInputs.length) {
|
|
2079
|
-
return false;
|
|
2080
|
-
}
|
|
2081
|
-
for (var i = 0; i < newInputs.length; i++) {
|
|
2082
|
-
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
2083
|
-
return false;
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
return true;
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
function memoizeOne(resultFn, isEqual) {
|
|
2090
|
-
if (isEqual === void 0) { isEqual = areInputsEqual; }
|
|
2091
|
-
var cache = null;
|
|
2092
|
-
function memoized() {
|
|
2093
|
-
var newArgs = [];
|
|
2094
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2095
|
-
newArgs[_i] = arguments[_i];
|
|
2096
|
-
}
|
|
2097
|
-
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
|
|
2098
|
-
return cache.lastResult;
|
|
2099
|
-
}
|
|
2100
|
-
var lastResult = resultFn.apply(this, newArgs);
|
|
2101
|
-
cache = {
|
|
2102
|
-
lastResult: lastResult,
|
|
2103
|
-
lastArgs: newArgs,
|
|
2104
|
-
lastThis: this,
|
|
2105
|
-
};
|
|
2106
|
-
return lastResult;
|
|
2107
|
-
}
|
|
2108
|
-
memoized.clear = function clear() {
|
|
2109
|
-
cache = null;
|
|
2110
|
-
};
|
|
2111
|
-
return memoized;
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
var formatter = function formatter(data, parentAuthority, parentName) {
|
|
2115
|
-
return data.map(function (item) {
|
|
2116
|
-
if (!item.name || !item.path) {
|
|
2117
|
-
return null;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
var locale = 'menu';
|
|
2121
|
-
|
|
2122
|
-
if (parentName) {
|
|
2123
|
-
locale = "".concat(parentName, ".").concat(item.name);
|
|
2124
|
-
} else {
|
|
2125
|
-
locale = "menu.".concat(item.name);
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
var result = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2129
|
-
name: formatMessage && formatMessage({
|
|
2130
|
-
id: locale,
|
|
2131
|
-
defaultMessage: item.name
|
|
2132
|
-
}) || item.name,
|
|
2133
|
-
locale: locale,
|
|
2134
|
-
authority: item.authority || parentAuthority
|
|
2135
|
-
});
|
|
2136
|
-
|
|
2137
|
-
if (item.routes) {
|
|
2138
|
-
var children = formatter(item.routes, item.authority, locale); // Reduce memory usage
|
|
2139
|
-
|
|
2140
|
-
result.children = children;
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
delete result.routes;
|
|
2144
|
-
return result;
|
|
2145
|
-
}).filter(function (item) {
|
|
2146
|
-
return item;
|
|
2147
|
-
});
|
|
2148
|
-
};
|
|
2149
|
-
var memoizeOneFormatter = memoizeOne(formatter, isEqual$1);
|
|
2150
|
-
var go2BackAndClose = function go2BackAndClose() {
|
|
2151
|
-
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
2152
|
-
history.goBack();
|
|
2153
|
-
};
|
|
2154
|
-
var getModalContainer = function getModalContainer() {
|
|
2155
|
-
try {
|
|
2156
|
-
if (window.top != window && window.parent.document) {
|
|
2157
|
-
return window.parent.document.body;
|
|
2158
|
-
}
|
|
2159
|
-
} catch (error) {
|
|
2160
|
-
console.log(error);
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
return document.body;
|
|
2164
|
-
};
|
|
2165
|
-
|
|
2166
2064
|
var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
2167
2065
|
var onValueChange = _ref.onValueChange;
|
|
2168
2066
|
|
|
@@ -2250,7 +2148,6 @@ var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
|
2250
2148
|
type: "primary"
|
|
2251
2149
|
}, "...")), /*#__PURE__*/React.createElement(Modal, {
|
|
2252
2150
|
width: 600,
|
|
2253
|
-
getContainer: getModalContainer,
|
|
2254
2151
|
title: "\u591A\u503C\u5F55\u5165",
|
|
2255
2152
|
visible: isModalVisible,
|
|
2256
2153
|
onOk: handleOk,
|
|
@@ -3267,7 +3164,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3267
3164
|
}, /*#__PURE__*/React.createElement(SearchOutlined, null))), needModalTable && isModalVisible && /*#__PURE__*/React.createElement(Modal, {
|
|
3268
3165
|
width: '80%',
|
|
3269
3166
|
title: modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalTableTitle,
|
|
3270
|
-
getContainer: getModalContainer,
|
|
3271
3167
|
visible: isModalVisible,
|
|
3272
3168
|
onOk: handleOk,
|
|
3273
3169
|
onCancel: handleCancel,
|
|
@@ -4383,7 +4279,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
4383
4279
|
},
|
|
4384
4280
|
// title={modalTableProps?.modalTableTitle}
|
|
4385
4281
|
visible: isModalVisible,
|
|
4386
|
-
getContainer: getModalContainer,
|
|
4387
4282
|
closable: false,
|
|
4388
4283
|
onCancel: handleCancel,
|
|
4389
4284
|
footer: selectMode ? [/*#__PURE__*/React.createElement(Button, {
|
|
@@ -8733,7 +8628,6 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
8733
8628
|
}, /*#__PURE__*/React.createElement(Modal, {
|
|
8734
8629
|
title: "\u8BBE\u7F6E\u8868\u5934\u5185\u5BB9",
|
|
8735
8630
|
wrapClassName: 'sort_table_wrapper',
|
|
8736
|
-
getContainer: getModalContainer,
|
|
8737
8631
|
width: 820,
|
|
8738
8632
|
visible: visible,
|
|
8739
8633
|
onOk: this.handleOk,
|
|
@@ -9550,7 +9444,6 @@ var doDetailPageAction = function doDetailPageAction(config) {
|
|
|
9550
9444
|
confirm({
|
|
9551
9445
|
title: config.title,
|
|
9552
9446
|
icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
|
|
9553
|
-
getContainer: getModalContainer,
|
|
9554
9447
|
content: config.content,
|
|
9555
9448
|
okText: '确定',
|
|
9556
9449
|
okType: 'danger',
|
|
@@ -9593,6 +9486,97 @@ var getMainCrumbNameMap = function getMainCrumbNameMap(menuData) {
|
|
|
9593
9486
|
return routerMap;
|
|
9594
9487
|
};
|
|
9595
9488
|
|
|
9489
|
+
var safeIsNaN = Number.isNaN ||
|
|
9490
|
+
function ponyfill(value) {
|
|
9491
|
+
return typeof value === 'number' && value !== value;
|
|
9492
|
+
};
|
|
9493
|
+
function isEqual(first, second) {
|
|
9494
|
+
if (first === second) {
|
|
9495
|
+
return true;
|
|
9496
|
+
}
|
|
9497
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
9498
|
+
return true;
|
|
9499
|
+
}
|
|
9500
|
+
return false;
|
|
9501
|
+
}
|
|
9502
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
9503
|
+
if (newInputs.length !== lastInputs.length) {
|
|
9504
|
+
return false;
|
|
9505
|
+
}
|
|
9506
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
9507
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
9508
|
+
return false;
|
|
9509
|
+
}
|
|
9510
|
+
}
|
|
9511
|
+
return true;
|
|
9512
|
+
}
|
|
9513
|
+
|
|
9514
|
+
function memoizeOne(resultFn, isEqual) {
|
|
9515
|
+
if (isEqual === void 0) { isEqual = areInputsEqual; }
|
|
9516
|
+
var cache = null;
|
|
9517
|
+
function memoized() {
|
|
9518
|
+
var newArgs = [];
|
|
9519
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9520
|
+
newArgs[_i] = arguments[_i];
|
|
9521
|
+
}
|
|
9522
|
+
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
|
|
9523
|
+
return cache.lastResult;
|
|
9524
|
+
}
|
|
9525
|
+
var lastResult = resultFn.apply(this, newArgs);
|
|
9526
|
+
cache = {
|
|
9527
|
+
lastResult: lastResult,
|
|
9528
|
+
lastArgs: newArgs,
|
|
9529
|
+
lastThis: this,
|
|
9530
|
+
};
|
|
9531
|
+
return lastResult;
|
|
9532
|
+
}
|
|
9533
|
+
memoized.clear = function clear() {
|
|
9534
|
+
cache = null;
|
|
9535
|
+
};
|
|
9536
|
+
return memoized;
|
|
9537
|
+
}
|
|
9538
|
+
|
|
9539
|
+
var formatter = function formatter(data, parentAuthority, parentName) {
|
|
9540
|
+
return data.map(function (item) {
|
|
9541
|
+
if (!item.name || !item.path) {
|
|
9542
|
+
return null;
|
|
9543
|
+
}
|
|
9544
|
+
|
|
9545
|
+
var locale = 'menu';
|
|
9546
|
+
|
|
9547
|
+
if (parentName) {
|
|
9548
|
+
locale = "".concat(parentName, ".").concat(item.name);
|
|
9549
|
+
} else {
|
|
9550
|
+
locale = "menu.".concat(item.name);
|
|
9551
|
+
}
|
|
9552
|
+
|
|
9553
|
+
var result = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
9554
|
+
name: formatMessage && formatMessage({
|
|
9555
|
+
id: locale,
|
|
9556
|
+
defaultMessage: item.name
|
|
9557
|
+
}) || item.name,
|
|
9558
|
+
locale: locale,
|
|
9559
|
+
authority: item.authority || parentAuthority
|
|
9560
|
+
});
|
|
9561
|
+
|
|
9562
|
+
if (item.routes) {
|
|
9563
|
+
var children = formatter(item.routes, item.authority, locale); // Reduce memory usage
|
|
9564
|
+
|
|
9565
|
+
result.children = children;
|
|
9566
|
+
}
|
|
9567
|
+
|
|
9568
|
+
delete result.routes;
|
|
9569
|
+
return result;
|
|
9570
|
+
}).filter(function (item) {
|
|
9571
|
+
return item;
|
|
9572
|
+
});
|
|
9573
|
+
};
|
|
9574
|
+
var memoizeOneFormatter = memoizeOne(formatter, isEqual$1);
|
|
9575
|
+
var go2BackAndClose = function go2BackAndClose() {
|
|
9576
|
+
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
9577
|
+
history.goBack();
|
|
9578
|
+
};
|
|
9579
|
+
|
|
9596
9580
|
var css_248z$9 = ".detail_page_head {\n height: 54px;\n display: flex;\n align-items: center;\n background-color: #FFFFFF;\n border-bottom: 1px solid #f0f0f0;\n}\n.detail_page_head .ant-breadcrumb {\n display: block !important;\n}\n.detail_page_head .ant-breadcrumb .ant-breadcrumb-separator {\n margin: 0 2px;\n}\n.detail_page_head .ant-breadcrumb li .bread_name {\n color: #8A8F8D;\n font-size: 12px;\n cursor: pointer;\n}\n.detail_page_head .ant-breadcrumb li .bread_name:hover {\n color: #000000d9;\n}\n.back_home_img_content {\n display: inline-block;\n height: 28px;\n width: 28px;\n border: 1px solid #BABABA;\n margin: 0 12px 0 20px;\n border-radius: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.back_home_img_content .anticon-arrow-left {\n color: #BABABA;\n}\n.back_home_img_content:hover {\n background-color: #005CFF;\n border: 1px solid #005CFF;\n}\n.back_home_img_content:hover .anticon-arrow-left {\n color: #FFFFFF;\n}\n.detail_page_title_box {\n flex-grow: 1;\n}\n.detail_page_title {\n height: 20px;\n font-family: PingFangSC;\n font-weight: 600;\n font-size: 16px;\n margin-top: 2px;\n color: #000000;\n letter-spacing: 0;\n line-height: 20px;\n}\n.detail_page_btns {\n display: flex;\n gap: 8px;\n margin-right: 20px;\n}\n.detail_page_btns button {\n height: 32px !important;\n display: flex;\n align-items: center;\n gap: 2px;\n border-radius: 3px;\n padding: 0 10px;\n}\n.detail_page_btns .ant-btn-dangerous {\n background-color: #EC5246 !important;\n}\n";
|
|
9597
9581
|
styleInject(css_248z$9);
|
|
9598
9582
|
|
|
@@ -16583,7 +16567,6 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
16583
16567
|
visible: visible,
|
|
16584
16568
|
onOk: this.handleOk,
|
|
16585
16569
|
onCancel: this.handleCancel,
|
|
16586
|
-
getContainer: getModalContainer,
|
|
16587
16570
|
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
16588
16571
|
key: "back",
|
|
16589
16572
|
onClick: this.handleReset
|
package/dist/index.js
CHANGED
|
@@ -9,13 +9,13 @@ var React = require('react');
|
|
|
9
9
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
10
10
|
var icons = require('@ant-design/icons');
|
|
11
11
|
var ahooks = require('ahooks');
|
|
12
|
-
var umi = require('umi');
|
|
13
|
-
var isEqual$1 = require('lodash/isEqual');
|
|
14
12
|
var querystring = require('querystring');
|
|
15
13
|
var reactResizable = require('react-resizable');
|
|
16
14
|
var bssula = require('bssula');
|
|
17
15
|
var reactSortableHoc = require('react-sortable-hoc');
|
|
18
16
|
var arrayMove = require('array-move');
|
|
17
|
+
var umi = require('umi');
|
|
18
|
+
var isEqual$1 = require('lodash/isEqual');
|
|
19
19
|
var ProLayout = require('@ant-design/pro-layout');
|
|
20
20
|
var cloneDeep = require('lodash/cloneDeep');
|
|
21
21
|
var classNames = require('classnames');
|
|
@@ -2075,108 +2075,6 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2075
2075
|
var css_248z$2 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
|
|
2076
2076
|
styleInject(css_248z$2);
|
|
2077
2077
|
|
|
2078
|
-
var safeIsNaN = Number.isNaN ||
|
|
2079
|
-
function ponyfill(value) {
|
|
2080
|
-
return typeof value === 'number' && value !== value;
|
|
2081
|
-
};
|
|
2082
|
-
function isEqual(first, second) {
|
|
2083
|
-
if (first === second) {
|
|
2084
|
-
return true;
|
|
2085
|
-
}
|
|
2086
|
-
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
2087
|
-
return true;
|
|
2088
|
-
}
|
|
2089
|
-
return false;
|
|
2090
|
-
}
|
|
2091
|
-
function areInputsEqual(newInputs, lastInputs) {
|
|
2092
|
-
if (newInputs.length !== lastInputs.length) {
|
|
2093
|
-
return false;
|
|
2094
|
-
}
|
|
2095
|
-
for (var i = 0; i < newInputs.length; i++) {
|
|
2096
|
-
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
2097
|
-
return false;
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
return true;
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
function memoizeOne(resultFn, isEqual) {
|
|
2104
|
-
if (isEqual === void 0) { isEqual = areInputsEqual; }
|
|
2105
|
-
var cache = null;
|
|
2106
|
-
function memoized() {
|
|
2107
|
-
var newArgs = [];
|
|
2108
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2109
|
-
newArgs[_i] = arguments[_i];
|
|
2110
|
-
}
|
|
2111
|
-
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
|
|
2112
|
-
return cache.lastResult;
|
|
2113
|
-
}
|
|
2114
|
-
var lastResult = resultFn.apply(this, newArgs);
|
|
2115
|
-
cache = {
|
|
2116
|
-
lastResult: lastResult,
|
|
2117
|
-
lastArgs: newArgs,
|
|
2118
|
-
lastThis: this,
|
|
2119
|
-
};
|
|
2120
|
-
return lastResult;
|
|
2121
|
-
}
|
|
2122
|
-
memoized.clear = function clear() {
|
|
2123
|
-
cache = null;
|
|
2124
|
-
};
|
|
2125
|
-
return memoized;
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
var formatter = function formatter(data, parentAuthority, parentName) {
|
|
2129
|
-
return data.map(function (item) {
|
|
2130
|
-
if (!item.name || !item.path) {
|
|
2131
|
-
return null;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
var locale = 'menu';
|
|
2135
|
-
|
|
2136
|
-
if (parentName) {
|
|
2137
|
-
locale = "".concat(parentName, ".").concat(item.name);
|
|
2138
|
-
} else {
|
|
2139
|
-
locale = "menu.".concat(item.name);
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
var result = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2143
|
-
name: umi.formatMessage && umi.formatMessage({
|
|
2144
|
-
id: locale,
|
|
2145
|
-
defaultMessage: item.name
|
|
2146
|
-
}) || item.name,
|
|
2147
|
-
locale: locale,
|
|
2148
|
-
authority: item.authority || parentAuthority
|
|
2149
|
-
});
|
|
2150
|
-
|
|
2151
|
-
if (item.routes) {
|
|
2152
|
-
var children = formatter(item.routes, item.authority, locale); // Reduce memory usage
|
|
2153
|
-
|
|
2154
|
-
result.children = children;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
delete result.routes;
|
|
2158
|
-
return result;
|
|
2159
|
-
}).filter(function (item) {
|
|
2160
|
-
return item;
|
|
2161
|
-
});
|
|
2162
|
-
};
|
|
2163
|
-
var memoizeOneFormatter = memoizeOne(formatter, isEqual__default['default']);
|
|
2164
|
-
var go2BackAndClose = function go2BackAndClose() {
|
|
2165
|
-
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
2166
|
-
umi.history.goBack();
|
|
2167
|
-
};
|
|
2168
|
-
var getModalContainer = function getModalContainer() {
|
|
2169
|
-
try {
|
|
2170
|
-
if (window.top != window && window.parent.document) {
|
|
2171
|
-
return window.parent.document.body;
|
|
2172
|
-
}
|
|
2173
|
-
} catch (error) {
|
|
2174
|
-
console.log(error);
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
return document.body;
|
|
2178
|
-
};
|
|
2179
|
-
|
|
2180
2078
|
var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
2181
2079
|
var onValueChange = _ref.onValueChange;
|
|
2182
2080
|
|
|
@@ -2264,7 +2162,6 @@ var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
|
2264
2162
|
type: "primary"
|
|
2265
2163
|
}, "...")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
2266
2164
|
width: 600,
|
|
2267
|
-
getContainer: getModalContainer,
|
|
2268
2165
|
title: "\u591A\u503C\u5F55\u5165",
|
|
2269
2166
|
visible: isModalVisible,
|
|
2270
2167
|
onOk: handleOk,
|
|
@@ -3281,7 +3178,6 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3281
3178
|
}, /*#__PURE__*/React__default['default'].createElement(icons.SearchOutlined, null))), needModalTable && isModalVisible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
3282
3179
|
width: '80%',
|
|
3283
3180
|
title: modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalTableTitle,
|
|
3284
|
-
getContainer: getModalContainer,
|
|
3285
3181
|
visible: isModalVisible,
|
|
3286
3182
|
onOk: handleOk,
|
|
3287
3183
|
onCancel: handleCancel,
|
|
@@ -4397,7 +4293,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
4397
4293
|
},
|
|
4398
4294
|
// title={modalTableProps?.modalTableTitle}
|
|
4399
4295
|
visible: isModalVisible,
|
|
4400
|
-
getContainer: getModalContainer,
|
|
4401
4296
|
closable: false,
|
|
4402
4297
|
onCancel: handleCancel,
|
|
4403
4298
|
footer: selectMode ? [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
@@ -8747,7 +8642,6 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
8747
8642
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
8748
8643
|
title: "\u8BBE\u7F6E\u8868\u5934\u5185\u5BB9",
|
|
8749
8644
|
wrapClassName: 'sort_table_wrapper',
|
|
8750
|
-
getContainer: getModalContainer,
|
|
8751
8645
|
width: 820,
|
|
8752
8646
|
visible: visible,
|
|
8753
8647
|
onOk: this.handleOk,
|
|
@@ -9564,7 +9458,6 @@ var doDetailPageAction = function doDetailPageAction(config) {
|
|
|
9564
9458
|
confirm({
|
|
9565
9459
|
title: config.title,
|
|
9566
9460
|
icon: /*#__PURE__*/React__default['default'].createElement(icons.ExclamationCircleOutlined, null),
|
|
9567
|
-
getContainer: getModalContainer,
|
|
9568
9461
|
content: config.content,
|
|
9569
9462
|
okText: '确定',
|
|
9570
9463
|
okType: 'danger',
|
|
@@ -9607,6 +9500,97 @@ var getMainCrumbNameMap = function getMainCrumbNameMap(menuData) {
|
|
|
9607
9500
|
return routerMap;
|
|
9608
9501
|
};
|
|
9609
9502
|
|
|
9503
|
+
var safeIsNaN = Number.isNaN ||
|
|
9504
|
+
function ponyfill(value) {
|
|
9505
|
+
return typeof value === 'number' && value !== value;
|
|
9506
|
+
};
|
|
9507
|
+
function isEqual(first, second) {
|
|
9508
|
+
if (first === second) {
|
|
9509
|
+
return true;
|
|
9510
|
+
}
|
|
9511
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
9512
|
+
return true;
|
|
9513
|
+
}
|
|
9514
|
+
return false;
|
|
9515
|
+
}
|
|
9516
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
9517
|
+
if (newInputs.length !== lastInputs.length) {
|
|
9518
|
+
return false;
|
|
9519
|
+
}
|
|
9520
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
9521
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
9522
|
+
return false;
|
|
9523
|
+
}
|
|
9524
|
+
}
|
|
9525
|
+
return true;
|
|
9526
|
+
}
|
|
9527
|
+
|
|
9528
|
+
function memoizeOne(resultFn, isEqual) {
|
|
9529
|
+
if (isEqual === void 0) { isEqual = areInputsEqual; }
|
|
9530
|
+
var cache = null;
|
|
9531
|
+
function memoized() {
|
|
9532
|
+
var newArgs = [];
|
|
9533
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9534
|
+
newArgs[_i] = arguments[_i];
|
|
9535
|
+
}
|
|
9536
|
+
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
|
|
9537
|
+
return cache.lastResult;
|
|
9538
|
+
}
|
|
9539
|
+
var lastResult = resultFn.apply(this, newArgs);
|
|
9540
|
+
cache = {
|
|
9541
|
+
lastResult: lastResult,
|
|
9542
|
+
lastArgs: newArgs,
|
|
9543
|
+
lastThis: this,
|
|
9544
|
+
};
|
|
9545
|
+
return lastResult;
|
|
9546
|
+
}
|
|
9547
|
+
memoized.clear = function clear() {
|
|
9548
|
+
cache = null;
|
|
9549
|
+
};
|
|
9550
|
+
return memoized;
|
|
9551
|
+
}
|
|
9552
|
+
|
|
9553
|
+
var formatter = function formatter(data, parentAuthority, parentName) {
|
|
9554
|
+
return data.map(function (item) {
|
|
9555
|
+
if (!item.name || !item.path) {
|
|
9556
|
+
return null;
|
|
9557
|
+
}
|
|
9558
|
+
|
|
9559
|
+
var locale = 'menu';
|
|
9560
|
+
|
|
9561
|
+
if (parentName) {
|
|
9562
|
+
locale = "".concat(parentName, ".").concat(item.name);
|
|
9563
|
+
} else {
|
|
9564
|
+
locale = "menu.".concat(item.name);
|
|
9565
|
+
}
|
|
9566
|
+
|
|
9567
|
+
var result = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
9568
|
+
name: umi.formatMessage && umi.formatMessage({
|
|
9569
|
+
id: locale,
|
|
9570
|
+
defaultMessage: item.name
|
|
9571
|
+
}) || item.name,
|
|
9572
|
+
locale: locale,
|
|
9573
|
+
authority: item.authority || parentAuthority
|
|
9574
|
+
});
|
|
9575
|
+
|
|
9576
|
+
if (item.routes) {
|
|
9577
|
+
var children = formatter(item.routes, item.authority, locale); // Reduce memory usage
|
|
9578
|
+
|
|
9579
|
+
result.children = children;
|
|
9580
|
+
}
|
|
9581
|
+
|
|
9582
|
+
delete result.routes;
|
|
9583
|
+
return result;
|
|
9584
|
+
}).filter(function (item) {
|
|
9585
|
+
return item;
|
|
9586
|
+
});
|
|
9587
|
+
};
|
|
9588
|
+
var memoizeOneFormatter = memoizeOne(formatter, isEqual__default['default']);
|
|
9589
|
+
var go2BackAndClose = function go2BackAndClose() {
|
|
9590
|
+
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
9591
|
+
umi.history.goBack();
|
|
9592
|
+
};
|
|
9593
|
+
|
|
9610
9594
|
var css_248z$9 = ".detail_page_head {\n height: 54px;\n display: flex;\n align-items: center;\n background-color: #FFFFFF;\n border-bottom: 1px solid #f0f0f0;\n}\n.detail_page_head .ant-breadcrumb {\n display: block !important;\n}\n.detail_page_head .ant-breadcrumb .ant-breadcrumb-separator {\n margin: 0 2px;\n}\n.detail_page_head .ant-breadcrumb li .bread_name {\n color: #8A8F8D;\n font-size: 12px;\n cursor: pointer;\n}\n.detail_page_head .ant-breadcrumb li .bread_name:hover {\n color: #000000d9;\n}\n.back_home_img_content {\n display: inline-block;\n height: 28px;\n width: 28px;\n border: 1px solid #BABABA;\n margin: 0 12px 0 20px;\n border-radius: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.back_home_img_content .anticon-arrow-left {\n color: #BABABA;\n}\n.back_home_img_content:hover {\n background-color: #005CFF;\n border: 1px solid #005CFF;\n}\n.back_home_img_content:hover .anticon-arrow-left {\n color: #FFFFFF;\n}\n.detail_page_title_box {\n flex-grow: 1;\n}\n.detail_page_title {\n height: 20px;\n font-family: PingFangSC;\n font-weight: 600;\n font-size: 16px;\n margin-top: 2px;\n color: #000000;\n letter-spacing: 0;\n line-height: 20px;\n}\n.detail_page_btns {\n display: flex;\n gap: 8px;\n margin-right: 20px;\n}\n.detail_page_btns button {\n height: 32px !important;\n display: flex;\n align-items: center;\n gap: 2px;\n border-radius: 3px;\n padding: 0 10px;\n}\n.detail_page_btns .ant-btn-dangerous {\n background-color: #EC5246 !important;\n}\n";
|
|
9611
9595
|
styleInject(css_248z$9);
|
|
9612
9596
|
|
|
@@ -16597,7 +16581,6 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
16597
16581
|
visible: visible,
|
|
16598
16582
|
onOk: this.handleOk,
|
|
16599
16583
|
onCancel: this.handleCancel,
|
|
16600
|
-
getContainer: getModalContainer,
|
|
16601
16584
|
footer: [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
16602
16585
|
key: "back",
|
|
16603
16586
|
onClick: this.handleReset
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare function downloadExcel(data: any, fileName?: any, isResUrl?: bool
|
|
|
2
2
|
export declare const formatter: (data: any, parentAuthority: any, parentName: any) => any;
|
|
3
3
|
export declare const memoizeOneFormatter: import("memoize-one").MemoizedFn<(data: any, parentAuthority: any, parentName: any) => any>;
|
|
4
4
|
export declare const go2BackAndClose: () => void;
|
|
5
|
-
export declare const getModalContainer: () => HTMLElement;
|
package/package.json
CHANGED
|
@@ -26,7 +26,6 @@ import fixedRight from '../../../assets/fixed-right.svg';
|
|
|
26
26
|
import fixedRightActive from '../../../assets/fixed-right-active.svg';
|
|
27
27
|
import './index.less';
|
|
28
28
|
import ENUM from '@/utils/enumConfig';
|
|
29
|
-
import { getModalContainer } from '../../../utils/utils';
|
|
30
29
|
|
|
31
30
|
const DragHandle = SortableHandle(() => <img src={drag} />);
|
|
32
31
|
|
|
@@ -603,7 +602,6 @@ class SortableTable extends React.Component {
|
|
|
603
602
|
visible={visible}
|
|
604
603
|
onOk={this.handleOk}
|
|
605
604
|
onCancel={this.handleCancel}
|
|
606
|
-
getContainer={getModalContainer}
|
|
607
605
|
footer={[
|
|
608
606
|
<Button key="back" onClick={this.handleReset}>
|
|
609
607
|
恢复默认
|
|
@@ -4,7 +4,6 @@ import { Modal } from 'antd';
|
|
|
4
4
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { history } from 'umi';
|
|
7
|
-
import { getModalContainer } from '@/utils/utils';
|
|
8
7
|
|
|
9
8
|
interface actionItem {
|
|
10
9
|
[propName: string]: any;
|
|
@@ -41,7 +40,6 @@ export const doDetailPageAction = (config: actionItem) => {
|
|
|
41
40
|
confirm({
|
|
42
41
|
title: config.title,
|
|
43
42
|
icon: <ExclamationCircleOutlined />,
|
|
44
|
-
getContainer: getModalContainer,
|
|
45
43
|
content: config.content,
|
|
46
44
|
okText: '确定',
|
|
47
45
|
okType: 'danger',
|
|
@@ -19,7 +19,6 @@ import axios from 'axios';
|
|
|
19
19
|
// import { request } from 'umi';
|
|
20
20
|
import './index.less';
|
|
21
21
|
import ENUM from '@/utils/enumConfig';
|
|
22
|
-
import { getModalContainer } from '../../../utils/utils';
|
|
23
22
|
|
|
24
23
|
interface SortTableProps {
|
|
25
24
|
[propName: string]: any;
|
|
@@ -567,7 +566,6 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
567
566
|
<Modal
|
|
568
567
|
title="设置表头内容"
|
|
569
568
|
wrapClassName={'sort_table_wrapper'}
|
|
570
|
-
getContainer={getModalContainer}
|
|
571
569
|
width={820}
|
|
572
570
|
visible={visible}
|
|
573
571
|
onOk={this.handleOk}
|
|
@@ -10,7 +10,6 @@ import './index.less';
|
|
|
10
10
|
import { BusinessSearchSelect, QueryMutipleInput } from '@/index';
|
|
11
11
|
import { Resizable } from 'react-resizable';
|
|
12
12
|
import { checkQuantityAccuracy, precisionQuantity } from '@/utils/checkUtils';
|
|
13
|
-
import { getModalContainer } from '@/utils/utils';
|
|
14
13
|
|
|
15
14
|
const loadSelectSource = (url: string, params?: any) => {
|
|
16
15
|
return new Promise((resolve, reject) => {
|
|
@@ -876,7 +875,6 @@ const AddSelect = (props: any) => {
|
|
|
876
875
|
bodyStyle={{ padding: '0px' }}
|
|
877
876
|
// title={modalTableProps?.modalTableTitle}
|
|
878
877
|
visible={isModalVisible}
|
|
879
|
-
getContainer={getModalContainer}
|
|
880
878
|
closable={false}
|
|
881
879
|
onCancel={handleCancel}
|
|
882
880
|
footer={selectMode ? [
|
|
@@ -10,7 +10,6 @@ import React, { useState, useEffect } from 'react';
|
|
|
10
10
|
import { useDebounceFn } from 'ahooks';
|
|
11
11
|
import { Input, Button, Modal } from 'antd';
|
|
12
12
|
import './index.less';
|
|
13
|
-
import { getModalContainer } from '@/utils/utils';
|
|
14
13
|
|
|
15
14
|
const QueryMutipleInput = ({ onValueChange }) => {
|
|
16
15
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
@@ -80,7 +79,6 @@ const QueryMutipleInput = ({ onValueChange }) => {
|
|
|
80
79
|
</div>
|
|
81
80
|
<Modal
|
|
82
81
|
width={600}
|
|
83
|
-
getContainer={getModalContainer}
|
|
84
82
|
title="多值录入"
|
|
85
83
|
visible={isModalVisible}
|
|
86
84
|
onOk={handleOk}
|
|
@@ -8,7 +8,6 @@ import { stringify } from 'querystring';
|
|
|
8
8
|
import _ from "lodash"
|
|
9
9
|
import './index.less';
|
|
10
10
|
import { BusinessSearchSelect, QueryMutipleInput } from '@/index';
|
|
11
|
-
import { getModalContainer } from '@/utils/utils';
|
|
12
11
|
|
|
13
12
|
const { Option } = Select;
|
|
14
13
|
|
|
@@ -744,7 +743,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
744
743
|
<Modal
|
|
745
744
|
width='80%'
|
|
746
745
|
title={modalTableProps?.modalTableTitle}
|
|
747
|
-
getContainer={getModalContainer}
|
|
748
746
|
visible={isModalVisible}
|
|
749
747
|
onOk={handleOk}
|
|
750
748
|
onCancel={handleCancel}
|
package/src/utils/utils.ts
CHANGED
|
@@ -55,15 +55,4 @@ export const memoizeOneFormatter = memoizeOne(formatter, isEqual);
|
|
|
55
55
|
export const go2BackAndClose = () => {
|
|
56
56
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
57
57
|
history.goBack();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const getModalContainer = () => {
|
|
61
|
-
try {
|
|
62
|
-
if (window.top != window && window.parent.document) {
|
|
63
|
-
return window.parent.document.body
|
|
64
|
-
}
|
|
65
|
-
} catch (error) {
|
|
66
|
-
console.log(error)
|
|
67
|
-
}
|
|
68
|
-
return document.body;
|
|
69
58
|
}
|