feat: 项目层级树+合作方绑定KOC资源+客户群全量可选+精简编辑表单,移除复盘报表

- 项目支持父子层级:树形折叠展示、详情面板内联管理总群成员、推送聚合子项目任务、环检测与子项目删除守卫
- 外部KOC合作方绑定 KOC 资源账号(唯一占用、换绑/解绑、资源页一键设为合作方),列表直显联系方式
- 绑定客户群改为全量外部群缓存(含各群主),同步按钮强刷;member_count 缺失以 member_list 兜底
- 任务/项目编辑模式隐藏不可变字段(平台/内容类型/品牌/总群成员),详情面板维护成员时保留 parent_id
- 删除复盘报表整栏(导航/页面/task_report_list/导出路由/CSV lib 及测试)
This commit is contained in:
ABAPPLO
2026-09-23 11:13:17 +08:00
parent 8f1ebf7697
commit ab78b187c0
20 changed files with 1354 additions and 958 deletions

View File

@@ -539,6 +539,32 @@ test("listCustomerGroupChats paginates groupchat/list and keeps only normal grou
assert.equal(secondBody.cursor, "page-2");
});
test("listCustomerGroupChats derives memberCount from member_list when member_count absent", async () => {
const { fetchImpl } = fakeGroupPush({
pages: [{ next_cursor: "", group_chat_list: [{ chat_id: "wr-normal-1", status: 0 }] }],
details: {
"wr-normal-1": {
name: "",
owner: "zhangsan",
member_list: [
{ type: 1, userid: "zhangsan" },
{ type: 1, userid: "lisi" },
{ type: 2, userid: "wm external 1" },
{ type: 2, userid: "wm external 2" },
{ type: 2, userid: "wm external 3" },
],
},
},
});
const groups = await listCustomerGroupChats(
resolveWecomConfig(baseBindings),
fetchImpl,
);
assert.equal(groups.length, 1);
assert.equal(groups[0].name, "");
assert.equal(groups[0].memberCount, 5, "member_count falls back to member_list length");
});
test("listCustomerGroupChats skips groups whose detail lookup fails", async () => {
const { fetchImpl } = fakeGroupPush({
pages: [