@yilianjituan/yilian_dgerm 1.0.4 → 1.0.5
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/.eslintrc.js +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/business/Entry/index.d.ts +0 -0
- package/dist/business/Entry/index.interface.d.ts +0 -0
- package/dist/business/Entry/index.interface.js +0 -0
- package/dist/business/Entry/index.js +0 -0
- package/dist/business/Entry/index.scss +0 -0
- package/dist/business/TestBtn/index.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.js +0 -0
- package/dist/business/TestBtn/index.js +0 -0
- package/dist/commonAxios/Axios.d.ts +0 -0
- package/dist/commonAxios/Axios.js +0 -0
- package/dist/commonAxios/http.d.ts +0 -0
- package/dist/commonAxios/http.js +0 -0
- package/dist/commonAxios/index.d.ts +0 -0
- package/dist/commonAxios/index.js +0 -0
- package/dist/commonAxios/juicer.d.ts +0 -0
- package/dist/commonAxios/juicer.js +0 -0
- package/dist/commonData/address.d.ts +0 -0
- package/dist/commonData/address.js +0 -0
- package/dist/commonImg/ic_im_no_archives_new.png +0 -0
- package/dist/commonType/globalEnum.d.ts +0 -0
- package/dist/commonType/globalEnum.js +0 -0
- package/dist/commonType/globalFun.d.ts +0 -0
- package/dist/commonType/globalFun.js +0 -0
- package/dist/components/BigImage/index.d.ts +0 -0
- package/dist/components/BigImage/index.interface.d.ts +0 -0
- package/dist/components/BigImage/index.interface.js +0 -0
- package/dist/components/BigImage/index.js +0 -0
- package/dist/components/CustomButtonModal/index.d.ts +0 -0
- package/dist/components/CustomButtonModal/index.interface.d.ts +0 -0
- package/dist/components/CustomButtonModal/index.interface.js +0 -0
- package/dist/components/CustomButtonModal/index.js +0 -0
- package/dist/components/DateTimePicker/index.d.ts +0 -0
- package/dist/components/DateTimePicker/index.interface.d.ts +0 -0
- package/dist/components/DateTimePicker/index.interface.js +0 -0
- package/dist/components/DateTimePicker/index.js +3 -2
- package/dist/components/DropDownSelect/index.d.ts +0 -0
- package/dist/components/DropDownSelect/index.interface.d.ts +0 -0
- package/dist/components/DropDownSelect/index.interface.js +0 -0
- package/dist/components/DropDownSelect/index.js +0 -0
- package/dist/components/EmptyDom/index.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.js +0 -0
- package/dist/components/EmptyDom/index.js +0 -0
- package/dist/components/Entry/index.d.ts +0 -0
- package/dist/components/Entry/index.interface.d.ts +0 -0
- package/dist/components/Entry/index.interface.js +0 -0
- package/dist/components/Entry/index.js +0 -0
- package/dist/components/Entry/index.scss +0 -0
- package/dist/components/ExportExcels/ExportExcels.scss +0 -0
- package/dist/components/ExportExcels/index.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.js +0 -0
- package/dist/components/ExportExcels/index.js +0 -0
- package/dist/components/FileUpload/fileUtil.d.ts +0 -0
- package/dist/components/FileUpload/fileUtil.js +0 -0
- package/dist/components/FileUpload/index.d.ts +2 -2
- package/dist/components/FileUpload/index.interface.d.ts +1 -1
- package/dist/components/FileUpload/index.interface.js +0 -0
- package/dist/components/FileUpload/index.js +10 -10
- package/dist/components/FileUpload/index.scss +0 -0
- package/dist/components/FilterRadio/index.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.js +0 -0
- package/dist/components/FilterRadio/index.js +0 -0
- package/dist/components/FilterRadio/index.scss +0 -0
- package/dist/components/MyBtn/index.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.js +0 -0
- package/dist/components/MyBtn/index.js +0 -0
- package/dist/components/NumberInput/index.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.js +0 -0
- package/dist/components/NumberInput/index.js +0 -0
- package/dist/components/NumberInput/index.scss +0 -0
- package/dist/components/OcrCommon/index.config.d.ts +0 -0
- package/dist/components/OcrCommon/index.config.js +0 -0
- package/dist/components/OcrCommon/index.d.ts +0 -0
- package/dist/components/OcrCommon/index.interface.d.ts +0 -0
- package/dist/components/OcrCommon/index.interface.js +0 -0
- package/dist/components/OcrCommon/index.js +0 -0
- package/dist/components/OcrCommon/index.scss +0 -0
- package/dist/components/PageTemplate/index.d.ts +0 -0
- package/dist/components/PageTemplate/index.interface.d.ts +4 -3
- package/dist/components/PageTemplate/index.interface.js +0 -0
- package/dist/components/PageTemplate/index.js +60 -30
- package/dist/components/PageTemplate/index.scss +48 -0
- package/dist/components/PageTemplate/resizable/index.d.ts +0 -0
- package/dist/components/PageTemplate/resizable/index.js +48 -11
- package/dist/components/PageTemplate/resizable/index.scss +41 -0
- package/dist/components/ReactEcharts/index.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.js +0 -0
- package/dist/components/ReactEcharts/index.js +0 -0
- package/dist/components/SelectMax/index.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.js +0 -0
- package/dist/components/SelectMax/index.js +0 -0
- package/dist/components/SelectPosition/index.d.ts +0 -0
- package/dist/components/SelectPosition/index.interface.d.ts +0 -0
- package/dist/components/SelectPosition/index.interface.js +0 -0
- package/dist/components/SelectPosition/index.js +0 -0
- package/dist/components/SelectPosition/index.scss +0 -0
- package/dist/components/SuperCascader/index.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.js +0 -0
- package/dist/components/SuperCascader/index.js +0 -0
- package/dist/components/SuperInput/index.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.js +0 -0
- package/dist/components/SuperInput/index.js +0 -0
- package/dist/components/TabsMode/index.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.js +0 -0
- package/dist/components/TabsMode/index.js +0 -0
- package/dist/components/TypographyText/index.d.ts +0 -0
- package/dist/components/TypographyText/index.interface.d.ts +0 -0
- package/dist/components/TypographyText/index.interface.js +0 -0
- package/dist/components/TypographyText/index.js +0 -0
- package/dist/components/TypographyText/index.scss +0 -0
- package/dist/components/VideoProgressModal/index.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.js +0 -0
- package/dist/components/VideoProgressModal/index.js +0 -0
- package/dist/components/VideoProgressModal/index.scss +0 -0
- package/dist/components/YLModal/index.d.ts +0 -0
- package/dist/components/YLModal/index.interface.d.ts +0 -0
- package/dist/components/YLModal/index.interface.js +0 -0
- package/dist/components/YLModal/index.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/react-app-env.d.ts +0 -0
- package/dist/utils/common.d.ts +2 -2
- package/dist/utils/common.js +17 -16
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.js +0 -0
- package/dist/utils/notificationHelper.d.ts +0 -0
- package/dist/utils/notificationHelper.js +0 -0
- package/dist/utils/responseMessage.d.ts +0 -0
- package/dist/utils/responseMessage.js +0 -0
- package/dist/utils/userSessionActions.d.ts +0 -0
- package/dist/utils/userSessionActions.js +0 -0
- package/package.json +1 -1
- package/CHANGELOG.md +0 -77
package/.eslintrc.js
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/commonAxios/http.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,10 +2,11 @@ var _excluded = ["type", "tlTimeLimit", "format"];
|
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
import
|
|
6
|
-
import { DatePicker, TimePicker } from "antd";
|
|
5
|
+
import { DatePicker, TimePicker } from 'antd';
|
|
7
6
|
import dayjs from 'dayjs';
|
|
7
|
+
import React from 'react';
|
|
8
8
|
var RangePicker = DatePicker.RangePicker;
|
|
9
|
+
|
|
9
10
|
// 基于antd,具体参照antd
|
|
10
11
|
var Index = function Index(props) {
|
|
11
12
|
var _props$type = props.type,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -22,13 +22,13 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24
24
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
|
-
import { CloseOutlined, DeleteOutlined, PlusOutlined } from
|
|
25
|
+
import { CloseOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons';
|
|
26
26
|
import { useUpdateEffect } from 'ahooks';
|
|
27
|
-
import { Form, Image, message, Tooltip, Upload } from
|
|
28
|
-
import heic2any from
|
|
29
|
-
import React, { useEffect, useState } from
|
|
30
|
-
import "./index.scss";
|
|
27
|
+
import { Form, Image, message, Tooltip, Upload } from 'antd';
|
|
28
|
+
import heic2any from 'heic2any';
|
|
29
|
+
import React, { useEffect, useState } from 'react';
|
|
31
30
|
import { acceptListTypes, acceptTypes, dataChange, documentExtensions, fileChange, fileExtensions, imageListChange, videoFormats } from "./fileUtil";
|
|
31
|
+
import "./index.scss";
|
|
32
32
|
var AliyunOSSUpload = function AliyunOSSUpload(props) {
|
|
33
33
|
var value = props.value,
|
|
34
34
|
formOnChange = props.onChange,
|
|
@@ -208,7 +208,7 @@ var AliyunOSSUpload = function AliyunOSSUpload(props) {
|
|
|
208
208
|
_context.next = 32;
|
|
209
209
|
break;
|
|
210
210
|
}
|
|
211
|
-
message.error(
|
|
211
|
+
message.error('上传失败');
|
|
212
212
|
event === null || event === void 0 || event.onError({
|
|
213
213
|
errorMessage: '上传失败',
|
|
214
214
|
uploadStatus: 'error'
|
|
@@ -251,7 +251,7 @@ var AliyunOSSUpload = function AliyunOSSUpload(props) {
|
|
|
251
251
|
}).then(function (blob) {
|
|
252
252
|
return heic2any({
|
|
253
253
|
blob: blob,
|
|
254
|
-
toType:
|
|
254
|
+
toType: 'image/jpeg',
|
|
255
255
|
quality: 0.5 // cuts the quality and size by half
|
|
256
256
|
});
|
|
257
257
|
}).then(function (conversionResult) {
|
|
@@ -295,7 +295,7 @@ var AliyunOSSUpload = function AliyunOSSUpload(props) {
|
|
|
295
295
|
onClick: function onClick() {
|
|
296
296
|
return actions.remove(file);
|
|
297
297
|
}
|
|
298
|
-
}, /*#__PURE__*/React.createElement(DeleteOutlined, null),
|
|
298
|
+
}, /*#__PURE__*/React.createElement(DeleteOutlined, null), ' '), originNode) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
299
299
|
title: (file === null || file === void 0 ? void 0 : file.name) || ''
|
|
300
300
|
}, " ", originNode, " "));
|
|
301
301
|
},
|
|
@@ -303,11 +303,11 @@ var AliyunOSSUpload = function AliyunOSSUpload(props) {
|
|
|
303
303
|
onChange: onChange,
|
|
304
304
|
fileList: fileList
|
|
305
305
|
}, otherUploadProps);
|
|
306
|
-
return /*#__PURE__*/React.createElement(Upload, uploadProp, fileList.length < maxCount && /*#__PURE__*/React.createElement("div", null, uploadButton || /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
306
|
+
return /*#__PURE__*/React.createElement(Upload, uploadProp, fileList.length < maxCount && /*#__PURE__*/React.createElement("div", null, uploadButton || /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(PlusOutlined, null), " ", /*#__PURE__*/React.createElement("div", {
|
|
307
307
|
style: {
|
|
308
308
|
marginTop: 8
|
|
309
309
|
}
|
|
310
|
-
}, "\u4E0A\u4F20"),
|
|
310
|
+
}, "\u4E0A\u4F20"), ' ')));
|
|
311
311
|
};
|
|
312
312
|
var Index = function Index(props) {
|
|
313
313
|
var formProps = props.formProps,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MethodEnum } from '../../commonType/globalEnum';
|
|
3
3
|
export interface IPageTemPropsData {
|
|
4
4
|
http: any;
|
|
5
5
|
ref?: any;
|
|
@@ -21,6 +21,7 @@ export interface IPageTemPropsData {
|
|
|
21
21
|
afterRequest?: typeEmptyFunc;
|
|
22
22
|
afterReset?: typeEmptyFunc;
|
|
23
23
|
beforeSearch?: typeEmptyFunc;
|
|
24
|
+
afterExport?: typeEmptyFunc;
|
|
24
25
|
beforeExport?: typeEmptyFunc;
|
|
25
26
|
afterErrorRequest?: typeEmptyFunc;
|
|
26
27
|
columns: IColumnsProps[];
|
|
@@ -38,7 +39,7 @@ export interface IColumnsProps {
|
|
|
38
39
|
title: string;
|
|
39
40
|
dataIndex?: string;
|
|
40
41
|
render?: typeEmptyFunc | ((text: string | number, record: any, index: string | number) => any);
|
|
41
|
-
[name: string]: typeEmptyFunc | string | boolean | undefined | number;
|
|
42
|
+
[name: string]: typeEmptyFunc | string | boolean | undefined | number | any;
|
|
42
43
|
}
|
|
43
44
|
export interface IFilterProps {
|
|
44
45
|
component: string | Element | ReactNode;
|
|
File without changes
|
|
@@ -34,10 +34,10 @@ import ExportExcels from "../ExportExcels";
|
|
|
34
34
|
import FilterRadio from "../FilterRadio";
|
|
35
35
|
import SelectMax from "../SelectMax";
|
|
36
36
|
import "./index.scss";
|
|
37
|
-
import { mergedColumns, ResizableTitle } from "./resizable";
|
|
38
37
|
var FormItem = Form.Item;
|
|
39
38
|
var RangePicker = DatePicker.RangePicker;
|
|
40
39
|
var PageTemplate = function PageTemplate(props, ref) {
|
|
40
|
+
var _document$querySelect3;
|
|
41
41
|
var _Form$useForm = Form.useForm(),
|
|
42
42
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
43
43
|
form = _Form$useForm2[0];
|
|
@@ -61,6 +61,7 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
61
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
62
|
dataSource = _useState2[0],
|
|
63
63
|
setDataSource = _useState2[1];
|
|
64
|
+
var dataSourceRef = useRef([]);
|
|
64
65
|
var _useState3 = useState(false),
|
|
65
66
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
67
|
tableLoading = _useState4[0],
|
|
@@ -69,7 +70,7 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
69
70
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
71
|
total = _useState6[0],
|
|
71
72
|
setTotal = _useState6[1]; // 总数
|
|
72
|
-
var pageSizeRef = useRef(
|
|
73
|
+
var pageSizeRef = useRef(20); //每页条数
|
|
73
74
|
var _useState7 = useState(1),
|
|
74
75
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
75
76
|
current = _useState8[0],
|
|
@@ -92,7 +93,17 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
92
93
|
additionalExport = _useState16[0],
|
|
93
94
|
setAdditionalExport = _useState16[1]; // 额外的按钮
|
|
94
95
|
var tableRef = useRef(null); // 引用 Table 外层容器
|
|
95
|
-
|
|
96
|
+
var _useState17 = useState(null),
|
|
97
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
98
|
+
tableHeight = _useState18[0],
|
|
99
|
+
setTableHeight = _useState18[1];
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
var _document$querySelect;
|
|
102
|
+
if ((_document$querySelect = document.querySelector('.ant-table-small')) !== null && _document$querySelect !== void 0 && _document$querySelect.clientHeight) {
|
|
103
|
+
var _document$querySelect2;
|
|
104
|
+
setTableHeight((((_document$querySelect2 = document.querySelector('.ant-table-small')) === null || _document$querySelect2 === void 0 ? void 0 : _document$querySelect2.clientHeight) || 0) - 40);
|
|
105
|
+
}
|
|
106
|
+
}, [(_document$querySelect3 = document.querySelector('.ant-table-small')) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.clientHeight]);
|
|
96
107
|
useImperativeHandle(ref, function () {
|
|
97
108
|
return {
|
|
98
109
|
onSearch: function onSearch(param) {
|
|
@@ -125,29 +136,41 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
125
136
|
var _props$searchOnLoad = props.searchOnLoad,
|
|
126
137
|
searchOnLoad = _props$searchOnLoad === void 0 ? true : _props$searchOnLoad,
|
|
127
138
|
pageSize = props.pageSize;
|
|
128
|
-
pageSizeRef.current = pageSize ||
|
|
139
|
+
pageSizeRef.current = pageSize || 20;
|
|
129
140
|
if (searchOnLoad) {
|
|
130
141
|
_onSearch(1);
|
|
131
142
|
}
|
|
132
143
|
}, [props.url && props.url.url]);
|
|
133
144
|
useEffect(function () {
|
|
145
|
+
if (!props.columns) return;
|
|
146
|
+
var _columns = _toConsumableArray(props.columns);
|
|
134
147
|
if (addNo) {
|
|
135
148
|
// 默认添加序号
|
|
136
149
|
var initColumn = {
|
|
137
150
|
title: '序号',
|
|
138
151
|
dataIndex: '',
|
|
139
152
|
key: 'rowIndex',
|
|
140
|
-
width: 70,
|
|
141
153
|
align: 'center',
|
|
142
154
|
fixed: 'left',
|
|
155
|
+
minWidth: 70,
|
|
156
|
+
ellipsis: {
|
|
157
|
+
showTitle: false
|
|
158
|
+
},
|
|
143
159
|
render: function render(_, __, index) {
|
|
144
160
|
return (current - 1) * pageSizeRef.current + index + 1;
|
|
145
161
|
}
|
|
146
162
|
};
|
|
147
|
-
|
|
148
|
-
return;
|
|
163
|
+
_columns = [initColumn].concat(_toConsumableArray(_columns));
|
|
149
164
|
}
|
|
150
|
-
|
|
165
|
+
_columns = _columns.map(function (item) {
|
|
166
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
167
|
+
minWidth: item.minWidth || item.title.length * 20 + 20,
|
|
168
|
+
ellipsis: item.ellipsis || true,
|
|
169
|
+
align: item.align || 'center',
|
|
170
|
+
fixed: item.fixed || (['action', 'operation', 'handle', 'handle_box'].includes(item.dataIndex) ? 'right' : ['rowIndex'].includes(item.key) ? 'left' : undefined)
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
setColumns(_columns);
|
|
151
174
|
}, [props.columns, current, pageSizeRef.current]);
|
|
152
175
|
var _onSearch = function _onSearch() {
|
|
153
176
|
var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
@@ -205,9 +228,10 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
205
228
|
result = _context.sent;
|
|
206
229
|
_ref3 = result || {}, totalElements = _ref3.totalElements, content = _ref3.content;
|
|
207
230
|
setDataSource(content || []);
|
|
231
|
+
dataSourceRef.current = content || [];
|
|
208
232
|
setTotal(totalElements || '');
|
|
209
233
|
setCurrent(current);
|
|
210
|
-
case
|
|
234
|
+
case 8:
|
|
211
235
|
case "end":
|
|
212
236
|
return _context.stop();
|
|
213
237
|
}
|
|
@@ -318,15 +342,22 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
318
342
|
* 导出
|
|
319
343
|
*/
|
|
320
344
|
var exportList = function exportList() {
|
|
321
|
-
if (dataSource.length === 0) {
|
|
322
|
-
message.error('暂无数据,无法导出!');
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
setIsSpinLoading(true);
|
|
326
345
|
_onSearch();
|
|
327
|
-
|
|
328
|
-
// 需要等待搜索结束
|
|
329
346
|
setTimeout(function () {
|
|
347
|
+
var _props$afterExport = props.afterExport,
|
|
348
|
+
afterExport = _props$afterExport === void 0 ? function (val) {
|
|
349
|
+
return val;
|
|
350
|
+
} : _props$afterExport;
|
|
351
|
+
if (dataSourceRef.current.length === 0) {
|
|
352
|
+
message.error('暂无数据,无法导出!');
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
var params = form.getFieldsValue();
|
|
356
|
+
paramsRef.current = afterExport(_objectSpread(_objectSpread({}, paramsRef.current), params));
|
|
357
|
+
if (!paramsRef.current) return;
|
|
358
|
+
setIsSpinLoading(true);
|
|
359
|
+
|
|
360
|
+
// 需要等待搜索结束
|
|
330
361
|
exportApi(paramsRef.current).then(function (item) {
|
|
331
362
|
if (item.status === 200) {
|
|
332
363
|
exportCompile(item);
|
|
@@ -408,7 +439,7 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
408
439
|
onChange: _onSearch,
|
|
409
440
|
current: current,
|
|
410
441
|
total: total,
|
|
411
|
-
pageSizeOptions: ['
|
|
442
|
+
pageSizeOptions: ['20', '50', '200', '1000'],
|
|
412
443
|
showSizeChanger: true,
|
|
413
444
|
showQuickJumper: true,
|
|
414
445
|
onShowSizeChange: onShowSizeChange
|
|
@@ -418,21 +449,20 @@ var PageTemplate = function PageTemplate(props, ref) {
|
|
|
418
449
|
style: {
|
|
419
450
|
marginTop: 10
|
|
420
451
|
},
|
|
421
|
-
scroll:
|
|
422
|
-
x:
|
|
423
|
-
|
|
452
|
+
scroll: {
|
|
453
|
+
x: 1500,
|
|
454
|
+
y: tableHeight || undefined
|
|
455
|
+
},
|
|
424
456
|
bordered: true,
|
|
425
|
-
dataSource: dataSource
|
|
457
|
+
dataSource: dataSource,
|
|
458
|
+
size: "small"
|
|
426
459
|
}, tableProps, {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
columns: mergedColumns(columns, tableRef, function (_columns) {
|
|
434
|
-
return setColumns(_columns);
|
|
435
|
-
})
|
|
460
|
+
columns: columns,
|
|
461
|
+
tableLayout: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.tableLayout) || 'auto'
|
|
462
|
+
// components={{ header: { cell: ResizableTitle } }}
|
|
463
|
+
// columns={mergedColumns(columns, tableRef, (_columns) =>
|
|
464
|
+
// setColumns(_columns),
|
|
465
|
+
// )}
|
|
436
466
|
}))), isSpinLoading && /*#__PURE__*/React.createElement(ExportExcels, exportProps));
|
|
437
467
|
};
|
|
438
468
|
export default /*#__PURE__*/forwardRef(PageTemplate);
|
|
@@ -105,4 +105,52 @@
|
|
|
105
105
|
.radioInfos {
|
|
106
106
|
margin-left: 10px;
|
|
107
107
|
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.page-template {
|
|
111
|
+
flex: 1;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
|
|
116
|
+
.page-template__content {
|
|
117
|
+
flex: 1;
|
|
118
|
+
display: flex;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
|
|
122
|
+
.ant-table-wrapper {
|
|
123
|
+
flex: 1;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
|
|
126
|
+
.ant-spin-nested-loading {
|
|
127
|
+
height: 100%;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
|
|
130
|
+
.ant-spin-container {
|
|
131
|
+
height: 100%;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
|
|
136
|
+
.ant-table-small {
|
|
137
|
+
flex: 1;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
|
|
140
|
+
.ant-table-body {
|
|
141
|
+
max-height: none !important;
|
|
142
|
+
flex: 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ant-table-container {
|
|
146
|
+
height: 100%;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
108
156
|
}
|
|
File without changes
|