@bit-sun/business-component 2.2.40 → 2.2.41-alpha.0
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/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +1 -0
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -0
- package/dist/index.esm.js +97 -33
- package/dist/index.js +97 -33
- package/package.json +1 -1
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +37 -11
- package/src/components/Business/BsSulaQueryTable/index.less +6 -4
- package/src/components/Business/BsSulaQueryTable/setting.tsx +37 -11
|
@@ -52,6 +52,7 @@ declare class SearchItemTable extends React.Component {
|
|
|
52
52
|
}) => JSX.Element;
|
|
53
53
|
onChange: (e: CheckboxChangeEvent, label: any) => void;
|
|
54
54
|
handleReset: () => void;
|
|
55
|
+
handleResetSetting: () => void;
|
|
55
56
|
onSearch: (e: any) => void;
|
|
56
57
|
onSearchSort: (e: any) => void;
|
|
57
58
|
render(): JSX.Element;
|
|
@@ -52,6 +52,7 @@ declare class SortableTable extends React.Component {
|
|
|
52
52
|
}) => JSX.Element;
|
|
53
53
|
onChange: (e: CheckboxChangeEvent, title: any) => void;
|
|
54
54
|
handleReset: () => void;
|
|
55
|
+
handleResetSetting: () => void;
|
|
55
56
|
onSearch: (e: any) => void;
|
|
56
57
|
onSearchSort: (e: any) => void;
|
|
57
58
|
render(): JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -17343,7 +17343,7 @@ var HeaderWrapper = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
17343
17343
|
return true;
|
|
17344
17344
|
});
|
|
17345
17345
|
|
|
17346
|
-
var css_248z$e = ".sort_table_wrapper .sort_table {\n display: flex;\n}\n.sort_table_wrapper .sort_table .sort_table_column_wrapper {\n width: 560px;\n margin-right: 10px;\n}\n.sort_table_wrapper .sort_table .sort_table_content_wrapper {\n width: 210px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count,\n.sort_table_wrapper .sort_table .sort_table_content_count {\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count span,\n.sort_table_wrapper .sort_table .sort_table_content_count span {\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column {\n margin-top: 10px;\n width: 560px;\n height: 430px;\n overflow: auto;\n padding: 10px;\n background: #ffffff;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all_empty {\n width: 538px;\n line-height: 360px;\n text-align: center;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column_special {\n margin-top: 40px;\n width: 100px;\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper {\n width: 144px;\n margin-top: 16px;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.sort_table_wrapper .sort_table .sort_table_content {\n margin-top: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_content .ant-table-wrapper {\n padding: 0px !important;\n}\n.sort_table_wrapper .sort_table .sort_table_content .sort_table_title {\n height: 32px;\n line-height: 32px;\n padding-left: 10px;\n color: gray;\n}\n.sort_table_wrapper div.ant-modal-header {\n width: 820px;\n height: 64px;\n background: #ffffff;\n padding: 20px;\n border: 0px;\n}\n.sort_table_wrapper div.ant-modal-header div.ant-modal-title {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 24px;\n}\n.sort_table_wrapper .ant-modal-body {\n padding: 0 20px !important;\n}\n.sort_table_wrapper .ant-modal-close-x {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-input-affix-wrapper {\n padding: 0px;\n padding-right: 10px;\n}\n.sort_table_wrapper input {\n height: 32px;\n padding: 6px 4px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-input-prefix {\n width: 24px;\n height: 24px;\n margin: 4px;\n display: flex;\n justify-content: center;\n}\n.sort_table_wrapper .ant-modal-footer {\n height: 70px;\n border: 0;\n padding: 20px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn {\n width: 80px;\n height: 34px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn span {\n font-family: PingFangSC-Medium;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0;\n text-align: center;\n line-height: 20px;\n}\n.sort_table_wrapper .ant-
|
|
17346
|
+
var css_248z$e = ".sort_table_wrapper .sort_table {\n display: flex;\n}\n.sort_table_wrapper .sort_table .sort_table_column_wrapper {\n width: 560px;\n margin-right: 10px;\n}\n.sort_table_wrapper .sort_table .sort_table_content_wrapper {\n width: 210px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count,\n.sort_table_wrapper .sort_table .sort_table_content_count {\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count span,\n.sort_table_wrapper .sort_table .sort_table_content_count span {\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column {\n margin-top: 10px;\n width: 560px;\n height: 430px;\n overflow: auto;\n padding: 10px;\n background: #ffffff;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all_empty {\n width: 538px;\n line-height: 360px;\n text-align: center;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column_special {\n margin-top: 40px;\n width: 100px;\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper {\n width: 144px;\n margin-top: 16px;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.sort_table_wrapper .sort_table .sort_table_content {\n margin-top: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_content .ant-table-wrapper {\n padding: 0px !important;\n}\n.sort_table_wrapper .sort_table .sort_table_content .sort_table_title {\n height: 32px;\n line-height: 32px;\n padding-left: 10px;\n color: gray;\n}\n.sort_table_wrapper div.ant-modal-header {\n width: 820px;\n height: 64px;\n background: #ffffff;\n padding: 20px;\n border: 0px;\n}\n.sort_table_wrapper div.ant-modal-header div.ant-modal-title {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 24px;\n}\n.sort_table_wrapper .ant-modal-body {\n padding: 0 20px !important;\n}\n.sort_table_wrapper .ant-modal-close-x {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-input-affix-wrapper {\n padding: 0px;\n padding-right: 10px;\n}\n.sort_table_wrapper input {\n height: 32px;\n padding: 6px 4px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-input-prefix {\n width: 24px;\n height: 24px;\n margin: 4px;\n display: flex;\n justify-content: center;\n}\n.sort_table_wrapper .ant-modal-footer {\n height: 70px;\n border: 0;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn {\n width: 80px;\n height: 34px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn span {\n font-family: PingFangSC-Medium;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0;\n text-align: center;\n line-height: 20px;\n}\n.sort_table_wrapper .ant-table-wrapper::-webkit-scrollbar {\n display: none;\n}\n.sort_table_wrapper .ant-table-wrapper {\n margin-top: 10px;\n height: 364px;\n overflow: scroll;\n padding-bottom: 50px;\n}\n.sort_table_wrapper .ant-table-wrapper tr {\n height: 36px;\n}\n.sort_table_wrapper .ant-table-wrapper tr td {\n width: 24px !important;\n height: 36px !important;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:first-child {\n padding-left: 10px !important;\n padding-right: 0px !important;\n width: 115px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td img {\n cursor: pointer;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:not(:first-child) {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:last-child {\n padding-left: 0px !important;\n padding-right: 3px !important;\n width: 34px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:last-child img {\n position: relative;\n top: 1px;\n}\n";
|
|
17347
17347
|
styleInject(css_248z$e);
|
|
17348
17348
|
|
|
17349
17349
|
var _excluded$d = ["className", "style"];
|
|
@@ -17418,7 +17418,10 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17418
17418
|
return [];
|
|
17419
17419
|
};
|
|
17420
17420
|
_this.patchConfigToLocalstorage = function (configvalue) {
|
|
17421
|
-
var
|
|
17421
|
+
var _this$props = _this.props,
|
|
17422
|
+
setShowColumns = _this$props.setShowColumns,
|
|
17423
|
+
_this$props$datasourc = _this$props.datasource,
|
|
17424
|
+
datasource = _this$props$datasourc === void 0 ? [] : _this$props$datasourc;
|
|
17422
17425
|
var _this$state = _this.state,
|
|
17423
17426
|
sortDataSource = _this$state.sortDataSource,
|
|
17424
17427
|
bsTableCode = _this$state.bsTableCode;
|
|
@@ -17439,12 +17442,29 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17439
17442
|
_this.setState({
|
|
17440
17443
|
visible: false
|
|
17441
17444
|
});
|
|
17442
|
-
|
|
17445
|
+
if (configvalue) {
|
|
17446
|
+
setShowColumns(_toConsumableArray(sortDataSource));
|
|
17447
|
+
} else {
|
|
17448
|
+
_this.setState({
|
|
17449
|
+
isDefaultValue: true,
|
|
17450
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
17451
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17452
|
+
hidden: false
|
|
17453
|
+
});
|
|
17454
|
+
})),
|
|
17455
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
17456
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17457
|
+
hidden: false
|
|
17458
|
+
});
|
|
17459
|
+
}))
|
|
17460
|
+
});
|
|
17461
|
+
setShowColumns(_toConsumableArray(datasource));
|
|
17462
|
+
}
|
|
17443
17463
|
};
|
|
17444
17464
|
_this.setInitValue = function () {
|
|
17445
|
-
var _this$
|
|
17446
|
-
datasource = _this$
|
|
17447
|
-
showColumn = _this$
|
|
17465
|
+
var _this$props2 = _this.props,
|
|
17466
|
+
datasource = _this$props2.datasource,
|
|
17467
|
+
showColumn = _this$props2.showColumn;
|
|
17448
17468
|
var config = _this.getConfigFromlocalstorage();
|
|
17449
17469
|
_this.setState({
|
|
17450
17470
|
isDefaultValue: true,
|
|
@@ -17799,6 +17819,9 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17799
17819
|
_this.handleReset = function () {
|
|
17800
17820
|
_this.setInitValue(true);
|
|
17801
17821
|
};
|
|
17822
|
+
_this.handleResetSetting = function () {
|
|
17823
|
+
_this.patchUserColumnConfig('');
|
|
17824
|
+
};
|
|
17802
17825
|
_this.onSearch = function (e) {
|
|
17803
17826
|
_this.setState({
|
|
17804
17827
|
searchDataSource: e.target.value
|
|
@@ -17814,10 +17837,10 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17814
17837
|
_createClass(SortableTable, [{
|
|
17815
17838
|
key: "componentDidMount",
|
|
17816
17839
|
value: function componentDidMount() {
|
|
17817
|
-
var _this$
|
|
17818
|
-
datasource = _this$
|
|
17819
|
-
showColumn = _this$
|
|
17820
|
-
bsTableCode = _this$
|
|
17840
|
+
var _this$props3 = this.props,
|
|
17841
|
+
datasource = _this$props3.datasource,
|
|
17842
|
+
showColumn = _this$props3.showColumn,
|
|
17843
|
+
bsTableCode = _this$props3.bsTableCode;
|
|
17821
17844
|
var config = this.getConfigFromlocalstorage();
|
|
17822
17845
|
this.setState({
|
|
17823
17846
|
dataSource: datasource.map(function (item) {
|
|
@@ -17885,17 +17908,26 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17885
17908
|
visible: visible,
|
|
17886
17909
|
onOk: this.handleOk,
|
|
17887
17910
|
onCancel: this.handleCancel,
|
|
17888
|
-
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
17911
|
+
footer: [/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
17889
17912
|
key: "back",
|
|
17890
|
-
onClick: this.handleReset
|
|
17891
|
-
|
|
17913
|
+
onClick: this.handleReset,
|
|
17914
|
+
style: {
|
|
17915
|
+
marginRight: 0
|
|
17916
|
+
}
|
|
17917
|
+
}, "\u6062\u590D\u9ED8\u8BA4"), ",", /*#__PURE__*/React.createElement(Button, {
|
|
17918
|
+
key: "back",
|
|
17919
|
+
onClick: this.handleResetSetting
|
|
17920
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
17892
17921
|
key: "submit",
|
|
17893
|
-
onClick: this.handleCancel
|
|
17894
|
-
|
|
17922
|
+
onClick: this.handleCancel,
|
|
17923
|
+
style: {
|
|
17924
|
+
marginRight: 0
|
|
17925
|
+
}
|
|
17926
|
+
}, "\u53D6\u6D88"), ",", /*#__PURE__*/React.createElement(Button, {
|
|
17895
17927
|
key: "submit",
|
|
17896
17928
|
type: "primary",
|
|
17897
17929
|
onClick: this.handleOk
|
|
17898
|
-
}, "\u786E\u8BA4")]
|
|
17930
|
+
}, "\u786E\u8BA4"))]
|
|
17899
17931
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17900
17932
|
className: 'sort_table'
|
|
17901
17933
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -18107,7 +18139,10 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18107
18139
|
return [];
|
|
18108
18140
|
};
|
|
18109
18141
|
_this.patchConfigToLocalstorage = function (configvalue) {
|
|
18110
|
-
var
|
|
18142
|
+
var _this$props = _this.props,
|
|
18143
|
+
setShowSearchFields = _this$props.setShowSearchFields,
|
|
18144
|
+
_this$props$datasourc = _this$props.datasource,
|
|
18145
|
+
datasource = _this$props$datasourc === void 0 ? [] : _this$props$datasourc;
|
|
18111
18146
|
var _this$state = _this.state,
|
|
18112
18147
|
sortDataSource = _this$state.sortDataSource,
|
|
18113
18148
|
bsTableCode = _this$state.bsTableCode;
|
|
@@ -18128,14 +18163,31 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18128
18163
|
_this.setState({
|
|
18129
18164
|
visible: false
|
|
18130
18165
|
});
|
|
18131
|
-
|
|
18166
|
+
if (configvalue) {
|
|
18167
|
+
setShowSearchFields(_toConsumableArray(sortDataSource));
|
|
18168
|
+
} else {
|
|
18169
|
+
_this.setState({
|
|
18170
|
+
isDefaultValue: true,
|
|
18171
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
18172
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
18173
|
+
hidden: false
|
|
18174
|
+
});
|
|
18175
|
+
})),
|
|
18176
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
18177
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
18178
|
+
hidden: false
|
|
18179
|
+
});
|
|
18180
|
+
}))
|
|
18181
|
+
});
|
|
18182
|
+
setShowSearchFields(_toConsumableArray(datasource));
|
|
18183
|
+
}
|
|
18132
18184
|
};
|
|
18133
18185
|
_this.setInitValue = function () {
|
|
18134
|
-
var _this$
|
|
18135
|
-
_this$
|
|
18136
|
-
datasource = _this$
|
|
18137
|
-
_this$
|
|
18138
|
-
showSearchFields = _this$
|
|
18186
|
+
var _this$props2 = _this.props,
|
|
18187
|
+
_this$props2$datasour = _this$props2.datasource,
|
|
18188
|
+
datasource = _this$props2$datasour === void 0 ? [] : _this$props2$datasour,
|
|
18189
|
+
_this$props2$showSear = _this$props2.showSearchFields,
|
|
18190
|
+
showSearchFields = _this$props2$showSear === void 0 ? [] : _this$props2$showSear;
|
|
18139
18191
|
var config = _this.getConfigFromlocalstorage();
|
|
18140
18192
|
_this.setState({
|
|
18141
18193
|
isDefaultValue: true,
|
|
@@ -18321,6 +18373,9 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18321
18373
|
_this.handleReset = function () {
|
|
18322
18374
|
_this.setInitValue(true);
|
|
18323
18375
|
};
|
|
18376
|
+
_this.handleResetSetting = function () {
|
|
18377
|
+
_this.patchUserSearchFieldsConfig('');
|
|
18378
|
+
};
|
|
18324
18379
|
_this.onSearch = function (e) {
|
|
18325
18380
|
_this.setState({
|
|
18326
18381
|
searchDataSource: e.target.value
|
|
@@ -18336,10 +18391,10 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18336
18391
|
_createClass(SearchItemTable, [{
|
|
18337
18392
|
key: "componentDidMount",
|
|
18338
18393
|
value: function componentDidMount() {
|
|
18339
|
-
var _this$
|
|
18340
|
-
datasource = _this$
|
|
18341
|
-
showSearchFields = _this$
|
|
18342
|
-
bsTableCode = _this$
|
|
18394
|
+
var _this$props3 = this.props,
|
|
18395
|
+
datasource = _this$props3.datasource,
|
|
18396
|
+
showSearchFields = _this$props3.showSearchFields,
|
|
18397
|
+
bsTableCode = _this$props3.bsTableCode;
|
|
18343
18398
|
var config = this.getConfigFromlocalstorage();
|
|
18344
18399
|
this.setState({
|
|
18345
18400
|
dataSource: datasource.map(function (item) {
|
|
@@ -18394,17 +18449,26 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18394
18449
|
visible: visible,
|
|
18395
18450
|
onOk: this.handleOk,
|
|
18396
18451
|
onCancel: this.handleCancel,
|
|
18397
|
-
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
18452
|
+
footer: [/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
18398
18453
|
key: "back",
|
|
18399
|
-
onClick: this.handleReset
|
|
18400
|
-
|
|
18454
|
+
onClick: this.handleReset,
|
|
18455
|
+
style: {
|
|
18456
|
+
marginRight: 0
|
|
18457
|
+
}
|
|
18458
|
+
}, "\u6062\u590D\u9ED8\u8BA4"), ",", /*#__PURE__*/React.createElement(Button, {
|
|
18459
|
+
key: "back",
|
|
18460
|
+
onClick: this.handleResetSetting
|
|
18461
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
18401
18462
|
key: "submit",
|
|
18402
|
-
onClick: this.handleCancel
|
|
18403
|
-
|
|
18463
|
+
onClick: this.handleCancel,
|
|
18464
|
+
style: {
|
|
18465
|
+
marginRight: 0
|
|
18466
|
+
}
|
|
18467
|
+
}, "\u53D6\u6D88"), ",", /*#__PURE__*/React.createElement(Button, {
|
|
18404
18468
|
key: "submit",
|
|
18405
18469
|
type: "primary",
|
|
18406
18470
|
onClick: this.handleOk
|
|
18407
|
-
}, "\u786E\u8BA4")]
|
|
18471
|
+
}, "\u786E\u8BA4"))]
|
|
18408
18472
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18409
18473
|
className: 'sort_table'
|
|
18410
18474
|
}, /*#__PURE__*/React.createElement("div", {
|
package/dist/index.js
CHANGED
|
@@ -17361,7 +17361,7 @@ var HeaderWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
|
|
|
17361
17361
|
return true;
|
|
17362
17362
|
});
|
|
17363
17363
|
|
|
17364
|
-
var css_248z$e = ".sort_table_wrapper .sort_table {\n display: flex;\n}\n.sort_table_wrapper .sort_table .sort_table_column_wrapper {\n width: 560px;\n margin-right: 10px;\n}\n.sort_table_wrapper .sort_table .sort_table_content_wrapper {\n width: 210px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count,\n.sort_table_wrapper .sort_table .sort_table_content_count {\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count span,\n.sort_table_wrapper .sort_table .sort_table_content_count span {\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column {\n margin-top: 10px;\n width: 560px;\n height: 430px;\n overflow: auto;\n padding: 10px;\n background: #ffffff;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all_empty {\n width: 538px;\n line-height: 360px;\n text-align: center;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column_special {\n margin-top: 40px;\n width: 100px;\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper {\n width: 144px;\n margin-top: 16px;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.sort_table_wrapper .sort_table .sort_table_content {\n margin-top: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_content .ant-table-wrapper {\n padding: 0px !important;\n}\n.sort_table_wrapper .sort_table .sort_table_content .sort_table_title {\n height: 32px;\n line-height: 32px;\n padding-left: 10px;\n color: gray;\n}\n.sort_table_wrapper div.ant-modal-header {\n width: 820px;\n height: 64px;\n background: #ffffff;\n padding: 20px;\n border: 0px;\n}\n.sort_table_wrapper div.ant-modal-header div.ant-modal-title {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 24px;\n}\n.sort_table_wrapper .ant-modal-body {\n padding: 0 20px !important;\n}\n.sort_table_wrapper .ant-modal-close-x {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-input-affix-wrapper {\n padding: 0px;\n padding-right: 10px;\n}\n.sort_table_wrapper input {\n height: 32px;\n padding: 6px 4px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-input-prefix {\n width: 24px;\n height: 24px;\n margin: 4px;\n display: flex;\n justify-content: center;\n}\n.sort_table_wrapper .ant-modal-footer {\n height: 70px;\n border: 0;\n padding: 20px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn {\n width: 80px;\n height: 34px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn span {\n font-family: PingFangSC-Medium;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0;\n text-align: center;\n line-height: 20px;\n}\n.sort_table_wrapper .ant-
|
|
17364
|
+
var css_248z$e = ".sort_table_wrapper .sort_table {\n display: flex;\n}\n.sort_table_wrapper .sort_table .sort_table_column_wrapper {\n width: 560px;\n margin-right: 10px;\n}\n.sort_table_wrapper .sort_table .sort_table_content_wrapper {\n width: 210px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count,\n.sort_table_wrapper .sort_table .sort_table_content_count {\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column_count span,\n.sort_table_wrapper .sort_table .sort_table_content_count span {\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column {\n margin-top: 10px;\n width: 560px;\n height: 430px;\n overflow: auto;\n padding: 10px;\n background: #ffffff;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n.sort_table_wrapper .sort_table .sort_table_column_all_empty {\n width: 538px;\n line-height: 360px;\n text-align: center;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n}\n.sort_table_wrapper .sort_table .sort_table_column_special {\n margin-top: 40px;\n width: 100px;\n height: 20px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #848484;\n letter-spacing: 0;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper {\n width: 144px;\n margin-top: 16px;\n}\n.sort_table_wrapper .sort_table .sort_table_column .ant-checkbox-wrapper + .ant-checkbox-wrapper {\n margin-left: 0px;\n}\n.sort_table_wrapper .sort_table .sort_table_content {\n margin-top: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n}\n.sort_table_wrapper .sort_table .sort_table_content .ant-table-wrapper {\n padding: 0px !important;\n}\n.sort_table_wrapper .sort_table .sort_table_content .sort_table_title {\n height: 32px;\n line-height: 32px;\n padding-left: 10px;\n color: gray;\n}\n.sort_table_wrapper div.ant-modal-header {\n width: 820px;\n height: 64px;\n background: #ffffff;\n padding: 20px;\n border: 0px;\n}\n.sort_table_wrapper div.ant-modal-header div.ant-modal-title {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 24px;\n}\n.sort_table_wrapper .ant-modal-body {\n padding: 0 20px !important;\n}\n.sort_table_wrapper .ant-modal-close-x {\n height: 24px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-input-affix-wrapper {\n padding: 0px;\n padding-right: 10px;\n}\n.sort_table_wrapper input {\n height: 32px;\n padding: 6px 4px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-input-prefix {\n width: 24px;\n height: 24px;\n margin: 4px;\n display: flex;\n justify-content: center;\n}\n.sort_table_wrapper .ant-modal-footer {\n height: 70px;\n border: 0;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn {\n width: 80px;\n height: 34px;\n border-radius: 5px;\n}\n.sort_table_wrapper .ant-modal-footer .ant-btn span {\n font-family: PingFangSC-Medium;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0;\n text-align: center;\n line-height: 20px;\n}\n.sort_table_wrapper .ant-table-wrapper::-webkit-scrollbar {\n display: none;\n}\n.sort_table_wrapper .ant-table-wrapper {\n margin-top: 10px;\n height: 364px;\n overflow: scroll;\n padding-bottom: 50px;\n}\n.sort_table_wrapper .ant-table-wrapper tr {\n height: 36px;\n}\n.sort_table_wrapper .ant-table-wrapper tr td {\n width: 24px !important;\n height: 36px !important;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n font-size: 14px;\n color: #000000;\n letter-spacing: 0;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:first-child {\n padding-left: 10px !important;\n padding-right: 0px !important;\n width: 115px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td img {\n cursor: pointer;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:not(:first-child) {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:last-child {\n padding-left: 0px !important;\n padding-right: 3px !important;\n width: 34px !important;\n}\n.sort_table_wrapper .ant-table-wrapper tr td:last-child img {\n position: relative;\n top: 1px;\n}\n";
|
|
17365
17365
|
styleInject(css_248z$e);
|
|
17366
17366
|
|
|
17367
17367
|
var _excluded$d = ["className", "style"];
|
|
@@ -17436,7 +17436,10 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17436
17436
|
return [];
|
|
17437
17437
|
};
|
|
17438
17438
|
_this.patchConfigToLocalstorage = function (configvalue) {
|
|
17439
|
-
var
|
|
17439
|
+
var _this$props = _this.props,
|
|
17440
|
+
setShowColumns = _this$props.setShowColumns,
|
|
17441
|
+
_this$props$datasourc = _this$props.datasource,
|
|
17442
|
+
datasource = _this$props$datasourc === void 0 ? [] : _this$props$datasourc;
|
|
17440
17443
|
var _this$state = _this.state,
|
|
17441
17444
|
sortDataSource = _this$state.sortDataSource,
|
|
17442
17445
|
bsTableCode = _this$state.bsTableCode;
|
|
@@ -17457,12 +17460,29 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17457
17460
|
_this.setState({
|
|
17458
17461
|
visible: false
|
|
17459
17462
|
});
|
|
17460
|
-
|
|
17463
|
+
if (configvalue) {
|
|
17464
|
+
setShowColumns(_toConsumableArray(sortDataSource));
|
|
17465
|
+
} else {
|
|
17466
|
+
_this.setState({
|
|
17467
|
+
isDefaultValue: true,
|
|
17468
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
17469
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17470
|
+
hidden: false
|
|
17471
|
+
});
|
|
17472
|
+
})),
|
|
17473
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
17474
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17475
|
+
hidden: false
|
|
17476
|
+
});
|
|
17477
|
+
}))
|
|
17478
|
+
});
|
|
17479
|
+
setShowColumns(_toConsumableArray(datasource));
|
|
17480
|
+
}
|
|
17461
17481
|
};
|
|
17462
17482
|
_this.setInitValue = function () {
|
|
17463
|
-
var _this$
|
|
17464
|
-
datasource = _this$
|
|
17465
|
-
showColumn = _this$
|
|
17483
|
+
var _this$props2 = _this.props,
|
|
17484
|
+
datasource = _this$props2.datasource,
|
|
17485
|
+
showColumn = _this$props2.showColumn;
|
|
17466
17486
|
var config = _this.getConfigFromlocalstorage();
|
|
17467
17487
|
_this.setState({
|
|
17468
17488
|
isDefaultValue: true,
|
|
@@ -17817,6 +17837,9 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17817
17837
|
_this.handleReset = function () {
|
|
17818
17838
|
_this.setInitValue(true);
|
|
17819
17839
|
};
|
|
17840
|
+
_this.handleResetSetting = function () {
|
|
17841
|
+
_this.patchUserColumnConfig('');
|
|
17842
|
+
};
|
|
17820
17843
|
_this.onSearch = function (e) {
|
|
17821
17844
|
_this.setState({
|
|
17822
17845
|
searchDataSource: e.target.value
|
|
@@ -17832,10 +17855,10 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17832
17855
|
_createClass(SortableTable, [{
|
|
17833
17856
|
key: "componentDidMount",
|
|
17834
17857
|
value: function componentDidMount() {
|
|
17835
|
-
var _this$
|
|
17836
|
-
datasource = _this$
|
|
17837
|
-
showColumn = _this$
|
|
17838
|
-
bsTableCode = _this$
|
|
17858
|
+
var _this$props3 = this.props,
|
|
17859
|
+
datasource = _this$props3.datasource,
|
|
17860
|
+
showColumn = _this$props3.showColumn,
|
|
17861
|
+
bsTableCode = _this$props3.bsTableCode;
|
|
17839
17862
|
var config = this.getConfigFromlocalstorage();
|
|
17840
17863
|
this.setState({
|
|
17841
17864
|
dataSource: datasource.map(function (item) {
|
|
@@ -17903,17 +17926,26 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17903
17926
|
visible: visible,
|
|
17904
17927
|
onOk: this.handleOk,
|
|
17905
17928
|
onCancel: this.handleCancel,
|
|
17906
|
-
footer: [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17929
|
+
footer: [/*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17907
17930
|
key: "back",
|
|
17908
|
-
onClick: this.handleReset
|
|
17909
|
-
|
|
17931
|
+
onClick: this.handleReset,
|
|
17932
|
+
style: {
|
|
17933
|
+
marginRight: 0
|
|
17934
|
+
}
|
|
17935
|
+
}, "\u6062\u590D\u9ED8\u8BA4"), ",", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17936
|
+
key: "back",
|
|
17937
|
+
onClick: this.handleResetSetting
|
|
17938
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E")), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17910
17939
|
key: "submit",
|
|
17911
|
-
onClick: this.handleCancel
|
|
17912
|
-
|
|
17940
|
+
onClick: this.handleCancel,
|
|
17941
|
+
style: {
|
|
17942
|
+
marginRight: 0
|
|
17943
|
+
}
|
|
17944
|
+
}, "\u53D6\u6D88"), ",", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17913
17945
|
key: "submit",
|
|
17914
17946
|
type: "primary",
|
|
17915
17947
|
onClick: this.handleOk
|
|
17916
|
-
}, "\u786E\u8BA4")]
|
|
17948
|
+
}, "\u786E\u8BA4"))]
|
|
17917
17949
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17918
17950
|
className: 'sort_table'
|
|
17919
17951
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -18125,7 +18157,10 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18125
18157
|
return [];
|
|
18126
18158
|
};
|
|
18127
18159
|
_this.patchConfigToLocalstorage = function (configvalue) {
|
|
18128
|
-
var
|
|
18160
|
+
var _this$props = _this.props,
|
|
18161
|
+
setShowSearchFields = _this$props.setShowSearchFields,
|
|
18162
|
+
_this$props$datasourc = _this$props.datasource,
|
|
18163
|
+
datasource = _this$props$datasourc === void 0 ? [] : _this$props$datasourc;
|
|
18129
18164
|
var _this$state = _this.state,
|
|
18130
18165
|
sortDataSource = _this$state.sortDataSource,
|
|
18131
18166
|
bsTableCode = _this$state.bsTableCode;
|
|
@@ -18146,14 +18181,31 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18146
18181
|
_this.setState({
|
|
18147
18182
|
visible: false
|
|
18148
18183
|
});
|
|
18149
|
-
|
|
18184
|
+
if (configvalue) {
|
|
18185
|
+
setShowSearchFields(_toConsumableArray(sortDataSource));
|
|
18186
|
+
} else {
|
|
18187
|
+
_this.setState({
|
|
18188
|
+
isDefaultValue: true,
|
|
18189
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
18190
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
18191
|
+
hidden: false
|
|
18192
|
+
});
|
|
18193
|
+
})),
|
|
18194
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
18195
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
18196
|
+
hidden: false
|
|
18197
|
+
});
|
|
18198
|
+
}))
|
|
18199
|
+
});
|
|
18200
|
+
setShowSearchFields(_toConsumableArray(datasource));
|
|
18201
|
+
}
|
|
18150
18202
|
};
|
|
18151
18203
|
_this.setInitValue = function () {
|
|
18152
|
-
var _this$
|
|
18153
|
-
_this$
|
|
18154
|
-
datasource = _this$
|
|
18155
|
-
_this$
|
|
18156
|
-
showSearchFields = _this$
|
|
18204
|
+
var _this$props2 = _this.props,
|
|
18205
|
+
_this$props2$datasour = _this$props2.datasource,
|
|
18206
|
+
datasource = _this$props2$datasour === void 0 ? [] : _this$props2$datasour,
|
|
18207
|
+
_this$props2$showSear = _this$props2.showSearchFields,
|
|
18208
|
+
showSearchFields = _this$props2$showSear === void 0 ? [] : _this$props2$showSear;
|
|
18157
18209
|
var config = _this.getConfigFromlocalstorage();
|
|
18158
18210
|
_this.setState({
|
|
18159
18211
|
isDefaultValue: true,
|
|
@@ -18339,6 +18391,9 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18339
18391
|
_this.handleReset = function () {
|
|
18340
18392
|
_this.setInitValue(true);
|
|
18341
18393
|
};
|
|
18394
|
+
_this.handleResetSetting = function () {
|
|
18395
|
+
_this.patchUserSearchFieldsConfig('');
|
|
18396
|
+
};
|
|
18342
18397
|
_this.onSearch = function (e) {
|
|
18343
18398
|
_this.setState({
|
|
18344
18399
|
searchDataSource: e.target.value
|
|
@@ -18354,10 +18409,10 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18354
18409
|
_createClass(SearchItemTable, [{
|
|
18355
18410
|
key: "componentDidMount",
|
|
18356
18411
|
value: function componentDidMount() {
|
|
18357
|
-
var _this$
|
|
18358
|
-
datasource = _this$
|
|
18359
|
-
showSearchFields = _this$
|
|
18360
|
-
bsTableCode = _this$
|
|
18412
|
+
var _this$props3 = this.props,
|
|
18413
|
+
datasource = _this$props3.datasource,
|
|
18414
|
+
showSearchFields = _this$props3.showSearchFields,
|
|
18415
|
+
bsTableCode = _this$props3.bsTableCode;
|
|
18361
18416
|
var config = this.getConfigFromlocalstorage();
|
|
18362
18417
|
this.setState({
|
|
18363
18418
|
dataSource: datasource.map(function (item) {
|
|
@@ -18412,17 +18467,26 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18412
18467
|
visible: visible,
|
|
18413
18468
|
onOk: this.handleOk,
|
|
18414
18469
|
onCancel: this.handleCancel,
|
|
18415
|
-
footer: [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18470
|
+
footer: [/*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18416
18471
|
key: "back",
|
|
18417
|
-
onClick: this.handleReset
|
|
18418
|
-
|
|
18472
|
+
onClick: this.handleReset,
|
|
18473
|
+
style: {
|
|
18474
|
+
marginRight: 0
|
|
18475
|
+
}
|
|
18476
|
+
}, "\u6062\u590D\u9ED8\u8BA4"), ",", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18477
|
+
key: "back",
|
|
18478
|
+
onClick: this.handleResetSetting
|
|
18479
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E")), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18419
18480
|
key: "submit",
|
|
18420
|
-
onClick: this.handleCancel
|
|
18421
|
-
|
|
18481
|
+
onClick: this.handleCancel,
|
|
18482
|
+
style: {
|
|
18483
|
+
marginRight: 0
|
|
18484
|
+
}
|
|
18485
|
+
}, "\u53D6\u6D88"), ",", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
18422
18486
|
key: "submit",
|
|
18423
18487
|
type: "primary",
|
|
18424
18488
|
onClick: this.handleOk
|
|
18425
|
-
}, "\u786E\u8BA4")]
|
|
18489
|
+
}, "\u786E\u8BA4"))]
|
|
18426
18490
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18427
18491
|
className: 'sort_table'
|
|
18428
18492
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
package/package.json
CHANGED
|
@@ -79,7 +79,7 @@ class SearchItemTable extends React.Component {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
patchConfigToLocalstorage = (configvalue) => {
|
|
82
|
-
const { setShowSearchFields } = this.props;
|
|
82
|
+
const { setShowSearchFields, datasource = [] } = this.props;
|
|
83
83
|
const { sortDataSource, bsTableCode } = this.state;
|
|
84
84
|
let config = localStorage.getItem(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION) || '[]'
|
|
85
85
|
let configArray = JSON.parse(config)
|
|
@@ -97,7 +97,22 @@ class SearchItemTable extends React.Component {
|
|
|
97
97
|
this.setState({
|
|
98
98
|
visible: false,
|
|
99
99
|
});
|
|
100
|
-
|
|
100
|
+
if(configvalue){
|
|
101
|
+
setShowSearchFields([...sortDataSource]);
|
|
102
|
+
}else{
|
|
103
|
+
this.setState({
|
|
104
|
+
isDefaultValue: true,
|
|
105
|
+
dataSource: [...datasource.map((item)=>({
|
|
106
|
+
...item,
|
|
107
|
+
hidden: false
|
|
108
|
+
}))],
|
|
109
|
+
sortDataSource: [...datasource.map((item)=>({
|
|
110
|
+
...item,
|
|
111
|
+
hidden: false
|
|
112
|
+
}))]
|
|
113
|
+
});
|
|
114
|
+
setShowSearchFields([...datasource]);
|
|
115
|
+
}
|
|
101
116
|
};
|
|
102
117
|
|
|
103
118
|
setInitValue = (isClick = false) => {
|
|
@@ -362,6 +377,10 @@ class SearchItemTable extends React.Component {
|
|
|
362
377
|
this.setInitValue(true);
|
|
363
378
|
};
|
|
364
379
|
|
|
380
|
+
handleResetSetting = () =>{
|
|
381
|
+
this.patchUserSearchFieldsConfig('');
|
|
382
|
+
}
|
|
383
|
+
|
|
365
384
|
onSearch = (e: any) => {
|
|
366
385
|
this.setState({
|
|
367
386
|
searchDataSource: e.target.value,
|
|
@@ -396,15 +415,22 @@ class SearchItemTable extends React.Component {
|
|
|
396
415
|
onOk={this.handleOk}
|
|
397
416
|
onCancel={this.handleCancel}
|
|
398
417
|
footer={[
|
|
399
|
-
<
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
418
|
+
<div>
|
|
419
|
+
<Button key="back" onClick={this.handleReset} style={{marginRight: 0}}>
|
|
420
|
+
恢复默认
|
|
421
|
+
</Button>,
|
|
422
|
+
<Button key="back" onClick={this.handleResetSetting}>
|
|
423
|
+
重置设置
|
|
424
|
+
</Button>
|
|
425
|
+
</div>,
|
|
426
|
+
<div>
|
|
427
|
+
<Button key="submit" onClick={this.handleCancel} style={{marginRight: 0}}>
|
|
428
|
+
取消
|
|
429
|
+
</Button>,
|
|
430
|
+
<Button key="submit" type="primary" onClick={this.handleOk}>
|
|
431
|
+
确认
|
|
432
|
+
</Button>
|
|
433
|
+
</div>,
|
|
408
434
|
]}
|
|
409
435
|
>
|
|
410
436
|
<div className={'sort_table'}>
|
|
@@ -145,7 +145,9 @@
|
|
|
145
145
|
height: 70px;
|
|
146
146
|
border: 0;
|
|
147
147
|
padding: 20px;
|
|
148
|
-
|
|
148
|
+
display: flex;
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
|
|
149
151
|
.ant-btn {
|
|
150
152
|
width: 80px;
|
|
151
153
|
height: 34px;
|
|
@@ -160,9 +162,9 @@
|
|
|
160
162
|
line-height: 20px;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
|
-
&:first-child {
|
|
164
|
-
|
|
165
|
-
}
|
|
165
|
+
// &:first-child {
|
|
166
|
+
// margin-right: 524px;
|
|
167
|
+
// }
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
|
|
@@ -86,7 +86,7 @@ class SortableTable extends React.Component {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
patchConfigToLocalstorage = (configvalue) => {
|
|
89
|
-
const { setShowColumns } = this.props;
|
|
89
|
+
const { setShowColumns, datasource = [] } = this.props;
|
|
90
90
|
const { sortDataSource, bsTableCode } = this.state;
|
|
91
91
|
let config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]'
|
|
92
92
|
let configArray = JSON.parse(config)
|
|
@@ -104,7 +104,22 @@ class SortableTable extends React.Component {
|
|
|
104
104
|
this.setState({
|
|
105
105
|
visible: false,
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
if(configvalue){
|
|
108
|
+
setShowColumns([...sortDataSource]);
|
|
109
|
+
}else{
|
|
110
|
+
this.setState({
|
|
111
|
+
isDefaultValue: true,
|
|
112
|
+
dataSource: [...datasource.map((item)=>({
|
|
113
|
+
...item,
|
|
114
|
+
hidden: false
|
|
115
|
+
}))],
|
|
116
|
+
sortDataSource: [...datasource.map((item)=>({
|
|
117
|
+
...item,
|
|
118
|
+
hidden: false
|
|
119
|
+
}))]
|
|
120
|
+
});
|
|
121
|
+
setShowColumns([...datasource]);
|
|
122
|
+
}
|
|
108
123
|
};
|
|
109
124
|
|
|
110
125
|
setInitValue = (isClick = false) => {
|
|
@@ -570,6 +585,10 @@ class SortableTable extends React.Component {
|
|
|
570
585
|
this.setInitValue(true);
|
|
571
586
|
};
|
|
572
587
|
|
|
588
|
+
handleResetSetting = () =>{
|
|
589
|
+
this.patchUserColumnConfig('');
|
|
590
|
+
}
|
|
591
|
+
|
|
573
592
|
onSearch = (e: any) => {
|
|
574
593
|
this.setState({
|
|
575
594
|
searchDataSource: e.target.value,
|
|
@@ -606,15 +625,22 @@ class SortableTable extends React.Component {
|
|
|
606
625
|
onOk={this.handleOk}
|
|
607
626
|
onCancel={this.handleCancel}
|
|
608
627
|
footer={[
|
|
609
|
-
<
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
628
|
+
<div>
|
|
629
|
+
<Button key="back" onClick={this.handleReset} style={{marginRight: 0}}>
|
|
630
|
+
恢复默认
|
|
631
|
+
</Button>,
|
|
632
|
+
<Button key="back" onClick={this.handleResetSetting}>
|
|
633
|
+
重置设置
|
|
634
|
+
</Button>
|
|
635
|
+
</div>,
|
|
636
|
+
<div>
|
|
637
|
+
<Button key="submit" onClick={this.handleCancel} style={{marginRight: 0}}>
|
|
638
|
+
取消
|
|
639
|
+
</Button>,
|
|
640
|
+
<Button key="submit" type="primary" onClick={this.handleOk}>
|
|
641
|
+
确认
|
|
642
|
+
</Button>
|
|
643
|
+
</div>
|
|
618
644
|
]}
|
|
619
645
|
>
|
|
620
646
|
<div className={'sort_table'}>
|