From 2487e3dbbc00316b56a9c7c74869081aaf23b11a Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Tue, 20 May 2025 16:59:13 +0800 Subject: [PATCH] fix --- src/component/home/newProject/index.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/component/home/newProject/index.vue b/src/component/home/newProject/index.vue index 3a363aaa..70454269 100644 --- a/src/component/home/newProject/index.vue +++ b/src/component/home/newProject/index.vue @@ -18,7 +18,7 @@
- +
@@ -134,7 +134,10 @@ export default defineComponent({ const sendChat = ()=>{ if(!data.chatContent)return data.loadingShow = true - Https.axiosGet(Https.httpUrls.chatCreateProject, {params:{prompt:data.chatContent,process:data.selectFlow.value}}).then((rv)=>{ + let fileList = JSON.parse(JSON.stringify(data.filList)) + let fileUrl = (fileList.filter((item:any)=>item.type == 'file').length > 0) ? fileList.filter((item:any)=>item.type == 'file')[0].minioPath : '' + let imageUrlList = (fileList.filter((item:any)=>item.type == 'image').length > 0)? fileList.filter((item:any)=>item.type == 'image').map((item:any)=>item.minioPath).join(',') : '' + Https.axiosGet(Https.httpUrls.chatCreateProject, {params:{prompt:data.chatContent,process:data.selectFlow.value,fileUrl:fileUrl,imageUrlList}}).then((rv)=>{ if(rv){ data.loadingShow = false router.push(`home?history=${rv}`) @@ -188,9 +191,13 @@ export default defineComponent({ } Https.axiosPost(Https.httpUrls.llmUploadFile,formData,config) .then((rv: any) => { - rv.name = event.target.files[0].name - rv.type = type?'image':'file' - data.filList.push(rv) + let obj = { + name:event.target.files[0].name, + type:type?'image':'file', + minioPath:rv[0], + url:rv[1], + } + data.filList.push(obj) data.loadingShow = false } ).catch(rv=>{