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
|
@@ -50,6 +50,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
50
50
|
to[j] = from[i];
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
53
54
|
/**
|
|
54
55
|
* @author 陈亚雄
|
|
55
56
|
* @description 可编辑表格
|
|
@@ -57,7 +58,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
57
58
|
import React, { useState, useCallback, useRef, useEffect } from 'react';
|
|
58
59
|
// redux
|
|
59
60
|
// ztxkui公共组件
|
|
60
|
-
import { Table, EnhanceSelect, Button, message } from '../index';
|
|
61
|
+
import { Table, EnhanceSelect, Button, message, Input } from '../index';
|
|
61
62
|
// 路由配置
|
|
62
63
|
// store
|
|
63
64
|
// 自定义组件
|
|
@@ -146,23 +147,75 @@ export function divide(num1, num2) {
|
|
|
146
147
|
return 0;
|
|
147
148
|
}
|
|
148
149
|
}
|
|
150
|
+
var dataObj = {
|
|
151
|
+
1: [
|
|
152
|
+
{ id: 1, test1: '1', test2: '2', test3: '3', test4: '4' },
|
|
153
|
+
{ id: 2, test1: '11', test2: '22', test3: '33', test4: '44' },
|
|
154
|
+
{ id: 3, test1: '111', test2: '222', test3: '333', test4: '444' },
|
|
155
|
+
],
|
|
156
|
+
2: [
|
|
157
|
+
{ id: 3, test1: '2-1', test2: '2-2', test3: '2-3', test4: '2-4' },
|
|
158
|
+
{ id: 2, test1: '2-11', test2: '2-22', test3: '2-33', test4: '2-44' },
|
|
159
|
+
{ id: 4, test1: '2-111', test2: '2-222', test3: '2-333', test4: '2-444' },
|
|
160
|
+
],
|
|
161
|
+
3: [
|
|
162
|
+
{ id: 3, test1: '3-1', test2: '3-2', test3: '3-3', test4: '3-4' },
|
|
163
|
+
{ id: 2, test1: '3-11', test2: '3-22', test3: '3-33', test4: '3-44' },
|
|
164
|
+
{ id: 4, test1: '3-111', test2: '3-222', test3: '3-333', test4: '3-444' },
|
|
165
|
+
],
|
|
166
|
+
4: [
|
|
167
|
+
{ id: 1, test1: '4-1', test2: '4-2', test3: '4-3', test4: '4-4' },
|
|
168
|
+
{ id: 2, test1: '4-11', test2: '4-22', test3: '4-33', test4: '4-44' },
|
|
169
|
+
{ id: 3, test1: '4-111', test2: '4-222', test3: '4-333', test4: '4-444' },
|
|
170
|
+
],
|
|
171
|
+
5: [
|
|
172
|
+
{ id: 1, test1: '5-1', test2: '5-2', test3: '5-3', test4: '5-4' },
|
|
173
|
+
{ id: 2, test1: '5-11', test2: '5-22', test3: '5-33', test4: '5-44' },
|
|
174
|
+
{ id: '3', test1: '5-111', test2: '5-222', test3: '5-333', test4: '5-444' },
|
|
175
|
+
{
|
|
176
|
+
id: '3',
|
|
177
|
+
test1: '5-1111',
|
|
178
|
+
test2: '5-2222',
|
|
179
|
+
test3: '5-3333',
|
|
180
|
+
test4: '5-4444',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: '3',
|
|
184
|
+
test1: '5-11111',
|
|
185
|
+
test2: '5-22222',
|
|
186
|
+
test3: '5-33333',
|
|
187
|
+
test4: '5-44444',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
6: [],
|
|
191
|
+
7: [],
|
|
192
|
+
8: [],
|
|
193
|
+
9: [],
|
|
194
|
+
};
|
|
195
|
+
var i = 0;
|
|
149
196
|
var EditableTable = function () {
|
|
150
|
-
var _a = useState(
|
|
197
|
+
var _a = useState(), records = _a[0], setRecords = _a[1];
|
|
198
|
+
var _b = useState([]), data = _b[0], setData = _b[1];
|
|
199
|
+
useEffect(function () {
|
|
200
|
+
setTimeout(function () {
|
|
201
|
+
setRecords(dataSource);
|
|
202
|
+
}, 1000);
|
|
203
|
+
}, []);
|
|
151
204
|
var recordsRef = useRef([]);
|
|
152
205
|
// 初始化渲染,针对配置了editable、editableConfig的列配置
|
|
153
|
-
var
|
|
206
|
+
var _c = useState(false), firstRender = _c[0], setFirstRender = _c[1];
|
|
154
207
|
// 新增删除行改变
|
|
155
|
-
var
|
|
208
|
+
var _d = useState(false), lengthChange = _d[0], setLengthChange = _d[1];
|
|
156
209
|
// 表格行拖拽改变
|
|
157
|
-
var
|
|
210
|
+
var _e = useState(false), moveChange = _e[0], setMoveChange = _e[1];
|
|
158
211
|
// 表格
|
|
159
212
|
var tableHandleRef = useRef({});
|
|
160
|
-
var
|
|
213
|
+
var _f = useState([]), expandedRowKeys = _f[0], setExpandedRowKeys = _f[1];
|
|
161
214
|
// 表格配置
|
|
162
|
-
var
|
|
215
|
+
var _g = useState({
|
|
163
216
|
test1: { isChangeable: 1, isDisplay: 1, isRequired: 1 },
|
|
164
217
|
test2: { isChangeable: 1, isDisplay: 1, isRequired: 1 },
|
|
165
|
-
}), tableConfig =
|
|
218
|
+
}), tableConfig = _g[0], setTableConfig = _g[1];
|
|
166
219
|
useEffect(function () {
|
|
167
220
|
setTimeout(function () {
|
|
168
221
|
setTableConfig({
|
|
@@ -175,18 +228,61 @@ var EditableTable = function () {
|
|
|
175
228
|
}, []);
|
|
176
229
|
var columns = [
|
|
177
230
|
{
|
|
178
|
-
title: '序号',
|
|
231
|
+
title: i18next.t('序号'),
|
|
179
232
|
width: 62,
|
|
180
233
|
fixed: 'left',
|
|
181
234
|
key: 'index',
|
|
182
235
|
render: function (_text, _record, index) { return "" + (index + 1); },
|
|
183
236
|
},
|
|
184
237
|
{
|
|
185
|
-
title: '测试
|
|
238
|
+
title: i18next.t('测试3'),
|
|
239
|
+
width: 100,
|
|
240
|
+
dataIndex: 'test3',
|
|
241
|
+
key: 'test3',
|
|
242
|
+
fixed: 'left',
|
|
243
|
+
shouldCellUpdate: function (record, preRecord) {
|
|
244
|
+
if (lengthChange) {
|
|
245
|
+
setLengthChange(false);
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
if (moveChange) {
|
|
249
|
+
setMoveChange(false);
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
return record.test3 !== preRecord.test3;
|
|
253
|
+
},
|
|
254
|
+
validate: {},
|
|
255
|
+
render: function (text, record, index) {
|
|
256
|
+
return (React.createElement(EnhanceSelect, { value: text, list: list1, dataKey: "id", titleKey: "name", dropdownMatchSelectWidth: 130, onChange: function (value, option, fullData) {
|
|
257
|
+
var _a, _b;
|
|
258
|
+
tableHandleRef.current.clearErrorClass(index);
|
|
259
|
+
var newRecord = {
|
|
260
|
+
test3: value,
|
|
261
|
+
test3Name: fullData === null || fullData === void 0 ? void 0 : fullData.name,
|
|
262
|
+
};
|
|
263
|
+
var realyIndex = (_b = (_a = tableHandleRef.current) === null || _a === void 0 ? void 0 : _a.getRealyIndex) === null || _b === void 0 ? void 0 : _b.call(_a, index);
|
|
264
|
+
onEditableSaveHandle(newRecord, realyIndex);
|
|
265
|
+
} }));
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
title: i18next.t('测试4'),
|
|
270
|
+
width: 100,
|
|
271
|
+
dataIndex: 'test4',
|
|
272
|
+
key: 'test4',
|
|
273
|
+
fixed: 'left',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
title: i18next.t('测试1'),
|
|
186
277
|
width: 400,
|
|
187
278
|
dataIndex: 'test1',
|
|
188
279
|
key: 'test1',
|
|
189
280
|
editable: true,
|
|
281
|
+
editableConfig: {
|
|
282
|
+
type: 'textArea',
|
|
283
|
+
maxLength: 100,
|
|
284
|
+
showCount: true,
|
|
285
|
+
},
|
|
190
286
|
showCopy: true,
|
|
191
287
|
validate: {},
|
|
192
288
|
shouldCellUpdate: function (record, preRecord) {
|
|
@@ -206,14 +302,14 @@ var EditableTable = function () {
|
|
|
206
302
|
},
|
|
207
303
|
},
|
|
208
304
|
{
|
|
209
|
-
title: '测试111',
|
|
305
|
+
title: i18next.t('测试111'),
|
|
210
306
|
width: 400,
|
|
211
307
|
dataIndex: 'test111',
|
|
212
308
|
key: 'test111',
|
|
213
309
|
editable: true,
|
|
214
310
|
editableConfig: {
|
|
215
311
|
type: 'inputNumber',
|
|
216
|
-
placeholder: '输入',
|
|
312
|
+
placeholder: i18next.t('输入'),
|
|
217
313
|
min: 0,
|
|
218
314
|
precision: 2,
|
|
219
315
|
formatterType: 'currency',
|
|
@@ -236,14 +332,14 @@ var EditableTable = function () {
|
|
|
236
332
|
},
|
|
237
333
|
},
|
|
238
334
|
{
|
|
239
|
-
title: '测试2',
|
|
335
|
+
title: i18next.t('测试2'),
|
|
240
336
|
width: 150,
|
|
241
337
|
dataIndex: 'test2',
|
|
242
338
|
key: 'test2',
|
|
243
339
|
editable: true,
|
|
244
340
|
editableConfig: {
|
|
245
341
|
type: 'inputNumber',
|
|
246
|
-
placeholder: '输入',
|
|
342
|
+
placeholder: i18next.t('输入'),
|
|
247
343
|
min: 0,
|
|
248
344
|
precision: 2,
|
|
249
345
|
formatterType: 'currency',
|
|
@@ -257,7 +353,7 @@ var EditableTable = function () {
|
|
|
257
353
|
return Promise.reject({
|
|
258
354
|
errorFields: [
|
|
259
355
|
{
|
|
260
|
-
errors:
|
|
356
|
+
errors: i18next.t('测试-明细表 第{{index}}行 测试2 不能小于102!', { index: index }),
|
|
261
357
|
},
|
|
262
358
|
],
|
|
263
359
|
});
|
|
@@ -282,7 +378,7 @@ var EditableTable = function () {
|
|
|
282
378
|
},
|
|
283
379
|
},
|
|
284
380
|
{
|
|
285
|
-
title:
|
|
381
|
+
title: i18next.t('金额(含税)', {}),
|
|
286
382
|
width: 130,
|
|
287
383
|
dataIndex: 'test2222',
|
|
288
384
|
key: 'test2222',
|
|
@@ -309,55 +405,19 @@ var EditableTable = function () {
|
|
|
309
405
|
},
|
|
310
406
|
},
|
|
311
407
|
{
|
|
312
|
-
title: '测试
|
|
313
|
-
width: 100,
|
|
314
|
-
dataIndex: 'test3',
|
|
315
|
-
key: 'test3',
|
|
316
|
-
shouldCellUpdate: function (record, preRecord) {
|
|
317
|
-
if (lengthChange) {
|
|
318
|
-
setLengthChange(false);
|
|
319
|
-
return true;
|
|
320
|
-
}
|
|
321
|
-
if (moveChange) {
|
|
322
|
-
setMoveChange(false);
|
|
323
|
-
return true;
|
|
324
|
-
}
|
|
325
|
-
return record.test3 !== preRecord.test3;
|
|
326
|
-
},
|
|
327
|
-
validate: {},
|
|
328
|
-
render: function (text, record, index) {
|
|
329
|
-
return (React.createElement(EnhanceSelect, { value: text, list: list1, dataKey: "id", titleKey: "name", dropdownMatchSelectWidth: 130, onChange: function (value, option, fullData) {
|
|
330
|
-
var _a, _b;
|
|
331
|
-
tableHandleRef.current.clearErrorClass(index);
|
|
332
|
-
var newRecord = {
|
|
333
|
-
test3: value,
|
|
334
|
-
test3Name: fullData === null || fullData === void 0 ? void 0 : fullData.name,
|
|
335
|
-
};
|
|
336
|
-
var realyIndex = (_b = (_a = tableHandleRef.current) === null || _a === void 0 ? void 0 : _a.getRealyIndex) === null || _b === void 0 ? void 0 : _b.call(_a, index);
|
|
337
|
-
onEditableSaveHandle(newRecord, realyIndex);
|
|
338
|
-
} }));
|
|
339
|
-
},
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
title: '测试4',
|
|
343
|
-
width: 100,
|
|
344
|
-
dataIndex: 'test4',
|
|
345
|
-
key: 'test4',
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
title: '测试5',
|
|
408
|
+
title: i18next.t('测试5'),
|
|
349
409
|
// width: 100,
|
|
350
410
|
// dataIndex: 'test5',
|
|
351
411
|
// key: 'test5',
|
|
352
412
|
children: [
|
|
353
413
|
{
|
|
354
|
-
title: '测试5-001',
|
|
414
|
+
title: i18next.t('测试5-001'),
|
|
355
415
|
width: 100,
|
|
356
416
|
dataIndex: 'test5-001',
|
|
357
417
|
key: 'test5-001',
|
|
358
418
|
},
|
|
359
419
|
{
|
|
360
|
-
title: '测试5-002',
|
|
420
|
+
title: i18next.t('测试5-002'),
|
|
361
421
|
width: 100,
|
|
362
422
|
dataIndex: 'test5-002',
|
|
363
423
|
key: 'test5-002',
|
|
@@ -365,31 +425,31 @@ var EditableTable = function () {
|
|
|
365
425
|
],
|
|
366
426
|
},
|
|
367
427
|
{
|
|
368
|
-
title: '测试6',
|
|
428
|
+
title: i18next.t('测试6'),
|
|
369
429
|
width: 100,
|
|
370
430
|
dataIndex: 'test6',
|
|
371
431
|
key: 'test6',
|
|
372
432
|
},
|
|
373
433
|
{
|
|
374
|
-
title: '测试7',
|
|
434
|
+
title: i18next.t('测试7'),
|
|
375
435
|
width: 100,
|
|
376
436
|
dataIndex: 'test7',
|
|
377
437
|
key: 'test7',
|
|
378
438
|
},
|
|
379
439
|
{
|
|
380
|
-
title: '测试8',
|
|
440
|
+
title: i18next.t('测试8'),
|
|
381
441
|
width: 100,
|
|
382
442
|
dataIndex: 'test8',
|
|
383
443
|
key: 'test8',
|
|
384
444
|
},
|
|
385
445
|
{
|
|
386
|
-
title: '测试9',
|
|
446
|
+
title: i18next.t('测试9'),
|
|
387
447
|
width: 100,
|
|
388
448
|
dataIndex: 'test9',
|
|
389
449
|
key: 'test9',
|
|
390
450
|
},
|
|
391
451
|
{
|
|
392
|
-
title: '测试10',
|
|
452
|
+
title: i18next.t('测试10'),
|
|
393
453
|
width: 100,
|
|
394
454
|
dataIndex: 'test10',
|
|
395
455
|
key: 'test10',
|
|
@@ -483,19 +543,20 @@ var EditableTable = function () {
|
|
|
483
543
|
setRecords([]);
|
|
484
544
|
}, []);
|
|
485
545
|
return (React.createElement("div", null,
|
|
546
|
+
React.createElement(Input, { maxLength: 10, showCount: true }),
|
|
486
547
|
React.createElement("div", null,
|
|
487
|
-
|
|
548
|
+
i18next.t('可编辑表格;如果是输入框,可使用表格默认提供的编辑框; 配置editable为true即可,还可配置editableConfig配置执行类型等;具体editableConfig可查看详细签名'),
|
|
488
549
|
React.createElement("br", null),
|
|
489
|
-
React.createElement("b", null,
|
|
550
|
+
React.createElement("b", null, i18next.t('对于配置了编辑的表格,一定要使用SCU来优化表格渲染,此举可以优化表格渲染')),
|
|
490
551
|
React.createElement("br", null),
|
|
491
|
-
React.createElement("b", null,
|
|
552
|
+
React.createElement("b", null, i18next.t('如果配置了editable,并且配置了SCU来优化渲染,那么初始化的时候需要用一个变量标识首次需要渲染')),
|
|
492
553
|
React.createElement("br", null),
|
|
493
|
-
React.createElement("b", null,
|
|
494
|
-
|
|
554
|
+
React.createElement("b", null, i18next.t('新增删除行,表格拖拽排序;')),
|
|
555
|
+
i18next.t('对于配置了SCU的列,需要在新增删除的时候重新渲染,通过设置state标识'),
|
|
495
556
|
React.createElement("br", null),
|
|
496
|
-
React.createElement("b", null,
|
|
497
|
-
React.createElement("p", null,
|
|
498
|
-
React.createElement("p", null,
|
|
557
|
+
React.createElement("b", null, i18next.t('表格自定义验证,传入tableHandleRef一个Ref对象,可获取表格提供相关方法')),
|
|
558
|
+
React.createElement("p", null, i18next.t('1.编写验证规则,在列里面编写,通过传入validate属性配置,具体可查看签名 如果只是简单的非空验证,那么可传入一个空对象即可 如果是复杂验证可通过validate传入更多配置')),
|
|
559
|
+
React.createElement("p", null, i18next.t('2.如果传入了自定义render函数,组件无法掌握在何时清空错误信息,所以需要调用方主动清空错误信息'))),
|
|
499
560
|
React.createElement(Button, { onClick: function () {
|
|
500
561
|
console.log(records);
|
|
501
562
|
(function () {
|
|
@@ -523,12 +584,25 @@ var EditableTable = function () {
|
|
|
523
584
|
});
|
|
524
585
|
});
|
|
525
586
|
})();
|
|
526
|
-
} },
|
|
587
|
+
} }, i18next.t('验证')),
|
|
527
588
|
React.createElement(Button, { onClick: function () {
|
|
528
589
|
console.log(records);
|
|
529
590
|
var ids = records.map(function (item) { return item.id; });
|
|
530
591
|
setExpandedRowKeys(ids);
|
|
531
|
-
} },
|
|
592
|
+
} }, i18next.t('获取数据')),
|
|
593
|
+
React.createElement("button", { onClick: function () {
|
|
594
|
+
i++;
|
|
595
|
+
console.log(dataObj[i]);
|
|
596
|
+
setData(dataObj[i]);
|
|
597
|
+
} },
|
|
598
|
+
i18next.t('切换数据'),
|
|
599
|
+
i),
|
|
600
|
+
React.createElement("button", { onClick: function () {
|
|
601
|
+
i--;
|
|
602
|
+
setData(dataObj[i]);
|
|
603
|
+
} },
|
|
604
|
+
i18next.t('--切换数据'),
|
|
605
|
+
i),
|
|
532
606
|
React.createElement(Table, { dataSource: records, columns: columns, rowKey: "id",
|
|
533
607
|
// 表格项可输入
|
|
534
608
|
onEditableSave: onEditableSaveHandle,
|
|
@@ -537,7 +611,7 @@ var EditableTable = function () {
|
|
|
537
611
|
// 表格行拖拽
|
|
538
612
|
onMoveRow: onMoveRowHandle,
|
|
539
613
|
// tableValidate
|
|
540
|
-
tableHandleRef: tableHandleRef, tableName:
|
|
614
|
+
tableHandleRef: tableHandleRef, tableName: i18next.t('我是一个表格'),
|
|
541
615
|
// 显隐配置
|
|
542
616
|
// configInfo={tableConfig}
|
|
543
617
|
showColumnDynamic: true, showColumnDynamicKey: "test-o-0011", onTableChange: onTableChange, showInnerPagination: true, expandable: {
|
|
@@ -557,7 +631,7 @@ var EditableTable = function () {
|
|
|
557
631
|
});
|
|
558
632
|
}
|
|
559
633
|
},
|
|
560
|
-
}, scroll: { x: 1200, y: 400 }, showDelAllBtn: true, delAllChange: onDelAllChange, rowSelection: {
|
|
634
|
+
}, isOpenVirtualScrollBar: true, scroll: { x: 1200, y: 400 }, showDelAllBtn: true, delAllChange: onDelAllChange, rowSelection: {
|
|
561
635
|
type: 'checkbox',
|
|
562
636
|
}, summaryFixed: true, summaryConfig: [
|
|
563
637
|
{
|
|
@@ -45,6 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
48
49
|
/**
|
|
49
50
|
* @author 陈亚雄
|
|
50
51
|
* @description 可编辑表格
|
|
@@ -92,14 +93,14 @@ var ModalTable = function () {
|
|
|
92
93
|
}, []);
|
|
93
94
|
var columns = [
|
|
94
95
|
{
|
|
95
|
-
title: '序号',
|
|
96
|
+
title: i18next.t('序号'),
|
|
96
97
|
width: 62,
|
|
97
98
|
fixed: 'left',
|
|
98
99
|
key: 'index',
|
|
99
100
|
render: function (_text, _record, index) { return "" + (index + 1); },
|
|
100
101
|
},
|
|
101
102
|
{
|
|
102
|
-
title: '测试1',
|
|
103
|
+
title: i18next.t('测试1'),
|
|
103
104
|
width: 100,
|
|
104
105
|
dataIndex: 'test1',
|
|
105
106
|
key: 'test1',
|
|
@@ -122,7 +123,7 @@ var ModalTable = function () {
|
|
|
122
123
|
},
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
|
-
title: '测试2',
|
|
126
|
+
title: i18next.t('测试2'),
|
|
126
127
|
width: 100,
|
|
127
128
|
dataIndex: 'test2',
|
|
128
129
|
key: 'test2',
|
|
@@ -136,7 +137,7 @@ var ModalTable = function () {
|
|
|
136
137
|
return Promise.reject({
|
|
137
138
|
errorFields: [
|
|
138
139
|
{
|
|
139
|
-
errors:
|
|
140
|
+
errors: i18next.t('测试-明细表 第{{index}}行 测试2 不能小于102!', { index: index }),
|
|
140
141
|
},
|
|
141
142
|
],
|
|
142
143
|
});
|
|
@@ -161,7 +162,7 @@ var ModalTable = function () {
|
|
|
161
162
|
},
|
|
162
163
|
},
|
|
163
164
|
{
|
|
164
|
-
title: '测试3',
|
|
165
|
+
title: i18next.t('测试3'),
|
|
165
166
|
width: 100,
|
|
166
167
|
dataIndex: 'test3',
|
|
167
168
|
key: 'test3',
|
|
@@ -189,43 +190,43 @@ var ModalTable = function () {
|
|
|
189
190
|
},
|
|
190
191
|
},
|
|
191
192
|
{
|
|
192
|
-
title: '测试4',
|
|
193
|
+
title: i18next.t('测试4'),
|
|
193
194
|
width: 100,
|
|
194
195
|
dataIndex: 'test4',
|
|
195
196
|
key: 'test4',
|
|
196
197
|
},
|
|
197
198
|
{
|
|
198
|
-
title: '测试5',
|
|
199
|
+
title: i18next.t('测试5'),
|
|
199
200
|
width: 100,
|
|
200
201
|
dataIndex: 'test5',
|
|
201
202
|
key: 'test5',
|
|
202
203
|
},
|
|
203
204
|
{
|
|
204
|
-
title: '测试6',
|
|
205
|
+
title: i18next.t('测试6'),
|
|
205
206
|
width: 100,
|
|
206
207
|
dataIndex: 'test6',
|
|
207
208
|
key: 'test6',
|
|
208
209
|
},
|
|
209
210
|
{
|
|
210
|
-
title: '测试7',
|
|
211
|
+
title: i18next.t('测试7'),
|
|
211
212
|
width: 100,
|
|
212
213
|
dataIndex: 'test7',
|
|
213
214
|
key: 'test7',
|
|
214
215
|
},
|
|
215
216
|
{
|
|
216
|
-
title: '测试8',
|
|
217
|
+
title: i18next.t('测试8'),
|
|
217
218
|
width: 100,
|
|
218
219
|
dataIndex: 'test8',
|
|
219
220
|
key: 'test8',
|
|
220
221
|
},
|
|
221
222
|
{
|
|
222
|
-
title: '测试9',
|
|
223
|
+
title: i18next.t('测试9'),
|
|
223
224
|
width: 100,
|
|
224
225
|
dataIndex: 'test9',
|
|
225
226
|
key: 'test9',
|
|
226
227
|
},
|
|
227
228
|
{
|
|
228
|
-
title: '测试10',
|
|
229
|
+
title: i18next.t('测试10'),
|
|
229
230
|
width: 100,
|
|
230
231
|
dataIndex: 'test10',
|
|
231
232
|
key: 'test10',
|
|
@@ -289,18 +290,18 @@ var ModalTable = function () {
|
|
|
289
290
|
}, [setRecords]);
|
|
290
291
|
return (React.createElement("div", null,
|
|
291
292
|
React.createElement("div", null,
|
|
292
|
-
|
|
293
|
+
i18next.t('可编辑表格;如果是输入框,可使用表格默认提供的编辑框; 配置editable为true即可,还可配置editableConfig配置执行类型等;具体editableConfig可查看详细签名'),
|
|
293
294
|
React.createElement("br", null),
|
|
294
|
-
React.createElement("b", null,
|
|
295
|
+
React.createElement("b", null, i18next.t('对于配置了编辑的表格,一定要使用SCU来优化表格渲染,此举可以优化表格渲染')),
|
|
295
296
|
React.createElement("br", null),
|
|
296
|
-
React.createElement("b", null,
|
|
297
|
+
React.createElement("b", null, i18next.t('如果配置了editable,并且配置了SCU来优化渲染,那么初始化的时候需要用一个变量标识首次需要渲染')),
|
|
297
298
|
React.createElement("br", null),
|
|
298
|
-
React.createElement("b", null,
|
|
299
|
-
|
|
299
|
+
React.createElement("b", null, i18next.t('新增删除行,表格拖拽排序;')),
|
|
300
|
+
i18next.t('对于配置了SCU的列,需要在新增删除的时候重新渲染,通过设置state标识'),
|
|
300
301
|
React.createElement("br", null),
|
|
301
|
-
React.createElement("b", null,
|
|
302
|
-
React.createElement("p", null,
|
|
303
|
-
React.createElement("p", null,
|
|
302
|
+
React.createElement("b", null, i18next.t('表格自定义验证,传入tableHandleRef一个Ref对象,可获取表格提供相关方法')),
|
|
303
|
+
React.createElement("p", null, i18next.t('1.编写验证规则,在列里面编写,通过传入validate属性配置,具体可查看签名 如果只是简单的非空验证,那么可传入一个空对象即可 如果是复杂验证可通过validate传入更多配置')),
|
|
304
|
+
React.createElement("p", null, i18next.t('2.如果传入了自定义render函数,组件无法掌握在何时清空错误信息,所以需要调用方主动清空错误信息'))),
|
|
304
305
|
React.createElement(Button, { onClick: function () {
|
|
305
306
|
(function () {
|
|
306
307
|
var _a;
|
|
@@ -327,15 +328,15 @@ var ModalTable = function () {
|
|
|
327
328
|
});
|
|
328
329
|
});
|
|
329
330
|
})();
|
|
330
|
-
} },
|
|
331
|
+
} }, i18next.t('验证')),
|
|
331
332
|
React.createElement(Button, { onClick: function () {
|
|
332
333
|
setVisible(function (visible) { return !visible; });
|
|
333
334
|
setLoading(true);
|
|
334
335
|
setTimeout(function () {
|
|
335
336
|
setLoading(false);
|
|
336
337
|
}, 5000);
|
|
337
|
-
} },
|
|
338
|
-
React.createElement(Modal, { title:
|
|
338
|
+
} }, i18next.t('打开模态框')),
|
|
339
|
+
React.createElement(Modal, { title: i18next.t('测试'), loading: loading, visible: visible, onCancel: function () { return setVisible(false); } },
|
|
339
340
|
React.createElement(Table, { dataSource: records, columns: columns, rowKey: "id",
|
|
340
341
|
// 表格项可输入
|
|
341
342
|
onEditableSave: onEditableSaveHandle,
|
|
@@ -344,7 +345,7 @@ var ModalTable = function () {
|
|
|
344
345
|
// 表格行拖拽
|
|
345
346
|
onMoveRow: onMoveRowHandle,
|
|
346
347
|
// tableValidate
|
|
347
|
-
tableHandleRef: tableHandleRef, tableName:
|
|
348
|
+
tableHandleRef: tableHandleRef, tableName: i18next.t('我是一个表格'),
|
|
348
349
|
// 显隐配置
|
|
349
350
|
configInfo: tableConfig, showColumnDynamic: true, showColumnDynamicKey: "test-o-0011" }))));
|
|
350
351
|
};
|