@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.
Files changed (147) hide show
  1. package/.eslintrc.js +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/dist/business/Entry/index.d.ts +0 -0
  5. package/dist/business/Entry/index.interface.d.ts +0 -0
  6. package/dist/business/Entry/index.interface.js +0 -0
  7. package/dist/business/Entry/index.js +0 -0
  8. package/dist/business/Entry/index.scss +0 -0
  9. package/dist/business/TestBtn/index.d.ts +0 -0
  10. package/dist/business/TestBtn/index.interface.d.ts +0 -0
  11. package/dist/business/TestBtn/index.interface.js +0 -0
  12. package/dist/business/TestBtn/index.js +0 -0
  13. package/dist/commonAxios/Axios.d.ts +0 -0
  14. package/dist/commonAxios/Axios.js +0 -0
  15. package/dist/commonAxios/http.d.ts +0 -0
  16. package/dist/commonAxios/http.js +0 -0
  17. package/dist/commonAxios/index.d.ts +0 -0
  18. package/dist/commonAxios/index.js +0 -0
  19. package/dist/commonAxios/juicer.d.ts +0 -0
  20. package/dist/commonAxios/juicer.js +0 -0
  21. package/dist/commonData/address.d.ts +0 -0
  22. package/dist/commonData/address.js +0 -0
  23. package/dist/commonImg/ic_im_no_archives_new.png +0 -0
  24. package/dist/commonType/globalEnum.d.ts +0 -0
  25. package/dist/commonType/globalEnum.js +0 -0
  26. package/dist/commonType/globalFun.d.ts +0 -0
  27. package/dist/commonType/globalFun.js +0 -0
  28. package/dist/components/BigImage/index.d.ts +0 -0
  29. package/dist/components/BigImage/index.interface.d.ts +0 -0
  30. package/dist/components/BigImage/index.interface.js +0 -0
  31. package/dist/components/BigImage/index.js +0 -0
  32. package/dist/components/CustomButtonModal/index.d.ts +0 -0
  33. package/dist/components/CustomButtonModal/index.interface.d.ts +0 -0
  34. package/dist/components/CustomButtonModal/index.interface.js +0 -0
  35. package/dist/components/CustomButtonModal/index.js +0 -0
  36. package/dist/components/DateTimePicker/index.d.ts +0 -0
  37. package/dist/components/DateTimePicker/index.interface.d.ts +0 -0
  38. package/dist/components/DateTimePicker/index.interface.js +0 -0
  39. package/dist/components/DateTimePicker/index.js +3 -2
  40. package/dist/components/DropDownSelect/index.d.ts +0 -0
  41. package/dist/components/DropDownSelect/index.interface.d.ts +0 -0
  42. package/dist/components/DropDownSelect/index.interface.js +0 -0
  43. package/dist/components/DropDownSelect/index.js +0 -0
  44. package/dist/components/EmptyDom/index.d.ts +0 -0
  45. package/dist/components/EmptyDom/index.interface.d.ts +0 -0
  46. package/dist/components/EmptyDom/index.interface.js +0 -0
  47. package/dist/components/EmptyDom/index.js +0 -0
  48. package/dist/components/Entry/index.d.ts +0 -0
  49. package/dist/components/Entry/index.interface.d.ts +0 -0
  50. package/dist/components/Entry/index.interface.js +0 -0
  51. package/dist/components/Entry/index.js +0 -0
  52. package/dist/components/Entry/index.scss +0 -0
  53. package/dist/components/ExportExcels/ExportExcels.scss +0 -0
  54. package/dist/components/ExportExcels/index.d.ts +0 -0
  55. package/dist/components/ExportExcels/index.interface.d.ts +0 -0
  56. package/dist/components/ExportExcels/index.interface.js +0 -0
  57. package/dist/components/ExportExcels/index.js +0 -0
  58. package/dist/components/FileUpload/fileUtil.d.ts +0 -0
  59. package/dist/components/FileUpload/fileUtil.js +0 -0
  60. package/dist/components/FileUpload/index.d.ts +2 -2
  61. package/dist/components/FileUpload/index.interface.d.ts +1 -1
  62. package/dist/components/FileUpload/index.interface.js +0 -0
  63. package/dist/components/FileUpload/index.js +10 -10
  64. package/dist/components/FileUpload/index.scss +0 -0
  65. package/dist/components/FilterRadio/index.d.ts +0 -0
  66. package/dist/components/FilterRadio/index.interface.d.ts +0 -0
  67. package/dist/components/FilterRadio/index.interface.js +0 -0
  68. package/dist/components/FilterRadio/index.js +0 -0
  69. package/dist/components/FilterRadio/index.scss +0 -0
  70. package/dist/components/MyBtn/index.d.ts +0 -0
  71. package/dist/components/MyBtn/index.interface.d.ts +0 -0
  72. package/dist/components/MyBtn/index.interface.js +0 -0
  73. package/dist/components/MyBtn/index.js +0 -0
  74. package/dist/components/NumberInput/index.d.ts +0 -0
  75. package/dist/components/NumberInput/index.interface.d.ts +0 -0
  76. package/dist/components/NumberInput/index.interface.js +0 -0
  77. package/dist/components/NumberInput/index.js +0 -0
  78. package/dist/components/NumberInput/index.scss +0 -0
  79. package/dist/components/OcrCommon/index.config.d.ts +0 -0
  80. package/dist/components/OcrCommon/index.config.js +0 -0
  81. package/dist/components/OcrCommon/index.d.ts +0 -0
  82. package/dist/components/OcrCommon/index.interface.d.ts +0 -0
  83. package/dist/components/OcrCommon/index.interface.js +0 -0
  84. package/dist/components/OcrCommon/index.js +0 -0
  85. package/dist/components/OcrCommon/index.scss +0 -0
  86. package/dist/components/PageTemplate/index.d.ts +0 -0
  87. package/dist/components/PageTemplate/index.interface.d.ts +4 -3
  88. package/dist/components/PageTemplate/index.interface.js +0 -0
  89. package/dist/components/PageTemplate/index.js +60 -30
  90. package/dist/components/PageTemplate/index.scss +48 -0
  91. package/dist/components/PageTemplate/resizable/index.d.ts +0 -0
  92. package/dist/components/PageTemplate/resizable/index.js +48 -11
  93. package/dist/components/PageTemplate/resizable/index.scss +41 -0
  94. package/dist/components/ReactEcharts/index.d.ts +0 -0
  95. package/dist/components/ReactEcharts/index.interface.d.ts +0 -0
  96. package/dist/components/ReactEcharts/index.interface.js +0 -0
  97. package/dist/components/ReactEcharts/index.js +0 -0
  98. package/dist/components/SelectMax/index.d.ts +0 -0
  99. package/dist/components/SelectMax/index.interface.d.ts +0 -0
  100. package/dist/components/SelectMax/index.interface.js +0 -0
  101. package/dist/components/SelectMax/index.js +0 -0
  102. package/dist/components/SelectPosition/index.d.ts +0 -0
  103. package/dist/components/SelectPosition/index.interface.d.ts +0 -0
  104. package/dist/components/SelectPosition/index.interface.js +0 -0
  105. package/dist/components/SelectPosition/index.js +0 -0
  106. package/dist/components/SelectPosition/index.scss +0 -0
  107. package/dist/components/SuperCascader/index.d.ts +0 -0
  108. package/dist/components/SuperCascader/index.interface.d.ts +0 -0
  109. package/dist/components/SuperCascader/index.interface.js +0 -0
  110. package/dist/components/SuperCascader/index.js +0 -0
  111. package/dist/components/SuperInput/index.d.ts +0 -0
  112. package/dist/components/SuperInput/index.interface.d.ts +0 -0
  113. package/dist/components/SuperInput/index.interface.js +0 -0
  114. package/dist/components/SuperInput/index.js +0 -0
  115. package/dist/components/TabsMode/index.d.ts +0 -0
  116. package/dist/components/TabsMode/index.interface.d.ts +0 -0
  117. package/dist/components/TabsMode/index.interface.js +0 -0
  118. package/dist/components/TabsMode/index.js +0 -0
  119. package/dist/components/TypographyText/index.d.ts +0 -0
  120. package/dist/components/TypographyText/index.interface.d.ts +0 -0
  121. package/dist/components/TypographyText/index.interface.js +0 -0
  122. package/dist/components/TypographyText/index.js +0 -0
  123. package/dist/components/TypographyText/index.scss +0 -0
  124. package/dist/components/VideoProgressModal/index.d.ts +0 -0
  125. package/dist/components/VideoProgressModal/index.interface.d.ts +0 -0
  126. package/dist/components/VideoProgressModal/index.interface.js +0 -0
  127. package/dist/components/VideoProgressModal/index.js +0 -0
  128. package/dist/components/VideoProgressModal/index.scss +0 -0
  129. package/dist/components/YLModal/index.d.ts +0 -0
  130. package/dist/components/YLModal/index.interface.d.ts +0 -0
  131. package/dist/components/YLModal/index.interface.js +0 -0
  132. package/dist/components/YLModal/index.js +0 -0
  133. package/dist/index.d.ts +0 -0
  134. package/dist/index.js +0 -0
  135. package/dist/react-app-env.d.ts +0 -0
  136. package/dist/utils/common.d.ts +2 -2
  137. package/dist/utils/common.js +17 -16
  138. package/dist/utils/index.d.ts +0 -0
  139. package/dist/utils/index.js +0 -0
  140. package/dist/utils/notificationHelper.d.ts +0 -0
  141. package/dist/utils/notificationHelper.js +0 -0
  142. package/dist/utils/responseMessage.d.ts +0 -0
  143. package/dist/utils/responseMessage.js +0 -0
  144. package/dist/utils/userSessionActions.d.ts +0 -0
  145. package/dist/utils/userSessionActions.js +0 -0
  146. package/package.json +1 -1
  147. 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
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 React from 'react';
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
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import './index.scss';
1
+ import React from 'react';
3
2
  import { IProps } from './index.interface';
