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,132 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { getToken, jwtDecode } from 'ztxkutils/dist/authority';
|
|
4
|
+
import { message } from '../../../index';
|
|
5
|
+
/**
|
|
6
|
+
* 根据规则获取群杰验证码
|
|
7
|
+
*/
|
|
8
|
+
export default function useGetQjVerifyCode(options) {
|
|
9
|
+
var allOptions = options.allOptions, request = options.request, isNewQys = options.isNewQys;
|
|
10
|
+
var _a = useState([]), qjVerifyCodeData = _a[0], setQjVerifyCodeData = _a[1];
|
|
11
|
+
// 根据allOptions解析出需要的参数
|
|
12
|
+
var params = useMemo(function () {
|
|
13
|
+
if (!isNewQys) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
if (Array.isArray(allOptions)) {
|
|
17
|
+
return allOptions
|
|
18
|
+
.filter(function (item) { return item.wfProcessInstId; })
|
|
19
|
+
.map(function (option) { return ({
|
|
20
|
+
verifyUserIds: option.verifyUserIds,
|
|
21
|
+
wfProcessInstId: option.wfProcessInstId,
|
|
22
|
+
isAuth: comparePermission(option.verifyUserIds),
|
|
23
|
+
}); });
|
|
24
|
+
}
|
|
25
|
+
if (allOptions && allOptions.wfProcessInstId) {
|
|
26
|
+
return [
|
|
27
|
+
{
|
|
28
|
+
verifyUserIds: allOptions.verifyUserIds,
|
|
29
|
+
wfProcessInstId: allOptions.wfProcessInstId,
|
|
30
|
+
isAuth: comparePermission(allOptions.verifyUserIds),
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
return [];
|
|
35
|
+
}, [allOptions, isNewQys]);
|
|
36
|
+
// 根据解析出来的参数,和当前用户信息,获取最终查询参数
|
|
37
|
+
var queryParams = useMemo(function () {
|
|
38
|
+
if (!isNewQys) {
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
if (params) {
|
|
42
|
+
return params
|
|
43
|
+
.filter(function (item) { return item.isAuth && item.wfProcessInstId; })
|
|
44
|
+
.map(function (item) { return item.wfProcessInstId; })
|
|
45
|
+
.join(',');
|
|
46
|
+
}
|
|
47
|
+
return '';
|
|
48
|
+
}, [params, isNewQys]);
|
|
49
|
+
var getQjVerifyCodeHandle = useCallback(function (queryParams) {
|
|
50
|
+
return request({
|
|
51
|
+
url: "/api/zmdms-resource/qjverificationcode/get-verify-code-by-processids?processIds=" + queryParams,
|
|
52
|
+
method: 'get',
|
|
53
|
+
})
|
|
54
|
+
.then(function (res) {
|
|
55
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
56
|
+
return res;
|
|
57
|
+
}
|
|
58
|
+
return Promise.reject(res);
|
|
59
|
+
})
|
|
60
|
+
.catch(function (error) {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
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('群杰验证码请求失败!'));
|
|
63
|
+
return Promise.reject(error);
|
|
64
|
+
});
|
|
65
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
|
+
}, []);
|
|
67
|
+
// 发出请求
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
if (queryParams && isNewQys) {
|
|
70
|
+
getQjVerifyCodeHandle(queryParams)
|
|
71
|
+
.then(function (res) {
|
|
72
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
73
|
+
setQjVerifyCodeData(res.data.data);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// 接口请求失败时,将数据拆分一下,让各自的列表自行去重复上传
|
|
77
|
+
var list = queryParams.split(',');
|
|
78
|
+
setQjVerifyCodeData(list.map(function (item) {
|
|
79
|
+
return {
|
|
80
|
+
processId: item,
|
|
81
|
+
qjVerificationCode: '',
|
|
82
|
+
isError: true,
|
|
83
|
+
};
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.catch(function (error) {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
// 接口请求失败时,将数据拆分一下,让各自的列表自行去重复上传
|
|
90
|
+
var list = queryParams.split(',');
|
|
91
|
+
setQjVerifyCodeData(list.map(function (item) {
|
|
92
|
+
return {
|
|
93
|
+
processId: item,
|
|
94
|
+
qjVerificationCode: '',
|
|
95
|
+
isError: true,
|
|
96
|
+
};
|
|
97
|
+
}));
|
|
98
|
+
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('群杰验证码请求失败!'));
|
|
99
|
+
return Promise.reject(error);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
|
+
}, [queryParams, isNewQys]);
|
|
104
|
+
return {
|
|
105
|
+
qjVerifyCodeData: qjVerifyCodeData,
|
|
106
|
+
getQjVerifyCodeHandle: getQjVerifyCodeHandle,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @returns 根据token获取用户信息
|
|
111
|
+
*/
|
|
112
|
+
export function getUserInfoByToken() {
|
|
113
|
+
var token = getToken();
|
|
114
|
+
if (token) {
|
|
115
|
+
var userInfo = jwtDecode(token);
|
|
116
|
+
return userInfo;
|
|
117
|
+
}
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 权限比对
|
|
122
|
+
*/
|
|
123
|
+
export function comparePermission(permission) {
|
|
124
|
+
var userInfo = getUserInfoByToken();
|
|
125
|
+
if (userInfo && permission) {
|
|
126
|
+
var user_id = userInfo.user_id;
|
|
127
|
+
if (permission.includes(user_id)) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IFileItem, ITrackAllData } from '../interface';
|
|
2
|
+
interface IOptions {
|
|
3
|
+
allData: ITrackAllData;
|
|
4
|
+
dataTypeSort: string[];
|
|
5
|
+
isDeleteAllFileWhenJustUseQj?: boolean;
|
|
6
|
+
isDeletePlaceholderFileData?: boolean;
|
|
7
|
+
isSupportNoAttachQj?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 将各级获取到的附件数据拉平成一个整体
|
|
11
|
+
*/
|
|
12
|
+
export default function useMergeRecords(options: IOptions): {
|
|
13
|
+
mergeRecords: IFileItem[];
|
|
14
|
+
isQunjOnlyChecked: boolean;
|
|
15
|
+
isHiddenColumns: boolean;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { currentRecordIsOnlyQunj } from '../utils';
|
|
3
|
+
/**
|
|
4
|
+
* 将各级获取到的附件数据拉平成一个整体
|
|
5
|
+
*/
|
|
6
|
+
export default function useMergeRecords(options) {
|
|
7
|
+
var allData = options.allData, dataTypeSort = options.dataTypeSort, isDeleteAllFileWhenJustUseQj = options.isDeleteAllFileWhenJustUseQj, isDeletePlaceholderFileData = options.isDeletePlaceholderFileData, isSupportNoAttachQj = options.isSupportNoAttachQj;
|
|
8
|
+
var mergeRecords = useMemo(function () {
|
|
9
|
+
var allRecords = [];
|
|
10
|
+
dataTypeSort.forEach(function (dataType) {
|
|
11
|
+
var _a;
|
|
12
|
+
var records = ((_a = allData === null || allData === void 0 ? void 0 : allData[dataType]) === null || _a === void 0 ? void 0 : _a.records) || [];
|
|
13
|
+
// 这里不清楚为什么要过滤掉群杰印章的占位符??? 这里加个新属性,标识可以无附件时添加群杰印章
|
|
14
|
+
if (isDeletePlaceholderFileData && !isSupportNoAttachQj) {
|
|
15
|
+
records = records.filter(function (record) { return !currentRecordIsOnlyQunj(record); });
|
|
16
|
+
}
|
|
17
|
+
allRecords = allRecords.concat(records);
|
|
18
|
+
});
|
|
19
|
+
return allRecords;
|
|
20
|
+
}, [allData, dataTypeSort, isDeletePlaceholderFileData, isSupportNoAttachQj]);
|
|
21
|
+
// 是否仅选中群杰印章
|
|
22
|
+
var isQunjOnlyChecked = useMemo(function () {
|
|
23
|
+
return mergeRecords.some(function (record) { return currentRecordIsOnlyQunj(record); });
|
|
24
|
+
}, [mergeRecords]);
|
|
25
|
+
// 是否能隐藏非群杰印章模块
|
|
26
|
+
var isHiddenColumns = useMemo(function () {
|
|
27
|
+
// 如果没数据的话,不显示契约锁吗?
|
|
28
|
+
if (mergeRecords.length === 0) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (!isDeleteAllFileWhenJustUseQj) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (Array.isArray(mergeRecords)) {
|
|
35
|
+
if (mergeRecords.length === 1) {
|
|
36
|
+
return mergeRecords.every(function (record) { return currentRecordIsOnlyQunj(record); });
|
|
37
|
+
}
|
|
38
|
+
if (mergeRecords.length === 2) {
|
|
39
|
+
return mergeRecords.every(function (record) { return currentRecordIsOnlyQunj(record); });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}, [mergeRecords, isDeleteAllFileWhenJustUseQj]);
|
|
44
|
+
return {
|
|
45
|
+
mergeRecords: mergeRecords,
|
|
46
|
+
isQunjOnlyChecked: isQunjOnlyChecked,
|
|
47
|
+
isHiddenColumns: isHiddenColumns,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IElectronSignaturesProps, IElectronSignaturesItem } from '../interface';
|
|
3
|
+
interface IOptions {
|
|
4
|
+
/**
|
|
5
|
+
* 是否开启非受控模式
|
|
6
|
+
* 非受控模式开启后,数值的改变交由内部控制。外部只需要在合适的时机 获取数据即可
|
|
7
|
+
*/
|
|
8
|
+
isUnControlled?: IElectronSignaturesProps['isUnControlled'];
|
|
9
|
+
/**
|
|
10
|
+
* 触发外部onChange事件
|
|
11
|
+
*/
|
|
12
|
+
onValueChange?: IElectronSignaturesItem['onValueChange'];
|
|
13
|
+
/**
|
|
14
|
+
* 当前数据类型
|
|
15
|
+
*/
|
|
16
|
+
dataType?: IElectronSignaturesItem['dataType'];
|
|
17
|
+
/**
|
|
18
|
+
* 当前选中的印章数据
|
|
19
|
+
*/
|
|
20
|
+
electronicSealIdList?: IElectronSignaturesItem['electronicSealIdList'];
|
|
21
|
+
/**
|
|
22
|
+
* 是否加盖责任人手签章
|
|
23
|
+
*/
|
|
24
|
+
isCheckedEconomic?: IElectronSignaturesItem['isCheckedEconomic'];
|
|
25
|
+
/**
|
|
26
|
+
* 后台用于维护当前合同id下附件id(key)与文档id(value)的关系map 后台解绑文档时使用
|
|
27
|
+
*/
|
|
28
|
+
docAttachMap?: IElectronSignaturesItem['docAttachMap'];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 电子印章列表选择相关数据 经过处理逻辑后 返回对应数据
|
|
32
|
+
*/
|
|
33
|
+
export default function useParseElectronListData(options: IOptions): {
|
|
34
|
+
/** 当前选中的电子印章数据 */
|
|
35
|
+
currentCheckedElectronicSealIdList: any;
|
|
36
|
+
/** 电子印章更改时触发 */
|
|
37
|
+
onElectronicSealIdChange: (this: any, e: any, isChange?: boolean) => void;
|
|
38
|
+
/** 当前是否需要经济责任人(一级责任人) */
|
|
39
|
+
currentIsCheckedEconomic: boolean;
|
|
40
|
+
setCurrentIsCheckedEconomic: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
41
|
+
/** 经济责任人(一级责任人)是否选中更改时触发 */
|
|
42
|
+
onCheckedEconomicChange: (this: any, e: any) => void;
|
|
43
|
+
/** 清空内部数据的方法,在某些情况下,可能要清空当前选中的电子印章数据、是否加盖一级责任人数据 */
|
|
44
|
+
onClearElectronListData: (this: unknown) => {
|
|
45
|
+
electronicSealIdList: any[];
|
|
46
|
+
isCheckedEconomic: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
4
|
+
/**
|
|
5
|
+
* 电子印章列表选择相关数据 经过处理逻辑后 返回对应数据
|
|
6
|
+
*/
|
|
7
|
+
export default function useParseElectronListData(options) {
|
|
8
|
+
var isUnControlled = options.isUnControlled, onValueChange = options.onValueChange, dataType = options.dataType, electronicSealIdList = options.electronicSealIdList, isCheckedEconomic = options.isCheckedEconomic, docAttachMap = options.docAttachMap;
|
|
9
|
+
// 当前选中电子印章数据
|
|
10
|
+
var _a = useState(function () {
|
|
11
|
+
return electronicSealIdList;
|
|
12
|
+
}), currentCheckedElectronicSealIdList = _a[0], setCurrentCheckedElectronicSealIdList = _a[1];
|
|
13
|
+
// 电子印章改变时触发
|
|
14
|
+
var onElectronicSealIdChange = useMemoizedFn(function (e, isChange) {
|
|
15
|
+
var _a;
|
|
16
|
+
if (isChange === void 0) { isChange = true; }
|
|
17
|
+
// 大多数情况下 当 onChange 触发时,需要判断
|
|
18
|
+
// 1. 非受控模式。那么组件内部应该直接进行控件 value 值的切换
|
|
19
|
+
// 2. 受控模式。那么组件内部的值应该由外部的 props 中的 value 决定而不应该自主切换。
|
|
20
|
+
// if (isUnControlled) {
|
|
21
|
+
setCurrentCheckedElectronicSealIdList(e);
|
|
22
|
+
// }
|
|
23
|
+
if (!dataType) {
|
|
24
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (isChange) {
|
|
28
|
+
onValueChange &&
|
|
29
|
+
onValueChange((_a = {}, _a[dataType] = { electronicSealIdList: e }, _a));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
// 是否加盖责任人手签章
|
|
33
|
+
var isCheckedEconomicBoolean = isCheckedEconomic + '' === '1'; // 默认是加盖的
|
|
34
|
+
var _b = useState(function () {
|
|
35
|
+
var getEconomicBoolean = getIsCheckedEconomic(docAttachMap);
|
|
36
|
+
return getEconomicBoolean === null
|
|
37
|
+
? isCheckedEconomicBoolean
|
|
38
|
+
: getEconomicBoolean;
|
|
39
|
+
}), currentIsCheckedEconomic = _b[0], setCurrentIsCheckedEconomic = _b[1];
|
|
40
|
+
// 加盖责任人手签章改变时触发
|
|
41
|
+
var onCheckedEconomicChange = useMemoizedFn(function (e) {
|
|
42
|
+
var _a;
|
|
43
|
+
// 大多数情况下 当 onChange 触发时,需要判断
|
|
44
|
+
// 1. 非受控模式。那么组件内部应该直接进行控件 value 值的切换
|
|
45
|
+
// 2. 受控模式。那么组件内部的值应该由外部的 props 中的 value 决定而不应该自主切换。
|
|
46
|
+
// if (isUnControlled) {
|
|
47
|
+
setCurrentIsCheckedEconomic(e.target.checked);
|
|
48
|
+
// }
|
|
49
|
+
if (!dataType) {
|
|
50
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
onValueChange &&
|
|
54
|
+
onValueChange((_a = {},
|
|
55
|
+
_a[dataType] = { isCheckedEconomic: e.target.checked },
|
|
56
|
+
_a));
|
|
57
|
+
});
|
|
58
|
+
// 暴露一个清空内部数据的方法
|
|
59
|
+
var onClearElectronListData = useMemoizedFn(function () {
|
|
60
|
+
// if (isUnControlled) {
|
|
61
|
+
setCurrentCheckedElectronicSealIdList([]);
|
|
62
|
+
setCurrentIsCheckedEconomic(false);
|
|
63
|
+
// }
|
|
64
|
+
return {
|
|
65
|
+
electronicSealIdList: [],
|
|
66
|
+
isCheckedEconomic: false,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* 如果是受控模式的话,直接将props的值 赋值给 内部变量
|
|
71
|
+
*/
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
// if (!isUnControlled) {
|
|
74
|
+
setCurrentCheckedElectronicSealIdList(electronicSealIdList);
|
|
75
|
+
// }
|
|
76
|
+
}, [isUnControlled, electronicSealIdList]);
|
|
77
|
+
useEffect(function () {
|
|
78
|
+
// if (!isUnControlled) {
|
|
79
|
+
var getEconomicBoolean = getIsCheckedEconomic(docAttachMap);
|
|
80
|
+
setCurrentIsCheckedEconomic(getEconomicBoolean === null
|
|
81
|
+
? isCheckedEconomicBoolean
|
|
82
|
+
: getEconomicBoolean);
|
|
83
|
+
// }
|
|
84
|
+
}, [isUnControlled, isCheckedEconomicBoolean, docAttachMap]);
|
|
85
|
+
return {
|
|
86
|
+
/** 当前选中的电子印章数据 */
|
|
87
|
+
currentCheckedElectronicSealIdList: currentCheckedElectronicSealIdList,
|
|
88
|
+
/** 电子印章更改时触发 */
|
|
89
|
+
onElectronicSealIdChange: onElectronicSealIdChange,
|
|
90
|
+
/** 当前是否需要经济责任人(一级责任人) */
|
|
91
|
+
currentIsCheckedEconomic: currentIsCheckedEconomic,
|
|
92
|
+
setCurrentIsCheckedEconomic: setCurrentIsCheckedEconomic,
|
|
93
|
+
/** 经济责任人(一级责任人)是否选中更改时触发 */
|
|
94
|
+
onCheckedEconomicChange: onCheckedEconomicChange,
|
|
95
|
+
/** 清空内部数据的方法,在某些情况下,可能要清空当前选中的电子印章数据、是否加盖一级责任人数据 */
|
|
96
|
+
onClearElectronListData: onClearElectronListData,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
// 解析文档数据 判断是否需要经济责任人(一级责任人)
|
|
100
|
+
function getIsCheckedEconomic(docAttachMap) {
|
|
101
|
+
if (typeof docAttachMap === 'string' && docAttachMap.length > 0) {
|
|
102
|
+
var _isEconomic = Object.entries(JSON.parse(docAttachMap)).find(function (_a) {
|
|
103
|
+
var key = _a[0], value = _a[1];
|
|
104
|
+
return key === 'needYjzrr';
|
|
105
|
+
});
|
|
106
|
+
if (_isEconomic) {
|
|
107
|
+
return _isEconomic[1] === 'false' || !_isEconomic[1] ? false : true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IElectronSignaturesProps, IElectronSignaturesItem, IAppointSignLocationOptions, IFileFieldsName, IQunjProps } from '../interface';
|
|
3
|
+
import type { SpinProps } from 'antd/es/spin';
|
|
4
|
+
interface IOptions {
|
|
5
|
+
/**
|
|
6
|
+
* 是否开启非受控模式
|
|
7
|
+
* 非受控模式开启后,数值的改变交由内部控制。外部只需要在合适的时机 获取数据即可
|
|
8
|
+
*/
|
|
9
|
+
isUnControlled?: IElectronSignaturesProps['isUnControlled'];
|
|
10
|
+
/**
|
|
11
|
+
* 触发外部onChange事件
|
|
12
|
+
*/
|
|
13
|
+
onValueChange?: IElectronSignaturesItem['onValueChange'];
|
|
14
|
+
/**
|
|
15
|
+
* 当前数据类型
|
|
16
|
+
*/
|
|
17
|
+
dataType?: IElectronSignaturesItem['dataType'];
|
|
18
|
+
/**
|
|
19
|
+
* 请求方法
|
|
20
|
+
*/
|
|
21
|
+
request?: IElectronSignaturesProps['request'];
|
|
22
|
+
setLoading?: React.Dispatch<React.SetStateAction<SpinProps | undefined>>;
|
|
23
|
+
/**
|
|
24
|
+
* 新附件
|
|
25
|
+
*/
|
|
26
|
+
records?: IElectronSignaturesItem['fileList'];
|
|
27
|
+
/**
|
|
28
|
+
* 部门id
|
|
29
|
+
*/
|
|
30
|
+
deptId?: IElectronSignaturesItem['deptId'];
|
|
31
|
+
/**
|
|
32
|
+
* 二级单元id
|
|
33
|
+
*/
|
|
34
|
+
secondDepId?: IElectronSignaturesItem['secondDepId'];
|
|
35
|
+
/**
|
|
36
|
+
* 合同id
|
|
37
|
+
*/
|
|
38
|
+
contractId?: IElectronSignaturesItem['contractId'];
|
|
39
|
+
/**
|
|
40
|
+
* 文档id列表
|
|
41
|
+
*/
|
|
42
|
+
documentIdList?: IElectronSignaturesItem['documentIdList'];
|
|
43
|
+
/**
|
|
44
|
+
* 后台用于维护当前合同id下附件id(key)与文档id(value)的关系map 后台解绑文档时使用
|
|
45
|
+
*/
|
|
46
|
+
docAttachMap?: IElectronSignaturesItem['docAttachMap'];
|
|
47
|
+
/**
|
|
48
|
+
* 当前选中的电子印章数据
|
|
49
|
+
*/
|
|
50
|
+
electronicSealIdList?: IElectronSignaturesItem['electronicSealIdList'];
|
|
51
|
+
/**
|
|
52
|
+
* 当前是否需要一级责任人
|
|
53
|
+
*/
|
|
54
|
+
isCheckedEconomic?: boolean;
|
|
55
|
+
setCurrentIsCheckedEconomic?: any;
|
|
56
|
+
/** 个人签署(手签章)已勾选的用户id列表 */
|
|
57
|
+
personalSignUserIds?: Array<number | string>;
|
|
58
|
+
setPersonalSignUserIds?: any;
|
|
59
|
+
/**
|
|
60
|
+
* 是否可以编辑 1 可以编辑 0 不可编辑
|
|
61
|
+
*/
|
|
62
|
+
canEdit?: IElectronSignaturesItem['canEdit'];
|
|
63
|
+
/**
|
|
64
|
+
* 流程状态
|
|
65
|
+
*/
|
|
66
|
+
flowStatus?: IElectronSignaturesItem['flowStatus'];
|
|
67
|
+
onElectronicSealIdChange?: any;
|
|
68
|
+
/**
|
|
69
|
+
* 当前选中的群杰印章数据(用于校验必须共同使用逻辑)
|
|
70
|
+
*/
|
|
71
|
+
qunjSeal?: IQunjProps;
|
|
72
|
+
/**
|
|
73
|
+
* 字段对应表(用于从附件数据中收集单附件群杰印章编号)
|
|
74
|
+
*/
|
|
75
|
+
fileFieldsNameRef?: {
|
|
76
|
+
current: IFileFieldsName;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 电子印章设置相关操作
|
|
81
|
+
*/
|
|
82
|
+
export default function useParseElectronSetting(options: IOptions): {
|
|
83
|
+
/** 点击签署位置 实时记录点击时的印章列表 */
|
|
84
|
+
clickElectronicSealIdList: string[];
|
|
85
|
+
/** 当前合同id数据 */
|
|
86
|
+
currentContractId: any;
|
|
87
|
+
setCurrentContractId: React.Dispatch<any>;
|
|
88
|
+
/** 当前合同id下 附件与文档的关联关系 */
|
|
89
|
+
currentDocAttachMap: any;
|
|
90
|
+
setCurrentDocAttachMap: React.Dispatch<any>;
|
|
91
|
+
/** 当前文档列表数据 */
|
|
92
|
+
currentDocumentIdList: any;
|
|
93
|
+
setCurrentDocumentIdList: React.Dispatch<any>;
|
|
94
|
+
/** 指定签署位置 */
|
|
95
|
+
appointSignLocation: (this: unknown, options?: IAppointSignLocationOptions) => Promise<void>;
|
|
96
|
+
/** 预览盖章效果 */
|
|
97
|
+
viewSignPage: (this: unknown) => void;
|
|
98
|
+
/** 暴露一个清空数据的方法 */
|
|
99
|
+
onClearElectronSetting: (this: unknown) => {
|
|
100
|
+
contractId: any;
|
|
101
|
+
docAttachMap: any;
|
|
102
|
+
documentIdList: any[];
|
|
103
|
+
};
|
|
104
|
+
/** 查询未确认盖章位置的印章信息列表 */
|
|
105
|
+
checkUnStampedSealList: (this: unknown) => any;
|
|
106
|
+
/** 未确认盖章信息的电子印章列表 */
|
|
107
|
+
unElectronicSealList: any;
|
|
108
|
+
/** 未确认盖章信息的电子印章id列表 */
|
|
109
|
+
unElectronicSealIdList: any;
|
|
110
|
+
};
|
|
111
|
+
export {};
|