From e1fd84bb7313090cb2d8c8295df0b1d0187dc461 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期四, 24 八月 2023 10:10:39 +0800 Subject: [PATCH] 工艺参数+编号的问题 --- src/components/AddControl.vue | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/AddControl.vue b/src/components/AddControl.vue index 5883121..b913beb 100644 --- a/src/components/AddControl.vue +++ b/src/components/AddControl.vue @@ -80,11 +80,16 @@ }, methods: { getStartInfo(){ - startTask({id:this.id}).then(res=>{ - if(res.code==200){ - this.Arr=res.data.params; - } - }) + if(this.id){ + startTask({id:this.id}).then(res=>{ + if(res.code==200){ + this.Arr=res.data.Params; + } + }) + }else{ + this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + } + }, validatorNum(rule, value, callback) { if (value) { @@ -105,13 +110,16 @@ onSubmit() { - - sendProcessParams({id:this.id}).then(res=>{ - if(res.code==200){ - this.$message.success("涓嬪彂鎴愬姛锛�"); - this.shutdown(); - } - }) + if(this.id){ + sendProcessParams({id:this.id}).then(res=>{ + if(res.code==200){ + this.$message.success("涓嬪彂鎴愬姛锛�"); + this.shutdown(); + } + }) + }else{ + this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + } }, shutdown() { this.islook = false; -- Gitblit v1.8.0