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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISearchLayout } from './interface';
|
|
3
|
+
export declare const COMMON_SEARCH_KEY = "ztxk_form_common_record_search_key";
|
|
4
|
+
interface ICommonSearch {
|
|
5
|
+
/**
|
|
6
|
+
* 当前表单用哪个key来存储数据
|
|
7
|
+
*/
|
|
8
|
+
commonSearchKey: string;
|
|
9
|
+
isCommonSearchEnabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function useCommonSearch(options: ICommonSearch): {
|
|
12
|
+
commonSearchList: any[];
|
|
13
|
+
setCommonSearchList: React.Dispatch<React.SetStateAction<any[]>>;
|
|
14
|
+
currentCommonSearchKey: string;
|
|
15
|
+
setCurrentCommonSearchKey: React.Dispatch<React.SetStateAction<string>>;
|
|
16
|
+
reTransformData: (data: any, timeKeys?: any) => any;
|
|
17
|
+
setData: (data: any) => Promise<void>;
|
|
18
|
+
deleteData: (localIndex: number) => Promise<void>;
|
|
19
|
+
setReplaceData: (data: any) => Promise<any>;
|
|
20
|
+
updateServerData: () => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
interface ICommonSearchModal {
|
|
23
|
+
commonSearchList?: any[];
|
|
24
|
+
currentCommonSearchKey?: string;
|
|
25
|
+
setCurrentCommonSearchKey?: any;
|
|
26
|
+
form?: any;
|
|
27
|
+
setData?: any;
|
|
28
|
+
isCommonSearchEnabled?: boolean;
|
|
29
|
+
currentDynamicList?: ISearchLayout[];
|
|
30
|
+
setCurrentDynamicList?: (list: ISearchLayout[]) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function useCommonSearchModal(options: ICommonSearchModal): {
|
|
33
|
+
onCommonSearchHandle: () => void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
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
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
49
|
+
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, } from 'react';
|
|
50
|
+
import { Modal, message, Input } from '../../index';
|
|
51
|
+
import MyStorage from '../utils/MyStorage';
|
|
52
|
+
import dayjs from 'dayjs';
|
|
53
|
+
import { catchHandle } from '../utils/fetch';
|
|
54
|
+
export var COMMON_SEARCH_KEY = 'ztxk_form_common_record_search_key';
|
|
55
|
+
// 常用搜索hooks
|
|
56
|
+
export function useCommonSearch(options) {
|
|
57
|
+
var _this = this;
|
|
58
|
+
var commonSearchKey = options.commonSearchKey, isCommonSearchEnabled = options.isCommonSearchEnabled;
|
|
59
|
+
// 常用搜索列表存储实例
|
|
60
|
+
var storageRef = useRef(isCommonSearchEnabled
|
|
61
|
+
? new MyStorage({ tableKey: COMMON_SEARCH_KEY })
|
|
62
|
+
: null);
|
|
63
|
+
// 常用搜索列表
|
|
64
|
+
var _a = useState([]), commonSearchList = _a[0], setCommonSearchList = _a[1];
|
|
65
|
+
// 当前选中的常用搜索key值
|
|
66
|
+
var _b = useState(''), currentCommonSearchKey = _b[0], setCurrentCommonSearchKey = _b[1];
|
|
67
|
+
// 初始化常用搜索列表
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
if (commonSearchKey && storageRef.current) {
|
|
70
|
+
storageRef.current
|
|
71
|
+
.getItem(commonSearchKey)
|
|
72
|
+
.then(function (res) { return setCommonSearchList(res || []); });
|
|
73
|
+
}
|
|
74
|
+
}, []);
|
|
75
|
+
/**
|
|
76
|
+
* description: 数据转换。主要是将时间对象转成字符串
|
|
77
|
+
*/
|
|
78
|
+
var transformData = function (data) {
|
|
79
|
+
// 处理数据,将数据中的时间对象做一下转换
|
|
80
|
+
var dataValue = data;
|
|
81
|
+
var newDataValue = {}; // 为了不影响之前的数据
|
|
82
|
+
var timeKeys = [];
|
|
83
|
+
if (dataValue) {
|
|
84
|
+
Object.keys(dataValue).forEach(function (key) {
|
|
85
|
+
var value = dataValue[key];
|
|
86
|
+
if (Array.isArray(value)) {
|
|
87
|
+
newDataValue[key] = [];
|
|
88
|
+
value.forEach(function (item) {
|
|
89
|
+
if (dayjs.isDayjs(item)) {
|
|
90
|
+
timeKeys.push(key);
|
|
91
|
+
newDataValue[key].push(dayjs(item).format('YYYY-MM-DD HH:mm:ss'));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
newDataValue[key].push(item);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
var itemIsDayjs = dayjs.isDayjs(value);
|
|
100
|
+
if (itemIsDayjs) {
|
|
101
|
+
timeKeys.push(key);
|
|
102
|
+
}
|
|
103
|
+
newDataValue[key] = itemIsDayjs
|
|
104
|
+
? dayjs(value).format('YYYY-MM-DD HH:mm:ss')
|
|
105
|
+
: value;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
newDataValue: newDataValue,
|
|
111
|
+
timeKeys: timeKeys,
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* @description: 数据转换。主要是将时间字符串转成时间对象。
|
|
116
|
+
*/
|
|
117
|
+
var reTransformData = function (data, timeKeys) {
|
|
118
|
+
if (timeKeys === void 0) { timeKeys = []; }
|
|
119
|
+
// 处理数据,将数据中的时间对象做一下转换
|
|
120
|
+
var dataValue = data;
|
|
121
|
+
var newDataValue = {}; // 为了不影响之前的数据
|
|
122
|
+
if (dataValue) {
|
|
123
|
+
Object.keys(dataValue).forEach(function (key) {
|
|
124
|
+
var value = dataValue[key];
|
|
125
|
+
if (Array.isArray(value)) {
|
|
126
|
+
newDataValue[key] = [];
|
|
127
|
+
value.forEach(function (item) {
|
|
128
|
+
if (timeKeys.includes(key)) {
|
|
129
|
+
newDataValue[key].push(dayjs(item));
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
newDataValue[key].push(item);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
newDataValue[key] = timeKeys.includes(key) ? dayjs(value) : value;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return newDataValue;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* description: 存储数据
|
|
145
|
+
* @param {*} data 常用搜索数据
|
|
146
|
+
* @param {*} localIndex 本地存储索引 如果传了索引 就是修改
|
|
147
|
+
*/
|
|
148
|
+
var setData = function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
149
|
+
var localKey, _a, newDataValue, timeKeys, saveData;
|
|
150
|
+
var _b;
|
|
151
|
+
return __generator(this, function (_c) {
|
|
152
|
+
localKey = commonSearchKey;
|
|
153
|
+
_a = transformData(data.value), newDataValue = _a.newDataValue, timeKeys = _a.timeKeys;
|
|
154
|
+
saveData = __assign(__assign({}, data), { value: newDataValue, timeKeys: timeKeys });
|
|
155
|
+
return [2 /*return*/, (_b = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _b === void 0 ? void 0 : _b.getItem(localKey).then(function (res) {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
// 处理数据,将数据中的时间对象做一下转换
|
|
158
|
+
var result = res;
|
|
159
|
+
if (!result) {
|
|
160
|
+
result = [saveData];
|
|
161
|
+
}
|
|
162
|
+
else if (Array.isArray(result)) {
|
|
163
|
+
var index = result.findIndex(function (item) { return item.key === saveData.key; });
|
|
164
|
+
if (index !== -1) {
|
|
165
|
+
result[index] = saveData;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
result.unshift(saveData);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
setCommonSearchList(result);
|
|
172
|
+
return (_b = (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, result)) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
173
|
+
return updateServerData();
|
|
174
|
+
});
|
|
175
|
+
})];
|
|
176
|
+
});
|
|
177
|
+
}); };
|
|
178
|
+
/**
|
|
179
|
+
* description: 删除数据
|
|
180
|
+
* @param {*} localIndex 本地存储索引
|
|
181
|
+
*/
|
|
182
|
+
var deleteData = function (localIndex) { return __awaiter(_this, void 0, void 0, function () {
|
|
183
|
+
var localKey;
|
|
184
|
+
var _a;
|
|
185
|
+
return __generator(this, function (_b) {
|
|
186
|
+
localKey = commonSearchKey;
|
|
187
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
|
|
188
|
+
var _a, _b;
|
|
189
|
+
if (Array.isArray(res)) {
|
|
190
|
+
res.splice(localIndex, 1);
|
|
191
|
+
(_b = (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, res)) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
192
|
+
return updateServerData();
|
|
193
|
+
});
|
|
194
|
+
setCommonSearchList(res);
|
|
195
|
+
}
|
|
196
|
+
})];
|
|
197
|
+
});
|
|
198
|
+
}); };
|
|
199
|
+
/**
|
|
200
|
+
* description: 直接替换原有数据
|
|
201
|
+
* @param {*} data 常用搜索数据
|
|
202
|
+
*/
|
|
203
|
+
var setReplaceData = function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
+
var localKey;
|
|
205
|
+
var _a;
|
|
206
|
+
return __generator(this, function (_b) {
|
|
207
|
+
localKey = commonSearchKey;
|
|
208
|
+
setCommonSearchList(data);
|
|
209
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, data)];
|
|
210
|
+
});
|
|
211
|
+
}); };
|
|
212
|
+
/**
|
|
213
|
+
* 直接更新服务器数据
|
|
214
|
+
*/
|
|
215
|
+
var updateServerData = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
216
|
+
var _this = this;
|
|
217
|
+
var _a, _b;
|
|
218
|
+
return __generator(this, function (_c) {
|
|
219
|
+
return [2 /*return*/, (_b = (_a = storageRef.current) === null || _a === void 0 ? void 0 : _a.getAllItems()) === null || _b === void 0 ? void 0 : _b.then(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
220
|
+
var error_1;
|
|
221
|
+
return __generator(this, function (_a) {
|
|
222
|
+
switch (_a.label) {
|
|
223
|
+
case 0:
|
|
224
|
+
_a.trys.push([0, 2, , 3]);
|
|
225
|
+
return [4 /*yield*/, (catchHandle === null || catchHandle === void 0 ? void 0 : catchHandle({
|
|
226
|
+
customKey: COMMON_SEARCH_KEY,
|
|
227
|
+
customValue: JSON.stringify(res),
|
|
228
|
+
mark: i18next.t('常用搜索用户配置'),
|
|
229
|
+
}))];
|
|
230
|
+
case 1:
|
|
231
|
+
_a.sent();
|
|
232
|
+
return [3 /*break*/, 3];
|
|
233
|
+
case 2:
|
|
234
|
+
error_1 = _a.sent();
|
|
235
|
+
console.error(i18next.t('更新服务器数据失败!'), error_1);
|
|
236
|
+
return [3 /*break*/, 3];
|
|
237
|
+
case 3: return [2 /*return*/];
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}); })];
|
|
241
|
+
});
|
|
242
|
+
}); };
|
|
243
|
+
return {
|
|
244
|
+
commonSearchList: commonSearchList,
|
|
245
|
+
setCommonSearchList: setCommonSearchList,
|
|
246
|
+
currentCommonSearchKey: currentCommonSearchKey,
|
|
247
|
+
setCurrentCommonSearchKey: setCurrentCommonSearchKey,
|
|
248
|
+
reTransformData: reTransformData,
|
|
249
|
+
setData: setData,
|
|
250
|
+
deleteData: deleteData,
|
|
251
|
+
setReplaceData: setReplaceData,
|
|
252
|
+
updateServerData: updateServerData,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
export function useCommonSearchModal(options) {
|
|
256
|
+
var commonSearchList = options.commonSearchList, currentCommonSearchKey = options.currentCommonSearchKey, form = options.form, setData = options.setData, isCommonSearchEnabled = options.isCommonSearchEnabled, setCurrentCommonSearchKey = options.setCurrentCommonSearchKey, currentDynamicList = options.currentDynamicList;
|
|
257
|
+
var iptRef = useRef(null);
|
|
258
|
+
useEffect(function () {
|
|
259
|
+
var _a;
|
|
260
|
+
if (!isCommonSearchEnabled) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (!(commonSearchList === null || commonSearchList === void 0 ? void 0 : commonSearchList.length)) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
var currentCommon = commonSearchList.find(function (item) { return item.key === currentCommonSearchKey; });
|
|
267
|
+
if (currentCommon) {
|
|
268
|
+
(_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.setValue(currentCommon.title);
|
|
269
|
+
}
|
|
270
|
+
}, [currentCommonSearchKey, commonSearchList, isCommonSearchEnabled]);
|
|
271
|
+
/**
|
|
272
|
+
* 保存为常用搜索事件
|
|
273
|
+
*/
|
|
274
|
+
var onCommonSearchHandle = function () {
|
|
275
|
+
if (!form) {
|
|
276
|
+
message.info(i18next.t('组件需要接受表单实例form'));
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
Modal.confirm({
|
|
280
|
+
icon: null,
|
|
281
|
+
// title: currentCommonSearchKey ? "更新常用搜索" : "保存为常用搜索",
|
|
282
|
+
title: i18next.t('保存为常用搜索'),
|
|
283
|
+
content: React.createElement(MyInput, { ref: iptRef }),
|
|
284
|
+
onOk: function () {
|
|
285
|
+
var _a, _b;
|
|
286
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
287
|
+
var currentCommonName, currentData, data, err_1;
|
|
288
|
+
return __generator(this, function (_c) {
|
|
289
|
+
switch (_c.label) {
|
|
290
|
+
case 0:
|
|
291
|
+
currentCommonName = (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.getValue();
|
|
292
|
+
if (!currentCommonName) {
|
|
293
|
+
message.info(i18next.t('请输入常用搜索名称!'));
|
|
294
|
+
return [2 /*return*/, Promise.reject(new Error(i18next.t('请输入常用搜索名称!')))];
|
|
295
|
+
}
|
|
296
|
+
currentData = form.getFieldsValue();
|
|
297
|
+
console.log(i18next.t('当前表单数据'), currentData);
|
|
298
|
+
data = {
|
|
299
|
+
title: currentCommonName,
|
|
300
|
+
value: currentData,
|
|
301
|
+
// key: currentCommonSearchKey || Date.now(),
|
|
302
|
+
key: Date.now(),
|
|
303
|
+
dynamicList: currentDynamicList,
|
|
304
|
+
};
|
|
305
|
+
_c.label = 1;
|
|
306
|
+
case 1:
|
|
307
|
+
_c.trys.push([1, 3, , 4]);
|
|
308
|
+
return [4 /*yield*/, (setData === null || setData === void 0 ? void 0 : setData(data))];
|
|
309
|
+
case 2:
|
|
310
|
+
_c.sent();
|
|
311
|
+
setCurrentCommonSearchKey === null || setCurrentCommonSearchKey === void 0 ? void 0 : setCurrentCommonSearchKey(data.key);
|
|
312
|
+
message.info(i18next.t('保存成功!'));
|
|
313
|
+
(_b = iptRef.current) === null || _b === void 0 ? void 0 : _b.setValue('');
|
|
314
|
+
return [3 /*break*/, 4];
|
|
315
|
+
case 3:
|
|
316
|
+
err_1 = _c.sent();
|
|
317
|
+
message.info(i18next.t('保存常用搜索失败!'));
|
|
318
|
+
return [2 /*return*/, Promise.reject(new Error(i18next.t('保存常用搜索失败!')))];
|
|
319
|
+
case 4: return [2 /*return*/];
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
onCancel: function () {
|
|
325
|
+
console.log('Cancel');
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
setTimeout(function () {
|
|
329
|
+
if (!(commonSearchList === null || commonSearchList === void 0 ? void 0 : commonSearchList.length)) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
var currentCommon = commonSearchList.find(function (item) { return item.key === currentCommonSearchKey; });
|
|
333
|
+
if (currentCommon) {
|
|
334
|
+
// iptRef.current?.setValue(currentCommon.title);
|
|
335
|
+
}
|
|
336
|
+
}, 0);
|
|
337
|
+
};
|
|
338
|
+
return {
|
|
339
|
+
onCommonSearchHandle: onCommonSearchHandle,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
var MyInput = forwardRef(function (props, ref) {
|
|
343
|
+
var _a = useState(''), value = _a[0], setValue = _a[1];
|
|
344
|
+
var onChange = function (e) {
|
|
345
|
+
setValue(e.target.value);
|
|
346
|
+
};
|
|
347
|
+
useImperativeHandle(ref, function () { return ({
|
|
348
|
+
getValue: function () { return value; },
|
|
349
|
+
setValue: setValue,
|
|
350
|
+
}); });
|
|
351
|
+
return (React.createElement(Input, { placeholder: i18next.t('请输入常用搜索名称!'), value: value, onChange: onChange }));
|
|
352
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IProps as IListProps } from '../business/NewList/list';
|
|
3
|
+
import { IProps as IItemProps } from '../business/NewList/item';
|
|
4
|
+
export interface IProItemProps extends IItemProps {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface IProps extends IListProps {
|
|
8
|
+
items: IProItemProps[];
|
|
9
|
+
}
|
|
10
|
+
declare function ProFormList(props: IProps): JSX.Element;
|
|
11
|
+
declare const _default: React.MemoExoticComponent<typeof ProFormList>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { memo } from 'react';
|
|
24
|
+
import FormList from '../business/NewList';
|
|
25
|
+
function ProFormList(props) {
|
|
26
|
+
var items = props.items, restProps = __rest(props, ["items"]);
|
|
27
|
+
return (React.createElement(FormList, __assign({}, restProps), Array.isArray(items)
|
|
28
|
+
? items.map(function (item, index) {
|
|
29
|
+
var _a = item.span, span = _a === void 0 ? 6 : _a, label = item.label, restItems = __rest(item, ["span", "label"]);
|
|
30
|
+
return (React.createElement(FormList.FormItem, __assign({ key: index + '' }, restItems, { span: span }), label));
|
|
31
|
+
})
|
|
32
|
+
: null));
|
|
33
|
+
}
|
|
34
|
+
export default memo(ProFormList);
|
|
@@ -20,6 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
23
24
|
/**
|
|
24
25
|
* 包含至今的范围选择器
|
|
25
26
|
*/
|
|
@@ -106,13 +107,15 @@ function RangePicker(_a) {
|
|
|
106
107
|
};
|
|
107
108
|
/**至今组件 */
|
|
108
109
|
var renderExtraFooterHandle = function () {
|
|
109
|
-
return (React.createElement(Checkbox, { checked: checked, onChange: onFarChangeHandle },
|
|
110
|
+
return (React.createElement(Checkbox, { checked: checked, onChange: onFarChangeHandle }, i18next.t('至今')));
|
|
110
111
|
};
|
|
111
112
|
/**
|
|
112
113
|
* @description 如果是至今转换参数
|
|
113
114
|
*/
|
|
114
115
|
var formatHandle = function (value) {
|
|
115
|
-
return
|
|
116
|
+
return i18next.t('{{slot0}} -> 至今', {
|
|
117
|
+
slot0: value.format(formatString),
|
|
118
|
+
});
|
|
116
119
|
};
|
|
117
120
|
/**
|
|
118
121
|
* @description 单独传递参数
|
|
@@ -13,7 +13,7 @@ import React, { memo } from 'react';
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { useDrag, useDrop } from 'react-dnd';
|
|
15
15
|
var SortableCancel = memo(function SortableCancel(_a) {
|
|
16
|
-
var type = _a.type, id = _a.id, onMoveItem = _a.onMoveItem, onFindItem = _a.onFindItem, children = _a.children, className = _a.className, style = _a.style;
|
|
16
|
+
var type = _a.type, id = _a.id, onMoveItem = _a.onMoveItem, onFindItem = _a.onFindItem, children = _a.children, className = _a.className, style = _a.style, tipTitle = _a.tipTitle;
|
|
17
17
|
var originalIndex = onFindItem(id).index;
|
|
18
18
|
var _b = useDrag(function () { return ({
|
|
19
19
|
type: type,
|
|
@@ -42,6 +42,6 @@ var SortableCancel = memo(function SortableCancel(_a) {
|
|
|
42
42
|
}); }, [onFindItem, onMoveItem]), drop = _c[1];
|
|
43
43
|
var classes = classNames('zt-sortable', className, {});
|
|
44
44
|
var opacity = isDragging ? 0 : 1;
|
|
45
|
-
return (React.createElement("div", { ref: function (node) { return drag(drop(node)); }, className: classes, style: __assign(__assign({}, style), { opacity: opacity }) }, children));
|
|
45
|
+
return (React.createElement("div", { ref: function (node) { return drag(drop(node)); }, className: classes, style: __assign(__assign({}, style), { opacity: opacity }), title: tipTitle || '' }, children));
|
|
46
46
|
});
|
|
47
47
|
export default SortableCancel;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { VerticalAlignBottomOutlined } from '@ant-design/icons';
|
|
3
4
|
var FillDown = function (_a) {
|
|
4
5
|
var title = _a.title, field = _a.field, onClick = _a.onClick;
|
|
5
6
|
return (React.createElement("div", { className: "zt-table_fillDown" },
|
|
6
7
|
React.createElement("div", { className: "fillDown_title" }, typeof title === 'function' ? title() : title),
|
|
7
|
-
React.createElement("div", { className: "fillDown_icon", title:
|
|
8
|
+
React.createElement("div", { className: "fillDown_icon", title: i18next.t('往下填充'), onClick: function (e) { return (onClick === null || onClick === void 0 ? void 0 : onClick.current) && onClick.current({ field: field }); } },
|
|
8
9
|
React.createElement(VerticalAlignBottomOutlined, null))));
|
|
9
10
|
};
|
|
10
11
|
export default FillDown;
|
|
@@ -3,12 +3,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
3
3
|
to[j] = from[i];
|
|
4
4
|
return to;
|
|
5
5
|
};
|
|
6
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
6
7
|
import React, { useState, useMemo } from 'react';
|
|
7
8
|
import { Input } from 'antd';
|
|
8
|
-
import { Button,
|
|
9
|
-
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
9
|
+
import { Button, Checkbox } from '../../../index';
|
|
10
10
|
var FilterDropdown = function (_a) {
|
|
11
|
-
var searchInputRef = _a.searchInputRef, setSelectedKeys = _a.setSelectedKeys, selectedKeys = _a.selectedKeys, confirm = _a.confirm, clearFilters = _a.clearFilters, dataIndex = _a.dataIndex, handleSearch = _a.handleSearch, handleReset = _a.handleReset, dataSourceRef = _a.dataSourceRef;
|
|
11
|
+
var searchInputRef = _a.searchInputRef, setSelectedKeys = _a.setSelectedKeys, selectedKeys = _a.selectedKeys, confirm = _a.confirm, clearFilters = _a.clearFilters, dataIndex = _a.dataIndex, handleSearch = _a.handleSearch, handleReset = _a.handleReset, dataSourceRef = _a.dataSourceRef, column = _a.column;
|
|
12
12
|
var _b = useState(''), v = _b[0], setV = _b[1];
|
|
13
13
|
var _c = useState([]), cV = _c[0], setCV = _c[1];
|
|
14
14
|
var currentData = useMemo(function () {
|
|
@@ -18,14 +18,22 @@ var FilterDropdown = function (_a) {
|
|
|
18
18
|
if (typeof dataIndex !== 'string') {
|
|
19
19
|
return [];
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
// 将render中的结果作为字段返回
|
|
22
|
+
var newArr = dataSourceRef.current.map(function (item, itemIndex) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
try {
|
|
25
|
+
var renderResult = (_a = column === null || column === void 0 ? void 0 : column.render) === null || _a === void 0 ? void 0 : _a.call(column, item[dataIndex], item, itemIndex);
|
|
26
|
+
if (typeof renderResult === 'string') {
|
|
27
|
+
return renderResult;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (err) { }
|
|
31
|
+
return (_b = item[dataIndex]) !== null && _b !== void 0 ? _b : '';
|
|
24
32
|
});
|
|
25
33
|
// 记录出现次数
|
|
26
34
|
var resultArr = [];
|
|
27
35
|
newArr
|
|
28
|
-
.filter(function (item) { return item !== ''; })
|
|
36
|
+
.filter(function (item) { return item !== '' && typeof item !== 'object'; })
|
|
29
37
|
.forEach(function (item) {
|
|
30
38
|
var index = resultArr.findIndex(function (i) { return i.value === item; });
|
|
31
39
|
if (index === -1) {
|
|
@@ -39,6 +47,25 @@ var FilterDropdown = function (_a) {
|
|
|
39
47
|
}
|
|
40
48
|
});
|
|
41
49
|
return resultArr;
|
|
50
|
+
// const newArr = dataSourceRef.current.map((item) => {
|
|
51
|
+
// return item[dataIndex] ?? '';
|
|
52
|
+
// });
|
|
53
|
+
// // 记录出现次数
|
|
54
|
+
// const resultArr: any = [];
|
|
55
|
+
// newArr
|
|
56
|
+
// .filter((item) => item !== '')
|
|
57
|
+
// .forEach((item) => {
|
|
58
|
+
// const index = resultArr.findIndex((i) => i.value === item);
|
|
59
|
+
// if (index === -1) {
|
|
60
|
+
// resultArr.push({
|
|
61
|
+
// value: item,
|
|
62
|
+
// count: 1,
|
|
63
|
+
// });
|
|
64
|
+
// } else {
|
|
65
|
+
// resultArr[index].count++;
|
|
66
|
+
// }
|
|
67
|
+
// });
|
|
68
|
+
// return resultArr;
|
|
42
69
|
}, [dataIndex, dataSourceRef]);
|
|
43
70
|
return (React.createElement("div", { style: { padding: 6 }, onKeyDown: function (e) { return e.stopPropagation(); } },
|
|
44
71
|
React.createElement(Input, { ref: searchInputRef, value: v, onChange: function (e) {
|
|
@@ -56,14 +83,11 @@ var FilterDropdown = function (_a) {
|
|
|
56
83
|
React.createElement("div", null,
|
|
57
84
|
React.createElement(Button, { type: "primary", onClick: function () {
|
|
58
85
|
return handleSearch(selectedKeys, confirm, dataIndex);
|
|
59
|
-
} },
|
|
60
|
-
"\u641C\u7D22",
|
|
61
|
-
React.createElement(Tooltip, { placement: "bottomLeft", title: "\u5BF9\u4E8E\u6570\u5B57\u5217\u53EF\u4EE5\u5C1D\u8BD5\u8F93\u5165\u4E00\u4E9B\u8868\u8FBE\u5F0F: $0 + 1 > 2\u3001 >= 10\u3001 $0 + 1 == 2" },
|
|
62
|
-
React.createElement(QuestionCircleOutlined, null))),
|
|
86
|
+
} }, i18next.t('搜索')),
|
|
63
87
|
React.createElement(Button, { onClick: function () {
|
|
64
88
|
setV('');
|
|
65
89
|
setCV([]);
|
|
66
90
|
clearFilters && handleReset(clearFilters);
|
|
67
|
-
}, style: { marginLeft: 10 } },
|
|
91
|
+
}, style: { marginLeft: 10 } }, i18next.t('重置')))));
|
|
68
92
|
};
|
|
69
93
|
export default FilterDropdown;
|
|
@@ -42,7 +42,12 @@ interface IProps<RecordType> {
|
|
|
42
42
|
customOrder?: any;
|
|
43
43
|
setCustomOrder?: any;
|
|
44
44
|
isSort?: boolean;
|
|
45
|
+
isFilter?: boolean;
|
|
45
46
|
onFillDownChangeRef?: any;
|
|
47
|
+
isModalInput?: boolean;
|
|
48
|
+
isNumberInputThousandth?: boolean;
|
|
49
|
+
isNumberInputAlignRight?: boolean;
|
|
50
|
+
autoDecimalFieldsRef?: any;
|
|
46
51
|
}
|
|
47
52
|
export declare const getTableLayoutFullData: (columns: any, tableLayout: any) => any;
|
|
48
53
|
export declare const LOCALSTORAGE_KEY = "ztui_dynamic_table_key";
|