cnhis-design-vue 3.3.1-release.5 → 3.3.2-beta.1
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 +20 -0
- package/es/components/audio-sdk/src/Index.vue.d.ts +20 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +1 -0
- package/es/components/audio-sdk/src/audioSDK.js +11 -3
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue2.js +5 -0
- package/es/components/audio-sdk/src/constants/index.d.ts +1 -0
- package/es/components/audio-sdk/src/constants/index.js +3 -0
- package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recordingModal.js +13 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +17 -1
- package/es/components/card-render/index.d.ts +4 -4
- package/es/components/card-render/src/CardRender.vue.d.ts +4 -4
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +12 -6
- package/es/components/field-editor/index.d.ts +4 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +4 -0
- package/es/components/form-config/index.d.ts +80 -5
- package/es/components/form-config/src/FormConfig.vue.d.ts +80 -5
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +57 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +16 -1
- package/es/components/form-config/src/constants/index.d.ts +2 -1
- package/es/components/form-config/src/constants/index.js +1 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +19 -1
- package/es/components/form-config/src/hooks/useLocale.d.ts +1 -0
- package/es/components/form-config/src/hooks/useLocale.js +1 -0
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue2.js +3 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/input.d.ts +16 -4
- package/es/components/form-render/src/components/renderer/input.js +39 -7
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +3 -0
- 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 +9 -8
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.d.ts +16 -1
- package/es/components/form-render/src/components/renderer/textarea.js +36 -8
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +3 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +4 -3
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.js +5 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -0
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +11 -0
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/form-render/src/utils/index.js +1 -0
- package/es/components/form-render/src/utils/schema.js +60 -15
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/index.d.ts +13 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -2
- package/es/components/iho-table/src/IhoTable.vue2.js +27 -20
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +6 -0
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +0 -3
- package/es/components/info-header/index.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- 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 +5 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +8 -5
- package/es/components/shortcut-setter/index.d.ts +16 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +11 -11
- 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/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/components/CancelRadio/CancelRadio.d.ts +7 -0
- package/es/shared/components/CancelRadio/CancelRadio.js +6 -6
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +76 -77
- package/es/components/ai-chat/index.d.ts +0 -680
- package/es/components/ai-chat/index.js +0 -10
- package/es/components/ai-chat/src/Index.vue.d.ts +0 -682
- package/es/components/ai-chat/src/Index.vue.js +0 -6
- package/es/components/ai-chat/src/Index.vue2.js +0 -175
- package/es/components/ai-chat/src/api/index.d.ts +0 -8
- package/es/components/ai-chat/src/api/index.js +0 -87
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -38
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -103
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +0 -101
- package/es/components/ai-chat/src/components/ChatBI.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +0 -73
- package/es/components/ai-chat/src/components/ChatCard.d.ts +0 -43
- package/es/components/ai-chat/src/components/ChatCard.js +0 -403
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +0 -203
- package/es/components/ai-chat/src/components/ChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +0 -373
- package/es/components/ai-chat/src/components/ChatMain.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMain.js +0 -350
- package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMainDefault.js +0 -278
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +0 -59
- package/es/components/ai-chat/src/components/ChatPatient.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +0 -218
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +0 -45
- package/es/components/ai-chat/src/components/ChatPrompt.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +0 -143
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -57
- package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -190
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
- package/es/components/ai-chat/src/components/card/JsonCard.js +0 -574
- package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/CardRender.js +0 -80
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/FormRender.js +0 -173
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +0 -36
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +0 -96
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +0 -105
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +0 -260
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +0 -18
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +0 -37
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +0 -20
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +0 -48
- package/es/components/ai-chat/src/hooks/index.d.ts +0 -2
- package/es/components/ai-chat/src/hooks/index.js +0 -2
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +0 -18
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +0 -202
- package/es/components/ai-chat/src/hooks/useData.d.ts +0 -77
- package/es/components/ai-chat/src/hooks/useData.js +0 -289
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +0 -38
- package/es/components/ai-chat/src/hooks/useFooterContext.js +0 -218
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -14
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -306
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +0 -9
- package/es/components/ai-chat/src/hooks/useSSE.js +0 -138
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -4
- package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -66
- package/es/components/ai-chat/src/types/index.d.ts +0 -45
- package/es/components/ai-chat/src/types/index.js +0 -1
- package/es/components/ai-chat/src/utils/index.d.ts +0 -7
- package/es/components/ai-chat/src/utils/index.js +0 -41
- package/es/components/ai-chat/style/index.css +0 -1
- package/es/shared/assets/img/ai__avatar.png.js +0 -3
- package/es/shared/assets/img/file-emr.png.js +0 -3
- package/es/shared/assets/img/file.png.js +0 -3
- package/es/shared/assets/img/logo.png.js +0 -3
- package/es/shared/assets/img/use.png.js +0 -3
@@ -1,175 +0,0 @@
|
|
1
|
-
import { defineComponent, provide, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, createElementVNode, createBlock, Fragment, createCommentVNode, withDirectives, vShow, renderSlot } from 'vue';
|
2
|
-
import { NDialogProvider, NButton, NIcon } from 'naive-ui';
|
3
|
-
import ChatMain from './components/ChatMain.js';
|
4
|
-
import ChatFooter from './components/ChatFooter.vue.js';
|
5
|
-
import ChatRight from './components/ChatRight.vue.js';
|
6
|
-
import ChatMainDefault from './components/ChatMainDefault.js';
|
7
|
-
import { CloseOutline } from '@vicons/ionicons5';
|
8
|
-
import { initData, InjectionAIChatData } from './hooks/useData.js';
|
9
|
-
import { useWebsocket } from './hooks/useWebsocket.js';
|
10
|
-
import MobileChatFooter from './components/mobile/MobileChatFooter.vue.js';
|
11
|
-
|
12
|
-
const _hoisted_1 = ["id"];
|
13
|
-
const _hoisted_2 = {
|
14
|
-
class: "chat-right-wrapper"
|
15
|
-
};
|
16
|
-
const _hoisted_3 = {
|
17
|
-
class: "header"
|
18
|
-
};
|
19
|
-
const _hoisted_4 = {
|
20
|
-
class: "content"
|
21
|
-
};
|
22
|
-
const _hoisted_5 = {
|
23
|
-
class: "slot-wrapper"
|
24
|
-
};
|
25
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
26
|
-
__name: "Index",
|
27
|
-
props: {
|
28
|
-
token: {
|
29
|
-
type: String,
|
30
|
-
required: true
|
31
|
-
},
|
32
|
-
userAvatar: {
|
33
|
-
type: String
|
34
|
-
},
|
35
|
-
defaultShortcutList: {
|
36
|
-
type: Array
|
37
|
-
},
|
38
|
-
shortcutList: {
|
39
|
-
type: Array
|
40
|
-
},
|
41
|
-
queryData: {
|
42
|
-
type: Function
|
43
|
-
},
|
44
|
-
queryRecord: {
|
45
|
-
type: Function
|
46
|
-
},
|
47
|
-
hideInput: {
|
48
|
-
type: Boolean
|
49
|
-
},
|
50
|
-
uiStyle: {
|
51
|
-
type: String,
|
52
|
-
default: "default"
|
53
|
-
},
|
54
|
-
audioTimed: {
|
55
|
-
type: Number,
|
56
|
-
default: 10
|
57
|
-
},
|
58
|
-
commandList: {
|
59
|
-
type: Array
|
60
|
-
},
|
61
|
-
queryPrompt: {
|
62
|
-
type: Function
|
63
|
-
},
|
64
|
-
patientInfo: {
|
65
|
-
type: Object
|
66
|
-
},
|
67
|
-
appId: {
|
68
|
-
type: String
|
69
|
-
},
|
70
|
-
immediatelyRecording: {
|
71
|
-
type: Boolean,
|
72
|
-
default: false
|
73
|
-
},
|
74
|
-
isStreamingOutput: {
|
75
|
-
type: Boolean,
|
76
|
-
default: false
|
77
|
-
},
|
78
|
-
showLBtn: {
|
79
|
-
type: Boolean,
|
80
|
-
default: false
|
81
|
-
},
|
82
|
-
disabled: {
|
83
|
-
type: Boolean,
|
84
|
-
default: false
|
85
|
-
},
|
86
|
-
appCode: {
|
87
|
-
type: String
|
88
|
-
},
|
89
|
-
sessionId: {
|
90
|
-
type: String
|
91
|
-
},
|
92
|
-
prologue: {
|
93
|
-
type: String
|
94
|
-
},
|
95
|
-
configs: {
|
96
|
-
type: Object
|
97
|
-
},
|
98
|
-
bpmnProcessIdAndStartToken: {
|
99
|
-
type: String
|
100
|
-
},
|
101
|
-
mobile: {
|
102
|
-
type: Boolean,
|
103
|
-
default: false
|
104
|
-
}
|
105
|
-
},
|
106
|
-
emits: ["button-click", "program"],
|
107
|
-
setup(__props, {
|
108
|
-
expose,
|
109
|
-
emit
|
110
|
-
}) {
|
111
|
-
const props = __props;
|
112
|
-
const data = initData(props, emit);
|
113
|
-
provide(InjectionAIChatData, data);
|
114
|
-
const {
|
115
|
-
cssVars,
|
116
|
-
state,
|
117
|
-
chatMainRef,
|
118
|
-
sessionId
|
119
|
-
} = data;
|
120
|
-
if (props.uiStyle === "default") {
|
121
|
-
useWebsocket(props, data, sessionId);
|
122
|
-
}
|
123
|
-
function onClose() {
|
124
|
-
state.showRight = false;
|
125
|
-
state.showRightSlot = false;
|
126
|
-
}
|
127
|
-
expose({
|
128
|
-
pushMessage: (data2) => {
|
129
|
-
state.externalData = data2;
|
130
|
-
},
|
131
|
-
updatePatientInfo: (info) => {
|
132
|
-
state.selectedPatient = info;
|
133
|
-
},
|
134
|
-
showRight(show) {
|
135
|
-
state.showRight = false;
|
136
|
-
state.showRightSlot = show;
|
137
|
-
}
|
138
|
-
});
|
139
|
-
return (_ctx, _cache) => {
|
140
|
-
return openBlock(), createElementBlock("div", {
|
141
|
-
style: normalizeStyle(unref(cssVars)),
|
142
|
-
class: normalizeClass(["ai-chat", __props.uiStyle === "small" ? "ai-chat--small" : ""])
|
143
|
-
}, [createVNode(unref(NDialogProvider), null, {
|
144
|
-
default: withCtx(() => [createElementVNode("div", {
|
145
|
-
id: unref(state).id,
|
146
|
-
class: "chat-left-wrapper"
|
147
|
-
}, [__props.uiStyle === "default" ? (openBlock(), createBlock(unref(ChatMainDefault), {
|
148
|
-
key: 0,
|
149
|
-
ref_key: "chatMainRef",
|
150
|
-
ref: chatMainRef
|
151
|
-
}, null, 512)) : (openBlock(), createBlock(unref(ChatMain), {
|
152
|
-
key: 1
|
153
|
-
})), !__props.hideInput ? (openBlock(), createElementBlock(Fragment, {
|
154
|
-
key: 2
|
155
|
-
}, [__props.mobile ? (openBlock(), createBlock(MobileChatFooter, {
|
156
|
-
key: 0
|
157
|
-
})) : (openBlock(), createBlock(ChatFooter, {
|
158
|
-
key: 1
|
159
|
-
}))], 64)) : createCommentVNode("v-if", true)], 8, _hoisted_1), withDirectives(createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [withDirectives(createElementVNode("h4", null, "\u95EE\u8BCA\u8BB0\u5F55", 512), [[vShow, unref(state).showRight]]), createVNode(unref(NButton), {
|
160
|
-
quaternary: "",
|
161
|
-
onClick: onClose
|
162
|
-
}, {
|
163
|
-
icon: withCtx(() => [createVNode(unref(NIcon), {
|
164
|
-
size: "20",
|
165
|
-
component: unref(CloseOutline)
|
166
|
-
}, null, 8, ["component"])]),
|
167
|
-
_: 1
|
168
|
-
})]), createElementVNode("div", _hoisted_4, [withDirectives(createVNode(ChatRight, null, null, 512), [[vShow, unref(state).showRight]]), withDirectives(createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "chat-right")], 512), [[vShow, unref(state).showRightSlot]])])], 512), [[vShow, unref(state).showRight || unref(state).showRightSlot]])]),
|
169
|
-
_: 3
|
170
|
-
})], 6);
|
171
|
-
};
|
172
|
-
}
|
173
|
-
});
|
174
|
-
|
175
|
-
export { _sfc_main as default };
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { AnyObject } from '../../../../shared/types';
|
2
|
-
export declare const axiosInstance: import("axios").AxiosInstance;
|
3
|
-
export declare function conversationApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
4
|
-
export declare function deleteApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
5
|
-
export declare function getHistoryRecordApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
6
|
-
export declare function conversationStreamApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
7
|
-
export declare function getSessionMsgApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
8
|
-
export declare function callbackApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
@@ -1,87 +0,0 @@
|
|
1
|
-
import axios from 'axios';
|
2
|
-
import { $message } from '../utils/index.js';
|
3
|
-
|
4
|
-
const axiosInstance = axios.create({
|
5
|
-
withCredentials: true,
|
6
|
-
timeout: 5e3
|
7
|
-
});
|
8
|
-
axiosInstance.interceptors.request.use((config) => {
|
9
|
-
var _a;
|
10
|
-
if ((_a = config.url) == null ? void 0 : _a.includes("/conversation")) {
|
11
|
-
const cloneConfig = {
|
12
|
-
...config
|
13
|
-
};
|
14
|
-
delete cloneConfig.timeout;
|
15
|
-
return cloneConfig;
|
16
|
-
}
|
17
|
-
return config;
|
18
|
-
});
|
19
|
-
axiosInstance.interceptors.response.use((res) => {
|
20
|
-
var _a, _b, _c, _d, _e, _f;
|
21
|
-
if (((_a = res.config.url) == null ? void 0 : _a.includes("/options")) || ((_b = res.config.url) == null ? void 0 : _b.includes("process/start"))) {
|
22
|
-
if ((_c = res.data) == null ? void 0 : _c.success) {
|
23
|
-
return res.data;
|
24
|
-
} else {
|
25
|
-
return {
|
26
|
-
success: false,
|
27
|
-
data: []
|
28
|
-
};
|
29
|
-
}
|
30
|
-
} else {
|
31
|
-
if ((_d = res.data) == null ? void 0 : _d.success) {
|
32
|
-
return (_e = res.data) == null ? void 0 : _e.data;
|
33
|
-
} else {
|
34
|
-
if (!((_f = res.data) == null ? void 0 : _f.success) && res.data.msg) {
|
35
|
-
$message.error(res.data.msg);
|
36
|
-
} else {
|
37
|
-
console.log("\u8BF7\u6C42\u9519\u8BEF");
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
});
|
42
|
-
function conversationApi(params) {
|
43
|
-
return axiosInstance({
|
44
|
-
method: "post",
|
45
|
-
url: "/flow/api/opd/conversation",
|
46
|
-
data: params
|
47
|
-
});
|
48
|
-
}
|
49
|
-
function deleteApi(params) {
|
50
|
-
return axiosInstance({
|
51
|
-
method: "delete",
|
52
|
-
url: `/flow/api/opd/message/${params.messageId}`
|
53
|
-
});
|
54
|
-
}
|
55
|
-
function getHistoryRecordApi(params) {
|
56
|
-
return axiosInstance({
|
57
|
-
method: "get",
|
58
|
-
url: `/flow/api/dialog/${params.sessionId}/messages`,
|
59
|
-
params: {
|
60
|
-
page: params.page || 1,
|
61
|
-
pageSize: params.pageSize || 20
|
62
|
-
}
|
63
|
-
});
|
64
|
-
}
|
65
|
-
function conversationStreamApi(params) {
|
66
|
-
return axiosInstance({
|
67
|
-
method: "post",
|
68
|
-
url: "/flow/ai/api/conversation",
|
69
|
-
data: params
|
70
|
-
});
|
71
|
-
}
|
72
|
-
function getSessionMsgApi(params) {
|
73
|
-
return axiosInstance({
|
74
|
-
method: "get",
|
75
|
-
url: "/flow/ai/api/sessionMsg",
|
76
|
-
params
|
77
|
-
});
|
78
|
-
}
|
79
|
-
function callbackApi(params) {
|
80
|
-
return axiosInstance({
|
81
|
-
method: "post",
|
82
|
-
url: "/flow/ai/api/callback",
|
83
|
-
data: params
|
84
|
-
});
|
85
|
-
}
|
86
|
-
|
87
|
-
export { axiosInstance, callbackApi, conversationApi, conversationStreamApi, deleteApi, getHistoryRecordApi, getSessionMsgApi };
|
@@ -1,38 +0,0 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
2
|
-
show: {
|
3
|
-
type: BooleanConstructor;
|
4
|
-
};
|
5
|
-
}, {
|
6
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
7
|
-
show: {
|
8
|
-
type: BooleanConstructor;
|
9
|
-
};
|
10
|
-
}>> & {
|
11
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
12
|
-
}>>;
|
13
|
-
emit: (event: "update:show", ...args: any[]) => void;
|
14
|
-
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
15
|
-
isWarning: import("vue").Ref<boolean>;
|
16
|
-
isActive: import("vue").Ref<boolean>;
|
17
|
-
handlePlay: () => void;
|
18
|
-
handlePause: () => void;
|
19
|
-
handleEnd: (trigger?: string | undefined) => Promise<void>;
|
20
|
-
formattedTime: import("vue").ComputedRef<string>;
|
21
|
-
warnTime: import("vue").Ref<number>;
|
22
|
-
tip: import("vue").ComputedRef<"未识别录音" | "正在录音中..." | "录音已暂停">;
|
23
|
-
NSpace: any;
|
24
|
-
NButton: any;
|
25
|
-
NIcon: any;
|
26
|
-
StopCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
27
|
-
MicOff: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
28
|
-
AlertCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
30
|
-
show: {
|
31
|
-
type: BooleanConstructor;
|
32
|
-
};
|
33
|
-
}>> & {
|
34
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
35
|
-
}, {
|
36
|
-
show: boolean;
|
37
|
-
}>;
|
38
|
-
export default _default;
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import { defineComponent, ref, computed, withDirectives, openBlock, createElementBlock, normalizeClass, unref, createVNode, createElementVNode, toDisplayString, createCommentVNode, createBlock, vShow, normalizeStyle, withCtx, createTextVNode } from 'vue';
|
2
|
-
import { NIcon, NSpace, NButton } from 'naive-ui';
|
3
|
-
import { AlertCircle, MicOff, StopCircleOutline } from '@vicons/ionicons5';
|
4
|
-
import { useChartAudioContext } from '../hooks/useChartAudioContext.js';
|
5
|
-
|
6
|
-
const _hoisted_1 = {
|
7
|
-
key: 0,
|
8
|
-
class: "warn-top"
|
9
|
-
};
|
10
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("p", null, "\u5F53\u524D\u672A\u53D1\u73B0\u8BED\u97F3\u5F55\u5165\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u6B63\u5728\u5F55\u97F3\uFF01", -1);
|
11
|
-
const _hoisted_3 = {
|
12
|
-
class: "tip"
|
13
|
-
};
|
14
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
15
|
-
__name: "ChatAudio",
|
16
|
-
props: {
|
17
|
-
show: {
|
18
|
-
type: Boolean
|
19
|
-
}
|
20
|
-
},
|
21
|
-
emits: ["update:show"],
|
22
|
-
setup(__props, {
|
23
|
-
emit
|
24
|
-
}) {
|
25
|
-
const props = __props;
|
26
|
-
const audioChartRef = ref();
|
27
|
-
const {
|
28
|
-
isWarning,
|
29
|
-
isActive,
|
30
|
-
handlePlay,
|
31
|
-
handlePause,
|
32
|
-
handleEnd,
|
33
|
-
formattedTime,
|
34
|
-
warnTime
|
35
|
-
} = useChartAudioContext(props, emit, {
|
36
|
-
waveSelector: () => audioChartRef.value
|
37
|
-
});
|
38
|
-
const tip = computed(() => isActive.value ? isWarning.value ? "\u672A\u8BC6\u522B\u5F55\u97F3" : "\u6B63\u5728\u5F55\u97F3\u4E2D..." : "\u5F55\u97F3\u5DF2\u6682\u505C");
|
39
|
-
return (_ctx, _cache) => {
|
40
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
41
|
-
class: normalizeClass(["ai-chat-audio", {
|
42
|
-
["audio--warn"]: unref(isWarning)
|
43
|
-
}])
|
44
|
-
}, [unref(isWarning) ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(NIcon), {
|
45
|
-
size: "24",
|
46
|
-
color: "#FF1818",
|
47
|
-
component: unref(AlertCircle)
|
48
|
-
}, null, 8, ["component"]), _hoisted_2, createElementVNode("span", null, "\uFF08" + toDisplayString(unref(warnTime)) + "s\uFF09", 1)])) : createCommentVNode("v-if", true), withDirectives(createElementVNode("div", null, [unref(isWarning) ? (openBlock(), createBlock(unref(NIcon), {
|
49
|
-
key: 0,
|
50
|
-
size: "75",
|
51
|
-
color: "#FF1818",
|
52
|
-
component: unref(MicOff)
|
53
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true), withDirectives(createElementVNode("div", {
|
54
|
-
ref_key: "audioChartRef",
|
55
|
-
ref: audioChartRef,
|
56
|
-
style: {
|
57
|
-
"width": "300px",
|
58
|
-
"height": "80px"
|
59
|
-
}
|
60
|
-
}, null, 512), [[vShow, !unref(isWarning)]])], 512), [[vShow, unref(isActive)]]), !unref(isActive) ? (openBlock(), createBlock(unref(NIcon), {
|
61
|
-
key: 1,
|
62
|
-
size: "75",
|
63
|
-
color: "#FF1818",
|
64
|
-
component: unref(StopCircleOutline)
|
65
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true), createElementVNode("p", _hoisted_3, toDisplayString(unref(tip)), 1), createElementVNode("h3", {
|
66
|
-
style: normalizeStyle(!unref(isActive) ? "color: #FF1818" : "")
|
67
|
-
}, toDisplayString(unref(formattedTime)), 5), createVNode(unref(NSpace), {
|
68
|
-
"wrap-item": false,
|
69
|
-
size: 15
|
70
|
-
}, {
|
71
|
-
default: withCtx(() => [withDirectives(createVNode(unref(NButton), {
|
72
|
-
size: "large",
|
73
|
-
round: "",
|
74
|
-
onClick: unref(handlePause)
|
75
|
-
}, {
|
76
|
-
default: withCtx(() => [createTextVNode("\u6682\u505C")]),
|
77
|
-
_: 1
|
78
|
-
}, 8, ["onClick"]), [[vShow, unref(isActive)]]), withDirectives(createVNode(unref(NButton), {
|
79
|
-
size: "large",
|
80
|
-
round: "",
|
81
|
-
onClick: unref(handlePlay)
|
82
|
-
}, {
|
83
|
-
default: withCtx(() => [createTextVNode("\u7EE7\u7EED")]),
|
84
|
-
_: 1
|
85
|
-
}, 8, ["onClick"]), [[vShow, !unref(isActive)]]), createVNode(unref(NButton), {
|
86
|
-
size: "large",
|
87
|
-
round: "",
|
88
|
-
color: "#FF1818",
|
89
|
-
onClick: _cache[0] || (_cache[0] = () => unref(handleEnd)("click"))
|
90
|
-
}, {
|
91
|
-
default: withCtx(() => {
|
92
|
-
var _a;
|
93
|
-
return [createTextVNode(((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.77")) || "\u7ED3\u675F")];
|
94
|
-
}),
|
95
|
-
_: 1
|
96
|
-
})]),
|
97
|
-
_: 1
|
98
|
-
})], 2)), [[vShow, __props.show]]);
|
99
|
-
};
|
100
|
-
}
|
101
|
-
});
|
102
|
-
|
103
|
-
export { _sfc_main as default };
|
@@ -1,101 +0,0 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
import { AnyObject } from '../../../../shared/types';
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
4
|
-
show: {
|
5
|
-
type: BooleanConstructor;
|
6
|
-
};
|
7
|
-
data: {
|
8
|
-
type: PropType<AnyObject>;
|
9
|
-
};
|
10
|
-
}, {
|
11
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
12
|
-
show: {
|
13
|
-
type: BooleanConstructor;
|
14
|
-
};
|
15
|
-
data: {
|
16
|
-
type: PropType<AnyObject>;
|
17
|
-
};
|
18
|
-
}>> & {
|
19
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
20
|
-
}>>;
|
21
|
-
_emit: (event: "update:show", ...args: any[]) => void;
|
22
|
-
state: AnyObject;
|
23
|
-
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
24
|
-
templateProps: import("vue").ComputedRef<{
|
25
|
-
config: any;
|
26
|
-
data: any;
|
27
|
-
}>;
|
28
|
-
handleModuleClick: (param: AnyObject) => void;
|
29
|
-
NDrawer: any;
|
30
|
-
NDrawerContent: any;
|
31
|
-
CCardRender: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
32
|
-
config: {
|
33
|
-
type: PropType<{
|
34
|
-
templateStyle?: import("vue").CSSProperties | undefined;
|
35
|
-
templates: AnyObject[];
|
36
|
-
}>;
|
37
|
-
};
|
38
|
-
data: {
|
39
|
-
default: () => {};
|
40
|
-
type: PropType<AnyObject>;
|
41
|
-
};
|
42
|
-
renders: {
|
43
|
-
type: PropType<Record<string, () => import("vue").VNodeChild>>;
|
44
|
-
};
|
45
|
-
}, {
|
46
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
47
|
-
config: {
|
48
|
-
type: PropType<{
|
49
|
-
templateStyle?: import("vue").CSSProperties | undefined;
|
50
|
-
templates: AnyObject[];
|
51
|
-
}>;
|
52
|
-
};
|
53
|
-
data: {
|
54
|
-
default: () => {};
|
55
|
-
type: PropType<AnyObject>;
|
56
|
-
};
|
57
|
-
renders: {
|
58
|
-
type: PropType<Record<string, () => import("vue").VNodeChild>>;
|
59
|
-
};
|
60
|
-
}>> & {
|
61
|
-
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
62
|
-
"onModule-click"?: ((...args: any[]) => any) | undefined;
|
63
|
-
}>>;
|
64
|
-
cssVars: import("vue").ComputedRef<AnyObject>;
|
65
|
-
emit: (event: "button-click" | "module-click", ...args: any[]) => void;
|
66
|
-
style: import("vue").ComputedRef<any>;
|
67
|
-
componentsFieldList: import("vue").ComputedRef<AnyObject[]>;
|
68
|
-
getComponent: typeof import("../../../card-render/src/components").getComponent;
|
69
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("button-click" | "module-click")[], "button-click" | "module-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
70
|
-
config: {
|
71
|
-
type: PropType<{
|
72
|
-
templateStyle?: import("vue").CSSProperties | undefined;
|
73
|
-
templates: AnyObject[];
|
74
|
-
}>;
|
75
|
-
};
|
76
|
-
data: {
|
77
|
-
default: () => {};
|
78
|
-
type: PropType<AnyObject>;
|
79
|
-
};
|
80
|
-
renders: {
|
81
|
-
type: PropType<Record<string, () => import("vue").VNodeChild>>;
|
82
|
-
};
|
83
|
-
}>> & {
|
84
|
-
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
85
|
-
"onModule-click"?: ((...args: any[]) => any) | undefined;
|
86
|
-
}, {
|
87
|
-
data: AnyObject;
|
88
|
-
}>>;
|
89
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
90
|
-
show: {
|
91
|
-
type: BooleanConstructor;
|
92
|
-
};
|
93
|
-
data: {
|
94
|
-
type: PropType<AnyObject>;
|
95
|
-
};
|
96
|
-
}>> & {
|
97
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
98
|
-
}, {
|
99
|
-
show: boolean;
|
100
|
-
}>;
|
101
|
-
export default _default;
|
@@ -1,73 +0,0 @@
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, createCommentVNode } from 'vue';
|
2
|
-
import { NDrawer, NDrawerContent } from 'naive-ui';
|
3
|
-
import CardRender from '../../../card-render/index.js';
|
4
|
-
import { isValidJSON } from '../utils/index.js';
|
5
|
-
import { useData } from '../hooks/useData.js';
|
6
|
-
|
7
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
8
|
-
__name: "ChatBI",
|
9
|
-
props: {
|
10
|
-
show: {
|
11
|
-
type: Boolean
|
12
|
-
},
|
13
|
-
data: {
|
14
|
-
type: Object
|
15
|
-
}
|
16
|
-
},
|
17
|
-
emits: ["update:show"],
|
18
|
-
setup(__props, {
|
19
|
-
emit: _emit
|
20
|
-
}) {
|
21
|
-
const props = __props;
|
22
|
-
const {
|
23
|
-
state,
|
24
|
-
emit
|
25
|
-
} = useData();
|
26
|
-
const templateProps = computed(() => {
|
27
|
-
var _a, _b, _c;
|
28
|
-
const {
|
29
|
-
content = {}
|
30
|
-
} = ((_a = props.data) == null ? void 0 : _a.msgItem) || {};
|
31
|
-
return {
|
32
|
-
config: isValidJSON((_b = content.settings) == null ? void 0 : _b.setting) ? JSON.parse((_c = content.settings) == null ? void 0 : _c.setting) : null,
|
33
|
-
data: content.data
|
34
|
-
};
|
35
|
-
});
|
36
|
-
function handleModuleClick(param) {
|
37
|
-
const {
|
38
|
-
eventName,
|
39
|
-
data
|
40
|
-
} = param;
|
41
|
-
_emit("update:show", false);
|
42
|
-
if (eventName) {
|
43
|
-
emit("button-click", {
|
44
|
-
buttonInfo: data,
|
45
|
-
isBI: true,
|
46
|
-
...props.data
|
47
|
-
});
|
48
|
-
}
|
49
|
-
}
|
50
|
-
return (_ctx, _cache) => {
|
51
|
-
return openBlock(), createBlock(unref(NDrawer), {
|
52
|
-
placement: "bottom",
|
53
|
-
height: "80%",
|
54
|
-
"trap-focus": false,
|
55
|
-
to: "#" + unref(state).id,
|
56
|
-
show: __props.show,
|
57
|
-
onMaskClick: _cache[0] || (_cache[0] = () => _emit("update:show", false))
|
58
|
-
}, {
|
59
|
-
default: withCtx(() => [createVNode(unref(NDrawerContent), null, {
|
60
|
-
default: withCtx(() => [__props.data ? (openBlock(), createBlock(unref(CardRender), mergeProps({
|
61
|
-
key: 0
|
62
|
-
}, unref(templateProps), {
|
63
|
-
onModuleClick: handleModuleClick
|
64
|
-
}), null, 16)) : createCommentVNode("v-if", true)]),
|
65
|
-
_: 1
|
66
|
-
})]),
|
67
|
-
_: 1
|
68
|
-
}, 8, ["to", "show"]);
|
69
|
-
};
|
70
|
-
}
|
71
|
-
});
|
72
|
-
|
73
|
-
export { _sfc_main as default };
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
import { MessageItem } from '../types';
|
3
|
-
import { AnyObject } from '../../../../shared/types';
|
4
|
-
declare const _default: import("vue").DefineComponent<{
|
5
|
-
msgItem: {
|
6
|
-
type: PropType<MessageItem>;
|
7
|
-
default: () => {};
|
8
|
-
};
|
9
|
-
selectParams: {
|
10
|
-
type: PropType<{
|
11
|
-
taskId: string;
|
12
|
-
instructionId: string;
|
13
|
-
}>;
|
14
|
-
};
|
15
|
-
configs: {
|
16
|
-
type: PropType<AnyObject>;
|
17
|
-
};
|
18
|
-
msgId: {
|
19
|
-
type: StringConstructor;
|
20
|
-
};
|
21
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
22
|
-
msgItem: {
|
23
|
-
type: PropType<MessageItem>;
|
24
|
-
default: () => {};
|
25
|
-
};
|
26
|
-
selectParams: {
|
27
|
-
type: PropType<{
|
28
|
-
taskId: string;
|
29
|
-
instructionId: string;
|
30
|
-
}>;
|
31
|
-
};
|
32
|
-
configs: {
|
33
|
-
type: PropType<AnyObject>;
|
34
|
-
};
|
35
|
-
msgId: {
|
36
|
-
type: StringConstructor;
|
37
|
-
};
|
38
|
-
}>> & {
|
39
|
-
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
40
|
-
}, {
|
41
|
-
msgItem: MessageItem;
|
42
|
-
}>;
|
43
|
-
export default _default;
|