feat: 项目层级树+合作方绑定KOC资源+客户群全量可选+精简编辑表单,移除复盘报表
- 项目支持父子层级:树形折叠展示、详情面板内联管理总群成员、推送聚合子项目任务、环检测与子项目删除守卫 - 外部KOC合作方绑定 KOC 资源账号(唯一占用、换绑/解绑、资源页一键设为合作方),列表直显联系方式 - 绑定客户群改为全量外部群缓存(含各群主),同步按钮强刷;member_count 缺失以 member_list 兜底 - 任务/项目编辑模式隐藏不可变字段(平台/内容类型/品牌/总群成员),详情面板维护成员时保留 parent_id - 删除复盘报表整栏(导航/页面/task_report_list/导出路由/CSV lib 及测试)
This commit is contained in:
@@ -3,11 +3,8 @@ import {
|
||||
addTaskJoinWay,
|
||||
deleteJoinWay,
|
||||
getJoinWayQrCode,
|
||||
hasAppCredentials,
|
||||
listCustomerGroupChats,
|
||||
updateTaskJoinWay,
|
||||
type WecomConfig,
|
||||
type WecomGroupChat,
|
||||
} from "./wecom-client";
|
||||
|
||||
type FetchLike = typeof fetch;
|
||||
@@ -16,19 +13,6 @@ function text(value: unknown) {
|
||||
return String(value ?? "").trim();
|
||||
}
|
||||
|
||||
export async function listOwnerCustomerChats(
|
||||
config: WecomConfig,
|
||||
ownerUserid: string,
|
||||
fetchImpl: FetchLike = fetch,
|
||||
): Promise<WecomGroupChat[]> {
|
||||
if (!hasAppCredentials(config)) {
|
||||
throw new Error("企业微信自建应用未配置(WECOM_CORP_ID / WECOM_AGENT_ID / WECOM_SECRET)");
|
||||
}
|
||||
const owner = text(ownerUserid);
|
||||
if (!owner) return [];
|
||||
return listCustomerGroupChats(config, fetchImpl, [owner]);
|
||||
}
|
||||
|
||||
export type BindTaskCustomerChatResult = {
|
||||
customerChatId: string;
|
||||
customerChatName: string;
|
||||
|
||||
Reference in New Issue
Block a user