ztxkui 4.2.18-21 → 4.2.18-220

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 (416) hide show
  1. package/dist/App.js +315 -291
  2. package/dist/Demo.js +64 -43
  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 +73 -69
  14. package/dist/DemoCom/TableDemo1.js +84 -34
  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 +225 -25
  21. package/dist/TableDemo/EditableTable.js +146 -72
  22. package/dist/TableDemo/ModalTable.js +25 -24
  23. package/dist/TableDemo/ProEditableTable.js +30 -29
  24. package/dist/TableDemo/data.d.ts +34 -0
  25. package/dist/TableDemo/data.js +387 -10
  26. package/dist/TableDemo/index.js +3 -3
  27. package/dist/TreeDemo.js +8 -7
  28. package/dist/TreeSelectDemo.js +12 -8
  29. package/dist/UI/Form/index.d.ts +3 -0
  30. package/dist/UI/Form/index.js +347 -0
  31. package/dist/UI/Input/index.d.ts +17 -0
  32. package/dist/UI/Input/index.js +74 -0
  33. package/dist/UI/InputNumber/index.d.ts +3 -0
  34. package/dist/UI/InputNumber/index.js +45 -0
  35. package/dist/UI/OldForm/index.d.ts +9 -0
  36. package/dist/UI/OldForm/index.js +302 -0
  37. package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
  38. package/dist/UI/Select/EmpForQuitDemo.js +120 -0
  39. package/dist/UI/Select/index.d.ts +10 -0
  40. package/dist/UI/Select/index.js +207 -0
  41. package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
  42. package/dist/UI/Table/BusinessListDemo.js +227 -0
  43. package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
  44. package/dist/UI/Table/BusinessMemberDemo.js +181 -0
  45. package/dist/UI/Table/index.d.ts +10 -0
  46. package/dist/UI/Table/index.js +850 -0
  47. package/dist/UI/TreeSelect/index.d.ts +3 -0
  48. package/dist/UI/TreeSelect/index.js +120 -0
  49. package/dist/UI/index.d.ts +2 -0
  50. package/dist/UI/index.js +34 -0
  51. package/dist/UploadDemo.js +27 -23
  52. package/dist/components/Button/button.d.ts +6 -0
  53. package/dist/components/Button/button.js +11 -4
  54. package/dist/components/Collapse/collapse.js +2 -1
  55. package/dist/components/DatePicker/data-picker.d.ts +3 -1
  56. package/dist/components/EnhanceSelect/index.d.ts +11 -1
  57. package/dist/components/EnhanceSelect/index.js +231 -49
  58. package/dist/components/EnhanceTree/index.js +4 -3
  59. package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
  60. package/dist/components/EnhanceTreeSelect/index.js +57 -7
  61. package/dist/components/Export/export.js +5 -4
  62. package/dist/components/Form/form.d.ts +11 -1
  63. package/dist/components/Form/form.js +5 -3
  64. package/dist/components/Input/input.d.ts +5 -3
  65. package/dist/components/Input/input.js +72 -3
  66. package/dist/components/InputNumber/input-number.js +3 -2
  67. package/dist/components/Layout/layout.d.ts +4 -4
  68. package/dist/components/Menu/menu.d.ts +1 -1
  69. package/dist/components/NumberCase/index.js +9 -7
  70. package/dist/components/Print/print.js +4 -3
  71. package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
  72. package/dist/components/PrintContainer/PrintModal.js +4 -3
  73. package/dist/components/PrintContainer/handle.d.ts +2 -4
  74. package/dist/components/PrintContainer/handle.js +3 -2
  75. package/dist/components/PrintContainer/lodop.js +2 -1
  76. package/dist/components/PrintContainer/print-container.js +74 -73
  77. package/dist/components/PrintContainer/service.js +5 -4
  78. package/dist/components/ProForm/hooks.d.ts +23 -0
  79. package/dist/components/ProForm/hooks.js +209 -0
  80. package/dist/components/ProForm/index.d.ts +9 -0
  81. package/dist/components/ProForm/index.js +168 -0
  82. package/dist/components/ProForm/interface.d.ts +200 -0
  83. package/dist/components/ProForm/interface.js +1 -0
  84. package/dist/components/ProForm/item.d.ts +13 -0
  85. package/dist/components/ProForm/item.js +222 -0
  86. package/dist/components/ProForm/items.d.ts +5 -0
  87. package/dist/components/ProForm/items.js +36 -0
  88. package/dist/components/ProForm/record-common-list.d.ts +18 -0
  89. package/dist/components/ProForm/record-common-list.js +83 -0
  90. package/dist/components/ProForm/search-drawer.d.ts +14 -0
  91. package/dist/components/ProForm/search-drawer.js +237 -0
  92. package/dist/components/ProForm/setting.d.ts +5 -0
  93. package/dist/components/ProForm/setting.js +12 -0
  94. package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
  95. package/dist/components/ProForm/useCommonSearch.js +352 -0
  96. package/dist/components/ProFormList/index.d.ts +12 -0
  97. package/dist/components/ProFormList/index.js +34 -0
  98. package/dist/components/RangePicker/range-picker.js +5 -2
  99. package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
  100. package/dist/components/SortableCancel/sortable-cancel.js +2 -2
  101. package/dist/components/Table/components/FillDown.js +2 -1
  102. package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
  103. package/dist/components/Table/components/FilterDropdown.js +36 -12
  104. package/dist/components/Table/hooks/useColumns.d.ts +5 -0
  105. package/dist/components/Table/hooks/useColumns.js +396 -22
  106. package/dist/components/Table/hooks/useDropRef.js +2 -1
  107. package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
  108. package/dist/components/Table/hooks/useScuRfresh.js +22 -0
  109. package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
  110. package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
  111. package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
  112. package/dist/components/Table/index.d.ts +4 -0
  113. package/dist/components/Table/table-adddel-column.js +4 -3
  114. package/dist/components/Table/table-dynamic.d.ts +1 -0
  115. package/dist/components/Table/table-dynamic.js +447 -60
  116. package/dist/components/Table/table-enhance-cell.d.ts +3 -0
  117. package/dist/components/Table/table-enhance-cell.js +28 -8
  118. package/dist/components/Table/table-menu.d.ts +7 -0
  119. package/dist/components/Table/table-menu.js +359 -0
  120. package/dist/components/Table/table-resizable-title.js +1 -0
  121. package/dist/components/Table/table-sort.js +4 -3
  122. package/dist/components/Table/table.d.ts +16 -0
  123. package/dist/components/Table/table.js +241 -65
  124. package/dist/components/Table/utils/dom.js +2 -1
  125. package/dist/components/Table/utils/filterHandle.d.ts +1 -1
  126. package/dist/components/Table/utils/filterHandle.js +27 -12
  127. package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
  128. package/dist/components/Table/utils/getSummaryData.js +279 -24
  129. package/dist/components/Table/utils/shallowEqual.js +2 -1
  130. package/dist/components/Table/utils/validate.js +25 -6
  131. package/dist/components/Tabs/tabs.d.ts +2 -0
  132. package/dist/components/Tabs/tabs.js +3 -1
  133. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  134. package/dist/components/TranslationButton/DownFile.js +95 -0
  135. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  136. package/dist/components/TranslationButton/PreviewFile.js +73 -0
  137. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  138. package/dist/components/TranslationButton/TranslationButton.js +245 -0
  139. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  140. package/dist/components/TranslationButton/hooks.js +139 -0
  141. package/dist/components/TranslationButton/index.d.ts +4 -0
  142. package/dist/components/TranslationButton/index.js +4 -0
  143. package/dist/components/TreeSelect/index.d.ts +19 -0
  144. package/dist/components/TreeSelect/index.js +88 -0
  145. package/dist/components/Upload/upload-table.js +31 -26
  146. package/dist/components/Upload/upload.d.ts +20 -1
  147. package/dist/components/Upload/upload.js +172 -27
  148. package/dist/components/Upload/utils.d.ts +9 -2
  149. package/dist/components/Upload/utils.js +153 -38
  150. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  151. package/dist/components/UploadCustom/hooks/useDg.js +55 -0
  152. package/dist/components/UploadSingle/upload-single.js +5 -4
  153. package/dist/components/Watermark/index.d.ts +2 -0
  154. package/dist/components/Watermark/index.js +2 -0
  155. package/dist/components/Watermark/interface.d.ts +20 -0
  156. package/dist/components/Watermark/interface.js +1 -0
  157. package/dist/components/Watermark/utils.d.ts +1 -0
  158. package/dist/components/Watermark/utils.js +70 -0
  159. package/dist/components/Watermark/water.d.ts +50 -0
  160. package/dist/components/Watermark/water.js +66 -0
  161. package/dist/components/Watermark/watermark-div.d.ts +4 -0
  162. package/dist/components/Watermark/watermark-div.js +41 -0
  163. package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
  164. package/dist/components/Watermark/watermark-shadow.js +116 -0
  165. package/dist/components/Watermark/watermark.d.ts +3 -0
  166. package/dist/components/Watermark/watermark.js +102 -0
  167. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
  168. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
  169. package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
  170. package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
  171. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
  172. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
  173. package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
  174. package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
  175. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
  176. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
  177. package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
  178. package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
  179. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
  180. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
  181. package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
  182. package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
  183. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
  184. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
  185. package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
  186. package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
  187. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
  188. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
  189. package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
  190. package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
  191. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
  192. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
  193. package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
  194. package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
  195. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
  196. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
  197. package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
  198. package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
  199. package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
  200. package/dist/components/WorkflowPrintContainer/images.js +2 -0
  201. package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
  202. package/dist/components/WorkflowPrintContainer/index.js +2 -0
  203. package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
  204. package/dist/components/WorkflowPrintContainer/service.js +101 -0
  205. package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
  206. package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
  207. package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
  208. package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
  209. package/dist/components/ZtIcon/index.js +2 -0
  210. package/dist/components/business/Analyse/index.js +12 -11
  211. package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
  212. package/dist/components/business/CodeQuery/component/TableList.js +5 -4
  213. package/dist/components/business/CodeQuery/hooks.js +2 -1
  214. package/dist/components/business/CodeQuery/index.js +2 -1
  215. package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
  216. package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
  217. package/dist/components/business/Common/UserInfo/index.js +5 -4
  218. package/dist/components/business/Common/UserPassword/index.js +14 -11
  219. package/dist/components/business/Common/validatePassword.d.ts +1 -1
  220. package/dist/components/business/Common/validatePassword.js +17 -7
  221. package/dist/components/business/DetailCard/index.js +7 -6
  222. package/dist/components/business/DetailHeader/index.js +7 -6
  223. package/dist/components/business/DetailList/index.js +5 -4
  224. package/dist/components/business/DgColumns/index.js +12 -11
  225. package/dist/components/business/ExportButton/index.js +6 -5
  226. package/dist/components/business/Footer/index.js +4 -1
  227. package/dist/components/business/GridList/item.d.ts +1 -1
  228. package/dist/components/business/List/item.d.ts +1 -1
  229. package/dist/components/business/NewList/item.d.ts +1 -1
  230. package/dist/components/business/NewList/item.js +1 -1
  231. package/dist/components/business/OperationBtnGroup/index.js +17 -16
  232. package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
  233. package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
  234. package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
  235. package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
  236. package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
  237. package/dist/components/business/SearchContainer/record-common-item.js +83 -0
  238. package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
  239. package/dist/components/business/SearchContainer/record-common-list.js +95 -0
  240. package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
  241. package/dist/components/business/SearchContainer/search-container.js +66 -3
  242. package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
  243. package/dist/components/business/SearchContainer/search-drawer.js +167 -13
  244. package/dist/components/business/SearchContainer/search-item.js +48 -5
  245. package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
  246. package/dist/components/business/SearchContainer/search-left.js +105 -68
  247. package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
  248. package/dist/components/business/SearchContainer/search-right.js +62 -5
  249. package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
  250. package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
  251. package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
  252. package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
  253. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
  254. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
  255. package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
  256. package/dist/components/business/SearchContainer/useTemplate.js +347 -0
  257. package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
  258. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  259. package/dist/components/business/Signatures/components/CodeModal.js +157 -0
  260. package/dist/components/business/Signatures/components/CompareResult.js +7 -6
  261. package/dist/components/business/Signatures/components/DetailTable.js +37 -34
  262. package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
  263. package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
  264. package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
  265. package/dist/components/business/Signatures/index.js +64 -53
  266. package/dist/components/business/SortList/sort-drawer.js +5 -4
  267. package/dist/components/business/Template/index.js +11 -10
  268. package/dist/components/electron-signatures/content.d.ts +9 -0
  269. package/dist/components/electron-signatures/content.js +1146 -0
  270. package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
  271. package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
  272. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  273. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  274. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  275. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  276. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  277. package/dist/components/electron-signatures/demoComponents/index.js +30 -0
  278. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  279. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  280. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  281. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  282. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
  283. package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
  284. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  285. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  286. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  287. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  288. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  289. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  290. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  291. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  292. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  293. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  294. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  295. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  296. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  297. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  298. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  299. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  300. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  301. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  302. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  303. package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
  304. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  305. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
  306. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  307. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  308. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  309. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
  310. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  311. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  312. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  313. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  314. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  315. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  316. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  317. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  318. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
  319. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
  320. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  321. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  322. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  323. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  324. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  325. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
  326. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  327. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
  328. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
  329. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
  330. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  331. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
  332. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  333. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  334. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  335. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  336. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  337. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  338. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  339. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  340. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  341. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  342. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  343. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
  344. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  345. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  346. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  347. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  348. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  349. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
  350. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  351. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  352. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  353. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  354. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
  355. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
  356. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  357. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  358. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  359. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  360. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  361. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  362. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  363. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  364. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  365. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  366. package/dist/components/electron-signatures/index.d.ts +15 -0
  367. package/dist/components/electron-signatures/index.js +63 -0
  368. package/dist/components/electron-signatures/interface.d.ts +865 -0
  369. package/dist/components/electron-signatures/interface.js +57 -0
  370. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  371. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  372. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  373. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  374. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  375. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  376. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  377. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
  378. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  379. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
  380. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  381. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  382. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  383. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  384. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  385. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  386. package/dist/components/electron-signatures/utils.d.ts +26 -0
  387. package/dist/components/electron-signatures/utils.js +67 -0
  388. package/dist/components/utils/MyStorage.d.ts +36 -0
  389. package/dist/components/utils/MyStorage.js +120 -0
  390. package/dist/components/utils/ZtxkContext.d.ts +67 -0
  391. package/dist/components/utils/ZtxkContext.js +20 -0
  392. package/dist/components/utils/checkSealCoUse.d.ts +16 -0
  393. package/dist/components/utils/checkSealCoUse.js +83 -0
  394. package/dist/components/utils/fetch.d.ts +10 -0
  395. package/dist/components/utils/fetch.js +119 -0
  396. package/dist/components/utils/index.d.ts +9 -0
  397. package/dist/components/utils/index.js +11 -0
  398. package/dist/components/utils/processNumber.d.ts +12 -0
  399. package/dist/components/utils/processNumber.js +106 -0
  400. package/dist/components/utils/upload.js +6 -3
  401. package/dist/components/utils/useBaseContext.d.ts +23 -0
  402. package/dist/components/utils/useBaseContext.js +31 -0
  403. package/dist/components/utils/useMemoizedFn.d.ts +4 -0
  404. package/dist/components/utils/useMemoizedFn.js +19 -0
  405. package/dist/components/utils/usePrevious.d.ts +3 -0
  406. package/dist/components/utils/usePrevious.js +13 -0
  407. package/dist/constants.d.ts +1 -1
  408. package/dist/constants.js +1 -1
  409. package/dist/index.css +2205 -58
  410. package/dist/index.css.map +1 -1
  411. package/dist/index.d.ts +12 -1
  412. package/dist/index.js +255 -86
  413. package/dist/locales/en-US.json +828 -0
  414. package/dist/locales/zh-CN.json +828 -0
  415. package/dist/request.js +7 -6
  416. package/package.json +13 -4
