feat: 对话逻辑调整、历史对话接口联调
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { deleteTask, deleteBatchTasks } from '@/api/all/common';
|
||||
import { deleteHistoryItem } from '@/api/all/chat';
|
||||
import icon1 from '@/assets/img/media-account/icon-warn-1.png';
|
||||
|
||||
const emits = defineEmits(['update', 'close', 'batchUpdate']);
|
||||
@ -32,6 +32,7 @@ function onClose() {
|
||||
}
|
||||
|
||||
const open = (record) => {
|
||||
console.log({record})
|
||||
const { id = null } = record;
|
||||
chatId.value = id;
|
||||
|
||||
@ -39,7 +40,7 @@ const open = (record) => {
|
||||
};
|
||||
|
||||
async function onDelete() {
|
||||
const { code } = await deleteTask(chatId.value);
|
||||
const { code } = await deleteHistoryItem(chatId.value);
|
||||
if (code === 200) {
|
||||
AMessage.success('删除成功');
|
||||
emits('delete', chatId.value);
|
||||
|
||||
Reference in New Issue
Block a user