@bit-sun/business-component 3.1.0-alpha.7 → 3.1.0-alpha.8
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/setting.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +2 -1
- package/dist/components/Business/columnSettingTable/utils.d.ts +1 -0
- package/dist/index.esm.js +103 -38
- package/dist/index.js +103 -38
- package/package.json +1 -1
- package/src/components/Business/BsSulaQueryTable/index.less +7 -1
- package/src/components/Business/BsSulaQueryTable/setting.tsx +5 -0
- package/src/components/Business/columnSettingTable/columnSetting.tsx +63 -14
- package/src/components/Business/columnSettingTable/index.less +7 -1
- package/src/components/Business/columnSettingTable/index.tsx +3 -12
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +2 -12
- package/src/components/Business/columnSettingTable/utils.tsx +18 -1
|
@@ -24,7 +24,7 @@ declare class SortableTable extends React.Component<SortTableProps> {
|
|
|
24
24
|
dataIndex: string;
|
|
25
25
|
className: string;
|
|
26
26
|
width: number;
|
|
27
|
-
render
|
|
27
|
+
render: (text: any, record: any) => React.JSX.Element;
|
|
28
28
|
} | {
|
|
29
29
|
title: string;
|
|
30
30
|
dataIndex: string;
|
|
@@ -47,6 +47,7 @@ declare class SortableTable extends React.Component<SortTableProps> {
|
|
|
47
47
|
DraggableBodyRow: ({ className, style, ...restProps }: any) => React.JSX.Element;
|
|
48
48
|
onChange: (e: any, title: any) => void;
|
|
49
49
|
handleReset: () => void;
|
|
50
|
+
handleResetSetting: () => void;
|
|
50
51
|
onSearch: (e: any) => void;
|
|
51
52
|
onSearchSort: (e: any) => void;
|
|
52
53
|
getConfigFromlocalstorage: () => any;
|
|
@@ -7,3 +7,4 @@ import React from 'react';
|
|
|
7
7
|
export declare const noEmptyArray: (arr: any[]) => boolean;
|
|
8
8
|
export declare const getItemDefaultWidth: (item: any) => number;
|
|
9
9
|
export declare const handleTextOverflow: (text: string | undefined, width?: number) => React.JSX.Element;
|
|
10
|
+
export declare const getShowColumns: (originColumns: any[], configs: any[]) => any[];
|
package/dist/index.esm.js
CHANGED
|
@@ -5464,6 +5464,21 @@ var getItemDefaultWidth$2 = function getItemDefaultWidth(item) {
|
|
|
5464
5464
|
}
|
|
5465
5465
|
return defaultWidth;
|
|
5466
5466
|
};
|
|
5467
|
+
var getShowColumns = function getShowColumns(originColumns, configs) {
|
|
5468
|
+
var showColumns = [];
|
|
5469
|
+
if (configs.length) {
|
|
5470
|
+
configs.forEach(function (config) {
|
|
5471
|
+
var inner = originColumns.filter(function (innerItem) {
|
|
5472
|
+
return innerItem.dataIndex && innerItem.dataIndex === config.dataIndex || innerItem.key && innerItem.key === config.key;
|
|
5473
|
+
})[0];
|
|
5474
|
+
inner && showColumns.push(_objectSpread2(_objectSpread2({}, inner), config));
|
|
5475
|
+
});
|
|
5476
|
+
}
|
|
5477
|
+
if (showColumns.length) return showColumns;
|
|
5478
|
+
return (originColumns || []).filter(function (item) {
|
|
5479
|
+
return !item.hidden;
|
|
5480
|
+
});
|
|
5481
|
+
};
|
|
5467
5482
|
|
|
5468
5483
|
// 下拉框数据源
|
|
5469
5484
|
// 情况①:每条记录下拉框数据不同----查询接口每条记录返回字段,前后端约定好,用dataSourceCode记录
|
|
@@ -12184,7 +12199,7 @@ var ExportIcon = function ExportIcon(_ref) {
|
|
|
12184
12199
|
})));
|
|
12185
12200
|
};
|
|
12186
12201
|
|
|
12187
|
-
var css_248z$b = ".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-modal-footer .ant-btn:first-child {\n margin-right: 524px;\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:
|
|
12202
|
+
var css_248z$b = ".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-modal-footer .ant-btn:first-child {\n margin-right: 524px;\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: 108px !important;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 36px !important;\n line-height: 36px !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.global_tab_nav_style {\n top: 2px !important;\n}\n.row-dragging {\n background: #fafafa;\n border: 1px solid #ccc;\n z-index: 10000;\n}\n.row-dragging td {\n padding: 7px 16px;\n display: none;\n}\n.row-dragging td:first-child {\n display: inline-block;\n}\n.row-dragging .drag-visible {\n visibility: visible;\n}\n";
|
|
12188
12203
|
styleInject(css_248z$b);
|
|
12189
12204
|
|
|
12190
12205
|
var _excluded$8 = ["className", "style"];
|
|
@@ -12222,7 +12237,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12222
12237
|
tableCode = _this$props.tableCode,
|
|
12223
12238
|
appRequestConfig = _this$props.appRequestConfig;
|
|
12224
12239
|
if (!tableCode) return;
|
|
12225
|
-
var configvalue = config.map(function (item) {
|
|
12240
|
+
var configvalue = config ? config.map(function (item) {
|
|
12226
12241
|
return {
|
|
12227
12242
|
key: item.key,
|
|
12228
12243
|
dataIndex: item.dataIndex,
|
|
@@ -12230,13 +12245,13 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12230
12245
|
hidden: item.hidden,
|
|
12231
12246
|
fixed: item.fixed
|
|
12232
12247
|
};
|
|
12233
|
-
});
|
|
12248
|
+
}) : '';
|
|
12234
12249
|
requestUtil({
|
|
12235
12250
|
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
12236
12251
|
method: 'POST',
|
|
12237
12252
|
data: {
|
|
12238
12253
|
"code": tableCode,
|
|
12239
|
-
"detail": JSON.stringify(configvalue)
|
|
12254
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
12240
12255
|
}
|
|
12241
12256
|
}).then(function (res) {
|
|
12242
12257
|
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
@@ -12247,20 +12262,45 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12247
12262
|
});
|
|
12248
12263
|
};
|
|
12249
12264
|
_this.patchConfigToLocalstorage = function (configvalue, tableCode) {
|
|
12265
|
+
var _this$props2 = _this.props,
|
|
12266
|
+
setShowColumns = _this$props2.setShowColumns,
|
|
12267
|
+
_this$props2$datasour = _this$props2.datasource,
|
|
12268
|
+
datasource = _this$props2$datasour === void 0 ? [] : _this$props2$datasour;
|
|
12269
|
+
var sortDataSource = _this.state.sortDataSource;
|
|
12250
12270
|
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
12251
12271
|
var configArray = JSON.parse(config);
|
|
12252
12272
|
var currentSetting = configArray.filter(function (item) {
|
|
12253
12273
|
return item.code === tableCode;
|
|
12254
12274
|
});
|
|
12255
12275
|
if (currentSetting.length) {
|
|
12256
|
-
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
12276
|
+
currentSetting[0].detail = configvalue ? JSON.stringify(configvalue) : '';
|
|
12257
12277
|
} else {
|
|
12258
12278
|
configArray.push({
|
|
12259
12279
|
"code": tableCode,
|
|
12260
|
-
"detail": JSON.stringify(configvalue)
|
|
12280
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
12261
12281
|
});
|
|
12262
12282
|
}
|
|
12263
12283
|
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
12284
|
+
_this.setState({
|
|
12285
|
+
visible: false
|
|
12286
|
+
});
|
|
12287
|
+
if (configvalue) {
|
|
12288
|
+
setShowColumns(_toConsumableArray(sortDataSource));
|
|
12289
|
+
} else {
|
|
12290
|
+
_this.setState({
|
|
12291
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
12292
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12293
|
+
hidden: false
|
|
12294
|
+
});
|
|
12295
|
+
})),
|
|
12296
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
12297
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12298
|
+
hidden: false
|
|
12299
|
+
});
|
|
12300
|
+
}))
|
|
12301
|
+
});
|
|
12302
|
+
setShowColumns(_toConsumableArray(datasource));
|
|
12303
|
+
}
|
|
12264
12304
|
};
|
|
12265
12305
|
_this.setInitValue = function (datasource) {
|
|
12266
12306
|
var _this$props$showColum = _this.props.showColumns,
|
|
@@ -12312,7 +12352,20 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12312
12352
|
title: '列名称',
|
|
12313
12353
|
dataIndex: 'title',
|
|
12314
12354
|
className: 'drag-visible',
|
|
12315
|
-
width: 100
|
|
12355
|
+
width: 100,
|
|
12356
|
+
render: function render(text, record) {
|
|
12357
|
+
return /*#__PURE__*/React$1.createElement("span", {
|
|
12358
|
+
style: {
|
|
12359
|
+
width: '100%',
|
|
12360
|
+
height: '36px',
|
|
12361
|
+
lineHeight: '36px',
|
|
12362
|
+
overflow: 'hidden',
|
|
12363
|
+
textOverflow: 'ellipsis',
|
|
12364
|
+
whiteSpace: 'nowrap'
|
|
12365
|
+
},
|
|
12366
|
+
title: text
|
|
12367
|
+
}, text);
|
|
12368
|
+
}
|
|
12316
12369
|
}, {
|
|
12317
12370
|
title: '列首',
|
|
12318
12371
|
dataIndex: 'fixedLeft',
|
|
@@ -12531,9 +12584,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12531
12584
|
var oldIndex = _ref.oldIndex,
|
|
12532
12585
|
newIndex = _ref.newIndex;
|
|
12533
12586
|
var sortDataSource = _this.state.sortDataSource;
|
|
12534
|
-
var _this$
|
|
12535
|
-
value = _this$
|
|
12536
|
-
setValue = _this$
|
|
12587
|
+
var _this$props3 = _this.props,
|
|
12588
|
+
value = _this$props3.value,
|
|
12589
|
+
setValue = _this$props3.setValue;
|
|
12537
12590
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
12538
12591
|
// message.warning('固定列不可移动');
|
|
12539
12592
|
// return;
|
|
@@ -12629,6 +12682,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12629
12682
|
datasource = _this$props$datasourc2 === void 0 ? [] : _this$props$datasourc2;
|
|
12630
12683
|
_this.setInitValue(datasource);
|
|
12631
12684
|
};
|
|
12685
|
+
_this.handleResetSetting = function () {
|
|
12686
|
+
_this.patchUserColumnConfig('');
|
|
12687
|
+
};
|
|
12632
12688
|
_this.onSearch = function (e) {
|
|
12633
12689
|
_this.setState({
|
|
12634
12690
|
searchDataSource: e.target.value
|
|
@@ -12658,8 +12714,8 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12658
12714
|
return _createClass(SortableTable, [{
|
|
12659
12715
|
key: "componentWillReceiveProps",
|
|
12660
12716
|
value: function componentWillReceiveProps(nextProps) {
|
|
12661
|
-
var _this$
|
|
12662
|
-
if (this.isColumnsChange((_this$
|
|
12717
|
+
var _this$props4;
|
|
12718
|
+
if (this.isColumnsChange((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource, nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
|
|
12663
12719
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
12664
12720
|
}
|
|
12665
12721
|
}
|
|
@@ -12693,17 +12749,31 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12693
12749
|
visible: visible,
|
|
12694
12750
|
onOk: this.handleOk,
|
|
12695
12751
|
onCancel: this.handleCancel,
|
|
12696
|
-
footer: [/*#__PURE__*/React$1.createElement(Button, {
|
|
12752
|
+
footer: [/*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Button, {
|
|
12697
12753
|
key: "back",
|
|
12698
|
-
onClick: this.handleReset
|
|
12754
|
+
onClick: this.handleReset,
|
|
12755
|
+
style: {
|
|
12756
|
+
marginRight: 0
|
|
12757
|
+
}
|
|
12699
12758
|
}, "\u6062\u590D\u9ED8\u8BA4"), /*#__PURE__*/React$1.createElement(Button, {
|
|
12759
|
+
key: "back",
|
|
12760
|
+
onClick: this.handleResetSetting
|
|
12761
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E"), /*#__PURE__*/React$1.createElement("span", {
|
|
12762
|
+
style: {
|
|
12763
|
+
fontSize: '12px',
|
|
12764
|
+
color: '8A8F8D'
|
|
12765
|
+
}
|
|
12766
|
+
}, "\uFF08\u5217\u8868\u5B57\u6BB5\u53D8\u66F4\u4F1A\u5F71\u54CD\u5217\u8BBE\u7F6E\u529F\u80FD\uFF0C\u53D8\u66F4\u540E\u8BF7\u70B9\u51FB\u91CD\u7F6E\u7136\u540E\u91CD\u65B0\u8BBE\u7F6E\uFF09")), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Button, {
|
|
12700
12767
|
key: "submit",
|
|
12701
|
-
onClick: this.
|
|
12768
|
+
onClick: this.handleCancel,
|
|
12769
|
+
style: {
|
|
12770
|
+
marginRight: 0
|
|
12771
|
+
}
|
|
12702
12772
|
}, "\u53D6\u6D88"), /*#__PURE__*/React$1.createElement(Button, {
|
|
12703
12773
|
key: "submit",
|
|
12704
12774
|
type: "primary",
|
|
12705
12775
|
onClick: this.handleOk
|
|
12706
|
-
}, "\u786E\u8BA4")]
|
|
12776
|
+
}, "\u786E\u8BA4"))]
|
|
12707
12777
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
12708
12778
|
className: 'sort_table'
|
|
12709
12779
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
@@ -12844,16 +12914,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12844
12914
|
_this.setInitialShowColumn = function (columns) {
|
|
12845
12915
|
// 获取当前列表定义数据
|
|
12846
12916
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
12847
|
-
var showColumns =
|
|
12848
|
-
var inner = columns.filter(function (innerItem) {
|
|
12849
|
-
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
12850
|
-
})[0];
|
|
12851
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
12852
|
-
}).filter(function (item) {
|
|
12853
|
-
return !item.hidden;
|
|
12854
|
-
}) : (columns || []).filter(function (item) {
|
|
12855
|
-
return !item.hidden;
|
|
12856
|
-
});
|
|
12917
|
+
var showColumns = getShowColumns(columns, columnConfig);
|
|
12857
12918
|
_this.setState({
|
|
12858
12919
|
showColumns: showColumns
|
|
12859
12920
|
});
|
|
@@ -13090,16 +13151,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
13090
13151
|
_this.setInitialShowColumn = function (columns) {
|
|
13091
13152
|
// 获取当前列表定义数据
|
|
13092
13153
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
13093
|
-
var showColumns =
|
|
13094
|
-
var inner = columns.filter(function (innerItem) {
|
|
13095
|
-
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
13096
|
-
})[0];
|
|
13097
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
13098
|
-
}).filter(function (item) {
|
|
13099
|
-
return !item.hidden;
|
|
13100
|
-
}) : (columns || []).filter(function (item) {
|
|
13101
|
-
return !item.hidden;
|
|
13102
|
-
});
|
|
13154
|
+
var showColumns = getShowColumns(columns, columnConfig);
|
|
13103
13155
|
_this.setState({
|
|
13104
13156
|
showColumns: showColumns
|
|
13105
13157
|
});
|
|
@@ -13834,7 +13886,7 @@ var HeaderWrapper = /*#__PURE__*/React$1.memo(function (_ref) {
|
|
|
13834
13886
|
return true;
|
|
13835
13887
|
});
|
|
13836
13888
|
|
|
13837
|
-
var css_248z$f = ".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:
|
|
13889
|
+
var css_248z$f = ".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: 108px !important;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 36px !important;\n line-height: 36px !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";
|
|
13838
13890
|
styleInject(css_248z$f);
|
|
13839
13891
|
|
|
13840
13892
|
var _excluded$e = ["className", "style"];
|
|
@@ -13997,7 +14049,20 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
13997
14049
|
title: '列名称',
|
|
13998
14050
|
dataIndex: 'title',
|
|
13999
14051
|
className: 'drag-visible',
|
|
14000
|
-
width: 100
|
|
14052
|
+
width: 100,
|
|
14053
|
+
render: function render(text, record) {
|
|
14054
|
+
return /*#__PURE__*/React$1.createElement("span", {
|
|
14055
|
+
style: {
|
|
14056
|
+
width: '100%',
|
|
14057
|
+
height: '36px',
|
|
14058
|
+
lineHeight: '36px',
|
|
14059
|
+
overflow: 'hidden',
|
|
14060
|
+
textOverflow: 'ellipsis',
|
|
14061
|
+
whiteSpace: 'nowrap'
|
|
14062
|
+
},
|
|
14063
|
+
title: text
|
|
14064
|
+
}, text);
|
|
14065
|
+
}
|
|
14001
14066
|
}, {
|
|
14002
14067
|
title: '列首',
|
|
14003
14068
|
dataIndex: 'fixedLeft',
|
package/dist/index.js
CHANGED
|
@@ -5487,6 +5487,21 @@ var getItemDefaultWidth$2 = function getItemDefaultWidth(item) {
|
|
|
5487
5487
|
}
|
|
5488
5488
|
return defaultWidth;
|
|
5489
5489
|
};
|
|
5490
|
+
var getShowColumns = function getShowColumns(originColumns, configs) {
|
|
5491
|
+
var showColumns = [];
|
|
5492
|
+
if (configs.length) {
|
|
5493
|
+
configs.forEach(function (config) {
|
|
5494
|
+
var inner = originColumns.filter(function (innerItem) {
|
|
5495
|
+
return innerItem.dataIndex && innerItem.dataIndex === config.dataIndex || innerItem.key && innerItem.key === config.key;
|
|
5496
|
+
})[0];
|
|
5497
|
+
inner && showColumns.push(_objectSpread2(_objectSpread2({}, inner), config));
|
|
5498
|
+
});
|
|
5499
|
+
}
|
|
5500
|
+
if (showColumns.length) return showColumns;
|
|
5501
|
+
return (originColumns || []).filter(function (item) {
|
|
5502
|
+
return !item.hidden;
|
|
5503
|
+
});
|
|
5504
|
+
};
|
|
5490
5505
|
|
|
5491
5506
|
// 下拉框数据源
|
|
5492
5507
|
// 情况①:每条记录下拉框数据不同----查询接口每条记录返回字段,前后端约定好,用dataSourceCode记录
|
|
@@ -12207,7 +12222,7 @@ var ExportIcon = function ExportIcon(_ref) {
|
|
|
12207
12222
|
})));
|
|
12208
12223
|
};
|
|
12209
12224
|
|
|
12210
|
-
var css_248z$b = ".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-modal-footer .ant-btn:first-child {\n margin-right: 524px;\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:
|
|
12225
|
+
var css_248z$b = ".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-modal-footer .ant-btn:first-child {\n margin-right: 524px;\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: 108px !important;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 36px !important;\n line-height: 36px !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.global_tab_nav_style {\n top: 2px !important;\n}\n.row-dragging {\n background: #fafafa;\n border: 1px solid #ccc;\n z-index: 10000;\n}\n.row-dragging td {\n padding: 7px 16px;\n display: none;\n}\n.row-dragging td:first-child {\n display: inline-block;\n}\n.row-dragging .drag-visible {\n visibility: visible;\n}\n";
|
|
12211
12226
|
styleInject(css_248z$b);
|
|
12212
12227
|
|
|
12213
12228
|
var _excluded$8 = ["className", "style"];
|
|
@@ -12245,7 +12260,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12245
12260
|
tableCode = _this$props.tableCode,
|
|
12246
12261
|
appRequestConfig = _this$props.appRequestConfig;
|
|
12247
12262
|
if (!tableCode) return;
|
|
12248
|
-
var configvalue = config.map(function (item) {
|
|
12263
|
+
var configvalue = config ? config.map(function (item) {
|
|
12249
12264
|
return {
|
|
12250
12265
|
key: item.key,
|
|
12251
12266
|
dataIndex: item.dataIndex,
|
|
@@ -12253,13 +12268,13 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12253
12268
|
hidden: item.hidden,
|
|
12254
12269
|
fixed: item.fixed
|
|
12255
12270
|
};
|
|
12256
|
-
});
|
|
12271
|
+
}) : '';
|
|
12257
12272
|
requestUtil({
|
|
12258
12273
|
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
12259
12274
|
method: 'POST',
|
|
12260
12275
|
data: {
|
|
12261
12276
|
"code": tableCode,
|
|
12262
|
-
"detail": JSON.stringify(configvalue)
|
|
12277
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
12263
12278
|
}
|
|
12264
12279
|
}).then(function (res) {
|
|
12265
12280
|
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
@@ -12270,20 +12285,45 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12270
12285
|
});
|
|
12271
12286
|
};
|
|
12272
12287
|
_this.patchConfigToLocalstorage = function (configvalue, tableCode) {
|
|
12288
|
+
var _this$props2 = _this.props,
|
|
12289
|
+
setShowColumns = _this$props2.setShowColumns,
|
|
12290
|
+
_this$props2$datasour = _this$props2.datasource,
|
|
12291
|
+
datasource = _this$props2$datasour === void 0 ? [] : _this$props2$datasour;
|
|
12292
|
+
var sortDataSource = _this.state.sortDataSource;
|
|
12273
12293
|
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
12274
12294
|
var configArray = JSON.parse(config);
|
|
12275
12295
|
var currentSetting = configArray.filter(function (item) {
|
|
12276
12296
|
return item.code === tableCode;
|
|
12277
12297
|
});
|
|
12278
12298
|
if (currentSetting.length) {
|
|
12279
|
-
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
12299
|
+
currentSetting[0].detail = configvalue ? JSON.stringify(configvalue) : '';
|
|
12280
12300
|
} else {
|
|
12281
12301
|
configArray.push({
|
|
12282
12302
|
"code": tableCode,
|
|
12283
|
-
"detail": JSON.stringify(configvalue)
|
|
12303
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
12284
12304
|
});
|
|
12285
12305
|
}
|
|
12286
12306
|
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
12307
|
+
_this.setState({
|
|
12308
|
+
visible: false
|
|
12309
|
+
});
|
|
12310
|
+
if (configvalue) {
|
|
12311
|
+
setShowColumns(_toConsumableArray(sortDataSource));
|
|
12312
|
+
} else {
|
|
12313
|
+
_this.setState({
|
|
12314
|
+
dataSource: _toConsumableArray(datasource.map(function (item) {
|
|
12315
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12316
|
+
hidden: false
|
|
12317
|
+
});
|
|
12318
|
+
})),
|
|
12319
|
+
sortDataSource: _toConsumableArray(datasource.map(function (item) {
|
|
12320
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12321
|
+
hidden: false
|
|
12322
|
+
});
|
|
12323
|
+
}))
|
|
12324
|
+
});
|
|
12325
|
+
setShowColumns(_toConsumableArray(datasource));
|
|
12326
|
+
}
|
|
12287
12327
|
};
|
|
12288
12328
|
_this.setInitValue = function (datasource) {
|
|
12289
12329
|
var _this$props$showColum = _this.props.showColumns,
|
|
@@ -12335,7 +12375,20 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12335
12375
|
title: '列名称',
|
|
12336
12376
|
dataIndex: 'title',
|
|
12337
12377
|
className: 'drag-visible',
|
|
12338
|
-
width: 100
|
|
12378
|
+
width: 100,
|
|
12379
|
+
render: function render(text, record) {
|
|
12380
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
12381
|
+
style: {
|
|
12382
|
+
width: '100%',
|
|
12383
|
+
height: '36px',
|
|
12384
|
+
lineHeight: '36px',
|
|
12385
|
+
overflow: 'hidden',
|
|
12386
|
+
textOverflow: 'ellipsis',
|
|
12387
|
+
whiteSpace: 'nowrap'
|
|
12388
|
+
},
|
|
12389
|
+
title: text
|
|
12390
|
+
}, text);
|
|
12391
|
+
}
|
|
12339
12392
|
}, {
|
|
12340
12393
|
title: '列首',
|
|
12341
12394
|
dataIndex: 'fixedLeft',
|
|
@@ -12554,9 +12607,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12554
12607
|
var oldIndex = _ref.oldIndex,
|
|
12555
12608
|
newIndex = _ref.newIndex;
|
|
12556
12609
|
var sortDataSource = _this.state.sortDataSource;
|
|
12557
|
-
var _this$
|
|
12558
|
-
value = _this$
|
|
12559
|
-
setValue = _this$
|
|
12610
|
+
var _this$props3 = _this.props,
|
|
12611
|
+
value = _this$props3.value,
|
|
12612
|
+
setValue = _this$props3.setValue;
|
|
12560
12613
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
12561
12614
|
// message.warning('固定列不可移动');
|
|
12562
12615
|
// return;
|
|
@@ -12652,6 +12705,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12652
12705
|
datasource = _this$props$datasourc2 === void 0 ? [] : _this$props$datasourc2;
|
|
12653
12706
|
_this.setInitValue(datasource);
|
|
12654
12707
|
};
|
|
12708
|
+
_this.handleResetSetting = function () {
|
|
12709
|
+
_this.patchUserColumnConfig('');
|
|
12710
|
+
};
|
|
12655
12711
|
_this.onSearch = function (e) {
|
|
12656
12712
|
_this.setState({
|
|
12657
12713
|
searchDataSource: e.target.value
|
|
@@ -12681,8 +12737,8 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12681
12737
|
return _createClass(SortableTable, [{
|
|
12682
12738
|
key: "componentWillReceiveProps",
|
|
12683
12739
|
value: function componentWillReceiveProps(nextProps) {
|
|
12684
|
-
var _this$
|
|
12685
|
-
if (this.isColumnsChange((_this$
|
|
12740
|
+
var _this$props4;
|
|
12741
|
+
if (this.isColumnsChange((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource, nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
|
|
12686
12742
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
12687
12743
|
}
|
|
12688
12744
|
}
|
|
@@ -12716,17 +12772,31 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12716
12772
|
visible: visible,
|
|
12717
12773
|
onOk: this.handleOk,
|
|
12718
12774
|
onCancel: this.handleCancel,
|
|
12719
|
-
footer: [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12775
|
+
footer: [/*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12720
12776
|
key: "back",
|
|
12721
|
-
onClick: this.handleReset
|
|
12777
|
+
onClick: this.handleReset,
|
|
12778
|
+
style: {
|
|
12779
|
+
marginRight: 0
|
|
12780
|
+
}
|
|
12722
12781
|
}, "\u6062\u590D\u9ED8\u8BA4"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12782
|
+
key: "back",
|
|
12783
|
+
onClick: this.handleResetSetting
|
|
12784
|
+
}, "\u91CD\u7F6E\u8BBE\u7F6E"), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
12785
|
+
style: {
|
|
12786
|
+
fontSize: '12px',
|
|
12787
|
+
color: '8A8F8D'
|
|
12788
|
+
}
|
|
12789
|
+
}, "\uFF08\u5217\u8868\u5B57\u6BB5\u53D8\u66F4\u4F1A\u5F71\u54CD\u5217\u8BBE\u7F6E\u529F\u80FD\uFF0C\u53D8\u66F4\u540E\u8BF7\u70B9\u51FB\u91CD\u7F6E\u7136\u540E\u91CD\u65B0\u8BBE\u7F6E\uFF09")), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12723
12790
|
key: "submit",
|
|
12724
|
-
onClick: this.
|
|
12791
|
+
onClick: this.handleCancel,
|
|
12792
|
+
style: {
|
|
12793
|
+
marginRight: 0
|
|
12794
|
+
}
|
|
12725
12795
|
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12726
12796
|
key: "submit",
|
|
12727
12797
|
type: "primary",
|
|
12728
12798
|
onClick: this.handleOk
|
|
12729
|
-
}, "\u786E\u8BA4")]
|
|
12799
|
+
}, "\u786E\u8BA4"))]
|
|
12730
12800
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12731
12801
|
className: 'sort_table'
|
|
12732
12802
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -12867,16 +12937,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12867
12937
|
_this.setInitialShowColumn = function (columns) {
|
|
12868
12938
|
// 获取当前列表定义数据
|
|
12869
12939
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
12870
|
-
var showColumns =
|
|
12871
|
-
var inner = columns.filter(function (innerItem) {
|
|
12872
|
-
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
12873
|
-
})[0];
|
|
12874
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
12875
|
-
}).filter(function (item) {
|
|
12876
|
-
return !item.hidden;
|
|
12877
|
-
}) : (columns || []).filter(function (item) {
|
|
12878
|
-
return !item.hidden;
|
|
12879
|
-
});
|
|
12940
|
+
var showColumns = getShowColumns(columns, columnConfig);
|
|
12880
12941
|
_this.setState({
|
|
12881
12942
|
showColumns: showColumns
|
|
12882
12943
|
});
|
|
@@ -13113,16 +13174,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
13113
13174
|
_this.setInitialShowColumn = function (columns) {
|
|
13114
13175
|
// 获取当前列表定义数据
|
|
13115
13176
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
13116
|
-
var showColumns =
|
|
13117
|
-
var inner = columns.filter(function (innerItem) {
|
|
13118
|
-
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
13119
|
-
})[0];
|
|
13120
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
13121
|
-
}).filter(function (item) {
|
|
13122
|
-
return !item.hidden;
|
|
13123
|
-
}) : (columns || []).filter(function (item) {
|
|
13124
|
-
return !item.hidden;
|
|
13125
|
-
});
|
|
13177
|
+
var showColumns = getShowColumns(columns, columnConfig);
|
|
13126
13178
|
_this.setState({
|
|
13127
13179
|
showColumns: showColumns
|
|
13128
13180
|
});
|
|
@@ -13857,7 +13909,7 @@ var HeaderWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
|
|
|
13857
13909
|
return true;
|
|
13858
13910
|
});
|
|
13859
13911
|
|
|
13860
|
-
var css_248z$f = ".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:
|
|
13912
|
+
var css_248z$f = ".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: 108px !important;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 36px !important;\n line-height: 36px !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";
|
|
13861
13913
|
styleInject(css_248z$f);
|
|
13862
13914
|
|
|
13863
13915
|
var _excluded$e = ["className", "style"];
|
|
@@ -14020,7 +14072,20 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
14020
14072
|
title: '列名称',
|
|
14021
14073
|
dataIndex: 'title',
|
|
14022
14074
|
className: 'drag-visible',
|
|
14023
|
-
width: 100
|
|
14075
|
+
width: 100,
|
|
14076
|
+
render: function render(text, record) {
|
|
14077
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
14078
|
+
style: {
|
|
14079
|
+
width: '100%',
|
|
14080
|
+
height: '36px',
|
|
14081
|
+
lineHeight: '36px',
|
|
14082
|
+
overflow: 'hidden',
|
|
14083
|
+
textOverflow: 'ellipsis',
|
|
14084
|
+
whiteSpace: 'nowrap'
|
|
14085
|
+
},
|
|
14086
|
+
title: text
|
|
14087
|
+
}, text);
|
|
14088
|
+
}
|
|
14024
14089
|
}, {
|
|
14025
14090
|
title: '列首',
|
|
14026
14091
|
dataIndex: 'fixedLeft',
|
package/package.json
CHANGED
|
@@ -192,7 +192,13 @@
|
|
|
192
192
|
&:first-child {
|
|
193
193
|
padding-left: 10px !important;
|
|
194
194
|
padding-right: 0px !important;
|
|
195
|
-
width:
|
|
195
|
+
width: 108px !important;
|
|
196
|
+
display: inline-block;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
height: 36px !important;
|
|
201
|
+
line-height: 36px !important;
|
|
196
202
|
}
|
|
197
203
|
|
|
198
204
|
img {
|
|
@@ -249,6 +249,11 @@ class SortableTable extends React.Component {
|
|
|
249
249
|
dataIndex: 'title',
|
|
250
250
|
className: 'drag-visible',
|
|
251
251
|
width: 100,
|
|
252
|
+
render: (text, record) => {
|
|
253
|
+
return (
|
|
254
|
+
<span style={{width: '100%', height: '36px', lineHeight: '36px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'}} title={text}>{text}</span>
|
|
255
|
+
)
|
|
256
|
+
},
|
|
252
257
|
},
|
|
253
258
|
{
|
|
254
259
|
title: '列首',
|
|
@@ -69,20 +69,20 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
69
69
|
patchUserColumnConfig = (config: any) => {
|
|
70
70
|
const { tableCode, appRequestConfig }: any = this.props;
|
|
71
71
|
if (!tableCode) return;
|
|
72
|
-
let configvalue = config.map((item:any) => ({
|
|
72
|
+
let configvalue = config ? config.map((item:any) => ({
|
|
73
73
|
key: item.key,
|
|
74
74
|
dataIndex: item.dataIndex,
|
|
75
75
|
width: item.width,
|
|
76
76
|
hidden: item.hidden,
|
|
77
77
|
fixed: item.fixed
|
|
78
|
-
}))
|
|
78
|
+
})) : '';
|
|
79
79
|
|
|
80
80
|
request({
|
|
81
81
|
url: handleRequestUrl('/user','/appConfig/saveUserOrder',appRequestConfig),
|
|
82
82
|
method:'POST',
|
|
83
83
|
data: {
|
|
84
84
|
"code": tableCode,
|
|
85
|
-
"detail": JSON.stringify(configvalue)
|
|
85
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
86
86
|
},
|
|
87
87
|
}).then((res:any) => {
|
|
88
88
|
if (judgeIsRequestSuccess(res?.data)) {
|
|
@@ -94,19 +94,43 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
patchConfigToLocalstorage = (configvalue:any, tableCode:string) => {
|
|
97
|
+
const { setShowColumns, datasource = [] }: any = this.props;
|
|
98
|
+
const { sortDataSource } = this.state;
|
|
97
99
|
let config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]'
|
|
98
100
|
let configArray = JSON.parse(config)
|
|
99
101
|
let currentSetting = configArray.filter((item:any) => item.code === tableCode)
|
|
100
102
|
if (currentSetting.length) {
|
|
101
|
-
currentSetting[0].detail = JSON.stringify(configvalue)
|
|
103
|
+
currentSetting[0].detail = configvalue ? JSON.stringify(configvalue) : ''
|
|
102
104
|
} else {
|
|
103
105
|
configArray.push({
|
|
104
106
|
"code": tableCode,
|
|
105
|
-
"detail": JSON.stringify(configvalue)
|
|
107
|
+
"detail": configvalue ? JSON.stringify(configvalue) : ''
|
|
106
108
|
})
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray))
|
|
112
|
+
this.setState({
|
|
113
|
+
visible: false,
|
|
114
|
+
});
|
|
115
|
+
if (configvalue) {
|
|
116
|
+
setShowColumns([...sortDataSource]);
|
|
117
|
+
} else {
|
|
118
|
+
this.setState({
|
|
119
|
+
dataSource: [
|
|
120
|
+
...datasource.map((item) => ({
|
|
121
|
+
...item,
|
|
122
|
+
hidden: false,
|
|
123
|
+
})),
|
|
124
|
+
],
|
|
125
|
+
sortDataSource: [
|
|
126
|
+
...datasource.map((item) => ({
|
|
127
|
+
...item,
|
|
128
|
+
hidden: false,
|
|
129
|
+
})),
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
setShowColumns([...datasource]);
|
|
133
|
+
}
|
|
110
134
|
}
|
|
111
135
|
|
|
112
136
|
setInitValue = (datasource: any[]) => {
|
|
@@ -163,6 +187,11 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
163
187
|
dataIndex: 'title',
|
|
164
188
|
className: 'drag-visible',
|
|
165
189
|
width: 100,
|
|
190
|
+
render: (text, record) => {
|
|
191
|
+
return (
|
|
192
|
+
<span style={{width: '100%', height: '36px', lineHeight: '36px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'}} title={text}>{text}</span>
|
|
193
|
+
)
|
|
194
|
+
},
|
|
166
195
|
},
|
|
167
196
|
{
|
|
168
197
|
title: '列首',
|
|
@@ -525,6 +554,10 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
525
554
|
this.setInitValue(datasource);
|
|
526
555
|
};
|
|
527
556
|
|
|
557
|
+
handleResetSetting = () => {
|
|
558
|
+
this.patchUserColumnConfig('');
|
|
559
|
+
};
|
|
560
|
+
|
|
528
561
|
onSearch = (e: any) => {
|
|
529
562
|
this.setState({
|
|
530
563
|
searchDataSource: e.target.value,
|
|
@@ -575,15 +608,31 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
575
608
|
onOk={this.handleOk}
|
|
576
609
|
onCancel={this.handleCancel}
|
|
577
610
|
footer={[
|
|
578
|
-
<
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
611
|
+
<div>
|
|
612
|
+
<Button
|
|
613
|
+
key="back"
|
|
614
|
+
onClick={this.handleReset}
|
|
615
|
+
style={{ marginRight: 0 }}
|
|
616
|
+
>
|
|
617
|
+
恢复默认
|
|
618
|
+
</Button>
|
|
619
|
+
<Button key="back" onClick={this.handleResetSetting}>
|
|
620
|
+
重置设置
|
|
621
|
+
</Button>
|
|
622
|
+
<span style={{fontSize: '12px', color: '8A8F8D'}}>(列表字段变更会影响列设置功能,变更后请点击重置然后重新设置)</span>
|
|
623
|
+
</div>,
|
|
624
|
+
<div>
|
|
625
|
+
<Button
|
|
626
|
+
key="submit"
|
|
627
|
+
onClick={this.handleCancel}
|
|
628
|
+
style={{ marginRight: 0 }}
|
|
629
|
+
>
|
|
630
|
+
取消
|
|
631
|
+
</Button>
|
|
632
|
+
<Button key="submit" type="primary" onClick={this.handleOk}>
|
|
633
|
+
确认
|
|
634
|
+
</Button>
|
|
635
|
+
</div>
|
|
587
636
|
]}
|
|
588
637
|
>
|
|
589
638
|
<div className={'sort_table'}>
|
|
@@ -194,7 +194,13 @@
|
|
|
194
194
|
&:first-child {
|
|
195
195
|
padding-left: 10px !important;
|
|
196
196
|
padding-right: 0px !important;
|
|
197
|
-
width:
|
|
197
|
+
width: 108px !important;
|
|
198
|
+
display: inline-block;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
text-overflow: ellipsis;
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
height: 36px !important;
|
|
203
|
+
line-height: 36px !important;
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
img {
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { Table, Tooltip, Typography } from 'antd';
|
|
3
3
|
import { Resizable } from 'react-resizable';
|
|
4
4
|
import ColumnSetting from './columnSetting';
|
|
5
|
-
import { getItemDefaultWidth, handleTextOverflow } from './utils';
|
|
5
|
+
import { getItemDefaultWidth, getShowColumns, handleTextOverflow } from './utils';
|
|
6
6
|
import { noEmptyArray } from './utils';
|
|
7
7
|
import ENUM from '@/utils/enumConfig';
|
|
8
8
|
import { handleAntdColumnsSpecialParams } from '@/utils/utils';
|
|
@@ -21,6 +21,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
21
21
|
this.setInitialShowColumn(columns || [])
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
|
|
24
25
|
componentWillReceiveProps(nextProps: any) {
|
|
25
26
|
// if (JSON.stringify(this.props.columns) !== JSON.stringify(nextProps.columns)) {
|
|
26
27
|
// }
|
|
@@ -30,17 +31,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
30
31
|
setInitialShowColumn = (columns: any[]) => {
|
|
31
32
|
// 获取当前列表定义数据
|
|
32
33
|
let columnConfig = this.getConfigFromlocalstorage();
|
|
33
|
-
let showColumns =
|
|
34
|
-
let inner = columns.filter(innerItem => (
|
|
35
|
-
innerItem.dataIndex && innerItem.dataIndex === item.dataIndex
|
|
36
|
-
) || (innerItem.key && innerItem.key === item.key))[0];
|
|
37
|
-
return {
|
|
38
|
-
...inner,
|
|
39
|
-
...item,
|
|
40
|
-
}
|
|
41
|
-
}).filter((item: any) => !item.hidden)
|
|
42
|
-
:
|
|
43
|
-
(columns || []).filter((item: any) => !item.hidden);
|
|
34
|
+
let showColumns = getShowColumns(columns, columnConfig);
|
|
44
35
|
this.setState({
|
|
45
36
|
showColumns,
|
|
46
37
|
})
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { Table as SulaTable, request } from 'bssula';
|
|
3
3
|
import { Resizable } from 'react-resizable';
|
|
4
4
|
import ColumnSetting from './columnSetting';
|
|
5
|
-
import { getItemDefaultWidth } from './utils';
|
|
5
|
+
import { getItemDefaultWidth, getShowColumns } from './utils';
|
|
6
6
|
import { noEmptyArray } from './utils';
|
|
7
7
|
import {
|
|
8
8
|
Table,
|
|
@@ -36,17 +36,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
36
36
|
setInitialShowColumn = (columns: any[]) => {
|
|
37
37
|
// 获取当前列表定义数据
|
|
38
38
|
let columnConfig = this.getConfigFromlocalstorage();
|
|
39
|
-
let showColumns =
|
|
40
|
-
let inner = columns.filter(innerItem => (
|
|
41
|
-
innerItem.dataIndex && innerItem.dataIndex === item.dataIndex
|
|
42
|
-
) || (innerItem.key && innerItem.key === item.key))[0];
|
|
43
|
-
return {
|
|
44
|
-
...inner,
|
|
45
|
-
...item,
|
|
46
|
-
}
|
|
47
|
-
}).filter((item: any) => !item.hidden)
|
|
48
|
-
:
|
|
49
|
-
(columns || []).filter((item: any) => !item.hidden);
|
|
39
|
+
let showColumns = getShowColumns(columns, columnConfig);
|
|
50
40
|
this.setState({
|
|
51
41
|
showColumns,
|
|
52
42
|
})
|
|
@@ -68,4 +68,21 @@ export const handleTextOverflow = (
|
|
|
68
68
|
</span>
|
|
69
69
|
</Tooltip>
|
|
70
70
|
);
|
|
71
|
-
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const getShowColumns = (originColumns: any[], configs: any[]) => {
|
|
74
|
+
let showColumns: any[] = [];
|
|
75
|
+
if (configs.length) {
|
|
76
|
+
configs.forEach(config => {
|
|
77
|
+
let inner = originColumns.filter(innerItem => (
|
|
78
|
+
innerItem.dataIndex && innerItem.dataIndex === config.dataIndex
|
|
79
|
+
) || (innerItem.key && innerItem.key === config.key))[0];
|
|
80
|
+
inner && showColumns.push({
|
|
81
|
+
...inner,
|
|
82
|
+
...config,
|
|
83
|
+
});
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
if (showColumns.length) return showColumns;
|
|
87
|
+
return (originColumns || []).filter((item: any) => !item.hidden);
|
|
88
|
+
}
|