cnhis-design-vue 3.3.1-beta.7 → 3.3.1-release.4
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/es/_virtual/_plugin-vue_export-helper.js +9 -1
- package/es/components/ai-chat/index.d.ts +394 -43
- package/es/components/ai-chat/index.js +10 -1
- package/es/components/ai-chat/src/Index.vue.d.ts +394 -43
- package/es/components/ai-chat/src/Index.vue.js +6 -1
- package/es/components/ai-chat/src/Index.vue2.js +175 -1
- package/es/components/ai-chat/src/api/index.d.ts +8 -0
- package/es/components/ai-chat/src/api/index.js +87 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +38 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +6 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +103 -0
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatBI.vue.js +6 -1
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +73 -1
- package/es/components/ai-chat/src/components/ChatCard.js +403 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +75 -31
- package/es/components/ai-chat/src/components/ChatFooter.vue.js +6 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +373 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -7
- package/es/components/ai-chat/src/components/ChatMain.js +350 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +2 -0
- package/es/components/ai-chat/src/components/ChatMainDefault.js +278 -0
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPatient.vue.js +6 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +218 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPrompt.vue.js +6 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +143 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +57 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.js +6 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +190 -0
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
- package/es/components/ai-chat/src/components/card/JsonCard.js +574 -0
- package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +16 -0
- package/es/components/ai-chat/src/components/message-render/CardRender.js +80 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +16 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.js +173 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +36 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +6 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +96 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +105 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +6 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +260 -0
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +18 -0
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +37 -0
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +20 -0
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +48 -0
- package/es/components/ai-chat/src/hooks/index.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/index.js +2 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +18 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +202 -0
- package/es/components/ai-chat/src/hooks/useData.d.ts +77 -0
- package/es/components/ai-chat/src/hooks/useData.js +289 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +38 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.js +218 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +14 -0
- package/es/components/ai-chat/src/hooks/useProgram.js +306 -0
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +9 -0
- package/es/components/ai-chat/src/hooks/useSSE.js +138 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +4 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.js +66 -0
- package/es/components/ai-chat/src/types/index.d.ts +1 -3
- package/es/components/ai-chat/src/types/index.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +6 -0
- package/es/components/ai-chat/src/utils/index.js +41 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/annotation-edit/index.js +10 -1
- package/es/components/annotation-edit/src/AnnotationEdit.js +223 -1
- package/es/components/audio-sdk/index.d.ts +291 -2
- package/es/components/audio-sdk/index.js +11 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +291 -0
- package/es/components/audio-sdk/src/Index.vue.js +6 -0
- package/es/components/audio-sdk/src/Index.vue2.js +133 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +64 -28
- package/es/components/audio-sdk/src/audioSDK.js +387 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +6 -4
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +107 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +6 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +40 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +51 -11
- package/es/components/audio-sdk/src/components/recording.vue.js +6 -1
- package/es/components/audio-sdk/src/components/recording.vue2.js +113 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +7 -0
- package/es/components/audio-sdk/src/utils/index.js +48 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +1 -3
- package/es/components/audio-sdk/src/utils/recordingModal.js +57 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/base-search/index.js +10 -1
- package/es/components/base-search/src/index.vue.js +6 -1
- package/es/components/base-search/src/index.vue2.js +325 -1
- package/es/components/big-table/index.js +15 -1
- package/es/components/big-table/src/BigTable.vue.js +6 -1
- package/es/components/big-table/src/BigTable.vue2.js +2525 -1
- package/es/components/big-table/src/bigTableEmits.js +3 -1
- package/es/components/big-table/src/bigTableProps.js +218 -1
- package/es/components/big-table/src/bigTableState.js +69 -1
- package/es/components/big-table/src/components/NoData.vue.js +6 -1
- package/es/components/big-table/src/components/NoData.vue2.js +74 -1
- package/es/components/big-table/src/components/edit-form/edit-date.js +215 -1
- package/es/components/big-table/src/components/edit-form/edit-input.js +96 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +143 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +6 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +110 -1
- package/es/components/big-table/src/components/edit-form/edit-time.js +122 -1
- package/es/components/big-table/src/components/edit-form/useCommon.js +23 -1
- package/es/components/big-table/src/components/input-button.vue.js +6 -1
- package/es/components/big-table/src/components/input-button.vue2.js +38 -1
- package/es/components/big-table/src/components/separate.vue.js +6 -1
- package/es/components/big-table/src/components/separate.vue2.js +37 -1
- package/es/components/big-table/src/constants/index.js +3 -1
- package/es/components/big-table/src/hooks/index.js +9 -1
- package/es/components/big-table/src/hooks/useAnchor.js +56 -1
- package/es/components/big-table/src/hooks/useAnnotation.js +21 -1
- package/es/components/big-table/src/hooks/useBatchEditing.js +302 -1
- package/es/components/big-table/src/hooks/useEdit.js +144 -1
- package/es/components/big-table/src/hooks/useEvent.js +116 -1
- package/es/components/big-table/src/hooks/useFormat.js +519 -1
- package/es/components/big-table/src/hooks/useNestTable.js +101 -1
- package/es/components/big-table/src/hooks/useSeparateRow.js +209 -1
- package/es/components/big-table/src/hooks/useTableParse.js +142 -1
- package/es/components/big-table/src/utils.js +653 -1
- package/es/components/body-select/index.js +10 -1
- package/es/components/body-select/src/config/index.js +103 -1
- package/es/components/body-select/src/hooks/renderCanvas.js +94 -1
- package/es/components/body-select/src/index.vue.js +6 -1
- package/es/components/body-select/src/index.vue2.js +137 -1
- package/es/components/bpmn-workflow/index.js +10 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +6 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +269 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1480 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +99 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +114 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +40 -1
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +14 -1
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +10 -1
- package/es/components/branch-notice/index.js +10 -1
- package/es/components/branch-notice/src/BranchNotice.vue.js +6 -1
- package/es/components/branch-notice/src/BranchNotice.vue2.js +128 -1
- package/es/components/branch-notice/src/canstants.js +10 -1
- package/es/components/branch-notice/src/components/NoticeItem.vue.js +6 -1
- package/es/components/branch-notice/src/components/NoticeItem.vue2.js +110 -1
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.js +6 -1
- package/es/components/branch-notice/src/components/NoticeItemAside.vue2.js +71 -1
- package/es/components/branch-notice/src/components/NoticeOperationList.vue.js +6 -1
- package/es/components/branch-notice/src/components/NoticeOperationList.vue2.js +57 -1
- package/es/components/branch-notice/src/drawLine.js +183 -1
- package/es/components/branch-notice/src/hooks/useTheme.js +31 -1
- package/es/components/button-print/index.d.ts +30 -0
- package/es/components/button-print/index.js +12 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue.js +6 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +164 -1
- package/es/components/button-print/src/api.js +43 -1
- package/es/components/button-print/src/components/EditFormat.vue.js +6 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +178 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.js +6 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +199 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.js +6 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1314 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue.js +6 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +714 -1
- package/es/components/button-print/src/components/Preview.vue.js +6 -1
- package/es/components/button-print/src/components/Preview.vue2.js +78 -1
- package/es/components/button-print/src/constants/index.js +3 -1
- package/es/components/button-print/src/utils/browserPrint.js +60 -1
- package/es/components/button-print/src/utils/dialog.js +102 -1
- package/es/components/button-print/src/utils/index.js +2 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +1146 -1
- package/es/components/calendar/index.d.ts +126 -3
- package/es/components/calendar/index.js +10 -1
- package/es/components/calendar/src/Calendar.vue.d.ts +126 -2
- package/es/components/calendar/src/Calendar.vue.js +6 -1
- package/es/components/calendar/src/Calendar.vue2.js +262 -1
- package/es/components/callback/index.js +10 -1
- package/es/components/callback/src/components/dialog/drawer.vue.js +6 -1
- package/es/components/callback/src/components/dialog/drawer.vue2.js +123 -1
- package/es/components/callback/src/components/dialog/modal.vue.js +6 -1
- package/es/components/callback/src/components/dialog/modal.vue2.js +134 -1
- package/es/components/callback/src/components/popup/index.vue.js +87 -1
- package/es/components/callback/src/components/render/drawerIframe/index.vue.js +6 -1
- package/es/components/callback/src/components/render/drawerIframe/index.vue2.js +170 -1
- package/es/components/callback/src/components/render/enums.js +7 -1
- package/es/components/callback/src/components/render/index.vue.js +152 -1
- package/es/components/callback/src/components/render/popupMaps.js +30 -1
- package/es/components/callback/src/index.vue.js +6 -1
- package/es/components/callback/src/index.vue2.js +33 -1
- package/es/components/card-reader-sdk/index.js +2 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +4 -8
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +169 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.js +6 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +63 -1
- package/es/components/card-reader-sdk/src/constants/index.js +162 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.js +116 -1
- package/es/components/card-reader-sdk/src/utils/ensureUID2IdCard.js +42 -1
- package/es/components/card-reader-sdk/src/utils/index.js +31 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +61 -1
- package/es/components/card-reader-sdk-cn/index.js +10 -1
- package/es/components/card-reader-sdk-cn/src/henan/index.js +200 -1
- package/es/components/card-render/index.js +10 -1
- package/es/components/card-render/src/CardRender.vue.js +6 -1
- package/es/components/card-render/src/CardRender.vue2.js +77 -1
- package/es/components/card-render/src/components/Box.vue.js +6 -1
- package/es/components/card-render/src/components/Box.vue2.js +91 -1
- package/es/components/card-render/src/components/Button.vue.d.ts +3 -0
- package/es/components/card-render/src/components/Button.vue.js +6 -1
- package/es/components/card-render/src/components/Button.vue2.js +103 -1
- package/es/components/card-render/src/components/Divider.vue.js +6 -1
- package/es/components/card-render/src/components/Divider.vue2.js +42 -1
- package/es/components/card-render/src/components/Field.vue.js +6 -1
- package/es/components/card-render/src/components/Field.vue2.js +186 -1
- package/es/components/card-render/src/components/FieldGroup.vue.js +6 -1
- package/es/components/card-render/src/components/FieldGroup.vue2.js +127 -1
- package/es/components/card-render/src/components/Image.vue.js +6 -1
- package/es/components/card-render/src/components/Image.vue2.js +78 -1
- package/es/components/card-render/src/components/Label.vue.js +6 -1
- package/es/components/card-render/src/components/Label.vue2.js +75 -1
- package/es/components/card-render/src/components/Row.vue.js +6 -1
- package/es/components/card-render/src/components/Row.vue2.js +130 -1
- package/es/components/card-render/src/components/ScaleView.vue.d.ts +39 -0
- package/es/components/card-render/src/components/ScaleView.vue.js +6 -0
- package/es/components/card-render/src/components/ScaleView.vue2.js +88 -0
- package/es/components/card-render/src/components/Slot.js +65 -1
- package/es/components/card-render/src/components/Table.vue.d.ts +104 -0
- package/es/components/card-render/src/components/Table.vue.js +6 -0
- package/es/components/card-render/src/components/Table.vue2.js +141 -0
- package/es/components/card-render/src/components/Text.vue.d.ts +1 -0
- package/es/components/card-render/src/components/Text.vue.js +6 -1
- package/es/components/card-render/src/components/Text.vue2.js +69 -1
- package/es/components/card-render/src/components/index.d.ts +139 -0
- package/es/components/card-render/src/components/index.js +34 -1
- package/es/components/card-render/src/constants/index.d.ts +4 -1
- package/es/components/card-render/src/constants/index.js +19 -1
- package/es/components/card-render/src/hooks/useCommon.js +43 -1
- package/es/components/card-render/src/utils/index.js +93 -1
- package/es/components/card-render/style/index.css +1 -1
- package/es/components/classification/index.js +10 -1
- package/es/components/classification/src/components/search-filter/index.vue.js +6 -1
- package/es/components/classification/src/components/search-filter/index.vue2.js +182 -1
- package/es/components/classification/src/components/set-classification/index.vue.js +6 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +214 -1
- package/es/components/classification/src/components/table-modal/index.vue.js +6 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +404 -1
- package/es/components/classification/src/const/index.js +3 -1
- package/es/components/classification/src/index.vue.js +6 -1
- package/es/components/classification/src/index.vue2.js +854 -1
- package/es/components/config-provider/index.js +10 -1
- package/es/components/config-provider/src/ConfigProvider.js +47 -1
- package/es/components/config-provider/src/utils/index.js +18 -1
- package/es/components/date-picker/index.js +10 -1
- package/es/components/date-picker/src/DatePicker.vue.js +6 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +275 -1
- package/es/components/default-page/index.js +10 -1
- package/es/components/default-page/src/constants/index.js +126 -1
- package/es/components/default-page/src/index.vue.js +6 -1
- package/es/components/default-page/src/index.vue2.js +97 -1
- package/es/components/drag-scroll/index.js +1 -1
- package/es/components/drag-scroll/src/index.js +156 -1
- package/es/components/editor/index.js +10 -1
- package/es/components/editor/src/Editor.js +80 -1
- package/es/components/editor/style/index.css +1 -0
- package/es/components/expand-field/index.js +10 -1
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.js +6 -1
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +142 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.js +6 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +169 -1
- package/es/components/expand-field/src/components/PersonModal.vue.js +6 -1
- package/es/components/expand-field/src/components/PersonModal.vue2.js +130 -1
- package/es/components/expand-field/src/components/form.vue.js +6 -1
- package/es/components/expand-field/src/components/form.vue2.js +1116 -1
- package/es/components/expand-field/src/constants/index.js +3 -1
- package/es/components/expand-field/src/hooks/useAsyncData.js +35 -1
- package/es/components/expand-field/src/index.vue.js +6 -1
- package/es/components/expand-field/src/index.vue2.js +263 -1
- package/es/components/expand-field/src/utils/constant.js +50 -1
- package/es/components/expand-field/src/utils/index.js +22 -1
- package/es/components/expand-field/src/utils/tool.js +29 -1
- package/es/components/fabric-chart/index.d.ts +6 -2
- package/es/components/fabric-chart/index.js +10 -1
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +6 -2
- package/es/components/fabric-chart/src/FabricChart.vue.js +6 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +174 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +112 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +6 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +69 -1
- package/es/components/fabric-chart/src/components/useStyle.js +43 -1
- package/es/components/fabric-chart/src/constants/index.js +89 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +918 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +210 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +261 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +221 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +241 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +554 -1
- package/es/components/fabric-chart/src/hooks/index.js +12 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +384 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +173 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +4 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +919 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +272 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1027 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +356 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +847 -1
- package/es/components/fabric-chart/src/hooks/temperature/index.js +6 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +93 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1101 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +352 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +201 -1
- package/es/components/fabric-chart/src/hooks/temperature/useRight.js +21 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +420 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +169 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +70 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +151 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +370 -1
- package/es/components/fabric-chart/src/hooks/useEvent.js +134 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +83 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +75 -1
- package/es/components/fabric-chart/src/hooks/useShadow.js +137 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +94 -1
- package/es/components/field-editor/index.js +10 -1
- package/es/components/field-editor/src/FieldEditor.vue.js +6 -1
- package/es/components/field-editor/src/FieldEditor.vue2.js +90 -1
- package/es/components/field-editor/src/fields.js +200 -1
- package/es/components/field-set/index.js +10 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldColor.vue.js +6 -1
- package/es/components/field-set/src/FieldColor.vue2.js +240 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.js +6 -1
- package/es/components/field-set/src/FieldFilter.vue2.js +302 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.js +6 -1
- package/es/components/field-set/src/FieldSet.vue2.js +573 -1
- package/es/components/field-set/src/Index.vue.js +6 -1
- package/es/components/field-set/src/Index.vue2.js +184 -1
- package/es/components/field-set/src/TableStyle.vue.js +6 -1
- package/es/components/field-set/src/TableStyle.vue2.js +149 -1
- package/es/components/field-set/src/components/condition.vue.js +6 -1
- package/es/components/field-set/src/components/condition.vue2.js +440 -1
- package/es/components/field-set/src/components/edit-dialog.vue.js +6 -1
- package/es/components/field-set/src/components/edit-dialog.vue2.js +315 -1
- package/es/components/field-set/src/components/edit-filter.vue.js +6 -1
- package/es/components/field-set/src/components/edit-filter.vue2.js +55 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.js +6 -1
- package/es/components/field-set/src/components/table-row.vue2.js +532 -1
- package/es/components/field-set/src/constants/filter.js +109 -1
- package/es/components/field-set/src/constants/index.js +225 -1
- package/es/components/field-set/src/utils/index.js +112 -1
- package/es/components/form-config/index.d.ts +35 -10
- package/es/components/form-config/index.js +11 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +35 -10
- package/es/components/form-config/src/FormConfig.vue.js +6 -1
- package/es/components/form-config/src/FormConfig.vue2.js +245 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +6 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +105 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +6 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +60 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +28 -8
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +6 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +199 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -2
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +6 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +625 -1
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +63 -1
- package/es/components/form-config/src/components/index.js +6 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +6 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +46 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +6 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +62 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +6 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +80 -1
- package/es/components/form-config/src/components/renderer/index.js +3 -1
- package/es/components/form-config/src/constants/index.js +198 -1
- package/es/components/form-config/src/hooks/index.js +3 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +123 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +53 -1
- package/es/components/form-config/src/hooks/useLocale.js +62 -1
- package/es/components/form-config/src/hooks/usePresetRenderer.js +36 -1
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +100 -1
- package/es/components/form-config/src/utils/index.js +52 -1
- package/es/components/form-render/index.js +39 -1
- package/es/components/form-render/src/FormRender.vue.js +6 -1
- package/es/components/form-render/src/FormRender.vue2.js +507 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.js +6 -1
- package/es/components/form-render/src/FormRenderWrapper.vue2.js +44 -1
- package/es/components/form-render/src/components/renderer/combination/combination.js +102 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/index.js +2 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +82 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useDeepValidate.js +34 -1
- package/es/components/form-render/src/components/renderer/combination/index.js +3 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +190 -1
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +160 -1
- package/es/components/form-render/src/components/renderer/complex.js +46 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/date.js +210 -1
- package/es/components/form-render/src/components/renderer/formItem.js +370 -1
- package/es/components/form-render/src/components/renderer/index.js +45 -1
- package/es/components/form-render/src/components/renderer/input.js +87 -1
- package/es/components/form-render/src/components/renderer/inputGroup.js +13 -1
- package/es/components/form-render/src/components/renderer/inputNumber.js +105 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +154 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +6 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +131 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.js +11 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +246 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.js +227 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +323 -1
- package/es/components/form-render/src/components/renderer/select.js +395 -1
- package/es/components/form-render/src/components/renderer/simpleComponent.js +54 -1
- package/es/components/form-render/src/components/renderer/slider.js +38 -1
- package/es/components/form-render/src/components/renderer/switch.js +113 -1
- package/es/components/form-render/src/components/renderer/text.js +112 -1
- package/es/components/form-render/src/components/renderer/textarea.js +65 -1
- package/es/components/form-render/src/components/renderer/time.js +27 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.js +6 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +44 -1
- package/es/components/form-render/src/constants/index.js +47 -1
- package/es/components/form-render/src/hooks/index.js +25 -1
- package/es/components/form-render/src/hooks/useAnchor.js +108 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +137 -1
- package/es/components/form-render/src/hooks/useChangeContext.js +22 -1
- package/es/components/form-render/src/hooks/useCommonInjection.js +58 -1
- package/es/components/form-render/src/hooks/useCommonLog.js +12 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +189 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +416 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +253 -1
- package/es/components/form-render/src/hooks/useFieldVisitor.js +60 -1
- package/es/components/form-render/src/hooks/useFormContext.js +83 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +281 -1
- package/es/components/form-render/src/hooks/useFormField.js +14 -1
- package/es/components/form-render/src/hooks/useFormGraph.js +18 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.js +54 -1
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +12 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +400 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +151 -1
- package/es/components/form-render/src/hooks/useLowCodeEvent.js +33 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +86 -1
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +87 -1
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +39 -1
- package/es/components/form-render/src/hooks/useOperationalForm.js +55 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +37 -1
- package/es/components/form-render/src/hooks/useSelectedSetting.js +27 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.js +54 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +8 -3
- package/es/components/form-render/src/utils/business.js +208 -1
- package/es/components/form-render/src/utils/dom.js +45 -1
- package/es/components/form-render/src/utils/index.js +363 -1
- package/es/components/form-render/src/utils/schema.js +133 -1
- package/es/components/form-render/src/utils/valueFormatter.js +30 -1
- package/es/components/grid/index.js +11 -1
- package/es/components/grid/src/Grid.js +28 -1
- package/es/components/grid/src/hooks.js +18 -1
- package/es/components/guide/index.js +1 -1
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/guide/src/renderer.js +155 -1
- package/es/components/guide/src/useGuide.js +210 -1
- package/es/components/guide/src/utils/index.js +285 -1
- package/es/components/iho-chat/index.d.ts +206 -4
- package/es/components/iho-chat/index.js +10 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +206 -4
- package/es/components/iho-chat/src/Index.vue.js +6 -1
- package/es/components/iho-chat/src/Index.vue2.js +159 -1
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +176 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +8 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +682 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +11 -3
- package/es/components/iho-chat/src/components/ChatFile.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +266 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +640 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +96 -2
- package/es/components/iho-chat/src/components/ChatHeader.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +231 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +77 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +635 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +71 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +441 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
- package/es/components/iho-chat/src/components/ChatSearch.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +431 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +10 -0
- package/es/components/iho-chat/src/components/ChatSet.vue.js +6 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +433 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +244 -1
- package/es/components/iho-chat/src/components/MessageEvent.vue.js +6 -1
- package/es/components/iho-chat/src/components/MessageEvent.vue2.js +146 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +70 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.js +6 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +154 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue.js +6 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +201 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue.js +6 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +421 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.js +6 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +228 -1
- package/es/components/iho-chat/src/components/SelectLabel.vue.js +6 -1
- package/es/components/iho-chat/src/components/SelectLabel.vue2.js +128 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/SiderList.vue.js +6 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +340 -1
- package/es/components/iho-chat/src/components/Video.vue.js +6 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +303 -1
- package/es/components/iho-chat/src/components/userItemRender.js +58 -1
- package/es/components/iho-chat/src/constants/index.d.ts +9 -2
- package/es/components/iho-chat/src/constants/index.js +51 -1
- package/es/components/iho-chat/src/hooks/index.js +3 -1
- package/es/components/iho-chat/src/hooks/useData.js +403 -1
- package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.js +82 -0
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +82 -1
- package/es/components/iho-chat/src/hooks/useVideo.js +110 -1
- package/es/components/iho-chat/src/hooks/useWebSocket.js +220 -1
- package/es/components/iho-chat/src/utils/asyncQueue.js +36 -1
- package/es/components/iho-chat/src/utils/chatSock.js +82 -1
- package/es/components/iho-chat/src/utils/emoji.js +14 -1
- package/es/components/iho-chat/src/utils/index.d.ts +6 -0
- package/es/components/iho-chat/src/utils/index.js +259 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/index.js +73 -1
- package/es/components/iho-table/src/IhoTable.vue.js +6 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +368 -1
- package/es/components/iho-table/src/constants/index.js +97 -1
- package/es/components/iho-table/src/hooks/export.js +2 -1
- package/es/components/iho-table/src/hooks/index.js +2 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +167 -1
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +45 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +31 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +29 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +118 -1
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +28 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +31 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +28 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +172 -1
- package/es/components/iho-table/src/hooks/useTableContext.js +25 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +32 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/index.js +19 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +54 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +96 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +38 -1
- package/es/components/iho-table/src/plugins/colorAndIconPlugin.js +48 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +117 -1
- package/es/components/iho-table/src/plugins/crossHeaderPlugin.js +143 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +79 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +49 -1
- package/es/components/iho-table/src/plugins/dragScrollPlugin.js +99 -1
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue.js +6 -1
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +324 -1
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/index.js +60 -1
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/treeFilter.vue.js +10 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +6 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +46 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +75 -1
- package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/index.js +49 -1
- package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/remoteFilter.vue.js +6 -1
- package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/remoteFilter.vue2.js +119 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +6 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +303 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +189 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue.js +6 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +91 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/index.js +78 -1
- package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.js +35 -1
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +111 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +115 -1
- package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.js +6 -1
- package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue2.js +40 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +56 -1
- package/es/components/iho-table/src/plugins/index.d.ts +79 -3
- package/es/components/iho-table/src/plugins/index.js +81 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +73 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +118 -1
- package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +36 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin.js +57 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/index.js +115 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/utils.js +56 -1
- package/es/components/iho-table/src/plugins/pluginHooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/pluginHooks/useFilter.js +38 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +6 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +207 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +94 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +35 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +20 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +107 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +89 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +6 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +117 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +102 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +70 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +338 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +268 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +21 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +6 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +125 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +321 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +52 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +92 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +6 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +233 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +88 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +107 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +49 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +60 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +48 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +56 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +92 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +69 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin.js +42 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin.js +187 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +38 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +58 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +300 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +446 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +80 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/constants.js +3 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +37 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useColumn2Data.js +33 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useCurrentColumn.js +52 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useData2Column.js +54 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEditCell.js +96 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js +46 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useExpose.js +18 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHeaderCSS.js +45 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHoverColumn.js +77 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowClassName.js +65 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +20 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useTriggerRow.js +35 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +165 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +290 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin.js +133 -1
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +41 -1
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/iho-table/src/types/pluginType.js +16 -1
- package/es/components/iho-table/src/utils/index.js +347 -1
- package/es/components/iho-table/src/utils/separateMap.js +17 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +226 -1
- package/es/components/info-header/index.js +10 -1
- package/es/components/info-header/src/InfoHeader.vue.js +6 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +190 -1
- package/es/components/info-header/src/components/index.js +2 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +6 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +190 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +6 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +69 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +6 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +85 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +6 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +43 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.js +6 -1
- package/es/components/info-header/src/components/infoDescription/index.vue2.js +155 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.js +6 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +248 -1
- package/es/components/info-header/src/constants/index.js +4 -1
- package/es/components/info-header/src/hooks/useThemeOverrides.js +52 -1
- package/es/components/keyboard/index.js +10 -1
- package/es/components/keyboard/src/Keyboard.vue.js +6 -1
- package/es/components/keyboard/src/Keyboard.vue2.js +203 -1
- package/es/components/keyboard/src/components/InputNumber.vue.js +6 -1
- package/es/components/keyboard/src/components/InputNumber.vue2.js +88 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.js +6 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +329 -1
- package/es/components/keyboard/src/constants/index.js +6 -1
- package/es/components/keyboard/src/utils/index.js +5 -1
- package/es/components/map/index.js +10 -1
- package/es/components/map/src/Map.vue.js +6 -1
- package/es/components/map/src/Map.vue2.js +360 -1
- package/es/components/picture-clipper/index.js +10 -1
- package/es/components/picture-clipper/src/PictureClipper.vue.js +6 -1
- package/es/components/picture-clipper/src/PictureClipper.vue2.js +232 -1
- package/es/components/quick-search/index.js +10 -1
- package/es/components/quick-search/src/index.vue.js +6 -1
- package/es/components/quick-search/src/index.vue2.js +526 -1
- package/es/components/recommend-search/index.js +10 -1
- package/es/components/recommend-search/src/RecommendSearch.vue.js +6 -1
- package/es/components/recommend-search/src/RecommendSearch.vue2.js +121 -1
- package/es/components/recommend-search/src/components/BaseSearch.js +173 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +6 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +162 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +6 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +90 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +6 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +174 -1
- package/es/components/recommend-search/src/constant/index.js +9 -1
- package/es/components/scale-view/index.d.ts +14 -1
- package/es/components/scale-view/index.js +34 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +14 -1
- package/es/components/scale-view/src/ScaleView.vue.js +6 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +297 -1
- package/es/components/scale-view/src/components/AnswerParse.vue.js +6 -1
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +82 -1
- package/es/components/scale-view/src/components/DescribeContent.vue.js +6 -1
- package/es/components/scale-view/src/components/DescribeContent.vue2.js +28 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +6 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +295 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +6 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +139 -1
- package/es/components/scale-view/src/components/LoadingCom.vue.js +17 -1
- package/es/components/scale-view/src/components/NoData.vue.js +6 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +74 -1
- package/es/components/scale-view/src/components/ScaleScore.js +63 -1
- package/es/components/scale-view/src/components/composables/choose-common.js +84 -1
- package/es/components/scale-view/src/components/formitem/address.js +3993 -1
- package/es/components/scale-view/src/components/formitem/r-address.js +226 -1
- package/es/components/scale-view/src/components/formitem/r-cascader.js +134 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +325 -1
- package/es/components/scale-view/src/components/formitem/r-collection.js +111 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +303 -1
- package/es/components/scale-view/src/components/formitem/r-input.js +108 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +108 -1
- package/es/components/scale-view/src/components/formitem/r-radio.js +291 -1
- package/es/components/scale-view/src/components/formitem/r-select.js +244 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +184 -1
- package/es/components/scale-view/src/components/formitem/r-upload.js +221 -1
- package/es/components/scale-view/src/components/formitem/sign-com.js +307 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.js +128 -1
- package/es/components/scale-view/src/directive/drag-move.js +135 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +483 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +548 -1
- package/es/components/scale-view/src/hooks/scaleview-methods.js +182 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +120 -1
- package/es/components/scale-view/src/hooks/scaleview-state.js +42 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +300 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +209 -1
- package/es/components/scale-view/src/hooks/use-component.js +86 -1
- package/es/components/scale-view/src/hooks/use-evaluate.js +143 -1
- package/es/components/scale-view/src/hooks/use-event.js +147 -1
- package/es/components/scale-view/src/hooks/use-noData.js +41 -1
- package/es/components/scale-view/src/utils/judge-types.js +67 -1
- package/es/components/search-cascader/index.js +10 -1
- package/es/components/search-cascader/src/SearchCascader.vue.js +6 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +309 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +32 -1
- package/es/components/search-cascader/src/components/SearchMenu.js +320 -1
- package/es/components/search-cascader/src/components/index.js +1 -1
- package/es/components/search-cascader/src/constants/index.js +6 -1
- package/es/components/search-cascader/src/utils/index.js +11 -1
- package/es/components/select-label/index.js +15 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +6 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +450 -1
- package/es/components/select-label/src/SelectLabel.vue.js +6 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +473 -1
- package/es/components/select-label/src/components/label-classify.vue.js +6 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +150 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.js +6 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +146 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.js +6 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +214 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.js +6 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +106 -1
- package/es/components/select-label/src/index.vue.js +6 -1
- package/es/components/select-label/src/index.vue2.js +104 -1
- package/es/components/select-person/index.js +10 -1
- package/es/components/select-person/src/SelectPerson.vue.js +6 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +857 -1
- package/es/components/select-person/src/SelectPersonType.vue.js +6 -1
- package/es/components/select-person/src/SelectPersonType.vue2.js +532 -1
- package/es/components/select-person/src/components/SearchMultiple.vue.js +6 -1
- package/es/components/select-person/src/components/SearchMultiple.vue2.js +196 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue.js +6 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +269 -1
- package/es/components/select-person/src/constants/index.js +3 -1
- package/es/components/select-person/src/index.vue.js +6 -1
- package/es/components/select-person/src/index.vue2.js +146 -1
- package/es/components/select-person/src/types/enums.js +15 -1
- package/es/components/select-person/src/utils/index.js +113 -1
- package/es/components/shortcut-provider/index.js +12 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +6 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +52 -1
- package/es/components/shortcut-provider/src/constants/index.js +8 -1
- package/es/components/shortcut-provider/src/hooks/index.js +2 -1
- package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +15 -1
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +213 -1
- package/es/components/shortcut-provider/src/utils/index.js +108 -1
- package/es/components/shortcut-setter/index.d.ts +7 -2
- package/es/components/shortcut-setter/index.js +10 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -2
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +6 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +127 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +6 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +105 -1
- package/es/components/slider-tree/index.js +11 -1
- package/es/components/slider-tree/src/hooks/useAsyncData.js +35 -1
- package/es/components/slider-tree/src/index.vue.js +6 -1
- package/es/components/slider-tree/src/index.vue2.js +253 -1
- package/es/components/slider-tree/src/utils/index.js +10 -1
- package/es/components/slider-tree/src/utils/tool.js +12 -1
- package/es/components/step-notice/index.js +10 -1
- package/es/components/step-notice/src/StepNotice.vue.js +6 -1
- package/es/components/step-notice/src/StepNotice.vue2.js +113 -1
- package/es/components/step-notice/src/components/NoticeConnection.vue.js +6 -1
- package/es/components/step-notice/src/components/NoticeConnection.vue2.js +94 -1
- package/es/components/step-notice/src/components/NoticeItem.vue.js +6 -1
- package/es/components/step-notice/src/components/NoticeItem.vue2.js +112 -1
- package/es/components/step-notice/src/components/NoticeItemAside.vue.js +6 -1
- package/es/components/step-notice/src/components/NoticeItemAside.vue2.js +71 -1
- package/es/components/step-notice/src/components/NoticeOperationList.vue.js +6 -1
- package/es/components/step-notice/src/components/NoticeOperationList.vue2.js +57 -1
- package/es/components/step-notice/src/hooks/useTheme.js +31 -1
- package/es/components/step-notice/src/utils.js +10 -1
- package/es/components/steps-wheel/index.d.ts +18 -0
- package/es/components/steps-wheel/index.js +10 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +18 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +6 -1
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +514 -1
- package/es/components/steps-wheel/src/constants/index.js +7 -1
- package/es/components/table-export-field/index.js +10 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.js +6 -1
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +374 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.js +6 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +249 -1
- package/es/components/table-export-field/src/constants/index.js +3 -1
- package/es/components/table-export-field/src/hooks/useAsyncData.js +35 -1
- package/es/components/table-export-field/src/index.vue.js +6 -1
- package/es/components/table-export-field/src/index.vue2.js +178 -1
- package/es/components/table-export-field/src/tool.js +12 -1
- package/es/components/table-filter/index.js +2 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +98 -1
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +63 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +43 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +38 -1
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +60 -1
- package/es/components/table-filter/src/components/bi-filter/components/index.js +8 -1
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +166 -1
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +155 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue.js +6 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +385 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +119 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +127 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +230 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +83 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +35 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +84 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +302 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +64 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +127 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectTreeDynamic.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectTreeDynamic.vue2.js +137 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.js +13 -1
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +12 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +82 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +88 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +6 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +368 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +60 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +157 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +119 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +76 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +210 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +125 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +70 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +86 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +195 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +121 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +78 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +327 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +213 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue2.js +52 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectTreeDynamic.vue.js +6 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectTreeDynamic.vue2.js +138 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +17 -1
- package/es/components/table-filter/src/components/render-widget/enums.js +47 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +160 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +519 -1
- package/es/components/table-filter/src/components/render-widget/helpers/enums.js +58 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +156 -1
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +9 -1
- package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.js +75 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +172 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +495 -1
- package/es/components/table-filter/src/constants/index.js +6 -1
- package/es/components/table-filter/src/directive/resize.js +13 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +230 -1
- package/es/components/table-filter/src/hooks/useAsyncData.js +31 -1
- package/es/components/table-filter/src/hooks/useMixins.js +41 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +132 -1
- package/es/components/table-filter/src/tool/baseOptions.js +60 -1
- package/es/components/table-filter/src/tool/resizeSensor.js +123 -1
- package/es/components/table-filter/src/tool/transformData.js +168 -1
- package/es/components/table-filter/src/types/enums.js +85 -1
- package/es/components/time-line/index.js +10 -1
- package/es/components/time-line/src/TimeLine.vue.js +6 -1
- package/es/components/time-line/src/TimeLine.vue2.js +64 -1
- package/es/components/time-picker/index.js +10 -1
- package/es/components/time-picker/src/TimePicker.vue.js +6 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +59 -1
- package/es/components/tooth-bitmap/index.js +10 -1
- package/es/components/tooth-bitmap/src/ToothBitmap.vue.js +6 -1
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +190 -1
- package/es/components/vod-chunk-upload/index.js +14 -1
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +6 -1
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +485 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +74 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +122 -1
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +98 -1
- package/es/components/vod-chunk-upload/src/hooks/vod-data.js +28 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +2 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +6 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +349 -1
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +100 -1
- package/es/shared/assets/img/ai__avatar.png.js +3 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +3 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +3 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +3 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +3 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +3 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +3 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +3 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +3 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +3 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +3 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +3 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +3 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +3 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +3 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +3 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +3 -1
- package/es/shared/assets/img/emoji/emoji.png.js +678 -1
- package/es/shared/assets/img/failure.png.js +3 -1
- package/es/shared/assets/img/file-emr.png.js +3 -0
- package/es/shared/assets/img/file.png.js +3 -0
- package/es/shared/assets/img/logo.png.js +3 -1
- package/es/shared/assets/img/no-permission.png.js +3 -1
- package/es/shared/assets/img/nodata.png.js +3 -1
- package/es/shared/assets/img/notfound.png.js +3 -1
- package/es/shared/assets/img/qr.png.js +3 -1
- package/es/shared/assets/img/success.png.js +3 -1
- package/es/shared/assets/img/table_style_1.png.js +3 -1
- package/es/shared/assets/img/table_style_2.png.js +3 -1
- package/es/shared/assets/img/table_style_3.png.js +3 -1
- package/es/shared/assets/img/table_style_4.png.js +3 -1
- package/es/shared/assets/img/tooth/tooth.png.js +38 -1
- package/es/shared/assets/img/use.png.js +3 -0
- package/es/shared/assets/img/video.png.js +3 -1
- package/es/shared/assets/img/video_default_cover.png.js +3 -1
- package/es/shared/assets/img/xb_big.png.js +3 -1
- package/es/shared/assets/img/xb_small.png.js +3 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +22 -1
- package/es/shared/components/ArrowIcon/index.js +2 -1
- package/es/shared/components/CancelRadio/CancelRadio.js +41 -1
- package/es/shared/components/CancelRadio/index.js +2 -1
- package/es/shared/components/DateIcon/DateIcon.vue.js +29 -1
- package/es/shared/components/DateIcon/index.js +2 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +161 -1
- package/es/shared/components/InputNumberSlash/index.js +2 -1
- package/es/shared/components/JSONTree/JSONTree.vue.js +6 -1
- package/es/shared/components/JSONTree/JSONTree.vue2.js +44 -1
- package/es/shared/components/JSONTree/index.js +2 -1
- package/es/shared/components/SelectPage/SelectPage.vue.js +6 -1
- package/es/shared/components/SelectPage/SelectPage.vue2.js +59 -1
- package/es/shared/components/SelectPage/index.js +2 -1
- package/es/shared/components/SlotRender/SlotRender.js +35 -1
- package/es/shared/components/SlotRender/index.js +2 -1
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +6 -1
- package/es/shared/components/SvgIcon/SvgIcon.vue2.js +34 -1
- package/es/shared/components/SvgIcon/index.js +2 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +6 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +76 -1
- package/es/shared/components/TextOverTooltip/index.js +2 -1
- package/es/shared/components/VueDraggable/index.js +2 -1
- package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +35 -1
- package/es/shared/components/VueDraggable/src/core/componentStructure.js +54 -1
- package/es/shared/components/VueDraggable/src/core/renderHelper.js +47 -1
- package/es/shared/components/VueDraggable/src/core/sortableEvents.js +14 -1
- package/es/shared/components/VueDraggable/src/util/console.js +9 -1
- package/es/shared/components/VueDraggable/src/util/htmlHelper.js +11 -1
- package/es/shared/components/VueDraggable/src/util/string.js +11 -1
- package/es/shared/components/VueDraggable/src/util/tags.js +130 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.js +265 -1
- package/es/shared/components/no-data/NoData.vue.js +6 -1
- package/es/shared/components/no-data/NoData.vue2.js +99 -1
- package/es/shared/components/no-data/index.js +2 -1
- package/es/shared/components/player-vod/player.js +121 -1
- package/es/shared/components/player-vod/video-modal.js +91 -1
- package/es/shared/directive/flexibleResize.js +167 -1
- package/es/shared/directive/index.js +1 -1
- package/es/shared/global/variable.js +3 -1
- package/es/shared/hooks/index.js +12 -1
- package/es/shared/hooks/selectHooks/index.js +5 -1
- package/es/shared/hooks/selectHooks/useMenuWidthAuto.js +30 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +33 -1
- package/es/shared/hooks/selectHooks/useSearchContent.js +50 -1
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +84 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.js +106 -1
- package/es/shared/hooks/useAsyncQueue/index.js +127 -1
- package/es/shared/hooks/useDateTime.js +231 -1
- package/es/shared/hooks/useFormRequest/index.js +164 -1
- package/es/shared/hooks/useLevelSearchCascader.d.ts +1 -0
- package/es/shared/hooks/useLevelSearchCascader.js +309 -1
- package/es/shared/hooks/useScrollLoading.js +22 -1
- package/es/shared/hooks/useTheme.js +29 -1
- package/es/shared/hooks/useVersion.js +9 -1
- package/es/shared/package.json.js +26 -1
- package/es/shared/utils/anime.js +136 -1
- package/es/shared/utils/business.js +233 -1
- package/es/shared/utils/fabricjs/index.js +15624 -1
- package/es/shared/utils/index.js +320 -1
- package/es/shared/utils/loadViewer.js +11 -1
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +63 -1
- package/es/shared/utils/tapable/AsyncParallelHook.js +27 -1
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +18 -1
- package/es/shared/utils/tapable/AsyncSeriesHook.js +27 -1
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +12 -1
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +22 -1
- package/es/shared/utils/tapable/Hook.js +140 -1
- package/es/shared/utils/tapable/HookCodeFactory.js +456 -1
- package/es/shared/utils/tapable/SyncBailHook.js +19 -1
- package/es/shared/utils/tapable/SyncHook.js +34 -1
- package/es/shared/utils/tapable/SyncLoopHook.js +13 -1
- package/es/shared/utils/tapable/SyncWaterfallHook.js +47 -1
- package/es/shared/utils/utilExpand.js +770 -1
- package/es/shared/utils/vexutils.js +60 -1
- package/es/shared/utils/vexutilsExpand.js +774 -1
- package/package.json +78 -76
- package/es/components/audio-sdk/src/components/form.vue.js +0 -1
- package/es/components/audio-sdk/src/components/form.vue2.js +0 -1
@@ -1 +1,1146 @@
|
|
1
|
-
import t from"axios";import{cloneDeep as e,isArray as i}from"lodash-es";import{IdentityVerificationDialog as r,PreviewDialog as s}from"./dialog.js";import{isIReport as n,getFileUrl as a,useBrowserPrint as o}from"./browserPrint.js";import{getCurrentInstance as l}from"vue";import{uuidGenerator as c}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";import{io as u}from"socket.io-client";const h=String(navigator.platform).toLowerCase().includes("linux"),p=t.create({timeout:6e4,withCredentials:!1}),m=`${window.location.protocol}//${window.location.host}`,g=`${m}/fdp-api/print/assembly/printIReport`,w=`${m}/bi-api/reprot/print/open/client/printIReportForBase64`,y=`${m}/bi-api/reprot/print/open/client/printIReportForHex`,f=`${m}/bi-api/reprot/print/open/client/previewIReport`,v=`${m}/bi-api/reprot/print/open/client/getRemote`,P=`${m}/printService/file`;let _=null;class I{constructor(){var t,e,i,n;if(this.webview=null,this.dialog=new r,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.printDomesticOrigin="http://127.0.0.1:17521",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.isConnectHiPrint=!1,this.clientInfo=null,this.printerList=[],this.hiPrintSocket=null,this.base64Fragment="",this._successCallbackFn=null,this._errorCallbackFn=null,this._cancelCallbackFn=null,this.messageHandlerQueue=[],this.getIReportFormatId=(t,e)=>t?e.split("_")[1]:e,_)return _;_=this;const a=window;this.CMonitor=a.$CMonitor;try{this.webview=a.top?null==(t=a.top.chrome)?void 0:t.webview:null==(e=a.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(i=a.chrome)?void 0:i.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log(((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.494"))||"非封装浏览器或者")+e)}}}messageHandler(t){var e,i;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.493"))||"接收到空的浏览器事件");let r;try{r=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf","resetprint"].includes(null==r?void 0:r.cmd)){console.log("打印命令执行了",r);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:i,reject:s}=e;try{if("resetprint"===(null==r?void 0:r.cmd))return void i({result:(null==r?void 0:r.res)?"success":"fail",message:(null==r?void 0:r.error)||""});i(r.res||"")}catch(t){s(t)}}else"config"===(null==r?void 0:r.exec)&&(this.downloadPath=(null==(i=r.res)?void 0:i.downloadpath)||"")}_initDomesticSystem(t){try{if(this.hiPrintSocket)return this.isConnectHiPrint;this.hiPrintSocket=u(this.printDomesticOrigin,{reconnection:!1,transports:["websocket"],auth:{token:"no-use-vue-plugin-hiprint"}}),this.hiPrintSocket&&(this.hiPrintSocket.on("connect",(()=>{this.isConnectHiPrint=!0})),this.hiPrintSocket.on("disconnect",(()=>{this.isConnectHiPrint=!1,this.hiPrintSocket=null})),this.hiPrintSocket.on("clientInfo",(t=>{console.log("获取到客户端信息>>>>>",t),t.clientUrl&&(this.clientInfo=t)})),this.hiPrintSocket.on("printerList",(e=>{console.log("获取到打印机列表信息>>>>>",e),this.printerList=e,t&&t(!0)})),this.hiPrintSocket.on("success",(t=>{console.log("打印成功>>>>>",t),this.base64Fragment="",this._successCallbackFn&&this._successCallbackFn(t)})),this.hiPrintSocket.on("replayPrinterTemplate",(t=>{console.log("获取到数据的回复>>>>>",t),t&&this.hiPrintSocket.emit("news",t)})),this.hiPrintSocket.on("error",(t=>{console.log("打印失败>>>>>",t),this.base64Fragment="","cancel"==(null==t?void 0:t.result)?this._cancelCallbackFn&&this._cancelCallbackFn(t):this._errorCallbackFn&&this._errorCallbackFn(t)})))}catch(e){console.log("ihoPrint系统连接失败",e),t&&t(!1)}}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:6,zip:0},this.queryServicesParams.paramsArr=[{params:JSON.stringify(t)}];await this._queryBase64ServicesPrint(this.queryServicesParams)}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=c();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,r)=>{this.messageHandlerQueue.push({resolve:i,reject:r,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,r)=>{this.messageHandlerQueue.push({resolve:i,reject:r,id:t}),this.webview.postMessage(e)})),new Promise(((e,r)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),r({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testDomesticSystemConnection(){return new Promise((t=>{p({url:`${this.printDomesticOrigin}/test`,method:"get",withCredentials:!1,params:{}}).then((({data:e})=>{e.status?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{p({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}async resetPrinter(t,e){var i;const r=n(t),s=this.getIReportFormatId(r,t);if(r&&(h||2==e)){return await this._testDomesticSystemConnection()?p({url:`${this.printDomesticOrigin}/resetPrint`,method:"get",withCredentials:!1,params:{formatId:s}}).then((({data:t})=>t.status?{type:"resetSuccess",result:"success",message:null==t?void 0:t.message}:{type:"resetError",result:"error",message:null==t?void 0:t.message})).catch((t=>({type:"resetError",result:"error",message:"重置打印机错误"}))):{type:"notInstalledApp",result:"error",message:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.496"))||"请开启ihoPrint客户端"}}return this.webview?this.postMessage({exec:"resetprint",data:{formatID:s}}):p({url:`${this.printOrigin}/services/printset`,method:"get",withCredentials:!1,params:{inputdata:s}}).then((({data:t})=>t))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_queryBase64ServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):p({url:this.printOrigin+"/services/Printqueue",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:r(i)}):p({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[r]}).then((({data:t})=>t));function r(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e,i){var r;if(!t){const t=(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.497"))||"打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:"error",errinfo:t}),!1}if("success"!==t.result){const r=t.message||t.Message;this._handleMonitorNotify(r);const s={type:"printError",message:r,result:t.result,errinfo:t.errinfo};return"cancel"==t.result?(i&&i({type:"printCancel",message:r,result:t.result,errinfo:t.errinfo}),!1):(null==e||e(s),!1)}return t}_handleResultTest(t,e){var i;return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.498"))||"请打开打印服务器插件",result:"error"}),!1)}async _handleEventQueryPrintData(t,e,i,r,s){const n={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:r},a=await this._queryServicesPrint(n);return this._handleQueryPrintDataResult(a,e,s)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({result:"error",type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,svrUpdateIp:i,params:r,paramsArr:s,cmdid:n,print:a,signature:o,copies:l,printdlgshow:c="0",nobillnode:u="1",btnprint:h="1",messageTimeout:p=0}){const m={templateId:t,formatId:e,svrUpdateIp:i,params:r,cmdid:n,nobillnode:u,printdlgshow:c,btnprint:h,copies:l,messageTimeout:p,...o?{signature:o}:{}};if(s&&(m.paramsArr=s),a){try{a=JSON.parse(a)}catch(t){}m.print=a}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");m.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=m,await this._queryServicesPrint(m)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:r,messageTimeout:s=0}){const n={};let a={};try{a=Object.assign({},n,JSON.parse(i))}catch(t){a=n}const o={templateId:t,formatId:e,cmdid:"9",token:r,params:JSON.stringify(a),messageTimeout:s};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await p({method:"get",url:v})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=m+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await p({method:"post",url:g,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}paramsSerializer(t){return Object.keys(t).forEach((e=>{const i=t[e];t[e]=i,"biParams"==e&&(t[e]=encodeURIComponent(i))})),t}async _queryPrintForBase64(t,e,i="",r){const s="object"==typeof i?i:JSON.parse(i),{data:n}=await p({method:"post",url:w,params:{id:t,formatId:e,params:this.paramsSerializer(s),authorizationKey:r}})||{};return n}async _queryPrintForBase16(t,e,i="",r){const s="object"==typeof i?i:JSON.parse(i),{data:n}=await p({method:"post",url:y,params:{id:t,formatId:e,params:this.paramsSerializer(s),authorizationKey:r}})||{};return n}async _queryPrintForPdf(t,e,i="",r){const s="object"==typeof i?i:JSON.parse(i),{data:n}=await p({method:"post",url:f,responseType:"blob",params:{id:t,formatId:e,params:this.paramsSerializer(s),authorizationKey:r}})||{};return n}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,r=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),s=r[r.length-2],n=r[r.length-1],l=await a(`${P}/${s}/${n}`),c=o(null,e,l);if("preview"===e)return c}}_base64ToBlob(t,e){const i=window.atob(t);let r=i.length;const s=new Uint8Array(r);for(;r--;)s[r]=i.charCodeAt(r);return new Blob([s],{type:e})}async preview({iReportExecuteMode:t,templateId:e,formatId:i,params:r="",paramsArr:s,authorizationKey:a,signature:c,btnprint:d,messageTimeout:u=0},p,m){var g;const w=n(i),y=this.getIReportFormatId(w,i);if(w&&(h||2==t)){const t=await this._queryPrintForPdf(e,y,r,a);if(!t)return null==m?void 0:m({type:"queryPrintDataFailure",result:"error",message:"获取文件失败!"});const i=o(t,"preview");return this.instance||(this.instance=l()),this.showPreview(this.instance,i),null==p?void 0:p({result:"success",message:"",file:t})}await this._queryProxyOrigin();const f=await this._testConnection();if(!this._handleResultTest(f,m))return!1;try{const t=await this._handleEventDirect({templateId:e,formatId:y,params:r,paramsArr:s,cmdid:this.isRemote?"7":"8",signature:c,btnprint:d,messageTimeout:u}),i=this._handleResult(t,m);if(!i)return!1;if(this.isRemote){const t=await this._browserPrint(i,"preview");this.instance||(this.instance=l()),this.showPreview(this.instance,t)}await this.getPicAndUpload(i),null==p||p(i)}catch(t){const e=(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.499"))||"预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e,result:"error"}:{message:e,result:"error"};null==m||m(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){var r,s;const n=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=c(),s=await this.messageCollect(t,{exec:"printA",data:n});if(s&&Array.isArray(s)){s.some((t=>"success"===t.res.result))?null==e||e(s):(null==i||i(s),this._handleMonitorNotify(s))}else{const t=(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.500"))||"打印命令返回无效数据";this._handleMonitorNotify(s||""),null==i||i({type:"printError",message:t,result:"error",errinfo:t})}}catch(t){const e={error:t,result:"error",message:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.501"))||"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({iReportExecuteMode:t,templateId:e,formatId:i,params:r="",paramsArr:s,authorizationKey:a,print:o,signature:l,printdlgshow:c,nobillnode:d,copies:u,svrUpdateIp:p,isDownloadFile:m=!0,messageTimeout:g=0},w,y,f,v="printDirect"){var P,_,I;const b=n(i),S=this.getIReportFormatId(b,i);if(b&&(h||2==t)){if(!await this._testDomesticSystemConnection())return void y({type:"notInstalledApp",result:"error",message:(null==(P=window.getLanguageByCode)?void 0:P.call(window,"10010.1.496"))||"请开启ihoPrint客户端"});return void(this._initDomesticSystem((async t=>{var i;t?await this.printToHiPrint({templateId:e,formatId:S,params:r,authorizationKey:a},w,y,f):y({type:"notInstalledApp",result:"error",message:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.502"))||"连接ihoPrint客户端失败"})}))&&await this.printToHiPrint({templateId:e,formatId:S,params:r,authorizationKey:a},w,y,f))}await this._queryProxyOrigin();const C=await this._testConnection();if(!this._handleResultTest(C,y))return!1;try{const t=await this._handleEventDirect({templateId:e,formatId:S,params:r,paramsArr:s,cmdid:"7",print:o,signature:l,printdlgshow:c,nobillnode:d,copies:u,svrUpdateIp:p,messageTimeout:g}),i=this._handleResult(t,y,f);if(!i)return!1;m&&["downloadPDF"].includes(v)&&await this._browserPrint(i,v),null==w||w(i)}catch(t){const e="printDirect"===v?(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.501"))||"打印失败":(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.503"))||"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e,result:"error"}:{message:e,result:"error"};null==y||y(i),this._handleMonitorNotify(i)}}async printToHiPrint({templateId:t,formatId:e,params:i,authorizationKey:r},s,n,a){const o=await this._queryPrintForBase64(t,e,i,r);if(!o.success)return n({message:o.resultMsg,result:"error"});const{base64:l,formatId:c}=o.map;this.base64Fragment=l,this._successCallbackFn=s,this._errorCallbackFn=n,a&&(this._cancelCallbackFn=a),this.hiPrintSocket.emit("news",{printerList:this.printerList,type:"askPrinterTemplate",markTemplateId:c,pdf_stream:this.base64Fragment})}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):p.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}async downloadPDF(t,r,s){var a;const o=e(t);if(this.webview&&this.downloadPath&&(Reflect.has(o,"print")||Reflect.set(o,"print",{print:"1",type:"1"}),!o.print.filename)){const t=d(new Date,"yyyy-MM-dd"),e=c(),i=d(new Date,"yyyyMMddHHmmss")+e;o.print.filename=`${this.downloadPath}/${t}/${i}/${i}`.replace(/\\/g,"/")}const l=n(o.formatId);if(o.formatId=this.getIReportFormatId(l,o.formatId),l&&(h||2==o.iReportExecuteMode)){const t=await this._queryPrintForBase16(o.templateId||"",o.formatId,o.params||"",o.authorizationKey);return(null==t?void 0:t.success)?r({filebase64:null==(a=null==t?void 0:t.map)?void 0:a.hex,isIreport:!0}):null==s?void 0:s({type:"queryPrintDataFailure",result:"error",message:"获取文件失败!"})}this.printDirect(o,(async t=>{t||s({result:"error",message:""});const e=this,n=await async function(t){const r=[],s=JSON.parse(t);if(!i(s))return await e._downloadPDF("");if(1===s.length)return await e._downloadPDF(s[0]||"");for(let t=0,i=s.length;t<i;t++)r.push(await e._downloadPDF(s[t]||""));return r}(t.filedir);r(n,t)}),(t=>s(t)),(t=>{console.log(t)}),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:r=0},s,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:r},void 0,n);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,n);if(!l)return!1;s&&s(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:r=0},s,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this._handleEventQueryPrintData(t,e,i,r,n);return!!o&&(s&&s(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},r,s){const n=await this._testConnection();if(!this._handleResultTest(n,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(r&&r(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:r,messageTimeout:s=0},n,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:r,messageTimeout:s}),c=this._handleResult(l,a);if(!c)return!1;n&&n(c)}async addPrintFormat({templateId:t,params:e,token:i},r,s){const n=await this._testConnection();if(!this._handleResultTest(n,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;r&&r(o)}}export{I as Print};
|
1
|
+
import axios from 'axios';
|
2
|
+
import { cloneDeep, isArray } from 'lodash-es';
|
3
|
+
import { IdentityVerificationDialog, PreviewDialog } from './dialog.js';
|
4
|
+
import { isIReport, getFileUrl, useBrowserPrint } from './browserPrint.js';
|
5
|
+
import { getCurrentInstance } from 'vue';
|
6
|
+
import { uuidGenerator } from '../../../../shared/utils/index.js';
|
7
|
+
import { format } from 'date-fns';
|
8
|
+
import { io } from 'socket.io-client';
|
9
|
+
|
10
|
+
const PRINT_ORIGIN = "http://127.0.0.1:11111";
|
11
|
+
const EDIT_LOCAL_URL = "/services/print";
|
12
|
+
const EDIT_LOCAL_BASE64_URL = "/services/Printqueue";
|
13
|
+
const PRINT_URL = "/PrintLocal";
|
14
|
+
const PDF_URL = "/download";
|
15
|
+
const PRINT_CMD_ID = "7";
|
16
|
+
const PREVIEW_CMD_ID = "8";
|
17
|
+
const PRINTER_NAME_DEFAULT = "Default";
|
18
|
+
const isDomestic = String(navigator.platform).toLowerCase().includes("linux");
|
19
|
+
const httpFn = axios.create({
|
20
|
+
timeout: 1e3 * 60,
|
21
|
+
withCredentials: false
|
22
|
+
});
|
23
|
+
const PROTOCOL = window.location.protocol;
|
24
|
+
const HOST = window.location.host;
|
25
|
+
const REMOTEPRINTORIGIN = `${PROTOCOL}//${HOST}`;
|
26
|
+
const PRINTIREPORT = `${REMOTEPRINTORIGIN}/fdp-api/print/assembly/printIReport`;
|
27
|
+
const PRINTIREPORTFORBASE64 = `${REMOTEPRINTORIGIN}/bi-api/reprot/print/open/client/printIReportForBase64`;
|
28
|
+
const PRINTIREPORTFORBASE16 = `${REMOTEPRINTORIGIN}/bi-api/reprot/print/open/client/printIReportForHex`;
|
29
|
+
const PREVIEWIREPOR = `${REMOTEPRINTORIGIN}/bi-api/reprot/print/open/client/previewIReport`;
|
30
|
+
const ERRORMSG = "\u83B7\u53D6\u6587\u4EF6\u5931\u8D25\uFF01";
|
31
|
+
const QUERYPRINTORIGIN = `${REMOTEPRINTORIGIN}/bi-api/reprot/print/open/client/getRemote`;
|
32
|
+
const FILEURL = `${REMOTEPRINTORIGIN}/printService/file`;
|
33
|
+
let printInstance = null;
|
34
|
+
class Print {
|
35
|
+
constructor() {
|
36
|
+
this.webview = null;
|
37
|
+
this.dialog = new IdentityVerificationDialog();
|
38
|
+
this.dialogPreview = new PreviewDialog();
|
39
|
+
this.instance = null;
|
40
|
+
this.downloadPath = "";
|
41
|
+
this.printOrigin = PRINT_ORIGIN;
|
42
|
+
this.printDomesticOrigin = "http://127.0.0.1:17521";
|
43
|
+
this.isRemote = false;
|
44
|
+
this.CMonitor = null;
|
45
|
+
this.queryServicesParams = null;
|
46
|
+
this.isConnectHiPrint = false;
|
47
|
+
this.clientInfo = null;
|
48
|
+
this.printerList = [];
|
49
|
+
this.hiPrintSocket = null;
|
50
|
+
this.base64Fragment = "";
|
51
|
+
this._successCallbackFn = null;
|
52
|
+
this._errorCallbackFn = null;
|
53
|
+
this._cancelCallbackFn = null;
|
54
|
+
this.messageHandlerQueue = [];
|
55
|
+
this.getIReportFormatId = (isIReport2, formatId) => {
|
56
|
+
return isIReport2 ? formatId.split("_")[1] : formatId;
|
57
|
+
};
|
58
|
+
var _a, _b, _c, _d;
|
59
|
+
if (printInstance)
|
60
|
+
return printInstance;
|
61
|
+
printInstance = this;
|
62
|
+
const _window = window;
|
63
|
+
this.CMonitor = _window.$CMonitor;
|
64
|
+
try {
|
65
|
+
this.webview = _window.top ? (_a = _window.top.chrome) == null ? void 0 : _a.webview : (_b = _window.chrome) == null ? void 0 : _b.webview;
|
66
|
+
} catch (error) {
|
67
|
+
console.log(error);
|
68
|
+
this.webview = (_c = _window.chrome) == null ? void 0 : _c.webview;
|
69
|
+
}
|
70
|
+
if (!this.webview)
|
71
|
+
return;
|
72
|
+
this.currentMessageHandler = this.messageHandler.bind(this);
|
73
|
+
this.webview.addEventListener("message", this.currentMessageHandler);
|
74
|
+
try {
|
75
|
+
this.webview.postMessage({
|
76
|
+
exec: "config",
|
77
|
+
data: ""
|
78
|
+
});
|
79
|
+
} catch (e) {
|
80
|
+
const errorMsg = "\u5F53\u524D\u6D4F\u89C8\u5668\u7248\u672C\u4E0D\u652F\u6301\u83B7\u53D6\u914D\u7F6E\u63A5\u53E3";
|
81
|
+
this._handleMonitorNotify(errorMsg);
|
82
|
+
console.log((((_d = window.getLanguageByCode) == null ? void 0 : _d.call(window, "10010.1.494")) || "\u975E\u5C01\u88C5\u6D4F\u89C8\u5668\u6216\u8005") + errorMsg);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
messageHandler(e) {
|
86
|
+
var _a, _b;
|
87
|
+
console.log("\u6253\u5370\u4E8B\u4EF6message", e);
|
88
|
+
if (!e) {
|
89
|
+
this._handleMonitorNotify("\u63A5\u6536\u5230\u7A7A\u7684\u6D4F\u89C8\u5668\u4E8B\u4EF6\uFF0C" + e);
|
90
|
+
return console.log("\u5F53\u524D\u56DE\u6267", e, ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.493")) || "\u63A5\u6536\u5230\u7A7A\u7684\u6D4F\u89C8\u5668\u4E8B\u4EF6");
|
91
|
+
}
|
92
|
+
let data;
|
93
|
+
try {
|
94
|
+
data = JSON.parse(e.data || "{}");
|
95
|
+
} catch (_e) {
|
96
|
+
console.log("\u89E3\u6790e.data\u5931\u8D25\uFF0C" + _e);
|
97
|
+
this._handleMonitorNotify("\u89E3\u6790e.data\u5931\u8D25\uFF0C" + e);
|
98
|
+
}
|
99
|
+
if (["print", "pdf", "resetprint"].includes(data == null ? void 0 : data.cmd)) {
|
100
|
+
console.log("\u6253\u5370\u547D\u4EE4\u6267\u884C\u4E86", data);
|
101
|
+
const handler = this.messageHandlerQueue.shift();
|
102
|
+
if (!handler)
|
103
|
+
return console.log("\u5F53\u524D\u56DE\u6267", e, "\u6CA1\u6709\u53EF\u7528\u7684handler");
|
104
|
+
const {
|
105
|
+
resolve,
|
106
|
+
reject
|
107
|
+
} = handler;
|
108
|
+
try {
|
109
|
+
if ((data == null ? void 0 : data.cmd) === "resetprint") {
|
110
|
+
resolve({
|
111
|
+
result: (data == null ? void 0 : data.res) ? "success" : "fail",
|
112
|
+
message: (data == null ? void 0 : data.error) || ""
|
113
|
+
});
|
114
|
+
return;
|
115
|
+
}
|
116
|
+
resolve(data.res || "");
|
117
|
+
} catch (e2) {
|
118
|
+
reject(e2);
|
119
|
+
}
|
120
|
+
} else if ((data == null ? void 0 : data.exec) === "config") {
|
121
|
+
this.downloadPath = ((_b = data.res) == null ? void 0 : _b.downloadpath) || "";
|
122
|
+
}
|
123
|
+
}
|
124
|
+
_initDomesticSystem(cb) {
|
125
|
+
try {
|
126
|
+
if (this.hiPrintSocket) {
|
127
|
+
return this.isConnectHiPrint;
|
128
|
+
}
|
129
|
+
this.hiPrintSocket = io(this.printDomesticOrigin, {
|
130
|
+
reconnection: false,
|
131
|
+
transports: ["websocket"],
|
132
|
+
auth: {
|
133
|
+
token: "no-use-vue-plugin-hiprint"
|
134
|
+
}
|
135
|
+
});
|
136
|
+
if (this.hiPrintSocket) {
|
137
|
+
this.hiPrintSocket.on("connect", () => {
|
138
|
+
this.isConnectHiPrint = true;
|
139
|
+
});
|
140
|
+
this.hiPrintSocket.on("disconnect", () => {
|
141
|
+
this.isConnectHiPrint = false;
|
142
|
+
this.hiPrintSocket = null;
|
143
|
+
});
|
144
|
+
this.hiPrintSocket.on("clientInfo", (hiClientInfo) => {
|
145
|
+
console.log("\u83B7\u53D6\u5230\u5BA2\u6237\u7AEF\u4FE1\u606F>>>>>", hiClientInfo);
|
146
|
+
if (hiClientInfo.clientUrl) {
|
147
|
+
this.clientInfo = hiClientInfo;
|
148
|
+
}
|
149
|
+
});
|
150
|
+
this.hiPrintSocket.on("printerList", (printerListInfo) => {
|
151
|
+
console.log("\u83B7\u53D6\u5230\u6253\u5370\u673A\u5217\u8868\u4FE1\u606F>>>>>", printerListInfo);
|
152
|
+
this.printerList = printerListInfo;
|
153
|
+
cb && cb(true);
|
154
|
+
});
|
155
|
+
this.hiPrintSocket.on("success", (res) => {
|
156
|
+
console.log("\u6253\u5370\u6210\u529F>>>>>", res);
|
157
|
+
this.base64Fragment = "";
|
158
|
+
this._successCallbackFn && this._successCallbackFn(res);
|
159
|
+
});
|
160
|
+
this.hiPrintSocket.on("replayPrinterTemplate", (response) => {
|
161
|
+
console.log("\u83B7\u53D6\u5230\u6570\u636E\u7684\u56DE\u590D>>>>>", response);
|
162
|
+
response && this.hiPrintSocket.emit("news", response);
|
163
|
+
});
|
164
|
+
this.hiPrintSocket.on("error", (err) => {
|
165
|
+
console.log("\u6253\u5370\u5931\u8D25>>>>>", err);
|
166
|
+
this.base64Fragment = "";
|
167
|
+
if ((err == null ? void 0 : err.result) == "cancel") {
|
168
|
+
this._cancelCallbackFn && this._cancelCallbackFn(err);
|
169
|
+
} else {
|
170
|
+
this._errorCallbackFn && this._errorCallbackFn(err);
|
171
|
+
}
|
172
|
+
});
|
173
|
+
}
|
174
|
+
} catch (error) {
|
175
|
+
console.log("ihoPrint\u7CFB\u7EDF\u8FDE\u63A5\u5931\u8D25", error);
|
176
|
+
cb && cb(false);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
async getPicAndUpload(obj) {
|
180
|
+
try {
|
181
|
+
const isObject = (o) => Object.prototype.toString.call(o) === "[object Object]";
|
182
|
+
if ((obj == null ? void 0 : obj.result) === "success" && (obj == null ? void 0 : obj.uploadTemplateFlag) == "Y" && !(obj == null ? void 0 : obj.filebase64) && this.queryServicesParams) {
|
183
|
+
const params = isObject(this.queryServicesParams.params) ? this.queryServicesParams.params : JSON.parse(this.queryServicesParams.params);
|
184
|
+
params.uploadTemplateFlag = "Y";
|
185
|
+
this.queryServicesParams.params = JSON.stringify(params);
|
186
|
+
this.queryServicesParams.cmdid = PRINT_CMD_ID;
|
187
|
+
this.queryServicesParams.print = {
|
188
|
+
print: 1,
|
189
|
+
type: 6,
|
190
|
+
zip: 0
|
191
|
+
};
|
192
|
+
this.queryServicesParams.paramsArr = [{
|
193
|
+
params: JSON.stringify(params)
|
194
|
+
}];
|
195
|
+
const data = await this._queryBase64ServicesPrint(this.queryServicesParams);
|
196
|
+
}
|
197
|
+
} catch (error) {
|
198
|
+
console.log(error);
|
199
|
+
} finally {
|
200
|
+
this.queryServicesParams = null;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
async postMessage(data, messageTimeout = 0) {
|
204
|
+
if (!this.webview)
|
205
|
+
return Promise.reject();
|
206
|
+
const id = uuidGenerator();
|
207
|
+
if (messageTimeout && messageTimeout > 0)
|
208
|
+
return this.messageCollectAndNotifyFail(id, data, messageTimeout);
|
209
|
+
return this.messageCollect(id, data);
|
210
|
+
}
|
211
|
+
messageCollect(id, data) {
|
212
|
+
return new Promise((resolve, reject) => {
|
213
|
+
this.messageHandlerQueue.push({
|
214
|
+
resolve,
|
215
|
+
reject,
|
216
|
+
id
|
217
|
+
});
|
218
|
+
this.webview.postMessage(data);
|
219
|
+
});
|
220
|
+
}
|
221
|
+
messageCollectAndNotifyFail(id, data, messageTimeout) {
|
222
|
+
return Promise.race([new Promise((resolve, reject) => {
|
223
|
+
this.messageHandlerQueue.push({
|
224
|
+
resolve,
|
225
|
+
reject,
|
226
|
+
id
|
227
|
+
});
|
228
|
+
this.webview.postMessage(data);
|
229
|
+
}), new Promise((resolve, reject) => {
|
230
|
+
setTimeout(() => {
|
231
|
+
const idx = this.messageHandlerQueue.findIndex((handler) => handler.id === id);
|
232
|
+
if (idx > -1) {
|
233
|
+
this.messageHandlerQueue.splice(idx, 1);
|
234
|
+
}
|
235
|
+
reject({
|
236
|
+
type: "timeout"
|
237
|
+
});
|
238
|
+
}, messageTimeout);
|
239
|
+
})]);
|
240
|
+
}
|
241
|
+
destroy() {
|
242
|
+
}
|
243
|
+
show(...args) {
|
244
|
+
return this.dialog.show(...args);
|
245
|
+
}
|
246
|
+
showPreview(...args) {
|
247
|
+
return this.dialogPreview.show(...args);
|
248
|
+
}
|
249
|
+
_testDomesticSystemConnection() {
|
250
|
+
return new Promise((resolve) => {
|
251
|
+
httpFn({
|
252
|
+
url: `${this.printDomesticOrigin}/test`,
|
253
|
+
method: "get",
|
254
|
+
withCredentials: false,
|
255
|
+
params: {}
|
256
|
+
}).then(({
|
257
|
+
data
|
258
|
+
}) => {
|
259
|
+
if (!data.status) {
|
260
|
+
resolve(false);
|
261
|
+
return;
|
262
|
+
}
|
263
|
+
resolve(true);
|
264
|
+
}).catch((err) => {
|
265
|
+
resolve(false);
|
266
|
+
});
|
267
|
+
});
|
268
|
+
}
|
269
|
+
_testConnection() {
|
270
|
+
if (this.webview)
|
271
|
+
return Promise.resolve(true);
|
272
|
+
return new Promise((resolve) => {
|
273
|
+
httpFn({
|
274
|
+
url: `${this.printOrigin}/test`,
|
275
|
+
method: "get",
|
276
|
+
withCredentials: false,
|
277
|
+
params: {
|
278
|
+
inputdata: {
|
279
|
+
result: "success"
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}).then(({
|
283
|
+
data
|
284
|
+
}) => {
|
285
|
+
if (data.result !== "success") {
|
286
|
+
resolve(false);
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
resolve(true);
|
290
|
+
}).catch((err) => {
|
291
|
+
resolve(false);
|
292
|
+
});
|
293
|
+
});
|
294
|
+
}
|
295
|
+
async resetPrinter(originFormatId, iReportExecuteMode) {
|
296
|
+
var _a;
|
297
|
+
const iReportStatus = isIReport(originFormatId);
|
298
|
+
const formatId = this.getIReportFormatId(iReportStatus, originFormatId);
|
299
|
+
if (iReportStatus && (isDomestic || iReportExecuteMode == 2)) {
|
300
|
+
const testResult = await this._testDomesticSystemConnection();
|
301
|
+
if (!testResult) {
|
302
|
+
return {
|
303
|
+
type: "notInstalledApp",
|
304
|
+
result: "error",
|
305
|
+
message: ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.496")) || "\u8BF7\u5F00\u542FihoPrint\u5BA2\u6237\u7AEF"
|
306
|
+
};
|
307
|
+
}
|
308
|
+
return httpFn({
|
309
|
+
url: `${this.printDomesticOrigin}/resetPrint`,
|
310
|
+
method: "get",
|
311
|
+
withCredentials: false,
|
312
|
+
params: {
|
313
|
+
formatId
|
314
|
+
}
|
315
|
+
}).then(({
|
316
|
+
data
|
317
|
+
}) => {
|
318
|
+
if (!data.status) {
|
319
|
+
return {
|
320
|
+
type: "resetError",
|
321
|
+
result: "error",
|
322
|
+
message: data == null ? void 0 : data.message
|
323
|
+
};
|
324
|
+
}
|
325
|
+
return {
|
326
|
+
type: "resetSuccess",
|
327
|
+
result: "success",
|
328
|
+
message: data == null ? void 0 : data.message
|
329
|
+
};
|
330
|
+
}).catch((err) => {
|
331
|
+
return {
|
332
|
+
type: "resetError",
|
333
|
+
result: "error",
|
334
|
+
message: "\u91CD\u7F6E\u6253\u5370\u673A\u9519\u8BEF"
|
335
|
+
};
|
336
|
+
});
|
337
|
+
}
|
338
|
+
if (this.webview) {
|
339
|
+
return this.postMessage({
|
340
|
+
exec: "resetprint",
|
341
|
+
data: {
|
342
|
+
formatID: formatId
|
343
|
+
}
|
344
|
+
});
|
345
|
+
}
|
346
|
+
return httpFn({
|
347
|
+
url: `${this.printOrigin}/services/printset`,
|
348
|
+
method: "get",
|
349
|
+
withCredentials: false,
|
350
|
+
params: {
|
351
|
+
inputdata: formatId
|
352
|
+
}
|
353
|
+
}).then(({
|
354
|
+
data
|
355
|
+
}) => {
|
356
|
+
return data;
|
357
|
+
});
|
358
|
+
}
|
359
|
+
_queryServicesPrint(params) {
|
360
|
+
if (this.webview) {
|
361
|
+
return this.postMessage({
|
362
|
+
exec: "print",
|
363
|
+
data: {
|
364
|
+
inputData: params
|
365
|
+
}
|
366
|
+
}, params == null ? void 0 : params.messageTimeout);
|
367
|
+
}
|
368
|
+
return axios({
|
369
|
+
url: this.printOrigin + EDIT_LOCAL_URL,
|
370
|
+
method: "get",
|
371
|
+
params: {
|
372
|
+
inputData: JSON.stringify(params)
|
373
|
+
}
|
374
|
+
}).then(({
|
375
|
+
data
|
376
|
+
}) => {
|
377
|
+
return data;
|
378
|
+
});
|
379
|
+
}
|
380
|
+
_queryBase64ServicesPrint(params) {
|
381
|
+
if (this.webview) {
|
382
|
+
return this.postMessage({
|
383
|
+
exec: "print",
|
384
|
+
data: {
|
385
|
+
inputData: params
|
386
|
+
}
|
387
|
+
});
|
388
|
+
}
|
389
|
+
return httpFn({
|
390
|
+
url: this.printOrigin + EDIT_LOCAL_BASE64_URL,
|
391
|
+
method: "get",
|
392
|
+
params: {
|
393
|
+
inputData: JSON.stringify(params)
|
394
|
+
}
|
395
|
+
}).then(({
|
396
|
+
data
|
397
|
+
}) => {
|
398
|
+
return data;
|
399
|
+
});
|
400
|
+
}
|
401
|
+
_callPrintWithFile(queryParams) {
|
402
|
+
const defaultQueryParams = {
|
403
|
+
cmdid: PRINT_CMD_ID,
|
404
|
+
flag: "1"
|
405
|
+
};
|
406
|
+
const params = {
|
407
|
+
inputData: JSON.stringify(Object.assign({}, defaultQueryParams, queryParams))
|
408
|
+
};
|
409
|
+
if (this.webview) {
|
410
|
+
return this.postMessage({
|
411
|
+
exec: "print",
|
412
|
+
data: transformData(params)
|
413
|
+
});
|
414
|
+
}
|
415
|
+
return httpFn({
|
416
|
+
url: this.printOrigin + PRINT_URL,
|
417
|
+
method: "post",
|
418
|
+
data: params,
|
419
|
+
transformRequest: [transformData]
|
420
|
+
}).then(({
|
421
|
+
data
|
422
|
+
}) => {
|
423
|
+
return data;
|
424
|
+
});
|
425
|
+
function transformData(oldData) {
|
426
|
+
let newStr = "";
|
427
|
+
for (const item in oldData) {
|
428
|
+
newStr += encodeURIComponent(item) + "=" + encodeURIComponent(oldData[item]) + "&";
|
429
|
+
}
|
430
|
+
newStr = newStr.slice(0, -1);
|
431
|
+
return newStr;
|
432
|
+
}
|
433
|
+
}
|
434
|
+
_handleMonitorNotify(message) {
|
435
|
+
var _a, _b;
|
436
|
+
(_b = (_a = this.CMonitor) == null ? void 0 : _a.notify) == null ? void 0 : _b.call(_a, {
|
437
|
+
name: "custom_info",
|
438
|
+
message,
|
439
|
+
businessName: "\u6253\u5370sdk"
|
440
|
+
});
|
441
|
+
}
|
442
|
+
_handleResult(data, errorCallbackFn, cancelCallbackFn) {
|
443
|
+
var _a;
|
444
|
+
if (!data) {
|
445
|
+
const message = ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.497")) || "\u6253\u5370\u547D\u4EE4\u8FD4\u56DE\u7A7A\u6570\u636E";
|
446
|
+
this._handleMonitorNotify("");
|
447
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn({
|
448
|
+
type: "printError",
|
449
|
+
message,
|
450
|
+
result: "error",
|
451
|
+
errinfo: message
|
452
|
+
});
|
453
|
+
return false;
|
454
|
+
}
|
455
|
+
if (data.result !== "success") {
|
456
|
+
const message = data.message || data.Message;
|
457
|
+
this._handleMonitorNotify(message);
|
458
|
+
const errorMsgObj = {
|
459
|
+
type: "printError",
|
460
|
+
message,
|
461
|
+
result: data.result,
|
462
|
+
errinfo: data.errinfo
|
463
|
+
};
|
464
|
+
if (data.result == "cancel") {
|
465
|
+
cancelCallbackFn && cancelCallbackFn({
|
466
|
+
type: "printCancel",
|
467
|
+
message,
|
468
|
+
result: data.result,
|
469
|
+
errinfo: data.errinfo
|
470
|
+
});
|
471
|
+
return false;
|
472
|
+
}
|
473
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn(errorMsgObj);
|
474
|
+
return false;
|
475
|
+
}
|
476
|
+
return data;
|
477
|
+
}
|
478
|
+
_handleResultTest(result, errorCallbackFn) {
|
479
|
+
var _a;
|
480
|
+
if (!result) {
|
481
|
+
console.log("notInstalledApp");
|
482
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn({
|
483
|
+
type: "notInstalledApp",
|
484
|
+
message: ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.498")) || "\u8BF7\u6253\u5F00\u6253\u5370\u670D\u52A1\u5668\u63D2\u4EF6",
|
485
|
+
result: "error"
|
486
|
+
});
|
487
|
+
return false;
|
488
|
+
}
|
489
|
+
return true;
|
490
|
+
}
|
491
|
+
async _handleEventQueryPrintData(templateId, formatId, params, messageTimeout, errorCallbackFn) {
|
492
|
+
const queryParams = {
|
493
|
+
templateId,
|
494
|
+
formatId,
|
495
|
+
params,
|
496
|
+
cmdid: PRINT_CMD_ID,
|
497
|
+
messageTimeout
|
498
|
+
};
|
499
|
+
const printData = await this._queryServicesPrint(queryParams);
|
500
|
+
return this._handleQueryPrintDataResult(printData, formatId, errorCallbackFn);
|
501
|
+
}
|
502
|
+
_handleQueryPrintDataResult(printData, formatId, errorCallbackFn) {
|
503
|
+
if (!(printData == null ? void 0 : printData.file)) {
|
504
|
+
try {
|
505
|
+
const message = printData.message || printData.Message;
|
506
|
+
console.log(message);
|
507
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn({
|
508
|
+
result: "error",
|
509
|
+
type: "queryPrintDataFailure",
|
510
|
+
message
|
511
|
+
});
|
512
|
+
} catch (err) {
|
513
|
+
console.log(err);
|
514
|
+
}
|
515
|
+
return false;
|
516
|
+
}
|
517
|
+
return {
|
518
|
+
file: printData.file,
|
519
|
+
printerName: printData.defprinter,
|
520
|
+
pageCount: printData.pagecount,
|
521
|
+
formatId
|
522
|
+
};
|
523
|
+
}
|
524
|
+
async _handleEventDirect({
|
525
|
+
templateId,
|
526
|
+
formatId,
|
527
|
+
svrUpdateIp,
|
528
|
+
hideButtons,
|
529
|
+
params,
|
530
|
+
paramsArr,
|
531
|
+
cmdid,
|
532
|
+
print,
|
533
|
+
signature,
|
534
|
+
copies,
|
535
|
+
printdlgshow = "0",
|
536
|
+
nobillnode = "1",
|
537
|
+
btnprint = "1",
|
538
|
+
messageTimeout = 0
|
539
|
+
}) {
|
540
|
+
const queryParams = {
|
541
|
+
templateId,
|
542
|
+
formatId,
|
543
|
+
svrUpdateIp,
|
544
|
+
hideButtons,
|
545
|
+
params,
|
546
|
+
cmdid,
|
547
|
+
nobillnode,
|
548
|
+
printdlgshow,
|
549
|
+
btnprint,
|
550
|
+
copies,
|
551
|
+
messageTimeout,
|
552
|
+
...signature ? {
|
553
|
+
signature
|
554
|
+
} : {}
|
555
|
+
};
|
556
|
+
if (paramsArr)
|
557
|
+
queryParams.paramsArr = paramsArr;
|
558
|
+
if (print) {
|
559
|
+
try {
|
560
|
+
print = JSON.parse(print);
|
561
|
+
} catch (error) {
|
562
|
+
}
|
563
|
+
queryParams.print = print;
|
564
|
+
} else if (this.isRemote) {
|
565
|
+
const currentTime = format(new Date(), "yyyyMMddHHmmss");
|
566
|
+
queryParams.print = {
|
567
|
+
print: "1",
|
568
|
+
type: "1",
|
569
|
+
zip: "0",
|
570
|
+
filename: `F:\\WorkSpace\\crmweb\\web\\${currentTime}\\${currentTime}`
|
571
|
+
};
|
572
|
+
}
|
573
|
+
this.queryServicesParams = queryParams;
|
574
|
+
return await this._queryServicesPrint(queryParams);
|
575
|
+
}
|
576
|
+
async _handleEventEditFormat({
|
577
|
+
templateId,
|
578
|
+
formatId = "",
|
579
|
+
params = "",
|
580
|
+
token,
|
581
|
+
messageTimeout = 0
|
582
|
+
}) {
|
583
|
+
const DEFAULT_PARAMS = {};
|
584
|
+
let formatParams = {};
|
585
|
+
try {
|
586
|
+
formatParams = Object.assign({}, DEFAULT_PARAMS, JSON.parse(params));
|
587
|
+
} catch (error) {
|
588
|
+
formatParams = DEFAULT_PARAMS;
|
589
|
+
}
|
590
|
+
const queryParams = {
|
591
|
+
templateId,
|
592
|
+
formatId,
|
593
|
+
cmdid: "9",
|
594
|
+
token,
|
595
|
+
params: JSON.stringify(formatParams),
|
596
|
+
messageTimeout
|
597
|
+
};
|
598
|
+
return await this._queryServicesPrint(queryParams);
|
599
|
+
}
|
600
|
+
async _queryProxyOrigin() {
|
601
|
+
if (this.isRemote)
|
602
|
+
return;
|
603
|
+
const {
|
604
|
+
data
|
605
|
+
} = await httpFn({
|
606
|
+
method: "get",
|
607
|
+
url: QUERYPRINTORIGIN
|
608
|
+
}) || {};
|
609
|
+
const {
|
610
|
+
map = {}
|
611
|
+
} = data;
|
612
|
+
if (map.isRemote) {
|
613
|
+
this.printOrigin = REMOTEPRINTORIGIN + "/printService";
|
614
|
+
this.isRemote = true;
|
615
|
+
}
|
616
|
+
}
|
617
|
+
async _queryPrintFile(formatId, params = "") {
|
618
|
+
const {
|
619
|
+
data
|
620
|
+
} = await httpFn({
|
621
|
+
method: "post",
|
622
|
+
url: PRINTIREPORT,
|
623
|
+
responseType: "blob",
|
624
|
+
params: {
|
625
|
+
formatId: formatId.split("_")[1],
|
626
|
+
params
|
627
|
+
}
|
628
|
+
}) || {};
|
629
|
+
return data;
|
630
|
+
}
|
631
|
+
paramsSerializer(params) {
|
632
|
+
Object.keys(params).forEach((key) => {
|
633
|
+
const value = params[key];
|
634
|
+
params[key] = value;
|
635
|
+
if (key == "biParams")
|
636
|
+
params[key] = encodeURIComponent(value);
|
637
|
+
});
|
638
|
+
return params;
|
639
|
+
}
|
640
|
+
async _queryPrintForBase64(templateId, formatId, params = "", authorizationKey) {
|
641
|
+
const attr = typeof params === "object" ? params : JSON.parse(params);
|
642
|
+
const {
|
643
|
+
data
|
644
|
+
} = await httpFn({
|
645
|
+
method: "post",
|
646
|
+
url: PRINTIREPORTFORBASE64,
|
647
|
+
params: {
|
648
|
+
id: templateId,
|
649
|
+
formatId,
|
650
|
+
params: this.paramsSerializer(attr),
|
651
|
+
authorizationKey
|
652
|
+
}
|
653
|
+
}) || {};
|
654
|
+
return data;
|
655
|
+
}
|
656
|
+
async _queryPrintForBase16(templateId, formatId, params = "", authorizationKey) {
|
657
|
+
const attr = typeof params === "object" ? params : JSON.parse(params);
|
658
|
+
const {
|
659
|
+
data
|
660
|
+
} = await httpFn({
|
661
|
+
method: "post",
|
662
|
+
url: PRINTIREPORTFORBASE16,
|
663
|
+
params: {
|
664
|
+
id: templateId,
|
665
|
+
formatId,
|
666
|
+
params: this.paramsSerializer(attr),
|
667
|
+
authorizationKey
|
668
|
+
}
|
669
|
+
}) || {};
|
670
|
+
return data;
|
671
|
+
}
|
672
|
+
async _queryPrintForPdf(templateId, formatId, params = "", authorizationKey) {
|
673
|
+
const attr = typeof params === "object" ? params : JSON.parse(params);
|
674
|
+
const {
|
675
|
+
data
|
676
|
+
} = await httpFn({
|
677
|
+
method: "post",
|
678
|
+
url: PREVIEWIREPOR,
|
679
|
+
responseType: "blob",
|
680
|
+
params: {
|
681
|
+
id: templateId,
|
682
|
+
formatId,
|
683
|
+
params: this.paramsSerializer(attr),
|
684
|
+
authorizationKey
|
685
|
+
}
|
686
|
+
}) || {};
|
687
|
+
return data;
|
688
|
+
}
|
689
|
+
async _browserPrint(result, mode) {
|
690
|
+
if (this.isRemote) {
|
691
|
+
const {
|
692
|
+
filedir
|
693
|
+
} = result;
|
694
|
+
const fileNameArr = JSON.parse(filedir)[0].replace(/\\/g, "/").split("/");
|
695
|
+
const filedirName = fileNameArr[fileNameArr.length - 2];
|
696
|
+
const fileName = fileNameArr[fileNameArr.length - 1];
|
697
|
+
const fileUrl = await getFileUrl(`${FILEURL}/${filedirName}/${fileName}`);
|
698
|
+
const src = useBrowserPrint(null, mode, fileUrl);
|
699
|
+
if (mode === "preview")
|
700
|
+
return src;
|
701
|
+
}
|
702
|
+
}
|
703
|
+
_base64ToBlob(fileBase64, fileType) {
|
704
|
+
const raw = window.atob(fileBase64);
|
705
|
+
let rawLength = raw.length;
|
706
|
+
const uint8Array = new Uint8Array(rawLength);
|
707
|
+
while (rawLength--) {
|
708
|
+
uint8Array[rawLength] = raw.charCodeAt(rawLength);
|
709
|
+
}
|
710
|
+
return new Blob([uint8Array], {
|
711
|
+
type: fileType
|
712
|
+
});
|
713
|
+
}
|
714
|
+
async preview({
|
715
|
+
iReportExecuteMode,
|
716
|
+
hideButtons,
|
717
|
+
templateId,
|
718
|
+
formatId: originFormatId,
|
719
|
+
params = "",
|
720
|
+
paramsArr,
|
721
|
+
authorizationKey,
|
722
|
+
signature,
|
723
|
+
btnprint,
|
724
|
+
messageTimeout = 0
|
725
|
+
}, successCallbackFn, errorCallbackFn) {
|
726
|
+
var _a;
|
727
|
+
const iReportStatus = isIReport(originFormatId);
|
728
|
+
const formatId = this.getIReportFormatId(iReportStatus, originFormatId);
|
729
|
+
if (iReportStatus && (isDomestic || iReportExecuteMode == 2)) {
|
730
|
+
const data = await this._queryPrintForPdf(templateId, formatId, params, authorizationKey);
|
731
|
+
if (!data)
|
732
|
+
return errorCallbackFn == null ? void 0 : errorCallbackFn({
|
733
|
+
type: "queryPrintDataFailure",
|
734
|
+
result: "error",
|
735
|
+
message: ERRORMSG
|
736
|
+
});
|
737
|
+
const src = useBrowserPrint(data, "preview");
|
738
|
+
if (!this.instance)
|
739
|
+
this.instance = getCurrentInstance();
|
740
|
+
this.showPreview(this.instance, src);
|
741
|
+
return successCallbackFn == null ? void 0 : successCallbackFn({
|
742
|
+
result: "success",
|
743
|
+
message: "",
|
744
|
+
file: data
|
745
|
+
});
|
746
|
+
}
|
747
|
+
await this._queryProxyOrigin();
|
748
|
+
const testResult = await this._testConnection();
|
749
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
750
|
+
return false;
|
751
|
+
try {
|
752
|
+
const result = await this._handleEventDirect({
|
753
|
+
templateId,
|
754
|
+
formatId,
|
755
|
+
params,
|
756
|
+
paramsArr,
|
757
|
+
cmdid: this.isRemote ? PRINT_CMD_ID : PREVIEW_CMD_ID,
|
758
|
+
signature,
|
759
|
+
btnprint,
|
760
|
+
hideButtons,
|
761
|
+
messageTimeout
|
762
|
+
});
|
763
|
+
const handledResult = this._handleResult(result, errorCallbackFn);
|
764
|
+
if (!handledResult)
|
765
|
+
return false;
|
766
|
+
if (this.isRemote) {
|
767
|
+
const src = await this._browserPrint(handledResult, "preview");
|
768
|
+
if (!this.instance)
|
769
|
+
this.instance = getCurrentInstance();
|
770
|
+
this.showPreview(this.instance, src);
|
771
|
+
}
|
772
|
+
await this.getPicAndUpload(handledResult);
|
773
|
+
successCallbackFn == null ? void 0 : successCallbackFn(handledResult);
|
774
|
+
} catch (e) {
|
775
|
+
const message = ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.499")) || "\u9884\u89C8\u5931\u8D25";
|
776
|
+
const error = (e == null ? void 0 : e.type) === "timeout" ? {
|
777
|
+
...e,
|
778
|
+
message,
|
779
|
+
result: "error"
|
780
|
+
} : {
|
781
|
+
message,
|
782
|
+
result: "error"
|
783
|
+
};
|
784
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn(error);
|
785
|
+
this._handleMonitorNotify(error);
|
786
|
+
}
|
787
|
+
}
|
788
|
+
async printSync(data, successCallbackFn, errorCallbackFn) {
|
789
|
+
var _a, _b;
|
790
|
+
const _data = data.map((item) => {
|
791
|
+
const inputData = {
|
792
|
+
params: "",
|
793
|
+
printdlgshow: "0",
|
794
|
+
nobillnode: "1",
|
795
|
+
btnprint: "1",
|
796
|
+
...item,
|
797
|
+
cmdid: PRINT_CMD_ID,
|
798
|
+
...item.signature ? {
|
799
|
+
signature: item.signature
|
800
|
+
} : {}
|
801
|
+
};
|
802
|
+
if (inputData.print) {
|
803
|
+
try {
|
804
|
+
inputData.print = JSON.parse(inputData.print);
|
805
|
+
} catch (error) {
|
806
|
+
}
|
807
|
+
}
|
808
|
+
return {
|
809
|
+
inputData
|
810
|
+
};
|
811
|
+
});
|
812
|
+
try {
|
813
|
+
const id = uuidGenerator();
|
814
|
+
const result = await this.messageCollect(id, {
|
815
|
+
exec: "printA",
|
816
|
+
data: _data
|
817
|
+
});
|
818
|
+
if (!result || !Array.isArray(result)) {
|
819
|
+
const message = ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.500")) || "\u6253\u5370\u547D\u4EE4\u8FD4\u56DE\u65E0\u6548\u6570\u636E";
|
820
|
+
this._handleMonitorNotify(result || "");
|
821
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn({
|
822
|
+
type: "printError",
|
823
|
+
message,
|
824
|
+
result: "error",
|
825
|
+
errinfo: message
|
826
|
+
});
|
827
|
+
} else {
|
828
|
+
const isSuccess = result.some((item) => item.res.result === "success");
|
829
|
+
if (isSuccess) {
|
830
|
+
successCallbackFn == null ? void 0 : successCallbackFn(result);
|
831
|
+
} else {
|
832
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn(result);
|
833
|
+
this._handleMonitorNotify(result);
|
834
|
+
}
|
835
|
+
}
|
836
|
+
} catch (e) {
|
837
|
+
const error = {
|
838
|
+
error: e,
|
839
|
+
result: "error",
|
840
|
+
message: ((_b = window.getLanguageByCode) == null ? void 0 : _b.call(window, "10010.1.501")) || "\u6253\u5370\u5931\u8D25"
|
841
|
+
};
|
842
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn(error);
|
843
|
+
this._handleMonitorNotify(error);
|
844
|
+
}
|
845
|
+
}
|
846
|
+
async printDirect({
|
847
|
+
iReportExecuteMode,
|
848
|
+
templateId,
|
849
|
+
formatId: originFormatId,
|
850
|
+
params = "",
|
851
|
+
paramsArr,
|
852
|
+
authorizationKey,
|
853
|
+
print,
|
854
|
+
signature,
|
855
|
+
printdlgshow,
|
856
|
+
nobillnode,
|
857
|
+
copies,
|
858
|
+
svrUpdateIp,
|
859
|
+
isDownloadFile = true,
|
860
|
+
messageTimeout = 0
|
861
|
+
}, successCallbackFn, errorCallbackFn, cancelCallbackFn, mode = "printDirect") {
|
862
|
+
var _a, _b, _c;
|
863
|
+
const iReportStatus = isIReport(originFormatId);
|
864
|
+
const formatId = this.getIReportFormatId(iReportStatus, originFormatId);
|
865
|
+
if (iReportStatus && (isDomestic || iReportExecuteMode == 2)) {
|
866
|
+
const testResult2 = await this._testDomesticSystemConnection();
|
867
|
+
if (!testResult2) {
|
868
|
+
errorCallbackFn({
|
869
|
+
type: "notInstalledApp",
|
870
|
+
result: "error",
|
871
|
+
message: ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.496")) || "\u8BF7\u5F00\u542FihoPrint\u5BA2\u6237\u7AEF"
|
872
|
+
});
|
873
|
+
return;
|
874
|
+
}
|
875
|
+
const isAlreadyConnect = this._initDomesticSystem(async (isNewConnect) => {
|
876
|
+
var _a2;
|
877
|
+
if (isNewConnect) {
|
878
|
+
await this.printToHiPrint({
|
879
|
+
templateId,
|
880
|
+
formatId,
|
881
|
+
params,
|
882
|
+
authorizationKey
|
883
|
+
}, successCallbackFn, errorCallbackFn, cancelCallbackFn);
|
884
|
+
} else {
|
885
|
+
errorCallbackFn({
|
886
|
+
type: "notInstalledApp",
|
887
|
+
result: "error",
|
888
|
+
message: ((_a2 = window.getLanguageByCode) == null ? void 0 : _a2.call(window, "10010.1.502")) || "\u8FDE\u63A5ihoPrint\u5BA2\u6237\u7AEF\u5931\u8D25"
|
889
|
+
});
|
890
|
+
}
|
891
|
+
});
|
892
|
+
if (isAlreadyConnect) {
|
893
|
+
await this.printToHiPrint({
|
894
|
+
templateId,
|
895
|
+
formatId,
|
896
|
+
params,
|
897
|
+
authorizationKey
|
898
|
+
}, successCallbackFn, errorCallbackFn, cancelCallbackFn);
|
899
|
+
}
|
900
|
+
return;
|
901
|
+
}
|
902
|
+
await this._queryProxyOrigin();
|
903
|
+
const testResult = await this._testConnection();
|
904
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
905
|
+
return false;
|
906
|
+
try {
|
907
|
+
const result = await this._handleEventDirect({
|
908
|
+
templateId,
|
909
|
+
formatId,
|
910
|
+
params,
|
911
|
+
paramsArr,
|
912
|
+
cmdid: PRINT_CMD_ID,
|
913
|
+
print,
|
914
|
+
signature,
|
915
|
+
printdlgshow,
|
916
|
+
nobillnode,
|
917
|
+
copies,
|
918
|
+
svrUpdateIp,
|
919
|
+
messageTimeout
|
920
|
+
});
|
921
|
+
const handledResult = this._handleResult(result, errorCallbackFn, cancelCallbackFn);
|
922
|
+
if (!handledResult)
|
923
|
+
return false;
|
924
|
+
if (isDownloadFile && ["downloadPDF"].includes(mode))
|
925
|
+
await this._browserPrint(handledResult, mode);
|
926
|
+
successCallbackFn == null ? void 0 : successCallbackFn(handledResult);
|
927
|
+
} catch (e) {
|
928
|
+
const message = mode === "printDirect" ? ((_b = window.getLanguageByCode) == null ? void 0 : _b.call(window, "10010.1.501")) || "\u6253\u5370\u5931\u8D25" : ((_c = window.getLanguageByCode) == null ? void 0 : _c.call(window, "10010.1.503")) || "\u4E0B\u8F7D\u5931\u8D25";
|
929
|
+
const error = (e == null ? void 0 : e.type) === "timeout" ? {
|
930
|
+
...e,
|
931
|
+
message,
|
932
|
+
result: "error"
|
933
|
+
} : {
|
934
|
+
message,
|
935
|
+
result: "error"
|
936
|
+
};
|
937
|
+
errorCallbackFn == null ? void 0 : errorCallbackFn(error);
|
938
|
+
this._handleMonitorNotify(error);
|
939
|
+
}
|
940
|
+
}
|
941
|
+
async printToHiPrint({
|
942
|
+
templateId,
|
943
|
+
formatId,
|
944
|
+
params,
|
945
|
+
authorizationKey
|
946
|
+
}, successCallbackFn, errorCallbackFn, cancelCallbackFn) {
|
947
|
+
const result = await this._queryPrintForBase64(templateId, formatId, params, authorizationKey);
|
948
|
+
if (!result.success)
|
949
|
+
return errorCallbackFn({
|
950
|
+
message: result.resultMsg,
|
951
|
+
result: "error"
|
952
|
+
});
|
953
|
+
const {
|
954
|
+
base64,
|
955
|
+
formatId: markTemplateId
|
956
|
+
} = result.map;
|
957
|
+
this.base64Fragment = base64;
|
958
|
+
this._successCallbackFn = successCallbackFn;
|
959
|
+
this._errorCallbackFn = errorCallbackFn;
|
960
|
+
if (cancelCallbackFn)
|
961
|
+
this._cancelCallbackFn = cancelCallbackFn;
|
962
|
+
this.hiPrintSocket.emit("news", {
|
963
|
+
printerList: this.printerList,
|
964
|
+
type: "askPrinterTemplate",
|
965
|
+
markTemplateId,
|
966
|
+
pdf_stream: this.base64Fragment
|
967
|
+
});
|
968
|
+
}
|
969
|
+
_downloadPDF(inputData) {
|
970
|
+
if (this.webview) {
|
971
|
+
return this.postMessage({
|
972
|
+
exec: "pdf",
|
973
|
+
data: {
|
974
|
+
file: inputData
|
975
|
+
}
|
976
|
+
});
|
977
|
+
}
|
978
|
+
return httpFn.get(this.printOrigin + PDF_URL, {
|
979
|
+
params: {
|
980
|
+
inputData
|
981
|
+
}
|
982
|
+
}).then(({
|
983
|
+
data
|
984
|
+
}) => data);
|
985
|
+
}
|
986
|
+
async downloadPDF(paramsObj, onResolve, onReject) {
|
987
|
+
var _a;
|
988
|
+
const params = cloneDeep(paramsObj);
|
989
|
+
if (this.webview && this.downloadPath) {
|
990
|
+
if (!Reflect.has(params, "print")) {
|
991
|
+
Reflect.set(params, "print", {
|
992
|
+
print: "1",
|
993
|
+
type: "1"
|
994
|
+
});
|
995
|
+
}
|
996
|
+
if (!params.print.filename) {
|
997
|
+
const currentDay = format(new Date(), "yyyy-MM-dd");
|
998
|
+
const uuid = uuidGenerator();
|
999
|
+
const currentTime = format(new Date(), "yyyyMMddHHmmss") + uuid;
|
1000
|
+
params.print.filename = `${this.downloadPath}/${currentDay}/${currentTime}/${currentTime}`.replace(/\\/g, "/");
|
1001
|
+
}
|
1002
|
+
}
|
1003
|
+
const iReportStatus = isIReport(params.formatId);
|
1004
|
+
params.formatId = this.getIReportFormatId(iReportStatus, params.formatId);
|
1005
|
+
if (iReportStatus && (isDomestic || params.iReportExecuteMode == 2)) {
|
1006
|
+
const data = await this._queryPrintForBase16(params.templateId || "", params.formatId, params.params || "", params.authorizationKey);
|
1007
|
+
if (data == null ? void 0 : data.success) {
|
1008
|
+
return onResolve({
|
1009
|
+
filebase64: (_a = data == null ? void 0 : data.map) == null ? void 0 : _a.hex,
|
1010
|
+
isIreport: true
|
1011
|
+
});
|
1012
|
+
}
|
1013
|
+
return onReject == null ? void 0 : onReject({
|
1014
|
+
type: "queryPrintDataFailure",
|
1015
|
+
result: "error",
|
1016
|
+
message: ERRORMSG
|
1017
|
+
});
|
1018
|
+
}
|
1019
|
+
this.printDirect(params, async (res) => {
|
1020
|
+
if (!res)
|
1021
|
+
onReject({
|
1022
|
+
result: "error",
|
1023
|
+
message: ""
|
1024
|
+
});
|
1025
|
+
const _this = this;
|
1026
|
+
const result = await getFiledir(res.filedir);
|
1027
|
+
onResolve(result, res);
|
1028
|
+
async function getFiledir(filedir) {
|
1029
|
+
const _result = [];
|
1030
|
+
const result2 = JSON.parse(filedir);
|
1031
|
+
if (!isArray(result2))
|
1032
|
+
return await _this._downloadPDF("");
|
1033
|
+
if (result2.length === 1)
|
1034
|
+
return await _this._downloadPDF(result2[0] || "");
|
1035
|
+
for (let i = 0, len = result2.length; i < len; i++) {
|
1036
|
+
_result.push(await _this._downloadPDF(result2[i] || ""));
|
1037
|
+
}
|
1038
|
+
return _result;
|
1039
|
+
}
|
1040
|
+
}, (err) => onReject(err), (err) => {
|
1041
|
+
console.log(err);
|
1042
|
+
}, "downloadPDF");
|
1043
|
+
}
|
1044
|
+
async print({
|
1045
|
+
templateId,
|
1046
|
+
formatId,
|
1047
|
+
params = "",
|
1048
|
+
messageTimeout = 0
|
1049
|
+
}, successCallbackFn, errorCallbackFn) {
|
1050
|
+
const testResult = await this._testConnection();
|
1051
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
1052
|
+
return false;
|
1053
|
+
const printData = await this.queryPrintData({
|
1054
|
+
templateId,
|
1055
|
+
formatId,
|
1056
|
+
params,
|
1057
|
+
messageTimeout
|
1058
|
+
}, void 0, errorCallbackFn);
|
1059
|
+
if (!printData)
|
1060
|
+
return false;
|
1061
|
+
const handledResult = this.printFileData({
|
1062
|
+
formatId,
|
1063
|
+
file: printData.file,
|
1064
|
+
printerName: printData.printerName
|
1065
|
+
}, void 0, errorCallbackFn);
|
1066
|
+
if (!handledResult)
|
1067
|
+
return false;
|
1068
|
+
successCallbackFn && successCallbackFn(handledResult);
|
1069
|
+
}
|
1070
|
+
async queryPrintData({
|
1071
|
+
templateId,
|
1072
|
+
formatId,
|
1073
|
+
params = "",
|
1074
|
+
messageTimeout = 0
|
1075
|
+
}, successCallbackFn, errorCallbackFn) {
|
1076
|
+
const testResult = await this._testConnection();
|
1077
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
1078
|
+
return false;
|
1079
|
+
const result = await this._handleEventQueryPrintData(templateId, formatId, params, messageTimeout, errorCallbackFn);
|
1080
|
+
if (!result)
|
1081
|
+
return false;
|
1082
|
+
successCallbackFn && successCallbackFn(result);
|
1083
|
+
return result;
|
1084
|
+
}
|
1085
|
+
async printFileData({
|
1086
|
+
formatId,
|
1087
|
+
file,
|
1088
|
+
printerName = PRINTER_NAME_DEFAULT
|
1089
|
+
}, successCallbackFn, errorCallbackFn) {
|
1090
|
+
const testResult = await this._testConnection();
|
1091
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
1092
|
+
return false;
|
1093
|
+
const result = await this._callPrintWithFile({
|
1094
|
+
formatId,
|
1095
|
+
printname: printerName,
|
1096
|
+
file
|
1097
|
+
});
|
1098
|
+
const handledResult = this._handleResult(result, errorCallbackFn);
|
1099
|
+
if (!handledResult)
|
1100
|
+
return false;
|
1101
|
+
successCallbackFn && successCallbackFn(handledResult);
|
1102
|
+
return handledResult;
|
1103
|
+
}
|
1104
|
+
async editPrintFormat({
|
1105
|
+
templateId,
|
1106
|
+
formatId,
|
1107
|
+
params,
|
1108
|
+
token,
|
1109
|
+
messageTimeout = 0
|
1110
|
+
}, successCallbackFn, errorCallbackFn) {
|
1111
|
+
const testResult = await this._testConnection();
|
1112
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
1113
|
+
return false;
|
1114
|
+
const result = await this._handleEventEditFormat({
|
1115
|
+
templateId,
|
1116
|
+
formatId,
|
1117
|
+
params,
|
1118
|
+
token,
|
1119
|
+
messageTimeout
|
1120
|
+
});
|
1121
|
+
const handledResult = this._handleResult(result, errorCallbackFn);
|
1122
|
+
if (!handledResult)
|
1123
|
+
return false;
|
1124
|
+
successCallbackFn && successCallbackFn(handledResult);
|
1125
|
+
}
|
1126
|
+
async addPrintFormat({
|
1127
|
+
templateId,
|
1128
|
+
params,
|
1129
|
+
token
|
1130
|
+
}, successCallbackFn, errorCallbackFn) {
|
1131
|
+
const testResult = await this._testConnection();
|
1132
|
+
if (!this._handleResultTest(testResult, errorCallbackFn))
|
1133
|
+
return false;
|
1134
|
+
const result = await this._handleEventEditFormat({
|
1135
|
+
templateId,
|
1136
|
+
params,
|
1137
|
+
token
|
1138
|
+
});
|
1139
|
+
const handledResult = this._handleResult(result, errorCallbackFn);
|
1140
|
+
if (!handledResult)
|
1141
|
+
return false;
|
1142
|
+
successCallbackFn && successCallbackFn(handledResult);
|
1143
|
+
}
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
export { Print };
|