From 9a472560edc501a40bd50291c84c9ab45af2dd16 Mon Sep 17 00:00:00 2001 From: limin-fit2 Date: Tue, 1 Mar 2022 18:03:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E8=AE=BE=E7=BD=AE=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=8D=E8=87=AA=E5=8A=A8=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automation/schedule/ScheduleMaintain.vue | 13 +++++++--- .../plan/components/ScheduleMaintain.vue | 26 +++++++++++-------- .../track/plan/components/TestPlanList.vue | 2 -- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue index b2fd6f4805..0746412400 100644 --- a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue +++ b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue @@ -123,7 +123,7 @@ export default { dialogVisible: false, schedule: { value: "", - enable: true + enable: false }, scheduleTaskType: "", testId: String, @@ -227,7 +227,7 @@ export default { } else { this.schedule = { value: '', - enable: true + enable: false }; } }); @@ -235,6 +235,10 @@ export default { crontabFill(value, resultList) { //确定后回传的值 this.form.cronValue = value; + // 如果是第一次设置定时任务规则,则默认开启定时任务 + if (!this.schedule.id){ + this.schedule.enable = true; + } this.$refs.crontabResult.resultList = resultList; this.$refs['from'].validate(); }, @@ -251,7 +255,6 @@ export default { if (valid) { this.intervalShortValidate(); let formCronValue = this.form.cronValue; - // this.schedule.enable = true; this.schedule.value = formCronValue; this.saveSchedule(); this.dialogVisible = false; @@ -354,5 +357,7 @@ export default { .el-form-item { margin-bottom: 10px; } - +>>> .el-form-item__error { + margin-left: 148px; +} diff --git a/frontend/src/business/components/track/plan/components/ScheduleMaintain.vue b/frontend/src/business/components/track/plan/components/ScheduleMaintain.vue index 9d383e75e9..3f17e43d28 100644 --- a/frontend/src/business/components/track/plan/components/ScheduleMaintain.vue +++ b/frontend/src/business/components/track/plan/components/ScheduleMaintain.vue @@ -31,13 +31,8 @@ - - - - - - + @@ -189,6 +184,9 @@ export default { } else if (!customValidate.pass) { callback(new Error(customValidate.info)); } else { + if (!this.schedule.id){ + this.schedule.enable = true; + } callback(); } }; @@ -199,7 +197,7 @@ export default { dialogVisible: false, schedule: { value: "", - enable: true, + enable: false, }, scheduleTaskType: "", testId: String, @@ -309,7 +307,7 @@ export default { } else { this.schedule = { value: '', - enable: true + enable: false }; } }); @@ -317,6 +315,10 @@ export default { crontabFill(value, resultList) { //确定后回传的值 this.form.cronValue = value; + // 如果是第一次设置定时任务规则,则默认开启定时任务 + if (!this.schedule.id){ + this.schedule.enable = true; + } this.$refs.crontabResult.resultList = resultList; this.$refs['from'].validate(); }, @@ -333,7 +335,6 @@ export default { if (valid) { this.intervalShortValidate(); let formCronValue = this.form.cronValue; - // this.schedule.enable = true; this.schedule.value = formCronValue; this.saveSchedule(); this.dialogVisible = false; @@ -433,7 +434,7 @@ export default { diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index 22bcf31a9c..fcbf087286 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -48,7 +48,6 @@ prop="createUser" :field="item" :fields-width="fieldsWidth" - sortable :label="$t('commons.create_user')" min-width="200px"> @@ -221,7 +220,6 @@ prop="passRate" :field="item" :fields-width="fieldsWidth" - sortable :label="$t('commons.pass_rate')" min-width="120px">