diff --git a/UI/src/views/training/GlobalTrainingView.vue b/UI/src/views/training/GlobalTrainingView.vue index fd398f4..ed255bb 100644 --- a/UI/src/views/training/GlobalTrainingView.vue +++ b/UI/src/views/training/GlobalTrainingView.vue @@ -609,15 +609,17 @@ const startTraining = async () => { epochs: form.epochs, training_mode: 'global', // 标识这是全局训练模式 training_scope: form.training_scope, - aggregation_method: form.aggregation_method + aggregation_method: form.aggregation_method, + store_ids: form.store_ids || [], // 确保始终发送数组 + product_ids: form.product_ids || [] // 确保始终发送数组 }; - if (form.store_ids.length > 0) { - payload.store_ids = form.store_ids; + // 关键修复:即使是列表,也传递第一个作为代表ID + if (payload.store_ids.length > 0) { + payload.store_id = payload.store_ids[0]; } - - if (form.product_ids.length > 0) { - payload.product_ids = form.product_ids; + if (payload.product_ids.length > 0) { + payload.product_id = payload.product_ids[0]; } if (form.training_type === "retrain") { diff --git a/UI/src/views/training/StoreTrainingView.vue b/UI/src/views/training/StoreTrainingView.vue index 29558a6..7791151 100644 --- a/UI/src/views/training/StoreTrainingView.vue +++ b/UI/src/views/training/StoreTrainingView.vue @@ -228,7 +228,11 @@ prop="version" label="版本" width="80" - /> + > + +