Merge remote-tracking branch 'origin/feature/v1.3_主agent_rxd' into test

This commit is contained in:
rd
2025-09-01 09:33:23 +08:00
4 changed files with 15 additions and 10 deletions

View File

@ -21,29 +21,28 @@ import icon1 from '@/assets/img/media-account/icon-warn-1.png';
const emits = defineEmits(['update', 'close', 'batchUpdate']); const emits = defineEmits(['update', 'close', 'batchUpdate']);
const visible = ref(false); const visible = ref(false);
const chatId = ref(null); const conversationId = ref(null);
const isBatch = computed(() => Array.isArray(taskId.value)); // const isBatch = computed(() => Array.isArray(taskId.value));
function onClose() { function onClose() {
visible.value = false; visible.value = false;
chatId.value = null; conversationId.value = null;
emits('close'); emits('close');
} }
const open = (record) => { const open = (record) => {
console.log({record})
const { id = null } = record; const { id = null } = record;
chatId.value = id; conversationId.value = id;
visible.value = true; visible.value = true;
}; };
async function onDelete() { async function onDelete() {
const { code } = await deleteHistoryItem(chatId.value); const { code } = await deleteHistoryItem(conversationId.value);
if (code === 200) { if (code === 200) {
AMessage.success('删除成功'); AMessage.success('删除成功');
emits('delete', chatId.value); emits('delete', conversationId.value);
onClose(); onClose();
} }
} }

View File

@ -82,6 +82,12 @@ export default {
const { id } = item; const { id } = item;
handleUserHome({ conversationId: id }); handleUserHome({ conversationId: id });
}; };
const onDeleteConversation = (id) => {
const index = dataSource.value.findIndex((item) => item.id === id);
if (index === -1) return;
dataSource.value.splice(index, 1);
}
expose({ expose({
showDrawer, showDrawer,
@ -107,7 +113,7 @@ export default {
</section> </section>
)} )}
<DeleteChatModal ref={deleteChatModalRef} /> <DeleteChatModal ref={deleteChatModalRef} onDelete={onDeleteConversation}/>
</Drawer> </Drawer>
); );
}, },

View File

@ -412,7 +412,7 @@ export default {
loading={true} loading={true}
tip={`${isTextTab.value ? '文本' : '图片'}检测中`} tip={`${isTextTab.value ? '文本' : '图片'}检测中`}
size={72} size={72}
class="h-298px !flex flex-col justify-center items-center" class="h-298px !flex flex-col justify-center items-center color-#6d4cfe"
/> />
</div> </div>
); );

View File

@ -411,7 +411,7 @@ export default {
loading={true} loading={true}
tip={`${isTextTab.value ? '文本' : '图片'}检测中`} tip={`${isTextTab.value ? '文本' : '图片'}检测中`}
size={72} size={72}
class="h-298px !flex flex-col justify-center items-center" class="h-298px !flex flex-col justify-center items-center color-#6d4cfe"
/> />
</div> </div>
); );