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
@@ -3,7 +3,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
3
3
  to[j] = from[i];
4
4
  return to;
5
5
  };
6
+ import i18next from 'ztxkutils/dist/i18next';
6
7
  import { plus, round } from 'number-precision';
8
+ import { toThousand } from 'ztxkutils/dist/tools';
7
9
  /**
8
10
  * @description 获取总结栏数据
9
11
  * @param summaryConfig 总结栏配置
@@ -13,9 +15,18 @@ import { plus, round } from 'number-precision';
13
15
  * @param isSubtotal 是否是内部使用的小计(这个)
14
16
  * @returns any[]
15
17
  */
16
- function getSummaryData(summaryConfig, pageData, columns, _a) {
18
+ function getSummaryData(summaryConfig, pageData, columns, _a, option) {
17
19
  var hasRowSelection = _a.hasRowSelection, hasExpandable = _a.hasExpandable;
18
20
  var _summaryData = [];
21
+ var _b = option || {}, getDecimalFields = _b.getDecimalFields, getAutoDecimalFields = _b.getAutoDecimalFields;
22
+ var decimalFields = null;
23
+ var autoDecimalFields = null;
24
+ if (getDecimalFields) {
25
+ decimalFields = getDecimalFields();
26
+ }
27
+ if (getAutoDecimalFields) {
28
+ autoDecimalFields = getAutoDecimalFields();
29
+ }
19
30
  if (Array.isArray(summaryConfig)) {
20
31
  summaryConfig.forEach(function (summary) {
21
32
  var type = summary.type, fields = summary.fields, title = summary.title, onClickHandle = summary.onClickHandle;
@@ -29,7 +40,10 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
29
40
  return;
30
41
  }
31
42
  // 拿到统计数据
32
- var subtotalObj_1 = getSubtotalObj(fields, pageData);
43
+ var subtotalObj_1 = getSubtotalObj(fields, pageData, {
44
+ decimalFields: decimalFields,
45
+ autoDecimalFields: autoDecimalFields,
46
+ });
33
47
  // 得到小计行数据
34
48
  // const subtotalResult = columns.map((col: any) =>
35
49
  // col.key || col.dataIndex
@@ -65,6 +79,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
65
79
  columnResult_1.push({
66
80
  key: col === null || col === void 0 ? void 0 : col.key,
67
81
  dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
82
+ align: col === null || col === void 0 ? void 0 : col.align,
68
83
  });
69
84
  });
70
85
  }
@@ -72,11 +87,12 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
72
87
  columnResult_1.push({
73
88
  key: col === null || col === void 0 ? void 0 : col.key,
74
89
  dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
90
+ align: col === null || col === void 0 ? void 0 : col.align,
75
91
  });
76
92
  }
77
93
  });
78
94
  _summaryData.push({
79
- title: title || '小计',
95
+ title: title || i18next.t('小计'),
80
96
  titleIndex: 0 + (hasRowSelection ? 1 : 0) + (hasExpandable ? 1 : 0),
81
97
  key: 'subtotal',
82
98
  list: hasRowSelection && hasExpandable
@@ -97,7 +113,10 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
97
113
  if (fields.length === 0) {
98
114
  return;
99
115
  }
100
- var totalObj_1 = getTotalObj(fields);
116
+ var totalObj_1 = getTotalObj(fields, {
117
+ decimalFields: decimalFields,
118
+ autoDecimalFields: autoDecimalFields,
119
+ });
101
120
  // 得到小计行数据
102
121
  // const totalResult = columns.map((col: any) =>
103
122
  // col.key || col.dataIndex
@@ -133,6 +152,7 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
133
152
  columnResult_2.push({
134
153
  key: col === null || col === void 0 ? void 0 : col.key,
135
154
  dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
155
+ align: col === null || col === void 0 ? void 0 : col.align,
136
156
  });
137
157
  });
138
158
  }
@@ -140,11 +160,12 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
140
160
  columnResult_2.push({
141
161
  key: col === null || col === void 0 ? void 0 : col.key,
142
162
  dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
163
+ align: col === null || col === void 0 ? void 0 : col.align,
143
164
  });
144
165
  }
145
166
  });
