| | |
| | | <a-upload |
| | | ref="uploadRef" |
| | | :file-list="uploadList" |
| | | :disabled="loading1" |
| | | multiple |
| | | :custom-request="customRequest" |
| | | style="font-size: 24px;"> |
| | |
| | | const dialogId = ref(""); |
| | | const chatDis = ref(false); |
| | | const loading = ref(false); |
| | | const loading1= ref(false); |
| | | const agentType = ref("1"); |
| | | const agentTitle = ref("未命名会话"); |
| | | let chatObj = reactive({}); |
| | |
| | | }; |
| | | // 上传文件 |
| | | const customRequest = async(option) => { |
| | | loading1.value=true; |
| | | const {onProgress, onError, onSuccess, fileItem, name} = option |
| | | |
| | | const { code, data } = await getSessionDetailsApi(activeSessionId.value); |
| | |
| | | if (fileItem.file) { |
| | | const formData = new FormData(); |
| | | formData.append('file', fileItem.file); |
| | | formData.append('conversation_id', data.dialog_id); |
| | | formData.append('conversation_id', data.id); |
| | | uploadWithoutKb(formData).then((res) => { |
| | | console.log(res); |
| | | uploadList.value = []; |
| | | if (res.code == 0) { |
| | | if (res.code == 200) { |
| | | console.log(res); |
| | | |
| | | loading1.value=false; |
| | | } |
| | | }); |
| | | } |