@@ -14,6 +14,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
14
14
  to[j] = from[i];
15
15
  return to;
16
16
  };
17
+ import i18next from 'ztxkutils/dist/i18next';
17
18
  import React, { useCallback, useState, useRef, useMemo } from 'react';
18
19
  import { unstable_batchedUpdates } from 'react-dom';
19
20
  import Button from '../../Button';
@@ -27,7 +28,55 @@ import FilterDropdown from '../components/FilterDropdown';
27
28
  import FillDown from '../components/FillDown';
28
29
  import { SearchOutlined } from '@ant-design/icons';
29
30
  import { filterHandle } from '../utils/filterHandle';
31
+ import useBaseContext from '../../utils/useBaseContext';
32
+ import { exactRound, toThousand } from 'ztxkutils/dist/tools';
33
+ import dayjs from 'dayjs';
34
+ import { useRefreshScuCellFirst } from './useScuRfresh';
30
35
  // 获取表格columns完整数据
36
+ /**
37
+ * 将本地缓存中的子列配置(hideColumn/width/fixed)合并回原始子列
38
+ * 原始子列保留 render 等函数配置(缓存经过 JSON 序列化后函数已丢失),
39
+ * 缓存仅提供动态列设置项;按 key/dataIndex 递归匹配
40
+ */
41
+ var mergeChildrenConfig = function (originChildren, cacheChildren) {
42
+ if (!Array.isArray(originChildren) || !Array.isArray(cacheChildren)) {
43
+ return originChildren;
44
+ }
45
+ return originChildren.map(function (child) {
46
+ var cacheItem = cacheChildren.find(function (c) {
47
+ if (c.key && child.key && c.key === child.key) {
48
+ return true;
49
+ }
50
+ if (c.dataIndex && child.dataIndex && c.dataIndex === child.dataIndex) {
51
+ return true;
52
+ }
53
+ // 嵌套分组列(三级及以上表头的中间层)没有 key/dataIndex,
54
+ // 序列化后只有 title,按 title 匹配(与外层分组匹配规则一致)
55
+ if (Array.isArray(child.children) &&
56
+ child.children.length > 0 &&
57
+ typeof c.title === 'string' &&
58
+ typeof child.title === 'string' &&
59
+ c.title === child.title) {
60
+ return true;
61
+ }
62
+ return false;
63
+ });
64
+ if (!cacheItem) {
65
+ return child;
66
+ }
67
+ var merged = __assign(__assign({}, child), { hideColumn: cacheItem.hideColumn });
68
+ if (cacheItem.width != null) {
69
+ merged.width = cacheItem.width;
70
+ }
71
+ if (cacheItem.fixed !== undefined) {
72
+ merged.fixed = cacheItem.fixed;
73
+ }
74
+ if (Array.isArray(child.children) && child.children.length > 0) {
75
+ merged.children = mergeChildrenConfig(child.children, cacheItem.children);
76
+ }
77
+ return merged;
78
+ });
79
+ };
31
80
  export var getTableLayoutFullData = function (columns, tableLayout) {
32
81
  // const columns = _columns.map((item) => {
33
82
  // return {
@@ -70,14 +119,17 @@ export var getTableLayoutFullData = function (columns, tableLayout) {
70
119
  });
