cnhis-design-vue 3.3.2-release.0 → 3.3.2-release.2
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/components/audio-sdk/index.d.ts +173 -146
- package/es/components/audio-sdk/src/Index.vue.d.ts +174 -147
- package/es/components/audio-sdk/src/Index.vue2.js +131 -53
- package/es/components/audio-sdk/src/audioSDK.d.ts +29 -26
- package/es/components/audio-sdk/src/audioSDK.js +123 -42
- package/es/components/audio-sdk/src/components/readyCountdown.vue.d.ts +31 -0
- package/es/components/audio-sdk/src/components/readyCountdown.vue.js +6 -0
- package/es/components/audio-sdk/src/components/readyCountdown.vue2.js +46 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +138 -10
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +139 -11
- package/es/components/audio-sdk/src/components/recording.vue2.js +318 -74
- package/es/components/audio-sdk/src/hooks/useChartAudioContext.d.ts +24 -0
- package/es/components/audio-sdk/src/hooks/useChartAudioContext.js +176 -0
- package/es/components/audio-sdk/src/svgs/Close.vue.js +26 -0
- package/es/components/audio-sdk/src/svgs/Continue.vue.js +20 -0
- package/es/components/audio-sdk/src/svgs/Enlarge.vue.js +20 -0
- package/es/components/audio-sdk/src/svgs/Pause.vue.js +20 -0
- package/es/components/audio-sdk/src/svgs/WaveView.vue.js +20 -0
- package/es/components/audio-sdk/src/svgs/Zoom.vue.js +27 -0
- package/es/components/audio-sdk/src/types/index.d.ts +42 -0
- package/es/components/audio-sdk/src/types/index.js +10 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +9 -3
- package/es/components/audio-sdk/src/utils/recordingModal.js +57 -32
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/base-search/src/index.vue2.js +30 -18
- package/es/components/big-table/src/BigTable.vue2.js +191 -133
- package/es/components/big-table/src/components/NoData.vue2.js +16 -4
- package/es/components/big-table/src/components/edit-form/edit-date.js +12 -6
- package/es/components/big-table/src/components/edit-form/edit-input.js +8 -2
- package/es/components/big-table/src/components/edit-form/edit-select.js +21 -17
- package/es/components/big-table/src/components/edit-form/edit-time.js +11 -4
- package/es/components/big-table/src/components/input-button.vue2.js +8 -4
- package/es/components/big-table/src/hooks/useNestTable.js +18 -4
- package/es/components/big-table/src/hooks/useTableParse.js +16 -3
- package/es/components/body-select/src/index.vue2.js +24 -4
- package/es/components/button-print/index.d.ts +12 -4
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +12 -4
- package/es/components/button-print/src/ButtonPrint.vue2.js +52 -11
- package/es/components/button-print/src/components/EditFormat.vue2.js +16 -8
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -2
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +104 -49
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +7 -2
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +244 -95
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +5 -2
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +92 -32
- package/es/components/button-print/src/components/Preview.vue.d.ts +5 -2
- package/es/components/button-print/src/components/Preview.vue2.js +14 -4
- package/es/components/button-print/src/utils/dialog.js +26 -8
- package/es/components/button-print/src/utils/print.d.ts +5 -5
- package/es/components/button-print/src/utils/print.js +108 -21
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +8 -2
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +16 -4
- package/es/components/card-reader-sdk-cn/src/henan/index.js +38 -11
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/search-filter/index.vue2.js +24 -10
- package/es/components/classification/src/components/set-classification/index.vue2.js +24 -7
- package/es/components/classification/src/components/table-modal/index.vue2.js +324 -165
- package/es/components/classification/src/index.vue2.js +261 -69
- package/es/components/default-page/src/constants/index.js +144 -19
- package/es/components/default-page/src/index.vue2.js +8 -2
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +75 -51
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +46 -38
- package/es/components/expand-field/src/components/PersonModal.vue2.js +62 -50
- package/es/components/expand-field/src/components/form.vue2.js +783 -412
- package/es/components/expand-field/src/index.vue2.js +88 -22
- package/es/components/expand-field/src/utils/constant.js +88 -12
- package/es/components/fabric-chart/src/components/PopupMenu.js +32 -15
- package/es/components/fabric-chart/src/constants/index.js +72 -10
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +18 -4
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +8 -2
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +32 -5
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +8 -2
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +63 -41
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +5 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +24 -4
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +4 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +19 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.js +2 -2
- package/es/components/field-editor/src/fields.js +232 -30
- package/es/components/field-set/src/FieldColor.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldColor.vue2.js +88 -21
- package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldFilter.vue2.js +32 -16
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue2.js +210 -57
- package/es/components/field-set/src/Index.vue2.js +40 -6
- package/es/components/field-set/src/TableStyle.vue2.js +48 -13
- package/es/components/field-set/src/components/condition.vue2.js +26 -10
- package/es/components/field-set/src/components/edit-dialog.vue2.js +148 -68
- package/es/components/field-set/src/components/edit-filter.vue2.js +24 -4
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
- package/es/components/field-set/src/components/table-row.vue2.js +123 -42
- package/es/components/field-set/src/constants/filter.js +328 -42
- package/es/components/field-set/src/constants/index.js +504 -64
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +91 -46
- package/es/components/form-config/src/constants/index.js +80 -11
- package/es/components/form-config/src/hooks/useLocale.js +240 -31
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +8 -4
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +8 -4
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +8 -2
- package/es/components/form-render/src/components/renderer/input.js +3 -2
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +8 -4
- package/es/components/form-render/src/components/renderer/remoteSearch.js +8 -2
- package/es/components/form-render/src/components/renderer/switch.js +24 -4
- package/es/components/form-render/src/components/renderer/textarea.js +5 -4
- package/es/components/form-render/src/utils/schema.js +26 -6
- package/es/components/iho-chat/src/Index.vue2.js +42 -38
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +108 -33
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +132 -90
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +110 -48
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +40 -20
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +55 -23
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +77 -45
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +256 -208
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +306 -208
- package/es/components/iho-chat/src/components/ContextMenu.js +50 -9
- package/es/components/iho-chat/src/components/MessageEvent.vue2.js +16 -4
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +8 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +104 -18
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +66 -11
- package/es/components/iho-chat/src/components/SelectLabel.vue2.js +47 -43
- package/es/components/iho-chat/src/components/SiderList.vue2.js +68 -38
- package/es/components/iho-chat/src/components/Video.vue2.js +38 -11
- package/es/components/iho-chat/src/hooks/useVideo.js +15 -4
- package/es/components/iho-chat/src/utils/index.js +79 -14
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +8 -2
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +40 -15
- package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/remoteFilter.vue2.js +40 -15
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +50 -20
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +16 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +10 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +42 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +18 -12
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +144 -25
- package/es/components/keyboard/src/Keyboard.vue2.js +20 -8
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +51 -37
- package/es/components/map/src/Map.vue2.js +8 -4
- package/es/components/picture-clipper/src/PictureClipper.vue2.js +16 -8
- package/es/components/quick-search/src/index.vue2.js +176 -131
- package/es/components/recommend-search/src/components/BaseSearch.js +14 -8
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +28 -8
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +18 -5
- package/es/components/scale-view/src/ScaleView.vue2.js +16 -8
- package/es/components/scale-view/src/components/NoData.vue2.js +16 -4
- package/es/components/scale-view/src/components/formitem/r-cascader.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +24 -6
- package/es/components/scale-view/src/components/formitem/r-input.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-map.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-radio.js +24 -6
- package/es/components/scale-view/src/components/formitem/r-select.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -11
- package/es/components/scale-view/src/components/formitem/standard-modal.js +16 -3
- package/es/components/scale-view/src/hooks/scaleview-computed.js +24 -5
- package/es/components/scale-view/src/hooks/scaleview-methods.js +16 -4
- package/es/components/scale-view/src/hooks/scaleview-submit.js +16 -3
- package/es/components/scale-view/src/hooks/scaleview-validate.js +40 -9
- package/es/components/search-cascader/src/SearchCascader.vue2.js +20 -14
- package/es/components/select-label/src/LabelFormContent.vue2.js +53 -21
- package/es/components/select-label/src/SelectLabel.vue2.js +81 -51
- package/es/components/select-label/src/components/label-classify.vue2.js +28 -11
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +18 -5
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +34 -8
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +18 -5
- package/es/components/select-person/src/SelectPerson.vue2.js +214 -141
- package/es/components/select-person/src/SelectPersonType.vue2.js +127 -102
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +9 -2
- package/es/components/select-person/src/index.vue2.js +20 -7
- package/es/components/slider-tree/src/index.vue2.js +16 -3
- package/es/components/table-export-field/index.d.ts +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +187 -113
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +147 -88
- package/es/components/table-export-field/src/index.vue.d.ts +1 -0
- package/es/components/table-export-field/src/index.vue2.js +28 -12
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +32 -5
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +264 -34
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +214 -135
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +16 -3
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +9 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +39 -6
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +18 -5
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +29 -18
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +16 -3
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +8 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +195 -130
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +26 -7
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +34 -8
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +21 -8
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +8 -4
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +19 -6
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +16 -3
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +24 -10
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1648 -207
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +8 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +16 -3
- package/es/components/table-filter/src/tool/baseOptions.js +144 -19
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +32 -16
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +22 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +8 -4
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +16 -8
- 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/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +2 -2
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +0 -6
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +0 -40
- package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +0 -4
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,18 +1,68 @@
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock,
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import
|
1
|
+
import { createElementVNode, defineComponent, toRefs, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, createBlock, createCommentVNode, toDisplayString, withDirectives, vShow, isRef, createTextVNode } from 'vue';
|
2
|
+
import { NSpin, NIcon, NTooltip, NSpace, NButton } from 'naive-ui';
|
3
|
+
import { StopCircle, MicOff, PlayCircleOutline } from '@vicons/ionicons5';
|
4
|
+
import { useDebounceFn, promiseTimeout } from '@vueuse/core';
|
5
|
+
import { useChartAudioContext } from '../hooks/useChartAudioContext.js';
|
6
|
+
import ReadyCountdown from './readyCountdown.vue.js';
|
7
|
+
import CloseSvg from '../svgs/Close.vue.js';
|
8
|
+
import ZoomSvg from '../svgs/Zoom.vue.js';
|
9
|
+
import PauseSvg from '../svgs/Pause.vue.js';
|
10
|
+
import ContinueSvg from '../svgs/Continue.vue.js';
|
11
|
+
import EnlargeSvg from '../svgs/Enlarge.vue.js';
|
12
|
+
import WaveView from '../svgs/WaveView.vue.js';
|
6
13
|
|
7
14
|
const _hoisted_1 = {
|
8
|
-
|
15
|
+
key: 0,
|
16
|
+
class: "c-recording-small"
|
9
17
|
};
|
10
18
|
const _hoisted_2 = {
|
11
|
-
class: "
|
19
|
+
class: "c-recording-chart-box-small-wrap"
|
12
20
|
};
|
13
21
|
const _hoisted_3 = {
|
14
|
-
|
15
|
-
|
22
|
+
class: "c-recording-formatted-time"
|
23
|
+
};
|
24
|
+
const _hoisted_4 = {
|
25
|
+
class: "tip-small"
|
26
|
+
};
|
27
|
+
const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", null, "\u6682\u505C", -1);
|
28
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode("span", null, "\u7EE7\u7EED", -1);
|
29
|
+
const _hoisted_7 = /* @__PURE__ */ createElementVNode("span", null, function() {
|
30
|
+
var _a, _b, _c;
|
31
|
+
try {
|
32
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.77")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.77")) || "\u7ED3\u675F";
|
33
|
+
} catch (e) {
|
34
|
+
return "\u7ED3\u675F";
|
35
|
+
}
|
36
|
+
}(), -1);
|
37
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("span", {
|
38
|
+
class: "split-line"
|
39
|
+
}, null, -1);
|
40
|
+
const _hoisted_9 = /* @__PURE__ */ createElementVNode("span", null, "\u653E\u5927", -1);
|
41
|
+
const _hoisted_10 = {
|
42
|
+
key: 1,
|
43
|
+
class: "c-recording-top-wrap"
|
44
|
+
};
|
45
|
+
const _hoisted_11 = {
|
46
|
+
class: "c-recording-header"
|
47
|
+
};
|
48
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", null, "\u7F29\u5C0F", -1);
|
49
|
+
const _hoisted_13 = {
|
50
|
+
class: "c-recording-container"
|
51
|
+
};
|
52
|
+
const _hoisted_14 = {
|
53
|
+
class: "c-recording-status-section"
|
54
|
+
};
|
55
|
+
const _hoisted_15 = {
|
56
|
+
class: "c-recording-chart-box-wrap"
|
57
|
+
};
|
58
|
+
const _hoisted_16 = {
|
59
|
+
class: "tip"
|
60
|
+
};
|
61
|
+
const _hoisted_17 = {
|
62
|
+
class: "c-recording-formatted-time"
|
63
|
+
};
|
64
|
+
const _hoisted_18 = {
|
65
|
+
class: "content"
|
16
66
|
};
|
17
67
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
18
68
|
__name: "recording",
|
@@ -35,85 +85,279 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
85
|
},
|
36
86
|
loading: {
|
37
87
|
type: Boolean,
|
38
|
-
default:
|
88
|
+
default: false
|
89
|
+
},
|
90
|
+
wsConnected: {
|
91
|
+
type: Boolean,
|
92
|
+
default: false
|
39
93
|
},
|
40
94
|
fromSdk: {
|
41
95
|
type: Boolean
|
96
|
+
},
|
97
|
+
show: {
|
98
|
+
type: Boolean,
|
99
|
+
default: false
|
100
|
+
},
|
101
|
+
startWaveViewMethod: {
|
102
|
+
type: Function
|
103
|
+
},
|
104
|
+
recorderStatus: {
|
105
|
+
type: String,
|
106
|
+
default: ""
|
42
107
|
}
|
43
108
|
},
|
44
|
-
emits: ["close", "success", "
|
109
|
+
emits: ["close", "success", "fail", "pause", "resume", "toAnalyzing", "heightChange"],
|
45
110
|
setup(__props, {
|
46
|
-
expose,
|
47
111
|
emit
|
48
112
|
}) {
|
49
113
|
const props = __props;
|
50
|
-
const
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
114
|
+
const {
|
115
|
+
loading,
|
116
|
+
content,
|
117
|
+
wsConnected,
|
118
|
+
recorderStatus
|
119
|
+
} = toRefs(props);
|
120
|
+
const audioChartRef = ref();
|
121
|
+
const audioChartSamllRef = ref();
|
122
|
+
const contentScrollRef = ref();
|
123
|
+
const {
|
124
|
+
isActive,
|
125
|
+
isWarning,
|
126
|
+
formattedTime,
|
127
|
+
isCountFinished,
|
128
|
+
isCountActive,
|
129
|
+
isZoomSmall,
|
130
|
+
pause,
|
131
|
+
btnDisabled,
|
132
|
+
handleEnd,
|
133
|
+
handlePause,
|
134
|
+
handlePlay,
|
135
|
+
handleZoom,
|
136
|
+
setWarningState,
|
137
|
+
startWarningTimer,
|
138
|
+
initStartWaveView,
|
139
|
+
cleanupState,
|
140
|
+
handleHeightChange
|
141
|
+
} = useChartAudioContext(props, emit, {
|
142
|
+
waveSelector: () => audioChartRef.value,
|
143
|
+
waveSelectorSmall: () => audioChartSamllRef.value
|
144
|
+
});
|
145
|
+
const onEnd = useDebounceFn(handleEnd, 500);
|
146
|
+
const onPause = useDebounceFn(handlePause, 500);
|
147
|
+
const onPlay = useDebounceFn(handlePlay, 500);
|
148
|
+
const onZoom = useDebounceFn(handleZoom, 500);
|
149
|
+
const isSpining = computed(() => !wsConnected.value || loading.value);
|
150
|
+
const isFailStatus = computed(() => recorderStatus.value === "fail");
|
151
|
+
const isActiveStatus = computed(() => !loading.value && isActive.value && !isWarning.value);
|
152
|
+
const isWarningStatus = computed(() => isFailStatus.value || !loading.value && isActive.value && isWarning.value);
|
153
|
+
const isPauseStatus = computed(() => !isFailStatus.value && (loading.value || !isActive.value));
|
154
|
+
const showContent = computed(() => isCountFinished.value && !!content.value);
|
155
|
+
const tip = computed(() => {
|
156
|
+
if (isFailStatus.value)
|
157
|
+
return "\u5F55\u97F3\u5F02\u5E38\uFF01";
|
158
|
+
if (loading.value)
|
159
|
+
return "\u5F55\u97F3\u8BC6\u522B\u4E2D...";
|
160
|
+
if (isActiveStatus.value)
|
161
|
+
return "\u6B63\u5728\u5F55\u97F3\u4E2D...";
|
162
|
+
if (isWarningStatus.value)
|
163
|
+
return "\u65E0\u8BED\u97F3\u5F55\u5165\uFF0C\u8BF7\u68C0\u6D4B\u662F\u5426\u5F55\u97F3\uFF01";
|
164
|
+
return "\u5DF2\u6682\u505C\u5F55\u97F3";
|
165
|
+
});
|
166
|
+
const tipSmall = computed(() => {
|
167
|
+
if (isFailStatus.value)
|
168
|
+
return "\u5F55\u5165\u5F02\u5E38";
|
169
|
+
if (loading.value)
|
170
|
+
return "\u8BC6\u522B\u4E2D...";
|
171
|
+
if (isActiveStatus.value)
|
172
|
+
return "\u5F55\u97F3\u4E2D...";
|
173
|
+
if (isWarningStatus.value)
|
174
|
+
return "\u5F55\u5165\u5F02\u5E38";
|
175
|
+
return "\u5DF2\u6682\u505C";
|
176
|
+
});
|
177
|
+
const showDom = computed(() => props.show && wsConnected.value && isCountFinished.value);
|
178
|
+
watch(() => props.show, async (val) => {
|
179
|
+
if (val || isFailStatus.value) {
|
180
|
+
cleanupState();
|
181
|
+
startWarningTimer(8e3);
|
182
|
+
} else {
|
183
|
+
pause == null ? void 0 : pause();
|
86
184
|
}
|
87
|
-
}
|
88
|
-
|
89
|
-
|
185
|
+
}, {
|
186
|
+
immediate: true
|
187
|
+
});
|
188
|
+
watch(() => showDom.value, (newVal) => {
|
189
|
+
if (!newVal || isFailStatus.value)
|
190
|
+
return;
|
191
|
+
initStartWaveView();
|
192
|
+
});
|
193
|
+
watch(() => isFailStatus.value, (newVal) => {
|
194
|
+
if (!newVal)
|
195
|
+
return;
|
196
|
+
isCountFinished.value = true;
|
197
|
+
cleanupState();
|
198
|
+
});
|
199
|
+
watch(() => content.value, async (value) => {
|
200
|
+
setWarningState(false);
|
201
|
+
startWarningTimer();
|
202
|
+
await promiseTimeout(10);
|
203
|
+
const scrollRef = contentScrollRef.value;
|
204
|
+
if (!scrollRef)
|
205
|
+
return;
|
206
|
+
await promiseTimeout(50);
|
207
|
+
requestAnimationFrame(() => {
|
208
|
+
scrollRef.scrollTop = scrollRef.scrollHeight;
|
209
|
+
});
|
210
|
+
});
|
211
|
+
watch(() => showContent.value, (newVal) => {
|
212
|
+
handleHeightChange(newVal);
|
90
213
|
});
|
91
214
|
return (_ctx, _cache) => {
|
92
|
-
return openBlock(), createElementBlock("div",
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
size: "60",
|
102
|
-
color: "#fff",
|
103
|
-
component: unref(Mic)
|
104
|
-
}, null, 8, ["component"])]), __props.showBtn ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(NButton), {
|
105
|
-
type: "primary",
|
106
|
-
onClick: toAnalyzing,
|
107
|
-
disabled: !__props.content
|
215
|
+
return openBlock(), createElementBlock("div", {
|
216
|
+
class: normalizeClass(["c-recording-wrapper", {
|
217
|
+
"c-recording-wrapper-warning": unref(isWarningStatus),
|
218
|
+
"c-recording-wrapper-pause": unref(isPauseStatus),
|
219
|
+
"c-recording-wrapper-disabled": unref(loading),
|
220
|
+
"c-recording-wrapper-show_content": unref(showContent)
|
221
|
+
}])
|
222
|
+
}, [createVNode(unref(NSpin), {
|
223
|
+
show: unref(isSpining)
|
108
224
|
}, {
|
109
|
-
default: withCtx(() => [
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
225
|
+
default: withCtx(() => [unref(isZoomSmall) ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("div", {
|
226
|
+
ref_key: "audioChartSamllRef",
|
227
|
+
ref: audioChartSamllRef,
|
228
|
+
class: "c-recording-chart-box-small"
|
229
|
+
}, null, 512), unref(isPauseStatus) || unref(isWarningStatus) ? (openBlock(), createBlock(unref(NIcon), {
|
230
|
+
key: 0,
|
231
|
+
color: "#FF1818",
|
232
|
+
component: WaveView
|
233
|
+
})) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_3, toDisplayString(unref(formattedTime)), 1), createElementVNode("span", _hoisted_4, toDisplayString(unref(tipSmall)), 1), createVNode(unref(NTooltip), null, {
|
234
|
+
trigger: withCtx(() => [withDirectives(createVNode(unref(NIcon), {
|
235
|
+
component: PauseSvg,
|
236
|
+
onClick: unref(onPause)
|
237
|
+
}, null, 8, ["onClick"]), [[vShow, unref(isActive)]])]),
|
238
|
+
default: withCtx(() => [_hoisted_5]),
|
239
|
+
_: 1
|
240
|
+
}), createVNode(unref(NTooltip), null, {
|
241
|
+
trigger: withCtx(() => [withDirectives(createVNode(unref(NIcon), {
|
242
|
+
component: ContinueSvg,
|
243
|
+
onClick: unref(onPlay)
|
244
|
+
}, null, 8, ["onClick"]), [[vShow, !unref(isActive)]])]),
|
245
|
+
default: withCtx(() => [_hoisted_6]),
|
246
|
+
_: 1
|
247
|
+
}), createVNode(unref(NTooltip), null, {
|
248
|
+
trigger: withCtx(() => [createVNode(unref(NIcon), {
|
249
|
+
component: unref(StopCircle),
|
250
|
+
color: "#FF1818",
|
251
|
+
onClick: _cache[0] || (_cache[0] = () => unref(onEnd)("end"))
|
252
|
+
}, null, 8, ["component"])]),
|
253
|
+
default: withCtx(() => [_hoisted_7]),
|
254
|
+
_: 1
|
255
|
+
}), _hoisted_8, createVNode(unref(NTooltip), null, {
|
256
|
+
trigger: withCtx(() => [createVNode(unref(NIcon), {
|
257
|
+
component: EnlargeSvg,
|
258
|
+
onClick: unref(onZoom),
|
259
|
+
class: "c-recording-zoom-svg"
|
260
|
+
}, null, 8, ["onClick"])]),
|
261
|
+
default: withCtx(() => [_hoisted_9]),
|
262
|
+
_: 1
|
263
|
+
})])) : (openBlock(), createElementBlock("div", _hoisted_10, [createElementVNode("div", _hoisted_11, [createVNode(unref(NSpace), {
|
264
|
+
"wrap-item": false,
|
265
|
+
size: 16,
|
266
|
+
justify: "end"
|
267
|
+
}, {
|
268
|
+
default: withCtx(() => [!unref(btnDisabled) ? (openBlock(), createBlock(unref(NTooltip), {
|
269
|
+
key: 0
|
270
|
+
}, {
|
271
|
+
trigger: withCtx(() => [createVNode(unref(NIcon), {
|
272
|
+
size: 16,
|
273
|
+
onClick: unref(onZoom),
|
274
|
+
component: ZoomSvg
|
275
|
+
}, null, 8, ["onClick"])]),
|
276
|
+
default: withCtx(() => [_hoisted_12]),
|
277
|
+
_: 1
|
278
|
+
})) : createCommentVNode("v-if", true), createVNode(unref(NIcon), {
|
279
|
+
class: "audio-icon",
|
280
|
+
size: 16,
|
281
|
+
onClick: _cache[1] || (_cache[1] = () => unref(onEnd)("close")),
|
282
|
+
component: CloseSvg
|
283
|
+
})]),
|
284
|
+
_: 1
|
285
|
+
})]), createElementVNode("div", _hoisted_13, [createElementVNode("div", _hoisted_14, [!unref(isCountFinished) ? (openBlock(), createBlock(ReadyCountdown, {
|
286
|
+
key: 0,
|
287
|
+
isCountFinished: unref(isCountFinished),
|
288
|
+
"onUpdate:isCountFinished": _cache[2] || (_cache[2] = ($event) => isRef(isCountFinished) ? isCountFinished.value = $event : null),
|
289
|
+
isCountActive: unref(isCountActive)
|
290
|
+
}, null, 8, ["isCountFinished", "isCountActive"])) : (openBlock(), createBlock(unref(NSpace), {
|
291
|
+
key: 1,
|
292
|
+
vertical: "",
|
293
|
+
size: 4,
|
294
|
+
"wrap-item": false,
|
295
|
+
justify: "space-between",
|
296
|
+
align: "center"
|
297
|
+
}, {
|
298
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_15, [createElementVNode("div", {
|
299
|
+
ref_key: "audioChartRef",
|
300
|
+
ref: audioChartRef,
|
301
|
+
class: "c-recording-chart-box"
|
302
|
+
}, null, 512)]), unref(isWarningStatus) ? (openBlock(), createBlock(unref(NIcon), {
|
303
|
+
key: 0,
|
304
|
+
size: "54",
|
305
|
+
color: "#FF1818",
|
306
|
+
component: unref(MicOff)
|
307
|
+
}, null, 8, ["component"])) : createCommentVNode("v-if", true), unref(isPauseStatus) ? (openBlock(), createBlock(unref(NIcon), {
|
308
|
+
key: 1,
|
309
|
+
size: "54",
|
310
|
+
color: "#FF1818",
|
311
|
+
component: unref(PlayCircleOutline)
|
312
|
+
}, null, 8, ["component"])) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_16, toDisplayString(unref(tip)), 1), createElementVNode("h3", _hoisted_17, toDisplayString(unref(formattedTime)), 1)]),
|
313
|
+
_: 1
|
314
|
+
}))]), createVNode(unref(NSpace), {
|
315
|
+
"wrap-item": false,
|
316
|
+
size: 15,
|
317
|
+
class: "c-recording-btn-section"
|
318
|
+
}, {
|
319
|
+
default: withCtx(() => [withDirectives(createVNode(unref(NButton), {
|
320
|
+
size: "large",
|
321
|
+
round: "",
|
322
|
+
disabled: unref(btnDisabled),
|
323
|
+
onClick: unref(onPause)
|
324
|
+
}, {
|
325
|
+
default: withCtx(() => [createTextVNode("\u6682\u505C")]),
|
326
|
+
_: 1
|
327
|
+
}, 8, ["disabled", "onClick"]), [[vShow, unref(isActive)]]), withDirectives(createVNode(unref(NButton), {
|
328
|
+
size: "large",
|
329
|
+
round: "",
|
330
|
+
disabled: unref(btnDisabled),
|
331
|
+
onClick: unref(onPlay)
|
332
|
+
}, {
|
333
|
+
default: withCtx(() => [createTextVNode("\u7EE7\u7EED")]),
|
334
|
+
_: 1
|
335
|
+
}, 8, ["disabled", "onClick"]), [[vShow, !unref(isActive)]]), createVNode(unref(NButton), {
|
336
|
+
round: "",
|
337
|
+
color: "#FF1818",
|
338
|
+
size: "large",
|
339
|
+
disabled: unref(btnDisabled),
|
340
|
+
onClick: _cache[3] || (_cache[3] = () => unref(onEnd)("end"))
|
341
|
+
}, {
|
342
|
+
default: withCtx(() => [createTextVNode(function() {
|
343
|
+
var _a, _b, _c;
|
344
|
+
try {
|
345
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.77")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.77")) || "\u7ED3\u675F";
|
346
|
+
} catch (e) {
|
347
|
+
return "\u7ED3\u675F";
|
348
|
+
}
|
349
|
+
}())]),
|
350
|
+
_: 1
|
351
|
+
}, 8, ["disabled"])]),
|
352
|
+
_: 1
|
353
|
+
})])])), unref(showContent) ? (openBlock(), createElementBlock("div", {
|
354
|
+
key: 2,
|
355
|
+
class: "c-recording-content-wrap",
|
356
|
+
ref_key: "contentScrollRef",
|
357
|
+
ref: contentScrollRef
|
358
|
+
}, [createElementVNode("p", _hoisted_18, toDisplayString(unref(content)), 1)], 512)) : createCommentVNode("v-if", true)]),
|
115
359
|
_: 1
|
116
|
-
}
|
360
|
+
}, 8, ["show"])], 2);
|
117
361
|
};
|
118
362
|
}
|
119
363
|
});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { AnyObject, AnyFn } from '../../../../shared/types';
|
2
|
+
export declare function useChartAudioContext(props: AnyObject, emit: AnyFn, options: {
|
3
|
+
waveSelector: () => string | HTMLElement;
|
4
|
+
waveSelectorSmall: () => string | HTMLElement;
|
5
|
+
waveProps?: AnyObject;
|
6
|
+
}): {
|
7
|
+
isActive: import("vue").Ref<boolean>;
|
8
|
+
isWarning: import("vue").Ref<boolean>;
|
9
|
+
formattedTime: import("vue").ComputedRef<string>;
|
10
|
+
isCountFinished: import("vue").Ref<boolean>;
|
11
|
+
isCountActive: import("vue").Ref<boolean>;
|
12
|
+
isZoomSmall: import("vue").Ref<boolean>;
|
13
|
+
pause: any;
|
14
|
+
btnDisabled: import("vue").ComputedRef<any>;
|
15
|
+
handleEnd: (closeType?: string) => Promise<any>;
|
16
|
+
handlePause: () => Promise<void>;
|
17
|
+
handlePlay: () => Promise<void>;
|
18
|
+
handleZoom: () => Promise<void>;
|
19
|
+
setWarningState: (state: boolean) => void;
|
20
|
+
startWarningTimer: (initTime?: number) => void;
|
21
|
+
initStartWaveView: () => Promise<void>;
|
22
|
+
cleanupState: () => void;
|
23
|
+
handleHeightChange: (showContent: boolean) => void;
|
24
|
+
};
|
@@ -0,0 +1,176 @@
|
|
1
|
+
import { ref, computed, watch } from 'vue';
|
2
|
+
import { promiseTimeout, useIntervalFn } from '@vueuse/core';
|
3
|
+
|
4
|
+
function useChartAudioContext(props, emit, options) {
|
5
|
+
const isCountFinished = ref(false);
|
6
|
+
const isCountActive = ref(true);
|
7
|
+
const time = ref(0);
|
8
|
+
let warnTimer = null;
|
9
|
+
let warnCancelTimer = null;
|
10
|
+
const NO_CONTENT_DURATION = 5e3;
|
11
|
+
const warnTime = ref(5);
|
12
|
+
const isWarning = ref(false);
|
13
|
+
let pause = null;
|
14
|
+
let resume = null;
|
15
|
+
const isActive = ref(false);
|
16
|
+
const isZoomSmall = ref(false);
|
17
|
+
const initAudioTiming = () => {
|
18
|
+
pause = null;
|
19
|
+
resume = null;
|
20
|
+
const {
|
21
|
+
pause: pauseFn,
|
22
|
+
resume: resumeFn,
|
23
|
+
isActive: iIsActive
|
24
|
+
} = useIntervalFn(() => {
|
25
|
+
time.value++;
|
26
|
+
}, 1e3);
|
27
|
+
pause = pauseFn;
|
28
|
+
resume = resumeFn;
|
29
|
+
watch(iIsActive, (val) => {
|
30
|
+
isActive.value = val;
|
31
|
+
}, {
|
32
|
+
immediate: true
|
33
|
+
});
|
34
|
+
};
|
35
|
+
const btnDisabled = computed(() => props.loading || !isCountFinished.value || props.recorderStatus === "fail");
|
36
|
+
const formattedTime = computed(() => {
|
37
|
+
if (!time.value)
|
38
|
+
return "00:00";
|
39
|
+
const hours = Math.floor(time.value / 3600);
|
40
|
+
const minutes = Math.floor(time.value % 3600 / 60);
|
41
|
+
const seconds = time.value % 60;
|
42
|
+
const formattedMinutes = minutes.toString().padStart(2, "0");
|
43
|
+
const formattedSeconds = seconds.toString().padStart(2, "0");
|
44
|
+
if (hours > 0) {
|
45
|
+
const formattedHours = hours.toString().padStart(2, "0");
|
46
|
+
return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
|
47
|
+
} else {
|
48
|
+
return `${formattedMinutes}:${formattedSeconds}`;
|
49
|
+
}
|
50
|
+
});
|
51
|
+
function startWarningTimer(initTime = NO_CONTENT_DURATION) {
|
52
|
+
warnTimer && clearInterval(warnTimer);
|
53
|
+
setWarningState(false);
|
54
|
+
warnTimer = setTimeout(() => {
|
55
|
+
setWarningState(true);
|
56
|
+
}, initTime);
|
57
|
+
}
|
58
|
+
function setWarningState(state) {
|
59
|
+
isWarning.value = state;
|
60
|
+
if (state) {
|
61
|
+
clearInterval(warnCancelTimer);
|
62
|
+
warnTime.value = 5;
|
63
|
+
warnCancelTimer = setInterval(() => {
|
64
|
+
if (warnTime.value > 0) {
|
65
|
+
warnTime.value--;
|
66
|
+
} else {
|
67
|
+
warnTime.value = 5;
|
68
|
+
clearInterval(warnCancelTimer);
|
69
|
+
startWarningTimer();
|
70
|
+
}
|
71
|
+
}, 1e3);
|
72
|
+
} else {
|
73
|
+
clearInterval(warnCancelTimer);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
const cleanupState = () => {
|
77
|
+
isCountFinished.value = false;
|
78
|
+
isCountActive.value = true;
|
79
|
+
warnTimer && clearTimeout(warnTimer);
|
80
|
+
warnCancelTimer && clearInterval(warnCancelTimer);
|
81
|
+
time.value = 0;
|
82
|
+
warnTimer = null;
|
83
|
+
warnCancelTimer = null;
|
84
|
+
isWarning.value = false;
|
85
|
+
pause = null;
|
86
|
+
resume = null;
|
87
|
+
isActive.value = false;
|
88
|
+
};
|
89
|
+
const handleEnd = async (closeType = "close") => {
|
90
|
+
if (btnDisabled.value && closeType == "end")
|
91
|
+
return;
|
92
|
+
isCountActive.value = false;
|
93
|
+
const isEndSet = closeType == "end";
|
94
|
+
const isCloseSet = closeType == "close";
|
95
|
+
pause == null ? void 0 : pause();
|
96
|
+
if (props.fromSdk || closeType === "close") {
|
97
|
+
return emit("close", {
|
98
|
+
isEndSet,
|
99
|
+
isCloseSet
|
100
|
+
});
|
101
|
+
}
|
102
|
+
emit("toAnalyzing", {
|
103
|
+
isEndSet,
|
104
|
+
isCloseSet
|
105
|
+
});
|
106
|
+
};
|
107
|
+
const handlePause = async () => {
|
108
|
+
if (btnDisabled.value)
|
109
|
+
return;
|
110
|
+
pause == null ? void 0 : pause();
|
111
|
+
setWarningState(false);
|
112
|
+
warnTimer && clearTimeout(warnTimer);
|
113
|
+
emit("pause");
|
114
|
+
};
|
115
|
+
const handlePlay = async () => {
|
116
|
+
if (btnDisabled.value)
|
117
|
+
return;
|
118
|
+
resume();
|
119
|
+
startWarningTimer();
|
120
|
+
emit("resume");
|
121
|
+
};
|
122
|
+
const handleHeightChange = (showContent) => {
|
123
|
+
let cH = isZoomSmall.value ? 58 : 284;
|
124
|
+
if (showContent) {
|
125
|
+
cH = isZoomSmall.value ? 210 : 436;
|
126
|
+
}
|
127
|
+
emit("heightChange", cH);
|
128
|
+
};
|
129
|
+
const handleZoom = async () => {
|
130
|
+
var _a;
|
131
|
+
if (btnDisabled.value)
|
132
|
+
return;
|
133
|
+
isZoomSmall.value = !isZoomSmall.value;
|
134
|
+
await promiseTimeout(50);
|
135
|
+
handleHeightChange(isCountFinished.value && props.content);
|
136
|
+
if (!props.startWaveViewMethod || typeof props.startWaveViewMethod !== "function")
|
137
|
+
return;
|
138
|
+
(_a = props.startWaveViewMethod) == null ? void 0 : _a.call(props, {
|
139
|
+
waveSelector: isZoomSmall.value ? options.waveSelectorSmall : options.waveSelector,
|
140
|
+
waveProps: {
|
141
|
+
widthRatio: isZoomSmall.value ? 0.4 : 0.5,
|
142
|
+
lineCount: isZoomSmall.value ? 3 : 30,
|
143
|
+
minHeight: isZoomSmall.value ? 4 : 2
|
144
|
+
}
|
145
|
+
});
|
146
|
+
};
|
147
|
+
const initStartWaveView = async () => {
|
148
|
+
var _a;
|
149
|
+
initAudioTiming();
|
150
|
+
await promiseTimeout(50);
|
151
|
+
(_a = props.startWaveViewMethod) == null ? void 0 : _a.call(props, {
|
152
|
+
waveSelector: options.waveSelector
|
153
|
+
});
|
154
|
+
};
|
155
|
+
return {
|
156
|
+
isActive,
|
157
|
+
isWarning,
|
158
|
+
formattedTime,
|
159
|
+
isCountFinished,
|
160
|
+
isCountActive,
|
161
|
+
isZoomSmall,
|
162
|
+
pause,
|
163
|
+
btnDisabled,
|
164
|
+
handleEnd,
|
165
|
+
handlePause,
|
166
|
+
handlePlay,
|
167
|
+
handleZoom,
|
168
|
+
setWarningState,
|
169
|
+
startWarningTimer,
|
170
|
+
initStartWaveView,
|
171
|
+
cleanupState,
|
172
|
+
handleHeightChange
|
173
|
+
};
|
174
|
+
}
|
175
|
+
|
176
|
+
export { useChartAudioContext };
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { openBlock, createElementBlock, createElementVNode } from 'vue';
|
2
|
+
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
|
3
|
+
|
4
|
+
const _sfc_main = {};
|
5
|
+
const _hoisted_1 = {
|
6
|
+
t: "1709016977682",
|
7
|
+
class: "icon",
|
8
|
+
viewBox: "0 0 1024 1024",
|
9
|
+
version: "1.1",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
11
|
+
"p-id": "33595",
|
12
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
13
|
+
width: "32",
|
14
|
+
height: "32"
|
15
|
+
};
|
16
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
|
17
|
+
d: "M512 432.448l353.92-353.92a56.128 56.128 0 0 1 96 39.68 56.192 56.192 0 0 1-16.448 39.808L591.552 512l353.92 353.92a56.192 56.192 0 1 1-79.552 79.552L512 591.552l-353.92 353.92a56.128 56.128 0 0 1-96-39.68c0-14.976 5.888-29.312 16.448-39.808L432.448 512l-353.92-353.92a56.128 56.128 0 0 1 39.68-96c14.976 0 29.312 5.888 39.808 16.448L512 432.448z",
|
18
|
+
"p-id": "33596"
|
19
|
+
}, null, -1);
|
20
|
+
const _hoisted_3 = [_hoisted_2];
|
21
|
+
function _sfc_render(_ctx, _cache) {
|
22
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
|
23
|
+
}
|
24
|
+
var CloseSvg = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "Close.vue"]]);
|
25
|
+
|
26
|
+
export { CloseSvg as default };
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { openBlock, createElementBlock, createStaticVNode } from 'vue';
|
2
|
+
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
|
3
|
+
|
4
|
+
const _sfc_main = {};
|
5
|
+
const _hoisted_1 = {
|
6
|
+
width: "32px",
|
7
|
+
height: "32.3232323px",
|
8
|
+
viewBox: "0 0 32 32.3232323",
|
9
|
+
version: "1.1",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
11
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
12
|
+
};
|
13
|
+
const _hoisted_2 = /* @__PURE__ */ createStaticVNode('<g id="\u7535\u5B50\u75C5\u5386" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="\u753B\u677F" transform="translate(-1430, -727)"><g id="\u7F16\u7EC4-10" transform="translate(111, 186)"><g id="\u7F16\u7EC4-9" transform="translate(1136, 532)"><g id="\u7EE7\u7EED\u5F55\u97F3" transform="translate(183, 9)"><ellipse id="\u692D\u5706\u5F62" fill-opacity="0.08" fill="#5F58E0" cx="16" cy="16.1616162" rx="16" ry="16.1616162"></ellipse><g id="\u7F16\u7EC4" transform="translate(10.4, 8.0808)" fill="#464646"><path d="M12.1419265,9.33720245 L2.22486107,15.9250123 C1.56119513,16.3700919 0.663665944,16.16807 0.233863237,15.4799327 C0.0774276935,15.236875 0,14.9543599 0,14.6718448 L0,1.49622514 C0,0.686559003 0.663665944,0 1.44426351,0 C1.71763067,0 1.99099783,0.0804931245 2.22486107,0.24305767 L12.1419265,6.83086751 C12.8055924,7.27594714 13.0015319,8.20556381 12.5717292,8.89212282 C12.4532174,9.05468736 12.3362858,9.21567361 12.1419265,9.33720245 L12.1419265,9.33720245 Z" id="\u8DEF\u5F84"></path></g></g></g></g></g></g>', 1);
|
14
|
+
const _hoisted_3 = [_hoisted_2];
|
15
|
+
function _sfc_render(_ctx, _cache) {
|
16
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
|
17
|
+
}
|
18
|
+
var ContinueSvg = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "Continue.vue"]]);
|
19
|
+
|
20
|
+
export { ContinueSvg as default };
|