cnhis-design-vue 3.3.3-release.0 → 3.3.3-release.13
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/README.md +87 -87
- package/es/components/audio-sdk/index.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue2.js +47 -12
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue2.js +17 -3
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/big-table/src/components/NoData.vue2.js +8 -1
- package/es/components/big-table/src/hooks/useTableParse.js +8 -1
- package/es/components/button-print/index.d.ts +69 -3
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +69 -3
- package/es/components/button-print/src/ButtonPrint.vue2.js +12 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +29 -4
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +121 -16
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +18 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +17 -3
- package/es/components/button-print/src/utils/print.d.ts +6 -4
- package/es/components/button-print/src/utils/print.js +201 -27
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +18 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.js +8 -1
- package/es/components/classification/index.d.ts +56 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +56 -6
- package/es/components/date-picker/src/DatePicker.vue2.js +8 -1
- package/es/components/expand-field/index.d.ts +792 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue2.js +8 -1
- package/es/components/expand-field/src/index.vue.d.ts +792 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +3 -1
- package/es/components/field-editor/index.d.ts +18 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +18 -0
- package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
- package/es/components/field-editor/src/fields.d.ts +1 -0
- package/es/components/field-editor/src/fields.js +6 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +6 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +6 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +38 -1
- package/es/components/field-set/src/FieldSet.vue2.js +118 -69
- package/es/components/field-set/src/Index.vue2.js +8 -3
- package/es/components/field-set/src/TableStyle.vue2.js +2 -2
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/table-row.vue2.js +21 -6
- package/es/components/field-set/src/constants/index.d.ts +1 -1
- package/es/components/field-set/src/types/index.d.ts +3 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +102 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +102 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +18 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +63 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +4 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +18 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +9 -2
- package/es/components/form-config/src/constants/index.d.ts +31 -1
- package/es/components/form-config/src/constants/index.js +150 -1
- package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -2
- package/es/components/form-config/src/hooks/useConfigurationField.js +53 -6
- package/es/components/form-config/src/hooks/useLocale.d.ts +6 -0
- package/es/components/form-config/src/hooks/useLocale.js +34 -0
- package/es/components/form-config/src/types/index.d.ts +12 -0
- package/es/components/form-render/index.d.ts +18 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +18 -0
- package/es/components/form-render/src/FormRender.vue2.js +5 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +17 -3
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +4 -2
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +2 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +3 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +12 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +7 -7
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +5 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFieldNormalize.js +15 -0
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +8 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +2 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/business.d.ts +3 -1
- package/es/components/form-render/src/utils/business.js +7 -1
- package/es/components/iho-chat/index.d.ts +901 -98
- package/es/components/iho-chat/src/Index.vue.d.ts +901 -98
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +181 -8
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +51 -41
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +66 -6
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +158 -57
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +329 -15
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +21 -19
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +235 -20
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +298 -279
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +51 -5
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +3 -3
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +48 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +34 -27
- package/es/components/iho-chat/src/components/ImageLightbox.vue.d.ts +104 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue.js +6 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue2.js +307 -0
- package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +53 -6
- package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +3 -3
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +93 -30
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +349 -143
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SelectLabel.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +38 -25
- package/es/components/iho-chat/src/components/Video.vue2.js +35 -40
- package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useData.d.ts +51 -4
- package/es/components/iho-chat/src/hooks/useData.js +2 -7
- package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
- package/es/components/iho-chat/src/hooks/useDraggable.js +160 -0
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +78 -11
- package/es/components/iho-chat/src/hooks/useVideo.js +422 -44
- package/es/components/iho-chat/src/types/index.d.ts +37 -1
- package/es/components/iho-chat/src/utils/emoji.d.ts +1 -1
- package/es/components/iho-chat/src/utils/emoji.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +4 -3
- package/es/components/iho-chat/src/utils/index.js +33 -39
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +8 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +5 -2
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +1 -0
- package/es/components/info-header/index.d.ts +41 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +41 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +56 -22
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +19 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +18 -0
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +16 -2
- package/es/components/keyboard/index.d.ts +8 -0
- package/es/components/keyboard/src/Keyboard.vue.d.ts +8 -0
- package/es/components/keyboard/src/Keyboard.vue2.js +33 -9
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +3 -0
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +27 -7
- package/es/components/keyboard/src/types.d.ts +17 -0
- package/es/components/keyboard/src/types.js +1 -0
- package/es/components/quick-search/index.d.ts +2 -0
- package/es/components/quick-search/src/index.vue.d.ts +2 -0
- package/es/components/scale-view/index.d.ts +80 -17
- package/es/components/scale-view/src/ScaleView.vue.d.ts +83 -19
- package/es/components/scale-view/src/ScaleView.vue2.js +84 -10
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +5 -0
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +74 -8
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +28 -4
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +29 -8
- package/es/components/scale-view/src/components/NoData.vue2.js +9 -3
- package/es/components/scale-view/src/components/ScaleScore.d.ts +1 -1
- package/es/components/scale-view/src/components/ScaleScore.js +47 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +20 -2
- package/es/components/scale-view/src/components/formitem/r-radio.js +2 -0
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -4
- package/es/components/scale-view/src/components/formitem/r-upload.js +65 -7
- package/es/components/scale-view/src/components/formitem/sign-com.js +8 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +22 -6
- package/es/components/scale-view/src/hooks/scaleview-init.js +24 -3
- package/es/components/scale-view/src/hooks/scaleview-methods.js +40 -5
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +12 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +12 -0
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +2 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +64 -8
- package/es/components/scale-view/src/hooks/scaleview-validate.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +157 -24
- package/es/components/scale-view/src/hooks/use-evaluate.js +16 -2
- package/es/components/scale-view/src/hooks/use-noData.js +33 -5
- package/es/components/scale-view/src/utils/judge-types.d.ts +2 -1
- package/es/components/scale-view/src/utils/judge-types.js +10 -10
- package/es/components/scale-view/src/utils/watch-form-change.d.ts +13 -0
- package/es/components/scale-view/src/utils/watch-form-change.js +71 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +792 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +434 -341
- package/es/components/select-person/src/SelectPerson.vue2.js +521 -675
- package/es/components/select-person/src/SelectPersonRole.vue.d.ts +630 -0
- package/es/components/select-person/src/SelectPersonRole.vue.js +6 -0
- package/es/components/select-person/src/SelectPersonRole.vue2.js +942 -0
- package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
- package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
- package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +214 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.js +6 -0
- package/es/components/select-person/src/components/SearchGroupList.vue2.js +145 -0
- package/es/components/select-person/src/components/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +21 -12
- package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
- package/es/components/select-person/src/components/TagItem.vue.js +6 -0
- package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
- package/es/components/select-person/src/index.vue.d.ts +793 -1
- package/es/components/select-person/src/index.vue2.js +21 -4
- package/es/components/select-person/src/types/index.d.ts +35 -0
- package/es/components/select-person/src/types/index.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +3 -0
- package/es/components/select-person/src/utils/index.js +29 -8
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +18 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +54 -6
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +26 -10
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +37 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +44 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +2 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +55 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +6 -3
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +25 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +32 -4
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +2 -2
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +20 -3
- package/es/components/table-filter/src/hooks/useRenderWidget.js +4 -0
- package/es/components/table-filter/src/tool/baseOptions.js +8 -1
- package/es/components/table-filter/src/tool/date.d.ts +3 -0
- package/es/components/table-filter/src/tool/date.js +139 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
- package/es/components/table-filter/src/tool/transformData.js +11 -8
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +2 -1
- package/es/components/table-filter/src/types/index.d.ts +12 -0
- package/es/components/vertify/index.d.ts +1 -0
- package/es/components/vertify/index.js +1 -0
- package/es/components/vertify/src/components/IdentityVerification.vue.d.ts +89 -0
- package/es/components/vertify/src/components/IdentityVerification.vue.js +6 -0
- package/es/components/vertify/src/components/IdentityVerification.vue2.js +256 -0
- package/es/components/vertify/src/utils/dialog.d.ts +7 -0
- package/es/components/vertify/src/utils/dialog.js +73 -0
- package/es/components/vertify/src/utils/index.d.ts +11 -0
- package/es/components/vertify/src/utils/index.js +24 -0
- package/es/components/vod-chunk-upload/index.d.ts +16 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +20 -31
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +205 -78
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.d.ts +1 -0
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +35 -4
- package/es/components/vod-chunk-upload/src/hooks/upload-data.d.ts +4 -0
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +78 -11
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +16 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +81 -10
- package/es/components/vod-chunk-upload/style/index.css +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +3 -3
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
# 安装
|
2
|
-
|
3
|
-
```shell
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
5
|
-
# or
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
-
```
|
8
|
-
|
9
|
-
## 1.全局引入
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
// main.ts
|
13
|
-
import { createApp } from 'vue';
|
14
|
-
import App from './App.vue';
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
-
import cui from 'cnhis-design-vue';
|
17
|
-
|
18
|
-
const app = createApp(App);
|
19
|
-
app.use(cui).mount('#app');
|
20
|
-
```
|
21
|
-
|
22
|
-
## 2. 按需引入
|
23
|
-
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
-
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
-
|
28
|
-
```shell
|
29
|
-
# 安装自动导入样式的插件
|
30
|
-
npm i -d vite-plugin-style-import
|
31
|
-
```
|
32
|
-
|
33
|
-
```typescript
|
34
|
-
// vite.config.ts
|
35
|
-
import { defineConfig } from 'vite';
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
-
|
38
|
-
export default defineConfig({
|
39
|
-
plugins: [
|
40
|
-
// ...otherPlugins
|
41
|
-
createStyleImportPlugin({
|
42
|
-
libs: [
|
43
|
-
{
|
44
|
-
libraryName: 'cnhis-design-vue',
|
45
|
-
esModule: true,
|
46
|
-
ensureStyleFile: true,
|
47
|
-
resolveStyle: name => {
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
]
|
52
|
-
})
|
53
|
-
]
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
-
|
59
|
-
```typescript
|
60
|
-
// main.ts
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
62
|
-
```
|
63
|
-
|
64
|
-
## 3.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
1
|
+
# 安装
|
2
|
+
|
3
|
+
```shell
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
5
|
+
# or
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
+
```
|
8
|
+
|
9
|
+
## 1.全局引入
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
// main.ts
|
13
|
+
import { createApp } from 'vue';
|
14
|
+
import App from './App.vue';
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
+
import cui from 'cnhis-design-vue';
|
17
|
+
|
18
|
+
const app = createApp(App);
|
19
|
+
app.use(cui).mount('#app');
|
20
|
+
```
|
21
|
+
|
22
|
+
## 2. 按需引入
|
23
|
+
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
+
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# 安装自动导入样式的插件
|
30
|
+
npm i -d vite-plugin-style-import
|
31
|
+
```
|
32
|
+
|
33
|
+
```typescript
|
34
|
+
// vite.config.ts
|
35
|
+
import { defineConfig } from 'vite';
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
+
|
38
|
+
export default defineConfig({
|
39
|
+
plugins: [
|
40
|
+
// ...otherPlugins
|
41
|
+
createStyleImportPlugin({
|
42
|
+
libs: [
|
43
|
+
{
|
44
|
+
libraryName: 'cnhis-design-vue',
|
45
|
+
esModule: true,
|
46
|
+
ensureStyleFile: true,
|
47
|
+
resolveStyle: name => {
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
]
|
52
|
+
})
|
53
|
+
]
|
54
|
+
});
|
55
|
+
```
|
56
|
+
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
+
|
59
|
+
```typescript
|
60
|
+
// main.ts
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
62
|
+
```
|
63
|
+
|
64
|
+
## 3.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -8,9 +8,6 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
8
8
|
type: NumberConstructor;
|
9
9
|
default: number;
|
10
10
|
};
|
11
|
-
realTimeRecognition: {
|
12
|
-
type: BooleanConstructor;
|
13
|
-
};
|
14
11
|
allowPunctuationMark: {
|
15
12
|
type: BooleanConstructor;
|
16
13
|
default: boolean;
|
@@ -32,8 +29,12 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
32
29
|
type: StringConstructor;
|
33
30
|
default: string;
|
34
31
|
};
|
32
|
+
appCode: {
|
33
|
+
type: StringConstructor;
|
34
|
+
};
|
35
35
|
}, {
|
36
36
|
consultationRecordUrl: string;
|
37
|
+
chatBoxinit: string;
|
37
38
|
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
38
39
|
audioSdk: AudioSDK;
|
39
40
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -41,9 +42,6 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
41
42
|
type: NumberConstructor;
|
42
43
|
default: number;
|
43
44
|
};
|
44
|
-
realTimeRecognition: {
|
45
|
-
type: BooleanConstructor;
|
46
|
-
};
|
47
45
|
allowPunctuationMark: {
|
48
46
|
type: BooleanConstructor;
|
49
47
|
default: boolean;
|
@@ -65,6 +63,9 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
65
63
|
type: StringConstructor;
|
66
64
|
default: string;
|
67
65
|
};
|
66
|
+
appCode: {
|
67
|
+
type: StringConstructor;
|
68
|
+
};
|
68
69
|
}>> & {
|
69
70
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
70
71
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -79,6 +80,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
79
80
|
recordingRef: import("vue").Ref<any>;
|
80
81
|
isRecording: import("vue").Ref<boolean>;
|
81
82
|
loading: import("vue").Ref<boolean>;
|
83
|
+
audioType: import("vue").Ref<"websocket" | "http" | undefined>;
|
82
84
|
content: any;
|
83
85
|
wsConnected: import("vue").ComputedRef<boolean | undefined>;
|
84
86
|
recorderStatus: import("vue").ComputedRef<"" | "fail">;
|
@@ -101,6 +103,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
101
103
|
onPause: () => void;
|
102
104
|
onResume: () => void;
|
103
105
|
handleToAnalyzing: (obj?: import("../../shared/types").AnyObject) => Promise<void>;
|
106
|
+
getAudioType: () => Promise<void>;
|
104
107
|
createMedicalRecord: () => Promise<void>;
|
105
108
|
CRecording: import("vue").DefineComponent<{
|
106
109
|
content: {
|
@@ -140,7 +143,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
140
143
|
type: import("vue").PropType<import("../../shared/types").AnyFn>;
|
141
144
|
};
|
142
145
|
recorderStatus: {
|
143
|
-
type:
|
146
|
+
type: StringConstructor;
|
144
147
|
default: string;
|
145
148
|
};
|
146
149
|
}, {
|
@@ -182,7 +185,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
182
185
|
type: import("vue").PropType<import("../../shared/types").AnyFn>;
|
183
186
|
};
|
184
187
|
recorderStatus: {
|
185
|
-
type:
|
188
|
+
type: StringConstructor;
|
186
189
|
default: string;
|
187
190
|
};
|
188
191
|
}>> & {
|
@@ -200,12 +203,12 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
200
203
|
data: string;
|
201
204
|
}>;
|
202
205
|
wsConnected: import("vue").Ref<boolean>;
|
203
|
-
recorderStatus: import("vue").Ref<
|
206
|
+
recorderStatus: import("vue").Ref<string>;
|
204
207
|
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
205
208
|
audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
|
206
209
|
contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
|
207
|
-
isActive: import("vue").Ref<boolean>;
|
208
210
|
isWarning: import("vue").Ref<boolean>;
|
211
|
+
isActive: import("vue").Ref<boolean>;
|
209
212
|
formattedTime: import("vue").ComputedRef<string>;
|
210
213
|
isCountFinished: import("vue").Ref<boolean>;
|
211
214
|
isCountActive: import("vue").Ref<boolean>;
|
@@ -316,7 +319,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
316
319
|
type: import("vue").PropType<import("../../shared/types").AnyFn>;
|
317
320
|
};
|
318
321
|
recorderStatus: {
|
319
|
-
type:
|
322
|
+
type: StringConstructor;
|
320
323
|
default: string;
|
321
324
|
};
|
322
325
|
}>> & {
|
@@ -336,16 +339,13 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
336
339
|
showBtn: boolean;
|
337
340
|
wsConnected: boolean;
|
338
341
|
fromSdk: boolean;
|
339
|
-
recorderStatus:
|
342
|
+
recorderStatus: string;
|
340
343
|
}>;
|
341
344
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "fail" | "recordingHeightChange")[], "close" | "success" | "fail" | "recordingHeightChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
342
345
|
timed: {
|
343
346
|
type: NumberConstructor;
|
344
347
|
default: number;
|
345
348
|
};
|
346
|
-
realTimeRecognition: {
|
347
|
-
type: BooleanConstructor;
|
348
|
-
};
|
349
349
|
allowPunctuationMark: {
|
350
350
|
type: BooleanConstructor;
|
351
351
|
default: boolean;
|
@@ -367,6 +367,9 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
367
367
|
type: StringConstructor;
|
368
368
|
default: string;
|
369
369
|
};
|
370
|
+
appCode: {
|
371
|
+
type: StringConstructor;
|
372
|
+
};
|
370
373
|
}>> & {
|
371
374
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
372
375
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -374,7 +377,6 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
|
374
377
|
onRecordingHeightChange?: ((...args: any[]) => any) | undefined;
|
375
378
|
}, {
|
376
379
|
timed: number;
|
377
|
-
realTimeRecognition: boolean;
|
378
380
|
allowPunctuationMark: boolean;
|
379
381
|
useSource: string;
|
380
382
|
textPrefix: string;
|
@@ -6,9 +6,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
type: NumberConstructor;
|
7
7
|
default: number;
|
8
8
|
};
|
9
|
-
realTimeRecognition: {
|
10
|
-
type: BooleanConstructor;
|
11
|
-
};
|
12
9
|
allowPunctuationMark: {
|
13
10
|
type: BooleanConstructor;
|
14
11
|
default: boolean;
|
@@ -30,8 +27,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
27
|
type: StringConstructor;
|
31
28
|
default: string;
|
32
29
|
};
|
30
|
+
appCode: {
|
31
|
+
type: StringConstructor;
|
32
|
+
};
|
33
33
|
}, {
|
34
34
|
consultationRecordUrl: string;
|
35
|
+
chatBoxinit: string;
|
35
36
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
36
37
|
audioSdk: AudioSDK;
|
37
38
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -39,9 +40,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
39
40
|
type: NumberConstructor;
|
40
41
|
default: number;
|
41
42
|
};
|
42
|
-
realTimeRecognition: {
|
43
|
-
type: BooleanConstructor;
|
44
|
-
};
|
45
43
|
allowPunctuationMark: {
|
46
44
|
type: BooleanConstructor;
|
47
45
|
default: boolean;
|
@@ -63,6 +61,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
63
61
|
type: StringConstructor;
|
64
62
|
default: string;
|
65
63
|
};
|
64
|
+
appCode: {
|
65
|
+
type: StringConstructor;
|
66
|
+
};
|
66
67
|
}>> & {
|
67
68
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
68
69
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -77,6 +78,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
77
78
|
recordingRef: import("vue").Ref<any>;
|
78
79
|
isRecording: import("vue").Ref<boolean>;
|
79
80
|
loading: import("vue").Ref<boolean>;
|
81
|
+
audioType: import("vue").Ref<"websocket" | "http" | undefined>;
|
80
82
|
content: any;
|
81
83
|
wsConnected: import("vue").ComputedRef<boolean | undefined>;
|
82
84
|
recorderStatus: import("vue").ComputedRef<"" | "fail">;
|
@@ -99,6 +101,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
101
|
onPause: () => void;
|
100
102
|
onResume: () => void;
|
101
103
|
handleToAnalyzing: (obj?: AnyObject) => Promise<void>;
|
104
|
+
getAudioType: () => Promise<void>;
|
102
105
|
createMedicalRecord: () => Promise<void>;
|
103
106
|
CRecording: import("vue").DefineComponent<{
|
104
107
|
content: {
|
@@ -138,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
138
141
|
type: PropType<import("../../../shared/types").AnyFn>;
|
139
142
|
};
|
140
143
|
recorderStatus: {
|
141
|
-
type:
|
144
|
+
type: StringConstructor;
|
142
145
|
default: string;
|
143
146
|
};
|
144
147
|
}, {
|
@@ -180,7 +183,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
180
183
|
type: PropType<import("../../../shared/types").AnyFn>;
|
181
184
|
};
|
182
185
|
recorderStatus: {
|
183
|
-
type:
|
186
|
+
type: StringConstructor;
|
184
187
|
default: string;
|
185
188
|
};
|
186
189
|
}>> & {
|
@@ -198,12 +201,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
198
201
|
data: string;
|
199
202
|
}>;
|
200
203
|
wsConnected: import("vue").Ref<boolean>;
|
201
|
-
recorderStatus: import("vue").Ref<
|
204
|
+
recorderStatus: import("vue").Ref<string>;
|
202
205
|
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
203
206
|
audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
|
204
207
|
contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
|
205
|
-
isActive: import("vue").Ref<boolean>;
|
206
208
|
isWarning: import("vue").Ref<boolean>;
|
209
|
+
isActive: import("vue").Ref<boolean>;
|
207
210
|
formattedTime: import("vue").ComputedRef<string>;
|
208
211
|
isCountFinished: import("vue").Ref<boolean>;
|
209
212
|
isCountActive: import("vue").Ref<boolean>;
|
@@ -314,7 +317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
314
317
|
type: PropType<import("../../../shared/types").AnyFn>;
|
315
318
|
};
|
316
319
|
recorderStatus: {
|
317
|
-
type:
|
320
|
+
type: StringConstructor;
|
318
321
|
default: string;
|
319
322
|
};
|
320
323
|
}>> & {
|
@@ -334,16 +337,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
334
337
|
showBtn: boolean;
|
335
338
|
wsConnected: boolean;
|
336
339
|
fromSdk: boolean;
|
337
|
-
recorderStatus:
|
340
|
+
recorderStatus: string;
|
338
341
|
}>;
|
339
342
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "fail" | "recordingHeightChange")[], "close" | "success" | "fail" | "recordingHeightChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
340
343
|
timed: {
|
341
344
|
type: NumberConstructor;
|
342
345
|
default: number;
|
343
346
|
};
|
344
|
-
realTimeRecognition: {
|
345
|
-
type: BooleanConstructor;
|
346
|
-
};
|
347
347
|
allowPunctuationMark: {
|
348
348
|
type: BooleanConstructor;
|
349
349
|
default: boolean;
|
@@ -365,6 +365,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
365
365
|
type: StringConstructor;
|
366
366
|
default: string;
|
367
367
|
};
|
368
|
+
appCode: {
|
369
|
+
type: StringConstructor;
|
370
|
+
};
|
368
371
|
}>> & {
|
369
372
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
370
373
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -372,7 +375,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
372
375
|
onRecordingHeightChange?: ((...args: any[]) => any) | undefined;
|
373
376
|
}, {
|
374
377
|
timed: number;
|
375
|
-
realTimeRecognition: boolean;
|
376
378
|
allowPunctuationMark: boolean;
|
377
379
|
useSource: string;
|
378
380
|
textPrefix: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useAttrs, ref, computed, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass,
|
1
|
+
import { defineComponent, useAttrs, ref, computed, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createBlock, mergeProps, createCommentVNode } from 'vue';
|
2
2
|
import axios from 'axios';
|
3
3
|
import { isString, isObject } from 'lodash-es';
|
4
4
|
import CRecording from './components/recording.vue.js';
|
@@ -21,9 +21,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
21
|
type: Number,
|
22
22
|
default: 5
|
23
23
|
},
|
24
|
-
realTimeRecognition: {
|
25
|
-
type: Boolean
|
26
|
-
},
|
27
24
|
allowPunctuationMark: {
|
28
25
|
type: Boolean,
|
29
26
|
default: true
|
@@ -44,6 +41,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
41
|
textPrefix: {
|
45
42
|
type: String,
|
46
43
|
default: ""
|
44
|
+
},
|
45
|
+
appCode: {
|
46
|
+
type: String
|
47
47
|
}
|
48
48
|
},
|
49
49
|
emits: ["close", "success", "fail", "recordingHeightChange"],
|
@@ -53,6 +53,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
53
53
|
}) {
|
54
54
|
const props = __props;
|
55
55
|
const consultationRecordUrl = "/flow/openApi/consultationRecord";
|
56
|
+
const chatBoxinit = "/flow/ai/api/chatBoxInit";
|
56
57
|
const cssVars = useTheme();
|
57
58
|
const audioSdk = AudioSDK.create();
|
58
59
|
const attrs = useAttrs();
|
@@ -60,10 +61,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
61
|
const recordingRef = ref();
|
61
62
|
const isRecording = ref(false);
|
62
63
|
const loading = ref(false);
|
64
|
+
const audioType = ref();
|
63
65
|
const content = computed(() => {
|
64
66
|
return audioSdk.contentRef.value;
|
65
67
|
});
|
66
|
-
const wsConnected = computed(() =>
|
68
|
+
const wsConnected = computed(() => {
|
69
|
+
if (audioType.value === "http")
|
70
|
+
return true;
|
71
|
+
return audioSdk.wsConnected.value;
|
72
|
+
});
|
67
73
|
const recorderStatus = computed(() => audioSdk.recorderStatus.value);
|
68
74
|
const recordingProps = computed(() => {
|
69
75
|
return {
|
@@ -127,13 +133,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
127
133
|
const audioText = isString(content.value) ? content.value : isObject(content.value) ? (_b = content.value) == null ? void 0 : _b.data : "";
|
128
134
|
if (!audioText)
|
129
135
|
return;
|
136
|
+
if (!isGenerateMedicalRecord.value)
|
137
|
+
return;
|
130
138
|
const {
|
131
139
|
data
|
132
140
|
} = await axios.post(consultationRecordUrl, {
|
133
141
|
taskId: 1,
|
134
142
|
audioText: props.textPrefix + audioText,
|
135
143
|
intentionCode: props.intentionCode,
|
136
|
-
configs: props.configs || {}
|
144
|
+
configs: props.configs || {},
|
145
|
+
...props.appCode ? {
|
146
|
+
appCode: props.appCode
|
147
|
+
} : {}
|
137
148
|
}, {
|
138
149
|
headers: {
|
139
150
|
Authorization: `bearer ${props.token}`
|
@@ -155,18 +166,44 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
155
166
|
isRecording.value = false;
|
156
167
|
}
|
157
168
|
};
|
169
|
+
const getAudioType = async () => {
|
170
|
+
if (!props.appCode || !props.token)
|
171
|
+
return;
|
172
|
+
try {
|
173
|
+
const {
|
174
|
+
data
|
175
|
+
} = await axios.post(chatBoxinit, {
|
176
|
+
appCode: props.appCode,
|
177
|
+
configs: props.configs || {}
|
178
|
+
}, {
|
179
|
+
headers: {
|
180
|
+
authorization: props.token
|
181
|
+
}
|
182
|
+
});
|
183
|
+
if (!(data == null ? void 0 : data.success))
|
184
|
+
return;
|
185
|
+
if (Reflect.has((data == null ? void 0 : data.data) || {}, "voiceStreamFlag")) {
|
186
|
+
audioType.value = data.data.voiceStreamFlag ? "websocket" : "http";
|
187
|
+
}
|
188
|
+
} catch (error) {
|
189
|
+
}
|
190
|
+
};
|
158
191
|
const createMedicalRecord = async () => {
|
192
|
+
var _a;
|
159
193
|
isRecording.value = true;
|
160
194
|
try {
|
195
|
+
if (!audioType.value)
|
196
|
+
await getAudioType();
|
161
197
|
const res = await audioSdk.start({
|
198
|
+
type: (_a = audioType.value) != null ? _a : "websocket",
|
162
199
|
...props,
|
163
200
|
...attrs
|
164
201
|
});
|
165
202
|
const {
|
166
|
-
|
167
|
-
|
203
|
+
data,
|
204
|
+
success
|
168
205
|
} = res || {};
|
169
|
-
if (
|
206
|
+
if (!success) {
|
170
207
|
onFail(res);
|
171
208
|
return;
|
172
209
|
}
|
@@ -198,8 +235,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
198
235
|
return openBlock(), createElementBlock("div", {
|
199
236
|
style: normalizeStyle(unref(cssVars)),
|
200
237
|
class: normalizeClass(["c-recording-sdk-wrapper", ["c-recording-sdk-wrapper-" + props.useSource]])
|
201
|
-
}, [unref(isGenerateMedicalRecord) ? (openBlock(), createElementBlock(Fragment, {
|
202
|
-
key: 0
|
203
238
|
}, [isRecording.value ? (openBlock(), createBlock(CRecording, mergeProps({
|
204
239
|
key: 0,
|
205
240
|
ref_key: "recordingRef",
|
@@ -215,7 +250,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
215
250
|
onResume,
|
216
251
|
onToAnalyzing: handleToAnalyzing,
|
217
252
|
onHeightChange: handleHeightChange
|
218
|
-
}), null, 16, ["loading"])) : createCommentVNode("v-if", true)],
|
253
|
+
}), null, 16, ["loading"])) : createCommentVNode("v-if", true)], 6);
|
219
254
|
};
|
220
255
|
}
|
221
256
|
});
|
@@ -100,7 +100,7 @@ const _AudioSDK2 = class {
|
|
100
100
|
}
|
101
101
|
async startWaveView(options) {
|
102
102
|
this._audioSDK.clearWaveView();
|
103
|
-
this._audioSDK.createWaveView(options.waveSelector, options.waveProps);
|
103
|
+
this._audioSDK.createWaveView(options.waveSelector(), options.waveProps);
|
104
104
|
}
|
105
105
|
async pause() {
|
106
106
|
return this._audioSDK.pause();
|
@@ -50,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
50
50
|
type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
|
51
51
|
};
|
52
52
|
recorderStatus: {
|
53
|
-
type:
|
53
|
+
type: StringConstructor;
|
54
54
|
default: string;
|
55
55
|
};
|
56
56
|
}, {
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
92
|
type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
|
93
93
|
};
|
94
94
|
recorderStatus: {
|
95
|
-
type:
|
95
|
+
type: StringConstructor;
|
96
96
|
default: string;
|
97
97
|
};
|
98
98
|
}>> & {
|
@@ -110,12 +110,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
110
110
|
data: string;
|
111
111
|
}>;
|
112
112
|
wsConnected: import("vue").Ref<boolean>;
|
113
|
-
recorderStatus: import("vue").Ref<
|
113
|
+
recorderStatus: import("vue").Ref<string>;
|
114
114
|
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
115
115
|
audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
|
116
116
|
contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
|
117
|
-
isActive: import("vue").Ref<boolean>;
|
118
117
|
isWarning: import("vue").Ref<boolean>;
|
118
|
+
isActive: import("vue").Ref<boolean>;
|
119
119
|
formattedTime: import("vue").ComputedRef<string>;
|
120
120
|
isCountFinished: import("vue").Ref<boolean>;
|
121
121
|
isCountActive: import("vue").Ref<boolean>;
|
@@ -226,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
226
226
|
type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
|
227
227
|
};
|
228
228
|
recorderStatus: {
|
229
|
-
type:
|
229
|
+
type: StringConstructor;
|
230
230
|
default: string;
|
231
231
|
};
|
232
232
|
}>> & {
|
@@ -246,7 +246,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
246
246
|
showBtn: boolean;
|
247
247
|
wsConnected: boolean;
|
248
248
|
fromSdk: boolean;
|
249
|
-
recorderStatus:
|
249
|
+
recorderStatus: string;
|
250
250
|
}>;
|
251
251
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
252
252
|
content: {
|