diff --git a/src/api/crm/bi/rank.ts b/src/api/crm/bi/rank.ts new file mode 100644 index 00000000..8c7f36e0 --- /dev/null +++ b/src/api/crm/bi/rank.ts @@ -0,0 +1,25 @@ +import request from '@/config/axios' + +export interface BiRankRespVO { + count: number + nickname: string + deptName: string +} + +// 排行 API +export const RankApi = { + // 获得合同排行榜 + getContractPriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-contract-price-rank', + params + }) + }, + // 获得回款排行榜 + getReceivablePriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-receivable-price-rank', + params + }) + } +} diff --git a/src/api/crm/bi/ranking.ts b/src/api/crm/bi/ranking.ts deleted file mode 100644 index d45d6995..00000000 --- a/src/api/crm/bi/ranking.ts +++ /dev/null @@ -1,38 +0,0 @@ -import request from '@/config/axios' - -export interface BiContractRanKingRespVO { - price: number - nickname: string - deptName: string -} - -export interface BiReceivablesRanKingRespVO { - price: number - nickname: string - deptName: string -} - -export interface BiRankReqVO { - deptId: number - orderDate: Date[] - startTime: Date - endTime: Date -} - -// 排行 API -export const RankingStatisticsApi = { - // 获得合同排行榜 - contractAmountRanking: (params: any) => { - return request.get({ - url: '/crm/bi-ranking/contract-ranking', - params - }) - }, - // 获得回款排行榜 - receivablesAmountRanking: (params: any) => { - return request.get({ - url: '/crm/bi-ranking/receivables-ranking', - params - }) - } -} diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 430eab2e..e6bd5b37 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -10,7 +10,9 @@ interface UserVO { id: number avatar: string nickname: string + deptId: number } + interface UserInfoVO { permissions: string[] roles: string[] @@ -26,7 +28,8 @@ export const useUserStore = defineStore('admin-user', { user: { id: 0, avatar: '', - nickname: '' + nickname: '', + deptId: 0 } }), getters: { @@ -73,7 +76,8 @@ export const useUserStore = defineStore('admin-user', { this.user = { id: 0, avatar: '', - nickname: '' + nickname: '', + deptId: 0 } } } diff --git a/src/views/crm/bi/rank/ContractPriceRank.vue b/src/views/crm/bi/rank/ContractPriceRank.vue new file mode 100644 index 00000000..1b12999f --- /dev/null +++ b/src/views/crm/bi/rank/ContractPriceRank.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/views/crm/bi/rank/ReceivablePriceRank.vue b/src/views/crm/bi/rank/ReceivablePriceRank.vue new file mode 100644 index 00000000..9eb83807 --- /dev/null +++ b/src/views/crm/bi/rank/ReceivablePriceRank.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/views/crm/bi/ranking/index.vue b/src/views/crm/bi/rank/index.vue similarity index 62% rename from src/views/crm/bi/ranking/index.vue rename to src/views/crm/bi/rank/index.vue index f3fbfb5d..88bc33e7 100644 --- a/src/views/crm/bi/ranking/index.vue +++ b/src/views/crm/bi/rank/index.vue @@ -1,3 +1,4 @@ + - diff --git a/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue b/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue deleted file mode 100644 index c56d94c7..00000000 --- a/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue +++ /dev/null @@ -1,143 +0,0 @@ - - -