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
@@ -0,0 +1,73 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ /**
3
+ * 附件相关操作 下载 预览 删除
4
+ */
5
+ import React, { memo } from 'react';
6
+ import { Button } from '../../../index';
7
+ import { previewFile, batchPreviewFile, } from 'ztxkutils/dist/fileOperation';
8
+ import { dangerouslySetXss } from 'ztxkutils/dist/tools';
9
+ import { isImage } from '../../utils/upload';
10
+ import FileUpload from './file-upload';
11
+ var FileOperation = function (props) {
12
+ var isDownload = props.isDownload, isPreview = props.isPreview, isEdit = props.isEdit, isWater = props.isWater, records = props.records, isDelete = props.isDelete, fileName = props.fileName, _a = props.fileId, fileId = _a === void 0 ? '' : _a, _b = props.preFileId, preFileId = _b === void 0 ? '' : _b, _c = props.preFileName, preFileName = _c === void 0 ? '' : _c, _d = props.apiBaseUrl, apiBaseUrl = _d === void 0 ? '' : _d, _e = props.fileBaseUrl, fileBaseUrl = _e === void 0 ? '' : _e, onDelete = props.onDelete, onWatermarkChange = props.onWatermarkChange, organizationId = props.organizationId, isReplaceFile = props.isReplaceFile, fileList = props.fileList, onFileReplace = props.onFileReplace, _f = props.showAddWater, showAddWater = _f === void 0 ? true : _f, request = props.request, previewUrl = props.previewUrl, isTranslation = props.isTranslation, record = props.record, realIndex = props.realIndex, setRecords = props.setRecords, isNeedDg = props.isNeedDg, currentDate = props.currentDate, isWorlflowCompleted = props.isWorlflowCompleted;
13
+ var previewBtn = function (attachId, previewTitle, fileName) {
14
+ return (React.createElement(Button, { type: "link", style: {
15
+ whiteSpace: 'normal',
16
+ height: 'auto',
17
+ lineHeight: '20px',
18
+ textAlign: 'left',
19
+ }, onClick: function () {
20
+ // 实现批量预览,只针对图片
21
+ var result = isImage(fileName);
22
+ if (result) {
23
+ var allImage = (Array.isArray(records) ? records : [])
24
+ .filter(function (item) { return isImage(item.attachName) && item.attachId !== attachId; })
25
+ .map(function (item) { return item.attachId; });
26
+ batchPreviewFile(fileBaseUrl, attachId + "," + allImage, {
27
+ titleName: fileName,
28
+ });
29
+ return;
30
+ }
31
+ previewFile(fileBaseUrl, attachId, {
32
+ titleName: dangerouslySetXss(fileName),
33
+ });
34
+ } }, previewTitle));
35
+ };
36
+ function onFileChange(info) {
37
+ onFileReplace && onFileReplace(info, fileId);
38
+ }
39
+ // 是否显示有盖章件
40
+ var isShowSeal = (record === null || record === void 0 ? void 0 : record.isElectronicSeal) + '' === '1';
41
+ // 是否显示重要文件
42
+ var isImportant = (record === null || record === void 0 ? void 0 : record.isImportant) + '' === '1';
43
+ // 是否显示水印
44
+ var isWatermark = (record === null || record === void 0 ? void 0 : record.isWatermark) + '' === '1';
45
+ // 待审核
46
+ var unAudited = (record === null || record === void 0 ? void 0 : record.isOther) + '' === '1';
47
+ // 已审核
48
+ var isAudited = (record === null || record === void 0 ? void 0 : record.isOther) + '' === '2';
49
+ // 是否显示有双签件
50
+ var doubleSignedSealInfoDTOListKey = 'doubleSignedSealInfoDTOList';
51
+ var isShowSign = (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
52
+ Array.isArray(record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
53
+ (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey].length) > 0;
54
+ return (React.createElement("div", { className: "file-operation--wrap" },
55
+ React.createElement("div", { className: "file-operation--title", style: { textAlign: 'left' } }, previewBtn(fileId, fileName || '', fileName)),
56
+ React.createElement("div", { className: "file-operation--date-container" },
57
+ React.createElement("div", null, currentDate),
58
+ React.createElement("div", { className: "file-operation--list" },
59
+ isReplaceFile && (React.createElement(FileUpload, { fileList: fileList, apiBaseUrl: apiBaseUrl, onFileChange: onFileChange, type: "link" }, i18next.t('替换'))),
60
+ isPreview &&
61
+ preFileId &&
62
+ previewBtn(preFileId, i18next.t('上一版'), preFileName))),
63
+ isWorlflowCompleted ? (React.createElement("div", { className: "file-operation--label" },
64
+ isImportant ? React.createElement("span", null, i18next.t('重要')) : null,
65
+ isShowSeal ? React.createElement("span", null, i18next.t('有盖章件')) : null,
66
+ isShowSign ? React.createElement("span", null, i18next.t('有双签件')) : null,
67
+ isWatermark ? React.createElement("span", null, i18next.t('水印')) : null,
68
+ isAudited ? React.createElement("span", null, i18next.t('已审核')) : null,
69
+ unAudited ? React.createElement("span", null, i18next.t('未审核')) : null)) : (React.createElement("div", { className: "file-operation--label" },
70
+ isAudited ? React.createElement("span", null, i18next.t('已审核')) : null,
71
+ unAudited ? React.createElement("span", null, i18next.t('未审核')) : null))));
72
+ };
73
+ export default memo(FileOperation);
@@ -0,0 +1,13 @@
1
+ import { IElectronSignaturesProps, IElectronSignaturesItem } from '../interface';
2
+ interface IOptions {
3
+ request?: IElectronSignaturesProps['request'];
4
+ fileTypeKey?: IElectronSignaturesItem['fileTypeKey'];
5
+ fileTypeFilterList?: IElectronSignaturesItem['fileTypeFilterList'];
6
+ fileTypeList?: IElectronSignaturesItem['fileTypeList'];
7
+ useOutsideFileTypeList?: IElectronSignaturesItem['useOutsideFileTypeList'];
8
+ isAllowedPatchFileType?: IElectronSignaturesItem['isAllowedPatchFileType'];
9
+ }
10
+ export default function useFetchFileTypeData(options: IOptions): {
11
+ fileTypeFetchList: any;
12
+ };
13
+ export {};
@@ -0,0 +1,43 @@
1
+ import { useEffect, useState } from 'react';
2
+ var defaultFileType = [];
3
+ // 获取附件类型
4
+ export default function useFetchFileTypeData(options) {
5
+ var request = options.request, fileTypeKey = options.fileTypeKey, fileTypeFilterList = options.fileTypeFilterList, fileTypeList = options.fileTypeList, useOutsideFileTypeList = options.useOutsideFileTypeList, isAllowedPatchFileType = options.isAllowedPatchFileType;
6
+ var _a = useState(), fileTypeFetchList = _a[0], setFileType = _a[1];
7
+ useEffect(function () {
8
+ if (!isAllowedPatchFileType) {
9
+ return;
10
+ }
11
+ if (useOutsideFileTypeList) {
12
+ setFileType(fileTypeList || defaultFileType);
13
+ }
14
+ }, [fileTypeList, isAllowedPatchFileType, useOutsideFileTypeList]);
15
+ useEffect(function () {
16
+ if (useOutsideFileTypeList) {
17
+ return;
18
+ }
19
+ if (!isAllowedPatchFileType) {
20
+ return;
21
+ }
22
+ var params = {
23
+ code: fileTypeKey || 'scm_attach_type',
24
+ status: 50,
25
+ };
26
+ request === null || request === void 0 ? void 0 : request({
27
+ url: '/api/zmdms-mdm-data/dict-biz/dictionary',
28
+ params: params,
29
+ method: 'GET',
30
+ }).then(function (res) {
31
+ if (res.status === 200 && res.data.code === 200) {
32
+ var result = fileTypeFilterList
33
+ ? (res.data.data || []).filter(function (item) { return !fileTypeFilterList.includes(item.dictValue); })
34
+ : res.data.data;
35
+ setFileType(result);
36
+ }
37
+ });
38
+ // eslint-disable-next-line react-hooks/exhaustive-deps
39
+ }, [useOutsideFileTypeList, isAllowedPatchFileType]);
40
+ return {
41
+ fileTypeFetchList: fileTypeFetchList,
42
+ };
43
+ }
@@ -0,0 +1,38 @@
1
+ import type { ColumnsType } from 'antd/es/table';
2
+ import { ITrackAllData, IFileItem, IElectronSignaturesItemPublic, IFileUploadProps, IElectronSignaturesItem } from '../interface';
3
+ interface IOptions {
4
+ /** 所有数据类型合并之后的数据 */
5
+ records: IFileItem[];
6
+ /** 所有数据类型的排序规则 */
7
+ dataTypeSort: string[];
8
+ /** 所有数据类型的相关操作 */
9
+ allData: ITrackAllData;
10
+ /** 是否显示上传附件按钮 */
11
+ isShowFileUpload?: IElectronSignaturesItemPublic['isShowFileUpload'];
12
+ apiBaseUrl?: IElectronSignaturesItemPublic['apiBaseUrl'];
13
+ fileBaseUrl?: IElectronSignaturesItemPublic['fileBaseUrl'];
14
+ /** 不做这么复杂了 好像实现不了 默认就只有一组 另外一组就是展示模式 */
15
+ firstDataType: string;
16
+ fileUploadProps?: IFileUploadProps;
17
+ onValueChange?: IElectronSignaturesItem['onValueChange'];
18
+ onFileTypeChangeGetItem: any;
19
+ getCreateTimeHand: any;
20
+ isSingleQj?: IElectronSignaturesItemPublic['isSingleQj'];
21
+ justNeedQj?: any;
22
+ setJustNeedQj?: any;
23
+ isShowFileType?: IElectronSignaturesItemPublic['isShowFileType'];
24
+ isDeleteAllFileWhenJustUseQj?: IElectronSignaturesItemPublic['isDeleteAllFileWhenJustUseQj'];
25
+ currentIsEditMemo?: boolean;
26
+ isControlNeedQys?: IElectronSignaturesItemPublic['isControlNeedQys'];
27
+ organizationId?: string;
28
+ onFileReplace: any;
29
+ isToggleQys?: boolean;
30
+ isTranslation?: boolean;
31
+ request?: any;
32
+ previewUrl?: string;
33
+ isNeedDg?: boolean;
34
+ }
35
+ export default function useFileColumns(options: IOptions): {
36
+ fileColumns: ColumnsType<any>;
37
+ };
38
+ export {};
@@ -0,0 +1,329 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import i18next from 'ztxkutils/dist/i18next';
13
+ import React, { useContext } from 'react';
14
+ import { DATA_TYPE_KEY, getColumnMergeProp } from '../hooks/useParseRecords';
15
+ // import FileUpload from './file-upload';
16
+ import FileTypeSelect from './file-type-select';
17
+ import FileOperation from './file-operation';
18
+ import NewFileOperation from './new-file-operation';
19
+ import { Button } from '../../../index';
20
+ import { useMemo } from 'react';
21
+ import { onlyQunjAttachId, currentRecordIsOnlyQunj } from '../utils';
22
+ import dayjs from 'dayjs';
23
+ import { ElectronSignaturesContext } from '..';
24
+ import { isFlowCompleted } from '../utils';
25
+ /**
26
+ * 删除附件后,检查同类型下是否还有勾选了电子印章的附件。
27
+ * 如果被删除的附件勾选了电子印章,且删除后同类型不再有任何勾选电子印章的附件,
28
+ * 则清空共享的电子印章信息(印章列表、合同id、签署位置等)。
29
+ *
30
+ * 群杰印章不在此处处理:
31
+ * - 单附件模式(isSingleQj):群杰数据存在附件 record 上,删除附件即删除数据。
32
+ * - 整体模式(!isSingleQj):所有附件共用群杰信息,只有附件全部删完时才清空
33
+ * (在 copyRecords.length === 0 分支中处理)。
34
+ *
35
+ * 参考 useParseIsNeedElectronData 中 onIsStampElectronChange 的清理模式。
36
+ */
37
+ function clearElectronDataWhenNoSealFile(deletedRecord, remainingRecords, allData, currentDataType, onValueChange) {
38
+ var _a;
39
+ // 被删除的附件没有勾选电子印章,不影响电子印章信息
40
+ if ((deletedRecord === null || deletedRecord === void 0 ? void 0 : deletedRecord.isElectronicSeal) + '' !== '1') {
41
+ return;
42
+ }
43
+ // 同类型下是否还有勾选电子印章的附件
44
+ var hasElectronicSealFile = remainingRecords === null || remainingRecords === void 0 ? void 0 : remainingRecords.some(function (record) { return (record === null || record === void 0 ? void 0 : record.isElectronicSeal) + '' === '1'; });
45
+ if (hasElectronicSealFile) {
46
+ return;
47
+ }
48
+ // 没有任何附件需要盖电子印章了,清空共享的电子印章信息
49
+ var _b = allData[currentDataType] || {}, onClearElectronListData = _b.onClearElectronListData, onClearElectronSetting = _b.onClearElectronSetting;
50
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
51
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
52
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange((_a = {},
53
+ _a[currentDataType] = __assign(__assign({}, clearElectronListData), clearElectronSetting),
54
+ _a));
55
+ }
56
+ // 创建附件的clomuns
57
+ export default function useFileColumns(options) {
58
+ var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, isShowFileUpload = options.isShowFileUpload, apiBaseUrl = options.apiBaseUrl, fileBaseUrl = options.fileBaseUrl, firstDataType = options.firstDataType,
59
+ // fileUploadProps,
60
+ onValueChange = options.onValueChange, onFileTypeChangeGetItem = options.onFileTypeChangeGetItem, getCreateTimeHand = options.getCreateTimeHand, isSingleQj = options.isSingleQj, justNeedQj = options.justNeedQj, setJustNeedQj = options.setJustNeedQj, isShowFileType = options.isShowFileType, currentIsEditMemo = options.currentIsEditMemo, isDeleteAllFileWhenJustUseQj = options.isDeleteAllFileWhenJustUseQj, isControlNeedQys = options.isControlNeedQys, organizationId = options.organizationId, onFileReplace = options.onFileReplace, isToggleQys = options.isToggleQys, previewUrl = options.previewUrl, request = options.request, isTranslation = options.isTranslation, isNeedDg = options.isNeedDg;
61
+ var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
62
+ var _a = allData[firstDataType] || {},
63
+ // records: sameTypeRecords,
64
+ setSameTypeRecords = _a.setRecords, onClearElectronListData = _a.onClearElectronListData, onClearElectronSetting = _a.onClearElectronSetting,
65
+ // parseCurrentUploadFile,
66
+ needQj = _a.needQj, needQys = _a.needQys;
67
+ var defaultOnlyQunjRecords = useMemo(function () {
68
+ var _a;
69
+ return [
70
+ (_a = {
71
+ attachId: onlyQunjAttachId
72
+ },
73
+ _a[DATA_TYPE_KEY] = firstDataType,
74
+ _a),
75
+ ];
76
+ }, [firstDataType]);
77
+ var fileTypeColumn = {
78
+ title: i18next.t('类型'),
79
+ dataIndex: 'attachType',
80
+ key: 'attachType',
81
+ width: 108,
82
+ align: 'center',
83
+ // 固定列宽(scroll.x=max-content 时 width 会被内容撑开)
84
+ onHeaderCell: function () { return ({
85
+ className: 'file-type-col',
86
+ style: { width: 108, minWidth: 108, maxWidth: 108 },
87
+ }); },
88
+ onCell: function () { return ({
89
+ className: 'file-type-col',
90
+ style: { width: 108, minWidth: 108, maxWidth: 108 },
91
+ }); },
92
+ render: function (text, record, index) {
93
+ var currentOnlyQunj = currentRecordIsOnlyQunj(record);
94
+ if (currentOnlyQunj) {
95
+ return null;
96
+ }
97
+ var _a = getColumnMergeProp({
98
+ record: record,
99
+ index: index,
100
+ records: records,
101
+ dataTypeSort: dataTypeSort,
102
+ }), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
103
+ var _b = allData[currentDataType] || {}, fileTypeFetchList = _b.fileTypeFetchList, isEdit = _b.isEdit, isAllowedPatchFileType = _b.isAllowedPatchFileType, setSameTypeRecords = _b.setRecords;
104
+ return isEdit && isAllowedPatchFileType ? (React.createElement(FileTypeSelect, { list: fileTypeFetchList, value: record === null || record === void 0 ? void 0 : record.attachType, onChange: function (value, option, completeData) {
105
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
106
+ var dataTypeIndex = index - preDataTypeRecordsLength;
107
+ setSameTypeRecords(function (preRecords) {
108
+ var _a;
109
+ var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
110
+ var item = copyRecords[dataTypeIndex];
111
+ var newItem = onFileTypeChangeGetItem(__assign(__assign({}, item), (_a = { attachType: completeData === null || completeData === void 0 ? void 0 : completeData.dictKey, attachTypeName: completeData === null || completeData === void 0 ? void 0 : completeData.dictValue }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
112
+ copyRecords.splice(dataTypeIndex, 1, newItem);
113
+ return copyRecords;
114
+ });
115
+ } })) : (record === null || record === void 0 ? void 0 : record.attachTypeName);
116
+ },
117
+ };
118
+ var fileColumns = isNewQys
119
+ ? [
120
+ {
121
+ title: i18next.t('附件名称'),
122
+ dataIndex: 'attachName',
123
+ key: 'attachName',
124
+ width: 220,
125
+ align: 'center',
126
+ render: function (text, record, index) {
127
+ var currentOnlyQunj = currentRecordIsOnlyQunj(record);
128
+ if (currentOnlyQunj) {
129
+ return null;
130
+ }
131
+ var _a = getColumnMergeProp({
132
+ record: record,
133
+ index: index,
134
+ records: records,
135
+ dataTypeSort: dataTypeSort,
136
+ }), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
137
+ var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, sameTypeRecords = _b.records, setSameTypeRecords = _b.setRecords, fileFieldsNameRef = _b.fileFieldsNameRef, flowStatus = _b.flowStatus;
138
+ var _c = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, oldVersionId = _c.oldVersionId, oldVersionName = _c.oldVersionName;
139
+ // 是否添加水印
140
+ var isWater = (record === null || record === void 0 ? void 0 : record.isWatermark) + '' === '1' ? true : false;
141
+ // 是否替换附件
142
+ var isReplaceFile = (record === null || record === void 0 ? void 0 : record.isReplaceFile) + '' === '1' ? true : false;
143
+ var showAddWater = record === null || record === void 0 ? void 0 : record.showAddWater;
144
+ // 流程是否完结
145
+ var isWorlflowCompleted = isFlowCompleted(flowStatus);
146
+ var date = getCreateTimeHand(record);
147
+ // 如果是内部附件 不展示上传时间
148
+ var currentDate = currentRecordIsOnlyQunj(record) ? ('') : date ? (React.createElement(React.Fragment, null,
149
+ dayjs(date).format(i18next.t('YYYY年MM月DD日')),
150
+ React.createElement("span", { style: { marginLeft: '4px' } }, dayjs(date).format('HH:mm:ss')))) : ('');
151
+ return (React.createElement(NewFileOperation, { fileName: text, fileId: record.attachId, preFileId: record === null || record === void 0 ? void 0 : record[oldVersionId || ''], preFileName: record === null || record === void 0 ? void 0 : record[oldVersionName || ''], isDownload: true, isDelete: isEdit && isShowFileUpload, isPreview: true, isEdit: isEdit, isWater: isWater, apiBaseUrl: apiBaseUrl, fileBaseUrl: fileBaseUrl, records: sameTypeRecords, organizationId: organizationId, isReplaceFile: isReplaceFile, showAddWater: showAddWater, isWorlflowCompleted: isWorlflowCompleted, onDelete: function () {
152
+ var _a;
153
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
154
+ var dataTypeIndex = index - preDataTypeRecordsLength;
155
+ var copyRecords = sameTypeRecords === null || sameTypeRecords === void 0 ? void 0 : sameTypeRecords.slice();
156
+ if (Array.isArray(copyRecords)) {
157
+ // 记录被删除的附件,用于判断是否需要清理电子印章信息
158
+ var deletedRecord = copyRecords[dataTypeIndex];
159
+ copyRecords.splice(dataTypeIndex, 1);
160
+ if (copyRecords.length === 0) {
161
+ setSameTypeRecords(defaultOnlyQunjRecords);
162
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
163
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
164
+ // 所有附件删完时,同时清理群杰印章共享数据
165
+ var setQunjChecked = (allData[currentDataType] || {}).setQunjChecked;
166
+ setQunjChecked === null || setQunjChecked === void 0 ? void 0 : setQunjChecked(false);
167
+ onValueChange &&
168
+ onValueChange(__assign(__assign((_a = {}, _a[firstDataType] = {
169
+ fileList: defaultOnlyQunjRecords,
170
+ }, _a), clearElectronListData), clearElectronSetting));
171
+ }
172
+ else {
173
+ setSameTypeRecords(copyRecords);
174
+ // 同类型的附件共用电子印章信息,只有当被删除的附件勾选了电子印章
175
+ // 且删除后同类型下不再有任何勾选电子印章的附件时,才清理电子印章信息
176
+ clearElectronDataWhenNoSealFile(deletedRecord, copyRecords, allData, currentDataType, onValueChange);
177
+ }
178
+ }
179
+ }, onWatermarkChange: function (isChecked) {
180
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
181
+ var dataTypeIndex = index - preDataTypeRecordsLength;
182
+ setSameTypeRecords(function (preRecords) {
183
+ var _a;
184
+ var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
185
+ var item = copyRecords[dataTypeIndex];
186
+ copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isWatermark: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
187
+ return copyRecords;
188
+ });
189
+ }, fileList: records, onFileReplace: onFileReplace, previewUrl: previewUrl, request: request, isTranslation: isTranslation, record: record, setRecords: setSameTypeRecords, realIndex: index, isNeedDg: isNeedDg, currentDate: currentDate }));
190
+ },
191
+ },
192
+ ]
193
+ : // 下面是最初设计的模式
194
+ [
195
+ {
196
+ title: (React.createElement("div", { className: "file-title" },
197
+ React.createElement("div", { className: "file-label" }, i18next.t('附件')),
198
+ React.createElement("div", { className: "file-upload" }, isShowFileUpload && currentIsEditMemo && needQj ? ((isControlNeedQys || needQys) && isToggleQys ? (React.createElement(Button, { type: "link", className: "file-add--isOnlyQunj", onClick: function () {
199
+ var _a, _b, _c;
200
+ setJustNeedQj(!justNeedQj);
201
+ var newNeedQys = justNeedQj ? 1 : 0;
202
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
203
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
204
+ // 是否组件内部可以更改需要契约锁逻辑
205
+ var needQysObj = isControlNeedQys
206
+ ? { needQys: newNeedQys }
207
+ : {};
208
+ if (isSingleQj) {
209
+ onValueChange &&
210
+ onValueChange((_a = {},
211
+ _a[firstDataType] = __assign(__assign(__assign({}, clearElectronListData), clearElectronSetting), needQysObj),
212
+ _a));
213
+ return;
214
+ }
215
+ if (isDeleteAllFileWhenJustUseQj) {
216
+ // 如果点击仅需要群杰印章信息的话,需要删除掉所有附件信息
217
+ setSameTypeRecords(defaultOnlyQunjRecords);
218
+ onValueChange &&
219
+ onValueChange((_b = {},
220
+ _b[firstDataType] = __assign(__assign(__assign({ fileList: defaultOnlyQunjRecords }, clearElectronListData), clearElectronSetting), needQysObj),
221
+ _b));
222
+ }
223
+ else {
224
+ onValueChange &&
225
+ onValueChange((_c = {},
226
+ _c[firstDataType] = __assign(__assign(__assign({}, clearElectronListData), clearElectronSetting), needQysObj),
227
+ _c));
228
+ }
229
+ } }, justNeedQj
230
+ ? i18next.t('使用电子印章')
231
+ : i18next.t('仅使用群杰印章'))) : null) : null))),
232
+ children: [
233
+ {
234
+ title: i18next.t('名称'),
235
+ dataIndex: 'attachName',
236
+ key: 'attachName',
237
+ width: 160,
238
+ align: 'center',
239
+ render: function (text, record, index) {
240
+ var currentOnlyQunj = currentRecordIsOnlyQunj(record);
241
+ if (currentOnlyQunj) {
242
+ return null;
243
+ }
244
+ var _a = getColumnMergeProp({
245
+ record: record,
246
+ index: index,
247
+ records: records,
248
+ dataTypeSort: dataTypeSort,
249
+ }), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
250
+ var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, sameTypeRecords = _b.records, setSameTypeRecords = _b.setRecords, fileFieldsNameRef = _b.fileFieldsNameRef;
251
+ var _c = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, oldVersionId = _c.oldVersionId, oldVersionName = _c.oldVersionName;
252
+ // 是否添加水印
253
+ var isWater = (record === null || record === void 0 ? void 0 : record.isWatermark) + '' === '1' ? true : false;
254
+ // 是否替换附件
255
+ var isReplaceFile = (record === null || record === void 0 ? void 0 : record.isReplaceFile) + '' === '1' ? true : false;
256
+ var showAddWater = record === null || record === void 0 ? void 0 : record.showAddWater;
257
+ return (React.createElement(FileOperation, { fileName: text, fileId: record.attachId, preFileId: record === null || record === void 0 ? void 0 : record[oldVersionId || ''], preFileName: record === null || record === void 0 ? void 0 : record[oldVersionName || ''], isDownload: true, isDelete: isEdit && isShowFileUpload, isPreview: true, isEdit: isEdit, isWater: isWater, apiBaseUrl: apiBaseUrl, fileBaseUrl: fileBaseUrl, records: sameTypeRecords, organizationId: organizationId, isReplaceFile: isReplaceFile, showAddWater: showAddWater, onDelete: function () {
258
+ var _a;
259
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
260
+ var dataTypeIndex = index - preDataTypeRecordsLength;
261
+ var copyRecords = sameTypeRecords === null || sameTypeRecords === void 0 ? void 0 : sameTypeRecords.slice();
262
+ if (Array.isArray(copyRecords)) {
263
+ // 记录被删除的附件,用于判断是否需要清理电子印章信息
264
+ var deletedRecord = copyRecords[dataTypeIndex];
265
+ copyRecords.splice(dataTypeIndex, 1);
266
+ if (copyRecords.length === 0) {
267
+ setSameTypeRecords(defaultOnlyQunjRecords);
268
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
269
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
270
+ // 所有附件删完时,同时清理群杰印章共享数据
271
+ var setQunjChecked = (allData[currentDataType] || {}).setQunjChecked;
272
+ setQunjChecked === null || setQunjChecked === void 0 ? void 0 : setQunjChecked(false);
273
+ onValueChange &&
274
+ onValueChange(__assign(__assign((_a = {}, _a[firstDataType] = {
275
+ fileList: defaultOnlyQunjRecords,
276
+ }, _a), clearElectronListData), clearElectronSetting));
277
+ }
278
+ else {
279
+ setSameTypeRecords(copyRecords);
280
+ // 同类型的附件共用电子印章信息,只有当被删除的附件勾选了电子印章
281
+ // 且删除后同类型下不再有任何勾选电子印章的附件时,才清理电子印章信息
282
+ clearElectronDataWhenNoSealFile(deletedRecord, copyRecords, allData, currentDataType, onValueChange);
283
+ }
284
+ }
285
+ }, onWatermarkChange: function (isChecked) {
286
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
287
+ var dataTypeIndex = index - preDataTypeRecordsLength;
288
+ setSameTypeRecords(function (preRecords) {
289
+ var _a;
290
+ var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
291
+ var item = copyRecords[dataTypeIndex];
292
+ copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isWatermark: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
293
+ return copyRecords;
294
+ });
295
+ }, fileList: records, onFileReplace: onFileReplace, previewUrl: previewUrl, request: request, isTranslation: isTranslation, record: record, setRecords: setSameTypeRecords, realIndex: index, isNeedDg: isNeedDg }));
296
+ },
297
+ },
298
+ {
299
+ title: i18next.t('上传时间'),
300
+ dataIndex: 'createTime',
301
+ key: 'createTime',
302
+ width: 112,
303
+ align: 'center',
304
+ render: function (text, record, index) {
305
+ var date = getCreateTimeHand(record);
306
+ // 如果是内部附件 不展示上传时间
307
+ if (currentRecordIsOnlyQunj(record)) {
308
+ return '';
309
+ }
310
+ return date ? (React.createElement(React.Fragment, null,
311
+ React.createElement("div", null, dayjs(date).format(i18next.t('YYYY年MM月DD日'))),
312
+ React.createElement("div", null, dayjs(date).format('HH:mm:ss')))) : ('');
313
+ },
314
+ },
315
+ ],
316
+ },
317
+ ];
318
+ if (isShowFileType) {
319
+ if (isNewQys) {
320
+ fileColumns.unshift(fileTypeColumn);
321
+ }
322
+ else {
323
+ fileColumns[0].children.unshift(fileTypeColumn);
324
+ }
325
+ }
326
+ return {
327
+ fileColumns: fileColumns,
328
+ };
329
+ }
@@ -0,0 +1,19 @@
1
+ import type { ColumnsType } from 'antd/es/table';
2
+ import { ITrackAllData, IFileItem, IFileUploadProps, IElectronSignaturesItemPublic } from '../interface';
3
+ interface IOptions {
4
+ /** 所有数据类型合并之后的数据 */
5
+ records: IFileItem[];
6
+ /** 所有数据类型的排序规则 */
7
+ dataTypeSort: string[];
8
+ /** 所有数据类型的相关操作 */
9
+ allData: ITrackAllData;
10
+ fileUploadProps?: IFileUploadProps;
11
+ /** 是否显示上传附件按钮 */
12
+ isShowFileUpload?: IElectronSignaturesItemPublic['isShowFileUpload'];
13
+ apiBaseUrl?: IElectronSignaturesItemPublic['apiBaseUrl'];
14
+ fileBaseUrl?: IElectronSignaturesItemPublic['fileBaseUrl'];
15
+ }
16
+ export default function useFileTypeColumns(options: IOptions): {
17
+ fileTypeColumns: ColumnsType<any>;
18
+ };
19
+ export {};
@@ -0,0 +1,72 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import React from 'react';
3
+ import { DATA_TYPE_KEY, getColumnMergeProp } from '../hooks/useParseRecords';
4
+ // 附件归属类型
5
+ export default function useFileTypeColumns(options) {
6
+ var allData = options.allData, records = options.records, dataTypeSort = options.dataTypeSort;
7
+ var fileTypeColumns = [
8
+ {
9
+ title: i18next.t('附件归属'),
10
+ dataIndex: 'attachBelongTo',
11
+ key: 'attachBelongTo',
12
+ width: 70,
13
+ align: 'center',
14
+ // 固定列宽(scroll.x=max-content 时 width 会被内容撑开)
15
+ onHeaderCell: function () { return ({
16
+ className: 'file-belong-col',
17
+ style: { width: 70, minWidth: 70, maxWidth: 70 },
18
+ }); },
19
+ onCell: function () { return ({
20
+ className: 'file-belong-col',
21
+ style: { width: 70, minWidth: 70, maxWidth: 70 },
22
+ }); },
23
+ render: function (text, record, index) {
24
+ var _a = getColumnMergeProp({
25
+ record: record,
26
+ index: index,
27
+ records: records,
28
+ dataTypeSort: dataTypeSort,
29
+ }), props = _a.props, currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
30
+ var _b = allData[currentDataType] || {}, dataTypeName = _b.dataTypeName, isBgColor = _b.isBgColor, fileSplitRules = _b.fileSplitRules;
31
+ // 新的合并规则
32
+ var newProps = props;
33
+ var newDataTypeName = dataTypeName;
34
+ // 根据附件信息来拆分附件
35
+ if (fileSplitRules) {
36
+ // 需要重新计算合并的规则
37
+ // 1. 找到属于同种类型的数据
38
+ var dataTypeRecords = records === null || records === void 0 ? void 0 : records.filter(function (record) { return (record === null || record === void 0 ? void 0 : record[DATA_TYPE_KEY]) === currentDataType; });
39
+ // 2. 找到当前数据的拆分规则
40
+ var fileSplitRule_1 = fileSplitRules(record);
41
+ // 3. 找到同种类型的数据中 属于 同种拆分规则的数据
42
+ var fileSplitRuleFiles = dataTypeRecords.filter(function (record) {
43
+ return fileSplitRule_1.key === fileSplitRules(record).key;
44
+ });
45
+ // 4. 同类型 同拆分规则数据的长度
46
+ var fileSplitRuleFilesLength = fileSplitRuleFiles.length;
47
+ // 这里默认同种类型的数据 属于相同拆分规则的数据 已经按顺序组合好了
48
+ // 所有之前数据的长度
49
+ // 找到首次出现该拆分类型的数据索引
50
+ var firstFindFileSPlitRuleIndex = dataTypeRecords.findIndex(function (record) { return fileSplitRule_1.key === fileSplitRules(record).key; });
51
+ newProps = {
52
+ rowSpan: index === preDataTypeRecordsLength + firstFindFileSPlitRuleIndex
53
+ ? fileSplitRuleFilesLength
54
+ : 0,
55
+ };
56
+ newDataTypeName = fileSplitRule_1.name;
57
+ }
58
+ // 处理能否切换是否盖电子印章逻辑
59
+ return {
60
+ children: (React.createElement("div", { className: "file-add--wrap", style: { backgroundColor: isBgColor ? '#63F163' : '' } },
61
+ React.createElement("div", { className: "file-add--fragment" }),
62
+ React.createElement("div", { className: "file-add--btn" },
63
+ React.createElement("div", { className: "file-add--text" }, newDataTypeName)))),
64
+ props: newProps,
65
+ };
66
+ },
67
+ },
68
+ ];
69
+ return {
70
+ fileTypeColumns: fileTypeColumns,
71
+ };
72
+ }
@@ -0,0 +1,30 @@
1
+ export interface IQjVerifyCode {
2
+ /**
3
+ * 流程id
4
+ */
5
+ processId: string;
6
+ /**
7
+ * 验证码
8
+ */
9
+ qjVerificationCode: string;
10
+ /**
11
+ * 接口是否获取失败
12
+ */
13
+ isError?: boolean;
14
+ [key: string]: any;
15
+ }
16
+ /**
17
+ * 根据规则获取群杰验证码
18
+ */
19
+ export default function useGetQjVerifyCode(options: any): {
20
+ qjVerifyCodeData: IQjVerifyCode[];
21
+ getQjVerifyCodeHandle: (queryParams: any) => any;
22
+ };
23
+ /**
24
+ * @returns 根据token获取用户信息
25
+ */
26
+ export declare function getUserInfoByToken(): unknown;
27
+ /**
28
+ * 权限比对
29
+ */
30
+ export declare function comparePermission(permission?: string): boolean;