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.
- package/dist/App.js +315 -291
- package/dist/Demo.js +64 -43
- package/dist/DemoCom/BasicDemo.js +57 -56
- package/dist/DemoCom/CodeQueryDemo.js +3 -2
- package/dist/DemoCom/CollapseDemo.js +28 -27
- package/dist/DemoCom/DragSort.js +11 -10
- package/dist/DemoCom/FormDemo.js +36 -30
- package/dist/DemoCom/PrintContainerDemo.js +151 -150
- package/dist/DemoCom/PrintDemo.js +15 -14
- package/dist/DemoCom/SinaturesDemo.js +9 -8
- package/dist/DemoCom/SyhDemo.js +21 -20
- package/dist/DemoCom/TableAnalyse.js +34 -33
- package/dist/DemoCom/TableDemo.js +73 -69
- package/dist/DemoCom/TableDemo1.js +84 -34
- package/dist/DemoCom/TableDetail.d.ts +9 -0
- package/dist/DemoCom/TableDetail.js +259 -0
- package/dist/DemoCom/TestCom.js +22 -19
- package/dist/DemoCom/data.d.ts +110 -0
- package/dist/DemoCom/data.js +2308 -0
- package/dist/TableDemo/BasicTable.js +225 -25
- package/dist/TableDemo/EditableTable.js +146 -72
- package/dist/TableDemo/ModalTable.js +25 -24
- package/dist/TableDemo/ProEditableTable.js +30 -29
- package/dist/TableDemo/data.d.ts +34 -0
- package/dist/TableDemo/data.js +387 -10
- package/dist/TableDemo/index.js +3 -3
- package/dist/TreeDemo.js +8 -7
- package/dist/TreeSelectDemo.js +12 -8
- package/dist/UI/Form/index.d.ts +3 -0
- package/dist/UI/Form/index.js +347 -0
- package/dist/UI/Input/index.d.ts +17 -0
- package/dist/UI/Input/index.js +74 -0
- package/dist/UI/InputNumber/index.d.ts +3 -0
- package/dist/UI/InputNumber/index.js +45 -0
- package/dist/UI/OldForm/index.d.ts +9 -0
- package/dist/UI/OldForm/index.js +302 -0
- package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
- package/dist/UI/Select/EmpForQuitDemo.js +120 -0
- package/dist/UI/Select/index.d.ts +10 -0
- package/dist/UI/Select/index.js +207 -0
- package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
- package/dist/UI/Table/BusinessListDemo.js +227 -0
- package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
- package/dist/UI/Table/BusinessMemberDemo.js +181 -0
- package/dist/UI/Table/index.d.ts +10 -0
- package/dist/UI/Table/index.js +850 -0
- package/dist/UI/TreeSelect/index.d.ts +3 -0
- package/dist/UI/TreeSelect/index.js +120 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/index.js +34 -0
- package/dist/UploadDemo.js +27 -23
- package/dist/components/Button/button.d.ts +6 -0
- package/dist/components/Button/button.js +11 -4
- package/dist/components/Collapse/collapse.js +2 -1
- package/dist/components/DatePicker/data-picker.d.ts +3 -1
- package/dist/components/EnhanceSelect/index.d.ts +11 -1
- package/dist/components/EnhanceSelect/index.js +231 -49
- package/dist/components/EnhanceTree/index.js +4 -3
- package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
- package/dist/components/EnhanceTreeSelect/index.js +57 -7
- package/dist/components/Export/export.js +5 -4
- package/dist/components/Form/form.d.ts +11 -1
- package/dist/components/Form/form.js +5 -3
- package/dist/components/Input/input.d.ts +5 -3
- package/dist/components/Input/input.js +72 -3
- package/dist/components/InputNumber/input-number.js +3 -2
- package/dist/components/Layout/layout.d.ts +4 -4
- package/dist/components/Menu/menu.d.ts +1 -1
- package/dist/components/NumberCase/index.js +9 -7
- package/dist/components/Print/print.js +4 -3
- package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
- package/dist/components/PrintContainer/PrintModal.js +4 -3
- package/dist/components/PrintContainer/handle.d.ts +2 -4
- package/dist/components/PrintContainer/handle.js +3 -2
- package/dist/components/PrintContainer/lodop.js +2 -1
- package/dist/components/PrintContainer/print-container.js +74 -73
- package/dist/components/PrintContainer/service.js +5 -4
- package/dist/components/ProForm/hooks.d.ts +23 -0
- package/dist/components/ProForm/hooks.js +209 -0
- package/dist/components/ProForm/index.d.ts +9 -0
- package/dist/components/ProForm/index.js +168 -0
- package/dist/components/ProForm/interface.d.ts +200 -0
- package/dist/components/ProForm/interface.js +1 -0
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +222 -0
- package/dist/components/ProForm/items.d.ts +5 -0
- package/dist/components/ProForm/items.js +36 -0
- package/dist/components/ProForm/record-common-list.d.ts +18 -0
- package/dist/components/ProForm/record-common-list.js +83 -0
- package/dist/components/ProForm/search-drawer.d.ts +14 -0
- package/dist/components/ProForm/search-drawer.js +237 -0
- package/dist/components/ProForm/setting.d.ts +5 -0
- package/dist/components/ProForm/setting.js +12 -0
- package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
- package/dist/components/ProForm/useCommonSearch.js +352 -0
- package/dist/components/ProFormList/index.d.ts +12 -0
- package/dist/components/ProFormList/index.js +34 -0
- package/dist/components/RangePicker/range-picker.js +5 -2
- package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
- package/dist/components/SortableCancel/sortable-cancel.js +2 -2
- package/dist/components/Table/components/FillDown.js +2 -1
- package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
- package/dist/components/Table/components/FilterDropdown.js +36 -12
- package/dist/components/Table/hooks/useColumns.d.ts +5 -0
- package/dist/components/Table/hooks/useColumns.js +396 -22
- package/dist/components/Table/hooks/useDropRef.js +2 -1
- package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
- package/dist/components/Table/hooks/useScuRfresh.js +22 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
- package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
- package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
- package/dist/components/Table/index.d.ts +4 -0
- package/dist/components/Table/table-adddel-column.js +4 -3
- package/dist/components/Table/table-dynamic.d.ts +1 -0
- package/dist/components/Table/table-dynamic.js +447 -60
- package/dist/components/Table/table-enhance-cell.d.ts +3 -0
- package/dist/components/Table/table-enhance-cell.js +28 -8
- package/dist/components/Table/table-menu.d.ts +7 -0
- package/dist/components/Table/table-menu.js +359 -0
- package/dist/components/Table/table-resizable-title.js +1 -0
- package/dist/components/Table/table-sort.js +4 -3
- package/dist/components/Table/table.d.ts +16 -0
- package/dist/components/Table/table.js +241 -65
- package/dist/components/Table/utils/dom.js +2 -1
- package/dist/components/Table/utils/filterHandle.d.ts +1 -1
- package/dist/components/Table/utils/filterHandle.js +27 -12
- package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
- package/dist/components/Table/utils/getSummaryData.js +279 -24
- package/dist/components/Table/utils/shallowEqual.js +2 -1
- package/dist/components/Table/utils/validate.js +25 -6
- package/dist/components/Tabs/tabs.d.ts +2 -0
- package/dist/components/Tabs/tabs.js +3 -1
- package/dist/components/TranslationButton/DownFile.d.ts +7 -0
- package/dist/components/TranslationButton/DownFile.js +95 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +73 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +245 -0
- package/dist/components/TranslationButton/hooks.d.ts +8 -0
- package/dist/components/TranslationButton/hooks.js +139 -0
- package/dist/components/TranslationButton/index.d.ts +4 -0
- package/dist/components/TranslationButton/index.js +4 -0
- package/dist/components/TreeSelect/index.d.ts +19 -0
- package/dist/components/TreeSelect/index.js +88 -0
- package/dist/components/Upload/upload-table.js +31 -26
- package/dist/components/Upload/upload.d.ts +20 -1
- package/dist/components/Upload/upload.js +172 -27
- package/dist/components/Upload/utils.d.ts +9 -2
- package/dist/components/Upload/utils.js +153 -38
- package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
- package/dist/components/UploadCustom/hooks/useDg.js +55 -0
- package/dist/components/UploadSingle/upload-single.js +5 -4
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/Watermark/index.js +2 -0
- package/dist/components/Watermark/interface.d.ts +20 -0
- package/dist/components/Watermark/interface.js +1 -0
- package/dist/components/Watermark/utils.d.ts +1 -0
- package/dist/components/Watermark/utils.js +70 -0
- package/dist/components/Watermark/water.d.ts +50 -0
- package/dist/components/Watermark/water.js +66 -0
- package/dist/components/Watermark/watermark-div.d.ts +4 -0
- package/dist/components/Watermark/watermark-div.js +41 -0
- package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
- package/dist/components/Watermark/watermark-shadow.js +116 -0
- package/dist/components/Watermark/watermark.d.ts +3 -0
- package/dist/components/Watermark/watermark.js +102 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
- package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
- package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/images.js +2 -0
- package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/index.js +2 -0
- package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/service.js +101 -0
- package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
- package/dist/components/ZtIcon/index.js +2 -0
- package/dist/components/business/Analyse/index.js +12 -11
- package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
- package/dist/components/business/CodeQuery/component/TableList.js +5 -4
- package/dist/components/business/CodeQuery/hooks.js +2 -1
- package/dist/components/business/CodeQuery/index.js +2 -1
- package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
- package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
- package/dist/components/business/Common/UserInfo/index.js +5 -4
- package/dist/components/business/Common/UserPassword/index.js +14 -11
- package/dist/components/business/Common/validatePassword.d.ts +1 -1
- package/dist/components/business/Common/validatePassword.js +17 -7
- package/dist/components/business/DetailCard/index.js +7 -6
- package/dist/components/business/DetailHeader/index.js +7 -6
- package/dist/components/business/DetailList/index.js +5 -4
- package/dist/components/business/DgColumns/index.js +12 -11
- package/dist/components/business/ExportButton/index.js +6 -5
- package/dist/components/business/Footer/index.js +4 -1
- package/dist/components/business/GridList/item.d.ts +1 -1
- package/dist/components/business/List/item.d.ts +1 -1
- package/dist/components/business/NewList/item.d.ts +1 -1
- package/dist/components/business/NewList/item.js +1 -1
- package/dist/components/business/OperationBtnGroup/index.js +17 -16
- package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
- package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
- package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
- package/dist/components/business/SearchContainer/record-common-item.js +83 -0
- package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
- package/dist/components/business/SearchContainer/record-common-list.js +95 -0
- package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
- package/dist/components/business/SearchContainer/search-container.js +66 -3
- package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-drawer.js +167 -13
- package/dist/components/business/SearchContainer/search-item.js +48 -5
- package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
- package/dist/components/business/SearchContainer/search-left.js +105 -68
- package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
- package/dist/components/business/SearchContainer/search-right.js +62 -5
- package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
- package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
- package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
- package/dist/components/business/SearchContainer/useTemplate.js +347 -0
- package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +157 -0
- package/dist/components/business/Signatures/components/CompareResult.js +7 -6
- package/dist/components/business/Signatures/components/DetailTable.js +37 -34
- package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
- package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
- package/dist/components/business/Signatures/index.js +64 -53
- package/dist/components/business/SortList/sort-drawer.js +5 -4
- package/dist/components/business/Template/index.js +11 -10
- package/dist/components/electron-signatures/content.d.ts +9 -0
- package/dist/components/electron-signatures/content.js +1146 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
- package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
- package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
- package/dist/components/electron-signatures/demoComponents/index.js +30 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
- package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/making.js +211 -0
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
- package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/test.js +119 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
- package/dist/components/electron-signatures/index.d.ts +15 -0
- package/dist/components/electron-signatures/index.js +63 -0
- package/dist/components/electron-signatures/interface.d.ts +865 -0
- package/dist/components/electron-signatures/interface.js +57 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
- package/dist/components/electron-signatures/utils.d.ts +26 -0
- package/dist/components/electron-signatures/utils.js +67 -0
- package/dist/components/utils/MyStorage.d.ts +36 -0
- package/dist/components/utils/MyStorage.js +120 -0
- package/dist/components/utils/ZtxkContext.d.ts +67 -0
- package/dist/components/utils/ZtxkContext.js +20 -0
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/components/utils/fetch.d.ts +10 -0
- package/dist/components/utils/fetch.js +119 -0
- package/dist/components/utils/index.d.ts +9 -0
- package/dist/components/utils/index.js +11 -0
- package/dist/components/utils/processNumber.d.ts +12 -0
- package/dist/components/utils/processNumber.js +106 -0
- package/dist/components/utils/upload.js +6 -3
- package/dist/components/utils/useBaseContext.d.ts +23 -0
- package/dist/components/utils/useBaseContext.js +31 -0
- package/dist/components/utils/useMemoizedFn.d.ts +4 -0
- package/dist/components/utils/useMemoizedFn.js +19 -0
- package/dist/components/utils/usePrevious.d.ts +3 -0
- package/dist/components/utils/usePrevious.js +13 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +2205 -58
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +255 -86
- package/dist/locales/en-US.json +828 -0
- package/dist/locales/zh-CN.json +828 -0
- package/dist/request.js +7 -6
- package/package.json +13 -4
|
@@ -9,14 +9,153 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
49
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
50
|
+
to[j] = from[i];
|
|
51
|
+
return to;
|
|
52
|
+
};
|
|
53
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
54
|
+
import React, { useState, memo, useEffect, useCallback, useRef, useMemo, } from 'react';
|
|
13
55
|
import { SettingOutlined } from '@ant-design/icons';
|
|
14
56
|
import { Switch } from 'antd';
|
|
15
|
-
import { Drawer, Button, Checkbox, message, SortableCancel, Popover, } from '../../index';
|
|
57
|
+
import { Drawer, Button, Checkbox, message, Modal, SortableCancel, Popover, Input, } from '../../index';
|
|
16
58
|
import { useDrop } from 'react-dnd';
|
|
17
59
|
import { dynamicColumnDragType } from './constants';
|
|
18
60
|
import update from 'immutability-helper';
|
|
19
61
|
import { Select } from 'antd';
|
|
62
|
+
import throttle from 'lodash/throttle';
|
|
63
|
+
import { useTemplate } from '../business/SearchContainer/useTemplate';
|
|
64
|
+
/**
|
|
65
|
+
* ==================== 多级表头辅助函数 ====================
|
|
66
|
+
* 动态列列表支持分组列(children):叶子列(一级普通列 / 分组内子列)参与勾选,
|
|
67
|
+
* 分组列作为父节点整组控制,拖拽排序保持一级粒度(子列跟随分组移动)
|
|
68
|
+
*/
|
|
69
|
+
/** 判断是否为分组列 */
|
|
70
|
+
var isGroupColumn = function (column) {
|
|
71
|
+
return Array.isArray(column.children) && column.children.length > 0;
|
|
72
|
+
};
|
|
73
|
+
/** 获取列的标识:分组列用 title,普通列用 key || dataIndex */
|
|
74
|
+
var getColumnId = function (column) {
|
|
75
|
+
return isGroupColumn(column)
|
|
76
|
+
? "" + (column.key || column.title)
|
|
77
|
+
: "" + (column.key || column.dataIndex || column.title);
|
|
78
|
+
};
|
|
79
|
+
/** 递归收集叶子列标识(分组列取其子列) */
|
|
80
|
+
var getLeafKeys = function (columns) {
|
|
81
|
+
var keys = [];
|
|
82
|
+
columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
|
|
83
|
+
if (isGroupColumn(column)) {
|
|
84
|
+
keys.push.apply(keys, getLeafKeys(column.children));
|
|
85
|
+
}
|
|
86
|
+
else if (column.key || column.dataIndex) {
|
|
87
|
+
keys.push("" + (column.key || column.dataIndex));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return keys;
|
|
91
|
+
};
|
|
92
|
+
/** 递归收集未隐藏叶子列标识(初始化勾选状态用) */
|
|
93
|
+
var getVisibleLeafKeys = function (columns) {
|
|
94
|
+
var keys = [];
|
|
95
|
+
columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
|
|
96
|
+
if (isGroupColumn(column)) {
|
|
97
|
+
keys.push.apply(keys, getVisibleLeafKeys(column.children));
|
|
98
|
+
}
|
|
99
|
+
else if (!column.hideColumn && (column.key || column.dataIndex)) {
|
|
100
|
+
keys.push("" + (column.key || column.dataIndex));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return keys;
|
|
104
|
+
};
|
|
105
|
+
/** 按搜索词递归过滤列树(保留命中子列所在的分组结构) */
|
|
106
|
+
var filterColumnsTree = function (columns, value) {
|
|
107
|
+
var lowerValue = value.toLowerCase();
|
|
108
|
+
var result = [];
|
|
109
|
+
columns.forEach(function (column) {
|
|
110
|
+
var title = column.titleAlias || column.title;
|
|
111
|
+
var titleMatch = typeof title === 'string' && title.toLowerCase().includes(lowerValue);
|
|
112
|
+
if (isGroupColumn(column)) {
|
|
113
|
+
var children = filterColumnsTree(column.children, value);
|
|
114
|
+
if (children.length > 0) {
|
|
115
|
+
result.push(__assign(__assign({}, column), { children: children }));
|
|
116
|
+
}
|
|
117
|
+
else if (titleMatch) {
|
|
118
|
+
// 分组名命中,整组保留
|
|
119
|
+
result.push(column);
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (titleMatch) {
|
|
124
|
+
result.push(column);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return result;
|
|
128
|
+
};
|
|
129
|
+
/** 递归查找叶子列是否存在于过滤结果树中(用于高亮命中项) */
|
|
130
|
+
var isInFilterTree = function (tree, columnId) {
|
|
131
|
+
return tree.some(function (column) {
|
|
132
|
+
return getColumnId(column) === columnId ||
|
|
133
|
+
(isGroupColumn(column) && isInFilterTree(column.children, columnId));
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
/** 将勾选状态与固定配置递归应用到列树,返回带最新显隐状态的列(供保存/模板使用) */
|
|
137
|
+
var applyCheckedToColumns = function (columns, checkedValues, dynamicColumnConfigs) {
|
|
138
|
+
return columns.map(function (column) {
|
|
139
|
+
if (isGroupColumn(column)) {
|
|
140
|
+
var newChildren = applyCheckedToColumns(column.children, checkedValues, dynamicColumnConfigs);
|
|
141
|
+
// 子列全部隐藏时,整个分组列隐藏
|
|
142
|
+
var result_1 = __assign(__assign({}, column), { children: newChildren, hideColumn: newChildren.every(function (child) { return child.hideColumn; }) });
|
|
143
|
+
var configKey_1 = "" + (column.key || column.title);
|
|
144
|
+
if (dynamicColumnConfigs[configKey_1]) {
|
|
145
|
+
var _a = dynamicColumnConfigs[configKey_1], isFixed = _a.isFixed, fixed = _a.fixed;
|
|
146
|
+
result_1 = __assign(__assign({}, result_1), { fixed: isFixed ? fixed : false });
|
|
147
|
+
}
|
|
148
|
+
return result_1;
|
|
149
|
+
}
|
|
150
|
+
var configKey = "" + (column.key || column.dataIndex);
|
|
151
|
+
var result = __assign(__assign({}, column), { hideColumn: !checkedValues.includes(configKey) });
|
|
152
|
+
if (dynamicColumnConfigs[configKey]) {
|
|
153
|
+
var _b = dynamicColumnConfigs[configKey], isFixed = _b.isFixed, fixed = _b.fixed;
|
|
154
|
+
result = __assign(__assign({}, result), { fixed: isFixed ? fixed : false });
|
|
155
|
+
}
|
|
156
|
+
return result;
|
|
157
|
+
});
|
|
158
|
+
};
|
|
20
159
|
function DynamicItemConfig(_a) {
|
|
21
160
|
var fixed = _a.fixed, onConfigItemHandle = _a.onConfigItemHandle;
|
|
22
161
|
var _b = useState({
|
|
@@ -42,30 +181,34 @@ function DynamicItemConfig(_a) {
|
|
|
42
181
|
React.createElement(Switch, { checked: config.isFixed, onChange: onCheckedChangeHandle }),
|
|
43
182
|
React.createElement(Select, { value: config.fixed, options: [
|
|
44
183
|
{
|
|
45
|
-
label: '左',
|
|
184
|
+
label: i18next.t('左'),
|
|
46
185
|
value: 'left',
|
|
47
186
|
},
|
|
48
187
|
{
|
|
49
|
-
label: '右',
|
|
188
|
+
label: i18next.t('右'),
|
|
50
189
|
value: 'right',
|
|
51
190
|
},
|
|
52
191
|
], allowClear: false, disabled: config.isFixed === false, onChange: onSelectChangeHandle })), trigger: "click", placement: "bottomRight" },
|
|
53
192
|
React.createElement(Button, { icon: React.createElement(SettingOutlined, null), shape: "circle", size: "small" }))));
|
|
54
193
|
}
|
|
55
194
|
function TableDynamic(props) {
|
|
56
|
-
var
|
|
195
|
+
var _this = this;
|
|
196
|
+
var visible = props.visible, onClose = props.onClose, onReset = props.onReset, onSave = props.onSave, columns = props.columns, dynamicStorageKey = props.dynamicStorageKey;
|
|
57
197
|
var _a = useState(columns || []), dynamicColumns = _a[0], setDynamicColumns = _a[1];
|
|
58
|
-
var _b = useState(
|
|
59
|
-
|
|
198
|
+
var _b = useState(null), filterDynamicColumns = _b[0], setFilterDynamicColumns = _b[1];
|
|
199
|
+
// 从 columns 初始化勾选状态(组件每次打开抽屉时重新挂载,需在初始化时计算)
|
|
200
|
+
// 多级表头:勾选粒度为叶子列(分组列通过子列计算整组状态)
|
|
201
|
+
var _c = useState(function () {
|
|
202
|
+
return getVisibleLeafKeys(columns || []);
|
|
203
|
+
}), checkedValues = _c[0], setCheckedValues = _c[1];
|
|
204
|
+
var _d = useState([]), filterCheckedValues = _d[0], setFilterCheckedValues = _d[1];
|
|
205
|
+
var _e = useState({}), dynamicColumnConfigs = _e[0], setDynamicColumnConfigs = _e[1];
|
|
60
206
|
useEffect(function () {
|
|
207
|
+
// 抽屉打开时不重置,保留用户正在进行的勾选/拖拽操作
|
|
208
|
+
if (visible)
|
|
209
|
+
return;
|
|
61
210
|
setDynamicColumns(columns || []);
|
|
62
|
-
|
|
63
|
-
columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
|
|
64
|
-
if (!column.hideColumn) {
|
|
65
|
-
_checkedValues.push(column.key);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
setCheckedValues(_checkedValues);
|
|
211
|
+
setCheckedValues(getVisibleLeafKeys(columns || []));
|
|
69
212
|
}, [columns]);
|
|
70
213
|
/**
|
|
71
214
|
* @description 点击确定方法触发事件
|
|
@@ -73,27 +216,16 @@ function TableDynamic(props) {
|
|
|
73
216
|
*/
|
|
74
217
|
var onSureHandle = function () {
|
|
75
218
|
if ((checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.length) === 0) {
|
|
76
|
-
message.info('请至少保留一个列展示!');
|
|
219
|
+
message.info(i18next.t('请至少保留一个列展示!'));
|
|
77
220
|
return;
|
|
78
221
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (checkedValues.includes(dynamicColumn.key)) {
|
|
82
|
-
dynamicColumn.hideColumn = false;
|
|
83
|
-
}
|
|
84
|
-
if (dynamicColumnConfigs[dynamicColumn.key]) {
|
|
85
|
-
var _a = dynamicColumnConfigs[dynamicColumn.key], isFixed = _a.isFixed, fixed = _a.fixed;
|
|
86
|
-
return __assign(__assign({}, dynamicColumn), { fixed: isFixed ? fixed : false });
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return __assign({}, dynamicColumn);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
222
|
+
// 递归应用勾选状态(分组列的 hideColumn 由子列计算)
|
|
223
|
+
var saveResult = applyCheckedToColumns(dynamicColumns, checkedValues, dynamicColumnConfigs);
|
|
92
224
|
onClose && onClose();
|
|
93
225
|
onSave && onSave(saveResult);
|
|
94
226
|
};
|
|
95
227
|
var onFindItemHandle = useCallback(function (id) {
|
|
96
|
-
var dragItem = dynamicColumns === null || dynamicColumns === void 0 ? void 0 : dynamicColumns.filter(function (c) { return
|
|
228
|
+
var dragItem = dynamicColumns === null || dynamicColumns === void 0 ? void 0 : dynamicColumns.filter(function (c) { return getColumnId(c) === id; })[0];
|
|
97
229
|
return {
|
|
98
230
|
dragItem: dragItem,
|
|
99
231
|
index: dynamicColumns === null || dynamicColumns === void 0 ? void 0 : dynamicColumns.indexOf(dragItem),
|
|
@@ -106,19 +238,33 @@ function TableDynamic(props) {
|
|
|
106
238
|
*/
|
|
107
239
|
var onMoveItemHandle = useCallback(function (id, to) {
|
|
108
240
|
var _a = onFindItemHandle(id), dragItem = _a.dragItem, index = _a.index;
|
|
109
|
-
|
|
241
|
+
var newDynamicColumns = update(dynamicColumns, {
|
|
110
242
|
$splice: [
|
|
111
243
|
[index, 1],
|
|
112
244
|
[to, 0, dragItem],
|
|
113
245
|
],
|
|
114
|
-
})
|
|
115
|
-
|
|
246
|
+
});
|
|
247
|
+
setDynamicColumns(newDynamicColumns);
|
|
248
|
+
if (filterDynamicColumns) {
|
|
249
|
+
setFilterDynamicColumns(newDynamicColumns.filter(function (c) {
|
|
250
|
+
return filterDynamicColumns === null || filterDynamicColumns === void 0 ? void 0 : filterDynamicColumns.find(function (f) { return getColumnId(f) === getColumnId(c); });
|
|
251
|
+
}));
|
|
252
|
+
}
|
|
253
|
+
}, [onFindItemHandle, dynamicColumns, setDynamicColumns, filterDynamicColumns]);
|
|
116
254
|
/**
|
|
117
|
-
* @
|
|
255
|
+
* @description 叶子列单独勾选(手动受控)
|
|
256
|
+
* 注意:不使用 Checkbox.Group——antd 会强制覆盖 Group 内 Checkbox 的
|
|
257
|
+
* checked/onChange(分组父级的受控全选框会被劫持导致勾选错乱),
|
|
258
|
+
* 这里全部手动受控,checkedValues 始终维护全量叶子 key
|
|
118
259
|
*/
|
|
119
|
-
var
|
|
120
|
-
setCheckedValues(
|
|
121
|
-
|
|
260
|
+
var onLeafToggleHandle = useCallback(function (leafId, checked) {
|
|
261
|
+
setCheckedValues(function (prev) {
|
|
262
|
+
if (checked) {
|
|
263
|
+
return Array.from(new Set(__spreadArray(__spreadArray([], prev), [leafId])));
|
|
264
|
+
}
|
|
265
|
+
return prev.filter(function (key) { return key !== leafId; });
|
|
266
|
+
});
|
|
267
|
+
}, []);
|
|
122
268
|
/**
|
|
123
269
|
* @description 修改配置触发的回调
|
|
124
270
|
*/
|
|
@@ -127,32 +273,273 @@ function TableDynamic(props) {
|
|
|
127
273
|
return __assign(__assign({}, state), dynamicColumnConfigs);
|
|
128
274
|
});
|
|
129
275
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
276
|
+
/**
|
|
277
|
+
* @description 表格列动态显示/隐藏 - 全选/反选按钮点击回调
|
|
278
|
+
* @author (可补充作者姓名)
|
|
279
|
+
* @param {('all' | 'inverse')} type - 操作类型:'all' 全选(仅对「过滤后可见+可动态操作」列生效),'inverse' 反选(同上)
|
|
280
|
+
* @see dynamicColumns - 原始完整表格列集合(包含所有列)
|
|
281
|
+
* @see filterDynamicColumns - 过滤后的可见列集合(仅操作此集合中的列)
|
|
282
|
+
* @see checkedValues - 已选中的列 key 集合(状态变量)
|
|
283
|
+
* @see setCheckedValues - 更新选中列的状态函数
|
|
284
|
+
* @note 核心规则(解决「过滤后操作不影响过滤前数据」的核心诉求):
|
|
285
|
+
* 1. 操作范围严格限制:仅对「过滤后可见列(filterDynamicColumns 优先,无则 dynamicColumns)+ 可动态操作(isNoDynamicHide: false)」的列生效
|
|
286
|
+
* 2. 过滤后隐藏的列(未在 targetColumns 中):无论是否可动态,均不参与全选/反选,保持其原始选中状态不变
|
|
287
|
+
* 3. 禁止动态隐藏的列(isNoDynamicHide: true):即使在过滤后可见,也不参与全选/反选,保持原始选中状态
|
|
288
|
+
* 4. 仅当操作后选中状态发生变化时才更新,避免无效渲染
|
|
289
|
+
*/
|
|
290
|
+
var onCheckBtn = function (type) {
|
|
291
|
+
// 1. 确定操作的目标列集合:仅对「过滤后可见列」操作(优先 filterDynamicColumns,无则用 dynamicColumns)
|
|
292
|
+
// 多级表头:目标集合递归展开为叶子列粒度(分组列取其子列)
|
|
293
|
+
var targetColumns = filterDynamicColumns !== null && filterDynamicColumns !== void 0 ? filterDynamicColumns : dynamicColumns;
|
|
294
|
+
// 2. 拆分目标列中的两类列(仅在可见列范围内处理)
|
|
295
|
+
// 2.1 「可操作列」:过滤后可见 + 允许动态隐藏(isNoDynamicHide: false)→ 参与全选/反选
|
|
296
|
+
// 2.2 「不可操作列」:过滤后可见 + 禁止动态隐藏(isNoDynamicHide: true)→ 不参与操作,保留原选中状态
|
|
297
|
+
var operableKeys = [];
|
|
298
|
+
var visibleNonOperableKeys = [];
|
|
299
|
+
var collectLeafKeys = function (cols) {
|
|
300
|
+
cols === null || cols === void 0 ? void 0 : cols.forEach(function (column) {
|
|
301
|
+
if (isGroupColumn(column)) {
|
|
302
|
+
collectLeafKeys(column.children);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (!(column.key || column.dataIndex)) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
var columnId = "" + (column.key || column.dataIndex);
|
|
309
|
+
if (column.isNoDynamicHide) {
|
|
310
|
+
visibleNonOperableKeys.push(columnId);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
operableKeys.push(columnId);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
collectLeafKeys(targetColumns);
|
|
318
|
+
var operableLen = operableKeys.length;
|
|
319
|
+
// 3. 拆分当前已选中的 keys(确保「过滤后隐藏的列」状态不变)
|
|
320
|
+
// 3.1 已选中的「过滤后隐藏的列」:无论是否可动态,均保留原状态(不参与本次操作)
|
|
321
|
+
var hiddenCheckedKeys = checkedValues.filter(
|
|
322
|
+
// 不在目标树(过滤后隐藏)的选中项,递归匹配多级表头
|
|
323
|
+
function (key) { return !isInFilterTree(targetColumns, key); });
|
|
324
|
+
// 3.2 已选中的「可见不可操作列」:保留原选中状态
|
|
325
|
+
var visibleNonOperableCheckedKeys = checkedValues.filter(function (key) {
|
|
326
|
+
return visibleNonOperableKeys.includes(key);
|
|
327
|
+
});
|
|
328
|
+
// 3.3 已选中的「可见可操作列」:参与本次全选/反选
|
|
329
|
+
var operableCheckedKeys = checkedValues.filter(function (key) {
|
|
330
|
+
return operableKeys.includes(key);
|
|
331
|
+
});
|
|
332
|
+
// 4. 全选逻辑:仅选中「可见可操作列」,其他列(隐藏列、可见不可操作列)保持原状态
|
|
333
|
+
if (type === 'all') {
|
|
334
|
+
// 边界判断:仅当「已选中的可操作列数 ≠ 可操作列总数」时才更新(避免无效渲染)
|
|
335
|
+
if (operableCheckedKeys.length !== operableLen) {
|
|
336
|
+
setCheckedValues(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), operableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys));
|
|
337
|
+
}
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
// 5. 反选逻辑:仅反选「可见可操作列」,其他列保持原状态
|
|
341
|
+
var inversedOperableKeys = operableKeys.filter(function (key) { return !operableCheckedKeys.includes(key); });
|
|
342
|
+
setCheckedValues(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), inversedOperableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys));
|
|
343
|
+
};
|
|
344
|
+
// 将当前勾选状态和固定列配置应用到列上,生成含最新显隐状态的列数据
|
|
345
|
+
// 多级表头:递归应用,分组列的 hideColumn 由子列勾选状态计算
|
|
346
|
+
var currentDynamicColumns = useMemo(function () {
|
|
347
|
+
return applyCheckedToColumns(dynamicColumns, checkedValues, dynamicColumnConfigs);
|
|
348
|
+
}, [dynamicColumns, checkedValues, dynamicColumnConfigs]);
|
|
349
|
+
/**
|
|
350
|
+
* @description 分组列整组勾选/取消勾选(父节点 Checkbox 回调)
|
|
351
|
+
*/
|
|
352
|
+
var onGroupCheckHandle = useCallback(function (groupColumn, checked) {
|
|
353
|
+
var childKeys = getLeafKeys((groupColumn === null || groupColumn === void 0 ? void 0 : groupColumn.children) || []);
|
|
354
|
+
setCheckedValues(function (prev) {
|
|
355
|
+
if (checked) {
|
|
356
|
+
return Array.from(new Set(__spreadArray(__spreadArray([], prev), childKeys)));
|
|
357
|
+
}
|
|
358
|
+
return prev.filter(function (key) { return !childKeys.includes(key); });
|
|
359
|
+
});
|
|
360
|
+
}, []);
|
|
361
|
+
var _f = useTemplate({
|
|
362
|
+
templateKey: dynamicStorageKey,
|
|
363
|
+
currentList: currentDynamicColumns,
|
|
364
|
+
initDynamicArr: columns,
|
|
365
|
+
onInsideChange: function (data) {
|
|
366
|
+
setDynamicColumns(data);
|
|
367
|
+
setCheckedValues(getVisibleLeafKeys(data || []));
|
|
368
|
+
},
|
|
369
|
+
tableKey: 'ztxk_table_common_template_key',
|
|
370
|
+
}), renderTemplateModal = _f.renderTemplateModal, openTemplateModal = _f.openTemplateModal, saveCurrentTemplate = _f.saveCurrentTemplate, getCurrentTemplate = _f.getCurrentTemplate;
|
|
371
|
+
var currentTemplateTitleRef = useRef('');
|
|
372
|
+
var _g = useState(false), modalVisible = _g[0], setModalVisible = _g[1];
|
|
373
|
+
/**
|
|
374
|
+
* @description 搜索过滤触发的回调
|
|
375
|
+
* @param value 搜索值
|
|
376
|
+
*/
|
|
377
|
+
var onSearchHandle = useCallback(function (value) {
|
|
378
|
+
if (!value) {
|
|
379
|
+
setFilterCheckedValues([]);
|
|
380
|
+
setFilterDynamicColumns(null);
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
// 多级表头:递归过滤列树,保留命中子列所在的分组结构
|
|
384
|
+
var filterColumns = filterColumnsTree(dynamicColumns, value);
|
|
385
|
+
// 未参与过滤的列,单独缓存起来
|
|
386
|
+
setFilterCheckedValues(checkedValues.filter(function (key) { return !filterColumns.find(function (column) { return column.key === key; }); }));
|
|
387
|
+
setFilterDynamicColumns(filterColumns);
|
|
388
|
+
}, [checkedValues, dynamicColumns]);
|
|
389
|
+
var onSearchHandleThrottle = useCallback(throttle(function (e) {
|
|
390
|
+
onSearchHandle(e.target.value);
|
|
391
|
+
}, 500, { trailing: true }), [onSearchHandle]);
|
|
392
|
+
return (React.createElement(React.Fragment, null,
|
|
393
|
+
React.createElement(Drawer, { placement: "right", getContainer: false, closable: false, maskClosable: false,
|
|
394
|
+
// style={{ position: 'absolute' }}
|
|
395
|
+
visible: visible, className: "zt-table__dynamic", title: React.createElement("div", null,
|
|
396
|
+
React.createElement(SettingOutlined, null),
|
|
397
|
+
React.createElement("span", { className: "search-drawer--title-text" },
|
|
398
|
+
i18next.t('显示字段自定义'),
|
|
399
|
+
React.createElement("span", null, i18next.t('(拖拽排序)')))), width: 291, footer: React.createElement(React.Fragment, null,
|
|
400
|
+
React.createElement(Button, { type: "default", onClick: onClose }, i18next.t('取消')),
|
|
401
|
+
React.createElement(Button, { type: "default", onClick: onReset }, i18next.t('重置')),
|
|
402
|
+
React.createElement(Button, { type: "primary", onClick: onSureHandle }, i18next.t('确定'))) },
|
|
403
|
+
React.createElement("div", { className: "search-drawer--template" },
|
|
404
|
+
React.createElement(Button, { type: "default", onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
405
|
+
var currentTemplateTitle;
|
|
406
|
+
var _a;
|
|
407
|
+
return __generator(this, function (_b) {
|
|
408
|
+
currentTemplateTitle = ((_a = getCurrentTemplate()) === null || _a === void 0 ? void 0 : _a.title) || '';
|
|
409
|
+
if (!currentTemplateTitle) {
|
|
410
|
+
openTemplateModal();
|
|
411
|
+
return [2 /*return*/];
|
|
412
|
+
}
|
|
413
|
+
currentTemplateTitleRef.current = currentTemplateTitle;
|
|
414
|
+
setModalVisible(true);
|
|
415
|
+
return [2 /*return*/];
|
|
416
|
+
});
|
|
417
|
+
}); } }, i18next.t('保存模板')),
|
|
418
|
+
React.createElement(Button, { type: "default", onClick: openTemplateModal }, i18next.t('模板设置'))),
|
|
419
|
+
React.createElement("div", { className: "search-drawer--filter" },
|
|
420
|
+
React.createElement("div", { className: "search-drawer--filter-input" },
|
|
421
|
+
React.createElement(Input.Search, { placeholder: i18next.t('搜索'), onSearch: onSearchHandle, onChange: onSearchHandleThrottle }),
|
|
422
|
+
React.createElement(Button, { type: "default", className: "selector-all", onClick: function () { return onCheckBtn('all'); }, loading: false }, i18next.t('全选')),
|
|
423
|
+
React.createElement(Button, { type: "default", className: "selector-inverse", onClick: function () { return onCheckBtn('inverse'); }, loading: false }, i18next.t('反选'))),
|
|
424
|
+
React.createElement("div", { className: "search-drawer--filter-count" }, filterDynamicColumns !== null
|
|
425
|
+
? i18next.t('共 {{total}} 项,命中 {{count}} 项', {
|
|
426
|
+
total: getLeafKeys(dynamicColumns).length,
|
|
427
|
+
count: getLeafKeys(filterDynamicColumns).length,
|
|
428
|
+
})
|
|
429
|
+
: i18next.t('共 {{total}} 项', {
|
|
430
|
+
total: getLeafKeys(dynamicColumns).length,
|
|
431
|
+
})),
|
|
432
|
+
React.createElement(Container, { dynamicColumns: dynamicColumns, checkedValues: checkedValues, filterDynamicColumns: filterDynamicColumns, onFindItemHandle: onFindItemHandle, onMoveItemHandle: onMoveItemHandle, onConfigItemHandle: onConfigItemHandle, onGroupCheckHandle: onGroupCheckHandle, onLeafToggleHandle: onLeafToggleHandle }))),
|
|
433
|
+
renderTemplateModal(),
|
|
434
|
+
React.createElement(Modal, { title: i18next.t('模板保存确认'), width: 600, visible: modalVisible, loading: false, onCancel: function () { return setModalVisible(false); }, footer: React.createElement(React.Fragment, null,
|
|
435
|
+
React.createElement(Button, { type: "primary", onClick: function () {
|
|
436
|
+
setModalVisible(false);
|
|
437
|
+
openTemplateModal();
|
|
438
|
+
} }, i18next.t('模板设置')),
|
|
439
|
+
React.createElement(Button, { type: "primary", onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
440
|
+
var error_1;
|
|
441
|
+
return __generator(this, function (_a) {
|
|
442
|
+
switch (_a.label) {
|
|
443
|
+
case 0:
|
|
444
|
+
_a.trys.push([0, 2, , 3]);
|
|
445
|
+
return [4 /*yield*/, saveCurrentTemplate()];
|
|
446
|
+
case 1:
|
|
447
|
+
_a.sent();
|
|
448
|
+
message.success(i18next.t('保存成功'));
|
|
449
|
+
setModalVisible(false);
|
|
450
|
+
return [3 /*break*/, 3];
|
|
451
|
+
case 2:
|
|
452
|
+
error_1 = _a.sent();
|
|
453
|
+
message.error(i18next.t('保存失败'));
|
|
454
|
+
return [3 /*break*/, 3];
|
|
455
|
+
case 3: return [2 /*return*/];
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
}); } }, i18next.t('确定')),
|
|
459
|
+
React.createElement(Button, { type: "default", onClick: function () {
|
|
460
|
+
setModalVisible(false);
|
|
461
|
+
} }, i18next.t('取消'))) },
|
|
462
|
+
React.createElement("div", { className: "search-drawer--template-title" },
|
|
463
|
+
i18next.t('当前正在修改'),
|
|
464
|
+
React.createElement("b", null, currentTemplateTitleRef.current),
|
|
465
|
+
i18next.t(',是否确认保存'),
|
|
466
|
+
"\uFF1F",
|
|
467
|
+
i18next.t("若为新增模板请点击'模板设置'维护名称。")))));
|
|
142
468
|
}
|
|
143
469
|
function Container(_a) {
|
|
144
|
-
var dynamicColumns = _a.dynamicColumns, onFindItemHandle = _a.onFindItemHandle, onMoveItemHandle = _a.onMoveItemHandle, onConfigItemHandle = _a.onConfigItemHandle;
|
|
470
|
+
var dynamicColumns = _a.dynamicColumns, checkedValues = _a.checkedValues, filterDynamicColumns = _a.filterDynamicColumns, onFindItemHandle = _a.onFindItemHandle, onMoveItemHandle = _a.onMoveItemHandle, onConfigItemHandle = _a.onConfigItemHandle, onGroupCheckHandle = _a.onGroupCheckHandle, onLeafToggleHandle = _a.onLeafToggleHandle;
|
|
145
471
|
var _b = useDrop(function () { return ({ accept: dynamicColumnDragType }); }), drop = _b[1];
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
472
|
+
var containerRef = useRef(null);
|
|
473
|
+
// 搜索过滤变化时,滚动到第一个命中项
|
|
474
|
+
useEffect(function () {
|
|
475
|
+
if (filterDynamicColumns && filterDynamicColumns.length > 0) {
|
|
476
|
+
requestAnimationFrame(function () {
|
|
477
|
+
var _a;
|
|
478
|
+
var firstActive = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('.zt-sortable.active');
|
|
479
|
+
firstActive === null || firstActive === void 0 ? void 0 : firstActive.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
}, [filterDynamicColumns]);
|
|
483
|
+
/**
|
|
484
|
+
* 递归渲染列节点(支持任意层级表头)
|
|
485
|
+
* @param column 列配置
|
|
486
|
+
* @param depth 嵌套深度(0 为一级列,控制缩进:分组标题 16+depth*20,叶子 36+(depth-1)*20)
|
|
487
|
+
* @param draggable 是否可拖拽(仅一级列参与排序,嵌套子级整体跟随一级分组移动)
|
|
488
|
+
*/
|
|
489
|
+
var renderColumnNode = function (column, depth, draggable) {
|
|
490
|
+
var columnId = getColumnId(column);
|
|
491
|
+
var isActive = filterDynamicColumns
|
|
492
|
+
? isInFilterTree(filterDynamicColumns, columnId)
|
|
493
|
+
: false;
|
|
494
|
+
// 分组列:父节点 Checkbox 控制整组显隐,子级递归渲染逐级缩进
|
|
495
|
+
if (isGroupColumn(column)) {
|
|
496
|
+
var groupTitle = column.titleAlias || column.title;
|
|
497
|
+
if (typeof groupTitle !== 'string') {
|
|
498
|
+
return null;
|
|
499
|
+
}
|
|
500
|
+
var childKeys = getLeafKeys(column.children);
|
|
501
|
+
var checkedCount = childKeys.filter(function (key) {
|
|
502
|
+
return checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.includes(key);
|
|
503
|
+
}).length;
|
|
504
|
+
var groupContent = (React.createElement(React.Fragment, null,
|
|
505
|
+
React.createElement("div", { className: "zt-sortable--group-title", style: depth > 0 ? { paddingLeft: 16 + depth * 20 } : undefined },
|
|
506
|
+
React.createElement(Checkbox, { checked: childKeys.length > 0 && checkedCount === childKeys.length, indeterminate: checkedCount > 0 && checkedCount < childKeys.length, onChange: function (e) { return onGroupCheckHandle(column, e.target.checked); } },
|
|
507
|
+
React.createElement("b", null, groupTitle))),
|
|
508
|
+
column.children.map(function (child) {
|
|
509
|
+
return renderColumnNode(child, depth + 1, false);
|
|
510
|
+
})));
|
|
511
|
+
if (draggable) {
|
|
512
|
+
// 一级分组:整组可拖拽排序
|
|
513
|
+
return (React.createElement(SortableCancel, { className: isActive ? 'zt-sortable--group active' : 'zt-sortable--group', type: dynamicColumnDragType, key: columnId, id: columnId, onFindItem: onFindItemHandle, onMoveItem: onMoveItemHandle, tipTitle: groupTitle }, groupContent));
|
|
514
|
+
}
|
|
515
|
+
// 嵌套分组(二级及以下,即三级表头的中间层):不可拖拽,跟随一级分组移动
|
|
516
|
+
return (React.createElement("div", { key: columnId, className: isActive ? 'active' : '' }, groupContent));
|
|
517
|
+
}
|
|
518
|
+
// 叶子列(普通一级列 / 分组内任意层级子列)
|
|
519
|
+
if (!column.key && !column.dataIndex) {
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
var leafId = "" + (column.key || column.dataIndex);
|
|
523
|
+
var content = (React.createElement(React.Fragment, null,
|
|
524
|
+
React.createElement(Checkbox, { checked: checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.includes(leafId), disabled: column.isNoDynamicHide, onChange: function (e) { return onLeafToggleHandle(leafId, e.target.checked); } }, column.titleAlias || column.title),
|
|
525
|
+
draggable && (React.createElement(DynamicItemConfig, { fixed: column.fixed, onConfigItemHandle: function (e) {
|
|
526
|
+
var _a;
|
|
527
|
+
onConfigItemHandle((_a = {},
|
|
528
|
+
_a[leafId] = e,
|
|
529
|
+
_a));
|
|
530
|
+
} }))));
|
|
531
|
+
if (!draggable) {
|
|
532
|
+
// 分组内子列行(不参与拖拽),缩进随层级递增
|
|
533
|
+
return (React.createElement("div", { key: leafId, className: isActive
|
|
534
|
+
? 'zt-sortable--group-child active'
|
|
535
|
+
: 'zt-sortable--group-child', style: { paddingLeft: 36 + (depth - 1) * 20 } }, content));
|
|
536
|
+
}
|
|
537
|
+
return (React.createElement(SortableCancel, { className: isActive ? 'active' : '', type: dynamicColumnDragType, key: leafId, id: leafId, onFindItem: onFindItemHandle, onMoveItem: onMoveItemHandle, tipTitle: column.titleAlias || column.title }, content));
|
|
538
|
+
};
|
|
539
|
+
return (React.createElement("div", { className: "zt-table__dynamic__column-list", ref: function (node) {
|
|
540
|
+
drop(node);
|
|
541
|
+
containerRef.current = node;
|
|
542
|
+
} }, Array.isArray(dynamicColumns) &&
|
|
543
|
+
dynamicColumns.map(function (column) { return renderColumnNode(column, 0, true); })));
|
|
157
544
|
}
|
|
158
545
|
export default memo(TableDynamic);
|
|
@@ -39,6 +39,9 @@ interface IEditableCellProps {
|
|
|
39
39
|
columns: any;
|
|
40
40
|
onTableChange: any;
|
|
41
41
|
currentpage: ICurrentPage;
|
|
42
|
+
isModalInput: boolean;
|
|
43
|
+
/** 不渲染td外壳(右键查看明细弹框中渲染可编辑控件时使用) */
|
|
44
|
+
noTdWrap?: boolean;
|
|
42
45
|
[props: string]: any;
|
|
43
46
|
}
|
|
44
47
|
declare const _default: React.NamedExoticComponent<IEditableCellProps>;
|