ztxkui 4.2.18-21 → 4.2.18-220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +315 -291
- package/dist/Demo.js +64 -43
- package/dist/DemoCom/BasicDemo.js +57 -56
- package/dist/DemoCom/CodeQueryDemo.js +3 -2
- package/dist/DemoCom/CollapseDemo.js +28 -27
- package/dist/DemoCom/DragSort.js +11 -10
- package/dist/DemoCom/FormDemo.js +36 -30
- package/dist/DemoCom/PrintContainerDemo.js +151 -150
- package/dist/DemoCom/PrintDemo.js +15 -14
- package/dist/DemoCom/SinaturesDemo.js +9 -8
- package/dist/DemoCom/SyhDemo.js +21 -20
- package/dist/DemoCom/TableAnalyse.js +34 -33
- package/dist/DemoCom/TableDemo.js +73 -69
- package/dist/DemoCom/TableDemo1.js +84 -34
- package/dist/DemoCom/TableDetail.d.ts +9 -0
- package/dist/DemoCom/TableDetail.js +259 -0
- package/dist/DemoCom/TestCom.js +22 -19
- package/dist/DemoCom/data.d.ts +110 -0
- package/dist/DemoCom/data.js +2308 -0
- package/dist/TableDemo/BasicTable.js +225 -25
- package/dist/TableDemo/EditableTable.js +146 -72
- package/dist/TableDemo/ModalTable.js +25 -24
- package/dist/TableDemo/ProEditableTable.js +30 -29
- package/dist/TableDemo/data.d.ts +34 -0
- package/dist/TableDemo/data.js +387 -10
- package/dist/TableDemo/index.js +3 -3
- package/dist/TreeDemo.js +8 -7
- package/dist/TreeSelectDemo.js +12 -8
- package/dist/UI/Form/index.d.ts +3 -0
- package/dist/UI/Form/index.js +347 -0
- package/dist/UI/Input/index.d.ts +17 -0
- package/dist/UI/Input/index.js +74 -0
- package/dist/UI/InputNumber/index.d.ts +3 -0
- package/dist/UI/InputNumber/index.js +45 -0
- package/dist/UI/OldForm/index.d.ts +9 -0
- package/dist/UI/OldForm/index.js +302 -0
- package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
- package/dist/UI/Select/EmpForQuitDemo.js +120 -0
- package/dist/UI/Select/index.d.ts +10 -0
- package/dist/UI/Select/index.js +207 -0
- package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
- package/dist/UI/Table/BusinessListDemo.js +227 -0
- package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
- package/dist/UI/Table/BusinessMemberDemo.js +181 -0
- package/dist/UI/Table/index.d.ts +10 -0
- package/dist/UI/Table/index.js +850 -0
- package/dist/UI/TreeSelect/index.d.ts +3 -0
- package/dist/UI/TreeSelect/index.js +120 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/index.js +34 -0
- package/dist/UploadDemo.js +27 -23
- package/dist/components/Button/button.d.ts +6 -0
- package/dist/components/Button/button.js +11 -4
- package/dist/components/Collapse/collapse.js +2 -1
- package/dist/components/DatePicker/data-picker.d.ts +3 -1
- package/dist/components/EnhanceSelect/index.d.ts +11 -1
- package/dist/components/EnhanceSelect/index.js +231 -49
- package/dist/components/EnhanceTree/index.js +4 -3
- package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
- package/dist/components/EnhanceTreeSelect/index.js +57 -7
- package/dist/components/Export/export.js +5 -4
- package/dist/components/Form/form.d.ts +11 -1
- package/dist/components/Form/form.js +5 -3
- package/dist/components/Input/input.d.ts +5 -3
- package/dist/components/Input/input.js +72 -3
- package/dist/components/InputNumber/input-number.js +3 -2
- package/dist/components/Layout/layout.d.ts +4 -4
- package/dist/components/Menu/menu.d.ts +1 -1
- package/dist/components/NumberCase/index.js +9 -7
- package/dist/components/Print/print.js +4 -3
- package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
- package/dist/components/PrintContainer/PrintModal.js +4 -3
- package/dist/components/PrintContainer/handle.d.ts +2 -4
- package/dist/components/PrintContainer/handle.js +3 -2
- package/dist/components/PrintContainer/lodop.js +2 -1
- package/dist/components/PrintContainer/print-container.js +74 -73
- package/dist/components/PrintContainer/service.js +5 -4
- package/dist/components/ProForm/hooks.d.ts +23 -0
- package/dist/components/ProForm/hooks.js +209 -0
- package/dist/components/ProForm/index.d.ts +9 -0
- package/dist/components/ProForm/index.js +168 -0
- package/dist/components/ProForm/interface.d.ts +200 -0
- package/dist/components/ProForm/interface.js +1 -0
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +222 -0
- package/dist/components/ProForm/items.d.ts +5 -0
- package/dist/components/ProForm/items.js +36 -0
- package/dist/components/ProForm/record-common-list.d.ts +18 -0
- package/dist/components/ProForm/record-common-list.js +83 -0
- package/dist/components/ProForm/search-drawer.d.ts +14 -0
- package/dist/components/ProForm/search-drawer.js +237 -0
- package/dist/components/ProForm/setting.d.ts +5 -0
- package/dist/components/ProForm/setting.js +12 -0
- package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
- package/dist/components/ProForm/useCommonSearch.js +352 -0
- package/dist/components/ProFormList/index.d.ts +12 -0
- package/dist/components/ProFormList/index.js +34 -0
- package/dist/components/RangePicker/range-picker.js +5 -2
- package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
- package/dist/components/SortableCancel/sortable-cancel.js +2 -2
- package/dist/components/Table/components/FillDown.js +2 -1
- package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
- package/dist/components/Table/components/FilterDropdown.js +36 -12
- package/dist/components/Table/hooks/useColumns.d.ts +5 -0
- package/dist/components/Table/hooks/useColumns.js +396 -22
- package/dist/components/Table/hooks/useDropRef.js +2 -1
- package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
- package/dist/components/Table/hooks/useScuRfresh.js +22 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
- package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
- package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
- package/dist/components/Table/index.d.ts +4 -0
- package/dist/components/Table/table-adddel-column.js +4 -3
- package/dist/components/Table/table-dynamic.d.ts +1 -0
- package/dist/components/Table/table-dynamic.js +447 -60
- package/dist/components/Table/table-enhance-cell.d.ts +3 -0
- package/dist/components/Table/table-enhance-cell.js +28 -8
- package/dist/components/Table/table-menu.d.ts +7 -0
- package/dist/components/Table/table-menu.js +359 -0
- package/dist/components/Table/table-resizable-title.js +1 -0
- package/dist/components/Table/table-sort.js +4 -3
- package/dist/components/Table/table.d.ts +16 -0
- package/dist/components/Table/table.js +241 -65
- package/dist/components/Table/utils/dom.js +2 -1
- package/dist/components/Table/utils/filterHandle.d.ts +1 -1
- package/dist/components/Table/utils/filterHandle.js +27 -12
- package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
- package/dist/components/Table/utils/getSummaryData.js +279 -24
- package/dist/components/Table/utils/shallowEqual.js +2 -1
- package/dist/components/Table/utils/validate.js +25 -6
- package/dist/components/Tabs/tabs.d.ts +2 -0
- package/dist/components/Tabs/tabs.js +3 -1
- package/dist/components/TranslationButton/DownFile.d.ts +7 -0
- package/dist/components/TranslationButton/DownFile.js +95 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +73 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +245 -0
- package/dist/components/TranslationButton/hooks.d.ts +8 -0
- package/dist/components/TranslationButton/hooks.js +139 -0
- package/dist/components/TranslationButton/index.d.ts +4 -0
- package/dist/components/TranslationButton/index.js +4 -0
- package/dist/components/TreeSelect/index.d.ts +19 -0
- package/dist/components/TreeSelect/index.js +88 -0
- package/dist/components/Upload/upload-table.js +31 -26
- package/dist/components/Upload/upload.d.ts +20 -1
- package/dist/components/Upload/upload.js +172 -27
- package/dist/components/Upload/utils.d.ts +9 -2
- package/dist/components/Upload/utils.js +153 -38
- package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
- package/dist/components/UploadCustom/hooks/useDg.js +55 -0
- package/dist/components/UploadSingle/upload-single.js +5 -4
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/Watermark/index.js +2 -0
- package/dist/components/Watermark/interface.d.ts +20 -0
- package/dist/components/Watermark/interface.js +1 -0
- package/dist/components/Watermark/utils.d.ts +1 -0
- package/dist/components/Watermark/utils.js +70 -0
- package/dist/components/Watermark/water.d.ts +50 -0
- package/dist/components/Watermark/water.js +66 -0
- package/dist/components/Watermark/watermark-div.d.ts +4 -0
- package/dist/components/Watermark/watermark-div.js +41 -0
- package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
- package/dist/components/Watermark/watermark-shadow.js +116 -0
- package/dist/components/Watermark/watermark.d.ts +3 -0
- package/dist/components/Watermark/watermark.js +102 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
- package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
- package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/images.js +2 -0
- package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/index.js +2 -0
- package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/service.js +101 -0
- package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
- package/dist/components/ZtIcon/index.js +2 -0
- package/dist/components/business/Analyse/index.js +12 -11
- package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
- package/dist/components/business/CodeQuery/component/TableList.js +5 -4
- package/dist/components/business/CodeQuery/hooks.js +2 -1
- package/dist/components/business/CodeQuery/index.js +2 -1
- package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
- package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
- package/dist/components/business/Common/UserInfo/index.js +5 -4
- package/dist/components/business/Common/UserPassword/index.js +14 -11
- package/dist/components/business/Common/validatePassword.d.ts +1 -1
- package/dist/components/business/Common/validatePassword.js +17 -7
- package/dist/components/business/DetailCard/index.js +7 -6
- package/dist/components/business/DetailHeader/index.js +7 -6
- package/dist/components/business/DetailList/index.js +5 -4
- package/dist/components/business/DgColumns/index.js +12 -11
- package/dist/components/business/ExportButton/index.js +6 -5
- package/dist/components/business/Footer/index.js +4 -1
- package/dist/components/business/GridList/item.d.ts +1 -1
- package/dist/components/business/List/item.d.ts +1 -1
- package/dist/components/business/NewList/item.d.ts +1 -1
- package/dist/components/business/NewList/item.js +1 -1
- package/dist/components/business/OperationBtnGroup/index.js +17 -16
- package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
- package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
- package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
- package/dist/components/business/SearchContainer/record-common-item.js +83 -0
- package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
- package/dist/components/business/SearchContainer/record-common-list.js +95 -0
- package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
- package/dist/components/business/SearchContainer/search-container.js +66 -3
- package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-drawer.js +167 -13
- package/dist/components/business/SearchContainer/search-item.js +48 -5
- package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
- package/dist/components/business/SearchContainer/search-left.js +105 -68
- package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
- package/dist/components/business/SearchContainer/search-right.js +62 -5
- package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
- package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
- package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
- package/dist/components/business/SearchContainer/useTemplate.js +347 -0
- package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +157 -0
- package/dist/components/business/Signatures/components/CompareResult.js +7 -6
- package/dist/components/business/Signatures/components/DetailTable.js +37 -34
- package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
- package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
- package/dist/components/business/Signatures/index.js +64 -53
- package/dist/components/business/SortList/sort-drawer.js +5 -4
- package/dist/components/business/Template/index.js +11 -10
- package/dist/components/electron-signatures/content.d.ts +9 -0
- package/dist/components/electron-signatures/content.js +1146 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
- package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
- package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
- package/dist/components/electron-signatures/demoComponents/index.js +30 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
- package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/making.js +211 -0
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
- package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/test.js +119 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
- package/dist/components/electron-signatures/index.d.ts +15 -0
- package/dist/components/electron-signatures/index.js +63 -0
- package/dist/components/electron-signatures/interface.d.ts +865 -0
- package/dist/components/electron-signatures/interface.js +57 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
- package/dist/components/electron-signatures/utils.d.ts +26 -0
- package/dist/components/electron-signatures/utils.js +67 -0
- package/dist/components/utils/MyStorage.d.ts +36 -0
- package/dist/components/utils/MyStorage.js +120 -0
- package/dist/components/utils/ZtxkContext.d.ts +67 -0
- package/dist/components/utils/ZtxkContext.js +20 -0
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/components/utils/fetch.d.ts +10 -0
- package/dist/components/utils/fetch.js +119 -0
- package/dist/components/utils/index.d.ts +9 -0
- package/dist/components/utils/index.js +11 -0
- package/dist/components/utils/processNumber.d.ts +12 -0
- package/dist/components/utils/processNumber.js +106 -0
- package/dist/components/utils/upload.js +6 -3
- package/dist/components/utils/useBaseContext.d.ts +23 -0
- package/dist/components/utils/useBaseContext.js +31 -0
- package/dist/components/utils/useMemoizedFn.d.ts +4 -0
- package/dist/components/utils/useMemoizedFn.js +19 -0
- package/dist/components/utils/usePrevious.d.ts +3 -0
- package/dist/components/utils/usePrevious.js +13 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +2205 -58
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +255 -86
- package/dist/locales/en-US.json +828 -0
- package/dist/locales/zh-CN.json +828 -0
- package/dist/request.js +7 -6
- package/package.json +13 -4
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import localforage from 'localforage';
|
|
38
|
+
var MyStorage = /** @class */ (function () {
|
|
39
|
+
function MyStorage(option) {
|
|
40
|
+
var tableKey = option.tableKey;
|
|
41
|
+
this.storageInstance = localforage.createInstance({
|
|
42
|
+
driver: [localforage.INDEXEDDB, localforage.LOCALSTORAGE],
|
|
43
|
+
name: tableKey,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 设置存储值
|
|
48
|
+
*/
|
|
49
|
+
MyStorage.prototype.setItem = function (key, value) {
|
|
50
|
+
var _a;
|
|
51
|
+
return (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.setItem(key, value);
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* 获取存储值
|
|
55
|
+
*/
|
|
56
|
+
MyStorage.prototype.getItem = function (key) {
|
|
57
|
+
var _a;
|
|
58
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
+
return __generator(this, function (_b) {
|
|
60
|
+
return [2 /*return*/, (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.getItem(key)];
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* 获取表中的所有数据
|
|
66
|
+
*/
|
|
67
|
+
MyStorage.prototype.getAllItems = function () {
|
|
68
|
+
var _a;
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
return __generator(this, function (_b) {
|
|
72
|
+
return [2 /*return*/, (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.keys().then(function (keys) {
|
|
73
|
+
var allData = {};
|
|
74
|
+
return Promise.all(keys.map(function (key) { var _a; return (_a = _this.storageInstance) === null || _a === void 0 ? void 0 : _a.getItem(key); })).then(function (res) {
|
|
75
|
+
res.forEach(function (value, index) {
|
|
76
|
+
var key = keys[index];
|
|
77
|
+
allData[key] = value;
|
|
78
|
+
});
|
|
79
|
+
return allData;
|
|
80
|
+
});
|
|
81
|
+
})];
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* 删除表中的所有数据
|
|
87
|
+
*/
|
|
88
|
+
MyStorage.prototype.clear = function () {
|
|
89
|
+
var _a;
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
return __generator(this, function (_b) {
|
|
92
|
+
return [2 /*return*/, (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.clear()];
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 删除表中的指定数据
|
|
98
|
+
*/
|
|
99
|
+
MyStorage.prototype.removeItem = function (key) {
|
|
100
|
+
var _a;
|
|
101
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
+
return __generator(this, function (_b) {
|
|
103
|
+
return [2 /*return*/, (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.removeItem(key)];
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* 获取所有的keys
|
|
109
|
+
*/
|
|
110
|
+
MyStorage.prototype.keys = function () {
|
|
111
|
+
var _a;
|
|
112
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
113
|
+
return __generator(this, function (_b) {
|
|
114
|
+
return [2 /*return*/, (_a = this.storageInstance) === null || _a === void 0 ? void 0 : _a.keys()];
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return MyStorage;
|
|
119
|
+
}());
|
|
120
|
+
export default MyStorage;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IZtxkConfig {
|
|
3
|
+
apiBaseUrl?: string;
|
|
4
|
+
fileBaseUrl?: string;
|
|
5
|
+
/**
|
|
6
|
+
* 数字输入框是否默认添加千分符
|
|
7
|
+
*/
|
|
8
|
+
numberInputAddThousandth?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 表格中有些字段需要自动加上千分符,这里以context来指定组件行为
|
|
11
|
+
* 规则1:以件数、量结尾的字段需要加上
|
|
12
|
+
* 规则2:字段中包含:单价、总价、金额、数量的需要加上
|
|
13
|
+
* 前提条件是,字段值是数字类型(这个规则组件内部会实现)
|
|
14
|
+
*/
|
|
15
|
+
tableNumberFormatter?: (text: string, fieldName?: string, column?: any) => boolean | null | undefined | void;
|
|
16
|
+
/**
|
|
17
|
+
* 处理显示的自定义小数位字段
|
|
18
|
+
*/
|
|
19
|
+
isCustomDecimalField?: (fieldName: string, column: any) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 显示自定义小数位字段渲染逻辑
|
|
22
|
+
*/
|
|
23
|
+
customDecimalFieldRender?: (text: any, record: any, index: any) => any;
|
|
24
|
+
/**
|
|
25
|
+
* 表格是否默认开启前端排序
|
|
26
|
+
*/
|
|
27
|
+
isTableSortEnabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 表格是否默认开启前端过滤
|
|
30
|
+
*/
|
|
31
|
+
isTableFilterEnabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 带排序的列在配置宽度基础上默认追加的宽度(px),
|
|
34
|
+
* 用于避免排序图标挤压表头文字;0 或不配置则不追加
|
|
35
|
+
*/
|
|
36
|
+
sortColumnExtraWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 带过滤的列在配置宽度基础上默认追加的宽度(px),
|
|
39
|
+
* 用于避免过滤图标挤压表头文字;0 或不配置则不追加
|
|
40
|
+
*/
|
|
41
|
+
filterColumnExtraWidth?: number;
|
|
42
|
+
/**
|
|
43
|
+
* 列表表单是否添加常用搜索
|
|
44
|
+
*/
|
|
45
|
+
isRecordCommonSearch?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 是否按UI周查样式调整(Button的type默认改为default)
|
|
48
|
+
*/
|
|
49
|
+
isUIWeeklyReview?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 列表表格(非编辑表格)是否显示右键菜单(查看明细/全屏),全局默认开关;
|
|
52
|
+
* 表格级 isContextMenu 优先级更高,可单独覆盖
|
|
53
|
+
*/
|
|
54
|
+
isTableShowContextMenu?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 编辑表格是否显示右键菜单(查看明细),全局默认开关;
|
|
57
|
+
* 表格级 isContextMenu 优先级更高,可单独覆盖
|
|
58
|
+
*/
|
|
59
|
+
isTableEditShowContextMenu?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 增强下拉框(EnhanceSelect)选中后回显是否显示拼接后的完整内容(joinKey 拼接串),
|
|
62
|
+
* 全局默认开关,默认显示;组件级 isJoinInLabel 优先级更高,可单独覆盖
|
|
63
|
+
*/
|
|
64
|
+
isSelectJoinInLabel?: boolean;
|
|
65
|
+
}
|
|
66
|
+
declare const ZtxkContext: React.Context<IZtxkConfig>;
|
|
67
|
+
export default ZtxkContext;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var ztxkConfig = {
|
|
3
|
+
apiBaseUrl: '',
|
|
4
|
+
fileBaseUrl: '',
|
|
5
|
+
numberInputAddThousandth: false,
|
|
6
|
+
tableNumberFormatter: undefined,
|
|
7
|
+
isCustomDecimalField: undefined,
|
|
8
|
+
customDecimalFieldRender: undefined,
|
|
9
|
+
isTableSortEnabled: false,
|
|
10
|
+
isTableFilterEnabled: false,
|
|
11
|
+
sortColumnExtraWidth: 0,
|
|
12
|
+
filterColumnExtraWidth: 0,
|
|
13
|
+
isRecordCommonSearch: false,
|
|
14
|
+
isUIWeeklyReview: false,
|
|
15
|
+
isTableShowContextMenu: true,
|
|
16
|
+
isTableEditShowContextMenu: false,
|
|
17
|
+
isSelectJoinInLabel: true,
|
|
18
|
+
};
|
|
19
|
+
var ZtxkContext = React.createContext(ztxkConfig);
|
|
20
|
+
export default ZtxkContext;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface ICheckSealCoUseOptions {
|
|
2
|
+
/** 请求方法 */
|
|
3
|
+
request?: (config: any) => Promise<any>;
|
|
4
|
+
/** 已选电子印章id列表 */
|
|
5
|
+
qysSealIds?: (string | number)[];
|
|
6
|
+
/** 已选群杰印章编号列表 */
|
|
7
|
+
qjSealNos?: (string | number)[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 印章共用校验
|
|
11
|
+
* 校验当前所选的电子印章、群杰印章是否满足"必须共同使用"的要求
|
|
12
|
+
* 后端根据印章上配置的 必须共同使用的电子印章/群杰印章 统一校验
|
|
13
|
+
* @returns true 校验通过;false 校验不通过或请求失败(已有提示)
|
|
14
|
+
*/
|
|
15
|
+
export default function checkSealCoUse(options: ICheckSealCoUseOptions): Promise<boolean>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
38
|
+
import message from '../basic/message';
|
|
39
|
+
/**
|
|
40
|
+
* 印章共用校验
|
|
41
|
+
* 校验当前所选的电子印章、群杰印章是否满足"必须共同使用"的要求
|
|
42
|
+
* 后端根据印章上配置的 必须共同使用的电子印章/群杰印章 统一校验
|
|
43
|
+
* @returns true 校验通过;false 校验不通过或请求失败(已有提示)
|
|
44
|
+
*/
|
|
45
|
+
export default function checkSealCoUse(options) {
|
|
46
|
+
var _a, _b, _c, _d;
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var _e, request, _f, qysSealIds, _g, qjSealNos, res, error_1;
|
|
49
|
+
return __generator(this, function (_h) {
|
|
50
|
+
switch (_h.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
_e = options || {}, request = _e.request, _f = _e.qysSealIds, qysSealIds = _f === void 0 ? [] : _f, _g = _e.qjSealNos, qjSealNos = _g === void 0 ? [] : _g;
|
|
53
|
+
// 两类印章都没选时才跳过校验;只要选了任意一种(电子章或群杰章)就需要调接口校验
|
|
54
|
+
if (qysSealIds.length === 0 && qjSealNos.length === 0) {
|
|
55
|
+
return [2 /*return*/, true];
|
|
56
|
+
}
|
|
57
|
+
_h.label = 1;
|
|
58
|
+
case 1:
|
|
59
|
+
_h.trys.push([1, 3, , 4]);
|
|
60
|
+
return [4 /*yield*/, request({
|
|
61
|
+
url: '/api/zmdms-resource/seal/check-seal-co-use',
|
|
62
|
+
method: 'POST',
|
|
63
|
+
data: {
|
|
64
|
+
qysSealIds: qysSealIds,
|
|
65
|
+
qjSealNos: qjSealNos,
|
|
66
|
+
},
|
|
67
|
+
})];
|
|
68
|
+
case 2:
|
|
69
|
+
res = _h.sent();
|
|
70
|
+
if ((res === null || res === void 0 ? void 0 : res.status) === 200 && ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.code) === 200) {
|
|
71
|
+
return [2 /*return*/, true];
|
|
72
|
+
}
|
|
73
|
+
message.warning(((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('印章共同使用校验未通过!'));
|
|
74
|
+
return [2 /*return*/, false];
|
|
75
|
+
case 3:
|
|
76
|
+
error_1 = _h.sent();
|
|
77
|
+
message.error(((_d = (_c = error_1 === null || error_1 === void 0 ? void 0 : error_1.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.msg) || i18next.t('请求失败!'));
|
|
78
|
+
return [2 /*return*/, false];
|
|
79
|
+
case 4: return [2 /*return*/];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function customFetch(url: any, options: any): Promise<unknown>;
|
|
2
|
+
export declare function catchHandle(data: {
|
|
3
|
+
customKey: string;
|
|
4
|
+
customValue: string;
|
|
5
|
+
mark: string;
|
|
6
|
+
}, idKey?: string): Promise<unknown>;
|
|
7
|
+
export declare function parseJwt(token: any): {
|
|
8
|
+
header: any;
|
|
9
|
+
payload: any;
|
|
10
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { getToken } from 'ztxkutils/dist/authority';
|
|
13
|
+
export function customFetch(url, options) {
|
|
14
|
+
// 检查原生 fetch 是否存在
|
|
15
|
+
if (window.fetch) {
|
|
16
|
+
return fetch(url, options);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// 使用 XMLHttpRequest 来模拟 fetch
|
|
20
|
+
return new Promise(function (resolve, reject) {
|
|
21
|
+
var xhr = new XMLHttpRequest();
|
|
22
|
+
xhr.open(options && options.method ? options.method : 'GET', url);
|
|
23
|
+
// 设置请求头
|
|
24
|
+
if (options && options.headers) {
|
|
25
|
+
Object.keys(options.headers).forEach(function (key) {
|
|
26
|
+
xhr.setRequestHeader(key, options.headers[key]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
xhr.onload = function () {
|
|
30
|
+
var response = {
|
|
31
|
+
ok: xhr.status >= 200 && xhr.status < 300,
|
|
32
|
+
status: xhr.status,
|
|
33
|
+
statusText: xhr.statusText,
|
|
34
|
+
url: xhr.responseURL,
|
|
35
|
+
text: function () { return Promise.resolve(xhr.responseText); },
|
|
36
|
+
json: function () { return Promise.resolve(JSON.parse(xhr.responseText)); },
|
|
37
|
+
blob: function () { return Promise.resolve(new Blob([xhr.response])); },
|
|
38
|
+
clone: function () { return response; },
|
|
39
|
+
headers: {
|
|
40
|
+
get: function (name) { return xhr.getResponseHeader(name); },
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
resolve(response);
|
|
44
|
+
};
|
|
45
|
+
xhr.onerror = function () {
|
|
46
|
+
reject(new TypeError('Network request failed'));
|
|
47
|
+
};
|
|
48
|
+
xhr.ontimeout = function () {
|
|
49
|
+
reject(new TypeError('Network request failed: timeout'));
|
|
50
|
+
};
|
|
51
|
+
// 设置请求体
|
|
52
|
+
if (options && options.body) {
|
|
53
|
+
xhr.send(options.body);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
xhr.send();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// 缓存数据变更、新增
|
|
62
|
+
export function catchHandle(data, idKey) {
|
|
63
|
+
// const id = window.localStorage.getItem(idKey);
|
|
64
|
+
var token = getToken();
|
|
65
|
+
var payload = (parseJwt(token) || {}).payload;
|
|
66
|
+
// if (id) {
|
|
67
|
+
// customFetch('/api/zmdms-user/user-custom/update', {
|
|
68
|
+
// method: 'POST',
|
|
69
|
+
// body: JSON.stringify({
|
|
70
|
+
// id,
|
|
71
|
+
// systemCategory: '1',
|
|
72
|
+
// userId: payload?.user_id,
|
|
73
|
+
// userName: payload?.real_name,
|
|
74
|
+
// ...data,
|
|
75
|
+
// }),
|
|
76
|
+
// headers: {
|
|
77
|
+
// 'Content-Type': 'application/json',
|
|
78
|
+
// 'Zmdms-Auth': token,
|
|
79
|
+
// },
|
|
80
|
+
// });
|
|
81
|
+
// } else {
|
|
82
|
+
// 不需要修改
|
|
83
|
+
return customFetch('/api/zmdms-user/user-custom/save', {
|
|
84
|
+
method: 'POST',
|
|
85
|
+
body: JSON.stringify(__assign({ systemCategory: '1', userId: payload === null || payload === void 0 ? void 0 : payload.user_id, userName: payload === null || payload === void 0 ? void 0 : payload.real_name }, data)),
|
|
86
|
+
headers: {
|
|
87
|
+
'Content-Type': 'application/json',
|
|
88
|
+
'Zmdms-Auth': token,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
// }
|
|
92
|
+
}
|
|
93
|
+
export function parseJwt(token) {
|
|
94
|
+
try {
|
|
95
|
+
var base64UrlDecode = function (str) {
|
|
96
|
+
// 将 Base64Url 编码转换为 Base64 编码
|
|
97
|
+
var base64 = str.replace(/-/g, '+').replace(/_/g, '/');
|
|
98
|
+
// 对 Base64 编码的字符串进行解码
|
|
99
|
+
var jsonPayload = decodeURIComponent(atob(base64)
|
|
100
|
+
.split('')
|
|
101
|
+
.map(function (c) {
|
|
102
|
+
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
103
|
+
})
|
|
104
|
+
.join(''));
|
|
105
|
+
return JSON.parse(jsonPayload);
|
|
106
|
+
};
|
|
107
|
+
var parts = token.split('.');
|
|
108
|
+
if (parts.length !== 3) {
|
|
109
|
+
throw new Error('The token is invalid');
|
|
110
|
+
}
|
|
111
|
+
var header = base64UrlDecode(parts[0]);
|
|
112
|
+
var payload = base64UrlDecode(parts[1]);
|
|
113
|
+
return { header: header, payload: payload };
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
console.error('Failed to parse JWT:', error);
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { getSearchParams } from '../business/SearchContainer/hooks/useDynamic';
|
|
2
2
|
export declare const copyValueHandle: (copyText: any) => void;
|
|
3
|
+
/**
|
|
4
|
+
* 全局默认值 与 组件默认值之间取值逻辑
|
|
5
|
+
* 1. 如果组件没有传入值,则取全局默认值
|
|
6
|
+
* 2. 如果组件传入了值,则取组件传入的值
|
|
7
|
+
* @param globalDefault 全局默认值
|
|
8
|
+
* @param componentValue 组件传入的值
|
|
9
|
+
* @returns 最终取值
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFinalValue<T>(globalDefault: T, componentValue?: T): T;
|
|
3
12
|
export { getSearchParams };
|
|
@@ -19,4 +19,15 @@ export var copyValueHandle = function (copyText) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* 全局默认值 与 组件默认值之间取值逻辑
|
|
24
|
+
* 1. 如果组件没有传入值,则取全局默认值
|
|
25
|
+
* 2. 如果组件传入了值,则取组件传入的值
|
|
26
|
+
* @param globalDefault 全局默认值
|
|
27
|
+
* @param componentValue 组件传入的值
|
|
28
|
+
* @returns 最终取值
|
|
29
|
+
*/
|
|
30
|
+
export function getFinalValue(globalDefault, componentValue) {
|
|
31
|
+
return componentValue !== null && componentValue !== void 0 ? componentValue : globalDefault;
|
|
32
|
+
}
|
|
22
33
|
export { getSearchParams };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 处理数字的小数位。如果数字有多位保留多位。
|
|
3
|
+
* @param value
|
|
4
|
+
* @param defaultPrecision
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export default function processNumber(value: any, defaultPrecision?: number): any;
|
|
8
|
+
/**
|
|
9
|
+
* 获取数字的小数位 如果传入的数字小数位大于默认值,那么取传入的数字小数位
|
|
10
|
+
* 如果小于默认值,那么取默认值小数位
|
|
11
|
+
*/
|
|
12
|
+
export declare function getNumberPricision(key: any, num: any, defaultPrecision?: number): number;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// 检查是否为合法数字
|
|
2
|
+
function isNumber(val) {
|
|
3
|
+
if (val == null) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
if (typeof val === 'number') {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
var toNum = Number(val);
|
|
10
|
+
if (!isNaN(toNum)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 处理数字的小数位。如果数字有多位保留多位。
|
|
17
|
+
* @param value
|
|
18
|
+
* @param defaultPrecision
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export default function processNumber(value, defaultPrecision) {
|
|
22
|
+
if (defaultPrecision === void 0) { defaultPrecision = 2; }
|
|
23
|
+
// 检查是否为合法数字
|
|
24
|
+
var num = parseFloat(value);
|
|
25
|
+
if (isNaN(num)) {
|
|
26
|
+
return value; // 非数字值直接返回
|
|
27
|
+
}
|
|
28
|
+
// 处理整数情况
|
|
29
|
+
if (Number.isInteger(num)) {
|
|
30
|
+
return num.toFixed(defaultPrecision);
|
|
31
|
+
}
|
|
32
|
+
// 处理小数情况
|
|
33
|
+
var numStr = num.toString();
|
|
34
|
+
var precision = 0;
|
|
35
|
+
// 处理科学计数法
|
|
36
|
+
if (numStr.includes('e')) {
|
|
37
|
+
var _a = numStr.split('e'), exp = _a[1];
|
|
38
|
+
var exponent = parseInt(exp);
|
|
39
|
+
if (exponent < 0) {
|
|
40
|
+
precision = Math.abs(exponent);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else if (numStr.includes('.')) {
|
|
44
|
+
// 普通小数获取小数位数
|
|
45
|
+
precision = numStr.split('.')[1].length;
|
|
46
|
+
}
|
|
47
|
+
// 应用默认小数位逻辑
|
|
48
|
+
if (precision < defaultPrecision) {
|
|
49
|
+
return num.toFixed(defaultPrecision);
|
|
50
|
+
}
|
|
51
|
+
// 移除末尾多余的0
|
|
52
|
+
return numStr.replace(/0+$/, '').replace(/\.$/, '');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 获取数字的小数位 如果传入的数字小数位大于默认值,那么取传入的数字小数位
|
|
56
|
+
* 如果小于默认值,那么取默认值小数位
|
|
57
|
+
*/
|
|
58
|
+
export function getNumberPricision(key, num, defaultPrecision) {
|
|
59
|
+
if (defaultPrecision === void 0) { defaultPrecision = 0; }
|
|
60
|
+
var isResultNumber = false;
|
|
61
|
+
try {
|
|
62
|
+
// 结尾匹配的关键词 数量
|
|
63
|
+
var endKeywords = [
|
|
64
|
+
'Quantity',
|
|
65
|
+
'QuantityTotal',
|
|
66
|
+
'QuantityBatch',
|
|
67
|
+
'Quantitys',
|
|
68
|
+
'quantity',
|
|
69
|
+
];
|
|
70
|
+
// 检查是否以 endKeywords 中的任意关键词结尾
|
|
71
|
+
var endsWithKeyword = endKeywords.some(function (keyword) { var _a; return (_a = key === null || key === void 0 ? void 0 : key.endsWith) === null || _a === void 0 ? void 0 : _a.call(key, keyword); });
|
|
72
|
+
isResultNumber = endsWithKeyword;
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
//
|
|
76
|
+
}
|
|
77
|
+
if (!isResultNumber) {
|
|
78
|
+
return defaultPrecision;
|
|
79
|
+
}
|
|
80
|
+
if (!isNumber(num)) {
|
|
81
|
+
return defaultPrecision;
|
|
82
|
+
}
|
|
83
|
+
// 处理小数情况
|
|
84
|
+
var numStr = num.toString();
|
|
85
|
+
var precision = 0;
|
|
86
|
+
// 处理科学计数法
|
|
87
|
+
if (numStr.includes('e')) {
|
|
88
|
+
var _a = numStr.split('e'), exp = _a[1];
|
|
89
|
+
var exponent = parseInt(exp);
|
|
90
|
+
if (exponent < 0) {
|
|
91
|
+
precision = Math.abs(exponent);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (numStr.includes('.')) {
|
|
95
|
+
// 普通小数获取小数位数
|
|
96
|
+
precision = numStr.split('.')[1].length;
|
|
97
|
+
}
|
|
98
|
+
if (precision < defaultPrecision) {
|
|
99
|
+
return defaultPrecision;
|
|
100
|
+
}
|
|
101
|
+
// 最大4位(防止计算出现浮点数导致一些问题)
|
|
102
|
+
if (precision > 4) {
|
|
103
|
+
return 4;
|
|
104
|
+
}
|
|
105
|
+
return precision;
|
|
106
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
/**
|
|
2
3
|
* @author 陈亚雄
|
|
3
4
|
* @description 附件相关工具方法
|
|
@@ -73,15 +74,17 @@ export function checkFile(file, restParams) {
|
|
|
73
74
|
var MAXSIZE = maxSize ? maxSize : 1024 * 1024 * 100;
|
|
74
75
|
var MAXSIZESTR = maxSizeStr ? maxSizeStr : transformFileSize(MAXSIZE);
|
|
75
76
|
if (!ACCEPT.includes(fileNameSuffix)) {
|
|
76
|
-
message.warning(
|
|
77
|
+
message.warning(i18next.t('不支持 {{fileNameSuffix}} 文件格式!', {
|
|
78
|
+
fileNameSuffix: fileNameSuffix,
|
|
79
|
+
}));
|
|
77
80
|
return AntUpload.LIST_IGNORE;
|
|
78
81
|
}
|
|
79
82
|
if (fileSize === 0) {
|
|
80
|
-
message.warning(
|
|
83
|
+
message.warning(i18next.t('不能上传空文件!', {}));
|
|
81
84
|
return AntUpload.LIST_IGNORE;
|
|
82
85
|
}
|
|
83
86
|
if (fileSize > MAXSIZE) {
|
|
84
|
-
message.warning(
|
|
87
|
+
message.warning(i18next.t('文件超出 {{MAXSIZESTR}}!', { MAXSIZESTR: MAXSIZESTR }));
|
|
85
88
|
return AntUpload.LIST_IGNORE;
|
|
86
89
|
}
|
|
87
90
|
return Promise.resolve(file);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取语言配置 目前支持中文、英文
|
|
3
|
+
* @returns 返回当前语言配置
|
|
4
|
+
*/
|
|
5
|
+
export default function useBaseContext(): {
|
|
6
|
+
getScaleFactor: () => number;
|
|
7
|
+
apiBaseUrl?: string;
|
|
8
|
+
fileBaseUrl?: string;
|
|
9
|
+
numberInputAddThousandth?: boolean;
|
|
10
|
+
tableNumberFormatter?: (text: string, fieldName?: string, column?: any) => boolean | void;
|
|
11
|
+
isCustomDecimalField?: (fieldName: string, column: any) => boolean;
|
|
12
|
+
customDecimalFieldRender?: (text: any, record: any, index: any) => any;
|
|
13
|
+
isTableSortEnabled?: boolean;
|
|
14
|
+
isTableFilterEnabled?: boolean;
|
|
15
|
+
sortColumnExtraWidth?: number;
|
|
16
|
+
filterColumnExtraWidth?: number;
|
|
17
|
+
isRecordCommonSearch?: boolean;
|
|
18
|
+
isUIWeeklyReview?: boolean;
|
|
19
|
+
isTableShowContextMenu?: boolean;
|
|
20
|
+
isTableEditShowContextMenu?: boolean;
|
|
21
|
+
isSelectJoinInLabel?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function useAntdContext(): import("antd/lib/config-provider").ConfigConsumerProps;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { useCallback, useContext } from 'react';
|
|
13
|
+
import ZtxkContext from './ZtxkContext';
|
|
14
|
+
import { ConfigProvider } from 'antd';
|
|
15
|
+
/**
|
|
16
|
+
* 获取语言配置 目前支持中文、英文
|
|
17
|
+
* @returns 返回当前语言配置
|
|
18
|
+
*/
|
|
19
|
+
export default function useBaseContext() {
|
|
20
|
+
var ztxkConfig = useContext(ZtxkContext);
|
|
21
|
+
var getScaleFactor = useCallback(function () {
|
|
22
|
+
var rootStyle = getComputedStyle(document.documentElement);
|
|
23
|
+
var scaleFactor = rootStyle.getPropertyValue('--zt-scale-factor').trim();
|
|
24
|
+
var scaleFactorNum = Number(scaleFactor);
|
|
25
|
+
return isNaN(scaleFactorNum) || scaleFactorNum <= 0 ? 1 : scaleFactorNum;
|
|
26
|
+
}, []);
|
|
27
|
+
return __assign(__assign({}, ztxkConfig), { getScaleFactor: getScaleFactor });
|
|
28
|
+
}
|
|
29
|
+
export function useAntdContext() {
|
|
30
|
+
return useContext(ConfigProvider.ConfigContext);
|
|
31
|
+
}
|