tune(nav): 下拉项目首页10、ds数据/文件每页5(触发全部项目/加载更多更易达)
This commit is contained in:
parent
b4824a6e4e
commit
a37596f0d3
|
|
@ -42,7 +42,7 @@ void WorkbenchNavController::start() {
|
|||
}
|
||||
|
||||
void WorkbenchNavController::loadProjectsAndStructure() {
|
||||
const auto ps = repo_.pageProjects(std::string(), std::string(), 1, 20);
|
||||
const auto ps = repo_.pageProjects(std::string(), std::string(), 1, 10); // 下拉首页 10
|
||||
if (!ps.ok) {
|
||||
emit loadFailed(QStringLiteral("projects"), QString::fromStdString(ps.error));
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ RepoResult<DsPage> ApiProjectRepository::loadTmRows(const std::string& projectId
|
|||
{QStringLiteral("structParentConfType"), 2},
|
||||
{QStringLiteral("classifyTypeList"), QJsonArray{classifyType}},
|
||||
{QStringLiteral("pageNo"), pageNo},
|
||||
{QStringLiteral("pageSize"), 100}};
|
||||
{QStringLiteral("pageSize"), 5}}; // 数据/文件页签每页 5;不足 total 时"加载更多"追加
|
||||
const net::ApiResponse r = api_.postJson(path, body);
|
||||
if (!ok(r)) return {false, {}, errorOf(r, "loadTmRows failed")};
|
||||
return {true, dto::parseDsPage(r.data), {}};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
// 项目类型列表(弹窗类型过滤下拉)。
|
||||
virtual RepoResult<std::vector<ProjectType>> listProjectTypes() = 0;
|
||||
virtual RepoResult<std::vector<StructNode>> loadStructure(const std::string& projectId) = 0;
|
||||
// 按 TM 分页拉数据/文件行:classifyType 3=数据 1=文件;pageNo 从 1 起,pageSize 固定 100。
|
||||
// 按 TM 分页拉数据/文件行:classifyType 3=数据 1=文件;pageNo 从 1 起,pageSize 固定 5。
|
||||
virtual RepoResult<DsPage> loadTmRows(const std::string& projectId,
|
||||
const std::string& tmObjectId, int classifyType,
|
||||
int pageNo) = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue