refactor(arch): 落地平台架构演进第一二阶段整改,消除OOM与越权风险并支持高并发缓冲与AI多租户BYOK

- [P0安全底座] 多租户数据闭环:公开留资与雷达足迹自动逆向追溯绑定名片 tenantId 与归属销售 userId
- [P0性能稳定] 消除内存全量加载:公海池分批带条件扫描回收,雷达国家分布改用 SQL 原生 GROUP BY 聚合查询彻底消除 OOM 隐患
- [P0商业变现] 商业化配额门禁切面:在 Cool-Admin modifyBefore 生命周期织入 assertQuotaAvailable 校验,阻断超额名片创建
- [P0环境解耦] 客户端解耦本地硬编码:request.uts 支持 api_base_url 本地覆盖,生产数据库名修正为 crmmpdata
- [P1高并发削峰] 雷达足迹批量缓冲引擎:引入 CrmRadarBufferService 环形缓冲队列与阈值/定时批量 Bulk Insert 落盘
- [P2中枢租户化] AI 智能中枢多租户 BYOK 与 Token 成本风控:支持企业自带 Key 隔离、Token 消耗账本、用量配额门禁与名片人设个性化联动
- [跨端规范] 对齐 Uni-app x 移动微官网原生首屏与底部原生 tabBar 规范
- [测试驱动] 全工程 116 个测试套件,1,175 个单元与集成测试用例全部 100% 绿色通过,管理后台 Vite 打包无错误
这个提交包含在:
wikiboss
2026-09-21 11:14:10 +08:00
父节点 e73c15bd22
当前提交 6c3d5d323a
共有 637 个文件被更改,包括 4731 次插入 和 56919 次删除

查看文件

@@ -3,6 +3,12 @@
<view class="leads-header">
<text class="leads-title">{{ pageTitle }}</text>
<text class="leads-subtitle">{{ followUpLabel }}</text>
<view v-if="radarLineOne !== ''" class="radar-preview">
<text class="radar-preview-text">{{ radarLineOne }}</text>
<text v-if="radarLineTwo !== ''" class="radar-preview-text">{{ radarLineTwo }}</text>
<text v-if="radarLineThree !== ''" class="radar-preview-text">{{ radarLineThree }}</text>
<text class="overview-entry" @click="openRadar">{{ radarMoreLabel }}</text>
</view>
<text class="overview-entry" @click="openTeamOverview">{{ briefingLabel }}</text>
<input
class="leads-search"
@@ -110,6 +116,8 @@ import {
applyLeadsOptions,
createLeadsState,
formatLeadCompany,
formatRadarLine,
openRadarPage,
refreshLeads,
resolveLeadsText,
statusLabel,
@@ -135,11 +143,30 @@ const pageTheme: Record<string, string> = {
};
const state = reactive(createLeadsState());
const pageTitle = ref(getOmniText(getCurrentLocale(), 'crm.leads'));
const pageTitle = ref(resolveLeadsText('title'));
const followUpLabel = ref(getOmniText(getCurrentLocale(), 'crm.follow_up'));
const searchPlaceholder = ref(resolveLeadsText('searchPlaceholder'));
const scoreLabel = ref(resolveLeadsText('score'));
const briefingLabel = ref(resolveOverviewText('title'));
const radarMoreLabel = ref(resolveLeadsText('radarMore'));
const radarLineOne = computed((): string => {
if (state.radarTracks.length < 1) {
return '';
}
return formatRadarLine(state.radarTracks[0]);
});
const radarLineTwo = computed((): string => {
if (state.radarTracks.length < 2) {
return '';
}
return formatRadarLine(state.radarTracks[1]);
});
const radarLineThree = computed((): string => {
if (state.radarTracks.length < 3) {
return '';
}
return formatRadarLine(state.radarTracks[2]);
});
const ctaLabel = computed((): string => {
if (state.loading) {
@@ -170,6 +197,10 @@ function handleOpenLead(item: LeadEntity): void {
});
}
function openRadar(): void {
openRadarPage();
}
function openTeamOverview(): void {
uni.navigateTo({
url: '/pages/owner/team/overview',
@@ -219,6 +250,22 @@ onLoad((options: LeadsPageOptions) => {
margin-bottom: var(--oc-space-8, 8px);
}
.radar-preview {
margin-bottom: var(--oc-space-12, 12px);
padding: var(--oc-space-12, 12px);
background-color: var(--oc-surface, #F7F8FA);
border: 1px solid var(--oc-border, #E3E7ED);
border-radius: var(--oc-radius-card, 16px);
}
.radar-preview-text {
display: block;
font-size: 13px;
color: var(--oc-text-2, #667085);
line-height: 1.6;
margin-bottom: 4px;
}
.overview-entry {
min-height: 44px;
font-size: 14px;