71
120
  // 如果能再原始数据中找到对应的值
72
121
  if (index > -1) {
73
- var result = newAddColumns_1[index];
74
- var column = __assign(__assign({}, result), item);
122
+ var result_1 = newAddColumns_1[index];
123
+ var column = __assign(__assign({}, result_1), item);
75
124
  // 兼容存入localstorge里面的旧数据
76
125
  if (!item.key || !item.dataIndex) {
77
- column = result;
126
+ column = result_1;
78
127
  }
79
128
  // 如果业务代码中设置了hideColumn,那么不做自定义显隐控制
80
- // if (result.hideColumn !== undefined) {
129
+ // if (
130
+ // result.hideColumn !== undefined &&
131
+ // result.isNoDynamicHide === undefined
132
+ // ) {
81
133
  // column.hideColumn = result.hideColumn;
82
134
  // column.isNoDynamicHide = true;
83
135
  // }
@@ -94,12 +146,29 @@ export var getTableLayoutFullData = function (columns, tableLayout) {
94
146
  }
95
147
  // 如果没有在原始数据中找到对应的值,那说明这个应该删除,不应该添加进去
96
148
  }
97
- else if (item.children && !item.fixed) {
149
+ else if (item.children) {
98
150
  // 这里处理一下children里面的render方法。
99
151
  // 这里没办法 因为可能children里面有render方法。
100
152
  // 必须要用columns里面的来替换下 但是因为没有唯一键。所以只能通过title来做判断
101
153
  var cColumn = columns.find(function (c) { return c.title === item.title; });
102
- middleColumns_1.push(__assign(__assign({}, item), cColumn));
154
+ if (!cColumn) {
155
+ // 分组列在原始columns中已不存在(业务改了标题等),丢弃该缓存项,
156
+ // 避免产生没有children的坏列;原始分组列由下方兜底逻辑补回
157
+ return;
158
+ }
159
+ var mergedColumn = __assign(__assign(__assign({}, item), cColumn), {
160
+ // 多级表头:children 以原始列为准(保留 render 等函数配置),
161
+ // 缓存中的子列显隐/宽度/固定配置合并回来
162
+ children: mergeChildrenConfig(cColumn === null || cColumn === void 0 ? void 0 : cColumn.children, item.children) });
163
+ if (mergedColumn.fixed === 'left' || mergedColumn.fixed === true) {
164
+ preColumns_1.push(mergedColumn);
165
+ }
166
+ else if (mergedColumn.fixed === 'right') {
167
+ afterColumns_1.push(mergedColumn);
168
+ }
169
+ else {
170
+ middleColumns_1.push(mergedColumn);
171
+ }
103
172
  }
104
173
  // 如果没有key 或者dataIndex 则说明该值不应该存在
105
174
  // return {
@@ -125,7 +194,34 @@ export var getTableLayoutFullData = function (columns, tableLayout) {
125
194
  // (column) =>
126
195
  // !column.fixed && !middleColumns.find((item) => item.key === column.key)
127
196
  // );
128
- return __spreadArray(__spreadArray(__spreadArray(__spreadArray([], preColumns_1), middleColumns_1), filterNewAddColumns), afterColumns_1);
197
+ var result_2 = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], preColumns_1), middleColumns_1), filterNewAddColumns), afterColumns_1);
198
+ // 兜底:原始columns中的分组列(无key/dataIndex,不参与上面的缓存匹配流程),
199
+ // 若未出现在恢复结果中将彻底丢失(旧格式缓存可能没有分组项),
200
+ // 这里按原始列中的相邻位置补回结果
201
+ var findInResult_1 = function (column) {
202
+ return result_2.findIndex(function (r) {
203
+ return (column.dataIndex && r.dataIndex === column.dataIndex) ||
204
+ (column.key && r.key === column.key) ||
205
+ (Array.isArray(column.children) && r.title === column.title);
206
+ });
207
+ };
208
+ columns.forEach(function (originColumn, originIndex) {
209
+ if (!Array.isArray(originColumn.children) ||
210
+ originColumn.children.length === 0 ||
211
+ findInResult_1(originColumn) > -1) {
212
+ return;
213
+ }
214
+ // 插入到结果中离它最近的前一个原始列之后
215
+ for (var i = originIndex - 1; i >= 0; i--) {
216
+ var idx = findInResult_1(columns[i]);
217
+ if (idx > -1) {
218
+ result_2.splice(idx + 1, 0, originColumn);
219
+ return;
220
+ }
221
+ }
222
+ result_2.unshift(originColumn);
223
+ });
224
+ return result_2;
129
225
  }
