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
|
@@ -25,6 +25,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
25
25
|
to[j] = from[i];
|
|
26
26
|
return to;
|
|
27
27
|
};
|
|
28
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
28
29
|
/**
|
|
29
30
|
* @author cyx
|
|
30
31
|
* @description 增强下拉框功能
|
|
@@ -35,6 +36,7 @@ import Button from '../Button';
|
|
|
35
36
|
import { useFetchState } from 'ztxkutils/dist/hooks';
|
|
36
37
|
import debounce from 'lodash/debounce';
|
|
37
38
|
import { dangerouslySetXss } from 'ztxkutils/dist/tools';
|
|
39
|
+
import useBaseContext from '../utils/useBaseContext';
|
|
38
40
|
/**
|
|
39
41
|
* 组件缓存的数据格式,在当前浏览器运行内,能保证是唯一的引用,用来缓存数据用
|
|
40
42
|
* {
|
|
@@ -164,30 +166,34 @@ function clearNullData(arr, dataKey, titleKey) {
|
|
|
164
166
|
* 如果数据不能在接口层面满足以上形式,那么组件提供transformData属性,转换接口数据格式
|
|
165
167
|
*/
|
|
166
168
|
function EnhanceSelect(_a) {
|
|
167
|
-
var
|
|
169
|
+
var _b;
|
|
170
|
+
var list = _a.list, defaultList = _a.defaultList, params = _a.params, url = _a.url, _c = _a.method, method = _c === void 0 ? 'GET' : _c, _d = _a.timeout, timeout = _d === void 0 ? 60000 : _d, _e = _a.dataKey, dataKey = _e === void 0 ? 'id' : _e, componentKey = _a.componentKey, _f = _a.titleKey, titleKey = _f === void 0 ? 'name' : _f, showAll = _a.showAll, isCatch = _a.isCatch, onCompleted = _a.onCompleted, onChange = _a.onChange, onSearch = _a.onSearch, request = _a.request, remoteSearch = _a.remoteSearch, remoteSearchKey = _a.remoteSearchKey, remoteSearchDataKey = _a.remoteSearchDataKey, _g = _a.isRemoteSearchDataKey, isRemoteSearchDataKey = _g === void 0 ? true : _g, transformData = _a.transformData, joinKey = _a.joinKey, _h = _a.joinStr, joinStr = _h === void 0 ? '-' : _h, isJoinInLabel = _a.isJoinInLabel, lineFeedKey = _a.lineFeedKey, _j = _a.lineFeedStr, lineFeedStr = _j === void 0 ? '-' : _j, mustHasParams = _a.mustHasParams, disabledValues = _a.disabledValues, searchDeleteKeys = _a.searchDeleteKeys, isHandAddItem = _a.isHandAddItem, isPage = _a.isPage, _k = _a.currentSize, currentSize = _k === void 0 ? 30 : _k, isCopy = _a.isCopy, onBlur = _a.onBlur, onFocus = _a.onFocus, isClickRequest = _a.isClickRequest, handleRef = _a.handleRef, isPaste = _a.isPaste, _l = _a.pasteRule, pasteRule = _l === void 0 ? [',', '-', '\r\n', '\r', '\n', ' '] : _l, isPasteAddItem = _a.isPasteAddItem, restProps = __rest(_a, ["list", "defaultList", "params", "url", "method", "timeout", "dataKey", "componentKey", "titleKey", "showAll", "isCatch", "onCompleted", "onChange", "onSearch", "request", "remoteSearch", "remoteSearchKey", "remoteSearchDataKey", "isRemoteSearchDataKey", "transformData", "joinKey", "joinStr", "isJoinInLabel", "lineFeedKey", "lineFeedStr", "mustHasParams", "disabledValues", "searchDeleteKeys", "isHandAddItem", "isPage", "currentSize", "isCopy", "onBlur", "onFocus", "isClickRequest", "handleRef", "isPaste", "pasteRule", "isPasteAddItem"]);
|
|
171
|
+
// 选中后回显是否显示拼接内容:组件级 isJoinInLabel 优先,其次全局 isSelectJoinInLabel,默认显示
|
|
172
|
+
var isSelectJoinInLabel = useBaseContext().isSelectJoinInLabel;
|
|
173
|
+
var joinInLabel = (_b = isJoinInLabel !== null && isJoinInLabel !== void 0 ? isJoinInLabel : isSelectJoinInLabel) !== null && _b !== void 0 ? _b : true;
|
|
168
174
|
// TODO: 注释动态设置open逻辑 start
|
|
169
175
|
// const currentClick = useRef<boolean>(true);
|
|
170
176
|
// TODO: 注释动态设置open逻辑 end
|
|
171
177
|
// 下拉数据源
|
|
172
|
-
var
|
|
178
|
+
var _m = useFetchState([]), selectList = _m[0], setSelectList = _m[1];
|
|
173
179
|
// 手动添加的数据源
|
|
174
|
-
var
|
|
180
|
+
var _o = useState([]), handleAddItems = _o[0], setHandleAddItems = _o[1];
|
|
175
181
|
// 多选时,自己需要合并的数据
|
|
176
|
-
var
|
|
177
|
-
var
|
|
182
|
+
var _p = useFetchState([]), multipleList = _p[0], setMultipleList = _p[1];
|
|
183
|
+
var _q = useFetchState(false), loading = _q[0], setLoading = _q[1];
|
|
178
184
|
var fetchId = useRef(0); // 请求Id,每次请求都会加1
|
|
179
185
|
// 是否使用过远程搜索主键key
|
|
180
|
-
var
|
|
186
|
+
var _r = useFetchState(false), firstLoading = _r[0], setFirstLoading = _r[1];
|
|
181
187
|
// 第一次清空时,才做远程查询
|
|
182
|
-
var
|
|
188
|
+
var _s = useFetchState(false), firstClearData = _s[0], setFirstClearData = _s[1];
|
|
183
189
|
// 获得焦点选中
|
|
184
|
-
var
|
|
190
|
+
var _t = useState(false), isOpen = _t[0], setIsOpen = _t[1];
|
|
185
191
|
// 当前搜索文本
|
|
186
|
-
var
|
|
192
|
+
var _u = useState(), searchValue = _u[0], setSearchValue = _u[1];
|
|
187
193
|
// 当前页
|
|
188
|
-
var
|
|
194
|
+
var _v = useState(1), currentPage = _v[0], setCurrentPage = _v[1];
|
|
189
195
|
// 总条数
|
|
190
|
-
var
|
|
196
|
+
var _w = useState(0), count = _w[0], setCount = _w[1];
|
|
191
197
|
// 是否自动请求
|
|
192
198
|
var isAutoRequest = useRef(false); // 请求过了
|
|
193
199
|
// 自动填词
|
|
@@ -279,8 +285,8 @@ function EnhanceSelect(_a) {
|
|
|
279
285
|
function pasteHandle(value) {
|
|
280
286
|
if (isPaste && restProps.mode === 'multiple') {
|
|
281
287
|
var pasteRuleIndex = pasteRule.findIndex(function (item) { return value.indexOf(item) !== -1; });
|
|
282
|
-
if (pasteRuleIndex !== -1) {
|
|
283
|
-
var splitStr = pasteRule[pasteRuleIndex];
|
|
288
|
+
if (pasteRuleIndex !== -1 || isPasteAddItem) {
|
|
289
|
+
var splitStr = pasteRuleIndex !== -1 ? pasteRule[pasteRuleIndex] : ' ';
|
|
284
290
|
var resultValue = value.split(splitStr);
|
|
285
291
|
resultValue = Array.from(new Set(resultValue));
|
|
286
292
|
if (Array.isArray(restProps.value)) {
|
|
@@ -318,6 +324,12 @@ function EnhanceSelect(_a) {
|
|
|
318
324
|
outParams = JSON.parse(params);
|
|
319
325
|
}
|
|
320
326
|
catch (err) { }
|
|
327
|
+
// params 未传(undefined)或 JSON.parse(null) 得到 null 时兜底为空对象,
|
|
328
|
+
// 否则翻页路径上的 outParams.defaultIds 访问会抛
|
|
329
|
+
// "Cannot read properties of undefined (reading 'defaultIds')",导致滚动分页中断
|
|
330
|
+
if (outParams == null || typeof outParams !== 'object') {
|
|
331
|
+
outParams = {};
|
|
332
|
+
}
|
|
321
333
|
setSearchValue(value);
|
|
322
334
|
setLoading(true);
|
|
323
335
|
if (otherObj === null || otherObj === void 0 ? void 0 : otherObj.currentPage) {
|
|
@@ -348,7 +360,7 @@ function EnhanceSelect(_a) {
|
|
|
348
360
|
? dataKeyValue.length
|
|
349
361
|
: currentSize, current: (otherObj === null || otherObj === void 0 ? void 0 : otherObj.currentPage) ? otherObj === null || otherObj === void 0 ? void 0 : otherObj.currentPage : 1 }, outParams), searchParams) }, ((otherObj === null || otherObj === void 0 ? void 0 : otherObj.options) || {})))
|
|
350
362
|
.then(function (resData) {
|
|
351
|
-
var _a, _b, _c, _d, _e, _f;
|
|
363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
352
364
|
(_a = otherObj === null || otherObj === void 0 ? void 0 : otherObj.sucessCallback) === null || _a === void 0 ? void 0 : _a.call(otherObj);
|
|
353
365
|
if (fetchIdClosure < fetchId.current) {
|
|
354
366
|
return;
|
|
@@ -370,7 +382,11 @@ function EnhanceSelect(_a) {
|
|
|
370
382
|
result = ((_e = (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.records) || [];
|
|
371
383
|
}
|
|
372
384
|
}
|
|
373
|
-
|
|
385
|
+
// total 的解析位置需与上方 records 保持一致:
|
|
386
|
+
// records 兼容到 res.data.data.records(接口外层多包一层 code/success 时),
|
|
387
|
+
// total 同样兼容 {data:{total}} 与 {data:{code,data:{total}}} 两种结构,
|
|
388
|
+
// 否则嵌套结构下 count 恒为 0,selectList.length < count 不成立,滚动分页永不触发
|
|
389
|
+
setCount((_k = (_g = (_f = res === null || res === void 0 ? void 0 : res.data) === null || _f === void 0 ? void 0 : _f.total) !== null && _g !== void 0 ? _g : (_j = (_h = res === null || res === void 0 ? void 0 : res.data) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.total) !== null && _k !== void 0 ? _k : 0);
|
|
374
390
|
// 如果根据id查过了,那么需要把这些数据添加到自定义合并数组中
|
|
375
391
|
if (dataKeyValue) {
|
|
376
392
|
var values = (dataKeyValue + '').split(',');
|
|
@@ -636,6 +652,8 @@ function EnhanceSelect(_a) {
|
|
|
636
652
|
restProps.value,
|
|
637
653
|
getRemoteDataHandle,
|
|
638
654
|
]);
|
|
655
|
+
// 是否因为value为空请求了一次
|
|
656
|
+
var isByValueEqualNullRequestRef = useRef(false);
|
|
639
657
|
useEffect(function () {
|
|
640
658
|
if (!url || !remoteSearch) {
|
|
641
659
|
return;
|
|
@@ -656,13 +674,15 @@ function EnhanceSelect(_a) {
|
|
|
656
674
|
isAutoRequest.current = false;
|
|
657
675
|
return;
|
|
658
676
|
}
|
|
659
|
-
if (!restProps.value) {
|
|
677
|
+
if (!restProps.value && !isByValueEqualNullRequestRef.current) {
|
|
678
|
+
isByValueEqualNullRequestRef.current = true;
|
|
660
679
|
// console.log('第一次请求数据');
|
|
661
680
|
getRemoteDataHandle('', '');
|
|
662
681
|
}
|
|
663
|
-
else {
|
|
682
|
+
else if (restProps.value) {
|
|
664
683
|
if (typeof restProps.value === 'string' ||
|
|
665
684
|
(Array.isArray(restProps.value) && restProps.value.length > 0)) {
|
|
685
|
+
isByValueEqualNullRequestRef.current = false;
|
|
666
686
|
// console.log('第二次请求数据,默认为需要根据主键去请求', restProps.value);
|
|
667
687
|
setFirstLoading(true);
|
|
668
688
|
getRemoteDataHandle('', restProps.value);
|
|
@@ -726,7 +746,7 @@ function EnhanceSelect(_a) {
|
|
|
726
746
|
if (Array.isArray(newData)) {
|
|
727
747
|
newData.forEach(function (item) {
|
|
728
748
|
if (!item) {
|
|
729
|
-
console.error(
|
|
749
|
+
console.error(i18next.t('遇到了数组中存在空值得情况,请检查数据准确性!存在问题得数据 可能在defaultList中 {{url}}=={{dataKey}}=={{titleKey}}', { url: url, dataKey: dataKey, titleKey: titleKey }));
|
|
730
750
|
return;
|
|
731
751
|
}
|
|
732
752
|
// 如果item是手动输入的 不做任何处理
|
|
@@ -763,19 +783,23 @@ function EnhanceSelect(_a) {
|
|
|
763
783
|
}
|
|
764
784
|
return resultData;
|
|
765
785
|
}
|
|
786
|
+
var preCurrentOptionsRef = useRef([]);
|
|
766
787
|
// 渲染数据
|
|
767
788
|
function renderSelectOption() {
|
|
789
|
+
// console.log('触发renderSelectOption');
|
|
768
790
|
// const _defaultList = Array.isArray(defaultList) ? defaultList : [];
|
|
769
791
|
var _defaultList = clearNullData(Array.isArray(defaultList) ? defaultList : [], dataKey, titleKey);
|
|
792
|
+
preCurrentOptionsRef.current = [];
|
|
770
793
|
return (React.createElement(React.Fragment, null,
|
|
771
|
-
showAll && (React.createElement(Select.Option, { title:
|
|
794
|
+
showAll && (React.createElement(Select.Option, { title: i18next.t('全部'), value: "" }, i18next.t('全部'))),
|
|
772
795
|
Array.isArray(selectList) &&
|
|
773
796
|
concatData(concatData(concatData(selectList, _defaultList), multipleList), handleAddItems).map(function (item, index) {
|
|
774
797
|
var _a;
|
|
775
798
|
if (!item) {
|
|
776
|
-
console.error(
|
|
799
|
+
console.error(i18next.t('遇到了数组中存在空值得情况,请检查数据准确性!存在问题得数据 接口中 {{url}}=={{dataKey}}=={{titleKey}}', { url: url, dataKey: dataKey, titleKey: titleKey }));
|
|
777
800
|
return null;
|
|
778
801
|
}
|
|
802
|
+
preCurrentOptionsRef.current.push(item);
|
|
779
803
|
var key = item.__hand_add_key
|
|
780
804
|
? item.__hand_add_key
|
|
781
805
|
: componentKey
|
|
@@ -787,16 +811,22 @@ function EnhanceSelect(_a) {
|
|
|
787
811
|
var linefeedTitle = [];
|
|
788
812
|
if (joinKey) {
|
|
789
813
|
joinTitle = Array.isArray(joinKey)
|
|
790
|
-
? joinKey
|
|
814
|
+
? joinKey
|
|
815
|
+
// 字段不存在(null/undefined/空字符串)时跳过,避免拼接出多余的连接符
|
|
816
|
+
.map(function (joinItem) { return item[joinItem]; })
|
|
817
|
+
.filter(function (joinValue) { return !isFalsy(joinValue); })
|
|
818
|
+
.map(function (joinValue) { return dangerouslySetXss(joinValue); })
|
|
791
819
|
: item[joinKey]
|
|
792
820
|
? [dangerouslySetXss(item[joinKey])]
|
|
793
821
|
: [];
|
|
794
822
|
}
|
|
795
823
|
if (lineFeedKey) {
|
|
796
824
|
linefeedTitle = Array.isArray(lineFeedKey)
|
|
797
|
-
? lineFeedKey
|
|
798
|
-
|
|
799
|
-
|
|
825
|
+
? lineFeedKey
|
|
826
|
+
// 字段不存在(null/undefined/空字符串)时跳过,避免拼接出多余的连接符
|
|
827
|
+
.map(function (joinItem) { return item[joinItem]; })
|
|
828
|
+
.filter(function (lineFeedValue) { return !isFalsy(lineFeedValue); })
|
|
829
|
+
.map(function (lineFeedValue) { return dangerouslySetXss(lineFeedValue); })
|
|
800
830
|
: item[lineFeedKey]
|
|
801
831
|
? [dangerouslySetXss(item[lineFeedKey])]
|
|
802
832
|
: [];
|
|
@@ -817,29 +847,47 @@ function EnhanceSelect(_a) {
|
|
|
817
847
|
if (resultValue != null) {
|
|
818
848
|
resultValue = (_a = resultValue === null || resultValue === void 0 ? void 0 : resultValue.toString) === null || _a === void 0 ? void 0 : _a.call(resultValue);
|
|
819
849
|
}
|
|
820
|
-
return (React.createElement(Select.Option, { key: "" + key + index, value: resultValue,
|
|
850
|
+
return (React.createElement(Select.Option, { key: "" + key + index, value: resultValue,
|
|
851
|
+
// Option 的 title 属性决定选中后输入框的回显内容(optionLabelProp="title")
|
|
852
|
+
// joinInLabel 为 false 时回显只显示主标题,下拉列表中的选项展示不受影响
|
|
853
|
+
title: joinInLabel && Array.isArray(joinTitle)
|
|
854
|
+
? joinTitle === null || joinTitle === void 0 ? void 0 : joinTitle.join(joinStr)
|
|
855
|
+
: title, disabled: disabled },
|
|
821
856
|
Array.isArray(joinTitle) ? joinTitle === null || joinTitle === void 0 ? void 0 : joinTitle.join(joinStr) : '',
|
|
822
857
|
Array.isArray(linefeedTitle) && linefeedTitle.length > 0 ? (React.createElement("div", { className: "zt-select--feed-item" }, linefeedTitle === null || linefeedTitle === void 0 ? void 0 : linefeedTitle.join(lineFeedStr))) : ('')));
|
|
823
858
|
})));
|
|
824
859
|
}
|
|
825
860
|
// 本地搜索
|
|
861
|
+
var filterSearchRef = useRef(null);
|
|
826
862
|
var filterOptionHandle = function (input, option) {
|
|
863
|
+
var _a;
|
|
864
|
+
var _b, _c;
|
|
827
865
|
if (isPaste && restProps.mode === 'multiple') {
|
|
828
866
|
var pasteRuleIndex = pasteRule.findIndex(function (item) { return input.indexOf(item) !== -1; });
|
|
829
|
-
if (pasteRuleIndex !== -1) {
|
|
867
|
+
if (pasteRuleIndex !== -1 || isPasteAddItem) {
|
|
830
868
|
return true;
|
|
831
869
|
}
|
|
832
870
|
}
|
|
833
871
|
var text = textContent(option === null || option === void 0 ? void 0 : option.children);
|
|
834
|
-
|
|
872
|
+
var isFind = (text === null || text === void 0 ? void 0 : text.toLowerCase().indexOf(input.toLowerCase().trim())) >= 0;
|
|
873
|
+
if (isFind) {
|
|
874
|
+
if (!filterSearchRef.current) {
|
|
875
|
+
filterSearchRef.current = [];
|
|
876
|
+
}
|
|
877
|
+
filterSearchRef.current.push((_a = {},
|
|
878
|
+
_a[dataKey] = (_c = (_b = option === null || option === void 0 ? void 0 : option.value) === null || _b === void 0 ? void 0 : _b.toString) === null || _c === void 0 ? void 0 : _c.call(_b),
|
|
879
|
+
_a));
|
|
880
|
+
}
|
|
881
|
+
return isFind;
|
|
835
882
|
};
|
|
836
883
|
// onChange 方法
|
|
837
884
|
function onChangeHandle(value, option) {
|
|
885
|
+
filterSearchRef.current = null;
|
|
838
886
|
setFirstLoading(true);
|
|
839
887
|
if (((Array.isArray(value) && value.length === 0) || !value) &&
|
|
840
888
|
remoteSearch &&
|
|
841
889
|
!firstClearData) {
|
|
842
|
-
console.log('第一次清空数据时,做一次远程查询');
|
|
890
|
+
console.log(i18next.t('第一次清空数据时,做一次远程查询'));
|
|
843
891
|
setFirstClearData(true);
|
|
844
892
|
getRemoteDataHandle('', '');
|
|
845
893
|
}
|
|
@@ -849,11 +897,12 @@ function EnhanceSelect(_a) {
|
|
|
849
897
|
if (currentList && Array.isArray(currentList)) {
|
|
850
898
|
var key_1 = dataKey;
|
|
851
899
|
// 支持多选模式
|
|
852
|
-
var
|
|
900
|
+
var currentData_1;
|
|
853
901
|
if (Array.isArray(value)) {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
902
|
+
currentData_1 = value.map(function (valueItem) {
|
|
903
|
+
var _a;
|
|
904
|
+
var item = currentList.find(function (item) {
|
|
905
|
+
var _a, _b, _c;
|
|
857
906
|
if (!item) {
|
|
858
907
|
return false;
|
|
859
908
|
}
|
|
@@ -861,17 +910,25 @@ function EnhanceSelect(_a) {
|
|
|
861
910
|
return false;
|
|
862
911
|
}
|
|
863
912
|
else {
|
|
864
|
-
return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === valueItem;
|
|
913
|
+
return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === ((_c = valueItem === null || valueItem === void 0 ? void 0 : valueItem.toString) === null || _c === void 0 ? void 0 : _c.call(valueItem));
|
|
865
914
|
}
|
|
866
915
|
});
|
|
916
|
+
if (item) {
|
|
917
|
+
return item;
|
|
918
|
+
}
|
|
919
|
+
// 有一种情况就是列表数据里面没有设置的值
|
|
920
|
+
return _a = {},
|
|
921
|
+
_a[key_1] = valueItem,
|
|
922
|
+
_a[titleKey] = valueItem,
|
|
923
|
+
_a;
|
|
867
924
|
});
|
|
868
|
-
|
|
925
|
+
currentData_1 = currentData_1 === null || currentData_1 === void 0 ? void 0 : currentData_1.filter(function (item) { return item; });
|
|
869
926
|
if (remoteSearch) {
|
|
870
|
-
setMultipleList(
|
|
927
|
+
setMultipleList(currentData_1);
|
|
871
928
|
}
|
|
872
929
|
}
|
|
873
930
|
else {
|
|
874
|
-
|
|
931
|
+
currentData_1 = currentList.find(function (item) {
|
|
875
932
|
var _a, _b;
|
|
876
933
|
if (!item) {
|
|
877
934
|
return false;
|
|
@@ -896,24 +953,42 @@ function EnhanceSelect(_a) {
|
|
|
896
953
|
}
|
|
897
954
|
else {
|
|
898
955
|
// 否则 最后一个不是全部,那就去掉全部
|
|
899
|
-
__value =
|
|
956
|
+
__value = currentData_1 === null || currentData_1 === void 0 ? void 0 : currentData_1.filter(function (item) { return item[key_1] !== ''; }).map(function (item) { return item[key_1]; });
|
|
900
957
|
}
|
|
901
958
|
}
|
|
902
|
-
else if (!Array.isArray(__value) && __value != null &&
|
|
903
|
-
__value =
|
|
959
|
+
else if (!Array.isArray(__value) && __value != null && currentData_1) {
|
|
960
|
+
__value = currentData_1[key_1];
|
|
904
961
|
}
|
|
905
962
|
}
|
|
906
963
|
else {
|
|
907
|
-
if (
|
|
964
|
+
if (currentData_1) {
|
|
908
965
|
if (Array.isArray(__value) && __value.length > 0) {
|
|
909
|
-
__value =
|
|
966
|
+
__value = currentData_1.map(function (item) { return item[key_1]; });
|
|
910
967
|
}
|
|
911
968
|
else if (!Array.isArray(__value) && __value != null) {
|
|
912
|
-
__value =
|
|
969
|
+
__value = currentData_1[key_1];
|
|
913
970
|
}
|
|
914
971
|
}
|
|
915
972
|
}
|
|
916
|
-
|
|
973
|
+
if (!Array.isArray(currentData_1)) {
|
|
974
|
+
var newOption = option
|
|
975
|
+
? __assign(__assign({}, option), { title: !Array.isArray(currentData_1) && (currentData_1 === null || currentData_1 === void 0 ? void 0 : currentData_1[titleKey])
|
|
976
|
+
? currentData_1 === null || currentData_1 === void 0 ? void 0 : currentData_1[titleKey]
|
|
977
|
+
: option.title }) : option;
|
|
978
|
+
onChange && onChange(__value, newOption, currentData_1);
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
var newOption = option
|
|
982
|
+
? option === null || option === void 0 ? void 0 : option.map(function (item, index) {
|
|
983
|
+
var currentItem = currentData_1 === null || currentData_1 === void 0 ? void 0 : currentData_1[index];
|
|
984
|
+
if (currentItem === null || currentItem === void 0 ? void 0 : currentItem[titleKey]) {
|
|
985
|
+
return __assign(__assign({}, item), { title: currentItem ? currentItem === null || currentItem === void 0 ? void 0 : currentItem[titleKey] : option.title });
|
|
986
|
+
}
|
|
987
|
+
return item;
|
|
988
|
+
})
|
|
989
|
+
: option;
|
|
990
|
+
onChange && onChange(__value, newOption, currentData_1);
|
|
991
|
+
}
|
|
917
992
|
}
|
|
918
993
|
else {
|
|
919
994
|
onChange && onChange(value, option);
|
|
@@ -962,7 +1037,7 @@ function EnhanceSelect(_a) {
|
|
|
962
1037
|
// console.log(target.scrollTop + target.offsetHeight, target.scrollHeight);
|
|
963
1038
|
if (target.scrollTop + target.offsetHeight >= target.scrollHeight - 100) {
|
|
964
1039
|
if (remoteSearch && isPage && !loading && selectList.length < count) {
|
|
965
|
-
console.log('滚动到了底部, 可以远程加载下一页!');
|
|
1040
|
+
console.log(i18next.t('滚动到了底部, 可以远程加载下一页!'));
|
|
966
1041
|
getRemoteDataHandle(searchValue || '', '', {
|
|
967
1042
|
currentPage: currentPage + 1,
|
|
968
1043
|
});
|
|
@@ -1040,6 +1115,100 @@ function EnhanceSelect(_a) {
|
|
|
1040
1115
|
}
|
|
1041
1116
|
},
|
|
1042
1117
|
}); });
|
|
1118
|
+
var onCheckBtn = function (type) {
|
|
1119
|
+
var _a;
|
|
1120
|
+
var renderList = preCurrentOptionsRef.current;
|
|
1121
|
+
var currentValue = newValue || []; // 当前值
|
|
1122
|
+
// 1. 确定操作的目标列集合:仅对「过滤后可见列」操作(优先 filterDynamicColumns,无则用 dynamicColumns)
|
|
1123
|
+
var targetList = (_a = filterSearchRef.current) !== null && _a !== void 0 ? _a : renderList;
|
|
1124
|
+
// 获取options
|
|
1125
|
+
var getOptions = function (values, list) {
|
|
1126
|
+
return list
|
|
1127
|
+
.filter(function (item) { var _a, _b; return values.includes((_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)); })
|
|
1128
|
+
.map(function (item) {
|
|
1129
|
+
var _a, _b, _c, _d;
|
|
1130
|
+
return (__assign(__assign({}, item), { key: (_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a), value: (_d = (_c = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _c === void 0 ? void 0 : _c.toString) === null || _d === void 0 ? void 0 : _d.call(_c), children: [item === null || item === void 0 ? void 0 : item[titleKey]], title: item === null || item === void 0 ? void 0 : item[titleKey] }));
|
|
1131
|
+
});
|
|
1132
|
+
};
|
|
1133
|
+
// 排序
|
|
1134
|
+
var sortedValues = function (values, currentValue) {
|
|
1135
|
+
var _a, _b;
|
|
1136
|
+
if (!currentValue) {
|
|
1137
|
+
return values;
|
|
1138
|
+
}
|
|
1139
|
+
var newValues = [];
|
|
1140
|
+
(_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.forEach) === null || _a === void 0 ? void 0 : _a.call(currentValue, function (key) {
|
|
1141
|
+
if (values.includes(key)) {
|
|
1142
|
+
newValues.push(key);
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
(_b = values === null || values === void 0 ? void 0 : values.forEach) === null || _b === void 0 ? void 0 : _b.call(values, function (key) {
|
|
1146
|
+
if (!currentValue.includes(key)) {
|
|
1147
|
+
newValues.push(key);
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
return newValues;
|
|
1151
|
+
};
|
|
1152
|
+
// 1.1 过滤出已选中的,但是被搜索过滤的选项
|
|
1153
|
+
var filterCheckedValues = filterSearchRef.current
|
|
1154
|
+
? currentValue.filter(function (key) {
|
|
1155
|
+
var _a, _b;
|
|
1156
|
+
return !((_b = (_a = filterSearchRef.current) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, function (item) { var _a, _b, _c; return ((_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === ((_c = key === null || key === void 0 ? void 0 : key.toString) === null || _c === void 0 ? void 0 : _c.call(key)); }));
|
|
1157
|
+
})
|
|
1158
|
+
: [];
|
|
1159
|
+
// 2. 拆分目标列中的两类列(仅在可见列范围内处理)
|
|
1160
|
+
// 2.1 「可操作列」:过滤后可见 + 允许动态隐藏(isNoDynamicHide: false)→ 参与全选/反选
|
|
1161
|
+
var operableKeys = targetList.map(function (item) { var _a, _b; return (_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a); });
|
|
1162
|
+
var operableLen = operableKeys.length;
|
|
1163
|
+
// 2.2 「不可操作列」:过滤后可见 + 禁止动态隐藏(isNoDynamicHide: true)→ 不参与操作,保留原选中状态
|
|
1164
|
+
var visibleNonOperableKeys = targetList
|
|
1165
|
+
.filter(function (item) {
|
|
1166
|
+
var value = item[dataKey];
|
|
1167
|
+
var disabled = item === null || item === void 0 ? void 0 : item.disabled;
|
|
1168
|
+
if (Array.isArray(disabledValues) && disabledValues.includes(value)) {
|
|
1169
|
+
disabled = true;
|
|
1170
|
+
}
|
|
1171
|
+
return disabled;
|
|
1172
|
+
})
|
|
1173
|
+
.map(function (item) { var _a, _b; return (_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a); });
|
|
1174
|
+
// 3. 拆分当前已选中的 keys(确保「过滤后隐藏的列」状态不变)
|
|
1175
|
+
// 3.1 已选中的「过滤后隐藏的列」:无论是否可动态,均保留原状态(不参与本次操作)
|
|
1176
|
+
var hiddenCheckedKeys = currentValue.filter(function (key) {
|
|
1177
|
+
return !targetList.some(function (item) { var _a, _b, _c; return ((_b = (_a = item === null || item === void 0 ? void 0 : item[dataKey]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === ((_c = key === null || key === void 0 ? void 0 : key.toString) === null || _c === void 0 ? void 0 : _c.call(key)); });
|
|
1178
|
+
} // 不在目标列(过滤后隐藏)的选中项
|
|
1179
|
+
);
|
|
1180
|
+
// 3.2 已选中的「可见不可操作列」:保留原选中状态
|
|
1181
|
+
var visibleNonOperableCheckedKeys = currentValue.filter(function (key) {
|
|
1182
|
+
return visibleNonOperableKeys.includes(key);
|
|
1183
|
+
});
|
|
1184
|
+
// 3.3 已选中的「可见可操作列」:参与本次全选/反选
|
|
1185
|
+
var operableCheckedKeys = currentValue.filter(function (key) {
|
|
1186
|
+
return operableKeys.includes(key);
|
|
1187
|
+
});
|
|
1188
|
+
// 4. 全选逻辑:仅选中「可见可操作列」,其他列(隐藏列、可见不可操作列)保持原状态
|
|
1189
|
+
if (type === 'all') {
|
|
1190
|
+
// 边界判断:仅当「已选中的可操作列数 ≠ 可操作列总数」时才更新(避免无效渲染)
|
|
1191
|
+
if (operableCheckedKeys.length !== operableLen) {
|
|
1192
|
+
var values_1 = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), operableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys)));
|
|
1193
|
+
onChangeHandle &&
|
|
1194
|
+
onChangeHandle(sortedValues(values_1, currentValue), getOptions(values_1, renderList));
|
|
1195
|
+
}
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
1198
|
+
// 5. 反选逻辑:仅反选「可见可操作列」,其他列保持原状态
|
|
1199
|
+
var inversedOperableKeys = operableKeys.filter(function (key) { return !operableCheckedKeys.includes(key); });
|
|
1200
|
+
var values = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], filterCheckedValues), inversedOperableKeys), visibleNonOperableCheckedKeys), hiddenCheckedKeys)));
|
|
1201
|
+
onChangeHandle &&
|
|
1202
|
+
onChangeHandle(sortedValues(values, currentValue), getOptions(values, renderList));
|
|
1203
|
+
};
|
|
1204
|
+
var isShowAllButton = function () {
|
|
1205
|
+
if (restProps.mode !== 'multiple') {
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
return (React.createElement(React.Fragment, null,
|
|
1209
|
+
React.createElement(Button, { type: "default", onClick: function () { return onCheckBtn('all'); }, loading: false }, i18next.t('全选')),
|
|
1210
|
+
React.createElement(Button, { type: "default", onClick: function () { return onCheckBtn('inverse'); }, loading: false }, i18next.t('反选'))));
|
|
1211
|
+
};
|
|
1043
1212
|
return (React.createElement(Select, __assign({ defaultValue: showAll ? '' : undefined, allowClear: true, showSearch: true, filterOption: remoteSearch ? false : filterOptionHandle, onSearch: remoteSearch ? onSearchHandle : onSearchHandleInner, onChange: onChangeHandle, optionLabelProp: "title", loading: loading, onFocus: onFocusHandle, onBlur: onBlurHandle, onClear: onClearHandle, onSelect: onSelectHandle, onClick: onClickHandle,
|
|
1044
1213
|
// getPopupContainer={(trigger) => trigger || document.body}
|
|
1045
1214
|
open: isOpen, onDropdownVisibleChange: function (visible) { return setIsOpen(visible); }, onPopupScroll: onPopupScrollHandle, dropdownRender: url && !remoteSearch && isCatch
|
|
@@ -1054,11 +1223,24 @@ function EnhanceSelect(_a) {
|
|
|
1054
1223
|
padding: '0 6px',
|
|
1055
1224
|
} },
|
|
1056
1225
|
React.createElement("span", null),
|
|
1057
|
-
React.createElement(
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1226
|
+
React.createElement("div", { className: "zt-select--selector-container" },
|
|
1227
|
+
isShowAllButton(),
|
|
1228
|
+
React.createElement(Button, { onClick: function (e) {
|
|
1229
|
+
e.preventDefault();
|
|
1230
|
+
sendRequestNoCatch();
|
|
1231
|
+
} }, i18next.t('刷新数据')))))); }
|
|
1232
|
+
: function (menu) { return (React.createElement(React.Fragment, null,
|
|
1233
|
+
menu,
|
|
1234
|
+
React.createElement(Divider, { style: { marginTop: 0, marginBottom: '4px' } }),
|
|
1235
|
+
React.createElement("div", { style: {
|
|
1236
|
+
display: 'flex',
|
|
1237
|
+
alignItems: 'center',
|
|
1238
|
+
flexDirection: 'row',
|
|
1239
|
+
justifyContent: 'space-between',
|
|
1240
|
+
padding: '0 6px',
|
|
1241
|
+
} },
|
|
1242
|
+
React.createElement("span", null),
|
|
1243
|
+
React.createElement("div", { className: "zt-select--selector-container" }, isShowAllButton())))); } }, restProps, { value: newValue,
|
|
1062
1244
|
// 这里需要注释掉,因为修改了一部分逻辑
|
|
1063
1245
|
disabled: remoteSearch || isClickRequest
|
|
1064
1246
|
? restProps.disabled
|
|
@@ -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
|
import React, { useEffect, useCallback, useRef } from 'react';
|
|
24
25
|
import { Tree } from 'antd';
|
|
25
26
|
import { useFetchState } from 'ztxkutils/dist/hooks';
|
|
@@ -108,7 +109,7 @@ function EnhanceTree(_a) {
|
|
|
108
109
|
// 1、如果传入了treeData,那么直接使用传入的treeData
|
|
109
110
|
useEffect(function () {
|
|
110
111
|
if (Array.isArray(outTreeData)) {
|
|
111
|
-
console.log('TEST: 直接使用外部数据');
|
|
112
|
+
console.log(i18next.t('TEST: 直接使用外部数据'));
|
|
112
113
|
setTreeData(outTreeData);
|
|
113
114
|
}
|
|
114
115
|
}, [outTreeData, setTreeData]);
|
|
@@ -117,7 +118,7 @@ function EnhanceTree(_a) {
|
|
|
117
118
|
if (!url || asyncLoadChildren) {
|
|
118
119
|
return;
|
|
119
120
|
}
|
|
120
|
-
console.log('TEST: 异步获取全部数据');
|
|
121
|
+
console.log(i18next.t('TEST: 异步获取全部数据'));
|
|
121
122
|
// 直接发送接口请求
|
|
122
123
|
getDataHandle(request, { url: url, params: params, method: method });
|
|
123
124
|
}, [url, request, params, method, getDataHandle, asyncLoadChildren]);
|
|
@@ -126,7 +127,7 @@ function EnhanceTree(_a) {
|
|
|
126
127
|
if (!url || !asyncLoadChildren) {
|
|
127
128
|
return;
|
|
128
129
|
}
|
|
129
|
-
console.log('TEST: 异步加载子节点');
|
|
130
|
+
console.log(i18next.t('TEST: 异步加载子节点'));
|
|
130
131
|
// 直接发送接口请求
|
|
131
132
|
getDataHandle(request, { url: url, params: params, method: method });
|
|
132
133
|
}, [url, request, params, method, getDataHandle, asyncLoadChildren]);
|
|
@@ -42,12 +42,16 @@ export interface IProps<T> extends Omit<TreeSelectProps<T>, 'onChange'> {
|
|
|
42
42
|
* 数据发生改变时触发
|
|
43
43
|
*/
|
|
44
44
|
onChange?: any;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示全部,全部的value为空字符串
|
|
47
|
+
*/
|
|
48
|
+
showAll?: boolean;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* 增强下拉树
|
|
48
52
|
* 添加远程搜索
|
|
49
53
|
*/
|
|
50
|
-
declare function EnhanceTreeSelect<VT extends SelectValue = SelectValue>({ treeData: outTreeData, defaultTreeData, params, url, method, request, asyncLoadChildren, asyncLoadChildrenKey, transformData, treeDataSimpleMode, onCompleted, ...restProps }: IProps<VT>): JSX.Element;
|
|
54
|
+
declare function EnhanceTreeSelect<VT extends SelectValue = SelectValue>({ treeData: outTreeData, defaultTreeData, params, url, method, request, asyncLoadChildren, asyncLoadChildrenKey, transformData, treeDataSimpleMode, onCompleted, showAll, onChange, fieldNames, ...restProps }: IProps<VT>): JSX.Element;
|
|
51
55
|
declare namespace EnhanceTreeSelect {
|
|
52
56
|
var SHOW_PARENT: "SHOW_PARENT";
|
|
53
57
|
}
|