From 34330ff9944bdf2edd83816217d26595ca627b1f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 25 八月 2023 14:45:35 +0800 Subject: [PATCH] plc配置的 回显 bug 2023-8-25 --- 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