diff --git a/lib/features/devices/data/datasources/device_task_datasource.dart b/lib/features/devices/data/datasources/device_task_datasource.dart index 773472ec..33cc4b58 100644 --- a/lib/features/devices/data/datasources/device_task_datasource.dart +++ b/lib/features/devices/data/datasources/device_task_datasource.dart @@ -95,10 +95,9 @@ class DeviceTaskDatasourceImpl implements DeviceTaskDatasource { }) async { final url = '${HttpApiConsts.baseUrl}/iot/deviceTask/cancelTask'; final body = { - 'deviceId': deviceId, 'taskId': taskId, - 'orgId': orgId, 'siteId': siteId, + 'orgId': orgId, 'forceCancel': forceCancel, }; _logger.logWithLevel('[cancelTask] 请求: POST $url'); diff --git a/lib/features/devices/presentation/bloc/devices_cubit.dart b/lib/features/devices/presentation/bloc/devices_cubit.dart index 78870d84..0e4f791c 100644 --- a/lib/features/devices/presentation/bloc/devices_cubit.dart +++ b/lib/features/devices/presentation/bloc/devices_cubit.dart @@ -450,7 +450,7 @@ class DevicesCubit extends Cubit { state.copyWith( isLoading: false, workRecords: state.workRecords - ?.where((record) => record != workName) + ?.where((record) => record['workName'] != workName) .toList(), ), ),