feat(销售页面): 优化表单数据显示逻辑并添加二级顶部API
重构RawDataCards组件表单数据显示逻辑,支持两种不同格式的数据源 在sale.vue中添加表单数据加载功能并传递给子组件 添加secondTop.js包含二级顶部页面所需的所有API接口 调整SalesTimelineWithTaskList.vue中的未到课显示文案
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
<div class="section-content">
|
||||
<RawDataCards
|
||||
:selected-contact="selectedContact"
|
||||
:form-info="formInfo"
|
||||
@view-form-data="handleViewFormData"
|
||||
@view-chat-data="handleViewChatData"
|
||||
@view-call-data="handleViewCallData" />
|
||||
@@ -481,6 +482,98 @@ async function getCustomerForm() {
|
||||
const res = await getCustomerFormInfo(params)
|
||||
if(res.code === 200) {
|
||||
formInfo.value = res.data
|
||||
/**
|
||||
* data
|
||||
:
|
||||
{name: "柏媛媛", child_name: "淼淼", child_gender: "女", occupation: "无业", child_education: "高一",…}
|
||||
additional_info
|
||||
:
|
||||
[{topic: "孩子目前是否能正常上学?", answer: "不稳定:经常请假或迟到,断断续续。"},…]
|
||||
0
|
||||
:
|
||||
{topic: "孩子目前是否能正常上学?", answer: "不稳定:经常请假或迟到,断断续续。"}
|
||||
answer
|
||||
:
|
||||
"不稳定:经常请假或迟到,断断续续。"
|
||||
topic
|
||||
:
|
||||
"孩子目前是否能正常上学?"
|
||||
1
|
||||
:
|
||||
{topic: "您当前最困扰的孩子的问题,更接近以下哪种描述?", answer: "比如手机不离手、激烈争吵、破坏规则。"}
|
||||
answer
|
||||
:
|
||||
"比如手机不离手、激烈争吵、破坏规则。"
|
||||
topic
|
||||
:
|
||||
"您当前最困扰的孩子的问题,更接近以下哪种描述?"
|
||||
2
|
||||
:
|
||||
{topic: "面对上述问题,您和孩子的互动模式通常是?", answer: "几乎零交流,像生活在两个世界。"}
|
||||
answer
|
||||
:
|
||||
"几乎零交流,像生活在两个世界。"
|
||||
topic
|
||||
:
|
||||
"面对上述问题,您和孩子的互动模式通常是?"
|
||||
3
|
||||
:
|
||||
{topic: "您认为造成今天这个局面的主要责任在于?", answer: "各方面原因都有,感觉很复杂。"}
|
||||
answer
|
||||
:
|
||||
"各方面原因都有,感觉很复杂。"
|
||||
topic
|
||||
:
|
||||
"您认为造成今天这个局面的主要责任在于?"
|
||||
4
|
||||
:
|
||||
{topic: "此刻,您内心最强烈的感受是?", answer: "内疚和迷茫"}
|
||||
answer
|
||||
:
|
||||
"内疚和迷茫"
|
||||
topic
|
||||
:
|
||||
"此刻,您内心最强烈的感受是?"
|
||||
5
|
||||
:
|
||||
{topic: "您目前最迫切的期望是?", answer: "让他少玩手机,能跟我好好说话。"}
|
||||
answer
|
||||
:
|
||||
"让他少玩手机,能跟我好好说话。"
|
||||
topic
|
||||
:
|
||||
"您目前最迫切的期望是?"
|
||||
child_education
|
||||
:
|
||||
"高一"
|
||||
child_gender
|
||||
:
|
||||
"女"
|
||||
child_name
|
||||
:
|
||||
"淼淼"
|
||||
child_relation
|
||||
:
|
||||
"母亲"
|
||||
created_at
|
||||
:
|
||||
"2025-08-12T10:41:39.798000"
|
||||
mobile
|
||||
:
|
||||
"15061153145"
|
||||
name
|
||||
:
|
||||
"柏媛媛"
|
||||
occupation
|
||||
:
|
||||
"无业"
|
||||
territory
|
||||
:
|
||||
"江苏省 盐城市 滨海县"
|
||||
updated_at
|
||||
:
|
||||
"2025-08-12T10:41:41.534000"
|
||||
*/
|
||||
}
|
||||
} catch (error) {
|
||||
// 静默处理错误
|
||||
@@ -691,8 +784,10 @@ const handleStageSelect = (stage, extraData = null) => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleViewFormData = (contact) => {
|
||||
// TODO: 实现表单数据查看逻辑
|
||||
const handleViewFormData = async (contact) => {
|
||||
// 获取客户表单数据
|
||||
await getCustomerForm();
|
||||
console.log('表单数据已加载:', formInfo.value);
|
||||
};
|
||||
|
||||
const handleViewChatData = (contact) => {
|
||||
|
||||
Reference in New Issue
Block a user