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,347 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
49
|
+
import React, { useRef, useState, useEffect, useImperativeHandle, forwardRef, } from 'react';
|
|
50
|
+
import MyStorage from '../../utils/MyStorage';
|
|
51
|
+
import { catchHandle } from '../../utils/fetch';
|
|
52
|
+
import { message, Modal, Input, Popconfirm, Button } from '../../../index';
|
|
53
|
+
import classNames from 'classnames';
|
|
54
|
+
// 常用搜索模板key
|
|
55
|
+
var COMMON_TEMPLATE_KEY = 'ztxk_form_common_template_key';
|
|
56
|
+
// 序列化数据,剥离函数等不可结构化克隆的属性(IndexedDB 兼容)
|
|
57
|
+
function serializeData(data) {
|
|
58
|
+
if (data == null)
|
|
59
|
+
return data;
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(JSON.stringify(data, function (_key, value) {
|
|
62
|
+
return typeof value === 'function' ? undefined : value;
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
catch (_a) {
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
var TemplateModal = function (_a) {
|
|
70
|
+
var visible = _a.visible, onClose = _a.onClose, templateList = _a.templateList, currentList = _a.currentList, onSaved = _a.onSaved, onDelete = _a.onDelete, currentTemplateKey = _a.currentTemplateKey, setCurrentTemplateKey = _a.setCurrentTemplateKey, onInsideChange = _a.onInsideChange, setStorageCurrentKey = _a.setStorageCurrentKey, updateServerData = _a.updateServerData;
|
|
71
|
+
var iptRef = useRef(null);
|
|
72
|
+
var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
+
var currentCommonName, data, err_1;
|
|
74
|
+
var _a, _b;
|
|
75
|
+
return __generator(this, function (_c) {
|
|
76
|
+
switch (_c.label) {
|
|
77
|
+
case 0:
|
|
78
|
+
currentCommonName = (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.getValue();
|
|
79
|
+
if (!currentCommonName) {
|
|
80
|
+
updateServerData === null || updateServerData === void 0 ? void 0 : updateServerData();
|
|
81
|
+
onClose();
|
|
82
|
+
return [2 /*return*/];
|
|
83
|
+
}
|
|
84
|
+
data = {
|
|
85
|
+
title: currentCommonName,
|
|
86
|
+
value: currentList,
|
|
87
|
+
key: Date.now(),
|
|
88
|
+
};
|
|
89
|
+
_c.label = 1;
|
|
90
|
+
case 1:
|
|
91
|
+
_c.trys.push([1, 3, , 4]);
|
|
92
|
+
return [4 /*yield*/, onSaved(data)];
|
|
93
|
+
case 2:
|
|
94
|
+
_c.sent();
|
|
95
|
+
message.info(i18next.t('保存成功!'));
|
|
96
|
+
(_b = iptRef.current) === null || _b === void 0 ? void 0 : _b.setValue('');
|
|
97
|
+
onClose();
|
|
98
|
+
return [3 /*break*/, 4];
|
|
99
|
+
case 3:
|
|
100
|
+
err_1 = _c.sent();
|
|
101
|
+
message.info(i18next.t('保存模板失败!'));
|
|
102
|
+
return [3 /*break*/, 4];
|
|
103
|
+
case 4: return [2 /*return*/];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}); };
|
|
107
|
+
return (React.createElement(Modal, { visible: visible, onCancel: onClose, onOk: handleOk, title: i18next.t('模板设置'), okText: i18next.t('确认'), loading: false },
|
|
108
|
+
React.createElement(MyInput, { ref: iptRef }),
|
|
109
|
+
React.createElement("div", { className: "search--template-list" }, templateList.map(function (item, index) { return (React.createElement("div", { key: item.key, className: classNames('search--template-item', {
|
|
110
|
+
'search--template-item-active': item.key === currentTemplateKey,
|
|
111
|
+
}), onClick: function () {
|
|
112
|
+
setCurrentTemplateKey(item.key);
|
|
113
|
+
onInsideChange(item.value);
|
|
114
|
+
// 设置当前存储选中的key
|
|
115
|
+
setStorageCurrentKey === null || setStorageCurrentKey === void 0 ? void 0 : setStorageCurrentKey(item.key);
|
|
116
|
+
} },
|
|
117
|
+
React.createElement("div", { className: "search--template-item-title" }, item.title),
|
|
118
|
+
React.createElement(Popconfirm, { title: i18next.t('确认删除吗?'), onConfirm: function (e) {
|
|
119
|
+
var _a, _b;
|
|
120
|
+
(_a = e === null || e === void 0 ? void 0 : e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
121
|
+
(_b = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e);
|
|
122
|
+
onDelete(index);
|
|
123
|
+
}, onCancel: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); } },
|
|
124
|
+
React.createElement(Button, { type: "default" }, i18next.t('删除'))))); }))));
|
|
125
|
+
};
|
|
126
|
+
var MyInput = forwardRef(function (_props, ref) {
|
|
127
|
+
var _a = useState(''), value = _a[0], setValue = _a[1];
|
|
128
|
+
var onChange = function (e) {
|
|
129
|
+
setValue(e.target.value);
|
|
130
|
+
};
|
|
131
|
+
useImperativeHandle(ref, function () { return ({
|
|
132
|
+
getValue: function () { return value; },
|
|
133
|
+
setValue: setValue,
|
|
134
|
+
}); });
|
|
135
|
+
return (React.createElement(Input, { placeholder: i18next.t('请输入模板名称'), value: value, onChange: onChange }));
|
|
136
|
+
});
|
|
137
|
+
// 设置模板,使用模板方法
|
|
138
|
+
export function useTemplate(options) {
|
|
139
|
+
var _this = this;
|
|
140
|
+
var templateKey = options.templateKey, currentList = options.currentList, initDynamicArr = options.initDynamicArr, onInsideChange = options.onInsideChange, tableKey = options.tableKey;
|
|
141
|
+
var TABLE_KEY = tableKey || COMMON_TEMPLATE_KEY;
|
|
142
|
+
// 常用搜索列表存储实例
|
|
143
|
+
var storageRef = useRef(new MyStorage({ tableKey: TABLE_KEY }));
|
|
144
|
+
var recordTemplateKey = templateKey || window.location.pathname;
|
|
145
|
+
// 常用搜索列表
|
|
146
|
+
var _a = useState([]), templateList = _a[0], setTemplateList = _a[1];
|
|
147
|
+
// 当前常用搜索key值
|
|
148
|
+
var _b = useState(''), currentTemplateKey = _b[0], setCurrentTemplateKey = _b[1];
|
|
149
|
+
// 模板弹框显示状态
|
|
150
|
+
var _c = useState(false), modalVisible = _c[0], setModalVisible = _c[1];
|
|
151
|
+
// 初始化设置数据
|
|
152
|
+
useEffect(function () {
|
|
153
|
+
storageRef.current.getItem(recordTemplateKey).then(function (res) {
|
|
154
|
+
var _a;
|
|
155
|
+
if ((res === null || res === void 0 ? void 0 : res.list) && res.list.length > 0) {
|
|
156
|
+
setTemplateList(res.list);
|
|
157
|
+
setCurrentTemplateKey(res.currentKey || ((_a = res.list[0]) === null || _a === void 0 ? void 0 : _a.key) || '');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
setTemplateList([]);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}, [initDynamicArr]);
|
|
164
|
+
/**
|
|
165
|
+
* description: 存储数据(保存当前选中模板)
|
|
166
|
+
*/
|
|
167
|
+
var saveCurrentTemplate = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
168
|
+
var localKey;
|
|
169
|
+
var _a;
|
|
170
|
+
return __generator(this, function (_b) {
|
|
171
|
+
localKey = recordTemplateKey;
|
|
172
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
|
|
173
|
+
var _a, _b, _c;
|
|
174
|
+
var list = (res === null || res === void 0 ? void 0 : res.list) || [];
|
|
175
|
+
if (!Array.isArray(list)) {
|
|
176
|
+
list = [];
|
|
177
|
+
}
|
|
178
|
+
// 更新当前选中的模板数据
|
|
179
|
+
var index = list.findIndex(function (item) { return item.key === currentTemplateKey; });
|
|
180
|
+
var serializedCurrentList = serializeData(currentList);
|
|
181
|
+
if (index !== -1) {
|
|
182
|
+
list[index].value = serializedCurrentList;
|
|
183
|
+
}
|
|
184
|
+
else if (list.length > 0) {
|
|
185
|
+
list[0].value = serializedCurrentList;
|
|
186
|
+
}
|
|
187
|
+
var newData = {
|
|
188
|
+
list: list,
|
|
189
|
+
currentKey: currentTemplateKey || ((_a = list[0]) === null || _a === void 0 ? void 0 : _a.key) || '',
|
|
190
|
+
};
|
|
191
|
+
setTemplateList(newData.list);
|
|
192
|
+
return (_c = (_b = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _b === void 0 ? void 0 : _b.setItem(localKey, newData)) === null || _c === void 0 ? void 0 : _c.then(function () {
|
|
193
|
+
updateServerData();
|
|
194
|
+
});
|
|
195
|
+
})];
|
|
196
|
+
});
|
|
197
|
+
}); };
|
|
198
|
+
/**
|
|
199
|
+
* description: 存储数据(新增/修改模板)
|
|
200
|
+
*/
|
|
201
|
+
var setData = function (data, isSaveServer) {
|
|
202
|
+
if (isSaveServer === void 0) { isSaveServer = true; }
|
|
203
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
+
var localKey, saveData;
|
|
205
|
+
var _a;
|
|
206
|
+
return __generator(this, function (_b) {
|
|
207
|
+
localKey = recordTemplateKey;
|
|
208
|
+
saveData = __assign({}, serializeData(data));
|
|
209
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
var list = (res === null || res === void 0 ? void 0 : res.list) || [];
|
|
212
|
+
if (!Array.isArray(list)) {
|
|
213
|
+
list = [];
|
|
214
|
+
}
|
|
215
|
+
var index = list.findIndex(function (item) { return item.key === saveData.key; });
|
|
216
|
+
if (index !== -1) {
|
|
217
|
+
list[index] = saveData;
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
list.unshift(saveData);
|
|
221
|
+
}
|
|
222
|
+
var newData = {
|
|
223
|
+
list: list,
|
|
224
|
+
currentKey: saveData.key,
|
|
225
|
+
};
|
|
226
|
+
setCurrentTemplateKey(saveData.key);
|
|
227
|
+
setTemplateList(newData.list);
|
|
228
|
+
return (_b = (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, newData)) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
229
|
+
if (isSaveServer) {
|
|
230
|
+
updateServerData();
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
})];
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* 设置选中的key
|
|
239
|
+
*/
|
|
240
|
+
var setStorageCurrentKey = function (key) { return __awaiter(_this, void 0, void 0, function () {
|
|
241
|
+
var localKey;
|
|
242
|
+
var _a;
|
|
243
|
+
return __generator(this, function (_b) {
|
|
244
|
+
localKey = recordTemplateKey;
|
|
245
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
|
|
246
|
+
var _a;
|
|
247
|
+
var list = (res === null || res === void 0 ? void 0 : res.list) || [];
|
|
248
|
+
if (!Array.isArray(list)) {
|
|
249
|
+
list = [];
|
|
250
|
+
}
|
|
251
|
+
var newData = {
|
|
252
|
+
list: list,
|
|
253
|
+
currentKey: key,
|
|
254
|
+
};
|
|
255
|
+
return (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, newData);
|
|
256
|
+
})];
|
|
257
|
+
});
|
|
258
|
+
}); };
|
|
259
|
+
/**
|
|
260
|
+
* description: 删除数据
|
|
261
|
+
*/
|
|
262
|
+
var deleteData = function (localIndex) { return __awaiter(_this, void 0, void 0, function () {
|
|
263
|
+
var localKey;
|
|
264
|
+
var _a;
|
|
265
|
+
return __generator(this, function (_b) {
|
|
266
|
+
localKey = recordTemplateKey;
|
|
267
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
|
|
268
|
+
var _a, _b, _c, _d;
|
|
269
|
+
var list = (res === null || res === void 0 ? void 0 : res.list) || [];
|
|
270
|
+
if (Array.isArray(list)) {
|
|
271
|
+
var deletedKey = (_a = list[localIndex]) === null || _a === void 0 ? void 0 : _a.key;
|
|
272
|
+
list.splice(localIndex, 1);
|
|
273
|
+
// 如果删除的是当前选中的模板,重置选中状态
|
|
274
|
+
var newCurrentKey = (res === null || res === void 0 ? void 0 : res.currentKey) || '';
|
|
275
|
+
if (deletedKey === newCurrentKey) {
|
|
276
|
+
newCurrentKey = ((_b = list[0]) === null || _b === void 0 ? void 0 : _b.key) || '';
|
|
277
|
+
}
|
|
278
|
+
var newData = {
|
|
279
|
+
list: list,
|
|
280
|
+
currentKey: newCurrentKey,
|
|
281
|
+
};
|
|
282
|
+
setTemplateList(newData.list);
|
|
283
|
+
(_d = (_c = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _c === void 0 ? void 0 : _c.setItem(localKey, newData)) === null || _d === void 0 ? void 0 : _d.then(function () {
|
|
284
|
+
updateServerData();
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
})];
|
|
288
|
+
});
|
|
289
|
+
}); };
|
|
290
|
+
/**
|
|
291
|
+
* description: 直接替换原有数据
|
|
292
|
+
*/
|
|
293
|
+
var setReplaceData = function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
294
|
+
var localKey;
|
|
295
|
+
var _a;
|
|
296
|
+
return __generator(this, function (_b) {
|
|
297
|
+
localKey = recordTemplateKey;
|
|
298
|
+
if (setTemplateList) {
|
|
299
|
+
setTemplateList(data.list || data);
|
|
300
|
+
}
|
|
301
|
+
return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, data)];
|
|
302
|
+
});
|
|
303
|
+
}); };
|
|
304
|
+
/**
|
|
305
|
+
* 直接更新服务器数据
|
|
306
|
+
*/
|
|
307
|
+
var updateServerData = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
308
|
+
var _a, _b, _c, _d;
|
|
309
|
+
return __generator(this, function (_e) {
|
|
310
|
+
return [2 /*return*/, (_d = (_c = (_b = (_a = storageRef.current) === null || _a === void 0 ? void 0 : _a.getAllItems()) === null || _b === void 0 ? void 0 : _b.then(function (res) {
|
|
311
|
+
return catchHandle({
|
|
312
|
+
customKey: TABLE_KEY,
|
|
313
|
+
customValue: JSON.stringify(res),
|
|
314
|
+
mark: i18next.t('模板设置'),
|
|
315
|
+
});
|
|
316
|
+
})) === null || _c === void 0 ? void 0 : _c.catch) === null || _d === void 0 ? void 0 : _d.call(_c, function () { })];
|
|
317
|
+
});
|
|
318
|
+
}); };
|
|
319
|
+
/**
|
|
320
|
+
* 打开模板弹框
|
|
321
|
+
*/
|
|
322
|
+
var openTemplateModal = function () {
|
|
323
|
+
setModalVisible(true);
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* 渲染模板弹框组件
|
|
327
|
+
*/
|
|
328
|
+
var renderTemplateModal = function () {
|
|
329
|
+
return (React.createElement(TemplateModal, { visible: modalVisible, onClose: function () { return setModalVisible(false); }, templateList: templateList, currentList: currentList, onSaved: setData, onDelete: deleteData, currentTemplateKey: currentTemplateKey, setCurrentTemplateKey: setCurrentTemplateKey, setStorageCurrentKey: setStorageCurrentKey, onInsideChange: onInsideChange, updateServerData: updateServerData }));
|
|
330
|
+
};
|
|
331
|
+
var getCurrentTemplate = function () {
|
|
332
|
+
return templateList.find(function (item) { return item.key === currentTemplateKey; });
|
|
333
|
+
};
|
|
334
|
+
return {
|
|
335
|
+
templateList: templateList,
|
|
336
|
+
setTemplateList: setTemplateList,
|
|
337
|
+
currentTemplateKey: currentTemplateKey,
|
|
338
|
+
setCurrentTemplateKey: setCurrentTemplateKey,
|
|
339
|
+
setData: setData,
|
|
340
|
+
saveCurrentTemplate: saveCurrentTemplate,
|
|
341
|
+
deleteData: deleteData,
|
|
342
|
+
setReplaceData: setReplaceData,
|
|
343
|
+
openTemplateModal: openTemplateModal,
|
|
344
|
+
renderTemplateModal: renderTemplateModal,
|
|
345
|
+
getCurrentTemplate: getCurrentTemplate,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
/**
|
|
2
3
|
* @author 陈亚雄
|
|
3
4
|
* @description 附件预览下载组件
|
|
@@ -31,7 +32,7 @@ var AttachOperation = function (_a) {
|
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
if (attachSize >= MAX_PREVIEW_FILE_SIZE) {
|
|
34
|
-
message.warning('文件过大,暂不支持在线预览,请先下载后查看!');
|
|
35
|
+
message.warning(i18next.t('文件过大,暂不支持在线预览,请先下载后查看!'));
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
37
38
|
previewFile(ZT_FILE_BASEURL, attachId, {
|
|
@@ -45,12 +46,12 @@ var AttachOperation = function (_a) {
|
|
|
45
46
|
React.createElement("div", { className: "signatures-attach--text", title: dangerouslySetXss(attachName) }, previewBtn(attachId, dangerouslySetXss(attachName))),
|
|
46
47
|
React.createElement("div", { className: "signatures-attach--operation" },
|
|
47
48
|
React.createElement(Button, { type: "link", onClick: function () {
|
|
48
|
-
downloadFileCallBack(ZT_API_BASEURL, attachId, dangerouslySetXss(attachName) || '附件', {
|
|
49
|
+
downloadFileCallBack(ZT_API_BASEURL, attachId, dangerouslySetXss(attachName) || i18next.t('附件'), {
|
|
49
50
|
authToken: token,
|
|
50
51
|
});
|
|
51
|
-
} },
|
|
52
|
-
previewBtn(attachId, '预览'),
|
|
53
|
-
showDeleteBtn && (React.createElement(Popconfirm, { title:
|
|
54
|
-
React.createElement(Button, { type: "link" },
|
|
52
|
+
} }, i18next.t('下载')),
|
|
53
|
+
previewBtn(attachId, i18next.t('预览')),
|
|
54
|
+
showDeleteBtn && (React.createElement(Popconfirm, { title: i18next.t('是否删除该条数据?'), cancelText: i18next.t('否'), okText: i18next.t('是'), onConfirm: function () { return onDeleteFile(); } },
|
|
55
|
+
React.createElement(Button, { type: "link" }, i18next.t('删除'))))))) : null;
|
|
55
56
|
};
|
|
56
57
|
export default AttachOperation;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
49
|
+
import React, { useState, useMemo, memo, forwardRef, useImperativeHandle, } from 'react';
|
|
50
|
+
import { Modal, ProForm, Input, message } from '../../../../index';
|
|
51
|
+
import { useForm } from '../../../ProForm';
|
|
52
|
+
var CodeModal = function (props, ref) {
|
|
53
|
+
var details = props.details, request = props.request;
|
|
54
|
+
var _a = useState(false), visible = _a[0], setVisible = _a[1];
|
|
55
|
+
var _b = useState(), code = _b[0], setCode = _b[1];
|
|
56
|
+
var form = useForm()[0];
|
|
57
|
+
var items = useMemo(function () {
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
name: 'title',
|
|
61
|
+
label: i18next.t('流程标题'),
|
|
62
|
+
isRequired: true,
|
|
63
|
+
width: 'halfAll',
|
|
64
|
+
render: function () {
|
|
65
|
+
return React.createElement(Input, { placeholder: i18next.t('请输入流程标题') });
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'formNo',
|
|
70
|
+
label: i18next.t('流程ID'),
|
|
71
|
+
isRequired: true,
|
|
72
|
+
width: 'halfAll',
|
|
73
|
+
render: function () {
|
|
74
|
+
return React.createElement(Input, { placeholder: i18next.t('请输入流程ID') });
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'applicantEmpNumber',
|
|
79
|
+
label: i18next.t('用印人工号'),
|
|
80
|
+
isRequired: true,
|
|
81
|
+
width: 'halfAll',
|
|
82
|
+
render: function () {
|
|
83
|
+
return React.createElement(Input, { placeholder: i18next.t('请输入用印人工号') });
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
}, []);
|
|
88
|
+
var onCancel = function () {
|
|
89
|
+
setVisible(false);
|
|
90
|
+
};
|
|
91
|
+
var onOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
92
|
+
var params, result, data, err_1;
|
|
93
|
+
var _a, _b;
|
|
94
|
+
return __generator(this, function (_c) {
|
|
95
|
+
switch (_c.label) {
|
|
96
|
+
case 0:
|
|
97
|
+
_c.trys.push([0, 2, , 3]);
|
|
98
|
+
return [4 /*yield*/, form.validateFields()];
|
|
99
|
+
case 1:
|
|
100
|
+
_c.sent();
|
|
101
|
+
params = form.getFieldsValue();
|
|
102
|
+
if (Array.isArray(details)) {
|
|
103
|
+
result = details.map(function (item) {
|
|
104
|
+
return {
|
|
105
|
+
sealNo: item.sealNo,
|
|
106
|
+
sealCount: item.sealCount,
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
data = __assign(__assign({}, params), {
|
|
110
|
+
// 20240407 添加工号参数(额外参数)
|
|
111
|
+
fingerNo: params.applicantEmpNumber, details: result });
|
|
112
|
+
request({
|
|
113
|
+
url: '/api/zmdms-resource/seal/get-verify-code',
|
|
114
|
+
method: 'POST',
|
|
115
|
+
data: data,
|
|
116
|
+
})
|
|
117
|
+
.then(function (res) {
|
|
118
|
+
var _a, _b;
|
|
119
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
120
|
+
setCode((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.vertifyCode);
|
|
121
|
+
message.info(i18next.t('验证码已获取成功'));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
message.error(((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('获取验证码失败'));
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
.catch(function (err) {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
console.log(err);
|
|
130
|
+
message.error(((_b = (_a = err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('获取验证码失败'));
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return [3 /*break*/, 3];
|
|
134
|
+
case 2:
|
|
135
|
+
err_1 = _c.sent();
|
|
136
|
+
console.log(err_1);
|
|
137
|
+
message.error((_b = (_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.errorFields) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.errors[0]);
|
|
138
|
+
return [3 /*break*/, 3];
|
|
139
|
+
case 3: return [2 /*return*/];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}); };
|
|
143
|
+
useImperativeHandle(ref, function () {
|
|
144
|
+
return {
|
|
145
|
+
open: function (params) {
|
|
146
|
+
setVisible(true);
|
|
147
|
+
form.setFieldsValue(params);
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
return (React.createElement(Modal, { visible: visible, loading: false, width: "70%", title: i18next.t('信息补充'), onCancel: onCancel, onOk: onOk },
|
|
152
|
+
React.createElement(ProForm, { form: form, items: items }),
|
|
153
|
+
React.createElement("p", null,
|
|
154
|
+
i18next.t('验证码:'),
|
|
155
|
+
code)));
|
|
156
|
+
};
|
|
157
|
+
export default memo(forwardRef(CodeModal));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
/**
|
|
2
3
|
* @author 陈亚雄
|
|
3
4
|
* @description 合同比对结果
|
|
@@ -11,7 +12,7 @@ var CompareResult = function (_a) {
|
|
|
11
12
|
// 设置查看比对结果按钮的loading状态
|
|
12
13
|
var _b = useState(false), resultLoading = _b[0], setResultLoading = _b[1];
|
|
13
14
|
var viewCompareResult = function () {
|
|
14
|
-
console.log('查看比对结果', index, record);
|
|
15
|
+
console.log(i18next.t('查看比对结果'), index, record);
|
|
15
16
|
setResultLoading(true);
|
|
16
17
|
try {
|
|
17
18
|
var task_id = record.taskId;
|
|
@@ -29,20 +30,20 @@ var CompareResult = function (_a) {
|
|
|
29
30
|
window.open(res.data.data[0].url);
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
|
-
message.info('文件比对中,请稍后再试!');
|
|
33
|
+
message.info(i18next.t('文件比对中,请稍后再试!'));
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
message.error(res.data.msg || '出错了');
|
|
37
|
+
message.error(res.data.msg || i18next.t('出错了'));
|
|
37
38
|
}
|
|
38
39
|
})
|
|
39
40
|
.catch(function (error) {
|
|
40
41
|
var _a, _b;
|
|
41
|
-
message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '请求失败!');
|
|
42
|
+
message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
45
|
-
message.info('请先进行合同比对!');
|
|
46
|
+
message.info(i18next.t('请先进行合同比对!'));
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
catch (err) {
|
|
@@ -53,6 +54,6 @@ var CompareResult = function (_a) {
|
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
return (React.createElement(React.Fragment, null,
|
|
56
|
-
React.createElement("div", null, record.taskId ? (React.createElement(Button, { type: "link", onClick: viewCompareResult, loading: resultLoading },
|
|
57
|
+
React.createElement("div", null, record.taskId ? (React.createElement(Button, { type: "link", onClick: viewCompareResult, loading: resultLoading }, i18next.t('查看比对结果'))) : (React.createElement(React.Fragment, null)))));
|
|
57
58
|
};
|
|
58
59
|
export default CompareResult;
|