|
|
@@ -2,21 +2,24 @@
|
|
|
<div class="message_overview">
|
|
|
<!-- 左侧:产品概览与最新状态 -->
|
|
|
<div class="left_panel hide_scrollbar">
|
|
|
- <div class="product_list">
|
|
|
- <template v-for="(item,index) in productsStatus" :key="item.id" >
|
|
|
+ <div v-if="productDataList?.length > 0" class="product_list">
|
|
|
+ <template v-for="(item,index) in productDataList" :key="item.productId" >
|
|
|
<div class="list_item">
|
|
|
- <div class="item_title">{{item.name}}</div>
|
|
|
- <div class="item_info">跟进次数:{{item.followupTimes}}</div>
|
|
|
+ <div class="item_title">{{item.productName}}</div>
|
|
|
+ <div class="item_info">跟进次数:{{item.count}}</div>
|
|
|
</div>
|
|
|
- <div v-if="index !== (productsStatus?.length - 1)" class="page_solid_line" />
|
|
|
+ <div v-if="index !== (productDataList?.length - 1)" class="page_solid_line" />
|
|
|
</template>
|
|
|
</div>
|
|
|
+ <div v-else class="no_data_bg">
|
|
|
+ <span>暂无数据</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 中间:搜索与 我的跟进 -->
|
|
|
<div class="center_panel">
|
|
|
<div class="page_content hide_scrollbar">
|
|
|
- <SearchBlock :searchList="ongoingFollowSearchList"></SearchBlock>
|
|
|
+ <SearchBlock :searchList="historyFollowSearchList" @searchChange="HandleSearchChange"></SearchBlock>
|
|
|
<FollowCard v-if="finalRenderData?.length > 0" style="margin-top: 16px;" :cardList="finalRenderData">
|
|
|
<template #operation="{row}">
|
|
|
<i></i>
|
|
|
@@ -63,39 +66,34 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref,computed } from 'vue';
|
|
|
+import { ref,computed,onMounted } from 'vue';
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
+import { useStore } from 'vuex';
|
|
|
+
|
|
|
import SearchBlock from '@/baseComponents/SearchBlock.vue';
|
|
|
-import { ongoingFollowSearchList } from './searchBlock';
|
|
|
+import { historyFollowSearchList } from './searchBlock';
|
|
|
import FollowCard from '@/components/FollowCard.vue';
|
|
|
import Pagination from '@/baseComponents/Pagination.vue';
|
|
|
|
|
|
+import {
|
|
|
+ getHighSeasCustomerDetailApi,
|
|
|
+} from '@/api/highSeasCustomer'
|
|
|
|
|
|
interface ProductStatusItm {
|
|
|
- id:string,
|
|
|
- name:string,
|
|
|
- followupTimes:string
|
|
|
+ productId:string,
|
|
|
+ productName:string,
|
|
|
+ count:string
|
|
|
}
|
|
|
-const productsStatus = ref<ProductStatusItm[]>([
|
|
|
- {
|
|
|
- id:'1',
|
|
|
- name: '大数据精准教学',
|
|
|
- followupTimes: '6次',
|
|
|
- },
|
|
|
- {
|
|
|
- id:'2',
|
|
|
- name: '智能判分系统',
|
|
|
- followupTimes: '6次',
|
|
|
- },
|
|
|
- {
|
|
|
- id:'3',
|
|
|
- name: '材料采集系统',
|
|
|
- followupTimes: '6次',
|
|
|
- },
|
|
|
-]);
|
|
|
-
|
|
|
-
|
|
|
-// 进行中的跟进记录
|
|
|
-const ongoingFollowRecord = ref([
|
|
|
+
|
|
|
+const route = useRoute()
|
|
|
+const store = useStore()
|
|
|
+
|
|
|
+// 左侧列表的跟进产品统计
|
|
|
+const productDataList = ref<ProductStatusItm[]>([]);
|
|
|
+
|
|
|
+
|
|
|
+// 历史跟进记录
|
|
|
+const historyFollowRecord = ref([
|
|
|
{
|
|
|
id:'1',
|
|
|
followUpTime: '26-02-19 19:00',
|
|
|
@@ -134,7 +132,7 @@ const ongoingFollowRecord = ref([
|
|
|
}
|
|
|
])
|
|
|
const finalRenderData = computed(()=>{
|
|
|
- return ongoingFollowRecord.value.map(item=>{
|
|
|
+ return historyFollowRecord.value.map(item=>{
|
|
|
|
|
|
let headerTags = []
|
|
|
if(item.followUpStatus){
|
|
|
@@ -160,6 +158,70 @@ const finalRenderData = computed(()=>{
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// 历史跟进 数据总览
|
|
|
+const historyFollowData = ref({
|
|
|
+ hsitoryProductNum:0,
|
|
|
+ historyPeopleNum:0,
|
|
|
+ followTimes:0,
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 1. 筛选项列表有关的动态数据及操作
|
|
|
+ */
|
|
|
+// 获取产品列表
|
|
|
+const GetProductOption = async()=>{
|
|
|
+ await store.dispatch('updateProductList')
|
|
|
+ let productOptions = store.state.productList
|
|
|
+ historyFollowSearchList.value = historyFollowSearchList.value.map(item=>{
|
|
|
+ if(item.key == 'product'){
|
|
|
+ item.options = [
|
|
|
+ {
|
|
|
+ label:'全部',
|
|
|
+ value:'all'
|
|
|
+ },
|
|
|
+ ...productOptions
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 获取跟进状态列表
|
|
|
+const GetFollowUpOption = async()=>{
|
|
|
+ await store.dispatch('updateFollowUpStatus')
|
|
|
+ let followUpOption = store.state.followUpStatus
|
|
|
+ historyFollowSearchList.value = historyFollowSearchList.value.map(item=>{
|
|
|
+ if(item.key == 'status'){
|
|
|
+ item.options = [
|
|
|
+ {
|
|
|
+ label:'全部',
|
|
|
+ value:'all'
|
|
|
+ },
|
|
|
+ ...followUpOption
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 筛选项变更触发的查询 —— 待完善
|
|
|
+const searchParams = ref({})
|
|
|
+const HandleSearchChange = (params,key)=>{
|
|
|
+ searchParams.value = {
|
|
|
+ ...searchParams.value,
|
|
|
+ ...params,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 2. 列表分页参数及相关操作 ——待完善
|
|
|
+ */
|
|
|
const currentPage = ref(1)
|
|
|
const pageSize = ref(20)
|
|
|
const totalNum = ref(0)
|
|
|
@@ -167,19 +229,51 @@ const handlePaginationChange = (params)=>{
|
|
|
const {type,val} = params
|
|
|
if(type == 'currentPage'){
|
|
|
currentPage.value = val
|
|
|
- }else if(type == 'pageSize'){
|
|
|
- pageSize.value = val
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-// 历史跟进 数据总览
|
|
|
-const historyFollowData = ref({
|
|
|
- hsitoryProductNum:10,
|
|
|
- historyPeopleNum:2,
|
|
|
- followTimes:8,
|
|
|
-})
|
|
|
+// 获取联系人详情页面的有关数据———— 待完善
|
|
|
+const GetHighSeasCustomerDetail = async ()=>{
|
|
|
+ let params = {
|
|
|
+ customerId: route.query.id, // 主id
|
|
|
+ // "startDatetime": "", //信息概览 跟进记录筛选参数
|
|
|
+ // "endDatetime": "", // 信息概览 跟进记录筛选参数
|
|
|
+ "positionId": 0, // 信息概览 的筛选参数 —— 职位id
|
|
|
+ "productId": 0, // 产品id —— 信息概览 的筛选参数
|
|
|
+ "followId": 0,
|
|
|
+ "userId": 0,
|
|
|
+ pageNum:currentPage.value,
|
|
|
+ pageSize:pageSize.value
|
|
|
+ }
|
|
|
+
|
|
|
+ let res = await getHighSeasCustomerDetailApi(params)
|
|
|
+ if(res?.code == 200){
|
|
|
+ const {followOverViewData,productData} = res?.data
|
|
|
+ historyFollowData.value = {
|
|
|
+ hsitoryProductNum:followOverViewData.historyProductCount,
|
|
|
+ historyPeopleNum:followOverViewData.historyPersonCount,
|
|
|
+ followTimes:followOverViewData.historyFollowCount,
|
|
|
+ }
|
|
|
+
|
|
|
+ productDataList.value = productData?.map(item=>{
|
|
|
+ return {
|
|
|
+ productId:item.productId,
|
|
|
+ productName:item.productName,
|
|
|
+ count:item.count,
|
|
|
+ }
|
|
|
+ }) || []
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+onMounted(async ()=>{
|
|
|
+ await GetProductOption()
|
|
|
+ await GetFollowUpOption()
|
|
|
+
|
|
|
+ await GetHighSeasCustomerDetail()
|
|
|
+})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
@@ -236,6 +330,16 @@ const historyFollowData = ref({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .no_data_bg{
|
|
|
+ border: 1px solid #EBEEF5;
|
|
|
+ height: 150px;
|
|
|
+ background-position: 50% 10px;
|
|
|
+ background-size: 200px auto;
|
|
|
+ min-height: 150px;
|
|
|
+ span{
|
|
|
+ margin-top: 110px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 中间栏样式
|
|
|
@@ -275,10 +379,6 @@ const historyFollowData = ref({
|
|
|
// 右侧栏样式
|
|
|
.right_panel {
|
|
|
width: 320px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-between;
|
|
|
- gap: 16px;
|
|
|
.history_statistics{
|
|
|
padding:16px 14px 12px 16px;
|
|
|
background: #F8FAFE;
|
|
|
@@ -297,6 +397,7 @@ const historyFollowData = ref({
|
|
|
|
|
|
.stat_numbers{
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
gap:10px;
|
|
|
align-items: center;
|
|
|
|
|
|
@@ -304,7 +405,9 @@ const historyFollowData = ref({
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
+ gap:4px;
|
|
|
color: #666666;
|
|
|
+ padding:0 12px;
|
|
|
|
|
|
.num{
|
|
|
font-weight: 600;
|