130
226
  return columns;
131
227
  };
@@ -229,13 +325,13 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
229
325
  var columns = basicConfig.columns, newColumnsRef = basicConfig.newColumnsRef, showColumnDynamic = basicConfig.showColumnDynamic, showColumnDynamicKey = basicConfig.showColumnDynamicKey, configInfo = basicConfig.configInfo, currentDataSource = basicConfig.currentDataSource, preDataSource = basicConfig.preDataSource, rowKey = basicConfig.rowKey, dataSourceRef = basicConfig.dataSourceRef, expandableChildrenColumnName = basicConfig.expandableChildrenColumnName, upDateColumnsRef = basicConfig.upDateColumnsRef, setUpDateColumnsRef = basicConfig.setUpDateColumnsRef, isUpDateColumnsRef = basicConfig.isUpDateColumnsRef, setIsUpDateColumnsRef = basicConfig.setIsUpDateColumnsRef;
230
326
  var onEditableSave = editableConfig.onEditableSave, onTableChange = editableConfig.onTableChange, currentPage = editableConfig.currentPage, onFillDownChangeRef = editableConfig.onFillDownChangeRef;
231
327
  var ColumnDynamicCom = dynamicConfig.ColumnDynamicCom, DelAllCom = dynamicConfig.DelAllCom, onAddAndDelHandleMemo = dynamicConfig.onAddAndDelHandleMemo, onAddAndDelHandle = dynamicConfig.onAddAndDelHandle, hideAddIcon = dynamicConfig.hideAddIcon, addIconText = dynamicConfig.addIconText, hideDelIcon = dynamicConfig.hideDelIcon, delIconText = dynamicConfig.delIconText;
232
- var copyByKey = otherConfig.copyByKey, myCatchColumns = otherConfig.myCatchColumns, customSortHandle = otherConfig.customSortHandle, customOrder = otherConfig.customOrder, setCustomOrder = otherConfig.setCustomOrder, isSort = otherConfig.isSort, handleSearch = otherConfig.handleSearch, handleReset = otherConfig.handleReset, searchInput = otherConfig.searchInput;
328
+ var copyByKey = otherConfig.copyByKey, myCatchColumns = otherConfig.myCatchColumns, customSortHandle = otherConfig.customSortHandle, customOrder = otherConfig.customOrder, setCustomOrder = otherConfig.setCustomOrder, isSort = otherConfig.isSort, isFilter = otherConfig.isFilter, handleSearch = otherConfig.handleSearch, handleReset = otherConfig.handleReset, searchInput = otherConfig.searchInput, isModalInput = otherConfig.isModalInput, tableNumberFormatter = otherConfig.tableNumberFormatter, isNumberInputThousandth = otherConfig.isNumberInputThousandth, isNumberInputAlignRight = otherConfig.isNumberInputAlignRight, autoDecimalFieldsRef = otherConfig.autoDecimalFieldsRef, isCustomDecimalField = otherConfig.isCustomDecimalField, customDecimalFieldRender = otherConfig.customDecimalFieldRender, isTableSortEnabled = otherConfig.isTableSortEnabled, isTableFilterEnabled = otherConfig.isTableFilterEnabled, sortColumnExtraWidth = otherConfig.sortColumnExtraWidth, filterColumnExtraWidth = otherConfig.filterColumnExtraWidth, firstRefresh = otherConfig.firstRefresh;
233
329
  var tableLayout = showColumnDynamicKey
