wt-enjoy-link-antd-repack 4.1.17 → 4.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/component/BiuAButton/index.d.ts +2 -2
- package/dist/esm/component/BiuAButton/index.js +2 -2
- package/dist/esm/component/BiuAForm/index.d.ts +1 -1
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +4 -7
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuField/component/userSelect.d.ts +2 -0
- package/dist/esm/component/BiuField/component/userSelect.js +11 -4
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +1 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +5 -3
- package/dist/esm/component/BiuForm/index.js +22 -10
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +11 -7
- package/dist/esm/component/BiuResizeTable/index.js +2 -2
- package/dist/esm/component/BiuTable/index.d.ts +2 -0
- package/dist/esm/component/BiuTable/index.js +180 -157
- package/dist/esm/component/BiuTable/type.d.ts +4 -0
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/dist/esm/component/BiuVirtualTable/index.d.ts +1 -1
- package/dist/esm/utils/excelUtils.js +35 -24
- package/package.json +2 -2
@@ -4,14 +4,14 @@ export declare const BiuAButton: React.MemoExoticComponent<import("styled-compon
|
|
4
4
|
target?: string | undefined;
|
5
5
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
6
6
|
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
7
|
-
htmlType?: "button" | "
|
7
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
8
8
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
9
9
|
} & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>, never>> & Omit<React.ForwardRefExoticComponent<Partial<{
|
10
10
|
href: string;
|
11
11
|
target?: string | undefined;
|
12
12
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
13
13
|
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
14
|
-
htmlType?: "button" | "
|
14
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
15
15
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
16
16
|
} & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>> & {
|
17
17
|
Group: React.FC<import("antd/lib/button").ButtonGroupProps>;
|
@@ -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: "enjoy-link-antd-repack__sc-
|
7
|
-
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}"]);
|
6
|
+
componentId: "wt-enjoy-link-antd-repack__sc-1r2pes0-0"
|
7
|
+
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}&.ant-btn-primary{background:#0470fe;border-color:none;color:#ffffff;&:hover{background:#478bff;}&:active{background:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-default{border-color:#d6d6d6;background:#ffffff;color:#333333;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-background-ghost{border-color:#4578f8;background:#ffffff;color:#4578f8;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-link{color:#0470fe;&:hover{color:#478bff;}&:active{color:#305fd6;}&[disabled]{color:#c8c8c8 !important;}}"]);
|
8
8
|
export var BiuAButton = /*#__PURE__*/React.memo(StyledAButton);
|
@@ -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?: "" | "
|
5
|
+
status?: "" | "warning" | "error" | "success" | "validating" | undefined;
|
6
6
|
};
|
7
7
|
}>;
|
@@ -43,12 +43,9 @@ var columns = [{
|
|
43
43
|
dataIndex: 'warehouseCode',
|
44
44
|
ellipsis: true,
|
45
45
|
width: 100
|
46
|
-
},
|
47
|
-
|
48
|
-
|
49
|
-
ellipsis: true,
|
50
|
-
width: 100
|
51
|
-
}, {
|
46
|
+
},
|
47
|
+
// { title: '仓库名称', dataIndex: 'warehouseName', ellipsis: true, width: 100 },
|
48
|
+
{
|
52
49
|
title: '库区编码',
|
53
50
|
dataIndex: 'warehouseAreaCode',
|
54
51
|
ellipsis: true,
|
@@ -133,7 +130,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
133
130
|
setLoading(true);
|
134
131
|
getWarehouseLoctionList({
|
135
132
|
warehouseIds: warehouseIds,
|
136
|
-
|
133
|
+
remoteSearchCValue: sValue,
|
137
134
|
goodsId: goodsId,
|
138
135
|
ownerId: ownerId,
|
139
136
|
defWth: isDefWth,
|
@@ -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 | 3 | 1 | 4 | 2 | 5;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -4,5 +4,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
4
4
|
isModel?: "multiple" | "tags" | undefined;
|
5
5
|
onChangeData?: any;
|
6
6
|
warehouseFilter?: any;
|
7
|
+
employeeType?: any;
|
8
|
+
isEnable?: number | undefined;
|
7
9
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
8
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 = ["isModel", "onChange", "onChangeData", "value", "warehouseFilter"];
|
2
|
+
var _excluded = ["isModel", "onChange", "onChangeData", "value", "warehouseFilter", "employeeType", "isEnable"];
|
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; }
|
@@ -61,6 +61,9 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
61
61
|
value = props.value,
|
62
62
|
_props$warehouseFilte = props.warehouseFilter,
|
63
63
|
warehouseFilter = _props$warehouseFilte === void 0 ? true : _props$warehouseFilte,
|
64
|
+
employeeType = props.employeeType,
|
65
|
+
_props$isEnable = props.isEnable,
|
66
|
+
isEnable = _props$isEnable === void 0 ? 0 : _props$isEnable,
|
64
67
|
restProps = _objectWithoutProperties(props, _excluded);
|
65
68
|
var linkUserInfo = JSON.parse((_sessionStorage$getIt = sessionStorage.getItem(BUBU100_CACHE_USERINFO_KEY)) !== null && _sessionStorage$getIt !== void 0 ? _sessionStorage$getIt : '{}');
|
66
69
|
var _useState = useState([]),
|
@@ -112,13 +115,15 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
112
115
|
getuserData({
|
113
116
|
companyid: departStr,
|
114
117
|
id: value,
|
115
|
-
warehouseFilter: warehouseFilter
|
118
|
+
warehouseFilter: warehouseFilter,
|
119
|
+
employeeType: employeeType,
|
120
|
+
isEnable: isEnable
|
116
121
|
}).then(function (res) {
|
117
122
|
setUserList(res.rows);
|
118
123
|
setLoading(false);
|
119
124
|
});
|
120
125
|
}
|
121
|
-
}, [linkUserInfo.companyid, treeNodeList, value, warehouseFilter]);
|
126
|
+
}, [employeeType, isEnable, linkUserInfo.companyid, treeNodeList, value, warehouseFilter]);
|
122
127
|
var selectProps = useMemo(function () {
|
123
128
|
return {
|
124
129
|
showSearch: true,
|
@@ -133,6 +138,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
133
138
|
getuserData({
|
134
139
|
remoteSearchCValue: searchValue,
|
135
140
|
warehouseFilter: warehouseFilter,
|
141
|
+
employeeType: employeeType,
|
142
|
+
isEnable: isEnable,
|
136
143
|
page: 1,
|
137
144
|
size: 20
|
138
145
|
}).then(function (data) {
|
@@ -140,7 +147,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
140
147
|
setUserList(data.rows);
|
141
148
|
}
|
142
149
|
});
|
143
|
-
}, [warehouseFilter]);
|
150
|
+
}, [employeeType, isEnable, warehouseFilter]);
|
144
151
|
return /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread(_objectSpread({
|
145
152
|
ref: ref
|
146
153
|
}, selectProps), restProps), {}, {
|
@@ -9,5 +9,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
9
9
|
onChangeData?: ((value: any, record: any) => void) | undefined;
|
10
10
|
type?: string | undefined;
|
11
11
|
isFirstLoad?: boolean | undefined;
|
12
|
+
warehouseId?: string | number | undefined;
|
12
13
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
13
14
|
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 = ["warehouseName", "ownerId", "clientid", "onChange", "onChangeData", "type", "employeecode"];
|
2
|
+
var _excluded = ["warehouseName", "ownerId", "clientid", "onChange", "onChangeData", "type", "employeecode", "warehouseId"];
|
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; }
|
@@ -35,6 +35,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
35
35
|
_props$type = props.type,
|
36
36
|
type = _props$type === void 0 ? '' : _props$type,
|
37
37
|
employeecode = props.employeecode,
|
38
|
+
warehouseId = props.warehouseId,
|
38
39
|
restProps = _objectWithoutProperties(props, _excluded);
|
39
40
|
var _useState = useState([]),
|
40
41
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -49,9 +50,10 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
49
50
|
warehouseName: wareName,
|
50
51
|
ownerId: ownerId,
|
51
52
|
clientId: clientid,
|
52
|
-
employeecode: employeecode
|
53
|
+
employeecode: employeecode,
|
54
|
+
warehouseId: warehouseId
|
53
55
|
};
|
54
|
-
}, [wareName, ownerId, clientid, employeecode]);
|
56
|
+
}, [wareName, ownerId, clientid, employeecode, warehouseId]);
|
55
57
|
var onSearch = useCallback(function (value) {
|
56
58
|
setWareName(value);
|
57
59
|
}, []);
|
@@ -26,16 +26,22 @@ 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: "enjoy-link-antd-repack__sc-
|
29
|
+
componentId: "wt-enjoy-link-antd-repack__sc-162dj37-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
|
+
|
36
37
|
var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
37
38
|
var title = props.title,
|
38
|
-
labelWidth = props.labelWidth
|
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);
|
39
45
|
return /*#__PURE__*/_jsx(Tooltip, {
|
40
46
|
getPopupContainer: function getPopupContainer() {
|
41
47
|
return document.body;
|
@@ -45,7 +51,8 @@ var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
|
45
51
|
children: /*#__PURE__*/_jsxs(StyledLabel, {
|
46
52
|
style: {
|
47
53
|
width: labelWidth,
|
48
|
-
maxWidth: labelWidth
|
54
|
+
maxWidth: labelWidth,
|
55
|
+
textAlign: labelAlign
|
49
56
|
},
|
50
57
|
children: [/*#__PURE__*/_jsx("span", {
|
51
58
|
style: {
|
@@ -55,19 +62,19 @@ var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
|
|
55
62
|
whiteSpace: 'nowrap'
|
56
63
|
},
|
57
64
|
children: title
|
58
|
-
}), /*#__PURE__*/_jsx("span", {
|
65
|
+
}), colon ? /*#__PURE__*/_jsx("span", {
|
59
66
|
style: {
|
60
67
|
padding: '0 8px 0 0'
|
61
68
|
},
|
62
69
|
children: "\xA0:"
|
63
|
-
})]
|
70
|
+
}) : null]
|
64
71
|
})
|
65
72
|
});
|
66
73
|
});
|
67
74
|
var StyledForm = styled(BiuAForm).withConfig({
|
68
75
|
displayName: "StyledForm",
|
69
|
-
componentId: "enjoy-link-antd-repack__sc-
|
70
|
-
})([".ant-col{
|
76
|
+
componentId: "wt-enjoy-link-antd-repack__sc-162dj37-1"
|
77
|
+
})([".ant-col{}.arco-form-item-label{font-size:14px;}.ant-form-item-label > label::after{margin:0px !important;}"]);
|
71
78
|
export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
72
79
|
var _props$columns = props.columns,
|
73
80
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
@@ -125,6 +132,7 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
125
132
|
form: form,
|
126
133
|
onFinish: onFinish,
|
127
134
|
children: /*#__PURE__*/_jsxs(Row, {
|
135
|
+
gutter: [50, 8],
|
128
136
|
children: [columns.map(function (_ref, index) {
|
129
137
|
var dataIndex = _ref.dataIndex,
|
130
138
|
initialValue = _ref.initialValue,
|
@@ -150,7 +158,9 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
150
158
|
colon: false,
|
151
159
|
label: /*#__PURE__*/_jsx(FormLabelRender, _objectSpread({
|
152
160
|
labelWidth: formItemLabelWidth || labelWidth,
|
153
|
-
title: title
|
161
|
+
title: title,
|
162
|
+
colon: false,
|
163
|
+
labelAlign: "left"
|
154
164
|
}, restProps)),
|
155
165
|
children: /*#__PURE__*/_jsx(BiuAFormItem, {
|
156
166
|
noStyle: true,
|
@@ -182,7 +192,9 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
182
192
|
required: false
|
183
193
|
}],
|
184
194
|
label: /*#__PURE__*/_jsx(FormLabelRender, _objectSpread(_objectSpread({
|
185
|
-
title: title
|
195
|
+
title: title,
|
196
|
+
colon: false,
|
197
|
+
labelAlign: "left"
|
186
198
|
}, restProps), {}, {
|
187
199
|
labelWidth: formItemLabelWidth || labelWidth
|
188
200
|
})),
|
@@ -207,7 +219,7 @@ export var BiuForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (
|
|
207
219
|
}), /*#__PURE__*/_createElement(Col, _objectSpread(_objectSpread({}, atLine ? operationLayout : FORM_COL_LAYOUT.default), {}, {
|
208
220
|
key: "advaceSearch",
|
209
221
|
style: {
|
210
|
-
textAlign: atLine ? 'right' : '
|
222
|
+
textAlign: atLine ? 'right' : 'right'
|
211
223
|
}
|
212
224
|
}), /*#__PURE__*/_jsx(BiuAFormItem, {
|
213
225
|
labelCol: {
|
@@ -24,6 +24,10 @@ 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]);
|
27
31
|
if (['行号', '操作'].includes(title)) {
|
28
32
|
return /*#__PURE__*/_createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
29
33
|
key: title,
|
@@ -32,11 +36,11 @@ export var TableCell = function TableCell(props) {
|
|
32
36
|
whiteSpace: 'nowrap',
|
33
37
|
overflow: 'hidden',
|
34
38
|
textOverflow: 'ellipsis',
|
35
|
-
fontSize:
|
39
|
+
fontSize: 14
|
36
40
|
}, style), {}, {
|
37
41
|
boxSizing: 'border-box',
|
38
|
-
color: '
|
39
|
-
backgroundColor: '#
|
42
|
+
color: '#666666',
|
43
|
+
backgroundColor: '#fafafa',
|
40
44
|
textAlign: 'center',
|
41
45
|
fontWeight: '600'
|
42
46
|
})
|
@@ -62,11 +66,11 @@ export var TableCell = function TableCell(props) {
|
|
62
66
|
overflow: 'hidden',
|
63
67
|
textOverflow: 'ellipsis'
|
64
68
|
}, style), {}, {
|
65
|
-
fontSize:
|
69
|
+
fontSize: 14,
|
66
70
|
boxSizing: 'border-box',
|
67
|
-
color: '
|
68
|
-
backgroundColor: '#
|
69
|
-
textAlign: 'center',
|
71
|
+
color: '#666666',
|
72
|
+
backgroundColor: '#fafafa',
|
73
|
+
textAlign: "".concat(isSelection ? 'center' : 'left'),
|
70
74
|
fontWeight: '600'
|
71
75
|
})
|
72
76
|
}))
|
@@ -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: "enjoy-link-antd-repack__sc-
|
19
|
-
})([".react-resizable{position:relative;background-clip:padding-box;}.react-resizable-handle{position:absolute;width:
|
18
|
+
componentId: "wt-enjoy-link-antd-repack__sc-1kqhmat-0"
|
19
|
+
})([".ant-table-cell{border-right:none !important;}.ant-table-tbody > .ant-table-row > td{padding:6px !important;min-height:45px !important;height:45px !important;line-height:14px !important;color:#333333;}.ant-table-tbody > .ant-table-row:hover > td{background:#f5f5f5;}.ant-table-tbody > .ant-table-row-selected > td{background:#f0f7ff !important;}.ant-table-wrapper{height:100% !important;}.ant-table-tbody > tr > td{border-bottom:1px solid #ebebeb;}.ant-spin-nested-loading{height:100% !important;}.ant-spin-container{height:100% !important;}.ant-table{height:100% !important;border-bottom:1px solid #ebebeb !important;}.ant-table-container{height:100% !important;display:flex;flex-direction:column;}.ant-table-body{flex:1;}.ant-table-row{font-size:14px;font-weight:normal;}.react-resizable{position:relative;background-clip:padding-box;}.react-resizable-handle{position:absolute;width:1px;height:40%;cursor:col-resize;z-index:1;right:0;background:#d6d6d6;top:50%;transform:translateY(-50%);&:before{content:'';position:absolute;top:-20px;right:-20px;bottom:-20px;left:-10px;}}"]);
|
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,
|
@@ -16,6 +16,7 @@ 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;
|
19
20
|
onReset?: (() => void) | undefined;
|
20
21
|
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
21
22
|
export declare const BiuTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
@@ -34,6 +35,7 @@ export declare const BiuTable: React.MemoExoticComponent<React.ForwardRefExoticC
|
|
34
35
|
onPageChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
35
36
|
onPageShowSizeChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
36
37
|
rowKey?: string | undefined;
|
38
|
+
isPage?: boolean | undefined;
|
37
39
|
onReset?: (() => void) | undefined;
|
38
40
|
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
39
41
|
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", "isPage"];
|
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,27 +36,41 @@ 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: "enjoy-link-antd-repack__sc-
|
40
|
-
})(["height:100%;display:flex;flex-direction:column;background-color
|
39
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-0"
|
40
|
+
})(["height:100%;display:flex;flex-direction:column;background-color:", ";.ant-popover-inner-content{padding:4px !important;}"], function (props) {
|
41
|
+
return props.isPage ? 'none' : '#ffffff';
|
42
|
+
});
|
41
43
|
var ActionWrapper = styled.div.withConfig({
|
42
44
|
displayName: "ActionWrapper",
|
43
|
-
componentId: "enjoy-link-antd-repack__sc-
|
44
|
-
})(["display:flex;justify-content:space-between;box-sizing:border-box;width:calc(100% - 16px);
|
45
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-1"
|
46
|
+
})(["display:flex;justify-content:space-between;box-sizing:border-box;width:calc(100% - 16px);border-top:1px solid #f0f0f0;padding:16px 0;flex-direction:row-reverse;", ""], function (props) {
|
47
|
+
return props.isPage ? "\n & {\n border-top: none;\n padding: 0 0 16px 0;\n margin: 0;\n }\n " : '';
|
48
|
+
});
|
45
49
|
var HeaderWrapper = styled.div.withConfig({
|
46
50
|
displayName: "HeaderWrapper",
|
47
|
-
componentId: "enjoy-link-antd-repack__sc-
|
48
|
-
})(["flex-grow:0;"])
|
51
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-2"
|
52
|
+
})(["flex-grow:0;padding:0px 0 16px 0;", ""], function (props) {
|
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
|
+
});
|
49
61
|
var FooterWrapper = styled.div.withConfig({
|
50
62
|
displayName: "FooterWrapper",
|
51
|
-
componentId: "enjoy-link-antd-repack__sc-
|
63
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-4"
|
52
64
|
})(["margin:0 8px;display:flex;justify-content:space-between;box-sizing:border-box;flex-direction:row-reverse;"]);
|
53
65
|
var StyledResizeTable = styled(BiuResizeTable).withConfig({
|
54
66
|
displayName: "StyledResizeTable",
|
55
|
-
componentId: "enjoy-link-antd-repack__sc-
|
56
|
-
})(["display:block;flex-grow:1;
|
67
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-5"
|
68
|
+
})(["display:block;flex-grow:1;overflow:hidden;height:100% !important;.ant-table-cell{border-right:none !important;}", " .ant-table-tbody > .ant-table-row > td{padding:6px !important;min-height:45px !important;height:45px !important;line-height:14px !important;color:#333333;}.ant-table-tbody > .ant-table-row:hover > td{background:#f5f5f5;}.ant-table-tbody > .ant-table-row-selected > td{background:#f0f7ff !important;}.ant-table-wrapper{height:100% !important;}.ant-table-tbody > tr > td{border-bottom:1px solid #ebebeb;}.ant-spin-nested-loading{height:100% !important;}.ant-spin-container{height:100% !important;}.ant-table{height:100% !important;border-bottom:1px solid #ebebeb !important;}.ant-table-container{height:100% !important;display:flex;flex-direction:column;}.ant-table-body{flex:1;}.ant-table-row{font-size:14px;font-weight:normal;}"], function (props) {
|
69
|
+
return props.isPage ? "\n & {\n padding: 0\n }\n " : '';
|
70
|
+
});
|
57
71
|
var SummaryWrapper = styled.div.withConfig({
|
58
72
|
displayName: "SummaryWrapper",
|
59
|
-
componentId: "enjoy-link-antd-repack__sc-
|
73
|
+
componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-6"
|
60
74
|
})(["display:flex;height:36px;line-height:36px;font-size:16px;font-weight:bold;"]);
|
61
75
|
export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
62
76
|
var rootRef = useRef();
|
@@ -82,6 +96,8 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
82
96
|
onReset = props.onReset,
|
83
97
|
_props$loading = props.loading,
|
84
98
|
tabLoading = _props$loading === void 0 ? false : _props$loading,
|
99
|
+
_props$isPage = props.isPage,
|
100
|
+
isPage = _props$isPage === void 0 ? false : _props$isPage,
|
85
101
|
restProps = _objectWithoutProperties(props, _excluded);
|
86
102
|
var formRef = useRef(null);
|
87
103
|
var searchParams = useRef({});
|
@@ -140,17 +156,23 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
140
156
|
return /*#__PURE__*/_jsxs(ContainerWrapper, {
|
141
157
|
ref: rootRef,
|
142
158
|
style: _objectSpread({}, containerStyle),
|
143
|
-
|
144
|
-
|
159
|
+
isPage: isPage,
|
160
|
+
children: [/*#__PURE__*/_jsx(HeaderWrapper, {
|
161
|
+
isPage: isPage,
|
162
|
+
children: searchForm ? /*#__PURE__*/_jsx(BiuForm, {
|
145
163
|
ref: formRef,
|
146
164
|
headLine: headLine,
|
147
165
|
columns: formColumns,
|
148
166
|
onSubmit: onSubmit,
|
149
167
|
onReset: onReset
|
150
|
-
}) : null
|
168
|
+
}) : null
|
169
|
+
}), /*#__PURE__*/_jsxs(ContentWrapper, {
|
170
|
+
isPage: isPage,
|
171
|
+
children: [/*#__PURE__*/_jsxs(ActionWrapper, {
|
172
|
+
isPage: isPage,
|
151
173
|
children: [/*#__PURE__*/_jsx("div", {
|
152
174
|
style: {
|
153
|
-
paddingRight:
|
175
|
+
paddingRight: 0
|
154
176
|
},
|
155
177
|
children: /*#__PURE__*/_jsx(Popover, {
|
156
178
|
autoAdjustOverflow: true,
|
@@ -181,166 +203,167 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
|
|
181
203
|
formRef: formRef,
|
182
204
|
operationOptions: operationOptions
|
183
205
|
})]
|
184
|
-
})
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
}
|
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);
|
206
|
+
}), /*#__PURE__*/_jsx(StyledResizeTable, _objectSpread({
|
207
|
+
isPage: isPage,
|
208
|
+
rowKey: rowKey,
|
209
|
+
loading: tabLoading || loading,
|
210
|
+
rowSelection: _objectSpread(_objectSpread({}, rowSelection), {}, {
|
211
|
+
selectedRowKeys: selectedRowKeys,
|
212
|
+
onChange: function onChange(currentSelectedRowKeys, selectedRows) {
|
213
|
+
setSelectedRowKeys(currentSelectedRowKeys);
|
214
|
+
/**
|
215
|
+
* 使用外部事件覆盖内部事件,需要注意的时候 onChange 事件必须和 selectedRowKeys 结合使用
|
216
|
+
* 配合外部使用时必须全部使用外部控制
|
217
|
+
*/
|
218
|
+
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.onChange) {
|
219
|
+
rowSelection.onChange(currentSelectedRowKeys, selectedRows, {
|
220
|
+
type: 'multiple'
|
221
|
+
});
|
222
|
+
return;
|
210
223
|
}
|
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
224
|
}
|
230
|
-
})
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
225
|
+
}),
|
226
|
+
onRow: function onRow(record) {
|
227
|
+
var subEvent = _onRow ? _onRow(record) : {};
|
228
|
+
return _objectSpread(_objectSpread({}, subEvent), {}, {
|
229
|
+
onClick: function onClick(e) {
|
230
|
+
if (subEvent !== null && subEvent !== void 0 && subEvent.onClick) {
|
231
|
+
subEvent === null || subEvent === void 0 || subEvent.onClick(e);
|
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
|
+
});
|
251
|
+
}
|
252
|
+
});
|
253
|
+
},
|
254
|
+
bordered: true,
|
255
|
+
columns: tableColumns,
|
256
|
+
pagination: false,
|
257
|
+
scroll: {
|
258
|
+
scrollToFirstRowOnChange: true,
|
259
|
+
x: '100%',
|
260
|
+
y: true
|
261
|
+
},
|
262
|
+
dataSource: tableDataSource
|
263
|
+
}, restProps)), /*#__PURE__*/_jsxs(FooterWrapper, {
|
264
|
+
children: [!hidePagination && /*#__PURE__*/_jsx(BiuPagination, {
|
265
|
+
pagination: _objectSpread({
|
266
|
+
showSizeChanger: true
|
267
|
+
}, pagination)
|
268
|
+
}), /*#__PURE__*/_jsxs(SummaryWrapper, {
|
269
|
+
children: [summary !== null && summary !== void 0 && summary.count ? /*#__PURE__*/_jsxs("div", {
|
252
270
|
style: {
|
253
|
-
|
271
|
+
display: 'flex'
|
254
272
|
},
|
255
|
-
|
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, {
|
273
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
261
274
|
style: {
|
262
|
-
width: '
|
275
|
+
width: '110px'
|
263
276
|
},
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
277
|
+
mark: true,
|
278
|
+
children: "\u603B\u6761\u6570:"
|
279
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
280
|
+
placement: "topLeft",
|
281
|
+
title: summary === null || summary === void 0 ? void 0 : summary.count,
|
282
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
283
|
+
style: {
|
284
|
+
width: '100%'
|
285
|
+
},
|
286
|
+
ellipsis: true,
|
287
|
+
strong: true,
|
288
|
+
underline: true,
|
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", {
|
276
294
|
style: {
|
277
|
-
|
295
|
+
display: 'flex'
|
278
296
|
},
|
279
|
-
|
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, {
|
297
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
285
298
|
style: {
|
286
|
-
width: '
|
299
|
+
width: '110px'
|
287
300
|
},
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
301
|
+
mark: true,
|
302
|
+
children: "\u603B\u6570\u91CF:"
|
303
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
304
|
+
placement: "topLeft",
|
305
|
+
title: summary === null || summary === void 0 ? void 0 : summary.quantity,
|
306
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
307
|
+
style: {
|
308
|
+
width: '100%'
|
309
|
+
},
|
310
|
+
ellipsis: true,
|
311
|
+
strong: true,
|
312
|
+
underline: true,
|
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", {
|
300
318
|
style: {
|
301
|
-
|
319
|
+
display: 'flex'
|
302
320
|
},
|
303
|
-
|
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, {
|
321
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
309
322
|
style: {
|
310
|
-
width: '
|
323
|
+
width: '110px'
|
311
324
|
},
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
325
|
+
mark: true,
|
326
|
+
children: "\u603B\u91CD\u91CF:"
|
327
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
328
|
+
placement: "topLeft",
|
329
|
+
title: summary === null || summary === void 0 ? void 0 : summary.weight,
|
330
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
331
|
+
style: {
|
332
|
+
width: '100%'
|
333
|
+
},
|
334
|
+
ellipsis: true,
|
335
|
+
strong: true,
|
336
|
+
underline: true,
|
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", {
|
324
342
|
style: {
|
325
|
-
|
343
|
+
display: 'flex'
|
326
344
|
},
|
327
|
-
|
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, {
|
345
|
+
children: [/*#__PURE__*/_jsx(Typography.Text, {
|
333
346
|
style: {
|
334
|
-
width: '
|
347
|
+
width: '110px'
|
335
348
|
},
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
349
|
+
mark: true,
|
350
|
+
children: "\u603B\u4F53\u79EF:"
|
351
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
352
|
+
placement: "topLeft",
|
353
|
+
title: summary === null || summary === void 0 ? void 0 : summary.volume,
|
354
|
+
children: /*#__PURE__*/_jsx(Typography.Text, {
|
355
|
+
style: {
|
356
|
+
width: '100%'
|
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
|
+
})]
|
344
367
|
})]
|
345
368
|
})]
|
346
369
|
});
|
@@ -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>, "dataSource" | "onRow"> & React.RefAttributes<unknown>>>;
|
@@ -10,7 +10,7 @@ export type BiuVirtualTablePropsType = Omit<TableProps<any>, 'columns' | 'scroll
|
|
10
10
|
y: number;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps<any>, "
|
13
|
+
export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps<any>, "columns" | "scroll"> & {
|
14
14
|
columns: (Omit<BiuColumnType, 'width'> & {
|
15
15
|
width: number;
|
16
16
|
})[];
|
@@ -30,31 +30,42 @@ export var exportExcel = function exportExcel(columns, data) {
|
|
30
30
|
omit[_key2 - 3] = arguments[_key2];
|
31
31
|
}
|
32
32
|
if (!(data === null || data !== null && data !== void 0 && data.length)) {
|
33
|
-
//
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
var keys = [];
|
38
|
-
var keyMap = columns.reduce(function (obj, cur) {
|
39
|
-
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
40
|
-
keys.push(cur.dataIndex || cur.key);
|
41
|
-
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.dataIndex || cur.key, cur.title));
|
42
|
-
}, {});
|
43
|
-
var newData = data === null || data === void 0 ? void 0 : data.reduce(function (arr, cur) {
|
44
|
-
var newObj = keys.reduce(function (newCur, key) {
|
45
|
-
return _objectSpread(_objectSpread({}, newCur), {}, _defineProperty({}, keyMap[key], cur[key] === undefined || cur[key] === null ? '' : cur[key]));
|
33
|
+
// const worksheet = utils.json_to_sheet([])
|
34
|
+
var header = columns === null || columns === void 0 ? void 0 : columns.reduce(function (obj, cur) {
|
35
|
+
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
36
|
+
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.title, ''));
|
46
37
|
}, {});
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
38
|
+
var worksheet = utils.json_to_sheet([header]);
|
39
|
+
var workbook = utils.book_new();
|
40
|
+
utils.book_append_sheet(workbook, worksheet);
|
41
|
+
writeFile(workbook, "".concat(fileName).concat(moment().format('x'), ".xls"), {
|
42
|
+
bookType: 'xls',
|
43
|
+
bookSST: false,
|
44
|
+
type: 'base64' // 编码方式
|
45
|
+
});
|
46
|
+
} else {
|
47
|
+
var keys = [];
|
48
|
+
var keyMap = columns.reduce(function (obj, cur) {
|
49
|
+
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
50
|
+
keys.push(cur.dataIndex || cur.key);
|
51
|
+
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.dataIndex || cur.key, cur.title));
|
52
|
+
}, {});
|
53
|
+
var newData = data === null || data === void 0 ? void 0 : data.reduce(function (arr, cur) {
|
54
|
+
var newObj = keys.reduce(function (newCur, key) {
|
55
|
+
return _objectSpread(_objectSpread({}, newCur), {}, _defineProperty({}, keyMap[key], cur[key] === undefined || cur[key] === null ? '' : cur[key]));
|
56
|
+
}, {});
|
57
|
+
arr.push(newObj);
|
58
|
+
return arr;
|
59
|
+
}, []);
|
60
|
+
var _worksheet = utils.json_to_sheet(newData);
|
61
|
+
var _workbook = utils.book_new();
|
62
|
+
utils.book_append_sheet(_workbook, _worksheet);
|
63
|
+
writeFile(_workbook, "".concat(fileName).concat(moment().format('x'), ".xls"), {
|
64
|
+
bookType: 'xls',
|
65
|
+
bookSST: false,
|
66
|
+
type: 'base64' // 编码方式
|
67
|
+
});
|
68
|
+
}
|
58
69
|
};
|
59
70
|
|
60
71
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wt-enjoy-link-antd-repack",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.23",
|
4
4
|
"description": "纷享链业务组件",
|
5
5
|
"sideEffects": false,
|
6
6
|
"main": "dist/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 &&
|
16
|
+
"repack": "pnpm run build && npm publish --no-git-checks && npx cnpm sync wt-enjoy-link-antd-repack"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
19
|
"@amap/amap-jsapi-loader": "^1.0.1",
|