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
|
@@ -61,6 +61,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
61
61
|
to[j] = from[i];
|
|
62
62
|
return to;
|
|
63
63
|
};
|
|
64
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
64
65
|
import React, { useCallback, memo, useState, useEffect, useRef, useMemo, useImperativeHandle, } from 'react';
|
|
65
66
|
import { unstable_batchedUpdates } from 'react-dom';
|
|
66
67
|
import { Table as AntTable } from 'antd';
|
|
@@ -73,6 +74,7 @@ import TableEnhanceCell from './table-enhance-cell';
|
|
|
73
74
|
import TableResizableTitle from './table-resizable-title';
|
|
74
75
|
import useColumns, { setDynamicKey, getStorage, } from './hooks/useColumns';
|
|
75
76
|
import useSelectSubtotal from './hooks/useSelectSubtotal';
|
|
77
|
+
import useVituralScrollBar from './hooks/useVituralScrollBar';
|
|
76
78
|
import getSummaryData from './utils/getSummaryData';
|
|
77
79
|
import { domFind,
|
|
78
80
|
// domParentsUntil,
|
|
@@ -91,6 +93,38 @@ import { VList, scrollTo } from 'virtuallist-antd';
|
|
|
91
93
|
import useInnerPagination, { getInnerIndex } from './hooks/useInnerPagination';
|
|
92
94
|
import { INNER_PARENT_ROW_KEY, INNER_PARENT_ROW_KEY_NO } from './constants';
|
|
93
95
|
import useLastest from '../utils/useLastest';
|
|
96
|
+
import useBaseContext from '../utils/useBaseContext';
|
|
97
|
+
import { useContextMenu } from 'react-contexify';
|
|
98
|
+
import TableMenu from './table-menu';
|
|
99
|
+
import { FrownOutlined } from '@ant-design/icons';
|
|
100
|
+
/**
|
|
101
|
+
* 序列化列配置用于本地缓存(递归处理多级表头)
|
|
102
|
+
* 分组列(children)只保留 title/hideColumn/fixed/children,
|
|
103
|
+
* 子列按 key/dataIndex 匹配保留动态列配置项;render 等函数不缓存,
|
|
104
|
+
* 恢复时由 getTableLayoutFullData 按原始 columns 合并回来
|
|
105
|
+
*/
|
|
106
|
+
var serializeColumns = function (columns) {
|
|
107
|
+
return columns.map(function (item) {
|
|
108
|
+
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
109
|
+
return {
|
|
110
|
+
title: item.title,
|
|
111
|
+
hideColumn: item.hideColumn,
|
|
112
|
+
fixed: item.fixed,
|
|
113
|
+
children: serializeColumns(item.children),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (item.dataIndex || item.key) {
|
|
117
|
+
return {
|
|
118
|
+
dataIndex: item.dataIndex,
|
|
119
|
+
key: item.key,
|
|
120
|
+
hideColumn: item.hideColumn,
|
|
121
|
+
width: item.width,
|
|
122
|
+
fixed: item.fixed,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return __assign({}, item);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
94
128
|
/**默认scroll配置 */
|
|
95
129
|
// const _scroll = { y: 500, x: 1000 };
|
|
96
130
|
var _scroll = { x: 1000 };
|
|
@@ -104,6 +138,11 @@ var components = {
|
|
|
104
138
|
cell: TableEnhanceCell,
|
|
105
139
|
},
|
|
106
140
|
};
|
|
141
|
+
var tableLocal = {
|
|
142
|
+
emptyText: (React.createElement("div", null,
|
|
143
|
+
React.createElement(FrownOutlined, { style: { marginRight: '6px' } }),
|
|
144
|
+
i18next.t('暂无数据'))),
|
|
145
|
+
};
|
|
107
146
|
/**
|
|
108
147
|
* TodoList
|
|
109
148
|
* 实现列拖拽切换位置、显隐功能 completed
|
|
@@ -123,22 +162,73 @@ export function usePrevious(value) {
|
|
|
123
162
|
}
|
|
124
163
|
function Table(props) {
|
|
125
164
|
var _this = this;
|
|
126
|
-
var _a, _b;
|
|
127
|
-
var className = props.className, scroll = props.scroll,
|
|
128
|
-
|
|
129
|
-
restProps = __rest(props, ["className", "scroll", "pagination", "bordered", "columns", "initColumns", "dataSource", "onAddAndDelHandle", "hideAddIcon", "addIconText", "hideDelIcon", "showDelAllBtn", "delAllChange", "delIconText", "hiddenColumnDynamicIcon", "showColumnDynamic", "showColumnDynamicKey", "summaryConfig", "summaryFixed", "summary", "onMoveRow", "onEditableSave", "onDynamicChange", "isResizableColumn", "configInfo", "tableHandleRef", "tableName", "isFlex", "onTableChange", "rowSelection", "showInnerPagination", "defaultInnerPageSize", "virtualTableKey", "isSort", "onSortChange", "onFillDownChange"]);
|
|
165
|
+
var _a, _b, _c, _d;
|
|
166
|
+
var className = props.className, scroll = props.scroll, _e = props.pagination, pagination = _e === void 0 ? false : _e, _f = props.bordered, bordered = _f === void 0 ? true : _f, _columns = props.columns, initColumns = props.initColumns, dataSource = props.dataSource, onAddAndDelHandle = props.onAddAndDelHandle, hideAddIcon = props.hideAddIcon, addIconText = props.addIconText, hideDelIcon = props.hideDelIcon, showDelAllBtn = props.showDelAllBtn, delAllChange = props.delAllChange, delIconText = props.delIconText, hiddenColumnDynamicIcon = props.hiddenColumnDynamicIcon, showColumnDynamic = props.showColumnDynamic, showColumnDynamicKey = props.showColumnDynamicKey, summaryConfig = props.summaryConfig, summaryFixed = props.summaryFixed, summary = props.summary, onMoveRow = props.onMoveRow, onEditableSave = props.onEditableSave, onDynamicChange = props.onDynamicChange, _g = props.isResizableColumn, isResizableColumn = _g === void 0 ? true : _g, configInfo = props.configInfo, tableHandleRef = props.tableHandleRef, tableName = props.tableName, isFlex = props.isFlex, onTableChange = props.onTableChange, rowSelection = props.rowSelection, showInnerPagination = props.showInnerPagination, defaultInnerPageSize = props.defaultInnerPageSize, virtualTableKey = props.virtualTableKey, isSort = props.isSort, isFilter = props.isFilter, onSortChange = props.onSortChange, onFillDownChange = props.onFillDownChange, _h = props.isModalInput, isModalInput = _h === void 0 ? false : _h, // 默认关闭这个功能
|
|
167
|
+
onRow = props.onRow, isOpenVirtualScrollBar = props.isOpenVirtualScrollBar, _j = props.isNumberInputThousandth, isNumberInputThousandth = _j === void 0 ? true : _j, _k = props.isNumberInputAlignRight, isNumberInputAlignRight = _k === void 0 ? true : _k, _l = props.isContextMenuFullscreen, isContextMenuFullscreen = _l === void 0 ? true : _l, isContextMenu = props.isContextMenu, originGetPopupContainer = props.getPopupContainer, restProps = __rest(props, ["className", "scroll", "pagination", "bordered", "columns", "initColumns", "dataSource", "onAddAndDelHandle", "hideAddIcon", "addIconText", "hideDelIcon", "showDelAllBtn", "delAllChange", "delIconText", "hiddenColumnDynamicIcon", "showColumnDynamic", "showColumnDynamicKey", "summaryConfig", "summaryFixed", "summary", "onMoveRow", "onEditableSave", "onDynamicChange", "isResizableColumn", "configInfo", "tableHandleRef", "tableName", "isFlex", "onTableChange", "rowSelection", "showInnerPagination", "defaultInnerPageSize", "virtualTableKey", "isSort", "isFilter", "onSortChange", "onFillDownChange", "isModalInput", "onRow", "isOpenVirtualScrollBar", "isNumberInputThousandth", "isNumberInputAlignRight", "isContextMenuFullscreen", "isContextMenu", "getPopupContainer"]);
|
|
130
168
|
var onChange = restProps.onChange;
|
|
131
169
|
var classes = classNames('zt-table', className, {
|
|
132
170
|
'zt-table--flex': isFlex,
|
|
133
171
|
});
|
|
134
|
-
var
|
|
172
|
+
var _m = useState(false), dynamicVisible = _m[0], setDynamicVisible = _m[1];
|
|
135
173
|
var showDynamicHandle = useCallback(function () { return setDynamicVisible(true); }, []);
|
|
136
174
|
var hideDynamicHandle = useCallback(function () { return setDynamicVisible(false); }, []);
|
|
137
175
|
var dataSourceRef = useRef();
|
|
138
176
|
var preDataSource = usePrevious(dataSource);
|
|
139
|
-
var
|
|
177
|
+
var _o = useState(), sortDataSource = _o[0], setSortDataSource = _o[1];
|
|
178
|
+
// 右键菜单(查看明细/全屏):
|
|
179
|
+
// - 表格级 isContextMenu 优先;不传时按表格类型取对应全局配置:
|
|
180
|
+
// 列表表格取 isTableShowContextMenu(默认开启),编辑表格取 isTableEditShowContextMenu(默认关闭)
|
|
181
|
+
// - 注意:Provider的value是整体替换,业务侧配置对象未写的字段为undefined,这里需兜底默认值
|
|
182
|
+
var _p = useBaseContext(), isTableShowContextMenu = _p.isTableShowContextMenu, isTableEditShowContextMenu = _p.isTableEditShowContextMenu;
|
|
183
|
+
var showContextMenu = isContextMenu !== null && isContextMenu !== void 0 ? isContextMenu : (onEditableSave
|
|
184
|
+
? isTableEditShowContextMenu !== null && isTableEditShowContextMenu !== void 0 ? isTableEditShowContextMenu : false
|
|
185
|
+
: isTableShowContextMenu !== null && isTableShowContextMenu !== void 0 ? isTableShowContextMenu : true);
|
|
186
|
+
var menuId = useState(showContextMenu
|
|
187
|
+
? 'menuId-' + Math.floor(Math.random() * 100000000)
|
|
188
|
+
: undefined)[0];
|
|
189
|
+
var tableMenuRef = useRef(null);
|
|
190
|
+
var menuShow = useContextMenu({
|
|
191
|
+
id: menuId,
|
|
192
|
+
}).show;
|
|
193
|
+
/**
|
|
194
|
+
* 浏览器全屏时,全屏元素位于 top layer,挂在 body 上的浮层(过滤下拉等)会被遮挡。
|
|
195
|
+
* 1. getPopupContainer:全屏时把表格浮层挂到表格容器内(实时读取 fullscreenElement,不依赖状态);
|
|
196
|
+
* 2. fullscreenchange:rc-util 的弹层容器只在首次打开时确定挂载点,
|
|
197
|
+
* 非全屏时打开过的过滤弹层仍留在 body,进入全屏后需迁移到全屏元素内,退出时迁回。
|
|
198
|
+
*/
|
|
199
|
+
useEffect(function () {
|
|
200
|
+
var onFullscreenChange = function () {
|
|
201
|
+
var fullscreenEl = document.fullscreenElement;
|
|
202
|
+
if (fullscreenEl) {
|
|
203
|
+
// 仅当前表格在全屏元素内时才迁移(全屏的可能是别的容器)
|
|
204
|
+
if (!tableRef.current || !fullscreenEl.contains(tableRef.current)) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
Array.from(document.body.children).forEach(function (node) {
|
|
208
|
+
var el = node;
|
|
209
|
+
if (el.tagName === 'DIV' &&
|
|
210
|
+
el.querySelector('.ant-table-filter-dropdown')) {
|
|
211
|
+
el.dataset.ztPopupMoved = 'fullscreen';
|
|
212
|
+
fullscreenEl.appendChild(el);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
document
|
|
218
|
+
.querySelectorAll('[data-zt-popup-moved]')
|
|
219
|
+
.forEach(function (el) {
|
|
220
|
+
delete el.dataset.ztPopupMoved;
|
|
221
|
+
document.body.appendChild(el);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
document.addEventListener('fullscreenchange', onFullscreenChange);
|
|
226
|
+
return function () {
|
|
227
|
+
document.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
228
|
+
};
|
|
229
|
+
}, []);
|
|
140
230
|
// 内部分页相关配置
|
|
141
|
-
var
|
|
231
|
+
var _q = useInnerPagination(showInnerPagination, defaultInnerPageSize), paginationConfig = _q.paginationConfig, currentPage = _q.currentPage, setCurrent = _q.setCurrent, pageSize = _q.pageSize;
|
|
142
232
|
var rowSelectionDataSource = useRef({});
|
|
143
233
|
var myScroll = useMemo(function () {
|
|
144
234
|
if (scroll) {
|
|
@@ -182,6 +272,11 @@ function Table(props) {
|
|
|
182
272
|
(_a = props === null || props === void 0 ? void 0 : props.expandable) === null || _a === void 0 ? void 0 : _a.childrenColumnName,
|
|
183
273
|
props.rowKey,
|
|
184
274
|
]);
|
|
275
|
+
// 最终显示数据
|
|
276
|
+
var currentDataSourceRef = useRef([]);
|
|
277
|
+
currentDataSourceRef.current = sortDataSource
|
|
278
|
+
? sortDataSource
|
|
279
|
+
: expandableDataSource;
|
|
185
280
|
/**columns更新,重新设置columns */
|
|
186
281
|
useEffect(function () {
|
|
187
282
|
dataSourceRef.current = expandableDataSource;
|
|
@@ -197,7 +292,7 @@ function Table(props) {
|
|
|
197
292
|
try {
|
|
198
293
|
if ((navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) && window.isSecureContext) {
|
|
199
294
|
(_b = (_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(str)) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
200
|
-
message.info('复制成功!');
|
|
295
|
+
message.info(i18next.t('复制成功!'));
|
|
201
296
|
});
|
|
202
297
|
}
|
|
203
298
|
else {
|
|
@@ -206,17 +301,17 @@ function Table(props) {
|
|
|
206
301
|
document.body.appendChild(textarea);
|
|
207
302
|
textarea.select();
|
|
208
303
|
if (document.execCommand) {
|
|
209
|
-
message.info('复制成功!');
|
|
304
|
+
message.info(i18next.t('复制成功!'));
|
|
210
305
|
document.execCommand('copy');
|
|
211
306
|
}
|
|
212
307
|
else {
|
|
213
|
-
message.info(
|
|
308
|
+
message.info(i18next.t('复制失败!请手工复制 {{str}}', { str: str }));
|
|
214
309
|
}
|
|
215
310
|
document.body.removeChild(textarea);
|
|
216
311
|
}
|
|
217
312
|
}
|
|
218
313
|
catch (err) {
|
|
219
|
-
message.info(
|
|
314
|
+
message.info(i18next.t('复制失败!请手工复制 {{str}}', { str: str }));
|
|
220
315
|
}
|
|
221
316
|
}
|
|
222
317
|
}, []);
|
|
@@ -260,7 +355,7 @@ function Table(props) {
|
|
|
260
355
|
onTableChange && onTableChange(resultTextList, startIndex);
|
|
261
356
|
}, [clearErrorClass, onTableChange]);
|
|
262
357
|
// 2023-05-04 自定义表格排序方法
|
|
263
|
-
var
|
|
358
|
+
var _r = useState(), customOrder = _r[0], setCustomOrder = _r[1];
|
|
264
359
|
var customSortHandle = useCallback(function (info, options) {
|
|
265
360
|
if (Array.isArray(expandableDataSource) &&
|
|
266
361
|
expandableDataSource.length > 1) {
|
|
@@ -293,18 +388,34 @@ function Table(props) {
|
|
|
293
388
|
onChange(null, null, { field: field_1, order: order }, null);
|
|
294
389
|
return;
|
|
295
390
|
}
|
|
391
|
+
// const handle = (a, b) => {
|
|
392
|
+
// const result = a[field] - b[field];
|
|
393
|
+
// if (!isNaN(result)) {
|
|
394
|
+
// return result;
|
|
395
|
+
// }
|
|
396
|
+
// if (a[field] < b[field]) {
|
|
397
|
+
// return -1;
|
|
398
|
+
// } else if (a[field] > b[field]) {
|
|
399
|
+
// return 1;
|
|
400
|
+
// }
|
|
401
|
+
// return 0;
|
|
402
|
+
// };
|
|
296
403
|
var handle_1 = function (a, b) {
|
|
297
|
-
var
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
else if (a[field_1] > b[field_1]) {
|
|
404
|
+
var va = a[field_1];
|
|
405
|
+
var vb = b[field_1];
|
|
406
|
+
// 空值统一沉底(降序取反后会浮到最前,若要求“始终沉底”需在外层单独处理)
|
|
407
|
+
if (va == null && vb == null)
|
|
408
|
+
return 0;
|
|
409
|
+
if (va == null)
|
|
305
410
|
return 1;
|
|
411
|
+
if (vb == null)
|
|
412
|
+
return -1;
|
|
413
|
+
var na = Number(va);
|
|
414
|
+
var nb = Number(vb);
|
|
415
|
+
if (va !== '' && vb !== '' && !isNaN(na) && !isNaN(nb)) {
|
|
416
|
+
return na - nb; // 数字(含数字字符串)
|
|
306
417
|
}
|
|
307
|
-
return
|
|
418
|
+
return String(va).localeCompare(String(vb), 'zh-CN'); // 中文拼音序
|
|
308
419
|
};
|
|
309
420
|
if (order === 'ascend') {
|
|
310
421
|
setSortDataSource(expandableDataSource.slice().sort(function (a, b) {
|
|
@@ -321,12 +432,14 @@ function Table(props) {
|
|
|
321
432
|
}
|
|
322
433
|
}
|
|
323
434
|
}, [expandableDataSource, onSortChange, onChange]);
|
|
435
|
+
// 记录自动小数位(数据有几位小数就显示几位小数,影响小计)
|
|
436
|
+
var autoDecimalFieldsRef = useRef({});
|
|
324
437
|
/**
|
|
325
438
|
* @description 根据配置生成一个新的columns
|
|
326
439
|
* 以及一个需要动态列配置的columns
|
|
327
440
|
*/
|
|
328
441
|
var onFillDownChangeRef = useLastest(onFillDownChange);
|
|
329
|
-
var
|
|
442
|
+
var _s = useColumns({
|
|
330
443
|
columns: _columns,
|
|
331
444
|
hiddenColumnDynamicIcon: hiddenColumnDynamicIcon,
|
|
332
445
|
showColumnDynamic: showColumnDynamic,
|
|
@@ -353,8 +466,13 @@ function Table(props) {
|
|
|
353
466
|
customOrder: customOrder,
|
|
354
467
|
setCustomOrder: setCustomOrder,
|
|
355
468
|
isSort: isSort,
|
|
469
|
+
isFilter: isFilter,
|
|
356
470
|
onFillDownChangeRef: onFillDownChangeRef,
|
|
357
|
-
|
|
471
|
+
isModalInput: isModalInput,
|
|
472
|
+
isNumberInputThousandth: isNumberInputThousandth,
|
|
473
|
+
isNumberInputAlignRight: isNumberInputAlignRight,
|
|
474
|
+
autoDecimalFieldsRef: autoDecimalFieldsRef,
|
|
475
|
+
}), newColumns = _s.newColumns, dynamicColumns = _s.dynamicColumns, refreshColumnsHandle = _s.refreshColumnsHandle;
|
|
358
476
|
/**
|
|
359
477
|
* @description 保存列配置
|
|
360
478
|
*/
|
|
@@ -372,27 +490,33 @@ function Table(props) {
|
|
|
372
490
|
// });
|
|
373
491
|
// 记录width信息
|
|
374
492
|
// let _newColumns = [...leftArr, ...dynamicColumns, ...rightArr];
|
|
375
|
-
// 同步width
|
|
376
|
-
var
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
hideColumn: item.hideColumn,
|
|
390
|
-
width: item.width,
|
|
391
|
-
fixed: item.fixed,
|
|
392
|
-
};
|
|
493
|
+
// 同步width(递归查找,兼容多级表头子列的宽度同步)
|
|
494
|
+
var findColumnByItem_1 = function (cols, item) {
|
|
495
|
+
for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
|
|
496
|
+
var col = cols_1[_i];
|
|
497
|
+
if ((col.dataIndex && col.dataIndex === item.dataIndex) ||
|
|
498
|
+
(col.key && col.key === item.key)) {
|
|
499
|
+
return col;
|
|
500
|
+
}
|
|
501
|
+
if (Array.isArray(col.children) && col.children.length > 0) {
|
|
502
|
+
var found = findColumnByItem_1(col.children, item);
|
|
503
|
+
if (found) {
|
|
504
|
+
return found;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
393
507
|
}
|
|
394
|
-
return
|
|
395
|
-
}
|
|
508
|
+
return undefined;
|
|
509
|
+
};
|
|
510
|
+
var syncColumnWidth_1 = function (item) {
|
|
511
|
+
var _a;
|
|
512
|
+
var column = findColumnByItem_1(newColumns, item);
|
|
513
|
+
var width = (_a = column === null || column === void 0 ? void 0 : column.width) !== null && _a !== void 0 ? _a : item.width;
|
|
514
|
+
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
515
|
+
return __assign(__assign({}, item), { children: item.children.map(syncColumnWidth_1) });
|
|
516
|
+
}
|
|
517
|
+
return width != null ? __assign(__assign({}, item), { width: width }) : item;
|
|
518
|
+
};
|
|
519
|
+
var catchColumns = serializeColumns(dynamicColumns.map(syncColumnWidth_1));
|
|
396
520
|
if (showColumnDynamicKey) {
|
|
397
521
|
setDynamicKey(showColumnDynamicKey, catchColumns);
|
|
398
522
|
}
|
|
@@ -411,21 +535,7 @@ function Table(props) {
|
|
|
411
535
|
*/
|
|
412
536
|
var resetDynamicHandle = useCallback(function () {
|
|
413
537
|
var _initColumns = initColumns || _columns || [];
|
|
414
|
-
var catchColumns = (_initColumns || [])
|
|
415
|
-
if (item.dataIndex || item.key) {
|
|
416
|
-
return {
|
|
417
|
-
dataIndex: item.dataIndex,
|
|
418
|
-
key: item.key,
|
|
419
|
-
hideColumn: item.hideColumn,
|
|
420
|
-
width: item.width,
|
|
421
|
-
fixed: item.fixed,
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
// 20230815 去掉没有赋key的默认赋title的逻辑
|
|
425
|
-
// 这个逻辑会引发一些bug
|
|
426
|
-
// return { ...item, dataIndex: item.title, key: item.title };
|
|
427
|
-
return __assign({}, item);
|
|
428
|
-
});
|
|
538
|
+
var catchColumns = serializeColumns(_initColumns || []);
|
|
429
539
|
if (showColumnDynamicKey) {
|
|
430
540
|
setDynamicKey(showColumnDynamicKey, catchColumns);
|
|
431
541
|
}
|
|
@@ -532,6 +642,31 @@ function Table(props) {
|
|
|
532
642
|
moverow: moveRowHandle,
|
|
533
643
|
});
|
|
534
644
|
}, [moveRowHandle]);
|
|
645
|
+
// 合并行属性:拖拽行、外部onRow、右键菜单
|
|
646
|
+
var onInnerRowHandle = useCallback(function (record, index) {
|
|
647
|
+
var moveRowObj = onMoveRow ? onRowHandle(record, index) : {};
|
|
648
|
+
var rowObj = onRow ? onRow(record, index) : {};
|
|
649
|
+
return __assign(__assign(__assign({}, moveRowObj), rowObj), (showContextMenu
|
|
650
|
+
? {
|
|
651
|
+
onContextMenuCapture: function (e) {
|
|
652
|
+
menuShow(e, {
|
|
653
|
+
props: {
|
|
654
|
+
record: record,
|
|
655
|
+
index: index,
|
|
656
|
+
currentDataSourceRef: currentDataSourceRef,
|
|
657
|
+
},
|
|
658
|
+
});
|
|
659
|
+
},
|
|
660
|
+
}
|
|
661
|
+
: {}));
|
|
662
|
+
}, [
|
|
663
|
+
onRowHandle,
|
|
664
|
+
onMoveRow,
|
|
665
|
+
onRow,
|
|
666
|
+
menuShow,
|
|
667
|
+
currentDataSourceRef,
|
|
668
|
+
showContextMenu,
|
|
669
|
+
]);
|
|
535
670
|
/** 伸缩列 */
|
|
536
671
|
var handleResize = useCallback(function (index) {
|
|
537
672
|
return function (_, _a) {
|
|
@@ -702,11 +837,14 @@ function Table(props) {
|
|
|
702
837
|
hasExpandable: (props === null || props === void 0 ? void 0 : props.expandable) && ((_a = props === null || props === void 0 ? void 0 : props.expandable) === null || _a === void 0 ? void 0 : _a.expandedRowRender)
|
|
703
838
|
? true
|
|
704
839
|
: false,
|
|
840
|
+
}, {
|
|
841
|
+
getAutoDecimalFields: function () { return autoDecimalFieldsRef.current; },
|
|
705
842
|
});
|
|
706
843
|
return (React.createElement(AntTable.Summary, { fixed: summaryFixed ? summaryFixed : virtualTableKey ? true : false }, summaryData.map(function (summary) {
|
|
707
844
|
var title = summary.title, key = summary.key, titleIndex = summary.titleIndex, list = summary.list, columnList = summary.columnList, onClickHandle = summary.onClickHandle;
|
|
708
845
|
return (React.createElement(AntTable.Summary.Row, { key: key }, Array.isArray(list) &&
|
|
709
846
|
list.map(function (item, index) {
|
|
847
|
+
var _a, _b;
|
|
710
848
|
var data = {
|
|
711
849
|
index: index,
|
|
712
850
|
column: Array.isArray(columnList)
|
|
@@ -715,10 +853,14 @@ function Table(props) {
|
|
|
715
853
|
num: item,
|
|
716
854
|
};
|
|
717
855
|
if (titleIndex === index) {
|
|
718
|
-
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index
|
|
856
|
+
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index, align: isNumberInputAlignRight
|
|
857
|
+
? 'right'
|
|
858
|
+
: (_a = data === null || data === void 0 ? void 0 : data.column) === null || _a === void 0 ? void 0 : _a.align }, onClickHandle ? (React.createElement("div", { onClick: function () { return onClickHandle === null || onClickHandle === void 0 ? void 0 : onClickHandle(data); } }, title)) : (title)));
|
|
719
859
|
}
|
|
720
860
|
else {
|
|
721
|
-
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index
|
|
861
|
+
return (React.createElement(AntTable.Summary.Cell, { key: index, index: index, align: isNumberInputAlignRight
|
|
862
|
+
? 'right'
|
|
863
|
+
: (_b = data === null || data === void 0 ? void 0 : data.column) === null || _b === void 0 ? void 0 : _b.align },
|
|
722
864
|
React.createElement("div", { style: {
|
|
723
865
|
color: '#333',
|
|
724
866
|
}, onClick: function () {
|
|
@@ -735,6 +877,7 @@ function Table(props) {
|
|
|
735
877
|
summaryConfig,
|
|
736
878
|
summaryFixed,
|
|
737
879
|
virtualTableKey,
|
|
880
|
+
isNumberInputAlignRight,
|
|
738
881
|
]);
|
|
739
882
|
// 多选
|
|
740
883
|
var rowSelectionObj = useMemo(function () { return (__assign(__assign({}, rowSelection), { onChange: function (selectedRowKeys, selectedRows) {
|
|
@@ -762,7 +905,7 @@ function Table(props) {
|
|
|
762
905
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
763
906
|
}, [virtualTableKey]);
|
|
764
907
|
var tableComponents = useMemo(function () {
|
|
765
|
-
var _a, _b;
|
|
908
|
+
var _a, _b, _c;
|
|
766
909
|
var result = onMoveRow || onEditableSave
|
|
767
910
|
? components
|
|
768
911
|
: isResizableColumn
|
|
@@ -785,6 +928,21 @@ function Table(props) {
|
|
|
785
928
|
}
|
|
786
929
|
return __assign(__assign({}, result), vComponents);
|
|
787
930
|
}
|
|
931
|
+
// 解决body cell性能问题。去除无用的onMouseEnter onMouseLeave方法
|
|
932
|
+
if (!result.body) {
|
|
933
|
+
result.body = {
|
|
934
|
+
cell: function (_a) {
|
|
935
|
+
var onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, resetProps = __rest(_a, ["onMouseEnter", "onMouseLeave"]);
|
|
936
|
+
return React.createElement("td", __assign({}, resetProps));
|
|
937
|
+
},
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
if ((result === null || result === void 0 ? void 0 : result.body) && !((_c = result === null || result === void 0 ? void 0 : result.body) === null || _c === void 0 ? void 0 : _c.cell)) {
|
|
941
|
+
result.body.cell = function (_a) {
|
|
942
|
+
var onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, resetProps = __rest(_a, ["onMouseEnter", "onMouseLeave"]);
|
|
943
|
+
return React.createElement("td", __assign({}, resetProps));
|
|
944
|
+
};
|
|
945
|
+
}
|
|
788
946
|
return result;
|
|
789
947
|
}, [
|
|
790
948
|
isResizableColumn,
|
|
@@ -794,19 +952,37 @@ function Table(props) {
|
|
|
794
952
|
vComponents,
|
|
795
953
|
]);
|
|
796
954
|
var tipRef = useSelectSubtotal(tableRef, { onMoveRow: onMoveRow, onEditableSave: onEditableSave }).tipRef;
|
|
955
|
+
var createMiniMap = useVituralScrollBar(tableRef, {
|
|
956
|
+
isOpen: isOpenVirtualScrollBar,
|
|
957
|
+
scrollY: (_c = myScroll) === null || _c === void 0 ? void 0 : _c.y,
|
|
958
|
+
scrollX: (_d = myScroll) === null || _d === void 0 ? void 0 : _d.x,
|
|
959
|
+
}).createMiniMap;
|
|
797
960
|
return (React.createElement("div", { style: isFlex
|
|
798
961
|
? { position: 'relative', overflow: 'hidden', flex: 1 }
|
|
799
962
|
: { position: 'relative', overflow: 'hidden' }, ref: tableRef },
|
|
963
|
+
createMiniMap,
|
|
800
964
|
React.createElement(DndProvider, { backend: HTML5Backend, context: window },
|
|
801
965
|
React.createElement(AntTable, __assign({ className: classes, bordered: bordered, pagination: showInnerPagination
|
|
802
966
|
? pagination
|
|
803
967
|
? pagination
|
|
804
968
|
: paginationConfig
|
|
805
|
-
: pagination, scroll: myScroll, columns: mergeColumns, dataSource: sortDataSource ? sortDataSource : expandableDataSource, components: tableComponents, onRow:
|
|
969
|
+
: pagination, scroll: myScroll, columns: mergeColumns, dataSource: sortDataSource ? sortDataSource : expandableDataSource, components: tableComponents, onRow: onInnerRowHandle,
|
|
806
970
|
// onRow={onMoveRow ? onRowHandle : onRowFn}
|
|
807
|
-
summary: summaryConfig ? onSummaryHandle : summary, rowSelection: rowSelection ? rowSelectionObj : rowSelection }, restProps)
|
|
808
|
-
|
|
809
|
-
|
|
971
|
+
summary: summaryConfig ? onSummaryHandle : summary, rowSelection: rowSelection ? rowSelectionObj : rowSelection, locale: tableLocal }, restProps, { getPopupContainer: function (triggerNode) {
|
|
972
|
+
// 全屏时浮层必须挂到全屏元素内部,否则会被全屏元素遮挡(浏览器 top layer 机制)。
|
|
973
|
+
// 实时读取 fullscreenElement,不依赖 isFull 状态。
|
|
974
|
+
var fullscreenEl = document.fullscreenElement;
|
|
975
|
+
if (fullscreenEl &&
|
|
976
|
+
tableRef.current &&
|
|
977
|
+
fullscreenEl.contains(tableRef.current)) {
|
|
978
|
+
return tableRef.current;
|
|
979
|
+
}
|
|
980
|
+
// 不能返回 undefined:rc-trigger 拿不到挂载点会无限重试,弹层永不显示
|
|
981
|
+
return (originGetPopupContainer === null || originGetPopupContainer === void 0 ? void 0 : originGetPopupContainer(triggerNode)) || document.body;
|
|
982
|
+
} })),
|
|
983
|
+
showColumnDynamic && dynamicVisible && (React.createElement(TableDynamic, { visible: dynamicVisible, onClose: hideDynamicHandle, onSave: saveDynamicHandle, onReset: resetDynamicHandle, columns: dynamicColumns, dynamicStorageKey: showColumnDynamicKey }))),
|
|
984
|
+
React.createElement("div", { ref: tipRef, className: "table-subtotal--tip" }),
|
|
985
|
+
menuId && (React.createElement(TableMenu, { ref: tableMenuRef, menuId: menuId, columns: newColumns, originColumns: _columns, tableRef: tableRef, virtualTableKey: virtualTableKey, onEditableSave: onEditableSave, isContextMenuFullscreen: isContextMenuFullscreen, className: className }))));
|
|
810
986
|
}
|
|
811
987
|
// export default memo(Table, (prevProps, nextProps) => {
|
|
812
988
|
// return shallowEqual(prevProps, nextProps);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
/**
|
|
2
3
|
* @author 陈亚雄
|
|
3
4
|
* @description dom操作
|
|
@@ -32,7 +33,7 @@ export function createTr(data, titleIndex) {
|
|
|
32
33
|
var td = document.createElement('td');
|
|
33
34
|
td.innerText = i !== null && i !== void 0 ? i : '';
|
|
34
35
|
if (index === titleIndex) {
|
|
35
|
-
td.innerText = '小计';
|
|
36
|
+
td.innerText = i18next.t('小计');
|
|
36
37
|
}
|
|
37
38
|
tr.appendChild(td);
|
|
38
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function filterHandle(value: any, record: any, key: any): any;
|
|
1
|
+
export declare function filterHandle(value: any, record: any, key: any, _column: any): any;
|
|
@@ -1,29 +1,44 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
/* eslint-disable eqeqeq */
|
|
2
3
|
import { message } from 'antd';
|
|
3
4
|
var isMessage = false;
|
|
4
|
-
export function filterHandle(value, record, key) {
|
|
5
|
+
export function filterHandle(value, record, key, _column) {
|
|
5
6
|
var _a, _b, _c, _d;
|
|
6
7
|
var newValue = ((_b = (_a = value === null || value === void 0 ? void 0 : value.toString) === null || _a === void 0 ? void 0 : _a.call(value)) === null || _b === void 0 ? void 0 : _b.trim()) || null;
|
|
7
8
|
var currentValue = record && key ? record[key] : null;
|
|
9
|
+
if (_column.render) {
|
|
10
|
+
try {
|
|
11
|
+
var rel = _column.render(currentValue, record, 0);
|
|
12
|
+
if (typeof rel === 'string') {
|
|
13
|
+
currentValue = rel;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.log(error);
|
|
18
|
+
currentValue = record && key ? record[key] : null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
8
21
|
if (currentValue != null && newValue != null) {
|
|
9
|
-
if (newValue.startsWith(
|
|
10
|
-
|
|
22
|
+
if (newValue.startsWith(i18next.t('大于等于')) ||
|
|
23
|
+
newValue.startsWith('>=')) {
|
|
24
|
+
var subValue = Number(newValue.substring(newValue.startsWith(i18next.t('大于等于')) ? 4 : 2));
|
|
11
25
|
return currentValue >= subValue;
|
|
12
26
|
}
|
|
13
|
-
if (newValue.startsWith(
|
|
14
|
-
|
|
27
|
+
if (newValue.startsWith(i18next.t('小于等于')) ||
|
|
28
|
+
newValue.startsWith('<=')) {
|
|
29
|
+
var subValue = Number(newValue.substring(newValue.startsWith(i18next.t('小于等于')) ? 4 : 2));
|
|
15
30
|
return currentValue <= subValue;
|
|
16
31
|
}
|
|
17
|
-
if (newValue.startsWith('大于') || newValue.startsWith('>')) {
|
|
18
|
-
var subValue = Number(newValue.substring(newValue.startsWith('大于') ? 2 : 1));
|
|
32
|
+
if (newValue.startsWith(i18next.t('大于')) || newValue.startsWith('>')) {
|
|
33
|
+
var subValue = Number(newValue.substring(newValue.startsWith(i18next.t('大于')) ? 2 : 1));
|
|
19
34
|
return currentValue > subValue;
|
|
20
35
|
}
|
|
21
|
-
if (newValue.startsWith('小于') || newValue.startsWith('<')) {
|
|
22
|
-
var subValue = Number(newValue.substring(newValue.startsWith('小于') ? 2 : 1));
|
|
36
|
+
if (newValue.startsWith(i18next.t('小于')) || newValue.startsWith('<')) {
|
|
37
|
+
var subValue = Number(newValue.substring(newValue.startsWith(i18next.t('小于')) ? 2 : 1));
|
|
23
38
|
return currentValue < subValue;
|
|
24
39
|
}
|
|
25
|
-
if (newValue.startsWith('等于') || newValue.startsWith('=')) {
|
|
26
|
-
var subValue = Number(newValue.substring(newValue.startsWith('等于') ? 2 : 1));
|
|
40
|
+
if (newValue.startsWith(i18next.t('等于')) || newValue.startsWith('=')) {
|
|
41
|
+
var subValue = Number(newValue.substring(newValue.startsWith(i18next.t('等于')) ? 2 : 1));
|
|
27
42
|
return currentValue == subValue;
|
|
28
43
|
}
|
|
29
44
|
// 使用eval执行代码 长度不能过长。防止
|
|
@@ -38,7 +53,7 @@ export function filterHandle(value, record, key) {
|
|
|
38
53
|
console.log(err);
|
|
39
54
|
if (!isMessage) {
|
|
40
55
|
isMessage = true;
|
|
41
|
-
message.info('不要使用赋值语句如:1+1=2 /n 应该使用:1+1==2', 3, function () {
|
|
56
|
+
message.info(i18next.t('不要使用赋值语句如:1+1=2 /n 应该使用:1+1==2'), 3, function () {
|
|
42
57
|
isMessage = false;
|
|
43
58
|
});
|
|
44
59
|
}
|
|
@@ -26,5 +26,5 @@ export interface ISummaryConfig {
|
|
|
26
26
|
declare function getSummaryData(summaryConfig: ISummaryConfig[] | undefined, pageData: any, columns: any, { hasRowSelection, hasExpandable, }: {
|
|
27
27
|
hasRowSelection: boolean;
|
|
28
28
|
hasExpandable: boolean;
|
|
29
|
-
}): ISummaryData[];
|
|
29
|
+
}, option?: any): ISummaryData[];
|
|
30
30
|
export default getSummaryData;
|