diff --git a/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue b/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue index 29ba45dede..9131b25ee1 100644 --- a/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue +++ b/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue @@ -148,7 +148,7 @@ }, getConditions() { let sampleSelectRows = this.selectRows; - let param = buildBatchParam(this); + let param = buildBatchParam(this, undefined, this.projectId); param.ids = Array.from(sampleSelectRows).map(row => row.id); return param; }, diff --git a/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue b/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue index a6ec775e05..9a239b66a8 100644 --- a/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue +++ b/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue @@ -282,7 +282,7 @@ export default { }, getConditions() { let sampleSelectRows = this.$refs.table.getSelectRows(); - let batchParam = buildBatchParam(this); + let batchParam = buildBatchParam(this, undefined, this.projectId); let param = {}; if (batchParam.condition) { param = batchParam.condition; diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index f5a1f6f222..fc68207310 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -191,14 +191,14 @@ export function getLabel(vueObj, type) { } -export function buildBatchParam(vueObj, selectIds) { +export function buildBatchParam(vueObj, selectIds, projectId) { let param = {}; if (vueObj.selectRows) { param.ids = selectIds ? selectIds: Array.from(vueObj.selectRows).map(row => row.id); } else { param.ids = selectIds; } - param.projectId = getCurrentProjectID(); + param.projectId = projectId ? projectId : getCurrentProjectID(); param.condition = vueObj.condition; return param; }