Commit 56aca0f5 by Lin

refactor(receptionCenter): 清理调试信息并重构质量分析组件

- 移除接待中心页面中的冗余调试日志,提升代码整洁性
- 引入 ReceptionQualityAnalysis 组件以替代原有的质检数据展示逻辑
- 优化接待记录列表的监控逻辑,确保更好的性能和可读性
1 parent bbedc131
......@@ -176,12 +176,9 @@ watch(
(): UTSJSONObject[] => receptionRecordList.value,
(list: UTSJSONObject[]): void => {
if (list == null) {
console.log('[receptionCenter] receptionRecordList: null')
return
}
const n = list.length
console.log('[receptionCenter] receptionRecordList length=', n)
console.log('[receptionCenter] receptionRecordList JSON=', JSON.stringify(list))
},
{ immediate: true, deep: true }
);
......@@ -242,7 +239,6 @@ function flattenRecordUrlListToPaths(urlList: RecordData["urlList"]): string[] {
/** ✅ 将本地数据库记录转换为列表行数据 */
function toReceptionListRowFromLocalRecord(rec: RecordData): UTSJSONObject {
console.log('[recrecrecrecrec] toReceptionListRowFromLocalRecord rec=', rec);
// 未提交列表不展示“战败/成交”,因此 orderFinishFlag 置空让角标隐藏。
return {
batchId: rec.id,
......@@ -264,7 +260,6 @@ function toReceptionListRowFromLocalRecord(rec: RecordData): UTSJSONObject {
async function getLocalUnsubmittedReceptionRecords(): Promise<UTSJSONObject[]> {
// ✅ 返回所有未提交记录(已完成 + 临时),子组件根据 Tab 状态自行过滤
const recorder = recordService.getRecorder();
console.log('[receptionCenter] getLocalUnsubmittedReceptionRecords getRecorder=', recorder);
if (recorder != null) {
console.log('[receptionCenter] getLocalUnsubmittedReceptionRecords TempRecord.currentRecord=', recorder.currentRecord);
}
......
......@@ -160,8 +160,8 @@ watch(
return
}
const n = list.length
console.log('[ListReception] currentDisplayList length=', n)
console.log('[ListReception] currentDisplayList JSON=', JSON.stringify(list))
// console.log('[ListReception] currentDisplayList length=', n)
// console.log('[ListReception] currentDisplayList JSON=', JSON.stringify(list))
},
{ immediate: true, deep: true }
)
......
/**
* 接待详情页 — 质检维度(qualityRows)本地模拟数据与开关。
* 字段与 pickQualityRowsFromResponse 及 receptionDetail 中 dim*、conversationBlocks 消费逻辑对齐。
*/
/** 为 true 时 receptionDetail 跳过 findCheckResultByBatchId,直接使用 buildMockQualityRows() */
export const USE_MOCK_QUALITY_ROWS = true;
/**
* 质检维度模拟数据。
* - 维度:tagGroupName、formatScore 或 score+sumScore、matchedText/tagName、matchedClass、scriptRec、conversationDetailDTOList
* - 对话行:content/text/message、role/speakerType、mergedOffset/timeStr、scriptRec(行内话术推荐)
*/
export function buildMockQualityRows(): UTSJSONObject[] {
const lineSale1 = {} as UTSJSONObject;
lineSale1["content"] = "您好,今天主要想了解哪一类车型?";
lineSale1["role"] = "sale";
lineSale1["mergedOffset"] = 5.2;
lineSale1["scriptRec"] = "建议补充询问预算区间与用车场景,便于后续精准推荐。";
const lineClient1 = {} as UTSJSONObject;
lineClient1["content"] = "我想看看 SUV,预算二十万左右,家用为主。";
lineClient1["role"] = "customer";
lineClient1["mergedOffset"] = 12.0;
const convDim1: UTSJSONObject[] = [];
convDim1.push(lineSale1);
convDim1.push(lineClient1);
const dim1 = {} as UTSJSONObject;
dim1["tagGroupName"] = "需求挖掘";
dim1["formatScore"] = "85/100";
dim1["matchedText"] = "已命中";
dim1["matchedClass"] = "hit";
dim1["conversationDetailDTOList"] = convDim1;
const lineSale2 = {} as UTSJSONObject;
lineSale2["text"] = "这款车全系标配 L2 辅助驾驶和全景影像,同级里配置很有竞争力。";
lineSale2["speakerType"] = 0;
lineSale2["mergedOffset"] = 48.0;
lineSale2["timeStr"] = "00:48";
const convDim2: UTSJSONObject[] = [];
convDim2.push(lineSale2);
const dim2 = {} as UTSJSONObject;
dim2["tagGroupName"] = "产品介绍";
dim2["score"] = 72;
dim2["sumScore"] = 100;
dim2["tagName"] = "部分达成";
dim2["matchedClass"] = "";
dim2["conversationDetailDTOList"] = convDim2;
const scriptRecList = [] as any[];
scriptRecList.push("可先复述客户异议点,再用试驾体验与售后政策化解顾虑。");
scriptRecList.push("若纠结价格,可对比同级车型的金融方案与残值保障。");
const dim3 = {} as UTSJSONObject;
dim3["tagGroupName"] = "异议处理";
dim3["formatScore"] = "—";
dim3["matchedText"] = "未命中";
dim3["matchedClass"] = "";
dim3["conversationDetailDTOList"] = [] as UTSJSONObject[];
dim3["scriptRec"] = scriptRecList;
const out: UTSJSONObject[] = [];
out.push(dim1);
out.push(dim2);
out.push(dim3);
return out;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!