新增: 工程依赖图数据层 + 依赖边渲染 + 小地图
- 后端 module_dependencies 表(V35 迁移)+ ModuleDependencyRepo CRUD - IPC:add/remove/list_module_dependencies - 前端 API 封装 + DependencyGraph 接入真实边数据 - 依赖类型颜色区分(library/api/mq/shared/custom) - 小地图插件(MiniMap)大图概览导航 - 点击节点跳转项目详情 - 任务列表后端真分页 count_by_query 方法
This commit is contained in:
@@ -59,6 +59,17 @@ export interface GitChangedFile {
|
||||
path: string
|
||||
}
|
||||
|
||||
/** 工程依赖关系记录(对齐后端 ModuleDependencyRecord)。 */
|
||||
export interface ModuleDependencyRecord {
|
||||
id: string
|
||||
project_id: string
|
||||
from_module_id: string
|
||||
to_module_id: string
|
||||
dep_type: string
|
||||
label: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
/** 最近提交项(对齐后端 GitRecentCommit)。 */
|
||||
export interface GitRecentCommit {
|
||||
hash: string
|
||||
@@ -157,6 +168,21 @@ export const moduleApi = {
|
||||
return invoke('list_branches', { moduleId })
|
||||
},
|
||||
|
||||
/** 列出项目全部工程依赖。 */
|
||||
listModuleDependencies(projectId: string): Promise<ModuleDependencyRecord[]> {
|
||||
return invoke('list_module_dependencies', { projectId })
|
||||
},
|
||||
|
||||
/** 新增工程依赖。 */
|
||||
addModuleDependency(projectId: string, fromModuleId: string, toModuleId: string, depType?: string, label?: string): Promise<ModuleDependencyRecord> {
|
||||
return invoke('add_module_dependency', { projectId, fromModuleId, toModuleId, depType: depType ?? null, label: label ?? null })
|
||||
},
|
||||
|
||||
/** 删除工程依赖。 */
|
||||
removeModuleDependency(id: string): Promise<void> {
|
||||
return invoke('remove_module_dependency', { id })
|
||||
},
|
||||
|
||||
getModuleCommits(moduleId: string, skip?: number, limit?: number): Promise<{
|
||||
commits: { hash: string; subject: string; timestamp: number; author: string }[]
|
||||
has_more: boolean
|
||||
|
||||
Reference in New Issue
Block a user