146
167
  _summaryData.push({
147
- title: title || '总计',
168
+ title: title || i18next.t('总计'),
148
169
  titleIndex: 0 + (hasRowSelection ? 1 : 0) + (hasExpandable ? 1 : 0),
149
170
  key: 'total',
150
171
  list: hasRowSelection && hasExpandable
@@ -164,26 +185,123 @@ function getSummaryData(summaryConfig, pageData, columns, _a) {
164
185
  }
165
186
  return _summaryData;
166
187
  }
188
+ // 辅助函数:获取有效数字的小数位数
189
+ function countDecimals(num) {
190
+ if (num == null) {
191
+ return 0;
192
+ }
193
+ if (num === 0) {
194
+ return 0;
195
+ }
196
+ var str = String(num);
197
+ // 处理科学计数法
198
+ if (str.includes('e') || str.includes('E')) {
199
+ var _a = str.split(/[eE]/), base = _a[0], exponent = _a[1];
200
+ var baseDecimals = base.includes('.') ? base.split('.')[1].length : 0;
201
+ var exp = parseInt(exponent, 10);
202
+ return Math.max(0, baseDecimals - exp);
203
+ }
204
+ // 处理普通数字
205
+ return str.includes('.') ? str.split('.')[1].length : 0;
206
+ }
207
+ function getMaxDecimalPlaces(num1, num2, defaultValue) {
208
+ if (defaultValue === void 0) { defaultValue = 0; }
209
+ // 辅助函数:安全转换为数字并检查有效性
210
+ function safeToNumber(value) {
211
+ var num = Number(value);
212
+ return isNaN(num) || !isFinite(num) ? null : num;
213
+ }
214
+ try {
215
+ // 分别处理两个参数
216
+ var validNum1 = safeToNumber(num1);
217
+ var validNum2 = safeToNumber(num2);
218
+ // 计算每个参数的小数位数(无效时使用默认值的小数位数)
219
+ var decimal1 = validNum1 !== null ? countDecimals(validNum1) : defaultValue;
220
+ var decimal2 = validNum2 !== null ? countDecimals(validNum2) : defaultValue;
221
+ // 计算两个有效参数的最大小数位
222
+ var maxDecimals = Math.max(decimal1, decimal2);
223
+ // 如果计算出的最大小数位小于默认值的小数位,则取默认值的小数位
224
+ return Math.max(maxDecimals, defaultValue);
225
+ }
226
+ catch (err) {
227
+ return defaultValue;
228
+ }
229
+ }
230
+ function processNumber(value, defaultPrecision) {
231
+ if (defaultPrecision === void 0) { defaultPrecision = 2; }
232
+ // 检查是否为合法数字
233
+ var num = parseFloat(value);
234
+ if (isNaN(num)) {
235
+ return value; // 非数字值直接返回
236
+ }
237
+ // 处理整数情况
238
+ if (Number.isInteger(num)) {
239
+ return num.toFixed(defaultPrecision);
240
+ }
241
+ // 处理小数情况
242
+ var numStr = num.toString();
243
+ var precision = 0;
244
+ // 处理科学计数法
245
+ if (numStr.includes('e')) {
246
+ var _a = numStr.split('e'), exp = _a[1];
247
+ var exponent = parseInt(exp);
248
+ if (exponent < 0) {
249
+ precision = Math.abs(exponent);
250
+ }
251
+ }
252
+ else if (numStr.includes('.')) {
253
+ // 普通小数获取小数位数
254
+ precision = numStr.split('.')[1].length;
255
+ }
256
+ // 应用默认小数位逻辑
257
+ if (precision < defaultPrecision) {
258
+ return num.toFixed(defaultPrecision);
259
+ }
260
+ // 移除末尾多余的0
261
+ return numStr.replace(/0+$/, '').replace(/\.$/, '');
262
+ }
167
263
  /**
168
264
  * @description 获取小计计算对象
169
265
  * 小计需要统计当前表格数据的累加值
170
266
  */
171
- function getSubtotalObj(fields, pageData) {
267
+ function getSubtotalObj(fields, pageData, option) {
268
+ var _a = option || {}, decimalFields = _a.decimalFields, autoDecimalFields = _a.autoDecimalFields;
172
269
  if (!Array.isArray(pageData)) {
173
270
  return null;
174
271
  }
175
272
  var summaryTotalObj = {};
176
273
  pageData.forEach(function (item, index) {
177
274
  fields.forEach(function (field) {
275
+ // 是否按数据中的最高小数位来控制小计的小数位显示
276
+ var isDecimal = false;
178
277
  if (typeof field === 'string') {
278
+ isDecimal = (decimalFields === null || decimalFields === void 0 ? void 0 : decimalFields[field]) || (autoDecimalFields === null || autoDecimalFields === void 0 ? void 0 : autoDecimalFields[field]);
179
279
  var pageItem = (item === null || item === void 0 ? void 0 : item[field]) || 0;
180
280
  var summaryItem = (summaryTotalObj === null || summaryTotalObj === void 0 ? void 0 : summaryTotalObj[field]) || 0;
181
281
  summaryTotalObj[field] = summaryItem
182
282
  ? plus(summaryItem, pageItem)
183
283
  : pageItem;
284
+ if (index === pageData.length - 1) {
285
+ var getData = function (v) {
286
+ if (isDecimal) {
287
+ try {
288
+ if (Array.isArray(v)) {
289
+ return v;
290
+ }
291
+ return toThousand(processNumber(v));
292
+ }
293
+ catch (err) {
294
+ return v;
295
+ }
296
+ }
297
+ return v;
298
+ };
299
+ summaryTotalObj[field] = getData(summaryTotalObj[field]);
300
+ }
184
301
  }
185
302
  else {
186
- var key = field.key, showKey = field.showKey, toFixedNum_1 = field.toFixedNum, value = field.value, fn_1 = field.fn, lastFn = field.lastFn;
303
+ var key = field.key, showKey = field.showKey, toFixedNum_1 = field.toFixedNum, value = field.value, fn_1 = field.fn, lastFn_1 = field.lastFn;
304
+ isDecimal = (decimalFields === null || decimalFields === void 0 ? void 0 : decimalFields[key]) || (autoDecimalFields === null || autoDecimalFields === void 0 ? void 0 : autoDecimalFields[key]);
187
305
  var _pageItem = Number(item === null || item === void 0 ? void 0 : item[key]);
188
306
  var pageItem = typeof _pageItem === 'number' && !isNaN(_pageItem) ? _pageItem : 0;
189
307
  var summaryItem_1 = (summaryTotalObj === null || summaryTotalObj === void 0 ? void 0 : summaryTotalObj[key]) || 0;
@@ -220,15 +338,25 @@ function getSubtotalObj(fields, pageData) {
220
338
  ? _pageItem_1
221
339
  : 0;
222
340
  if (summaryItem_1) {
341
+ var newToFixedNum = isDecimal
342
+ ? typeof toFixedNum_1 === 'number'
343
+ ? getMaxDecimalPlaces(summaryItem_1, pageItem_1, toFixedNum_1)
344
+ : toFixedNum_1
345
+ : toFixedNum_1;
223
346
  summaryTotalObj[key] =
224
347
  typeof toFixedNum_1 === 'number'
225
- ? round(plus(summaryItem_1, pageItem_1), toFixedNum_1).toFixed(toFixedNum_1)
348
+ ? round(plus(summaryItem_1, pageItem_1), newToFixedNum).toFixed(newToFixedNum)
226
349
  : plus(summaryItem_1, pageItem_1);
227
350
  }
228
351
  else {
352
+ var newToFixedNum = isDecimal
353
+ ? typeof toFixedNum_1 === 'number'
354
+ ? getMaxDecimalPlaces('', pageItem_1, toFixedNum_1)
355
+ : toFixedNum_1
356
+ : toFixedNum_1;
229
357
  summaryTotalObj[key] =
230
358
  typeof toFixedNum_1 === 'number'
231
- ? round(pageItem_1, toFixedNum_1).toFixed(toFixedNum_1)
359
+ ? round(pageItem_1, newToFixedNum).toFixed(newToFixedNum)
232
360
  : pageItem_1;
233
361
  }
234
362
  }
@@ -244,13 +372,23 @@ function getSubtotalObj(fields, pageData) {
244
372
  : toFixedNum_1;
245
373
  if (summaryItem_1) {
246
374
  var _summaryItem = summaryItem_1[index];
375
+ var _newToFixedNum = isDecimal
376
+ ? typeof _toFixedNum === 'number'
377
+ ? getMaxDecimalPlaces(_summaryItem, pageItem, _toFixedNum)
378
+ : _toFixedNum
379
+ : _toFixedNum;
247
380
  return typeof _toFixedNum === 'number'
248
- ? round(plus(_summaryItem, pageItem), _toFixedNum).toFixed(_toFixedNum)
381
+ ? round(plus(_summaryItem, pageItem), _newToFixedNum).toFixed(_newToFixedNum)
249
382
  : plus(_summaryItem, pageItem);
250
383
  }
251
384
  else {
385
+ var _newToFixedNum = isDecimal
386
+ ? typeof _toFixedNum === 'number'
387
+ ? getMaxDecimalPlaces('', pageItem, _toFixedNum)
388
+ : _toFixedNum
389
+ : _toFixedNum;
252
390
  return typeof _toFixedNum === 'number'
253
- ? round(pageItem, _toFixedNum).toFixed(_toFixedNum)
391
+ ? round(pageItem, _newToFixedNum).toFixed(_newToFixedNum)
254
392
  : pageItem;
255
393
  }
256
394
  });
@@ -258,26 +396,78 @@ function getSubtotalObj(fields, pageData) {
258
396
  }
259
397
  else {
260
398
  if (summaryItem_1) {
399
+ var _newToFixedNum = isDecimal
400
+ ? typeof toFixedNum_1 === 'number'
401
+ ? getMaxDecimalPlaces(summaryItem_1, pageItem, toFixedNum_1)
402
+ : toFixedNum_1
403
+ : toFixedNum_1;
261
404
  summaryTotalObj[key] =
262
405
  typeof toFixedNum_1 === 'number'
263
- ? round(plus(summaryItem_1, pageItem), toFixedNum_1).toFixed(toFixedNum_1)
406
+ ? round(plus(summaryItem_1, pageItem), _newToFixedNum).toFixed(_newToFixedNum)
264
407
  : plus(summaryItem_1, pageItem);
265
408
  }
266
409
  else {
410
+ var _newToFixedNum = isDecimal
411
+ ? typeof toFixedNum_1 === 'number'
412
+ ? getMaxDecimalPlaces('', pageItem, toFixedNum_1)
413
+ : toFixedNum_1
414
+ : toFixedNum_1;
267
415
  summaryTotalObj[key] =
268
416
  typeof toFixedNum_1 === 'number'
269
- ? round(pageItem, toFixedNum_1).toFixed(toFixedNum_1)
417
+ ? round(pageItem, _newToFixedNum).toFixed(_newToFixedNum)
270
418
  : pageItem;
271
419
  }
272
420
  }
273
421
  }
274
422
  if (fn_1 && index === pageData.length - 1) {
423
+ var getData_1 = function (v) {
424
+ if (isDecimal) {
425
+ try {
426
+ return toThousand(v);
427
+ }
428
+ catch (err) {
429
+ return fn_1(processNumber(v));
430
+ }
431
+ }
432
+ return fn_1(v);
433
+ };
275
434
  summaryTotalObj[key] = Array.isArray(summaryTotalObj[key])
276
- ? summaryTotalObj[key].map(function (v) { return fn_1(v); })
277
- : fn_1(summaryTotalObj[key]);
435
+ ? summaryTotalObj[key].map(function (v) { return getData_1(v); })
436
+ : getData_1(summaryTotalObj[key]);
278
437
  }
279
- if (lastFn && index === pageData.length - 1) {
280
- summaryTotalObj[key] = lastFn(summaryTotalObj[key]);
438
+ if (lastFn_1 && index === pageData.length - 1) {
439
+ var getData = function (v) {
440
+ if (isDecimal) {
441
+ try {
442
+ if (Array.isArray(v)) {
443
+ return lastFn_1(v);
444
+ }
445
+ return toThousand(processNumber(v));
446
+ }
447
+ catch (err) {
448
+ return lastFn_1(v);
449
+ }
450
+ }
451
+ return lastFn_1(v);
452
+ };
453
+ summaryTotalObj[key] = getData(summaryTotalObj[key]);
454
+ }
455
+ if (!fn_1 && !lastFn_1 && index === pageData.length - 1) {
456
+ var getData = function (v) {
457
+ if (isDecimal) {
458
+ try {
459
+ if (Array.isArray(v)) {
460
+ return v;
461
+ }
462
+ return toThousand(processNumber(v));
463
+ }
464
+ catch (err) {
465
+ return v;
466
+ }
467
+ }
468
+ return v;
469
+ };
470
+ summaryTotalObj[key] = getData(summaryTotalObj[key]);
281
471
  }
282
472
  }
283
473
  });
@@ -290,20 +480,33 @@ function getSubtotalObj(fields, pageData) {
290
480
  * 但是为了考虑多种情况,而且表格数据的遍历耗时可能并不明显,所以也用这个通用方法即可
291
481
  * 如果后续需要改进,把总计的代码额外抽离出来即可
292
482
  */
293
- function getTotalObj(fields) {
483
+ function getTotalObj(fields, option) {
484
+ var _a = option || {}, decimalFields = _a.decimalFields, autoDecimalFields = _a.autoDecimalFields;
294
485
  var summaryTotalObj = {};
295
486
  fields.forEach(function (field) {
487
+ // 是否按数据中的最高小数位来控制小计的小数位显示
488
+ var isDecimal = false;
296
489
  if (typeof field === 'object') {
297
- var key = field.key, toFixedNum_2 = field.toFixedNum, value = field.value, fn_2 = field.fn, lastFn = field.lastFn;
490
+ var key = field.key, toFixedNum_2 = field.toFixedNum, value = field.value, fn_2 = field.fn, lastFn_2 = field.lastFn;
491
+ if (key) {
492
+ isDecimal = (decimalFields === null || decimalFields === void 0 ? void 0 : decimalFields[key]) || (autoDecimalFields === null || autoDecimalFields === void 0 ? void 0 : autoDecimalFields[key]);
493
+ }
298
494
  if (value != null) {
299
495
  // 如果value是数组 那么也要输出数组
300
496
  if (Array.isArray(value)) {
301
497
  summaryTotalObj[key] = value.map(function (val, index) {
302
498
  var v = val || 0;
499
+ var currentValueFixedNum = countDecimals(val);
500
+ if (currentValueFixedNum > 6) {
501
+ currentValueFixedNum = 6;
502
+ }
303
503
  // 如果传入两个键值 需要小计,那么取对应的值
304
504
  var _toFixedNum = Array.isArray(toFixedNum_2)
305
505
  ? toFixedNum_2[index]
306
506
  : toFixedNum_2;
507
+ _toFixedNum = isDecimal
508
+ ? Math.max(currentValueFixedNum, _toFixedNum)
509
+ : _toFixedNum;
307
510
  if (typeof Number(v) === 'number' &&
308
511
  !isNaN(Number(v)) &&
309
512
  typeof _toFixedNum === 'number') {
@@ -313,21 +516,73 @@ function getTotalObj(fields) {
313
516
  });
314
517
  }
315
518
  else {
519
+ var currentValueFixedNum = countDecimals(value);
520
+ if (currentValueFixedNum > 6) {
521
+ currentValueFixedNum = 6;
522
+ }
523
+ var _toFixedNum = 0;
524
+ if (typeof toFixedNum_2 === 'number') {
525
+ _toFixedNum = isDecimal
526
+ ? Math.max(currentValueFixedNum, toFixedNum_2)
527
+ : toFixedNum_2;
528
+ }
316
529
  summaryTotalObj[key] =
317
530
  typeof toFixedNum_2 === 'number'
318
531
  ? typeof Number(value) === 'number' && !isNaN(Number(value))
319
- ? round(value, toFixedNum_2).toFixed(toFixedNum_2)
532
+ ? round(value, _toFixedNum).toFixed(_toFixedNum)
320
533
  : value
321
534
  : value;
322
535
  }
323
536
  }
324
537
  if (fn_2) {
538
+ var getData_2 = function (v) {
539
+ if (isDecimal) {
540
+ try {
541
+ return toThousand(processNumber(v));
542
+ }
543
+ catch (err) {
544
+ return fn_2(v);
545
+ }
546
+ }
547
+ return fn_2(v);
548
+ };
325
549
  summaryTotalObj[key] = Array.isArray(summaryTotalObj[key])
326
- ? summaryTotalObj[key].map(function (v) { return fn_2(v); })
327
- : fn_2(summaryTotalObj[key]);
550
+ ? summaryTotalObj[key].map(function (v) { return getData_2(v); })
551
+ : getData_2(summaryTotalObj[key]);
328
552
  }
329
- if (lastFn) {
330
- summaryTotalObj[key] = lastFn(summaryTotalObj[key]);
553
+ if (lastFn_2) {
554
+ var getData = function (v) {
555
+ if (isDecimal) {
556
+ try {
557
+ if (Array.isArray(v)) {
558
+ return lastFn_2(v);
559
+ }
560
+ return toThousand(processNumber(v));
561
+ }
562
+ catch (err) {
563
+ return lastFn_2(v);
564
+ }
565
+ }
566
+ return lastFn_2(v);
567
+ };
568
+ summaryTotalObj[key] = getData(summaryTotalObj[key]);
569
+ }
570
+ if (!fn_2 && !lastFn_2) {
571
+ var getData = function (v) {
572
+ if (isDecimal) {
573
+ try {
574
+ if (Array.isArray(v)) {
575
+ return v;
576
+ }
577
+ return toThousand(processNumber(v));
578
+ }
579
+ catch (err) {
580
+ return v;
581
+ }
582
+ }
583
+ return v;
584
+ };
585
+ summaryTotalObj[key] = getData(summaryTotalObj[key]);
331
586
  }
332
587
  }
333
588
  });
@@ -1,3 +1,4 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
1
2
  import isEqual from 'lodash/isEqual';
2
3
  export function is(x, y) {
3
4
  return ((x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
@@ -26,7 +27,7 @@ export function shallowEqual(objA, objB, deepKeys) {
26
27
  return false;
27
28
  }
28
29
  else if (!hasOwnProperty.call(objB, key) || !is(objA[key], objB[key])) {
29
- console.log('因为某个key渲染', key, objA[key], objB[key]);
30
+ console.log(i18next.t('因为某个key渲染'), key, objA[key], objB[key]);
30
31
  return false;
31
32
  }
32
33
  }
@@ -34,6 +34,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
35
  }
36
36
  };
37
+ import i18next from 'ztxkutils/dist/i18next';
37
38
  /**
38
39
  * @author 陈亚雄
39
40
  * @description 表格验证逻辑
@@ -48,11 +49,11 @@ export function tableValidate(dataSource, mergeColumns, restParams, isDataItemVa
48
49
  case 0:
49
50
  getCurrentTable = restParams.getCurrentTable, rowSelection = restParams.rowSelection, tableName = restParams.tableName, expandable = restParams.expandable, showInnerPagination = restParams.showInnerPagination, setCurrent = restParams.setCurrent, pageSize = restParams.pageSize;
50
51
  if (!Array.isArray(dataSource) || dataSource.length === 0) {
51
- console.info('没有数据,无需验证!');
52
+ console.info(i18next.t('没有数据,无需验证!'));
52
53
  return [2 /*return*/];
53
54
  }
54
55
  if (!Array.isArray(mergeColumns)) {
55
- console.info('columns 不是数组!');
56
+ console.info(i18next.t('columns 不是数组!'));
56
57
  return [2 /*return*/];
57
58
  }
58
59
  requiredFileds = [];
@@ -134,7 +135,12 @@ export function tableValidate(dataSource, mergeColumns, restParams, isDataItemVa
134
135
  return [4 /*yield*/, Promise.reject({
135
136
  errorFields: [
136
137
  {
137
- errors: (tableName || '') + " \u7B2C" + (innerCurrentI + 1) + "\u884C " + title + " " + (((_c = validate) === null || _c === void 0 ? void 0 : _c.message) || '填写错误!'),
138
+ errors: i18next.t('{{slot0}} 第{{slot1}}行 {{title}} {{slot2}}', {
139
+ slot0: tableName || '',
140
+ slot1: innerCurrentI + 1,
141
+ title: title,
142
+ slot2: ((_c = validate) === null || _c === void 0 ? void 0 : _c.message) || '填写错误!',
143
+ }),
138
144
  },
139
145
  ],
140
146
  })];
@@ -146,7 +152,12 @@ export function tableValidate(dataSource, mergeColumns, restParams, isDataItemVa
146
152
  return [4 /*yield*/, Promise.reject({
147
153
  errorFields: [
148
154
  {
149
- errors: (tableName || '') + " \u7B2C" + (i + 1) + "\u884C " + title + " " + (((_d = validate) === null || _d === void 0 ? void 0 : _d.message) || '填写错误!'),
155
+ errors: i18next.t('{{slot0}} 第{{slot1}}行 {{title}} {{slot2}}', {
156
+ slot0: tableName || '',
157
+ slot1: i + 1,
158
+ title: title,
159
+ slot2: ((_d = validate) === null || _d === void 0 ? void 0 : _d.message) || '填写错误!',
160
+ }),
150
161
  },
151
162
  ],
152
163
  })];
@@ -164,7 +175,11 @@ export function tableValidate(dataSource, mergeColumns, restParams, isDataItemVa
164
175
  return [4 /*yield*/, Promise.reject({
165
176
  errorFields: [
166
177
  {
167
- errors: (tableName || '') + " \u7B2C" + (innerCurrentI + 1) + "\u884C " + title + " \u4E3A\u7A7A!",
178
+ errors: i18next.t('{{slot0}} 第{{slot1}}行 {{title}} 为空!', {
179
+ slot0: tableName || '',
180
+ slot1: innerCurrentI + 1,
181
+ title: title,
182
+ }),
168
183
  rowIndex: i,
169
184
  colIndex: index,
170
185
  },
@@ -178,7 +193,11 @@ export function tableValidate(dataSource, mergeColumns, restParams, isDataItemVa
178
193
  return [4 /*yield*/, Promise.reject({
179
194
  errorFields: [
180
195
  {
181
- errors: (tableName || '') + " \u7B2C" + (i + 1) + "\u884C " + title + " \u4E3A\u7A7A!",
196
+ errors: i18next.t('{{slot0}} 第{{slot1}}行 {{title}} 为空!', {
197
+ slot0: tableName || '',
198
+ slot1: i + 1,
199
+ title: title,
200
+ }),
182
201
  rowIndex: i,
183
202
  colIndex: index,
184
203
  },
@@ -5,6 +5,8 @@ interface IProps extends TabsProps {
5
5
  isContent?: boolean;
6
6
  marginTop?: boolean;
7
7
  marginBottom?: boolean;
8
+ isFlex?: boolean;
9
+ tabPaneIsRelative?: boolean;
8
10
  }
9
11
  declare function Tabs(props: IProps): JSX.Element;
10
12
  declare namespace Tabs {
@@ -24,12 +24,14 @@ import React from 'react';
24
24
  import { Tabs as AntTabs } from 'antd';
25
25
  import classNames from 'classnames';
26
26
  function Tabs(props) {
27
- var children = props.children, className = props.className, isHeader = props.isHeader, isContent = props.isContent, _a = props.marginTop, marginTop = _a === void 0 ? false : _a, _b = props.marginBottom, marginBottom = _b === void 0 ? true : _b, restProps = __rest(props, ["children", "className", "isHeader", "isContent", "marginTop", "marginBottom"]);
27
+ var children = props.children, className = props.className, isHeader = props.isHeader, isContent = props.isContent, _a = props.marginTop, marginTop = _a === void 0 ? false : _a, _b = props.marginBottom, marginBottom = _b === void 0 ? true : _b, isFlex = props.isFlex, tabPaneIsRelative = props.tabPaneIsRelative, restProps = __rest(props, ["children", "className", "isHeader", "isContent", "marginTop", "marginBottom", "isFlex", "tabPaneIsRelative"]);
28
28
  var classes = classNames('zt-tab', className, {
29
29
  'zt-tab-header': isHeader,
30
30
  'zt-tab-content': isContent,
31
31
  'zt-tab--margin-top': marginTop,
32
32
  'zt-tab--margin-bottom': marginBottom,
33
+ 'zt-tab--flex': isFlex,
34
+ 'zt-tab--tab-pane-relative': tabPaneIsRelative,
33
35
  });
34
36
  return (React.createElement(AntTabs, __assign({ type: isHeader ? 'editable-card' : isContent ? 'card' : undefined, hideAdd: isHeader ? true : undefined, className: classes }, restProps), children));
35
37
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const DownFile: ({ request, tid, fileName }: {
3
+ request: any;
4
+ tid: any;
5
+ fileName: any;
6
+ }) => JSX.Element;
7
+ export default DownFile;