新增: 依赖图环形检测 + PNG 导出 + 任务列表真实总数

- 后端 detect_module_cycles IPC(DFS 三色标记法检测环形依赖)
- 前端环检测按钮:高亮参与环的节点(红色边框)
- 图导出 PNG(X6 toPNG 回调模式)
- 后端 count_tasks IPC + 前端 taskApi.count()
- 任务列表所有筛选/搜索/排序/翻页均拉真实 total
This commit is contained in:
lxy
2026-07-01 11:30:19 +08:00
parent 89912155a6
commit 36ea090d9b
7 changed files with 151 additions and 5 deletions
+10
View File
@@ -203,6 +203,16 @@ pub async fn list_tasks(
Ok(tasks)
}
/// 按条件计数任务(分页 total 用)。
#[tauri::command]
pub async fn count_tasks(
state: State<'_, AppState>,
query: Option<TaskQuery>,
) -> Result<i64, String> {
let q = query.unwrap_or_default();
state.tasks.count_by_query(&q).await.map_err(err_str)
}
/// 按 id 查任务,找不到返回 Err(供前端详情页)
#[tauri::command]
pub async fn get_task_by_id(