From 883ce335c364cf3a39fb985f1327d1e4cd60351d Mon Sep 17 00:00:00 2001 From: metersphere-bot <78466014+metersphere-bot@users.noreply.github.com> Date: Fri, 16 Jul 2021 16:38:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BF=9D=E5=AD=98workspace?= =?UTF-8?q?Id=E5=92=8CprojectId=E7=9A=84=E9=97=AE=E9=A2=98=20(#4765)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复创建定时任务保存workspaceId和projectId的问题 * fix: 修复创建定时任务保存workspaceId和projectId的问题 Co-authored-by: Captain.B --- .../api/definition/components/import/ApiSchedule.vue | 3 ++- .../definition/components/import/ImportScheduleEdit.vue | 3 ++- .../src/business/components/api/test/ApiTestConfig.vue | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/import/ApiSchedule.vue b/frontend/src/business/components/api/definition/components/import/ApiSchedule.vue index 0ef48381c7..5ec6b469b0 100644 --- a/frontend/src/business/components/api/definition/components/import/ApiSchedule.vue +++ b/frontend/src/business/components/api/definition/components/import/ApiSchedule.vue @@ -71,7 +71,7 @@ import SwaggerTaskList from "@/business/components/api/definition/components/imp import CrontabResult from "@/business/components/common/cron/CrontabResult"; import Crontab from "@/business/components/common/cron/Crontab"; import {cronValidate} from "@/common/js/cron"; -import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils"; +import {getCurrentProjectID, getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils"; import SelectTree from "@/business/components/common/select-tree/SelectTree"; export default { name: "ApiSchedule", @@ -184,6 +184,7 @@ export default { }, saveSchedule() { this.formData.projectId = getCurrentProjectID(); + this.formData.workspaceId = getCurrentWorkspaceId(); this.formData.value = this.formData.rule; let url = ''; if (this.formData.id) { diff --git a/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue b/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue index dd00efac84..a138cdf0dc 100644 --- a/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue +++ b/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue @@ -40,7 +40,7 @@