diff --git a/my-vue-app/src/api/secondTop.js b/my-vue-app/src/api/secondTop.js new file mode 100644 index 0000000..1a48390 --- /dev/null +++ b/my-vue-app/src/api/secondTop.js @@ -0,0 +1,60 @@ +import https from '../utils/https' + +// 中心总业绩 /api/v1/level_four/overview/overall_center_performance +export const getOverallCenterPerformance = (params) => { + return https.post('/api/v1/level_four/overview/overall_center_performance', params) +} + +// 活跃组数 /api/v1/level_four/overview/total_group_count +export const getTotalGroupCount = (params) => { + return https.post('/api/v1/level_four/overview/total_group_count', params) +} + +// 中心转化率 /api/v1/level_four/overview/center_conversion_rate +export const getCenterConversionRate = (params) => { + return https.post('/api/v1/level_four/overview/center_conversion_rate', params) +} + +// 中心通话次数 /api/v1/level_four/overview/total_call_count +export const getTotalCallCount = (params) => { + return https.post('/api/v1/level_four/overview/total_call_count', params) +} + +// 新增客户 /api/v1/level_four/overview/new_customer +export const getNewCustomer = (params) => { + return https.post('/api/v1/level_four/overview/new_customer', params) +} + +// 定金转化 /api/v1/level_four/overview/deposit_conversion_rate +export const getDepositConversionRate = (params) => { + return https.post('/api/v1/level_four/overview/deposit_conversion_rate', params) +} + +// 客户类型 /api/v1/level_four/overview/customer_type_distribution +export const getCustomerTypeDistribution = (params) => { + return https.post('/api/v1/level_four/overview/customer_type_distribution', params) +} + +// 客户迫切解决的问题 /api/v1/level_four/overview/urgent_need_to_address +export const getUrgentNeedToAddress = (params) => { + return https.post('/api/v1/level_four/overview/urgent_need_to_address', params) +} + +// 获取高级经理列表 /api/v1/level_four/overview/center_advanced_managers +export const getCenterAdvancedManagerList = (params) => { + return https.post('/api/v1/level_four/overview/center_advanced_managers', params) +} + +// 根据传来的高级经理名字来获取组业绩排名 /api/v1/level_four/overview/team_ranking +export const getTeamRanking = (params) => { + return https.post('/api/v1/level_four/overview/team_ranking', params) +} + +// 根据传来的组名字来获取组业绩详情 /api/v1/level_four/overview/team_ranking_info +export const getTeamRankingInfo = (params) => { + return https.post('/api/v1/level_four/overview/team_ranking_info', params) +} + + + + diff --git a/my-vue-app/src/views/person/components/RawDataCards.vue b/my-vue-app/src/views/person/components/RawDataCards.vue index 7e3df31..debe559 100644 --- a/my-vue-app/src/views/person/components/RawDataCards.vue +++ b/my-vue-app/src/views/person/components/RawDataCards.vue @@ -113,6 +113,10 @@ const props = defineProps({ selectedContact: { type: Object, default: () => ({}) + }, + formInfo: { + type: Object, + default: () => ({}) } }) @@ -121,26 +125,59 @@ const activeTab = ref('chat') // 表单字段数据 const formFields = computed(() => { - const contact = props.selectedContact - if (!contact || !contact.details) { + const formData = props.formInfo + if (!formData || Object.keys(formData).length === 0) { return [ { label: '姓名', value: '暂无数据' }, { label: '联系方式', value: '暂无数据' }, - { label: '意向课程', value: '暂无数据' }, - { label: '预算范围', value: '暂无数据' } + { label: '孩子信息', value: '暂无数据' }, + { label: '地区', value: '暂无数据' } ] } - return [ - { label: '客户姓名', value: contact.name || '暂无' }, - { label: '孩子姓名', value: contact.details.childName || '暂无' }, - { label: '孩子年龄', value: contact.details.childAge ? `${contact.details.childAge}岁` : '暂无' }, - { label: '关注问题', value: contact.details.concerns?.join('、') || '暂无' }, - { label: '预算范围', value: contact.details.budget || '暂无' }, - { label: '偏好时间', value: contact.details.preferredTime || '暂无' }, - { label: '销售阶段', value: contact.salesStage || '暂无' }, - { label: '健康度', value: contact.health ? `${contact.health}%` : '暂无' } + // 检查是否为第一种格式(包含name, mobile等字段) + if (formData.name || formData.mobile || formData.child_name) { + const fields = [ + { label: '客户姓名', value: formData.name || '暂无' }, + { label: '联系方式', value: formData.mobile || '暂无' }, + { label: '孩子姓名', value: formData.child_name || '暂无' }, + { label: '孩子性别', value: formData.child_gender || '暂无' }, + { label: '孩子教育', value: formData.child_education || '暂无' }, + { label: '关系', value: formData.child_relation || '暂无' }, + { label: '职业', value: formData.occupation || '暂无' }, + { label: '地区', value: formData.territory || '暂无' } + ] + + // 如果有additional_info,添加前3个问题 + if (formData.additional_info && Array.isArray(formData.additional_info)) { + formData.additional_info.slice(0, 3).forEach((item, index) => { + fields.push({ + label: `问题${index + 1}`, + value: `${item.topic}: ${item.answer}` + }) + }) + } + + return fields + } + + // 第二种格式(expandXXX字段) + const fields = [ + { label: '孩子姓名', value: formData.expandTwentyNine || '暂无' }, + { label: '孩子性别', value: formData.expandTwentyFive || '暂无' }, + { label: '孩子教育', value: formData.expandTwo || '暂无' }, + { label: '关系', value: formData.expandTwentyOne || '暂无' }, + { label: '职业', value: formData.expandOne || '暂无' }, + { label: '学习状态', value: formData.expandFive || '暂无' }, + { label: '沟通情况', value: formData.expandEight || '暂无' }, + { label: '主要问题', value: formData.expandTwentySeven || '暂无' }, + { label: '关注领域', value: formData.expandFifteen || '暂无' }, + { label: '学习成绩', value: formData.expandFourteen || '暂无' }, + { label: '孩子数量', value: formData.expandTwenty || '暂无' }, + { label: '预期时间', value: formData.expandThirty || '暂无' } ] + + return fields.filter(field => field.value !== '暂无' && field.value !== null) }) // 聊天数据 @@ -371,7 +408,7 @@ const callRecords = computed(() => { .tab-content { min-height: 300px; - max-height: 400px; + max-height: 450px; overflow-y: auto; .content-header { diff --git a/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue b/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue index 3e9f40e..50b47f2 100644 --- a/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue +++ b/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue @@ -78,7 +78,7 @@