From faf90b2db9eec6805387276a607bcee7b82036f7 Mon Sep 17 00:00:00 2001 From: lannoy0523 <935275025@qq.com> Date: Mon, 4 Nov 2024 10:54:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=88=B6=E5=93=81?= =?UTF-8?q?=E9=A2=84=E5=8A=A0=E8=BD=BD=E5=8A=9F=E8=83=BD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20#2683?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/editPlanConfigDialog.vue | 30 ++++++++++++------- .../devops-op/src/views/preload/index.vue | 15 ++++++++-- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/frontend/devops-op/src/views/preload/components/editPlanConfigDialog.vue b/src/frontend/devops-op/src/views/preload/components/editPlanConfigDialog.vue index e71cd6888c..32151f6a4d 100644 --- a/src/frontend/devops-op/src/views/preload/components/editPlanConfigDialog.vue +++ b/src/frontend/devops-op/src/views/preload/components/editPlanConfigDialog.vue @@ -35,11 +35,16 @@ - - + + - +
@@ -78,7 +83,7 @@ export default { watch: { visible: function(newVal) { if (newVal) { - this.resetFileCache() + this.resetPlan() this.showDialog = true } else { this.close() @@ -117,7 +122,7 @@ export default { return obj.name.toLowerCase().indexOf(queryStr.toLowerCase()) !== -1 }) : arr }, - resetFileCache() { + resetPlan() { this.plan = this.newPlan() this.$nextTick(() => { this.$refs['form'].clearValidate() @@ -141,12 +146,15 @@ export default { this.$emit('update:visible', false) }, handleUpdate() { - if (this.createMode) { - createPlan(this.plan).then(() => { - this.$message.success('新建配置成功') - this.close(true) - }) - } + this.$refs['form'].validate((valid) => { + if (valid) { + this.plan.executeTime = this.plan.executeTime.getTime() + createPlan(this.plan).then(() => { + this.$message.success('新建配置成功') + this.close(true) + }) + } + }) } } } diff --git a/src/frontend/devops-op/src/views/preload/index.vue b/src/frontend/devops-op/src/views/preload/index.vue index 2b596b79a3..26c14d95fb 100644 --- a/src/frontend/devops-op/src/views/preload/index.vue +++ b/src/frontend/devops-op/src/views/preload/index.vue @@ -82,7 +82,13 @@ - + + +