ztxkui 4.2.18-9 → 4.2.18-91

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 (259) hide show
  1. package/dist/App.js +315 -291
  2. package/dist/Demo.js +58 -42
  3. package/dist/DemoCom/BasicDemo.js +57 -56
  4. package/dist/DemoCom/CodeQueryDemo.js +3 -2
  5. package/dist/DemoCom/CollapseDemo.js +28 -27
  6. package/dist/DemoCom/DragSort.js +11 -10
  7. package/dist/DemoCom/FormDemo.js +36 -30
  8. package/dist/DemoCom/PrintContainerDemo.js +151 -150
  9. package/dist/DemoCom/PrintDemo.js +15 -14
  10. package/dist/DemoCom/SinaturesDemo.js +9 -8
  11. package/dist/DemoCom/SyhDemo.js +21 -20
  12. package/dist/DemoCom/TableAnalyse.js +34 -33
  13. package/dist/DemoCom/TableDemo.js +74 -70
  14. package/dist/DemoCom/TableDemo1.js +34 -33
  15. package/dist/DemoCom/TableDetail.d.ts +9 -0
  16. package/dist/DemoCom/TableDetail.js +259 -0
  17. package/dist/DemoCom/TestCom.js +22 -19
  18. package/dist/DemoCom/data.d.ts +110 -0
  19. package/dist/DemoCom/data.js +2308 -0
  20. package/dist/TableDemo/BasicTable.js +103 -29
  21. package/dist/TableDemo/EditableTable.js +177 -91
  22. package/dist/TableDemo/ModalTable.js +25 -24
  23. package/dist/TableDemo/ProEditableTable.d.ts +21 -0
  24. package/dist/TableDemo/ProEditableTable.js +483 -0
  25. package/dist/TableDemo/data.d.ts +15 -0
  26. package/dist/TableDemo/data.js +44 -11
  27. package/dist/TableDemo/index.js +5 -4
  28. package/dist/TreeDemo.js +8 -7
  29. package/dist/TreeSelectDemo.js +10 -7
  30. package/dist/UI/Form/index.d.ts +3 -0
  31. package/dist/UI/Form/index.js +346 -0
  32. package/dist/UI/index.d.ts +2 -0
  33. package/dist/UI/index.js +10 -0
  34. package/dist/UploadDemo.js +12 -17
  35. package/dist/components/Button/button.js +3 -2
  36. package/dist/components/Collapse/collapse.js +2 -1
  37. package/dist/components/EnhanceSelect/index.d.ts +5 -1
  38. package/dist/components/EnhanceSelect/index.js +179 -32
  39. package/dist/components/EnhanceTree/index.js +4 -3
  40. package/dist/components/EnhanceTreeSelect/index.js +11 -5
  41. package/dist/components/Export/export.js +5 -4
  42. package/dist/components/Input/input.d.ts +3 -0
  43. package/dist/components/Input/input.js +53 -3
  44. package/dist/components/InputNumber/input-number.js +3 -2
  45. package/dist/components/NumberCase/index.js +9 -7
  46. package/dist/components/Print/print.js +4 -3
  47. package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
  48. package/dist/components/PrintContainer/PrintModal.js +4 -3
  49. package/dist/components/PrintContainer/handle.d.ts +2 -4
  50. package/dist/components/PrintContainer/handle.js +3 -2
  51. package/dist/components/PrintContainer/lodop.js +2 -1
  52. package/dist/components/PrintContainer/print-container.js +74 -73
  53. package/dist/components/PrintContainer/service.js +5 -4
  54. package/dist/components/ProForm/hooks.d.ts +23 -0
  55. package/dist/components/ProForm/hooks.js +209 -0
  56. package/dist/components/ProForm/index.d.ts +6 -0
  57. package/dist/components/ProForm/index.js +101 -0
  58. package/dist/components/ProForm/interface.d.ts +169 -0
  59. package/dist/components/ProForm/interface.js +1 -0
  60. package/dist/components/ProForm/item.d.ts +13 -0
  61. package/dist/components/ProForm/item.js +221 -0
  62. package/dist/components/ProForm/items.d.ts +5 -0
  63. package/dist/components/ProForm/items.js +36 -0
  64. package/dist/components/ProForm/search-drawer.d.ts +12 -0
  65. package/dist/components/ProForm/search-drawer.js +202 -0
  66. package/dist/components/ProForm/setting.d.ts +5 -0
  67. package/dist/components/ProForm/setting.js +13 -0
  68. package/dist/components/ProFormList/index.d.ts +12 -0
  69. package/dist/components/ProFormList/index.js +34 -0
  70. package/dist/components/ProTable/hooks.d.ts +28 -0
  71. package/dist/components/ProTable/hooks.js +279 -0
  72. package/dist/components/ProTable/index.d.ts +8 -0
  73. package/dist/components/ProTable/index.js +77 -0
  74. package/dist/components/ProTable/interface.d.ts +51 -0
  75. package/dist/components/ProTable/interface.js +1 -0
  76. package/dist/components/RangePicker/range-picker.js +5 -2
  77. package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
  78. package/dist/components/SortableCancel/sortable-cancel.js +2 -2
  79. package/dist/components/Table/components/FillDown.d.ts +8 -0
  80. package/dist/components/Table/components/FillDown.js +11 -0
  81. package/dist/components/Table/components/FilterDropdown.d.ts +15 -0
  82. package/dist/components/Table/components/FilterDropdown.js +93 -0
  83. package/dist/components/Table/constants.d.ts +2 -0
  84. package/dist/components/Table/constants.js +2 -0
  85. package/dist/components/Table/hooks/useColumns.d.ts +25 -8
  86. package/dist/components/Table/hooks/useColumns.js +704 -180
  87. package/dist/components/Table/hooks/useDropRef.js +4 -2
  88. package/dist/components/Table/hooks/useInnerPagination.js +1 -0
  89. package/dist/components/Table/hooks/useSelectSubtotal.d.ts +4 -0
  90. package/dist/components/Table/hooks/useSelectSubtotal.js +182 -0
  91. package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
  92. package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
  93. package/dist/components/Table/index.d.ts +11 -0
  94. package/dist/components/Table/table-adddel-column.d.ts +8 -5
  95. package/dist/components/Table/table-adddel-column.js +16 -5
  96. package/dist/components/Table/table-dynamic.js +165 -18
  97. package/dist/components/Table/table-enhance-cell.d.ts +7 -3
  98. package/dist/components/Table/table-enhance-cell.js +214 -109
  99. package/dist/components/Table/table-enhance-row.d.ts +4 -4
  100. package/dist/components/Table/table-enhance-row.js +10 -11
  101. package/dist/components/Table/table-headTooltip.d.ts +6 -0
  102. package/dist/components/Table/table-headTooltip.js +13 -0
  103. package/dist/components/Table/table-resizable-title.d.ts +4 -5
  104. package/dist/components/Table/table-resizable-title.js +33 -6
  105. package/dist/components/Table/table-sort.d.ts +11 -0
  106. package/dist/components/Table/table-sort.js +66 -0
  107. package/dist/components/Table/table.d.ts +30 -4
  108. package/dist/components/Table/table.js +526 -180
  109. package/dist/components/Table/utils/dom.d.ts +26 -0
  110. package/dist/components/Table/utils/dom.js +123 -0
  111. package/dist/components/Table/utils/filterHandle.d.ts +1 -0
  112. package/dist/components/Table/utils/filterHandle.js +66 -0
  113. package/dist/components/Table/utils/getSummaryData.d.ts +2 -1
  114. package/dist/components/Table/utils/getSummaryData.js +282 -25
  115. package/dist/components/Table/utils/shallowEqual.d.ts +2 -0
  116. package/dist/components/Table/utils/shallowEqual.js +35 -0
  117. package/dist/components/Table/utils/validate.d.ts +1 -1
  118. package/dist/components/Table/utils/validate.js +30 -11
  119. package/dist/components/TreeSelect/index.d.ts +15 -0
  120. package/dist/components/TreeSelect/index.js +29 -0
  121. package/dist/components/Upload/upload-table.js +31 -26
  122. package/dist/components/Upload/upload.js +23 -18
  123. package/dist/components/Upload/utils.js +11 -10
  124. package/dist/components/UploadSingle/upload-single.js +5 -4
  125. package/dist/components/Watermark/index.d.ts +2 -0
  126. package/dist/components/Watermark/index.js +2 -0
  127. package/dist/components/Watermark/interface.d.ts +20 -0
  128. package/dist/components/Watermark/interface.js +1 -0
  129. package/dist/components/Watermark/utils.d.ts +1 -0
  130. package/dist/components/Watermark/utils.js +70 -0
  131. package/dist/components/Watermark/water.d.ts +50 -0
  132. package/dist/components/Watermark/water.js +66 -0
  133. package/dist/components/Watermark/watermark-div.d.ts +4 -0
  134. package/dist/components/Watermark/watermark-div.js +41 -0
  135. package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
  136. package/dist/components/Watermark/watermark-shadow.js +116 -0
  137. package/dist/components/Watermark/watermark.d.ts +3 -0
  138. package/dist/components/Watermark/watermark.js +102 -0
  139. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
  140. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
  141. package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
  142. package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
  143. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
  144. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
  145. package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
  146. package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
  147. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
  148. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
  149. package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
  150. package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
  151. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
  152. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
  153. package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
  154. package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
  155. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
  156. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
  157. package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
  158. package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
  159. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
  160. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
  161. package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
  162. package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
  163. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
  164. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
  165. package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
  166. package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
  167. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
  168. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
  169. package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
  170. package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
  171. package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
  172. package/dist/components/WorkflowPrintContainer/images.js +2 -0
  173. package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
  174. package/dist/components/WorkflowPrintContainer/index.js +2 -0
  175. package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
  176. package/dist/components/WorkflowPrintContainer/service.js +101 -0
  177. package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
  178. package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
  179. package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
  180. package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
  181. package/dist/components/business/Analyse/index.js +12 -11
  182. package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
  183. package/dist/components/business/CodeQuery/component/TableList.js +5 -4
  184. package/dist/components/business/CodeQuery/hooks.js +2 -1
  185. package/dist/components/business/CodeQuery/index.js +2 -1
  186. package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
  187. package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
  188. package/dist/components/business/Common/UserInfo/index.js +7 -4
  189. package/dist/components/business/Common/UserPassword/index.d.ts +1 -0
  190. package/dist/components/business/Common/UserPassword/index.js +39 -18
  191. package/dist/components/business/Common/validatePassword.d.ts +1 -1
  192. package/dist/components/business/Common/validatePassword.js +17 -7
  193. package/dist/components/business/DetailCard/index.js +7 -6
  194. package/dist/components/business/DetailHeader/index.js +7 -6
  195. package/dist/components/business/DetailList/index.js +5 -4
  196. package/dist/components/business/DgColumns/index.js +12 -11
  197. package/dist/components/business/ExportButton/index.js +6 -5
  198. package/dist/components/business/Footer/index.js +4 -1
  199. package/dist/components/business/GridList/item.d.ts +1 -1
  200. package/dist/components/business/List/item.d.ts +1 -1
  201. package/dist/components/business/NewList/item.d.ts +1 -1
  202. package/dist/components/business/NewList/item.js +1 -1
  203. package/dist/components/business/OperationBtnGroup/index.js +17 -16
  204. package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
  205. package/dist/components/business/SearchContainer/hooks/useToggle.js +5 -4
  206. package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
  207. package/dist/components/business/SearchContainer/record-common-item.js +82 -0
  208. package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
  209. package/dist/components/business/SearchContainer/record-common-list.js +64 -0
  210. package/dist/components/business/SearchContainer/search-container.d.ts +13 -0
  211. package/dist/components/business/SearchContainer/search-container.js +32 -3
  212. package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
  213. package/dist/components/business/SearchContainer/search-drawer.js +139 -13
  214. package/dist/components/business/SearchContainer/search-item.js +33 -2
  215. package/dist/components/business/SearchContainer/search-left.d.ts +1 -0
  216. package/dist/components/business/SearchContainer/search-left.js +11 -3
  217. package/dist/components/business/SearchContainer/search-right.js +23 -4
  218. package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +15 -0
  219. package/dist/components/business/SearchContainer/useRecordCommonInit.js +242 -0
  220. package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +7 -0
  221. package/dist/components/business/SearchContainer/useRecordCommonSearch.js +140 -0
  222. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +31 -0
  223. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
  224. package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
  225. package/dist/components/business/Signatures/components/CompareResult.js +7 -6
  226. package/dist/components/business/Signatures/components/DetailTable.js +37 -34
  227. package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
  228. package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
  229. package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
  230. package/dist/components/business/Signatures/index.js +64 -53
  231. package/dist/components/business/SortList/sort-drawer.js +5 -4
  232. package/dist/components/business/Template/index.js +11 -10
  233. package/dist/components/utils/MyStorage.d.ts +36 -0
  234. package/dist/components/utils/MyStorage.js +120 -0
  235. package/dist/components/utils/ZtxkContext.d.ts +34 -0
  236. package/dist/components/utils/ZtxkContext.js +13 -0
  237. package/dist/components/utils/fetch.d.ts +10 -0
  238. package/dist/components/utils/fetch.js +119 -0
  239. package/dist/components/utils/index.d.ts +1 -0
  240. package/dist/components/utils/index.js +20 -0
  241. package/dist/components/utils/processNumber.d.ts +12 -0
  242. package/dist/components/utils/processNumber.js +106 -0
  243. package/dist/components/utils/upload.js +6 -3
  244. package/dist/components/utils/useBaseContext.d.ts +5 -0
  245. package/dist/components/utils/useBaseContext.js +10 -0
  246. package/dist/components/utils/useLastest.d.ts +2 -0
  247. package/dist/components/utils/useLastest.js +6 -0
  248. package/dist/components/utils/useMemoizedFn.d.ts +4 -0
  249. package/dist/components/utils/useMemoizedFn.js +19 -0
  250. package/dist/constants.d.ts +1 -1
  251. package/dist/constants.js +1 -1
  252. package/dist/index.css +1011 -7
  253. package/dist/index.css.map +1 -1
  254. package/dist/index.d.ts +10 -1
  255. package/dist/index.js +200 -84
  256. package/dist/locales/en-US.json +818 -0
  257. package/dist/locales/zh-CN.json +818 -0
  258. package/dist/request.js +6 -5
  259. package/package.json +7 -2
