添加打印

This commit is contained in:
mmc
2026-03-11 15:49:50 +08:00
parent 4b61bdc249
commit ddb6441413

View File

@@ -496,7 +496,11 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
ToastUtils.showError(context, '用户ID为空,无法保存!');
return;
}
debugPrint("===打印生成的路径开始 ");
for (var i = 0; i < typedPathList.length; i++) {
debugPrint(typedPathList[i].toString());
}
debugPrint("===打印生成的路径结束");
// 2. 构造 SavePath 数据 (严格对应你的 JS 结构)
final Map<String, dynamic> savePath = {
//'img': imgBase64 ?? '', // 截图的 Base64 字符串
@@ -1447,7 +1451,12 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
final List<work_area_model.DeviceAddPathPointModel> typedList = startWorkList.whereType<Map<String, dynamic>>().map((item) {
return work_area_model.DeviceAddPathPointModel(latitude: (item['lat'] as num).toDouble(), longitude: (item['lon'] as num).toDouble());
}).toList();
debugPrint('✅ 类型转换成功,长度:${typedList.length}');
debugPrint("===打印发送开始作业的路径开始 ");
for (var i = 0; i < typedList.length; i++) {
debugPrint(typedList[i].toString());
}
debugPrint("===打印发送开始作业的路径结束");
final Queue<work_area_model.DeviceAddPathPointModel> pathQueue = Queue.from(typedList);
debugPrint('🚀 开始作业:${_selectedPlot?.plotName ?? "未命名"},路径点数量:${pathQueue.length}');