wt-enjoy-link-antd-repack 4.1.25 → 4.1.27
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/esm/component/BiuAButton/index.js +2 -2
- package/dist/esm/component/BiuADatePicker/index.d.ts +3 -3
- package/dist/esm/component/BiuAForm/index.d.ts +1 -1
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +4 -4
- package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +1 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.js +14 -7
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuField/component/userSelect.js +2 -2
- package/dist/esm/component/BiuForm/index.js +10 -22
- package/dist/esm/component/BiuMapSelectSite/index.js +5 -5
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +7 -11
- package/dist/esm/component/BiuResizeTable/index.js +2 -2
- package/dist/esm/component/BiuTable/component/tableCellRender.js +1 -1
- package/dist/esm/component/BiuTable/index.d.ts +0 -2
- package/dist/esm/component/BiuTable/index.js +157 -180
- package/dist/esm/component/BiuTable/type.d.ts +0 -4
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/dist/esm/hooks/useAuth.js +1 -1
- package/dist/esm/hooks/useCurrentSystem.js +5 -5
- package/dist/esm/hooks/useUserInfo.js +5 -5
- package/dist/esm/utils/authUtils.js +6 -6
- package/package.json +3 -3
@@ -3,6 +3,6 @@ import React from 'react';
|
|
3
3
|
import { styled } from 'styled-components';
|
4
4
|
var StyledAButton = styled(Button).withConfig({
|
5
5
|
displayName: "StyledAButton",
|
6
|
-
componentId: "
|
7
|
-
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}
|
6
|
+
componentId: "enjoy-link-antd-repack__sc-x0nsue-0"
|
7
|
+
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}"]);
|
8
8
|
export var BiuAButton = /*#__PURE__*/React.memo(StyledAButton);
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export declare const BiuADatePicker: React.NamedExoticComponent<import("styled-components/dist/types").Substitute<(import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
|
3
|
-
status?: "" | "
|
3
|
+
status?: "" | "error" | "warning" | undefined;
|
4
4
|
dropdownClassName?: string | undefined;
|
5
5
|
popupClassName?: string | undefined;
|
6
6
|
}) & React.RefAttributes<React.Component<import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
|
7
|
-
status?: "" | "
|
7
|
+
status?: "" | "error" | "warning" | undefined;
|
8
8
|
dropdownClassName?: string | undefined;
|
9
9
|
popupClassName?: string | undefined;
|
10
10
|
}, unknown, any>>, import("styled-components/dist/types").BaseObject>>;
|
11
11
|
export declare const BiuAMouthPicker: React.MemoExoticComponent<import("antd/lib/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
|
12
|
-
status?: "" | "
|
12
|
+
status?: "" | "error" | "warning" | undefined;
|
13
13
|
dropdownClassName?: string | undefined;
|
14
14
|
popupClassName?: string | undefined;
|
15
15
|
}, "picker">, unknown>>;
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
2
2
|
export { Form as BiuAForm } from 'antd';
|
3
3
|
export declare const BiuAFormItem: React.MemoExoticComponent<(<Values = any>(props: import("antd").FormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
4
4
|
useStatus: () => {
|
5
|
-
status?: "" | "success" | "
|
5
|
+
status?: "" | "success" | "error" | "warning" | "validating" | undefined;
|
6
6
|
};
|
7
7
|
}>;
|
@@ -17,7 +17,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
18
18
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
-
import { useBoolean, useMount,
|
20
|
+
import { useBoolean, useMount, useSessionStorageState, useToggle } from 'ahooks';
|
21
21
|
import { Checkbox, TreeSelect } from 'antd';
|
22
22
|
import { isFunction } from 'lodash';
|
23
23
|
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
@@ -266,9 +266,9 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
266
266
|
_useBoolean2$ = _useBoolean2[1],
|
267
267
|
setFalse = _useBoolean2$.setFalse,
|
268
268
|
setTrue = _useBoolean2$.setTrue;
|
269
|
-
var
|
270
|
-
|
271
|
-
linkUserInfo =
|
269
|
+
var _useSessionStorageSta = useSessionStorageState(BUBU100_CACHE_USERINFO_KEY),
|
270
|
+
_useSessionStorageSta2 = _slicedToArray(_useSessionStorageSta, 1),
|
271
|
+
linkUserInfo = _useSessionStorageSta2[0];
|
272
272
|
|
273
273
|
/**
|
274
274
|
* 初始化的时候获取数据源,需要注意的是,固定参数不支持后续更改
|
@@ -5,5 +5,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
5
5
|
onChangeData?: ((value: any, record: any) => void) | undefined;
|
6
6
|
isFirstLoad?: boolean | undefined;
|
7
7
|
isAutoComplete?: boolean | undefined;
|
8
|
+
locationType?: number | undefined;
|
8
9
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
9
10
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete"];
|
2
|
+
var _excluded = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete", "locationType"];
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -42,18 +42,24 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
42
42
|
isFirstLoad = _props$isFirstLoad === void 0 ? true : _props$isFirstLoad,
|
43
43
|
_props$isAutoComplete = props.isAutoComplete,
|
44
44
|
isAutoComplete = _props$isAutoComplete === void 0 ? true : _props$isAutoComplete,
|
45
|
+
locationType = props.locationType,
|
45
46
|
restProps = _objectWithoutProperties(props, _excluded);
|
46
47
|
var _useState3 = useState(isFirstLoad),
|
47
48
|
_useState4 = _slicedToArray(_useState3, 2),
|
48
49
|
isFirstLoadSearch = _useState4[0],
|
49
50
|
setIsFirstLoadSearch = _useState4[1];
|
50
51
|
useEffect(function () {
|
51
|
-
if (!locationId) {
|
52
|
+
if (!locationType && !locationId) {
|
53
|
+
setResult([]);
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
if (locationType == 2 && !locationId) {
|
52
57
|
setResult([]);
|
53
58
|
return;
|
54
59
|
}
|
55
60
|
getLpnList({
|
56
|
-
locationId: locationId
|
61
|
+
locationId: locationId,
|
62
|
+
locationType: locationType
|
57
63
|
}).then(function (res) {
|
58
64
|
var data = res.map(function (item) {
|
59
65
|
return _objectSpread(_objectSpread({}, item), {}, {
|
@@ -64,16 +70,17 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
64
70
|
});
|
65
71
|
setResult(data || []);
|
66
72
|
});
|
67
|
-
}, [locationId, isFirstLoadSearch]);
|
73
|
+
}, [locationId, isFirstLoadSearch, locationType]);
|
68
74
|
var onSearch = useCallback(function () {
|
69
75
|
setIsFirstLoadSearch(true);
|
70
76
|
}, []);
|
71
77
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
72
78
|
children: [isAutoComplete && /*#__PURE__*/_jsx(AutoComplete, {
|
73
|
-
popupClassName: "certain-category-search-dropdown"
|
74
|
-
dropdownMatchSelectWidth
|
79
|
+
popupClassName: "certain-category-search-dropdown"
|
80
|
+
// dropdownMatchSelectWidth={100}
|
81
|
+
,
|
75
82
|
style: {
|
76
|
-
width: 100
|
83
|
+
width: '100%'
|
77
84
|
},
|
78
85
|
options: result,
|
79
86
|
placeholder: "\u8BF7\u9009\u62E9\u6258\u76D8",
|
@@ -9,7 +9,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
9
9
|
/**
|
10
10
|
* 0:入库 1:出库 2:移库 3:冻结 4:调整 5:属性变更
|
11
11
|
*/
|
12
|
-
orderType: 0 |
|
12
|
+
orderType: 0 | 1 | 2 | 3 | 5 | 4;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -54,7 +54,7 @@ var flatSubValue = function flatSubValue(departList, currentId) {
|
|
54
54
|
return subObj;
|
55
55
|
};
|
56
56
|
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
57
|
-
var
|
57
|
+
var _sessionStorage$getIt;
|
58
58
|
var mode = props.isModel,
|
59
59
|
onChange = props.onChange,
|
60
60
|
onChangeData = props.onChangeData,
|
@@ -65,7 +65,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
65
65
|
_props$isEnable = props.isEnable,
|
66
66
|
isEnable = _props$isEnable === void 0 ? 0 : _props$isEnable,
|
67
67
|
restProps = _objectWithoutProperties(props, _excluded);
|
68
|
-
var linkUserInfo = JSON.parse((
|
68
|
+
var linkUserInfo = JSON.parse((_sessionStorage$getIt = sessionStorage.getItem(BUBU100_CACHE_USERINFO_KEY)) !== null && _sessionStorage$getIt !== void 0 ? _sessionStorage$getIt : '{}');
|
69
69
|
var _useState = useState([]),
|
70
70
|
_useState2 = _slicedToArray(_useState, 2),
|
71
71
|
userList = _useState2[0],
|
@@ -26,22 +26,16 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
import { createElement as _createElement } from "react";
|
27
27
|
var StyledLabel = styled.div.withConfig({
|
28
28
|
displayName: "StyledLabel",
|
29
|
-
componentId: "
|
29
|
+
componentId: "enjoy-link-antd-repack__sc-emj5jb-0"
|
30
30
|
})(["font-size:14px;font-weight:normal;height:26px;line-height:26px;display:flex;flex-direction:row;"]);
|
31
31
|
|
32
32
|
/**
|
33
33
|
* 渲染表单 标签
|
34
34
|
* @param title
|
35
35
|
*/
|
36
|
-
|
37
36
|
var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
38
37
|
var title = props.title,
|
39
|
-
labelWidth = props.labelWidth
|
40
|
-
_props$colon = props.colon,
|
41
|
-
colon = _props$colon === void 0 ? true : _props$colon,
|
42
|
-
_props$labelAlign = props.labelAlign,
|
43
|
-
labelAlign = _props$labelAlign === void 0 ? 'right' : _props$labelAlign;
|
44
|
-
console.log("日志", colon);
|
38
|
+
labelWidth = props.labelWidth;
|
45
39
|
return /*#__PURE__*/_jsx(Tooltip, {
|
46
40
|
getPopupContainer: function getPopupContainer() {
|
47
41
|
return document.body;
|
@@ -51,8 +45,7 @@ var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
|
51
45
|
children: /*#__PURE__*/_jsxs(StyledLabel, {
|
52
46
|
style: {
|
53
47
|
width: labelWidth,
|
54
|
-
maxWidth: labelWidth
|
55
|
-
textAlign: labelAlign
|
48
|
+
maxWidth: labelWidth
|
56
49
|
},
|
57
50
|
children: [/*#__PURE__*/_jsx("span", {
|
58
51
|
style: {
|
@@ -62,19 +55,19 @@ var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
|
62
55
|
whiteSpace: 'nowrap'
|
63
56
|
},
|
64
57
|
children: title
|
65
|
-
}),
|
58
|
+
}), /*#__PURE__*/_jsx("span", {
|
66
59
|
style: {
|
67
60
|
padding: '0 8px 0 0'
|
68
61
|
},
|
69
62
|
children: "\xA0:"
|
70
|
-
})
|
63
|
+
})]
|
71
64
|
})
|
72
65
|
});
|
73
66
|
});
|
74
67
|
var StyledForm = styled(BiuAForm).withConfig({
|
75
68
|
displayName: "StyledForm",
|
76
|
-
componentId: "
|
77
|
-
})([".ant-col{}.arco-form-item-label{font-size:14px;}.ant-form-item-label > label::after{margin:0px !important;}"]);
|
69
|
+
componentId: "enjoy-link-antd-repack__sc-emj5jb-1"
|
70
|
+
})([".ant-col{padding:0px !important;}.arco-form-item-label{font-size:14px;}.ant-form-item-label > label::after{margin:0px !important;}"]);
|
78
71
|
export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
79
72
|
var _props$columns = props.columns,
|
80
73
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
@@ -132,7 +125,6 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
132
125
|
form: form,
|
133
126
|
onFinish: onFinish,
|
134
127
|
children: /*#__PURE__*/_jsxs(Row, {
|
135
|
-
gutter: [50, 8],
|
136
128
|
children: [columns.map(function (_ref, index) {
|
137
129
|
var dataIndex = _ref.dataIndex,
|
138
130
|
initialValue = _ref.initialValue,
|
@@ -158,9 +150,7 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
158
150
|
colon: false,
|
159
151
|
label: /*#__PURE__*/_jsx(FormLabelRender, _objectSpread({
|
160
152
|
labelWidth: formItemLabelWidth || labelWidth,
|
161
|
-
title: title
|
162
|
-
colon: false,
|
163
|
-
labelAlign: "left"
|
153
|
+
title: title
|
164
154
|
}, restProps)),
|
165
155
|
children: /*#__PURE__*/_jsx(BiuAFormItem, {
|
166
156
|
noStyle: true,
|
@@ -192,9 +182,7 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
192
182
|
required: false
|
193
183
|
}],
|
194
184
|
label: /*#__PURE__*/_jsx(FormLabelRender, _objectSpread(_objectSpread({
|
195
|
-
title: title
|
196
|
-
colon: false,
|
197
|
-
labelAlign: "left"
|
185
|
+
title: title
|
198
186
|
}, restProps), {}, {
|
199
187
|
labelWidth: formItemLabelWidth || labelWidth
|
200
188
|
})),
|
@@ -219,7 +207,7 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
219
207
|
}), /*#__PURE__*/_createElement(Col, _objectSpread(_objectSpread({}, atLine ? operationLayout : FORM_COL_LAYOUT.default), {}, {
|
220
208
|
key: "advaceSearch",
|
221
209
|
style: {
|
222
|
-
textAlign: atLine ? 'right' : '
|
210
|
+
textAlign: atLine ? 'right' : 'left'
|
223
211
|
}
|
224
212
|
}), /*#__PURE__*/_jsx(BiuAFormItem, {
|
225
213
|
labelCol: {
|
@@ -26,15 +26,15 @@ var map;
|
|
26
26
|
var geocoder;
|
27
27
|
var StyledModal = styled(Modal).withConfig({
|
28
28
|
displayName: "StyledModal",
|
29
|
-
componentId: "enjoy-link-antd-repack__sc-
|
29
|
+
componentId: "wt-enjoy-link-antd-repack__sc-1kji0ud-0"
|
30
30
|
})(["display:flex;align-items:center;justify-content:center;.ant-modal{padding-bottom:0;}"]);
|
31
31
|
var StyledMapDiv = styled.div.withConfig({
|
32
32
|
displayName: "StyledMapDiv",
|
33
|
-
componentId: "enjoy-link-antd-repack__sc-
|
33
|
+
componentId: "wt-enjoy-link-antd-repack__sc-1kji0ud-1"
|
34
34
|
})(["position:relative;flex:1 1 570px;.map-content{height:100%;}img{position:absolute;top:50%;left:50%;}"]);
|
35
35
|
var StyledGeoLocationDiv = styled.div.withConfig({
|
36
36
|
displayName: "StyledGeoLocationDiv",
|
37
|
-
componentId: "enjoy-link-antd-repack__sc-
|
37
|
+
componentId: "wt-enjoy-link-antd-repack__sc-1kji0ud-2"
|
38
38
|
})(["position:absolute;right:4px;bottom:10px;width:35px;height:35px;background:#fff url('https://webapi.amap.com/theme/v1.3/markers/b/loc_gray.png') 50% 50% no-repeat;border:1px solid #ccc;border-radius:3px;cursor:pointer;"]);
|
39
39
|
export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
|
40
40
|
_inherits(BiuMapSelectSite, _React$PureComponent);
|
@@ -74,7 +74,7 @@ export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
|
|
74
74
|
_defineProperty(_assertThisInitialized(_this), "placeSearch", null);
|
75
75
|
_defineProperty(_assertThisInitialized(_this), "init", function () {
|
76
76
|
window._AMapSecurityConfig = {
|
77
|
-
securityJsCode: '
|
77
|
+
securityJsCode: 'c080bcca0b7ded38b6d8cd8e6093946f'
|
78
78
|
};
|
79
79
|
var start = function start() {
|
80
80
|
// 初次加载如果已存在则注销
|
@@ -126,7 +126,7 @@ export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
|
|
126
126
|
};
|
127
127
|
if (!AMap) {
|
128
128
|
AMapLoader.load({
|
129
|
-
key: '
|
129
|
+
key: 'c25e742146a48457dc5eefa6688eb5b6',
|
130
130
|
// 申请好的Web端开发者Key,首次调用 load 时必填
|
131
131
|
version: '2.0',
|
132
132
|
plugins: ['AMap.Geocoder', 'AMap.PlaceSearch', 'AMap.LngLat']
|
@@ -24,10 +24,6 @@ export var TableCell = function TableCell(props) {
|
|
24
24
|
var _, _props$children;
|
25
25
|
return (_ = ((_props$children = props === null || props === void 0 ? void 0 : props.children) !== null && _props$children !== void 0 ? _props$children : ['', ''])[1]) !== null && _ !== void 0 ? _ : '';
|
26
26
|
}, [props === null || props === void 0 ? void 0 : props.children]);
|
27
|
-
var isSelection = useMemo(function () {
|
28
|
-
var className = props.className;
|
29
|
-
return className.indexOf('ant-table-selection-column') > -1;
|
30
|
-
}, [props === null || props === void 0 ? void 0 : props.className]);
|
31
27
|
if (['行号', '操作'].includes(title)) {
|
32
28
|
return /*#__PURE__*/_createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
33
29
|
key: title,
|
@@ -36,11 +32,11 @@ export var TableCell = function TableCell(props) {
|
|
36
32
|
whiteSpace: 'nowrap',
|
37
33
|
overflow: 'hidden',
|
38
34
|
textOverflow: 'ellipsis',
|
39
|
-
fontSize:
|
35
|
+
fontSize: 12
|
40
36
|
}, style), {}, {
|
41
37
|
boxSizing: 'border-box',
|
42
|
-
color: '
|
43
|
-
backgroundColor: '#
|
38
|
+
color: 'rgb(78, 89, 105)',
|
39
|
+
backgroundColor: '#F2F3F5',
|
44
40
|
textAlign: 'center',
|
45
41
|
fontWeight: '600'
|
46
42
|
})
|
@@ -66,11 +62,11 @@ export var TableCell = function TableCell(props) {
|
|
66
62
|
overflow: 'hidden',
|
67
63
|
textOverflow: 'ellipsis'
|
68
64
|
}, style), {}, {
|
69
|
-
fontSize:
|
65
|
+
fontSize: 12,
|
70
66
|
boxSizing: 'border-box',
|
71
|
-
color: '
|
72
|
-
backgroundColor: '#
|
73
|
-
textAlign:
|
67
|
+
color: 'rgb(78, 89, 105)',
|
68
|
+
backgroundColor: '#F2F3F5',
|
69
|
+
textAlign: 'center',
|
74
70
|
fontWeight: '600'
|
75
71
|
})
|
76
72
|
}))
|
@@ -15,8 +15,8 @@ import { TableCell } from "./component";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
16
|
var StyledTable = styled(Table).withConfig({
|
17
17
|
displayName: "StyledTable",
|
18
|
-
componentId: "
|
19
|
-
})([".
|
18
|
+
componentId: "enjoy-link-antd-repack__sc-1lp56n3-0"
|
19
|
+
})([".react-resizable{position:relative;background-clip:padding-box;}.react-resizable-handle{position:absolute;width:10px;height:100%;bottom:0;right:-5px;cursor:col-resize;background-image:none;z-index:1;}"]);
|
20
20
|
export var BiuResizeTable = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
21
21
|
var columns = _ref.columns,
|
22
22
|
_ref$isCellEdit = _ref.isCellEdit,
|
@@ -21,7 +21,7 @@ var ColumnActionItem = /*#__PURE__*/React.memo(function (props) {
|
|
21
21
|
title = props.title,
|
22
22
|
onLinkClick = props.onLinkClick;
|
23
23
|
var resolveCodeList = [];
|
24
|
-
var cacheButtonAuth =
|
24
|
+
var cacheButtonAuth = sessionStorage.getItem(BUBU100_CACHE_AUTH_BUTTON_KEY);
|
25
25
|
if (cacheButtonAuth) {
|
26
26
|
resolveCodeList = JSON.parse(cacheButtonAuth).resolveCodeList || [];
|
27
27
|
}
|
@@ -16,7 +16,6 @@ export declare const TableInstance: React.MemoExoticComponent<React.ForwardRefEx
|
|
16
16
|
onPageChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
17
17
|
onPageShowSizeChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
18
18
|
rowKey?: string | undefined;
|
19
|
-
isPage?: boolean | undefined;
|
20
19
|
onReset?: (() => void) | undefined;
|
21
20
|
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
22
21
|
export declare const BiuTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
@@ -35,7 +34,6 @@ export declare const BiuTable: React.MemoExoticComponent<React.ForwardRefExoticC
|
|
35
34
|
onPageChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
36
35
|
onPageShowSizeChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
37
36
|
rowKey?: string | undefined;
|
38
|
-
isPage?: boolean | undefined;
|
39
37
|
onReset?: (() => void) | undefined;
|
40
38
|
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
41
39
|
export * from './component';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["searchForm", "tablePostfixOptions", "operationOptions", "containerStyle", "headLine", "rowKey", "dataAllocation", "postData", "request", "columns", "hidePagination", "rowSelection", "onPageChange", "onPageShowSizeChange", "onRow", "onReset", "loading"
|
2
|
+
var _excluded = ["searchForm", "tablePostfixOptions", "operationOptions", "containerStyle", "headLine", "rowKey", "dataAllocation", "postData", "request", "columns", "hidePagination", "rowSelection", "onPageChange", "onPageShowSizeChange", "onRow", "onReset", "loading"];
|
3
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
4
4
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
5
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -36,41 +36,27 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
36
36
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
37
37
|
var ContainerWrapper = styled.div.withConfig({
|
38
38
|
displayName: "ContainerWrapper",
|
39
|
-
componentId: "
|
40
|
-
})(["height:100%;display:flex;flex-direction:column;background-color
|
41
|
-
return props.isPage ? 'none' : '#ffffff';
|
42
|
-
});
|
39
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-0"
|
40
|
+
})(["height:100%;display:flex;flex-direction:column;background-color:#fff;.ant-popover-inner-content{padding:4px !important;}"]);
|
43
41
|
var ActionWrapper = styled.div.withConfig({
|
44
42
|
displayName: "ActionWrapper",
|
45
|
-
componentId: "
|
46
|
-
})(["display:flex;justify-content:space-between;box-sizing:border-box;width:calc(100% - 16px);border-top:1px solid #f0f0f0;
|
47
|
-
return props.isPage ? "\n & {\n border-top: none;\n padding: 0 0 16px 0;\n margin: 0;\n }\n " : '';
|
48
|
-
});
|
43
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-1"
|
44
|
+
})(["display:flex;justify-content:space-between;box-sizing:border-box;width:calc(100% - 16px);margin:0 8px;padding:8px 0;border-top:1px solid #f0f0f0;flex-direction:row-reverse;"]);
|
49
45
|
var HeaderWrapper = styled.div.withConfig({
|
50
46
|
displayName: "HeaderWrapper",
|
51
|
-
componentId: "
|
52
|
-
})(["flex-grow:0;
|
53
|
-
return props.isPage ? "\n background: #ffffff;\n border-radius: 4px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n margin-bottom: 20px;\n padding: 16px 15px;\n " : '';
|
54
|
-
});
|
55
|
-
var ContentWrapper = styled.div.withConfig({
|
56
|
-
displayName: "ContentWrapper",
|
57
|
-
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-3"
|
58
|
-
})(["flex:1;display:flex;flex-direction:column;overflow:hidden;", ""], function (props) {
|
59
|
-
return props.isPage ? "\n & {\n background: #ffffff;\n border-radius: 4px;\n padding: 16px 20px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n }\n " : '';
|
60
|
-
});
|
47
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-2"
|
48
|
+
})(["flex-grow:0;"]);
|
61
49
|
var FooterWrapper = styled.div.withConfig({
|
62
50
|
displayName: "FooterWrapper",
|
63
|
-
componentId: "
|
51
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-3"
|
64
52
|
})(["margin:0 8px;display:flex;justify-content:space-between;box-sizing:border-box;flex-direction:row-reverse;"]);
|
65
53
|
var StyledResizeTable = styled(BiuResizeTable).withConfig({
|
66
54
|
displayName: "StyledResizeTable",
|
67
|
-
componentId: "
|
68
|
-
})(["display:block;flex-grow:1;overflow:hidden;height:100% !important;.ant-table-
|
69
|
-
return props.isPage ? "\n & {\n padding: 0\n }\n " : '';
|
70
|
-
});
|
55
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-4"
|
56
|
+
})(["display:block;flex-grow:1;padding:0 8px;overflow:hidden;height:100% !important;.ant-table-tbody > .ant-table-row > td{padding:6px !important;min-height:36px !important;height:36px !important;line-height:22px !important;}.ant-table-wrapper{height:100% !important;}.ant-spin-nested-loading{height:100% !important;}.ant-spin-container{height:100% !important;}.ant-table{height:100% !important;border-bottom:1px solid #f0f0f0 !important;}.ant-table-container{height:100% !important;display:flex;flex-direction:column;}.ant-table-body{flex:1;}.ant-table-row{font-size:12px;font-weight:normal;}"]);
|
71
57
|
var SummaryWrapper = styled.div.withConfig({
|
72
58
|
displayName: "SummaryWrapper",
|
73
|
-
componentId: "
|
59
|
+
componentId: "enjoy-link-antd-repack__sc-nmnqwf-5"
|
74
60
|
})(["display:flex;height:36px;line-height:36px;font-size:16px;font-weight:bold;"]);
|
75
61
|
export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
76
62
|
var rootRef = useRef();
|
@@ -96,8 +82,6 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
96
82
|
onReset = props.onReset,
|
97
83
|
_props$loading = props.loading,
|
98
84
|
tabLoading = _props$loading === void 0 ? false : _props$loading,
|
99
|
-
_props$isPage = props.isPage,
|
100
|
-
isPage = _props$isPage === void 0 ? false : _props$isPage,
|
101
85
|
restProps = _objectWithoutProperties(props, _excluded);
|
102
86
|
var formRef = useRef(null);
|
103
87
|
var searchParams = useRef({});
|
@@ -156,23 +140,17 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
156
140
|
return /*#__PURE__*/_jsxs(ContainerWrapper, {
|
157
141
|
ref: rootRef,
|
158
142
|
style: _objectSpread({}, containerStyle),
|
159
|
-
|
160
|
-
|
161
|
-
isPage: isPage,
|
162
|
-
children: searchForm ? /*#__PURE__*/_jsx(BiuForm, {
|
143
|
+
children: [/*#__PURE__*/_jsxs(HeaderWrapper, {
|
144
|
+
children: [searchForm ? /*#__PURE__*/_jsx(BiuForm, {
|
163
145
|
ref: formRef,
|
164
146
|
headLine: headLine,
|
165
147
|
columns: formColumns,
|
166
148
|
onSubmit: onSubmit,
|
167
149
|
onReset: onReset
|
168
|
-
}) : null
|
169
|
-
}), /*#__PURE__*/_jsxs(ContentWrapper, {
|
170
|
-
isPage: isPage,
|
171
|
-
children: [/*#__PURE__*/_jsxs(ActionWrapper, {
|
172
|
-
isPage: isPage,
|
150
|
+
}) : null, /*#__PURE__*/_jsxs(ActionWrapper, {
|
173
151
|
children: [/*#__PURE__*/_jsx("div", {
|
174
152
|
style: {
|
175
|
-
paddingRight:
|
153
|
+
paddingRight: 8
|
176
154
|
},
|
177
155
|
children: /*#__PURE__*/_jsx(Popover, {
|
178
156
|
autoAdjustOverflow: true,
|
@@ -203,167 +181,166 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
203
181
|
formRef: formRef,
|
204
182
|
operationOptions: operationOptions
|
205
183
|
})]
|
206
|
-
})
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
}
|
184
|
+
})]
|
185
|
+
}), /*#__PURE__*/_jsx(StyledResizeTable, _objectSpread({
|
186
|
+
rowKey: rowKey,
|
187
|
+
loading: tabLoading || loading,
|
188
|
+
rowSelection: _objectSpread(_objectSpread({}, rowSelection), {}, {
|
189
|
+
selectedRowKeys: selectedRowKeys,
|
190
|
+
onChange: function onChange(currentSelectedRowKeys, selectedRows) {
|
191
|
+
setSelectedRowKeys(currentSelectedRowKeys);
|
192
|
+
/**
|
193
|
+
* 使用外部事件覆盖内部事件,需要注意的时候 onChange 事件必须和 selectedRowKeys 结合使用
|
194
|
+
* 配合外部使用时必须全部使用外部控制
|
195
|
+
*/
|
196
|
+
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.onChange) {
|
197
|
+
rowSelection.onChange(currentSelectedRowKeys, selectedRows, {
|
198
|
+
type: 'multiple'
|
199
|
+
});
|
200
|
+
return;
|
224
201
|
}
|
225
|
-
}
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
setSelectedRowKeys(function (ssrk) {
|
234
|
-
var currentSelectedRowKeys = [];
|
235
|
-
if (ssrk.includes(record[rowKey])) {
|
236
|
-
currentSelectedRowKeys = ssrk.filter(function (item) {
|
237
|
-
return item !== record[rowKey];
|
238
|
-
});
|
239
|
-
} else {
|
240
|
-
currentSelectedRowKeys = [].concat(_toConsumableArray(ssrk), [record[rowKey]]);
|
241
|
-
}
|
242
|
-
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.onChange) {
|
243
|
-
rowSelection.onChange(currentSelectedRowKeys, tableDataSource.filter(function (n) {
|
244
|
-
return currentSelectedRowKeys.includes(n[rowKey]);
|
245
|
-
}), {
|
246
|
-
type: 'multiple'
|
247
|
-
});
|
248
|
-
}
|
249
|
-
return currentSelectedRowKeys;
|
250
|
-
});
|
202
|
+
}
|
203
|
+
}),
|
204
|
+
onRow: function onRow(record) {
|
205
|
+
var subEvent = _onRow ? _onRow(record) : {};
|
206
|
+
return _objectSpread(_objectSpread({}, subEvent), {}, {
|
207
|
+
onClick: function onClick(e) {
|
208
|
+
if (subEvent !== null && subEvent !== void 0 && subEvent.onClick) {
|
209
|
+
subEvent === null || subEvent === void 0 || subEvent.onClick(e);
|
251
210
|
}
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
211
|
+
setSelectedRowKeys(function (ssrk) {
|
212
|
+
var currentSelectedRowKeys = [];
|
213
|
+
if (ssrk.includes(record[rowKey])) {
|
214
|
+
currentSelectedRowKeys = ssrk.filter(function (item) {
|
215
|
+
return item !== record[rowKey];
|
216
|
+
});
|
217
|
+
} else {
|
218
|
+
currentSelectedRowKeys = [].concat(_toConsumableArray(ssrk), [record[rowKey]]);
|
219
|
+
}
|
220
|
+
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.onChange) {
|
221
|
+
rowSelection.onChange(currentSelectedRowKeys, tableDataSource.filter(function (n) {
|
222
|
+
return currentSelectedRowKeys.includes(n[rowKey]);
|
223
|
+
}), {
|
224
|
+
type: 'multiple'
|
225
|
+
});
|
226
|
+
}
|
227
|
+
return currentSelectedRowKeys;
|
228
|
+
});
|
229
|
+
}
|
230
|
+
});
|
231
|
+
},
|
232
|
+
bordered: true,
|
233
|
+
columns: tableColumns,
|
234
|
+
pagination: false,
|
235
|
+
scroll: {
|
236
|
+
scrollToFirstRowOnChange: true,
|
237
|
+
x: '100%',
|
238
|
+
y: true
|
239
|
+
},
|
240
|
+
dataSource: tableDataSource
|
241
|
+
}, restProps)), /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsxs(FooterWrapper, {
|
242
|
+
children: [!hidePagination && /*#__PURE__*/_jsx(BiuPagination, {
|
243
|
+
pagination: _objectSpread({
|
244
|
+
showSizeChanger: true
|
245
|
+
}, pagination)
|
246
|
+
}), /*#__PURE__*/_jsxs(SummaryWrapper, {
|
247
|
+
children: [summary !== null && summary !== void 0 && summary.count ? /*#__PURE__*/_jsxs("div", {
|
248
|
+
style: {
|
249
|
+
display: 'flex'
|
250
|
+
},
|
251
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
270
252
|
style: {
|
271
|
-
|
253
|
+
width: '110px'
|
272
254
|
},
|
273
|
-
|
255
|
+
mark: true,
|
256
|
+
children: "\u603B\u6761\u6570:"
|
257
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
258
|
+
placement: "topLeft",
|
259
|
+
title: summary === null || summary === void 0 ? void 0 : summary.count,
|
260
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
274
261
|
style: {
|
275
|
-
width: '
|
262
|
+
width: '100%'
|
276
263
|
},
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
type: "danger",
|
290
|
-
children: summary === null || summary === void 0 ? void 0 : summary.count
|
291
|
-
})
|
292
|
-
})]
|
293
|
-
}) : undefined, summary !== null && summary !== void 0 && summary.quantity ? /*#__PURE__*/_jsxs("div", {
|
264
|
+
ellipsis: true,
|
265
|
+
strong: true,
|
266
|
+
underline: true,
|
267
|
+
type: "danger",
|
268
|
+
children: summary === null || summary === void 0 ? void 0 : summary.count
|
269
|
+
})
|
270
|
+
})]
|
271
|
+
}) : undefined, summary !== null && summary !== void 0 && summary.quantity ? /*#__PURE__*/_jsxs("div", {
|
272
|
+
style: {
|
273
|
+
display: 'flex'
|
274
|
+
},
|
275
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
294
276
|
style: {
|
295
|
-
|
277
|
+
width: '110px'
|
296
278
|
},
|
297
|
-
|
279
|
+
mark: true,
|
280
|
+
children: "\u603B\u6570\u91CF:"
|
281
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
282
|
+
placement: "topLeft",
|
283
|
+
title: summary === null || summary === void 0 ? void 0 : summary.quantity,
|
284
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
298
285
|
style: {
|
299
|
-
width: '
|
286
|
+
width: '100%'
|
300
287
|
},
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
type: "danger",
|
314
|
-
children: summary === null || summary === void 0 ? void 0 : summary.quantity
|
315
|
-
})
|
316
|
-
})]
|
317
|
-
}) : undefined, summary !== null && summary !== void 0 && summary.weight ? /*#__PURE__*/_jsxs("div", {
|
288
|
+
ellipsis: true,
|
289
|
+
strong: true,
|
290
|
+
underline: true,
|
291
|
+
type: "danger",
|
292
|
+
children: summary === null || summary === void 0 ? void 0 : summary.quantity
|
293
|
+
})
|
294
|
+
})]
|
295
|
+
}) : undefined, summary !== null && summary !== void 0 && summary.weight ? /*#__PURE__*/_jsxs("div", {
|
296
|
+
style: {
|
297
|
+
display: 'flex'
|
298
|
+
},
|
299
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
318
300
|
style: {
|
319
|
-
|
301
|
+
width: '110px'
|
320
302
|
},
|
321
|
-
|
303
|
+
mark: true,
|
304
|
+
children: "\u603B\u91CD\u91CF:"
|
305
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
306
|
+
placement: "topLeft",
|
307
|
+
title: summary === null || summary === void 0 ? void 0 : summary.weight,
|
308
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
322
309
|
style: {
|
323
|
-
width: '
|
310
|
+
width: '100%'
|
324
311
|
},
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
type: "danger",
|
338
|
-
children: summary === null || summary === void 0 ? void 0 : summary.weight
|
339
|
-
})
|
340
|
-
})]
|
341
|
-
}) : undefined, summary !== null && summary !== void 0 && summary.volume ? /*#__PURE__*/_jsxs("div", {
|
312
|
+
ellipsis: true,
|
313
|
+
strong: true,
|
314
|
+
underline: true,
|
315
|
+
type: "danger",
|
316
|
+
children: summary === null || summary === void 0 ? void 0 : summary.weight
|
317
|
+
})
|
318
|
+
})]
|
319
|
+
}) : undefined, summary !== null && summary !== void 0 && summary.volume ? /*#__PURE__*/_jsxs("div", {
|
320
|
+
style: {
|
321
|
+
display: 'flex'
|
322
|
+
},
|
323
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
342
324
|
style: {
|
343
|
-
|
325
|
+
width: '110px'
|
344
326
|
},
|
345
|
-
|
327
|
+
mark: true,
|
328
|
+
children: "\u603B\u4F53\u79EF:"
|
329
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
330
|
+
placement: "topLeft",
|
331
|
+
title: summary === null || summary === void 0 ? void 0 : summary.volume,
|
332
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
346
333
|
style: {
|
347
|
-
width: '
|
334
|
+
width: '100%'
|
348
335
|
},
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
},
|
358
|
-
ellipsis: true,
|
359
|
-
strong: true,
|
360
|
-
underline: true,
|
361
|
-
type: "danger",
|
362
|
-
children: summary === null || summary === void 0 ? void 0 : summary.volume
|
363
|
-
})
|
364
|
-
})]
|
365
|
-
}) : undefined]
|
366
|
-
})]
|
336
|
+
ellipsis: true,
|
337
|
+
strong: true,
|
338
|
+
underline: true,
|
339
|
+
type: "danger",
|
340
|
+
children: summary === null || summary === void 0 ? void 0 : summary.volume
|
341
|
+
})
|
342
|
+
})]
|
343
|
+
}) : undefined]
|
367
344
|
})]
|
368
345
|
})]
|
369
346
|
});
|
@@ -46,4 +46,4 @@ export declare const BiuTableSelect: React.MemoExoticComponent<React.ForwardRefE
|
|
46
46
|
* 转换下绑定到组件上的数据源
|
47
47
|
*/
|
48
48
|
dataOption?: ((value: Record<string, any>) => Record<string, any>[]) | undefined;
|
49
|
-
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "
|
49
|
+
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "showSearch" | "allowClear"> & Pick<TableProps<any>, "onRow" | "dataSource"> & React.RefAttributes<unknown>>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useCallback, useMemo } from 'react';
|
2
2
|
import { BUBU100_CACHE_AUTH_BUTTON_KEY } from "../constant";
|
3
|
-
var cacheButtonAuth =
|
3
|
+
var cacheButtonAuth = sessionStorage.getItem(BUBU100_CACHE_AUTH_BUTTON_KEY);
|
4
4
|
var resolveCodeList = [];
|
5
5
|
if (cacheButtonAuth) {
|
6
6
|
resolveCodeList = JSON.parse(cacheButtonAuth).resolveCodeList || [];
|
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import {
|
7
|
+
import { useSessionStorageState } from 'ahooks';
|
8
8
|
import { BUBU100_CACHE_SYSTEM_KEY } from "../constant";
|
9
9
|
export var useCurrentSystem = function useCurrentSystem() {
|
10
|
-
var
|
11
|
-
|
12
|
-
currentSystem =
|
13
|
-
setCurrentSystem =
|
10
|
+
var _useSessionStorageSta = useSessionStorageState(BUBU100_CACHE_SYSTEM_KEY),
|
11
|
+
_useSessionStorageSta2 = _slicedToArray(_useSessionStorageSta, 2),
|
12
|
+
currentSystem = _useSessionStorageSta2[0],
|
13
|
+
setCurrentSystem = _useSessionStorageSta2[1];
|
14
14
|
return [currentSystem !== null && currentSystem !== void 0 ? currentSystem : 'SSO', setCurrentSystem];
|
15
15
|
};
|
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import {
|
7
|
+
import { useSessionStorageState } from 'ahooks';
|
8
8
|
import { BUBU100_CACHE_USERINFO_KEY } from "../constant";
|
9
9
|
export var useUserInfo = function useUserInfo() {
|
10
|
-
var
|
11
|
-
|
12
|
-
userInfo =
|
13
|
-
setUserInfo =
|
10
|
+
var _useSessionStorageSta = useSessionStorageState(BUBU100_CACHE_USERINFO_KEY),
|
11
|
+
_useSessionStorageSta2 = _slicedToArray(_useSessionStorageSta, 2),
|
12
|
+
userInfo = _useSessionStorageSta2[0],
|
13
|
+
setUserInfo = _useSessionStorageSta2[1];
|
14
14
|
return [userInfo !== null && userInfo !== void 0 ? userInfo : {}, setUserInfo];
|
15
15
|
};
|
@@ -4,29 +4,29 @@ import { BUBU100_CACHE_AUTH_TOKEN_KEY, BUBU100_CACHE_TOKEN_KEY } from "../consta
|
|
4
4
|
* 清除 token
|
5
5
|
*/
|
6
6
|
export function clearToken() {
|
7
|
-
|
7
|
+
sessionStorage.removeItem(BUBU100_CACHE_TOKEN_KEY);
|
8
8
|
}
|
9
9
|
/**
|
10
10
|
* 设置 token
|
11
11
|
* @param token token
|
12
12
|
*/
|
13
13
|
export function setToken(token) {
|
14
|
-
|
14
|
+
sessionStorage.setItem(BUBU100_CACHE_TOKEN_KEY, token);
|
15
15
|
}
|
16
16
|
/**
|
17
17
|
* 获取 token
|
18
18
|
*/
|
19
19
|
export function getToken() {
|
20
|
-
return
|
20
|
+
return sessionStorage.getItem(BUBU100_CACHE_TOKEN_KEY);
|
21
21
|
}
|
22
22
|
export function clearAuthToken() {
|
23
|
-
|
23
|
+
sessionStorage.removeItem(BUBU100_CACHE_AUTH_TOKEN_KEY);
|
24
24
|
}
|
25
25
|
export function setAuthToken(token) {
|
26
|
-
|
26
|
+
sessionStorage.setItem(BUBU100_CACHE_AUTH_TOKEN_KEY, token);
|
27
27
|
}
|
28
28
|
export function getAuthToken() {
|
29
|
-
return
|
29
|
+
return sessionStorage.getItem(BUBU100_CACHE_AUTH_TOKEN_KEY);
|
30
30
|
}
|
31
31
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "wt-enjoy-link-antd-repack",
|
3
|
-
"version": "4.1.
|
4
|
-
"description": "
|
3
|
+
"version": "4.1.27",
|
4
|
+
"description": "万通业务组件",
|
5
5
|
"sideEffects": false,
|
6
6
|
"main": "dist/index.js",
|
7
7
|
"module": "dist/esm/index.js",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"start": "dumi dev",
|
14
14
|
"start:hot-rebuild": "father dev",
|
15
15
|
"build": "father build",
|
16
|
-
"repack": "pnpm run build && npm publish --no-git-checks && npx cnpm sync
|
16
|
+
"repack": "pnpm run build && npm publish --no-git-checks && npx cnpm sync enjoy-link-antd-repack"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
19
|
"@amap/amap-jsapi-loader": "^1.0.1",
|