CRM:将 bi 调整成 statistics

(cherry picked from commit 12972cdf5c)
This commit is contained in:
YunaiV 2024-02-24 22:26:10 +08:00 committed by shizhong
parent 39c073ccef
commit 66067d00f0
10 changed files with 35 additions and 35 deletions

View File

@ -1,66 +1,66 @@
import request from '@/config/axios'
export interface BiRankRespVO {
export interface StatisticsRankRespVO {
count: number
nickname: string
deptName: string
}
// 排行 API
export const RankApi = {
export const StatisticsRankApi = {
// 获得合同排行榜
getContractPriceRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-contract-price-rank',
url: '/crm/statistics-rank/get-contract-price-rank',
params
})
},
// 获得回款排行榜
getReceivablePriceRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-receivable-price-rank',
url: '/crm/statistics-rank/get-receivable-price-rank',
params
})
},
// 签约合同排行
getContractCountRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-contract-count-rank',
url: '/crm/statistics-rank/get-contract-count-rank',
params
})
},
// 产品销量排行
getProductSalesRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-product-sales-rank',
url: '/crm/statistics-rank/get-product-sales-rank',
params
})
},
// 新增客户数排行
getCustomerCountRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-customer-count-rank',
url: '/crm/statistics-rank/get-customer-count-rank',
params
})
},
// 新增联系人数排行
getContactsCountRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-contacts-count-rank',
url: '/crm/statistics-rank/get-contacts-count-rank',
params
})
},
// 跟进次数排行
getFollowCountRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-follow-count-rank',
url: '/crm/statistics-rank/get-follow-count-rank',
params
})
},
// 跟进客户数排行
getFollowCustomerCountRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-follow-customer-count-rank',
url: '/crm/statistics-rank/get-follow-customer-count-rank',
params
})
}

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'ContactsCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getContactsCountRank(props.queryParams)
const rankingList = await StatisticsRankApi.getContactsCountRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'ContractCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getContractCountRank(props.queryParams)
const rankingList = await StatisticsRankApi.getContractCountRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'ContractPriceRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getContractPriceRank(props.queryParams)
const rankingList = await StatisticsRankApi.getContractPriceRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'CustomerCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getCustomerCountRank(props.queryParams)
const rankingList = await StatisticsRankApi.getCustomerCountRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getFollowCountRank(props.queryParams)
const rankingList = await StatisticsRankApi.getFollowCountRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCustomerCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getFollowCustomerCountRank(props.queryParams)
const rankingList = await StatisticsRankApi.getFollowCustomerCountRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'ProductSalesRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getProductSalesRank(props.queryParams)
const rankingList = await StatisticsRankApi.getProductSalesRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -18,7 +18,7 @@
</el-card>
</template>
<script setup lang="ts">
import { RankApi, BiRankRespVO } from '@/api/crm/bi/rank'
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
@ -26,7 +26,7 @@ defineOptions({ name: 'ReceivablePriceRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //
const list = ref<BiRankRespVO[]>([]) //
const list = ref<StatisticsRankRespVO[]>([]) //
/** 柱状图配置:横向 */
const echartsOption = reactive<EChartsOption>({
@ -81,7 +81,7 @@ const echartsOption = reactive<EChartsOption>({
const loadData = async () => {
// 1.
loading.value = true
const rankingList = await RankApi.getReceivablePriceRank(props.queryParams)
const rankingList = await StatisticsRankApi.getReceivablePriceRank(props.queryParams)
// 2.1 Echarts
if (echartsOption.dataset && echartsOption.dataset['source']) {
echartsOption.dataset['source'] = clone(rankingList).reverse()

View File

@ -90,7 +90,7 @@ import * as DeptApi from '@/api/system/dept'
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user'
defineOptions({ name: 'CrmBiRank' })
defineOptions({ name: 'CrmStatisticsRank' })
const queryParams = reactive({
deptId: useUserStore().getUser.deptId,