@@ -50,6 +50,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
50
50
  to[j] = from[i];
51
51
  return to;
52
52
  };
53
+ import i18next from 'ztxkutils/dist/i18next';
53
54
  import React, { useEffect, useState, useCallback, useRef } from 'react';
54
55
  import Table from 'components/Table';
55
56
  import EnhanceSelect from 'components/EnhanceSelect';
@@ -66,7 +67,7 @@ import FormDemo from './FormDemo';
66
67
  // 获取表格数据
67
68
  function useGetTableRecords() {
68
69
  // 表格数据
69
- var _a = useState(Array.from({ length: 10 }).map(function (item, index) {
70
+ var _a = useState(Array.from({ length: 100 }).map(function (item, index) {
70
71
  var newItem = {
71
72
  id: "" + (index + 1),
72
73
  test1: index + 1 + "-test1",
@@ -89,14 +90,14 @@ function useGetTableRecords() {
89
90
  prefixTextureId: 1,
90
91
  prefixSpecification: 'Φ24mm*9m',
91
92
  prefixSpecificationId: 1,
92
- prefixPlacesteel: '萍钢',
93
+ prefixPlacesteel: i18next.t('萍钢'),
93
94
  prefixPlacesteelId: 1,
94
95
  };
95
96
  return newItem;
96
97
  // return transformDataFn(newItem, { prefix: 'prefix' });
97
98
  })), records = _a[0], setRecords = _a[1];
98
99
  useEffect(function () {
99
- console.log('开始远程获取表格数据!');
100
+ console.log(i18next.t('开始远程获取表格数据!'));
100
101
  setTimeout(function () {
101
102
  // setRecords([
102
103
  // { id: '1', test1: '1-test1', test2: '1-test2', studentId: '2' },
@@ -115,33 +116,29 @@ function useGetTableRecords() {
115
116
  // );
116
117
  }, 2000);
117
118
  }, []);
118
- return {
119
- records: records,
120
- setRecords: setRecords,
121
- };
122
- }
123
- // 获取列表数据
119
+ return { records: records, setRecords: setRecords };
120
+ } // 获取列表数据
124
121
  function useGetSelectList() {
125
122
  var _a = useState([]), list = _a[0], setList = _a[1];
126
123
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
127
124
  useEffect(function () {
128
- console.log('开始远程拉取下拉框数据!');
125
+ console.log(i18next.t('开始远程拉取下拉框数据!'));
129
126
  setTimeout(function () {
130
127
  setLoading(true);
131
128
  setList([
132
129
  {
133
130
  id: '1',
134
- name: '张三',
131
+ name: i18next.t('张三'),
135
132
  jobNumber: '001',
136
133
  },
137
134
  {
138
135
  id: '2',
139
- name: '张三',
136
+ name: i18next.t('张三'),
140
137
  jobNumber: '002',
141
138
  },
142
139
  {
143
140
  id: '3',
144
- name: '李四',
141
+ name: i18next.t('李四'),
145
142
  jobNumber: '003',
146
143
  },
147
144
  ]);
@@ -351,12 +348,12 @@ var list1 = [
351
348
  isDeleted: 0,
352
349
  xid: null,
353
350
  materialCode: '010301060000000001',
354
- materialDesc: '螺纹钢 HRB400E',
351
+ materialDesc: i18next.t('螺纹钢 HRB400E'),
355
352
  productLevelId: 4,
356
353
  productLevelCode: '010207',
357
- productLevelName: '带肋钢筋',
354
+ productLevelName: i18next.t('带肋钢筋'),
358
355
  brandId: 1,
359
- brandName: '螺纹钢',
356
+ brandName: i18next.t('螺纹钢'),
360
357
  textureId: 1,
361
358
  textureName: 'HRB400E',
362
359
  specificationId: null,
@@ -370,7 +367,7 @@ var list1 = [
370
367
  packingMethodName: null,
371
368
  variety: null,
372
369
  unitCode: 'T',
373
- unitName: '吨',
370
+ unitName: i18next.t('吨'),
374
371
  trademarkId: null,
375
372
  trademarkName: null,
376
373
  strengthGrade: null,
@@ -378,7 +375,7 @@ var list1 = [
378
375
  materialType: '1',
379
376
  foreignTradeFlag: '1',
380
377
  poUnitCode: 'T',
381
- poUnitName: '吨',
378
+ poUnitName: i18next.t('吨'),
382
379
  },
383
380
  {
384
381
  id: 2,
@@ -391,12 +388,12 @@ var list1 = [
391
388
  isDeleted: 0,
392
389
  xid: null,
393
390
  materialCode: '010301060000000002',
394
- materialDesc: '螺纹钢 HRB300E',
391
+ materialDesc: i18next.t('螺纹钢 HRB300E'),
395
392
  productLevelId: 4,
396
393
  productLevelCode: '010207',
397
- productLevelName: '带肋钢筋',
394
+ productLevelName: i18next.t('带肋钢筋'),
398
395
  brandId: 1,
399
- brandName: '螺纹钢',
396
+ brandName: i18next.t('螺纹钢'),
400
397
  textureId: 2,
401
398
  textureName: 'HRB300E',
402
399
  specificationId: null,
@@ -410,7 +407,7 @@ var list1 = [
410
407
  packingMethodName: '',
411
408
  variety: '',
412
409
  unitCode: 'T',
413
- unitName: '吨',
410
+ unitName: i18next.t('吨'),
414
411
  trademarkId: null,
415
412
  trademarkName: '',
416
413
  strengthGrade: '',
@@ -418,7 +415,7 @@ var list1 = [
418
415
  materialType: '1',
419
416
  foreignTradeFlag: '1',
420
417
  poUnitCode: 'T',
421
- poUnitName: '吨',
418
+ poUnitName: i18next.t('吨'),
422
419
  },
423
420
  {
424
421
  id: 3,
@@ -431,12 +428,12 @@ var list1 = [
431
428
  isDeleted: 0,
432
429
  xid: null,
433
430
  materialCode: '010301060000000003',
434
- materialDesc: '方钢品名1 HRB300E',
431
+ materialDesc: i18next.t('方钢品名1 HRB300E'),
435
432
  productLevelId: 5,
436
433
  productLevelCode: '010208',
437
- productLevelName: '方钢',
434
+ productLevelName: i18next.t('方钢'),
438
435
  brandId: 3,
439
- brandName: '方钢品名1',
436
+ brandName: i18next.t('方钢品名1'),
440
437
  textureId: 4,
441
438
  textureName: 'HRB300E',
442
439
  specificationId: null,
@@ -450,7 +447,7 @@ var list1 = [
450
447
  packingMethodName: '',
451
448
  variety: '',
452
449
  unitCode: 'T',
453
- unitName: '吨',
450
+ unitName: i18next.t('吨'),
454
451
  trademarkId: null,
455
452
  trademarkName: '',
456
453
  strengthGrade: '',
@@ -458,7 +455,7 @@ var list1 = [
458
455
  materialType: '1',
459
456
  foreignTradeFlag: '1',
460
457
  poUnitCode: 'T',
461
- poUnitName: '吨',
458
+ poUnitName: i18next.t('吨'),
462
459
  },
463
460
  ];
464
461
  /**
@@ -510,7 +507,7 @@ var TableDemo = function () {
510
507
  // 表格列配置
511
508
  var columns = [
512
509
  {
513
- title: '序号',
510
+ title: i18next.t('序号'),
514
511
  width: 62,
515
512
  fixed: 'left',
516
513
  align: 'center',
@@ -518,7 +515,7 @@ var TableDemo = function () {
518
515
  render: function (_text, _record, index) { return "" + (index + 1); },
519
516
  },
520
517
  {
521
- title: '物料信息列表',
518
+ title: i18next.t('物料信息列表'),
522
519
  width: 100,
523
520
  dataIndex: 'materialId',
524
521
  key: 'materialId',
@@ -543,10 +540,11 @@ var TableDemo = function () {
543
540
  },
544
541
  },
545
542
  {
546
- title: '物料选择相关',
543
+ title: i18next.t('物料选择相关'),
547
544
  width: 400,
548
545
  dataIndex: 'key1',
549
546
  key: 'key1',
547
+ hideColumn: true,
550
548
  shouldCellUpdate: function (record, preRecord) {
551
549
  if (lengthChange) {
552
550
  setLengthChange(false);
@@ -572,18 +570,18 @@ var TableDemo = function () {
572
570
  },
573
571
  },
574
572
  {
575
- title: '测试字段1',
573
+ title: i18next.t('测试字段1'),
576
574
  width: 100,
577
575
  dataIndex: 'test1',
578
576
  key: 'test1',
579
577
  render: function () {
580
578
  return (React.createElement(Button, { type: "link", onClick: function () {
581
- console.log('点击跳转');
582
- }, showCopy: true }, "\u6211\u662F\u4E00\u4E2A\u94FE\u63A5"));
579
+ console.log(i18next.t('点击跳转'));
580
+ }, showCopy: true }, i18next.t('我是一个链接')));
583
581
  },
584
582
  },
585
583
  {
586
- title: '测试字段2',
584
+ title: i18next.t('测试字段2'),
587
585
  width: 120,
588
586
  dataIndex: 'test2',
589
587
  key: 'test2',
@@ -595,7 +593,7 @@ var TableDemo = function () {
595
593
  },
596
594
  },
597
595
  {
598
- title: '编辑字段11',
596
+ title: i18next.t('编辑字段11'),
599
597
  width: 220,
600
598
  dataIndex: 'test3',
601
599
  key: 'test3',
@@ -609,7 +607,7 @@ var TableDemo = function () {
609
607
  return Promise.reject({
610
608
  errorFields: [
611
609
  {
612
- errors: "\u91C7\u8D2D\u57FA\u672C\u6570\u636E-\u660E\u7EC6\u8868 \u7B2C" + index + "\u884C \u91C7\u8D2D\u4ED8\u6B3E\u6761\u4EF62 \u5FC5\u586B\uFF01",
610
+ errors: i18next.t('采购基本数据-明细表 第{{index}}行 采购付款条件2 必填!', { index: index }),
613
611
  },
614
612
  ],
615
613
  });
@@ -634,7 +632,7 @@ var TableDemo = function () {
634
632
  },
635
633
  },
636
634
  {
637
- title: '编辑字段2',
635
+ title: i18next.t('编辑字段2'),
638
636
  width: 220,
639
637
  dataIndex: 'test4',
640
638
  key: 'test4',
@@ -663,28 +661,32 @@ var TableDemo = function () {
663
661
  return 0;
664
662
  },
665
663
  overMaxTip: function (record, index) {
666
- return "\u7B2C" + (index + 1) + "\u884C\uFF0C\u8D85\u51FA\u6700\u5927\u503C\uFF0C\u5DF2\u4FEE\u6539\u6210\u6700\u5927\u503C";
664
+ return i18next.t('第{{slot0}}行,超出最大值,已修改成最大值', {
665
+ slot0: index + 1,
666
+ });
667
667
  },
668
668
  maxHandle: function (record) {
669
669
  return 10000;
670
670
  },
671
671
  lowMinTip: function (record, index) {
672
- return "\u7B2C" + (index + 1) + "\u884C\uFF0C\u4F4E\u4E8E\u6700\u5C0F\u503C\uFF0C\u5DF2\u4FEE\u6539\u6210\u6700\u5C0F\u503C";
672
+ return i18next.t('第{{slot0}}行,低于最小值,已修改成最小值', {
673
+ slot0: index + 1,
674
+ });
673
675
  },
674
676
  precision: 0,
675
677
  formatterType: 'currency',
676
678
  onBlur: function () {
677
679
  setBtnLoading(false);
678
- console.log('失去焦点了');
680
+ console.log(i18next.t('失去焦点了'));
679
681
  },
680
682
  onFocus: function () {
681
683
  setBtnLoading(true);
682
- console.log('获得焦点了');
684
+ console.log(i18next.t('获得焦点了'));
683
685
  },
684
686
  },
685
687
  },
686
688
  {
687
- title: '编辑字段2+1',
689
+ title: i18next.t('编辑字段2+1'),
688
690
  width: 220,
689
691
  dataIndex: 'time',
690
692
  key: 'time',
@@ -717,7 +719,7 @@ var TableDemo = function () {
717
719
  },
718
720
  },
719
721
  {
720
- title: '编辑字段3',
722
+ title: i18next.t('编辑字段3'),
721
723
  width: 220,
722
724
  dataIndex: 'studentId',
723
725
  key: 'studentId',
@@ -750,7 +752,7 @@ var TableDemo = function () {
750
752
  },
751
753
  },
752
754
  {
753
- title: '编辑字段4',
755
+ title: i18next.t('编辑字段4'),
754
756
  width: 220,
755
757
  dataIndex: 'depId',
756
758
  key: 'depId',
@@ -778,20 +780,20 @@ var TableDemo = function () {
778
780
  },
779
781
  },
780
782
  {
781
- title: '编辑字段5',
783
+ title: i18next.t('编辑字段5'),
782
784
  width: 220,
783
785
  dataIndex: 'test5',
784
786
  key: 'test5',
785
787
  },
786
788
  {
787
- title: '编辑字段6',
789
+ title: i18next.t('编辑字段6'),
788
790
  width: 220,
789
791
  dataIndex: 'test6',
790
792
  key: 'test6',
791
793
  fixed: 'right',
792
794
  },
793
795
  {
794
- title: '操作',
796
+ title: i18next.t('操作'),
795
797
  width: 300,
796
798
  fixed: 'right',
797
799
  key: 'operation',
@@ -799,22 +801,22 @@ var TableDemo = function () {
799
801
  return (React.createElement(OperationBtnGroup, { status: "10", id: "11", statusBtnConfig: {
800
802
  '10': [
801
803
  {
802
- name: '财务审核',
804
+ name: i18next.t('财务审核'),
803
805
  type: 'submitApprove1',
804
806
  authority: true,
805
- confirmMsg: '是否确定作废?作废后单据不能再操作。',
807
+ confirmMsg: i18next.t('是否确定作废?作废后单据不能再操作。'),
806
808
  },
807
809
  {
808
- name: '超长文本',
810
+ name: i18next.t('超长文本'),
809
811
  type: 'submitApprove2',
810
812
  authority: true,
811
- confirmMsg: '横穿阿斯利康大家按时了看到阿斯利康大家按时了看到阿拉山口巨大数量的阿斯利康大家按时的ask来得及',
813
+ confirmMsg: i18next.t('横穿阿斯利康大家按时了看到阿斯利康大家按时了看到阿拉山口巨大数量的阿斯利康大家按时的ask来得及'),
812
814
  },
813
815
  {
814
- name: '撤回',
816
+ name: i18next.t('撤回'),
815
817
  type: 'submitApprove3',
816
818
  authority: true,
817
- confirmMsg: '是否确定撤回?',
819
+ confirmMsg: i18next.t('是否确定撤回?'),
818
820
  },
819
821
  ],
820
822
  } }));
@@ -914,12 +916,12 @@ var TableDemo = function () {
914
916
  });
915
917
  });
916
918
  })();
917
- } }, "\u70B9\u51FB"),
919
+ } }, i18next.t('点击')),
918
920
  React.createElement(Button, { onClick: function () {
919
921
  clearAllCatchData();
920
922
  setRefreshSel(true);
921
923
  refreshId.current = refreshId.current + 1;
922
- } }, "\u6E32\u67D3")),
924
+ } }, i18next.t('渲染'))),
923
925
  React.createElement(Table
924
926
  // 如果需要保留本地偏好,那么这里需要预处理一下columns数据
925
927
  // columns={getTableLayoutFullData(columns, tableLayout)}
@@ -928,7 +930,7 @@ var TableDemo = function () {
928
930
  // 如果需要保留本地偏好,那么这里需要预处理一下columns数据
929
931
  // columns={getTableLayoutFullData(columns, tableLayout)}
930
932
  // initColumns={columns}
931
- columns: columns, dataSource: records, rowKey: "id", tableHandleRef: tableHandleRef,
933
+ columns: columns, dataSource: [], rowKey: "id", tableHandleRef: tableHandleRef, virtualTableKey: "test",
932
934
  // 配置表格列
933
935
  // configInfo={tableConfig}
934
936
  // 添加动态列配置
@@ -941,7 +943,9 @@ var TableDemo = function () {
941
943
  // 表格行拖拽
942
944
  onMoveRow: onMoveRowHandle,
943
945
  // 自动伸缩列
944
- isResizableColumn: true, isFlex: true, scroll: { x: 1000 }, summaryFixed: true, summaryConfig: [
946
+ isResizableColumn: true,
947
+ // isFlex
948
+ scroll: { x: 1000, y: 200 }, summaryFixed: true, summaryConfig: [
945
949
  {
946
950
  type: 'subtotal',
947
951
  fields: [
@@ -1005,11 +1009,11 @@ function myRequest(options) {
1005
1009
  data: [
1006
1010
  {
1007
1011
  id: '1',
1008
- name: '数据项1',
1012
+ name: i18next.t('数据项1'),
1009
1013
  },
1010
1014
  {
1011
1015
  id: '2',
1012
- name: '数据项2',
1016
+ name: i18next.t('数据项2'),
1013
1017
  },
1014
1018
  ],
1015
1019
  });
@@ -1020,11 +1024,11 @@ function myRequest(options) {
1020
1024
  data: [
1021
1025
  {
1022
1026
  id: '3',
1023
- name: '数据项3',
1027
+ name: i18next.t('数据项3'),
1024
1028
  },
1025
1029
  {
1026
1030
  id: '4',
1027
- name: '数据项4',
1031
+ name: i18next.t('数据项4'),
1028
1032
  },
1029
1033
  ],
1030
1034
  });
@@ -1035,11 +1039,11 @@ function myRequest(options) {
1035
1039
  data: [
1036
1040
  {
1037
1041
  id: '5',
1038
- name: '数据项5',
1042
+ name: i18next.t('数据项5'),
1039
1043
  },
1040
1044
  {
1041
1045
  id: '6',
1042
- name: '数据项6',
1046
+ name: i18next.t('数据项6'),
1043
1047
  },
1044
1048
  ],
1045
1049
  });
@@ -1049,27 +1053,27 @@ function myRequest(options) {
1049
1053
  data: [
1050
1054
  {
1051
1055
  id: '1',
1052
- name: '数据项1',
1056
+ name: i18next.t('数据项1'),
1053
1057
  },
1054
1058
  {
1055
1059
  id: '2',
1056
- name: '数据项2',
1060
+ name: i18next.t('数据项2'),
1057
1061
  },
1058
1062
  {
1059
1063
  id: '3',
1060
- name: '数据项3',
1064
+ name: i18next.t('数据项3'),
1061
1065
  },
1062
1066
  {
1063
1067
  id: '4',
1064
- name: '数据项4',
1068
+ name: i18next.t('数据项4'),
1065
1069
  },
1066
1070
  {
1067
1071
  id: '5',
1068
- name: '数据项5',
1072
+ name: i18next.t('数据项5'),
1069
1073
  },
1070
1074
  {
1071
1075
  id: '6',
1072
- name: '数据项6',
1076
+ name: i18next.t('数据项6'),
1073
1077
  },
1074
1078
  ],
1075
1079
  });
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ import i18next from 'ztxkutils/dist/i18next';
12
13
  /**
13
14
  * @author 陈亚雄
14
15
  * @description
@@ -23,36 +24,36 @@ import EnhanceSelect from 'components/EnhanceSelect';
23
24
  // 自定义组件
24
25
  // 其他文件
25
26
  var companyList = [
26
- { id: '100', name: '百度' },
27
- { id: '200', name: '阿里' },
28
- { id: '300', name: '腾讯' },
27
+ { id: '100', name: i18next.t('百度') },
28
+ { id: '200', name: i18next.t('阿里') },
29
+ { id: '300', name: i18next.t('腾讯') },
29
30
  ];
30
31
  var depListObj = {
31
32
  '100': [
32
- { id: '100100', name: '百度-事业部' },
33
- { id: '100200', name: '百度-电商部' },
34
- { id: '100300', name: '百度-工程部' },
33
+ { id: '100100', name: i18next.t('百度-事业部') },
34
+ { id: '100200', name: i18next.t('百度-电商部') },
35
+ { id: '100300', name: i18next.t('百度-工程部') },
35
36
  ],
36
37
  '200': [
37
- { id: '200100', name: '阿里-事业部' },
38
- { id: '200200', name: '阿里-电商部' },
39
- { id: '200300', name: '阿里-工程部' },
38
+ { id: '200100', name: i18next.t('阿里-事业部') },
39
+ { id: '200200', name: i18next.t('阿里-电商部') },
40
+ { id: '200300', name: i18next.t('阿里-工程部') },
40
41
  ],
41
42
  '300': [
42
- { id: '300100', name: '腾讯-事业部' },
43
- { id: '300200', name: '腾讯-电商部' },
44
- { id: '300300', name: '腾讯-工程部' },
43
+ { id: '300100', name: i18next.t('腾讯-事业部') },
44
+ { id: '300200', name: i18next.t('腾讯-电商部') },
45
+ { id: '300300', name: i18next.t('腾讯-工程部') },
45
46
  ],
46
47
  all: [
47
- { id: '100100', name: '百度-事业部' },
48
- { id: '100200', name: '百度-电商部' },
49
- { id: '100300', name: '百度-工程部' },
50
- { id: '200100', name: '阿里-事业部' },
51
- { id: '200200', name: '阿里-电商部' },
52
- { id: '200300', name: '阿里-工程部' },
53
- { id: '300100', name: '腾讯-事业部' },
54
- { id: '300200', name: '腾讯-电商部' },
55
- { id: '300300', name: '腾讯-工程部' },
48
+ { id: '100100', name: i18next.t('百度-事业部') },
49
+ { id: '100200', name: i18next.t('百度-电商部') },
50
+ { id: '100300', name: i18next.t('百度-工程部') },
51
+ { id: '200100', name: i18next.t('阿里-事业部') },
52
+ { id: '200200', name: i18next.t('阿里-电商部') },
53
+ { id: '200300', name: i18next.t('阿里-工程部') },
54
+ { id: '300100', name: i18next.t('腾讯-事业部') },
55
+ { id: '300200', name: i18next.t('腾讯-电商部') },
56
+ { id: '300300', name: i18next.t('腾讯-工程部') },
56
57
  ],
57
58
  };
58
59
  var TableDemo1 = function () {
@@ -73,7 +74,7 @@ var TableDemo1 = function () {
73
74
  // 表格列配置
74
75
  var columns = [
75
76
  {
76
- title: '序号',
77
+ title: i18next.t('序号'),
77
78
  width: 62,
78
79
  fixed: 'left',
79
80
  align: 'center',
@@ -81,7 +82,7 @@ var TableDemo1 = function () {
81
82
  render: function (_text, _record, index) { return "" + (index + 1); },
82
83
  },
83
84
  {
84
- title: '公司',
85
+ title: i18next.t('公司'),
85
86
  width: 120,
86
87
  key: 'company',
87
88
  dataIndex: 'company',
@@ -89,7 +90,7 @@ var TableDemo1 = function () {
89
90
  return record.company !== preRecord.company;
90
91
  },
91
92
  render: function (_text, _record, index) {
92
- console.log('公司下拉框-render', index);
93
+ console.log(i18next.t('公司下拉框-render'), index);
93
94
  return (React.createElement(EnhanceSelect, { list: companyList, value: _text, onChange: function (value, option, fullData) {
94
95
  var newRecord = {
95
96
  company: value,
@@ -100,7 +101,7 @@ var TableDemo1 = function () {
100
101
  },
101
102
  },
102
103
  {
103
- title: '部门',
104
+ title: i18next.t('部门'),
104
105
  width: 120,
105
106
  key: 'department',
106
107
  dataIndex: 'department',
@@ -109,7 +110,7 @@ var TableDemo1 = function () {
109
110
  record.department !== preRecord.department);
110
111
  },
111
112
  render: function (_text, _record, index) {
112
- console.log('部门下拉框-render', index);
113
+ console.log(i18next.t('部门下拉框-render'), index);
113
114
  var company = _record.company;
114
115
  var depList = depListObj.all;
115
116
  if (company) {
@@ -124,7 +125,7 @@ var TableDemo1 = function () {
124
125
  },
125
126
  },
126
127
  {
127
- title: '输入text',
128
+ title: i18next.t('输入text'),
128
129
  width: 120,
129
130
  key: 'inText',
130
131
  dataIndex: 'inText',
@@ -138,7 +139,7 @@ var TableDemo1 = function () {
138
139
  editable: true,
139
140
  },
140
141
  {
141
- title: '输入text1',
142
+ title: i18next.t('输入text1'),
142
143
  width: 120,
143
144
  key: 'inText1',
144
145
  dataIndex: 'inText1',
@@ -152,7 +153,7 @@ var TableDemo1 = function () {
152
153
  editable: true,
153
154
  },
154
155
  {
155
- title: '输入number',
156
+ title: i18next.t('输入number'),
156
157
  width: 120,
157
158
  key: 'inNumber',
158
159
  dataIndex: 'inNumber',
@@ -169,7 +170,7 @@ var TableDemo1 = function () {
169
170
  },
170
171
  },
171
172
  {
172
- title: '输入number1',
173
+ title: i18next.t('输入number1'),
173
174
  width: 120,
174
175
  key: 'inNumber1',
175
176
  dataIndex: 'inNumber1',
@@ -186,7 +187,7 @@ var TableDemo1 = function () {
186
187
  },
187
188
  },
188
189
  {
189
- title: '下拉框1',
190
+ title: i18next.t('下拉框1'),
190
191
  width: 120,
191
192
  key: 'selector',
192
193
  dataIndex: 'selector',
@@ -194,7 +195,7 @@ var TableDemo1 = function () {
194
195
  return record.selector !== preRecord.selector;
195
196
  },
196
197
  render: function (_text, _record, index) {
197
- console.log('下拉框1-render', index);
198
+ console.log(i18next.t('下拉框1-render'), index);
198
199
  return React.createElement(EnhanceSelect, null);
199
200
  },
200
201
  },
@@ -215,7 +216,7 @@ var TableDemo1 = function () {
215
216
  React.createElement(Table, { columns: columns, dataSource: records, rowKey: "id", onEditableSave: onEditableSaveHandle }),
216
217
  React.createElement("button", { onClick: function () {
217
218
  console.log(records);
218
- } }, "\u83B7\u53D6\u6570\u636E")));
219
+ } }, i18next.t('获取数据'))));
219
220
  };
220
221
  export default TableDemo1;
221
222
  // import React, { useEffect, useState } from 'react';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description 基础表格,充当列表
4
+ */
5
+ import React from 'react';
6
+ declare const BasicTable: React.FC<{
7
+ dynamicKey?: string;
8
+ }>;
9
+ export default BasicTable;