|
|
@@ -90,8 +90,6 @@ export type OrganizationStatus = {
|
|
|
regionNameNote?: string;
|
|
|
/** 运维团队负载列降级说明(后端 `load_pending` 原文) */
|
|
|
loadPending?: string;
|
|
|
- /** 客户集合条数口径提示 */
|
|
|
- customerNote?: string;
|
|
|
};
|
|
|
|
|
|
const PAGE_SIZE = 200;
|
|
|
@@ -375,7 +373,6 @@ function currentDemand(): Set<OrgCollection> {
|
|
|
async function fetchAll(need: ReadonlySet<OrgCollection>): Promise<void> {
|
|
|
const partial: OrganizationStatus["partial"] = {};
|
|
|
// 本轮未重取的集合,其降级说明沿用上一份(⛔ 把「这次没取」显示成「后端没这个口径」)。
|
|
|
- let customerNote = need.has("enterprises") ? undefined : status.customerNote;
|
|
|
let loadPending = need.has("maintenanceTeams") ? undefined : status.loadPending;
|
|
|
let regionNameNote = need.has("regions") ? undefined : status.regionNameNote;
|
|
|
|
|
|
@@ -412,11 +409,7 @@ async function fetchAll(need: ReadonlySet<OrgCollection>): Promise<void> {
|
|
|
}
|
|
|
|
|
|
/** ⛔ 全量客户进内存。组织侧只保留空集合;指定客户/删除阻断另走搜索与计数。 */
|
|
|
- let enterprises = snapshot.enterprises;
|
|
|
- if (need.has("enterprises")) {
|
|
|
- enterprises = [];
|
|
|
- customerNote = "客户集合不再全量进内存(真实体量以万计);指定客户请搜索选用,删除阻断改用区域/主体计数。";
|
|
|
- }
|
|
|
+ const enterprises = need.has("enterprises") ? [] : snapshot.enterprises;
|
|
|
const customerIndex = new Map<string, number>();
|
|
|
|
|
|
let operators = snapshot.operators;
|
|
|
@@ -457,7 +450,7 @@ async function fetchAll(need: ReadonlySet<OrgCollection>): Promise<void> {
|
|
|
markLoaded(ready);
|
|
|
|
|
|
snapshot = { regions, operators, partners, operationsTeams, maintenanceTeams, enterprises };
|
|
|
- status = { loading: false, error: null, partial, regionNameNote, loadPending, customerNote };
|
|
|
+ status = { loading: false, error: null, partial, regionNameNote, loadPending };
|
|
|
notify();
|
|
|
}
|
|
|
|
|
|
@@ -468,8 +461,7 @@ async function fetchAll(need: ReadonlySet<OrgCollection>): Promise<void> {
|
|
|
* 因此自动保持页面口径。⛔ 无条件拉全部:工单台账进入只应打 `ops_team/get_list`。
|
|
|
* 在飞那一轮覆盖不全本次需求时,先等它完成再补取差额(⛔ 让后挂载的页面拿到缺集合的应答)。
|
|
|
*
|
|
|
- * ⚠️ 客户集合**不再**全量拉取(真实体量以万计):`enterprises` 需求只清空并写
|
|
|
- * `customerNote`;指定客户改搜索选用,删除阻断改用区域/主体计数。
|
|
|
+ * 组织页通过搜索选择指定客户,通过区域或主体计数判断是否允许删除。
|
|
|
*/
|
|
|
export function reloadOrganizationData(next?: readonly OrgCollection[], options?: { force?: boolean }): Promise<void> {
|
|
|
const need = next ? new Set(next) : currentDemand();
|