234
330
  ? getStorage(showColumnDynamicKey)
235
331
  : myCatchColumns;
236
332
  var catchColumns = getTableLayoutFullData(columns, tableLayout);
237
333
  if (!Array.isArray(catchColumns)) {
238
- throw new Error('columns 必须为一个数组');
334
+ throw new Error(i18next.t('columns 必须为一个数组'));
239
335
  }
240
336
  // 根据配置处理columns
241
337
  // 主要处理是否隐藏
@@ -272,9 +368,31 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
272
368
  }
273
369
  var _newColumns = [];
274
370
  var _dynamicColumns = [];
371
+ // 递归遍历一下
372
+ var getAutoDecimalField = function (_columns) {
373
+ _columns.forEach(function (column) {
374
+ var dataIndex = column.dataIndex || column.key;
375
+ if (typeof dataIndex === 'string' &&
376
+ (isCustomDecimalField === null || isCustomDecimalField === void 0 ? void 0 : isCustomDecimalField(dataIndex, column))) {
377
+ autoDecimalFieldsRef.current[dataIndex] = {
378
+ autoDecimal: true,
379
+ };
380
+ }
381
+ if (column.children) {
382
+ getAutoDecimalField(column.children);
383
+ }
384
+ });
385
+ };
386
+ getAutoDecimalField(_columns);
275
387
  // 处理columns
276
388
  _columns.forEach(function (col, index) {
277
389
  var _column = __assign({}, col);
390
+ var columnTitle = typeof _column.title === 'string'
391
+ ? _column.title
392
+ : _column.titleAlias
393
+ ? _column.titleAlias
394
+ : _column.title;
395
+ var dataIndex = col.dataIndex || col.key;
278
396
  var align = _column.align;
279
397
  // 这里解决一个bug,对于dataSource.slice().reverse() 之后。scu配置的字段并不会更新 render中的index
280
398
  if (_column.shouldCellUpdate) {
@@ -309,6 +427,12 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
309
427
  catch (err) {
310
428
  console.log(err);
311
429
  }
430
+ // 修复当前版本的列配置了fixed和shouldCellUpdate的时候,
431
+ // 会导致td无法固定的问题
432
+ var isRefresh = firstRefresh();
433
+ if (isRefresh && _column.fixed) {
434
+ return true;
435
+ }
312
436
  return fn_1(record, preRecord);
313
437
  };
314
438
  }
@@ -335,6 +459,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
335
459
  currentpage: currentPage,
336
460
  rowKey: rowKey,
337
461
  expandableChildrenColumnName: expandableChildrenColumnName,
462
+ isModalInput: isModalInput,
338
463
  });
339
464
  } });
340
465
  // 兼容下拉框滚动行为
@@ -361,7 +486,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
361
486
  display: 'block',
362
487
  width: '100%',
363
488
  textAlign: _column.align,
364
- } }, "\u590D\u5236\u6574\u5217")));
489
+ } }, i18next.t('复制整列'))));
365
490
  }
366
491
  // 如果配置了固定列的 不做处理
367
492
  // if (!col.fixed) {
@@ -392,10 +517,47 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
392
517
  React.createElement("i", { className: "zt-column--required" }, "*"),
393
518
  _column.title));
394
519
  }
520
+ // 多级表头:递归过滤分组内隐藏的子列(浅拷贝处理,避免污染原始 columns)
521
+ // 注意:联合类型(普通列/分组列)下 children 需以 any 访问
522
+ var _columnChildren = _column.children;
523
+ if (Array.isArray(_columnChildren) && _columnChildren.length > 0) {
524
+ var filterHiddenChildren_1 = function (children) {
525
+ var result = [];
526
+ children.forEach(function (child) {
527
+ if (child.hideColumn) {
528
+ return;
529
+ }
530
+ if (Array.isArray(child.children) && child.children.length > 0) {
531
+ var subChildren = filterHiddenChildren_1(child.children);
532
+ if (subChildren.length > 0) {
533
+ result.push(__assign(__assign({}, child), { children: subChildren }));
534
+ }
535
+ return;
536
+ }
537
+ result.push(__assign({}, child));
538
+ });
539
+ return result;
540
+ };
541
+ var newChildren = filterHiddenChildren_1(_columnChildren);
542
+ if (newChildren.length === 0) {
543
+ // 分组内子列全部隐藏时,整个分组列隐藏
544
+ _column.hideColumn = true;
545
+ }
546
+ else {
547
+ _column = __assign(__assign({}, _column), { children: newChildren });
548
+ }
549
+ }
395
550
  // 去掉不显示表头的项
396
551
  if (!_column.hideColumn) {
397
552
  _newColumns.push(_column);
398
553
  }
554
+ // if (tableNumberFormatter?.(columnTitle, dataIndex, _column)) {
555
+ // _column.align = 'right';
556
+ // }
557
+ // 添加render字段
558
+ appendRender(_column, {
559
+ columnTitle: columnTitle,
560
+ });
399
561
  // 添加render字段
