From 022a757742c70b3106d817461464e821b537e794 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期二, 05 十一月 2024 13:20:40 +0800 Subject: [PATCH] process loading bug;报告 --- src/components/chat/chatComponents/summaryCom/SummaryCom.vue | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/chat/chatComponents/summaryCom/SummaryCom.vue b/src/components/chat/chatComponents/summaryCom/SummaryCom.vue index f158d68..bb0be6c 100644 --- a/src/components/chat/chatComponents/summaryCom/SummaryCom.vue +++ b/src/components/chat/chatComponents/summaryCom/SummaryCom.vue @@ -2,7 +2,7 @@ <div class="w-full space-y-3"> <template v-if="parsedData && parsedData.length > 0"> <template v-for="(item, index) in parsedData" :key="item.id"> - <!-- <el-button v-if="showReportIndex.includes(index)" @click="showAgentReport(index)">鎶ュ憡</el-button> --> + <el-button v-if="showReportIndex.includes(index) && conclusion.length > 0" @click="showAgentReport(index)">鎶ュ憡</el-button> <component ref="componentRef" :id="item.id" @@ -16,7 +16,7 @@ ></component> </template> </template> - <!-- <AmisPageTest /> --> + <ReportDlg v-model="infoDlgIsShow" :report="report" :agentKey="agentKey"></ReportDlg> </div> </template> @@ -25,6 +25,8 @@ import { chatComProps } from '../common'; import { SummaryAnswerType, summaryAnswerTypeMapCom } from './components/types'; // import AmisPageTest from './components/amisPage/AmisPageTest.vue'; + +import ReportDlg from './ReportDlg.vue'; const props = defineProps(chatComProps); const tableLimitHeight = document.body.clientHeight * 0.7; @@ -39,19 +41,19 @@ }); // 闇�瑕佸睍绀� report 鐨� 绱㈠紩 -const showReportIndex = computed(()=>{ +const showReportIndex = computed(() => { const agentKeySet = new Set(); const indexList = []; - parsedData.value.forEach((value,index)=>{ - if(value?.agent_key ){ - if(!agentKeySet.has(value.agent_key)){ + parsedData.value.forEach((value, index) => { + if (value?.agent_key) { + if (!agentKeySet.has(value.agent_key)) { agentKeySet.add(value.agent_key); - indexList.push(index) + indexList.push(index); } } - }) + }); return indexList; -}) +}); const componentRef = ref<any[]>(null); @@ -60,13 +62,19 @@ item?.updateAll(triggerIndex, res); } }; +const infoDlgIsShow = ref(false); +const report = ref(null); +const agentKey = ref(''); + +const conclusion = computed(() => props.originData?.content?.origin?.conclusion ?? []); const showAgentReport = (agentStartIndex) => { const agent = parsedData.value[agentStartIndex]; - const agentKey = agent.agent_key; - - console.log("馃殌 ~ showAgentReport:", props.originData) + agentKey.value = agent.agent_key; + const foundReport = conclusion.value.find((item) => item.agent_key === agentKey.value); + report.value = foundReport; + infoDlgIsShow.value = true; }; </script> <style scoped lang="scss"></style> -- Gitblit v1.9.3