1
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
class PlanStepDto {
|
||||
num? id;
|
||||
int? id;
|
||||
String? stepIcon;
|
||||
String? stepContent;
|
||||
String? stepExplain;
|
||||
num? stepStatus;
|
||||
int? stepStatus;
|
||||
|
||||
PlanStepDto({this.id, this.stepIcon, this.stepContent, this.stepExplain, this.stepStatus});
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import 'package:plan/api/dto/plan_detail_dto.dart';
|
||||
import 'package:plan/api/dto/plan_item_dto.dart';
|
||||
import 'package:plan/api/network/request.dart';
|
||||
|
||||
import '../../data/models/plan_acttion_type.dart';
|
||||
|
||||
///初始化计划
|
||||
Future<int> initPlanApi(String need, int agentId) async {
|
||||
var res = await Request().post("/plan/init", {
|
||||
@@ -56,3 +58,28 @@ Future<void> deletePlanApi(int planId) async {
|
||||
"plan_id": planId,
|
||||
});
|
||||
}
|
||||
|
||||
///编辑用户计划步骤
|
||||
Future<void> editPlanStepApi(
|
||||
int planId, {
|
||||
required PlanActionType act,
|
||||
int? stepId,
|
||||
String? content,
|
||||
String? explain,
|
||||
}) async {
|
||||
await Request().post("/plan/edit_plan_steps_info", {
|
||||
"plan_id": planId,
|
||||
"act": act.value,
|
||||
"step_id": stepId,
|
||||
"step_content": content,
|
||||
"step_explain": explain,
|
||||
});
|
||||
}
|
||||
|
||||
///修改步骤顺序
|
||||
Future<void> editPlanStepOrderApi(int planId,List<PlanStepDto> list) async {
|
||||
await Request().post("/plan/change_plan_steps", {
|
||||
"plan_id": planId,
|
||||
"steps": list.map((e) => e.toJson()).toList(),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user