Commit 6d41286e by 胡悦

总览修改

1 parent 58bd2c56
......@@ -5,9 +5,13 @@ export default {
state: {
currentIndex: 0,
follewIndex: 0,
activityId: util.getLocalStorage('dj_scrm_activityId') ? util.getLocalStorage('dj_scrm_activityId') :3,
staffId: util.getLocalStorage('dj_STAFF_ID') ? util.getLocalStorage('dj_STAFF_ID') :363,
followResultList:[],
activityId: util.getLocalStorage('dj_scrm_activityId') ? util.getLocalStorage('dj_scrm_activityId') : 1,
staffId: util.getLocalStorage('dj_STAFF_ID') ? util.getLocalStorage('dj_STAFF_ID') : 334,
followResultList: [],
overviewCountInfo: {
tabPageFollowUpCount: 0,
tabPageResultCount: 0
},
customerInfoList: [
{
id: 508394,
......@@ -135,13 +139,18 @@ export default {
},
['SET_FOLLOE_RESULT_LIST'](state,payload){
state.followResultList = payload.followResultList
},
['SET_OVERVIEW_COUNT_INFO'](state, payload) {
console.log(state, payload)
state.overviewCountInfo = null
state.overviewCountInfo = payload.overviewCountInfo
}
},
actions: {
//设置staffId
getStaffId(conText, payload) {
console.log(22222222)
// conText.commit('SET_STAFF_ID', { staffId: 3 })
console.log(conText, 'conText')
// conText.commit('SET_STAFF_ID', { staffId: conText.state.staffId })
solicitApi.getStaffid(payload).then(res => {
if (res.code == 0) {
conText.commit('SET_STAFF_ID', { staffId: res.data })
......@@ -152,14 +161,32 @@ export default {
}
})
},
// 获取跟进结果字典数据
getFollowDataList(conText, payload) {
var params = {
dictType:'follow_result'
// 获取跟进结果字典数据
getFollowDataList(conText, payload) {
var params = {
dictType:'follow_result'
}
solicitApi.followFindAllDictData(params).then(res => {
conText.commit('SET_FOLLOE_RESULT_LIST', { followResultList: res.data })
})
},
// 获取跟进总数和结果总数
getTaskOverviewData(conText, payload) {
console.log('------这里', )
let params = {
activityId: conText.state.activityId,
staffId: conText.state.staffId
}
solicitApi.taskOverviewData(params).then(({ code, data, message }) => {
if (code == '0') {
conText.commit('SET_OVERVIEW_COUNT_INFO', {
tabPageFollowUpCount: data.tabPageFollowUpCount,
tabPageResultCount: data.tabPageResultCount
})
} else {
Notify(message)
}
solicitApi.followFindAllDictData(params).then(res => {
conText.commit('SET_FOLLOE_RESULT_LIST', { followResultList: res.data })
})
},
})
}
}
}
<!--
* @Description:
* @Author: huyue
* @Date: 2022-05-31 17:23:27
* @LastEditors: huyue
* @LastEditTime: 2022-06-07 18:53:43
-->
<template>
<div class="solicit-container">
<tab :list="['总览', '跟进(5)', '结果(672)']" :index="currentIndex" @change="changeIndex"></tab>
<tab :list="['总览', `跟进(${countData.tabPageFollowUpCount})`, `结果(${countData.tabPageResultCount})`]"
:index="currentIndex" @change="changeIndex"></tab>
<div class="solicit-content">
<overview v-if="currentIndex == 0"></overview>
<overview v-if="currentIndex == 0" @getCountInfo="getCountInfo"></overview>
<follow v-if="currentIndex == 1"></follow>
<result v-if="currentIndex == 2"></result>
</div>
......@@ -12,11 +20,17 @@
import overview from './overview.vue'
import follow from './follow.vue'
import result from './result.vue'
import { mapState, mapMutations, } from 'vuex'
import { mapState, mapMutations } from 'vuex'
export default {
name: 'index',
data() {
return {}
return {
tabList: ['总览', '跟进', '结果'],
countData: {
tabPageFollowUpCount: 0,
tabPageResultCount: 0
}
}
},
components: {
overview,
......@@ -25,19 +39,24 @@ export default {
},
computed: {
...mapState({
currentIndex: state => state.solicit.currentIndex
currentIndex: state => state.solicit.currentIndex,
overviewCountInfo: state => state.solicit.overviewCountInfo
})
},
created() {
},
methods: {
...mapMutations({
SET_TAB_INDEX: 'solicit/SET_TAB_INDEX'
SET_TAB_INDEX: 'solicit/SET_TAB_INDEX',
SET_OVERVIEW_COUNT_INFO: 'solicit/SET_OVERVIEW_COUNT_INFO'
}),
changeIndex(index) {
this.SET_TAB_INDEX({ currentIndex: index })
},
getCountInfo(val) {
console.log(val)
this.SET_OVERVIEW_COUNT_INFO({
overviewCountInfo: val
})
console.log(this.overviewCountInfo)
}
}
}
......
......@@ -4,7 +4,8 @@
<div class="title-info">客户招揽概况</div>
<div class="overview-content">
<template v-if="chart.pieData.length > 0">
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData"></pieChart>
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData">
</pieChart>
</template>
<template v-else>
<empty></empty>
......@@ -110,7 +111,7 @@ export default {
created() {
this.bulletinList = this.$constants.BULLETINLIST
this.getStaffId({
success: res => {
success: res => {
this.getTaskOverviewData()
}
})
......@@ -137,6 +138,10 @@ export default {
this.hideLoading()
if (code == '0') {
this.overviewInfo = data
this.$emit('getCountInfo', {
tabPageFollowUpCount: data.tabPageFollowUpCount,
tabPageResultCount: data.tabPageResultCount
})
this.initChartData()
} else {
Notify(message)
......@@ -180,26 +185,32 @@ export default {
.overview-container {
.overview-wrap {
background: #fff;
.overview-content {
height: 160px;
box-sizing: border-box;
}
.overview-group {
box-sizing: border-box;
}
.bulletin {
height: 236px;
padding: 8px 0 16px 0;
box-sizing: border-box;
flex-wrap: wrap;
&-single {
width: 50%;
height: 98px;
padding-left: 16px;
box-sizing: border-box;
.bulletin-info {
margin-left: 12px;
}
.number {
height: 36px;
line-height: 36px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!