400
562
  if (!_column.render) {
401
563
  _column.render = function (text, record, index) {
@@ -415,12 +577,15 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
415
577
  }
416
578
  // 添加过滤规则
417
579
  var filterKey = _column.key || _column.dataIndex;
418
- if (_column.isFilter === true &&
419
- typeof filterKey === 'string' &&
420
- !onEditableSave) {
580
+ var needFilter = _column.isFilter === false
581
+ ? false
582
+ : isFilter === false
583
+ ? false
584
+ : isTableFilterEnabled || _column.isFilter === true || isFilter;
585
+ if (needFilter && typeof filterKey === 'string' && !onEditableSave) {
421
586
  _column.filterDropdown = function (_a) {
422
587
  var setSelectedKeys = _a.setSelectedKeys, selectedKeys = _a.selectedKeys, confirm = _a.confirm, clearFilters = _a.clearFilters;
423
- return (React.createElement(FilterDropdown, { searchInputRef: searchInput, setSelectedKeys: setSelectedKeys, selectedKeys: selectedKeys, confirm: confirm, clearFilters: clearFilters, dataIndex: filterKey, handleSearch: handleSearch, handleReset: handleReset, dataSourceRef: dataSourceRef }));
588
+ return (React.createElement(FilterDropdown, { searchInputRef: searchInput, setSelectedKeys: setSelectedKeys, selectedKeys: selectedKeys, confirm: confirm, column: _column, clearFilters: clearFilters, dataIndex: filterKey, handleSearch: handleSearch, handleReset: handleReset, dataSourceRef: dataSourceRef }));
424
589
  };
425
590
  _column.filterIcon = function () { return React.createElement(SearchOutlined, null); };
426
591
  _column.onFilter = function (value, record) {
@@ -428,7 +593,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
428
593
  for (var _i = 2; _i < arguments.length; _i++) {
429
594
  arg[_i - 2] = arguments[_i];
430
595
  }
431
- return filterHandle(value, record, filterKey);
596
+ return filterHandle(value, record, filterKey, _column);
432
597
  };
433
598
  _column.onFilterDropdownVisibleChange = function (visible) {
434
599
  if (visible) {
@@ -438,9 +603,12 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
438
603
  }
439
604
  // 2023-05-04 添加排序功能 如果是必填字段 不做处理
440
605
  var key = col.dataIndex;
606
+ // 该列最终是否渲染了排序图标(用于按全局配置追加列宽)
607
+ var hasSortTitle = false;
441
608
  if (typeof key === 'string' && !onEditableSave && !_column.required) {
442
609
  // 如果用户传入了排序字段,那么说明该列需要排序
443
610
  if (_column.sorter === true) {
611
+ hasSortTitle = true;
444
612
  var title_3 = _column.title;
445
613
  _column.title = function () {
446
614
  return (React.createElement(TableSortTitle, { title: title_3, field: key, customOrder: customOrder, setCustomOrder: setCustomOrder, onChange: customSortHandle, align: align }));
@@ -449,6 +617,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
449
617
  }
450
618
  // 如果传入得排序函数
451
619
  if (typeof _column.sorter === 'function') {
620
+ hasSortTitle = true;
452
621
  var title_4 = _column.title;
453
622
  var sorterHandle_1 = _column.sorter;
454
623
  _column.title = function () {
@@ -459,13 +628,32 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
459
628
  _column.sorter = false;
460
629
  }
461
630
  // 纯粹的前端排序
462
- if (_column.sorter == null && isSort) {
631
+ var needSort = isSort === false ? false : isSort || isTableSortEnabled;
632
+ if (_column.sorter == null && needSort) {
633
+ hasSortTitle = true;
463
634
  var title_5 = _column.title;
464
635
  _column.title = function () {
465
636
  return (React.createElement(TableSortTitle, { title: title_5, field: key, customOrder: customOrder, setCustomOrder: setCustomOrder, onChange: customSortHandle, align: align }));
466
637
  };
467
638
  }
468
639
  }
640
+ // 按全局配置给带排序/过滤的列在配置宽度基础上追加宽度,
641
+ // 避免图标挤压表头文字(仅对配置了数字 width 的叶子列生效;
642
+ // 未配置 width 的列由 antd 自适应,无需追加)
643
+ if (!Array.isArray(_column.children) &&
644
+ typeof _column.width === 'number' &&
645
+ (hasSortTitle || needFilter)) {
646
+ var extraWidth = 0;
647
+ if (hasSortTitle && sortColumnExtraWidth) {
648
+ extraWidth += sortColumnExtraWidth;
649
+ }
650
+ if (needFilter && filterColumnExtraWidth) {
651
+ extraWidth += filterColumnExtraWidth;
652
+ }
653
+ if (extraWidth > 0) {
654
+ _column.width = _column.width + extraWidth;
655
+ }
656
+ }
469
657
  });
470
658
  if (showColumnDynamic) {
471
659
  // 如果需要展示动态列
@@ -508,12 +696,179 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
508
696
  _newColumns: _newColumns,
509
697
  _dynamicColumns: _dynamicColumns,
510
698
  };
699
+ function appendRender(_column, option) {
700
+ var _a = option || {}, columnTitle = _a.columnTitle, getPrecision = _a.getPrecision;
701
+ if (!_column.render) {
702
+ if (_column.children) {
703
+ _column.children.forEach(function (item) {
704
+ appendRender(item, { getPrecision: getPrecision });
705
+ });
706
+ }
707
+ else {
708
+ _column.render = returnRender(_column);
709
+ }
710
+ }
711
+ else {
712
+ // 如果有自定义render 代理一下
713
+ // 1. 如果返回的是数字形,那么返回千分符
714
+ var selfRender_1 = _column.render;
715
+ if (_column.children) {
716
+ _column.children.forEach(function (item) {
717
+ appendRender(item, { getPrecision: getPrecision });
718
+ });
719
+ }
720
+ else {
721
+ _column.render = function (text, record, index) {
722
+ var percisionResult = getPrecision ? getPrecision === null || getPrecision === void 0 ? void 0 : getPrecision(record) : null;
723
+ var renderOption = {};
724
+ if (percisionResult) {
725
+ renderOption.precision = percisionResult;
726
+ }
727
+ var selfResult = selfRender_1(text, record, index, renderOption);
728
+ try {
729
+ // 如果命中了自定义显示字段,并且命中了是数字
730
+ var dataIndex = _column.dataIndex || _column.key;
731
+ var title = columnTitle !== null && columnTitle !== void 0 ? columnTitle : _column.title;
732
+ if (isCustomDecimalField === null || isCustomDecimalField === void 0 ? void 0 : isCustomDecimalField(dataIndex, __assign(__assign({}, _column), { title: title }))) {
733
+ // 去掉千分符 还是数字的话
734
+ var newValue = typeof selfResult === 'string'
735
+ ? selfResult.replace(/,/g, '')
736
+ : selfResult;
737
+ if (isNumber(newValue) && isNumber(text)) {
738
+ selfResult = customDecimalFieldRender === null || customDecimalFieldRender === void 0 ? void 0 : customDecimalFieldRender(text, record, index);
739
+ }
740
+ }
741
+ if (!(tableNumberFormatter === null || tableNumberFormatter === void 0 ? void 0 : tableNumberFormatter(title, dataIndex, _column))) {
742
+ return selfResult;
743
+ }
744
+ if (typeof selfResult === 'string' ||
745
+ typeof selfResult === 'number') {
746
+ return renderText(selfResult);
747
+ }
748
+ if (typeof selfResult === 'object' && selfResult.children) {
749
+ console.log('命中逻辑');
750
+ return __assign(__assign({}, selfResult), { children: renderText(selfResult.children) });
751
+ }
752
+ // if (isPercentage(selfResult) && isNumberInputAlignRight) {
753
+ // return <div style={{ textAlign: 'right' }}>{selfResult}</div>;
754
+ // }
755
+ // // 去掉千分符 还是数字的话
756
+ // const newValue =
757
+ // typeof selfResult === 'string'
758
+ // ? selfResult.replace(/,/g, '')
759
+ // : selfResult;
760
+ // if (isNumber(newValue)) {
761
+ // return getResultCom(newValue);
762
+ // }
763
+ }
764
+ catch (err) {
765
+ console.log(err);
766
+ }
767
+ return selfResult;
768
+ };
769
+ }
770
+ }
771
+ function getResultCom(val) {
772
+ var valResult = isNumberInputThousandth ? toThousand(val) : val;
773
+ return isNumberInputAlignRight ? (React.createElement("div", { style: { textAlign: 'right' } }, valResult)) : (valResult);
774
+ }
775
+ function renderText(selfResult) {
776
+ if (isPercentage(selfResult) && isNumberInputAlignRight) {
777
+ return React.createElement("div", { style: { textAlign: 'right' } }, selfResult);
778
+ }
779
+ // 去掉千分符 还是数字的话
780
+ var newValue = typeof selfResult === 'string'
781
+ ? selfResult.replace(/,/g, '')
782
+ : selfResult;
783
+ if (isNumber(newValue)) {
784
+ return getResultCom(newValue);
785
+ }
786
+ return selfResult;
787
+ }
788
+ // 20250623 如果text返回的是数字形数据,那么转成带千分符的值
789
+ function isNumber(val) {
790
+ if (val == null) {
791
+ return false;
792
+ }
793
+ if (typeof val === 'number') {
794
+ return true;
795
+ }
796
+ var toNum = Number(val);
797
+ if (!isNaN(toNum)) {
798
+ return true;
799
+ }
800
+ return false;
801
+ }
802
+ // 如果是百分比的数字,需要靠右显示
803
+ function isPercentage(str) {
804
+ // 匹配以数字(整数或小数)开头,以%结尾的字符串
805
+ try {
806
+ return /^-?\d+(\.\d+)?%$/.test(str);
807
+ }
808
+ catch (err) {
809
+ return false;
810
+ }
811
+ }
812
+ function returnRender(_column) {
813
+ return function (text, record, index) {
814
+ var _a, _b;
815
+ var percisionResult = getPrecision ? getPrecision === null || getPrecision === void 0 ? void 0 : getPrecision(record) : null;
816
+ var value = text;
817
+ if (text == null || text === '') {
818
+ return '— —';
819
+ }
820
+ else if (_column.dateFormat) {
821
+ return dayjs(text).format(_column.dateFormat);
822
+ }
823
+ if (percisionResult) {
824
+ value = exactRound(text, percisionResult);
825
+ }
826
+ else if (_column.precision) {
827
+ value = exactRound(text, _column.precision);
828
+ }
829
+ if (_column.thousand) {
830
+ value = toThousand(value);
831
+ }
832
+ try {
833
+ // 如果命中了自定义显示字段,并且命中了是数字
834
+ var dataIndex = _column.dataIndex || _column.key;
835
+ var title = columnTitle !== null && columnTitle !== void 0 ? columnTitle : _column.title;
836
+ if (isCustomDecimalField === null || isCustomDecimalField === void 0 ? void 0 : isCustomDecimalField(dataIndex, __assign(__assign({}, _column), { title: title }))) {
837
+ // 去掉千分符 还是数字的话
838
+ var newValue_1 = typeof value === 'string' ? (_a = value === null || value === void 0 ? void 0 : value.replace) === null || _a === void 0 ? void 0 : _a.call(value, /,/g, '') : value;
839
+ if (isNumber(newValue_1) && isNumber(text)) {
840
+ return (tableNumberFormatter === null || tableNumberFormatter === void 0 ? void 0 : tableNumberFormatter(title, dataIndex, _column))
841
+ ? getResultCom(customDecimalFieldRender === null || customDecimalFieldRender === void 0 ? void 0 : customDecimalFieldRender(text, record, index))
842
+ : customDecimalFieldRender === null || customDecimalFieldRender === void 0 ? void 0 : customDecimalFieldRender(text, record, index);
843
+ }
844
+ }
845
+ if (!(tableNumberFormatter === null || tableNumberFormatter === void 0 ? void 0 : tableNumberFormatter(title, dataIndex, _column))) {
846
+ return value;
847
+ }
848
+ if (isPercentage(value) && isNumberInputAlignRight) {
849
+ return React.createElement("div", { style: { textAlign: 'right' } }, value);
850
+ }
851
+ // 去掉千分符 还是数字的话
852
+ var newValue = typeof value === 'string' ? (_b = value === null || value === void 0 ? void 0 : value.replace) === null || _b === void 0 ? void 0 : _b.call(value, /,/g, '') : value;
853
+ if (isNumber(newValue)) {
854
+ return getResultCom(newValue);
855
+ }
856
+ }
857
+ catch (err) {
858
+ console.log(err);
859
+ }
860
+ return value;
861
+ };
862
+ }
863
+ }
511
864
  }
512
865
  function useColumns(props) {
513
- var columns = props.columns, hiddenColumnDynamicIcon = props.hiddenColumnDynamicIcon, showColumnDynamic = props.showColumnDynamic, showColumnDynamicKey = props.showColumnDynamicKey, onAddAndDelHandle = props.onAddAndDelHandle, hideAddIcon = props.hideAddIcon, showDelAllBtn = props.showDelAllBtn, delAllChange = props.delAllChange, addIconText = props.addIconText, hideDelIcon = props.hideDelIcon, delIconText = props.delIconText, showDynamicHandle = props.showDynamicHandle, onEditableSave = props.onEditableSave, configInfo = props.configInfo, copyByKey = props.copyByKey, onTableChange = props.onTableChange, currentPage = props.currentPage, currentDataSource = props.currentDataSource, preDataSource = props.preDataSource, rowKey = props.rowKey, dataSourceRef = props.dataSourceRef, expandableChildrenColumnName = props.expandableChildrenColumnName, customSortHandle = props.customSortHandle, customOrder = props.customOrder, setCustomOrder = props.setCustomOrder, isSort = props.isSort, onFillDownChangeRef = props.onFillDownChangeRef;
866
+ var columns = props.columns, hiddenColumnDynamicIcon = props.hiddenColumnDynamicIcon, showColumnDynamic = props.showColumnDynamic, showColumnDynamicKey = props.showColumnDynamicKey, onAddAndDelHandle = props.onAddAndDelHandle, hideAddIcon = props.hideAddIcon, showDelAllBtn = props.showDelAllBtn, delAllChange = props.delAllChange, addIconText = props.addIconText, hideDelIcon = props.hideDelIcon, delIconText = props.delIconText, showDynamicHandle = props.showDynamicHandle, onEditableSave = props.onEditableSave, configInfo = props.configInfo, copyByKey = props.copyByKey, onTableChange = props.onTableChange, currentPage = props.currentPage, currentDataSource = props.currentDataSource, preDataSource = props.preDataSource, rowKey = props.rowKey, dataSourceRef = props.dataSourceRef, expandableChildrenColumnName = props.expandableChildrenColumnName, customSortHandle = props.customSortHandle, customOrder = props.customOrder, setCustomOrder = props.setCustomOrder, isSort = props.isSort, isFilter = props.isFilter, onFillDownChangeRef = props.onFillDownChangeRef, isModalInput = props.isModalInput, isNumberInputThousandth = props.isNumberInputThousandth, isNumberInputAlignRight = props.isNumberInputAlignRight, autoDecimalFieldsRef = props.autoDecimalFieldsRef;
867
+ var _a = useBaseContext(), tableNumberFormatter = _a.tableNumberFormatter, isCustomDecimalField = _a.isCustomDecimalField, customDecimalFieldRender = _a.customDecimalFieldRender, isTableSortEnabled = _a.isTableSortEnabled, isTableFilterEnabled = _a.isTableFilterEnabled, sortColumnExtraWidth = _a.sortColumnExtraWidth, filterColumnExtraWidth = _a.filterColumnExtraWidth;
868
+ var firstRefresh = useRefreshScuCellFirst().firstRefresh;
514
869
  var newColumnsRef = useRef();
515
- var _a = useAsyncSetValue(columns), upDateColumnsRef = _a[0], setUpDateColumnsRef = _a[1];
516
- var _b = useAsyncSetValue(false), isUpDateColumnsRef = _b[0], setIsUpDateColumnsRef = _b[1];
870
+ var _b = useAsyncSetValue(columns), upDateColumnsRef = _b[0], setUpDateColumnsRef = _b[1];
871
+ var _c = useAsyncSetValue(false), isUpDateColumnsRef = _c[0], setIsUpDateColumnsRef = _c[1];
517
872
  var searchInput = useRef(null);
518
873
  var handleSearch = function (selectedKeys, confirm, dataIndex) {
519
874
  confirm();
@@ -527,7 +882,7 @@ function useColumns(props) {
527
882
  }, [showDynamicHandle, hiddenColumnDynamicIcon]);
528
883
  // 动态列配置显隐
529
884
  var DelAllCom = useCallback(function () {
530
- return showDelAllBtn ? (React.createElement(Popconfirm, { title: "\u662F\u5426\u5168\u90E8\u5220\u9664", onConfirm: function () { return delAllChange && delAllChange(); } },
885
+ return showDelAllBtn ? (React.createElement(Popconfirm, { title: i18next.t('是否全部删除'), onConfirm: function () { return delAllChange && delAllChange(); } },
531
886
  React.createElement(MinusSquareOutlined, { className: "zt-column--daynamic-icon", style: { marginLeft: '4px' } }))) : null;
532
887
  }, [delAllChange, showDelAllBtn]);
533
888
  // 增减行回调
@@ -578,9 +933,22 @@ function useColumns(props) {
578
933
  customOrder: customOrder,
579
934
  setCustomOrder: setCustomOrder,
580
935
  isSort: isSort,
936
+ isFilter: isFilter,
581
937
  handleSearch: handleSearch,
582
938
  handleReset: handleReset,
583
939
  searchInput: searchInput,
940
+ isModalInput: isModalInput,
941
+ tableNumberFormatter: tableNumberFormatter,
942
+ isNumberInputThousandth: isNumberInputThousandth,
943
+ isNumberInputAlignRight: isNumberInputAlignRight,
944
+ autoDecimalFieldsRef: autoDecimalFieldsRef,
945
+ isCustomDecimalField: isCustomDecimalField,
946
+ customDecimalFieldRender: customDecimalFieldRender,
947
+ isTableSortEnabled: isTableSortEnabled,
948
+ isTableFilterEnabled: isTableFilterEnabled,
949
+ sortColumnExtraWidth: sortColumnExtraWidth,
950
+ filterColumnExtraWidth: filterColumnExtraWidth,
951
+ firstRefresh: firstRefresh,
584
952
  });
585
953
  }, [
586
954
  showColumnDynamic,
@@ -611,10 +979,16 @@ function useColumns(props) {
611
979
  isUpDateColumnsRef,
612
980
  setIsUpDateColumnsRef,
613
981
  isSort,
982
+ isFilter,
614
983
  onFillDownChangeRef,
984
+ isModalInput,
985
+ tableNumberFormatter,
986
+ isNumberInputThousandth,
987
+ isNumberInputAlignRight,
988
+ firstRefresh,
615
989
  ]);
616
- var _c = useState(false), refreshColumns = _c[0], setRefreshColumns = _c[1];
617
- var _d = useState([]), myCatchColumns = _d[0], setMyCatchColumns = _d[1];
990
+ var _d = useState(false), refreshColumns = _d[0], setRefreshColumns = _d[1];
991
+ var _e = useState([]), myCatchColumns = _e[0], setMyCatchColumns = _e[1];
618
992
  var refreshColumnsHandle = useCallback(function (columns) {
619
993
  unstable_batchedUpdates(function () {
620
994
  setRefreshColumns(function (refresh) { return !refresh; });
@@ -1,3 +1,4 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
1
2
  import { useRef } from 'react';
2
3
  import { useDrag, useDrop } from 'react-dnd';
3
4
  import { tableDragRowType } from '../constants';
@@ -31,7 +32,7 @@ function useDropRef(index, moverow) {
31
32
  },
32
33
  drop: function (item) {
33
34
  if (!moverow) {
34
- throw new Error('请定义移动行后触发的函数 onMoveRow');
35
+ throw new Error(i18next.t('请定义移动行后触发的函数 onMoveRow'));
35
36
  }
36
37
  moverow(item.index, index);
37
38
  },
@@ -0,0 +1,3 @@
1
+ export declare function useRefreshScuCellFirst(): {
2
+ firstRefresh: () => boolean;
3
+ };
@@ -0,0 +1,22 @@
1
+ import { useCallback, useRef } from 'react';
2
+ // 首次渲染时,需要刷新一次
3
+ export function useRefreshScuCellFirst() {
4
+ var timeOutRef = useRef(null);
5
+ var tableSCURefreshRef = useRef(true);
6
+ var firstRefresh = useCallback(function () {
7
+ if (tableSCURefreshRef.current) {
8
+ if (timeOutRef.current) {
9
+ clearTimeout(timeOutRef.current);
10
+ timeOutRef.current = null;
11
+ }
12
+ timeOutRef.current = setTimeout(function () {
13
+ tableSCURefreshRef.current = false;
14
+ });
15
+ return true;
16
+ }
17
+ return false;
18
+ }, []);
19
+ return {
20
+ firstRefresh: firstRefresh,
21
+ };
22
+ }
@@ -1,3 +1,4 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
1
2
  import { useRef, useEffect } from 'react';
2
3
  import { domFind } from '../utils/dom';
3
4
  import { plus } from 'number-precision';
@@ -47,7 +48,10 @@ export default function useSelectSubtotal(tableRef, props) {
47
48
  var rect = e.target.getBoundingClientRect();
48
49
  $tip.style.top = rect.top - contaienrRect.top + rect.height + "px";
49
50
  $tip.style.left = rect.left - contaienrRect.left + rect.width + "px";
50
- $tip.innerText = "\u5C0F\u8BA1\uFF1A " + result + " \n \u5DF2\u9009\uFF1A" + textArr.length + "\u9879";
51
+ $tip.innerText = i18next.t('小计: {{result}} 已选:{{slot0}}项', {
52
+ result: result,
53
+ slot0: textArr.length,
54
+ });
51
55
  }
52
56
  }
53
57
  // 是否按下ctrl键