3
+ import './index.scss';
4
4
  declare const Index: React.FC<IProps>;
5
5
  export default Index;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FormItemProps, UploadProps } from "antd";
2
+ import { FormItemProps, UploadProps } from 'antd';
3
3
  export interface IProps {
4
4
  /**
5
5
  * @description 阿里云上传实例和配置
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 "@ant-design/icons";
25
+ import { CloseOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons';
26
26
  import { useUpdateEffect } from 'ahooks';
27
- import { Form, Image, message, Tooltip, Upload } from "antd";
28
- import heic2any from "heic2any";
29
- import React, { useEffect, useState } from "react";
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: "image/jpeg",
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), " "), originNode) : /*#__PURE__*/React.createElement(Tooltip, {
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, " ", /*#__PURE__*/React.createElement(PlusOutlined, null), " ", /*#__PURE__*/React.createElement("div", {
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 { MethodEnum } from "../../commonType/globalEnum";
2
- import { ReactNode } from "react";
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(10); //每页条数
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 || 10;
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
- setColumns([initColumn].concat(_toConsumableArray(props.columns)));
148
- return;
163
+ _columns = [initColumn].concat(_toConsumableArray(_columns));
149
164
  }
150
- setColumns(props.columns);
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 7:
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: ['10', '50', '200', '1000'],
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: isScroll ? {
422
- x: 1200
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
- tableLayout: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.tableLayout) || 'auto',
428
- components: {
429
- header: {
430
- cell: ResizableTitle
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