diff --git a/main/manager-web/src/apis/module/agent.js b/main/manager-web/src/apis/module/agent.js index 4d822a40..66126237 100644 --- a/main/manager-web/src/apis/module/agent.js +++ b/main/manager-web/src/apis/module/agent.js @@ -250,4 +250,19 @@ export default { }); }).send(); }, + // 获取指定智能体用户类型聊天记录 + getContentByAudioId(id,callback) { + RequestService.sendRequest() + .url(`${getServiceUrl()}/agent/${id}/chat-history/audio`) + .method('GET') + .success((res) => { + RequestService.clearRequestTime(); + callback(res); + }) + .networkFail(() => { + RequestService.reAjaxFun(() => { + this.getContentByAudioId(id,callback); + }); + }).send(); + }, } diff --git a/main/manager-web/src/components/VoicePrintDialog.vue b/main/manager-web/src/components/VoicePrintDialog.vue index b549f6e2..584c3f3d 100644 --- a/main/manager-web/src/components/VoicePrintDialog.vue +++ b/main/manager-web/src/components/VoicePrintDialog.vue @@ -170,6 +170,19 @@ export default { })); })) } + }, + 'form.audioId'(newVal) { + if (newVal == null || newVal == "") { + return + } + if (this.valueTypeOptions.some(item => item.audioId === newVal)) { + return; + } + api.agent.getContentByAudioId(newVal, ((data) => { + this.valueTypeOptions.push({ + audioId: newVal, content: data.data.data + }) + })) } } };