feat:【代码优化】减少部分模块的 import * 的 API

This commit is contained in:
YunaiV
2025-10-27 09:13:32 +08:00
parent b7d32e315b
commit d2db16c8c6
16 changed files with 115 additions and 94 deletions

View File

@@ -5,11 +5,18 @@ import { Page } from '@vben/common-ui';
import { Badge, Card, List } from 'ant-design-vue';
import * as ClueApi from '#/api/crm/clue';
import * as ContractApi from '#/api/crm/contract';
import * as CustomerApi from '#/api/crm/customer';
import * as ReceivableApi from '#/api/crm/receivable';
import * as ReceivablePlanApi from '#/api/crm/receivable/plan';
import { getFollowClueCount } from '#/api/crm/clue';
import {
getAuditContractCount,
getRemindContractCount,
} from '#/api/crm/contract';
import {
getFollowCustomerCount,
getPutPoolRemindCustomerCount,
getTodayContactCustomerCount,
} from '#/api/crm/customer';
import { getAuditReceivableCount } from '#/api/crm/receivable';
import { getReceivablePlanRemindCount } from '#/api/crm/receivable/plan';
import { useLeftSides } from './data';
import ClueFollowList from './modules/clue-follow-list.vue';
@@ -64,17 +71,14 @@ function sideClick(item: { menu: string }) {
/** 获取数量 */
async function getCount() {
customerTodayContactCount.value =
await CustomerApi.getTodayContactCustomerCount();
customerPutPoolRemindCount.value =
await CustomerApi.getPutPoolRemindCustomerCount();
customerFollowCount.value = await CustomerApi.getFollowCustomerCount();
clueFollowCount.value = await ClueApi.getFollowClueCount();
contractAuditCount.value = await ContractApi.getAuditContractCount();
contractRemindCount.value = await ContractApi.getRemindContractCount();
receivableAuditCount.value = await ReceivableApi.getAuditReceivableCount();
receivablePlanRemindCount.value =
await ReceivablePlanApi.getReceivablePlanRemindCount();
customerTodayContactCount.value = await getTodayContactCustomerCount();
customerPutPoolRemindCount.value = await getPutPoolRemindCustomerCount();
customerFollowCount.value = await getFollowCustomerCount();
clueFollowCount.value = await getFollowClueCount();
contractAuditCount.value = await getAuditContractCount();
contractRemindCount.value = await getRemindContractCount();
receivableAuditCount.value = await getAuditReceivableCount();
receivablePlanRemindCount.value = await getReceivablePlanRemindCount();
}
/** 激活时 */