parent
39c073ccef
commit
66067d00f0
@ -1,66 +1,66 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
export interface BiRankRespVO {
|
export interface StatisticsRankRespVO {
|
||||||
count: number
|
count: number
|
||||||
nickname: string
|
nickname: string
|
||||||
deptName: string
|
deptName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 排行 API
|
// 排行 API
|
||||||
export const RankApi = {
|
export const StatisticsRankApi = {
|
||||||
// 获得合同排行榜
|
// 获得合同排行榜
|
||||||
getContractPriceRank: (params: any) => {
|
getContractPriceRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-contract-price-rank',
|
url: '/crm/statistics-rank/get-contract-price-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获得回款排行榜
|
// 获得回款排行榜
|
||||||
getReceivablePriceRank: (params: any) => {
|
getReceivablePriceRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-receivable-price-rank',
|
url: '/crm/statistics-rank/get-receivable-price-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 签约合同排行
|
// 签约合同排行
|
||||||
getContractCountRank: (params: any) => {
|
getContractCountRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-contract-count-rank',
|
url: '/crm/statistics-rank/get-contract-count-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 产品销量排行
|
// 产品销量排行
|
||||||
getProductSalesRank: (params: any) => {
|
getProductSalesRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-product-sales-rank',
|
url: '/crm/statistics-rank/get-product-sales-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 新增客户数排行
|
// 新增客户数排行
|
||||||
getCustomerCountRank: (params: any) => {
|
getCustomerCountRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-customer-count-rank',
|
url: '/crm/statistics-rank/get-customer-count-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 新增联系人数排行
|
// 新增联系人数排行
|
||||||
getContactsCountRank: (params: any) => {
|
getContactsCountRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-contacts-count-rank',
|
url: '/crm/statistics-rank/get-contacts-count-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跟进次数排行
|
// 跟进次数排行
|
||||||
getFollowCountRank: (params: any) => {
|
getFollowCountRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-follow-count-rank',
|
url: '/crm/statistics-rank/get-follow-count-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跟进客户数排行
|
// 跟进客户数排行
|
||||||
getFollowCustomerCountRank: (params: any) => {
|
getFollowCustomerCountRank: (params: any) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/crm/bi-rank/get-follow-customer-count-rank',
|
url: '/crm/statistics-rank/get-follow-customer-count-rank',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'ContactsCountRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getContactsCountRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getContactsCountRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'ContractCountRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getContractCountRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getContractCountRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'ContractPriceRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getContractPriceRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getContractPriceRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'CustomerCountRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getCustomerCountRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getCustomerCountRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCountRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getFollowCountRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getFollowCountRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCustomerCountRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getFollowCustomerCountRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getFollowCustomerCountRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'ProductSalesRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getProductSalesRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getProductSalesRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { EChartsOption } from 'echarts'
|
||||||
import { clone } from 'lodash-es'
|
import { clone } from 'lodash-es'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ defineOptions({ name: 'ReceivablePriceRank' })
|
|||||||
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
const props = defineProps<{ queryParams: any }>() // 搜索参数
|
||||||
|
|
||||||
const loading = ref(false) // 加载中
|
const loading = ref(false) // 加载中
|
||||||
const list = ref<BiRankRespVO[]>([]) // 列表的数据
|
const list = ref<StatisticsRankRespVO[]>([]) // 列表的数据
|
||||||
|
|
||||||
/** 柱状图配置:横向 */
|
/** 柱状图配置:横向 */
|
||||||
const echartsOption = reactive<EChartsOption>({
|
const echartsOption = reactive<EChartsOption>({
|
||||||
@ -81,7 +81,7 @@ const echartsOption = reactive<EChartsOption>({
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
// 1. 加载排行数据
|
// 1. 加载排行数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const rankingList = await RankApi.getReceivablePriceRank(props.queryParams)
|
const rankingList = await StatisticsRankApi.getReceivablePriceRank(props.queryParams)
|
||||||
// 2.1 更新 Echarts 数据
|
// 2.1 更新 Echarts 数据
|
||||||
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
if (echartsOption.dataset && echartsOption.dataset['source']) {
|
||||||
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
echartsOption.dataset['source'] = clone(rankingList).reverse()
|
@ -90,7 +90,7 @@ import * as DeptApi from '@/api/system/dept'
|
|||||||
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
|
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
defineOptions({ name: 'CrmBiRank' })
|
defineOptions({ name: 'CrmStatisticsRank' })
|
||||||
|
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
deptId: useUserStore().getUser.deptId,
|
deptId: useUserStore().getUser.deptId,
|
Loading…
Reference in New Issue
Block a user