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 @@ - + + +