CRM: 完善用户画像数据统计
This commit is contained in:
parent
64af029c86
commit
2d7bab8adb
@ -25,7 +25,7 @@ import {
|
|||||||
StatisticsPortraitApi
|
StatisticsPortraitApi
|
||||||
} from '@/api/crm/statistics/portrait'
|
} from '@/api/crm/statistics/portrait'
|
||||||
|
|
||||||
defineOptions({ name: 'CustomerArea' })
|
defineOptions({ name: 'PortraitCustomerArea' })
|
||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
// 注册地图
|
// 注册地图
|
@ -42,7 +42,7 @@ import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|||||||
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
||||||
import { isEmpty } from '@/utils/is'
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'CustomerIndustry' })
|
defineOptions({ name: 'PortraitCustomerIndustry' })
|
||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
@ -42,7 +42,7 @@ import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|||||||
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
||||||
import { isEmpty } from '@/utils/is'
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'CustomerSource' })
|
defineOptions({ name: 'PortraitCustomerLevel' })
|
||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
@ -42,7 +42,7 @@ import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|||||||
import { isEmpty } from '@/utils/is'
|
import { isEmpty } from '@/utils/is'
|
||||||
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
import { erpCalculatePercentage, getSumValue } from '@/utils'
|
||||||
|
|
||||||
defineOptions({ name: 'CustomerSource' })
|
defineOptions({ name: 'PortraitCustomerSource' })
|
||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
@ -60,20 +60,20 @@
|
|||||||
<el-col>
|
<el-col>
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<!-- 城市分布分析 -->
|
<!-- 城市分布分析 -->
|
||||||
<el-tab-pane label="城市分布分析" lazy name="addressRef">
|
<el-tab-pane label="城市分布分析" lazy name="areaRef">
|
||||||
<CrmStatisticsPortraitCustomerArea ref="addressRef" :query-params="queryParams" />
|
<PortraitCustomerArea ref="areaRef" :query-params="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 客户级别分析 -->
|
<!-- 客户级别分析 -->
|
||||||
<el-tab-pane label="客户级别分析" lazy name="levelRef">
|
<el-tab-pane label="客户级别分析" lazy name="levelRef">
|
||||||
<CrmStatisticsPortraitCustomerLevel ref="levelRef" :query-params="queryParams" />
|
<PortraitCustomerLevel ref="levelRef" :query-params="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 客户来源分析 -->
|
<!-- 客户来源分析 -->
|
||||||
<el-tab-pane label="客户来源分析" lazy name="sourceRef">
|
<el-tab-pane label="客户来源分析" lazy name="sourceRef">
|
||||||
<CrmStatisticsPortraitCustomerSource ref="sourceRef" :query-params="queryParams" />
|
<PortraitCustomerSource ref="sourceRef" :query-params="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 客户行业分析 -->
|
<!-- 客户行业分析 -->
|
||||||
<el-tab-pane label="客户行业分析" lazy name="industryRef">
|
<el-tab-pane label="客户行业分析" lazy name="industryRef">
|
||||||
<CrmStatisticsPortraitCustomerIndustry ref="industryRef" :query-params="queryParams" />
|
<PortraitCustomerIndustry ref="industryRef" :query-params="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -85,10 +85,10 @@ import * as UserApi from '@/api/system/user'
|
|||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
|
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
|
||||||
import { defaultProps, handleTree } from '@/utils/tree'
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
import CrmStatisticsPortraitCustomerArea from './components/CrmStatisticsPortraitCustomerArea.vue'
|
import PortraitCustomerArea from './components/PortraitCustomerArea.vue'
|
||||||
import CrmStatisticsPortraitCustomerIndustry from './components/CrmStatisticsPortraitCustomerIndustry.vue'
|
import PortraitCustomerIndustry from './components/PortraitCustomerIndustry.vue'
|
||||||
import CrmStatisticsPortraitCustomerSource from './components/CrmStatisticsPortraitCustomerSource.vue'
|
import PortraitCustomerSource from './components/PortraitCustomerSource.vue'
|
||||||
import CrmStatisticsPortraitCustomerLevel from './components/CrmStatisticsPortraitCustomerLevel.vue'
|
import PortraitCustomerLevel from './components/PortraitCustomerLevel.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'CrmStatisticsPortrait' })
|
defineOptions({ name: 'CrmStatisticsPortrait' })
|
||||||
|
|
||||||
@ -113,8 +113,8 @@ const userListByDeptId = computed(() =>
|
|||||||
: []
|
: []
|
||||||
)
|
)
|
||||||
|
|
||||||
const activeTab = ref('addressRef') // 活跃标签
|
const activeTab = ref('areaRef') // 活跃标签
|
||||||
const addressRef = ref() // 客户地区分布
|
const areaRef = ref() // 客户地区分布
|
||||||
const levelRef = ref() // 客户级别
|
const levelRef = ref() // 客户级别
|
||||||
const sourceRef = ref() // 客户来源
|
const sourceRef = ref() // 客户来源
|
||||||
const industryRef = ref() // 客户行业
|
const industryRef = ref() // 客户行业
|
||||||
@ -122,8 +122,8 @@ const industryRef = ref() // 客户行业
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
switch (activeTab.value) {
|
switch (activeTab.value) {
|
||||||
case 'addressRef':
|
case 'areaRef':
|
||||||
addressRef.value?.loadData?.()
|
areaRef.value?.loadData?.()
|
||||||
break
|
break
|
||||||
case 'levelRef':
|
case 'levelRef':
|
||||||
levelRef.value?.loadData?.()
|
levelRef.value?.loadData?.()
|
||||||
|
Loading…
Reference in New Issue
Block a user